Tulip
4.6.0
Better Visualization Through Research
|
#include <Interactor.h>
Public Slots | |
virtual void | install (QObject *target)=0 |
virtual void | setView (tlp::View *)=0 |
virtual void | undoIsDone ()=0 |
virtual void | uninstall ()=0 |
Public Member Functions | |
virtual QAction * | action () const =0 |
virtual std::string | category () const |
virtual QWidget * | configurationWidget () const =0 |
virtual void | construct ()=0 |
virtual QCursor | cursor () const =0 |
std::string | icon () const |
virtual bool | isCompatible (const std::string &viewName) const =0 |
virtual unsigned int | priority () const =0 |
virtual tlp::View * | view () const =0 |
Protected Member Functions | |
virtual bool | eventFilter (QObject *obj, QEvent *ev) |
Properties | |
QAction | action |
QCursor | cursor |
unsigned | int |
tlp::View | view |
Interactor provides a way to handle user inputs over a view. Basically, The interactor class is an overlay to the Qt's event filtering mechanism. It adds several features like the ability to define priorities, custom cursors, etc.
When an interactor is constructed, the following methods are called in this order:
Methods listed above are only called once. Once the interactor is initialized, it may be installed/removed several times on different QObjects. It will then repond to user inputs via the eventFilter method
Definition at line 53 of file Interactor.h.
virtual QAction* tlp::Interactor::action | ( | ) | const [pure virtual] |
Implemented in tlp::InteractorComposite.
virtual std::string tlp::Interactor::category | ( | ) | const [inline, virtual] |
A string identifier for a plugin used for categorization purposes.
Implements tlp::Plugin.
Definition at line 61 of file Interactor.h.
virtual QWidget* tlp::Interactor::configurationWidget | ( | ) | const [pure virtual] |
Implemented in tlp::NodeLinkDiagramComponentInteractor.
virtual void tlp::Interactor::construct | ( | ) | [pure virtual] |
Builds up the interactor's internal state. This method should be used instead of the constructor to initialize the interactor.
virtual QCursor tlp::Interactor::cursor | ( | ) | const [pure virtual] |
Implemented in tlp::InteractorComposite.
virtual bool tlp::Interactor::eventFilter | ( | QObject * | obj, |
QEvent * | ev | ||
) | [inline, protected, virtual] |
Provides input filtering for the interactor.
Definition at line 143 of file Interactor.h.
std::string tlp::Interactor::icon | ( | ) | const [inline, virtual] |
The icon (preferably a thumbnail) of the plugin.
Reimplemented from tlp::Plugin.
Definition at line 64 of file Interactor.h.
virtual void tlp::Interactor::install | ( | QObject * | target | ) | [pure virtual, slot] |
Install the interactor on the given target A call to this method means thatr the interactor should start listening to the target's events and handle them. Returning true prevents further handling of the event. Doing otherwise means that the interactor will let following filters to hand over this kind of event.
Implemented in tlp::InteractorComposite.
virtual bool tlp::Interactor::isCompatible | ( | const std::string & | viewName | ) | const [pure virtual] |
Checks the compatibility between the interactor and the given view (identified by its name). If this method returns true, it's very likely that the interactor will be installed on the associated view.
virtual unsigned int tlp::Interactor::priority | ( | ) | const [pure virtual] |
Implemented in tlp::NodeLinkDiagramComponentInteractor.
virtual void tlp::Interactor::setView | ( | tlp::View * | ) | [pure virtual, slot] |
Defines the view object associated to this interactor.
Implemented in tlp::InteractorComposite.
virtual void tlp::Interactor::undoIsDone | ( | ) | [pure virtual, slot] |
Informs the interactor when the undo command (Ctrl+Z) has been triggered.
Implemented in tlp::InteractorComposite.
virtual void tlp::Interactor::uninstall | ( | ) | [pure virtual, slot] |
Removes the interactor from the previously set target. Interactors can be installed on only one target at once.
Implemented in tlp::InteractorComposite.
virtual tlp::View* tlp::Interactor::view | ( | ) | const [pure virtual] |
Implemented in tlp::InteractorComposite.