35 #ifndef ANATOMIST_CONTROLER_CONTROLSWITCH_H    36 #define ANATOMIST_CONTROLER_CONTROLSWITCH_H    46 #include <qpushbutton.h>    49 #if QT_VERSION >= 0x040600    50 #include <QGestureEvent>    86   ToolBox( 
const std::string& activeControlDescription = 
"" );
    92   void addTab( QWidget * child, 
const QString & label,
    93                const std::string & actionid = 
"" );
    94   void showPage ( QWidget * w );
    95   void showPage( 
const std::string & label );
    96   const std::set<std::string> & actions() 
const;
    99   void switchControlDescriptionActivation();
   104   QTabWidget * myActionTab;
   105   QPushButton * myControlDescriptionActivation;
   106   std::string myControlDescription;
   107   QTextBrowser * myControlDescriptionWidget;
   108   QLabel *l1, *l2, *l3, *l4;
   110   bool myDescriptionActivated;
   128   void notifyActivableControlChange();
   129   void notifyAvailableControlChange();
   130   void notifyActiveControlChange();
   131   void notifyActionChange();
   133   const std::map<int, std::string>& activableControls( ) 
const;
   134   const std::map<int, std::string>& availableControls( ) 
const;
   135   const std::set<std::string>& activableControlGroups( ) 
const;
   136   const std::set<std::string>& availableControlGroups( ) 
const;  
   137   const std::set<std::string>& actions() 
const;
   138   std::string controlDescription( 
const std::string & ctrlname ) 
const;
   141   typedef std::map<std::string, anatomist::ControlPtr>::const_iterator 
   143   typedef std::map<std::string, anatomist::ControlPtr>::iterator 
   150   void setActiveControl( 
const std::string& );
   151   const std::string& activeControl() 
const;
   154   void keyPressEvent( QKeyEvent *);
   155   void keyReleaseEvent( QKeyEvent *);
   156   void mousePressEvent ( QMouseEvent * );
   157   void mouseReleaseEvent ( QMouseEvent * );
   158   void mouseDoubleClickEvent ( QMouseEvent * );
   159   void mouseMoveEvent ( QMouseEvent * );
   160   void wheelEvent ( QWheelEvent * );
   161   void focusInEvent ( QFocusEvent * );
   162   void focusOutEvent ( QFocusEvent * );
   163   void enterEvent ( QEvent * );
   164   void leaveEvent ( QEvent * );
   165   void paintEvent ( QPaintEvent * );
   166   void moveEvent ( QMoveEvent * );
   167   void resizeEvent ( QResizeEvent * );
   168   void dragEnterEvent ( QDragEnterEvent * );
   169   void dragMoveEvent ( QDragMoveEvent * );
   170   void dragLeaveEvent ( QDragLeaveEvent * );
   171   void dropEvent ( QDropEvent * );
   172   void showEvent ( QShowEvent * );
   173   void hideEvent ( QHideEvent * );
   174   void selectionChangedEvent();
   176 #if QT_VERSION >= 0x040600   177   void gestureEvent( QGestureEvent * );
   180   void setAvailableControls( 
const std::list<std::string>& objects );
   181   void setActivableControls( 
bool init = 
false);
   185   void printControls();
   189   void updateToolBox();
   190   void updateControlDescription();
   192   bool isToolBoxVisible() 
const;
   193   void switchToolBoxVisible();
   198   void activateKeyPressAction( 
const std::string & methodname ) 
const;
   199   void activateKeyReleaseAction( 
const std::string & methodname ) 
const;
   200   void activateMousePressAction(
   201     const std::string & methodname,
   202     int x, 
int y ) 
const;
   203   void activateMouseReleaseAction(
   204     const std::string & methodname,
   205     int x, 
int y ) 
const;
   206   void activateMouseDoubleClickAction(
   207     const std::string & methodname,
   208     int x, 
int y ) 
const;
   209   void activateMouseMoveAction(
   210     const std::string & methodname,
   211     int x, 
int y ) 
const;
   218   void getSelectedObjectNames();
   222   std::string myViewType;
   223   std::map<std::string, anatomist::ControlPtr> myControls;
   225   std::map<int, std::string> myAvailableControls;
   226   std::map<int, std::string> myActivableControls;
   228   std::set<std::string> myAvailableControlGroups;
   229   std::set<std::string> myActivableControlGroups;
   230   std::list<std::string> mySelectedObjects;
   232   std::list<anatomist::ControlSwitchObserver *> myObservers;
   234   bool myControlEnabled;
   235   std::string myActiveControl;
   240   void toolBoxDestroyed();
 std::map< std::string, anatomist::ControlPtr >::const_iterator const_iterator
 
virtual ~ControlSwitchObserver()
 
virtual void updateAvailableControls()
 
virtual void updateActivableControls()
 
virtual void updateActions()
 
std::map< std::string, anatomist::ControlPtr >::iterator iterator
 
virtual void updateActiveControl()