35 #include <QGridLayout> 36 #include <QPushButton> 44 BaseWidget(parent,
"tool_manager_widget",
"ToolManager debugger"),
45 mConfigureButton(new QPushButton(
"Configure")),
46 mDeConfigureButton(new QPushButton(
"Deconfigure")),
47 mInitializeButton(new QPushButton(
"Initialize")),
48 mUnInitializeButton(new QPushButton(
"Uninitialize")),
49 mStartTrackingButton(new QPushButton(
"Start Tracking")),
50 mStopTrackingButton(new QPushButton(
"Stop Tracking")),
51 mTrackingService(trackingService)
53 this->setToolTip(
"ToolManager debugging utilities");
55 connect(mConfigureButton, SIGNAL(clicked(
bool)),
this, SLOT(configureClickedSlot(
bool)));
56 connect(mDeConfigureButton, SIGNAL(clicked(
bool)),
this, SLOT(deconfigureClickedSlot(
bool)));
57 connect(mInitializeButton, SIGNAL(clicked(
bool)),
this, SLOT(initializeClickedSlot(
bool)));
58 connect(mUnInitializeButton, SIGNAL(clicked(
bool)),
this, SLOT(uninitializeClickedSlot(
bool)));
59 connect(mStartTrackingButton, SIGNAL(clicked(
bool)),
this, SLOT(startTrackingClickedSlot(
bool)));
60 connect(mStopTrackingButton, SIGNAL(clicked(
bool)),
this, SLOT(stopTrackingClickedSlot(
bool)));
65 QGridLayout* layout =
new QGridLayout(
this);
66 layout->addWidget(mConfigureButton, 0, 0);
67 layout->addWidget(mDeConfigureButton, 0, 1);
68 layout->addWidget(mInitializeButton, 1, 0);
69 layout->addWidget(mUnInitializeButton, 1, 1);
70 layout->addWidget(mStartTrackingButton, 2, 0);
71 layout->addWidget(mStopTrackingButton, 2, 1);
73 this->updateButtonStatusSlot();
80 void ToolManagerWidget::configureClickedSlot(
bool checked)
85 void ToolManagerWidget::deconfigureClickedSlot(
bool checked)
90 void ToolManagerWidget::initializeClickedSlot(
bool checked)
95 void ToolManagerWidget::uninitializeClickedSlot(
bool checked)
100 void ToolManagerWidget::startTrackingClickedSlot(
bool checked)
105 void ToolManagerWidget::stopTrackingClickedSlot(
bool checked)
110 void ToolManagerWidget::updateButtonStatusSlot()
118 mStartTrackingButton->setEnabled(mTrackingService->getState() <
Tool::tsTRACKING);
119 mStopTrackingButton->setEnabled(mTrackingService->getState() >=
Tool::tsTRACKING);
boost::shared_ptr< class TrackingService > TrackingServicePtr
Namespace for all CustusX production code.