34 #include <QHBoxLayout> 35 #include <QVBoxLayout> 39 #include <QGridLayout> 42 #include <QPushButton> 62 mVerticalLayout(new QVBoxLayout(this)),
63 mControlsEnabled(false),
64 mStorage(new
PatientStorage(services->session(),
"VirtualBronchoscopy"))
66 this->setObjectName(
"virtual_bronchoscopy_widget");
67 this->setWindowTitle(
"Virtual Bronchoscopy");
70 this->setFocusPolicy(Qt::StrongFocus);
74 mStorage->storeVariable(
"routeToTarget",
79 QVBoxLayout *inputVbox =
new QVBoxLayout;
81 QGroupBox *inputBox =
new QGroupBox(tr(
"Input"));
82 inputBox->setLayout(inputVbox);
86 QHBoxLayout *playbackHBox =
new QHBoxLayout;
87 QGroupBox *playbackBox =
new QGroupBox(tr(
"Playback"));
89 QLabel *labelStart =
new QLabel(tr(
"Start "));
90 QLabel *labelTarget =
new QLabel(tr(
" Target"));
91 playbackHBox->addWidget(labelStart);
93 playbackHBox->addWidget(labelTarget);
94 playbackBox->setLayout(playbackHBox);
100 QGroupBox *endoscopeBox =
new QGroupBox(tr(
"Bronchoscope"));
101 QGridLayout *endoscopeControlLayout =
new QGridLayout;
102 QLabel *labelRot =
new QLabel(tr(
"Rotate (360 deg)"));
103 QLabel *labelView =
new QLabel(tr(
"Left/right (+/- 60 deg)"));
113 endoscopeControlLayout->addWidget(labelRot,0,0,Qt::AlignHCenter);
114 endoscopeControlLayout->addWidget(labelView,0,2,Qt::AlignHCenter);
115 endoscopeControlLayout->addWidget(
mRotateDial,1,0);
116 endoscopeControlLayout->addWidget(
mViewDial,1,2);
118 endoscopeBox->setLayout(endoscopeControlLayout);
129 this, &VBWidget::inputChangedSlot, Qt::UniqueConnection);
164 void VBWidget::inputChangedSlot()
172 if (event->key()==Qt::Key_Up ||
event->key()==Qt::Key_8)
181 if (event->key()==Qt::Key_Down ||
event->key()==Qt::Key_2)
190 if (event->key()==Qt::Key_Right ||
event->key()==Qt::Key_6)
199 if (event->key()==Qt::Key_Left ||
event->key()==Qt::Key_4)
208 if (event->key()==Qt::Key_PageUp ||
event->key()==Qt::Key_9)
217 if (event->key()==Qt::Key_PageDown ||
event->key()==Qt::Key_3)
226 if (event->key()==Qt::Key_5)
229 this->resetEndoscopeSlot();
235 QWidget::keyPressEvent(event);
238 void VBWidget::resetEndoscopeSlot()
247 "<h3>Virtual Bronchoscopy.</h3>" 248 "<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.