void QmitkCorrespondingPointSetsWidget::SetupUi() { QBoxLayout* lay1 = new QVBoxLayout(this); // add status bar buttons if (QTPropShowButtonBar) { QBoxLayout* lay2 = new QHBoxLayout(); lay1->addLayout(lay2); lay2->stretch(true); QStatusBar* statusBar = new QStatusBar(this); statusBar->setMaximumHeight(25); m_CreatePointSetBtn = new QToolButton(); m_CreatePointSetBtn->setAutoRaise(true); m_CreatePointSetBtn->setIcon(QIcon(":/QtWidgetsExt/btnAddPointSet.png")); m_CreatePointSetBtn->setToolTip(QString("Create new point set")); connect(this->m_CreatePointSetBtn, SIGNAL(clicked()), this, SLOT(AddPointSet())); statusBar->addWidget(m_CreatePointSetBtn); m_AddPointsBtn = new QToolButton(); m_AddPointsBtn->setAutoRaise(true); m_AddPointsBtn->setIcon(QIcon(":/QtWidgetsExt/btnSetPoints.png")); m_AddPointsBtn->setToolTip(QString("Check to add new points (shift-click)")); m_AddPointsBtn->setCheckable(true); connect(this->m_AddPointsBtn, SIGNAL(clicked(bool)), this, SLOT(AddPointsMode(bool))); statusBar->addWidget(m_AddPointsBtn); m_MovePointUpBtn = new QToolButton(); m_MovePointUpBtn->setAutoRaise(true); m_MovePointUpBtn->setIcon(QIcon(":/QtWidgetsExt/btnMoveUp.png")); m_MovePointUpBtn->setToolTip(QString("Move selected point up")); connect(this->m_MovePointUpBtn, SIGNAL(clicked()), this, SLOT(MoveSelectedPointUp())); statusBar->addWidget(m_MovePointUpBtn); m_MovePointDownBtn = new QToolButton(); m_MovePointDownBtn->setAutoRaise(true); m_MovePointDownBtn->setIcon(QIcon(":/QtWidgetsExt/btnMoveDown.png")); m_MovePointDownBtn->setToolTip(QString("Move selected point down")); connect(this->m_MovePointDownBtn, SIGNAL(clicked()), this, SLOT(MoveSelectedPointDown())); statusBar->addWidget(m_MovePointDownBtn); m_RemovePointBtn = new QToolButton(); m_RemovePointBtn->setAutoRaise(true); m_RemovePointBtn->setIcon(QIcon(":/QtWidgetsExt/btnRemovePoint.png")); m_RemovePointBtn->setToolTip(QString("Remove selected point")); connect(this->m_RemovePointBtn, SIGNAL(clicked()), this, SLOT(RemoveSelectedPoint())); statusBar->addWidget(m_RemovePointBtn); m_SwapSetsBtn = new QToolButton(); m_SwapSetsBtn->setAutoRaise(true); m_SwapSetsBtn->setIcon(QIcon(":/QtWidgetsExt/btnSwapSets.png")); m_SwapSetsBtn->setToolTip(QString("Swap the two selected point sets")); m_SwapSetsBtn->setCheckable(true); connect(this->m_SwapSetsBtn, SIGNAL(clicked(bool)), this, SLOT(SwapPointSets(bool))); statusBar->addWidget(m_SwapSetsBtn); // disable buttons m_MovePointUpBtn->setEnabled(false); m_MovePointDownBtn->setEnabled(false); m_RemovePointBtn->setEnabled(false); m_SwapSetsBtn->setEnabled(false); m_AddPointsBtn->setEnabled(false); lay2->addWidget(statusBar); } lay1->insertWidget(0,m_CorrespondingPointSetsView); this->setLayout(lay1); }