2018-11-14 23:15:36 +03:00
|
|
|
import QtQuick 2.9
|
|
|
|
|
|
|
|
Rectangle {
|
|
|
|
id: graphicItem
|
|
|
|
property var model: null
|
|
|
|
property real angle: (model) ? model.angle : 0;
|
|
|
|
property string texture: (model) ? model.texture : "";
|
|
|
|
property rect rec: (model) ? model.rect : Qt.rect(0, 0, 0, 0);
|
|
|
|
property int guiId: (model) ? model.color : -1;
|
|
|
|
|
|
|
|
color: (model) ? model.color : "#11ff32";
|
|
|
|
width: rec.width * mainWindow.point;
|
|
|
|
height: rec.height * mainWindow.point;
|
|
|
|
x: rec.x * mainWindow.point;
|
|
|
|
y: rec.y * mainWindow.point;
|
|
|
|
|
|
|
|
transform: Rotation {
|
2018-11-16 02:21:27 +03:00
|
|
|
origin.x: rec.x / 2;
|
|
|
|
origin.y: rec.y / 2;
|
2018-11-14 23:15:36 +03:00
|
|
|
angle: graphicItem.angle;
|
|
|
|
}
|
2018-11-16 02:21:27 +03:00
|
|
|
|
2018-11-14 23:15:36 +03:00
|
|
|
}
|