Commit fe5457bb authored by Mike Kremer's avatar Mike Kremer

Hide wheels as default setting. Added menubar entry "Show / hide wheels" to...

Hide wheels as default setting. Added menubar entry "Show / hide wheels" to show or hide wheels in examiner windows (all at once).

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@6055 383ad7c9-94d9-4d36-a494-682f7c89f535
parent c770c7b6
......@@ -582,6 +582,9 @@ public:
/// Create a snapshot of the last active examiner
void slotSnapshot();
/// Show / hide wheels
void slotSwitchWheels(bool _state);
/// Set the snapShot name for all examiners
void slotSnapshotName();
......
......@@ -346,10 +346,17 @@ void CoreWidget::setupMenuBar()
connect( perspectiveProjectionAction_,SIGNAL( triggered() ), this, SLOT( slotGlobalPerspectiveProjection() ) );
viewMenu_->addAction( perspectiveProjectionAction_);
viewMenu_->addSeparator();
QAction* wheelSwitchAction = new QAction( "Show / hide wheels", viewMenu_ );
wheelSwitchAction->setCheckable( true );
wheelSwitchAction->setStatusTip("Show / hide navigation wheels in viewer widget.");
wheelSwitchAction->setWhatsThis( "Show / hide navigation wheels in viewer widget.<br><br>"
" These wheels appear in the corners of the viewports. "
" Use wheels to rotate scene.");
connect( wheelSwitchAction,SIGNAL( toggled(bool) ), this, SLOT( slotSwitchWheels(bool) ) );
viewMenu_->addAction( wheelSwitchAction);
QAction* coordSys = viewMenu_->addAction("Coordinate Systems");
coordSys->setCheckable(true);
coordSys->setChecked(true);
......
......@@ -104,6 +104,17 @@ void CoreWidget::slotContextHomeView() {
examiner_widgets_[PluginFunctions::activeExaminer()]->home();
}
/// Show / hide wheels in examiner windows
void CoreWidget::slotSwitchWheels(bool _state) {
std::vector< glViewer* >::iterator it
= examiner_widgets_.begin();
for(; it != examiner_widgets_.end(); it++) {
_state ? (*it)->slotShowWheels() : (*it)->slotHideWheels();
}
}
/// Set the viewer to home position
void CoreWidget::slotGlobalHomeView() {
......
......@@ -1128,6 +1128,8 @@ glViewer::createWidgets(QStatusBar* _sb)
wheelX_->setToolTip("Rotate around <b>x-axis</b>.");
wheelX_->setWhatsThis( "Rotate around <b>x-axis</b>.");
// Hide wheels per default
slotHideWheels();
QGraphicsWidget *wheelX = glScene_->addWidget (wheelX_);
QGraphicsWidget *wheelY = glScene_->addWidget (wheelY_);
......@@ -1395,7 +1397,7 @@ void glViewer::mouseReleaseEvent(QGraphicsSceneMouseEvent* _e)
QMouseEvent me(QEvent::MouseButtonRelease ,p, _e->screenPos(), _e->button(),
_e->buttons(), _e->modifiers());
_e->accept();
// if (_event->button() == Qt::RightButton )
// hidePopupMenus();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment