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

Removed old synch slots,

Removed actionModeChange from glViewer and moved it to properties

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@4518 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 89d2c3ae
...@@ -237,8 +237,8 @@ CoreWidget( QVector<ViewMode*>& _viewModes, ...@@ -237,8 +237,8 @@ CoreWidget( QVector<ViewMode*>& _viewModes,
"<li><b>Zoom</b> using <b>left+middle</b> mouse buttons.</li></ul>" ); "<li><b>Zoom</b> using <b>left+middle</b> mouse buttons.</li></ul>" );
for ( unsigned int i = 0 ; i < OpenFlipper::Options::examinerWidgets() ; ++i ) { for ( unsigned int i = 0 ; i < OpenFlipper::Options::examinerWidgets() ; ++i ) {
connect( moveButton_,SIGNAL( clicked() ), &PluginFunctions::viewerProperties(i), SLOT( setExamineMode() ) ); connect( moveButton_,SIGNAL( clicked() ), &PluginFunctions::viewerProperties(i), SLOT( setExamineMode() ) );
connect( examiner_widgets_[i] , SIGNAL( signalActionModeChanged( Viewer::ActionMode ) ), connect( &PluginFunctions::viewerProperties(i) , SIGNAL( signalActionModeChanged( Viewer::ActionMode ) ),
this , SLOT( slotActionModeChanged(Viewer::ActionMode) ) ); this , SLOT( slotActionModeChanged(Viewer::ActionMode) ) );
} }
viewerToolbar_->addWidget( moveButton_ )->setText("Move"); viewerToolbar_->addWidget( moveButton_ )->setText("Move");
......
...@@ -313,9 +313,6 @@ void glViewer::toggleProjectionMode() ...@@ -313,9 +313,6 @@ void glViewer::toggleProjectionMode()
else else
projectionMode(ORTHOGRAPHIC_PROJECTION); projectionMode(ORTHOGRAPHIC_PROJECTION);
// sync
emit(signalSetView(glstate_->modelview(), glstate_->inverse_modelview()));
updateGL(); updateGL();
} }
...@@ -441,9 +438,6 @@ void glViewer::updateActionMode(Viewer::ActionMode _am) ...@@ -441,9 +438,6 @@ void glViewer::updateActionMode(Viewer::ActionMode _am)
} }
} }
emit(signalActionModeChanged( _am ));
//emit pickmodeChanged with either the name of the current pickmode or an empty string //emit pickmodeChanged with either the name of the current pickmode or an empty string
if( properties_.pickingMode() ) if( properties_.pickingMode() )
emit(signalPickModeChanged(pick_mode_name_)); emit(signalPickModeChanged(pick_mode_name_));
...@@ -706,8 +700,6 @@ void glViewer::home() ...@@ -706,8 +700,6 @@ void glViewer::home()
updateProjectionMatrix(); updateProjectionMatrix();
updateGL(); updateGL();
// sync
emit(signalSetView(glstate_->modelview(), glstate_->inverse_modelview()));
} }
...@@ -728,8 +720,6 @@ void glViewer::viewAll() ...@@ -728,8 +720,6 @@ void glViewer::viewAll()
updateProjectionMatrix(); updateProjectionMatrix();
updateGL(); updateGL();
// sync
emit(signalSetView(glstate_->modelview(), glstate_->inverse_modelview()));
} }
...@@ -770,8 +760,7 @@ void glViewer::flyTo(const QPoint& _pos, bool _move_back) ...@@ -770,8 +760,7 @@ void glViewer::flyTo(const QPoint& _pos, bool _move_back)
updateGL(); updateGL();
} }
// sync with external viewer
emit(signalSetView(glstate_->modelview(), glstate_->inverse_modelview()));
} }
} }
...@@ -915,10 +904,6 @@ void glViewer::initializeGL() ...@@ -915,10 +904,6 @@ void glViewer::initializeGL()
glPixelStorei(GL_PACK_ALIGNMENT, 1); glPixelStorei(GL_PACK_ALIGNMENT, 1);
// emit initialization signal
emit(signalInitializeGL());
// unlock update (we started locked) // unlock update (we started locked)
properties_.unLockUpdate(); properties_.unLockUpdate();
} }
...@@ -1007,9 +992,6 @@ void glViewer::paintGL() ...@@ -1007,9 +992,6 @@ void glViewer::paintGL()
glPixelStorei(GL_PACK_SKIP_PIXELS, 0); glPixelStorei(GL_PACK_SKIP_PIXELS, 0);
glPixelStorei(GL_PACK_ALIGNMENT, 1); glPixelStorei(GL_PACK_ALIGNMENT, 1);
// emit initialization signal
emit(signalInitializeGL());
// unlock update (we started locked) // unlock update (we started locked)
properties_.unLockUpdate(); properties_.unLockUpdate();
...@@ -1500,8 +1482,6 @@ void glViewer::slotWheelX(double _dAngle) ...@@ -1500,8 +1482,6 @@ void glViewer::slotWheelX(double _dAngle)
rotate(ACG::Vec3d(1,0,0),ACG::QtWidgets::QtWheel::deg(ACG::QtWidgets::QtWheel::clip(_dAngle))); rotate(ACG::Vec3d(1,0,0),ACG::QtWidgets::QtWheel::deg(ACG::QtWidgets::QtWheel::clip(_dAngle)));
updateGL(); updateGL();
// sync
emit(signalSetView(glstate_->modelview(), glstate_->inverse_modelview()));
} }
void glViewer::slotWheelY(double _dAngle) void glViewer::slotWheelY(double _dAngle)
...@@ -1509,8 +1489,6 @@ void glViewer::slotWheelY(double _dAngle) ...@@ -1509,8 +1489,6 @@ void glViewer::slotWheelY(double _dAngle)
rotate(ACG::Vec3d(0,1,0),ACG::QtWidgets::QtWheel::deg(ACG::QtWidgets::QtWheel::clip(_dAngle))); rotate(ACG::Vec3d(0,1,0),ACG::QtWidgets::QtWheel::deg(ACG::QtWidgets::QtWheel::clip(_dAngle)));
updateGL(); updateGL();
// sync
emit(signalSetView(glstate_->modelview(), glstate_->inverse_modelview()));
} }
void glViewer::slotWheelZ(double _dist) void glViewer::slotWheelZ(double _dist)
...@@ -1519,8 +1497,6 @@ void glViewer::slotWheelZ(double _dist) ...@@ -1519,8 +1497,6 @@ void glViewer::slotWheelZ(double _dist)
translate(ACG::Vec3d(0,0,dz)); translate(ACG::Vec3d(0,0,dz));
updateGL(); updateGL();
// sync
emit(signalSetView(glstate_->modelview(), glstate_->inverse_modelview()));
} }
...@@ -1931,8 +1907,6 @@ glViewer::viewMouseEvent(QMouseEvent* _event) ...@@ -1931,8 +1907,6 @@ glViewer::viewMouseEvent(QMouseEvent* _event)
} }
// sync views
emit(signalSetView(glstate_->modelview(), glstate_->inverse_modelview()));
} }
...@@ -2057,8 +2031,6 @@ void glViewer::viewWheelEvent( QWheelEvent* _event) ...@@ -2057,8 +2031,6 @@ void glViewer::viewWheelEvent( QWheelEvent* _event)
} }
// sync views
emit(signalSetView(glstate_->modelview(), glstate_->inverse_modelview()));
} }
......
...@@ -389,9 +389,6 @@ public slots: ...@@ -389,9 +389,6 @@ public slots:
//-------------------------------------------------------------- public signals //-------------------------------------------------------------- public signals
signals: signals:
/// emitted when OpenGL stuff can be initialized
void signalInitializeGL();
/** A signal for giving mouse events to the application. /** A signal for giving mouse events to the application.
This is done if the Pick-Button (top-most button of the toolbar) This is done if the Pick-Button (top-most button of the toolbar)
is activated. Connect to this signal to implement application is activated. Connect to this signal to implement application
...@@ -415,16 +412,10 @@ signals: ...@@ -415,16 +412,10 @@ signals:
*/ */
void signalMouseEventIdentify( QMouseEvent* ); void signalMouseEventIdentify( QMouseEvent* );
/// set view, used for synchronizing (cf. slotSetView())
void signalSetView( const ACG::GLMatrixd& _modelview,
const ACG::GLMatrixd& _inverse_modelview );
/// scene graph has changed /// scene graph has changed
void signalSceneGraphChanged(ACG::SceneGraph::BaseNode* _root); void signalSceneGraphChanged(ACG::SceneGraph::BaseNode* _root);
/// scene graph has changed /// scene graph has changed
void signalNodeChanged(ACG::SceneGraph::BaseNode* _node); void signalNodeChanged(ACG::SceneGraph::BaseNode* _node);
/// action mode was changed
void signalActionModeChanged( Viewer::ActionMode _m);
signals: signals:
......
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