28 ARMARX_INFO <<
"RobotTrajectoryDesigner: ViewController on disconnect";
31 this->initPerspectivesCombobox();
33 enableAddRemoveViewButton();
38 ARMARX_INFO <<
"RobotTrajectoryDesigner: ViewController on connect";
41 QObject::connect(guiPerspectives->getPerspectives()->perspectiveComboBox,
42 SIGNAL(activated(
int)),
45 QObject::connect(guiPerspectives->getPerspectives()->addViewButton,
46 SIGNAL(clicked()),
this, SLOT(addViewSlot()));
47 QObject::connect(guiPerspectives->getPerspectives()->deleteViewButton,
48 SIGNAL(clicked()),
this, SLOT(removeViewSlot()));
53 ARMARX_INFO <<
"RobotTrajectoryDesigner: ViewController on disconnect";
58 ARMARX_INFO <<
"RobotTrajectoryDesigner: ViewController on exit";
62 guiPerspectives(guiPerspectives)
70 return this->guiPerspectives;
75 this->guiPerspectives = guiPerspectives;
85 throw (
"not yet implemented");
88 void ViewController::addViewSlot()
92 enableAddRemoveViewButton();
95 void ViewController::removeViewSlot()
99 enableAddRemoveViewButton();
102 void ViewController::initPerspectivesCombobox()
104 QComboBox* perspectives = guiPerspectives->getPerspectives()->perspectiveComboBox;
107 perspectives->setFocusPolicy(Qt::StrongFocus);
108 perspectives->installEventFilter(
new WheelEventFilter(
this));
111 perspectives->clear();
112 perspectives->addItem(QString::fromStdString(
"High Angle"));
113 perspectives->addItem(QString::fromStdString(
"Top"));
114 perspectives->addItem(QString::fromStdString(
"Front"));
115 perspectives->addItem(QString::fromStdString(
"Back"));
116 perspectives->addItem(QString::fromStdString(
"Left"));
117 perspectives->addItem(QString::fromStdString(
"Right"));
118 perspectives->setEnabled(
true);
119 perspectives->setCurrentIndex(0);
122 void ViewController::enableAddRemoveViewButton()
124 if (numberViews == 1)
126 guiPerspectives->getPerspectives()->addViewButton->setEnabled(
true);
127 guiPerspectives->getPerspectives()->deleteViewButton->setEnabled(
false);
129 else if (numberViews == 4)
131 guiPerspectives->getPerspectives()->addViewButton->setEnabled(
false);
132 guiPerspectives->getPerspectives()->deleteViewButton->setEnabled(
true);
136 guiPerspectives->getPerspectives()->addViewButton->setEnabled(
true);
137 guiPerspectives->getPerspectives()->deleteViewButton->setEnabled(
true);