73 QRectF rect = scene_->sceneRect();
75 arrows_[0] =
new Arrow (_scene,
this, Arrow::North);
76 arrows_[1] =
new Arrow (_scene,
this, Arrow::South);
77 arrows_[2] =
new Arrow (_scene,
this, Arrow::East);
78 arrows_[3] =
new Arrow (_scene,
this, Arrow::West);
79 arrows_[4] =
new Arrow (_scene,
this, Arrow::Center);
81 QGraphicsGridLayout *aLayout =
new QGraphicsGridLayout;
82 aLayout->addItem (arrows_[0], 0, 1, Qt::AlignCenter);
83 aLayout->addItem (arrows_[1], 2, 1, Qt::AlignCenter);
84 aLayout->addItem (arrows_[2], 1, 2, Qt::AlignCenter);
85 aLayout->addItem (arrows_[3], 1, 0, Qt::AlignCenter);
86 aLayout->addItem (arrows_[4], 1, 1, Qt::AlignCenter);
88 trash_ =
new Trash (_scene,
this);
90 QGraphicsLinearLayout *zLayout =
new QGraphicsLinearLayout (Qt::Horizontal);
91 zoom_[0] =
new ZoomButton (_scene,
this, ZoomButton::In);
92 zoom_[1] =
new ZoomButton (_scene,
this, ZoomButton::Out);
93 zLayout->addItem (zoom_[0]);
94 zLayout->addItem (zoom_[1]);
97 scene_->addItem (fDisplay_);
100 connect (scene_, SIGNAL (sceneRectChanged (
const QRectF &)),
101 this, SLOT (sceneRectChanged (
const QRectF &)));
103 QGraphicsGridLayout *mLayout =
new QGraphicsGridLayout;
105 mLayout->addItem (aLayout, 0, 2, Qt::AlignTop | Qt::AlignRight);
106 mLayout->addItem (zLayout, 2, 0, Qt::AlignBottom | Qt::AlignLeft);
107 mLayout->addItem (trash_, 2, 2, Qt::AlignBottom | Qt::AlignRight);
108 mLayout->setColumnStretchFactor (1, 1);
109 mLayout->setRowStretchFactor (1, 1);
110 mLayout->setContentsMargins (7, 7, 7, 7);