13 #include <QHBoxLayout> 14 #include <QVBoxLayout> 18 #include <QGridLayout> 21 #include <QPushButton> 41 mVerticalLayout(new QVBoxLayout(this)),
42 mControlsEnabled(false),
43 mStorage(new
PatientStorage(services->session(),
"VirtualBronchoscopy"))
45 this->setObjectName(
"virtual_bronchoscopy_widget");
46 this->setWindowTitle(
"Virtual Bronchoscopy");
49 this->setFocusPolicy(Qt::StrongFocus);
53 mStorage->storeVariable(
"routeToTarget",
58 QVBoxLayout *inputVbox =
new QVBoxLayout;
60 QGroupBox *inputBox =
new QGroupBox(tr(
"Input"));
61 inputBox->setLayout(inputVbox);
65 QHBoxLayout *playbackHBox =
new QHBoxLayout;
66 QGroupBox *playbackBox =
new QGroupBox(tr(
"Playback"));
68 QLabel *labelStart =
new QLabel(tr(
"Start "));
69 QLabel *labelTarget =
new QLabel(tr(
" Target"));
70 playbackHBox->addWidget(labelStart);
72 playbackHBox->addWidget(labelTarget);
73 playbackBox->setLayout(playbackHBox);
79 QGroupBox *endoscopeBox =
new QGroupBox(tr(
"Bronchoscope"));
80 QGridLayout *endoscopeControlLayout =
new QGridLayout;
81 QLabel *labelRot =
new QLabel(tr(
"Rotate (360 deg)"));
82 QLabel *labelView =
new QLabel(tr(
"Left/right (+/- 60 deg)"));
92 endoscopeControlLayout->addWidget(labelRot,0,0,Qt::AlignHCenter);
93 endoscopeControlLayout->addWidget(labelView,0,2,Qt::AlignHCenter);
95 endoscopeControlLayout->addWidget(
mViewDial,1,2);
97 endoscopeBox->setLayout(endoscopeControlLayout);
108 this, &VBWidget::inputChangedSlot, Qt::UniqueConnection);
143 void VBWidget::inputChangedSlot()
151 if (event->key()==Qt::Key_Up ||
event->key()==Qt::Key_8)
160 if (event->key()==Qt::Key_Down ||
event->key()==Qt::Key_2)
169 if (event->key()==Qt::Key_Right ||
event->key()==Qt::Key_6)
178 if (event->key()==Qt::Key_Left ||
event->key()==Qt::Key_4)
187 if (event->key()==Qt::Key_PageUp ||
event->key()==Qt::Key_9)
196 if (event->key()==Qt::Key_PageDown ||
event->key()==Qt::Key_3)
205 if (event->key()==Qt::Key_5)
208 this->resetEndoscopeSlot();
214 QWidget::keyPressEvent(event);
217 void VBWidget::resetEndoscopeSlot()
226 "<h3>Virtual Bronchoscopy.</h3>" 227 "<p>GUI for visualizing a route-to-target path</p>"
void cameraRawPointsSlot(MeshPtr mesh)
boost::shared_ptr< class VisServices > VisServicesPtr
Helper class for storing variables in the patient file.
void dataChanged(QString)
void cameraRotateAngleSlot(int angle)
virtual QString getValue() const
get the data value.
void cameraViewAngleSlot(int angle)
void cameraPathPositionSlot(int pos)
static StringPropertySelectMeshPtr New(PatientModelServicePtr patientModelService)
virtual bool setValue(const QString &value)
set the data value.
Namespace for all CustusX production code.