Commit b076e6c4 authored by Jan Möbius's avatar Jan Möbius
Browse files

Some slot Updates for context menu in multiview mode

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@4289 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 4fec5550
...@@ -203,47 +203,86 @@ void CoreWidget::updatePopupMenu(const QPoint& _point, unsigned int _examinerId) ...@@ -203,47 +203,86 @@ void CoreWidget::updatePopupMenu(const QPoint& _point, unsigned int _examinerId)
// Add a functions menu // Add a functions menu
QAction* action; QAction* action;
QMenu* functionMenu = new QMenu("&Functions",contextMenu_); QMenu* functionMenu = new QMenu("&Functions",contextMenu_);
//====================================================================================================
action = functionMenu->addAction("Set Background Color"); action = functionMenu->addAction("Set Background Color");
action->setToolTip("Set the background color for the viewer"); action->setToolTip("Set the background color for the viewer");
connect(action, SIGNAL(triggered()), this, SLOT(changeBackgroundColor()) ); connect(action, SIGNAL(triggered()), this, SLOT(changeBackgroundColor()) );
//====================================================================================================
functionMenu->addSeparator(); functionMenu->addSeparator();
//====================================================================================================
action = functionMenu->addAction("Snapshot"); action = functionMenu->addAction("Snapshot");
action->setToolTip("Make a snapshot"); action->setToolTip("Make a snapshot");
connect(action, SIGNAL(triggered()), examiner_widget_, SLOT(actionSnapshot()) ); connect(action, SIGNAL(triggered()), examiner_widget_, SLOT(actionSnapshot()) );
//====================================================================================================
action = functionMenu->addAction("Set Snapshot Name"); action = functionMenu->addAction("Set Snapshot Name");
action->setToolTip("Set a name for snapshots"); action->setToolTip("Set a name for snapshots");
connect(action, SIGNAL(triggered()), examiner_widget_, SLOT(actionSnapshotName()) ); connect(action, SIGNAL(triggered()), examiner_widget_, SLOT(actionSnapshotName()) );
//====================================================================================================
functionMenu->addSeparator(); functionMenu->addSeparator();
//====================================================================================================
action = functionMenu->addAction("Copy View"); action = functionMenu->addAction("Copy View");
action->setToolTip("Copy current view to clipboard"); action->setToolTip("Copy current view to clipboard");
connect(action, SIGNAL(triggered()), examiner_widget_, SLOT(actionCopyView()) ); connect(action, SIGNAL(triggered()), examiner_widget_, SLOT(actionCopyView()) );
//====================================================================================================
action = functionMenu->addAction("Paste View"); action = functionMenu->addAction("Paste View");
action->setToolTip("Paste current view from clipboard"); action->setToolTip("Paste current view from clipboard");
connect(action, SIGNAL(triggered()), examiner_widget_, SLOT(actionPasteView()) ); connect(action, SIGNAL(triggered()), examiner_widget_, SLOT(actionPasteView()) );
//====================================================================================================
functionMenu->addSeparator(); functionMenu->addSeparator();
//====================================================================================================
action = functionMenu->addAction("Synchronization"); action = functionMenu->addAction("Synchronization");
action->setToolTip("Synchronize two different viewers"); action->setToolTip("Synchronize two different viewers");
action->setCheckable( true ); action->setCheckable( true );
action->setChecked( OpenFlipper::Options::synchronization() ); action->setChecked( OpenFlipper::Options::synchronization() );
connect(action, SIGNAL(triggered(bool)), examiner_widget_, SLOT(actionSynchronize(bool)) ); connect(action, SIGNAL(triggered(bool)), examiner_widget_, SLOT(actionSynchronize(bool)) );
connect(action, SIGNAL(triggered(bool)), this, SLOT(updateGlobalOptions(bool)) ); connect(action, SIGNAL(triggered(bool)), this, SLOT(updateGlobalOptions(bool)) );
//====================================================================================================
action = functionMenu->addAction("Animation"); action = functionMenu->addAction("Animation");
action->setToolTip("Animate rotation of objects"); action->setToolTip("Animate rotation of objects");
action->setCheckable( true ); action->setCheckable( true );
action->setChecked( OpenFlipper::Options::animation() ); action->setChecked( OpenFlipper::Options::animation() );
connect(action, SIGNAL(triggered(bool)), examiner_widget_, SLOT(actionAnimation(bool)) ); for ( uint i = 0 ; i < OpenFlipper::Options::examinerWidgets() ; ++i )
connect(action, SIGNAL(triggered(bool)), examiner_widgets_[i], SLOT(actionAnimation(bool)) );
connect(action, SIGNAL(triggered(bool)), this, SLOT(updateGlobalOptions(bool)) ); connect(action, SIGNAL(triggered(bool)), this, SLOT(updateGlobalOptions(bool)) );
//====================================================================================================
action = functionMenu->addAction("Backface Culling"); action = functionMenu->addAction("Backface Culling");
action->setToolTip("Enable backface culling"); action->setToolTip("Enable backface culling");
action->setCheckable( true ); action->setCheckable( true );
action->setChecked( OpenFlipper::Options::backfaceCulling() ); action->setChecked( OpenFlipper::Options::backfaceCulling() );
connect(action, SIGNAL(triggered(bool)), examiner_widget_, SLOT(actionBackfaceCulling(bool)) ); for ( uint i = 0 ; i < OpenFlipper::Options::examinerWidgets() ; ++i )
connect(action, SIGNAL(triggered(bool)), examiner_widgets_[i], SLOT(actionBackfaceCulling(bool)) );
connect(action, SIGNAL(triggered(bool)), this, SLOT(updateGlobalOptions(bool)) ); connect(action, SIGNAL(triggered(bool)), this, SLOT(updateGlobalOptions(bool)) );
//====================================================================================================
action = functionMenu->addAction("Two-sided Lighting"); action = functionMenu->addAction("Two-sided Lighting");
action->setToolTip("Enable two-sided lighting"); action->setToolTip("Enable two-sided lighting");
action->setCheckable( true ); action->setCheckable( true );
action->setChecked( OpenFlipper::Options::twoSidedLighting() ); action->setChecked( OpenFlipper::Options::twoSidedLighting() );
connect(action, SIGNAL(triggered(bool)), examiner_widget_, SLOT(actionTwoSidedLighting(bool)) ); for ( uint i = 0 ; i < OpenFlipper::Options::examinerWidgets() ; ++i )
connect(action, SIGNAL(triggered(bool)), examiner_widgets_[i], SLOT(actionTwoSidedLighting(bool)) );
connect(action, SIGNAL(triggered(bool)), this, SLOT(updateGlobalOptions(bool)) ); connect(action, SIGNAL(triggered(bool)), this, SLOT(updateGlobalOptions(bool)) );
functionMenu->setTearOffEnabled(true); functionMenu->setTearOffEnabled(true);
......
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