35#ifndef ANATOMIST_CONTROLER_CONTROLSWITCH_H
36#define ANATOMIST_CONTROLER_CONTROLSWITCH_H
46#include <qpushbutton.h>
49#include <QGestureEvent>
84 ToolBox(
const std::string& activeControlDescription =
"" );
90 void addTab( QWidget * child,
const QString & label,
91 const std::string & actionid =
"" );
94 const std::set<std::string> &
actions()
const;
97 void switchControlDescriptionActivation();
102 QTabWidget * myActionTab;
103 QPushButton * myControlDescriptionActivation;
104 std::string myControlDescription;
105 QTextBrowser * myControlDescriptionWidget;
106 QLabel *l1, *l2, *l3, *l4;
108 bool myDescriptionActivated;
139 typedef std::map<std::string, anatomist::ControlPtr>::const_iterator
141 typedef std::map<std::string, anatomist::ControlPtr>::iterator
198 const std::string & methodname,
199 int x,
int y )
const;
201 const std::string & methodname,
202 int x,
int y )
const;
204 const std::string & methodname,
205 int x,
int y )
const;
207 const std::string & methodname,
208 int x,
int y )
const;
215 void getSelectedObjectNames();
219 std::string myViewType;
220 std::map<std::string, anatomist::ControlPtr> myControls;
222 std::map<int, std::string> myAvailableControls;
223 std::map<int, std::string> myActivableControls;
225 std::set<std::string> myAvailableControlGroups;
226 std::set<std::string> myActivableControlGroups;
227 std::list<std::string> mySelectedObjects;
229 std::list<anatomist::ControlSwitchObserver *> myObservers;
231 bool myControlEnabled;
232 std::string myActiveControl;
237 void toolBoxDestroyed();
void dragMoveEvent(QDragMoveEvent *)
const std::map< int, std::string > & availableControls() const
void activateKeyPressAction(const std::string &methodname) const
void notifyActiveControlChange()
void focusInEvent(QFocusEvent *)
const std::string & activeControl() const
void mouseDoubleClickEvent(QMouseEvent *)
anatomist::ControlPtr activeControlInstance() const
const std::set< std::string > & actions() const
void activateMousePressAction(const std::string &methodname, int x, int y) const
void hideEvent(QHideEvent *)
void dragEnterEvent(QDragEnterEvent *)
void moveEvent(QMoveEvent *)
void activateMouseDoubleClickAction(const std::string &methodname, int x, int y) const
void keyReleaseEvent(QKeyEvent *)
void showEvent(QShowEvent *)
std::map< std::string, anatomist::ControlPtr >::iterator iterator
void mouseReleaseEvent(QMouseEvent *)
void activateMouseMoveAction(const std::string &methodname, int x, int y) const
std::map< std::string, anatomist::ControlPtr >::const_iterator const_iterator
void setActiveControl(const std::string &)
bool isToolBoxVisible() const
anatomist::Action * getAction(const std::string &actionName)
void dragLeaveEvent(QDragLeaveEvent *)
void wheelEvent(QWheelEvent *)
const_iterator begin() const
void focusOutEvent(QFocusEvent *)
void selectionChangedEvent()
void enterEvent(QEvent *)
void updateControlDescription()
void leaveEvent(QEvent *)
void keyPressEvent(QKeyEvent *)
const std::set< std::string > & availableControlGroups() const
void notifyActivableControlChange()
const std::set< std::string > & activableControlGroups() const
void notifyAvailableControlChange()
void activateMouseReleaseAction(const std::string &methodname, int x, int y) const
void activateKeyReleaseAction(const std::string &methodname) const
void touchEvent(QTouchEvent *)
const std::map< int, std::string > & activableControls() const
void dropEvent(QDropEvent *)
std::string controlDescription(const std::string &ctrlname) const
void mousePressEvent(QMouseEvent *)
bool attach(anatomist::ControlSwitchObserver *window)
void paintEvent(QPaintEvent *)
void mouseMoveEvent(QMouseEvent *)
void setActivableControls(bool init=false)
bool detach(anatomist::ControlSwitchObserver *window)
void setAvailableControls(const std::list< std::string > &objects)
void switchToolBoxVisible()
void gestureEvent(QGestureEvent *)
const_iterator end() const
ControlSwitch(anatomist::View *view)
void notifyActionChange()
void resizeEvent(QResizeEvent *)
virtual void updateAvailableControls()
virtual void updateActions()
virtual void updateActivableControls()
virtual ~ControlSwitchObserver()
virtual void updateActiveControl()