Commit 76329856 authored by Dirk Wilden's avatar Dirk Wilden

updated pickingInterface

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@3906 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 7aa6793d
......@@ -58,7 +58,7 @@ class PickingInterface {
*
* @param _mode Identifier of Picking mode or "Separator" to add a Separator
*/
virtual void addPickMode( const std::string /*_mode*/ ) {};
virtual void addPickMode( const std::string /*_mode*/) {};
/** \brief Add a new picking mode to the examiner which will be invisible
*
......@@ -70,23 +70,25 @@ class PickingInterface {
*/
virtual void addHiddenPickMode( const std::string /*_mode*/ ) {};
/** \brief Add a new picking mode to the examiner and has its own cursor
/** \brief Set the cursor of the given PickMode
*
* @param _mode Identifier of Picking mode or "Separator" to add a Separator
* Set the cursor that should be used inside the pickMode
*
* @param _mode Identifier of Picking mode
* @param _cursor the new cursor
*/
virtual void addPickMode( const std::string /*_mode*/ , QCursor /*_cursor*/ ) {};
/** \brief Add a new picking mode to the examiner which will be invisible but has its own cursor
virtual void setPickModeCursor( const std::string /*_mode*/ , QCursor /*_cursor*/ ) {};
/** \brief Set mouse tracking for the given PickMode
*
* The added PickMode will not appear in the context menus Picking menu.
* You have to provide a button or menuentry yourself if you want to switch to
* the picking mode provided here.
* Enable mouseTracking for the given PickMode. When MouseTracking is enabled
* you receive mouseMove events also when no button is pressed (via MouseInterface)
*
* @param _mode Identifier of Picking mode or "Separator" to add a Separator
* @param _mode Identifier of Picking mode
* @param _mouseTracking new state of mouseTracking
*/
virtual void addHiddenPickMode( const std::string /*_mode*/ , QCursor /*_cursor*/ ) {};
virtual void setPickModeMouseTracking( const std::string /*_mode*/ , bool /*_mouseTracking*/ ) {};
/** \brief The pickingMode has changed
*
* This slot is called if the user changes the current picking mode
......@@ -101,6 +103,6 @@ class PickingInterface {
};
Q_DECLARE_INTERFACE(PickingInterface,"OpenFlipper.PickingInterface/1.0")
Q_DECLARE_INTERFACE(PickingInterface,"OpenFlipper.PickingInterface/1.1")
#endif // PICKINGINTERFACE_HH
......@@ -482,9 +482,9 @@ Core::~Core()
void
Core::slotMouseEventIdentify( QMouseEvent* _event )
{
// Dont do anything as a context Menu will popup on right button click
if ( _event->button() == Qt::RightButton )
return;
// // Dont do anything as a context Menu will popup on right button click
// if ( _event->button() == Qt::RightButton )
// return;
emit PluginMouseEventIdentify( _event );
}
......@@ -495,9 +495,9 @@ Core::slotMouseEventIdentify( QMouseEvent* _event )
void
Core::slotMouseEvent( QMouseEvent* _event )
{
// Dont do anything as a context Menu will popup on right button click
if ( _event->button() == Qt::RightButton )
return;
// // Dont do anything as a context Menu will popup on right button click
// if ( _event->button() == Qt::RightButton )
// return;
emit PluginMouseEvent(_event );
}
......@@ -526,24 +526,6 @@ Core::slotAddHiddenPickMode( const std::string _mode ) {
coreWidget_->examiner_widget_->addPickMode(_mode,false,1000,false);
}
//-----------------------------------------------------------------------------
void
Core::slotAddPickMode( const std::string _mode , QCursor _cursor) {
if ( OpenFlipper::Options::gui() )
coreWidget_->examiner_widget_->addPickMode(_mode,false,1000,true,_cursor);
}
//-----------------------------------------------------------------------------
void
Core::slotAddHiddenPickMode( const std::string _mode , QCursor _cursor) {
if ( OpenFlipper::Options::gui() )
coreWidget_->examiner_widget_->addPickMode(_mode,false,1000,false, _cursor);
}
//-----------------------------------------------------------------------------
/** Update the view in the examiner widget
......
......@@ -211,12 +211,6 @@ signals:
/// Add a new and invisible picking mode to the examiner_widget_
void slotAddHiddenPickMode( const std::string _mode );
/// Add a new and visible picking mode to the examiner_widget_ with its own cursor
void slotAddPickMode( const std::string _mode , QCursor _cursor);
/// Add a new and invisible picking mode to the examiner_widget_ with its own cursor
void slotAddHiddenPickMode( const std::string _mode , QCursor _cursor);
/// Called by a plugin if it creates a texture
void slotAddTexture( QString _textureName , QString _filename , uint _dimension );
......
......@@ -692,13 +692,13 @@ void Core::loadPlugin(QString filename, bool silent){
if ( checkSignal(plugin,"addHiddenPickMode(const std::string)") )
connect(plugin,SIGNAL(addHiddenPickMode( const std::string )),
this,SLOT(slotAddHiddenPickMode( const std::string )),Qt::DirectConnection);
if ( checkSignal(plugin,"addPickMode(const std::string,QCursor)") )
connect(plugin,SIGNAL(addPickMode( const std::string ,QCursor)),
this,SLOT(slotAddPickMode( const std::string ,QCursor)),Qt::DirectConnection);
if ( checkSignal(plugin,"setPickModeCursor(const std::string,QCursor)") )
connect(plugin,SIGNAL(setPickModeCursor( const std::string ,QCursor)),
coreWidget_->examiner_widget_,SLOT(setPickModeCursor( const std::string ,QCursor)),Qt::DirectConnection);
if ( checkSignal(plugin,"addHiddenPickMode(const std::string,QCursor)") )
connect(plugin,SIGNAL(addHiddenPickMode( const std::string ,QCursor)),
this,SLOT(slotAddHiddenPickMode( const std::string ,QCursor)),Qt::DirectConnection);
if ( checkSignal(plugin,"setPickModeMouseTracking(const std::string,bool)") )
connect(plugin,SIGNAL(setPickModeMouseTracking( const std::string ,bool)),
coreWidget_->examiner_widget_,SLOT(setPickModeMouseTracking( const std::string ,bool)),Qt::DirectConnection);
}
//Check if the plugin supports INI-Interface
......
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