-
- bool blockX = !value_x->signalsBlocked();
- bool blockY = !value_y->signalsBlocked();
-
- // Block signals emitted by this method
- if (blockX) value_x->blockSignals(true);
- if (blockY) value_y->blockSignals(true);
-
- if (i->type() == TEXTITEM) {
-
- QGraphicsTextItem *rec = static_cast <QGraphicsTextItem *> (i);
-
- // Set the correct x coordinate value
- if (origin_x_left->isChecked()) {
- // Origin (0 point) is at m_frameWidth, coordinate axis is inverted
- value_x->setValue((int) (m_frameWidth - rec->pos().x() - rec->boundingRect().width()));
- } else {
- // Origin is at 0 (default)
- value_x->setValue((int) rec->pos().x());
- }
-
- // Same for y
- if (origin_y_top->isChecked()) {
- value_y->setValue((int) (m_frameHeight - rec->pos().y() - rec->boundingRect().height()));
- } else {
- value_y->setValue((int) rec->pos().y());
- }
-
- } else if (i->type() == RECTITEM) {
-
- QGraphicsRectItem *rec = static_cast <QGraphicsRectItem *> (i);
-
- if (origin_x_left->isChecked()) {
- // Origin (0 point) is at m_frameWidth
- value_x->setValue((int) (m_frameWidth - rec->pos().x() - rec->rect().width()));
- } else {
- // Origin is at 0 (default)
- value_x->setValue((int) rec->pos().x());
- }
-
- if (origin_y_top->isChecked()) {
- value_y->setValue((int) (m_frameHeight - rec->pos().y() - rec->rect().height()));
- } else {
- value_y->setValue((int) rec->pos().y());
- }
-
- } else if (i->type() == IMAGEITEM) {
-
- if (origin_x_left->isChecked()) {
- value_x->setValue((int) (m_frameWidth - i->pos().x() - i->sceneBoundingRect().width()));
- } else {
- value_x->setValue((int) i->pos().x());
- }
-
- if (origin_y_top->isChecked()) {
- value_y->setValue((int) (m_frameHeight - i->pos().y() - i->sceneBoundingRect().height()));
- } else {
- value_y->setValue((int) i->pos().y());
- }
-
- }
-
- // Stop blocking signals now
- if (!blockX) value_x->blockSignals(false);
- if (!blockY) value_y->blockSignals(false);
+ itemzoom->blockSignals(true);
+ itemrotate->blockSignals(false);
+
+ Transform t = m_transformations.value(i);
+ itemzoom->setValue((int)(t.scalex * 100.0 + 0.5));
+ itemrotate->setValue((int)(t.rotate));
+
+ itemzoom->blockSignals(false);
+ itemrotate->blockSignals(false);