public:\
std::string
name()
const {
return std::string(STRING_CLASS_NAME); } \
std::string
author()
const {
return std::string(AUTHOR); }\
std::string
date()
const {
return std::string(DATE); } \
std::string
info()
const {
return std::string(DESCRIPTION); } \
std::string
release()
const {
return std::string(VERSION); }\
std::string
tulipRelease()
const {
return std::string(TULIP_VERSION); }\
std::string
group()
const {
return getComponent()->group(); }\
CLASS_NAME(const PluginContext *):_component(NULL) {}\
bool
isCompatible(
const std::string& viewName)
const {
return viewName == VIEW_STRING_NAME; }\
unsigned
int priority()
const {
return getComponent()->priority(); }\
QAction*
action()
const {
return getComponent()->action(); }\
tlp::View*
view()
const {
return getComponent()->view(); }\
QCursor
cursor()
const {
return getComponent()->cursor(); }\
void
construct() { getComponent()->construct(); }\
void
install(QObject* target) { getComponent()->install(target); }\
void
uninstall() { getComponent()->uninstall(); }\
void
undoIsDone() { getComponent()->undoIsDone(); }\
tlp::Interactor* getComponent() const {\
if(!_component) {\
}\
return _component;\
}\
virtual void install(QObject *target)=0
Install the interactor on the given target A call to this method means thatr the interactor should st...
virtual QWidget * configurationWidget() const =0
virtual void uninstall()=0
Removes the interactor from the previously set target. Interactors can be installed on only one targe...
Interactor provides a way to handle user inputs over a view. Basically, The interactor class is an ov...
virtual std::string info() const =0
Information about the plug-in, from the plug-in author. This information can contains anything...
virtual void undoIsDone()=0
Informs the interactor when the undo command (Ctrl+Z) has been triggered.
virtual QAction * action() const =0
virtual std::string tulipRelease() const =0
The version of Tulip this plug-in was built with. Tulip versions are X.Y.Z, X eing the major...
static tlp::Plugin * getPluginObject(const std::string &name, tlp::PluginContext *context)
Constructs a plug-in.
virtual void setView(tlp::View *)=0
Defines the view object associated to this interactor.
#define PLUGIN(C)
Register a plugin into the plugin system. This macro is mandatory in order to register a plugin into ...
virtual QCursor cursor() const =0
virtual std::string date() const =0
The creation date of the plug-in. This date is in a free format, but most Tulip plug-ins use a DD/MM/...
virtual std::string name() const =0
Returns the name of the plug-in, as registered in the Tulip plug-in system. This name must be unique...
virtual bool isCompatible(const std::string &viewName) const =0
Checks the compatibility between the interactor and the given view (identified by its name)...
View plugins provide a way to dynamically add to a Tulip plateform various ways to visualize a graph...
virtual std::string release() const =0
The release version of the plug-in, including major and minor. The version should be X...
virtual void construct()=0
Builds up the interactor's internal state. This method should be used instead of the constructor to i...
virtual unsigned int priority() const =0
virtual std::string group() const =0
Returns the name of the group this plug-in belongs to. Groups and sub-groups are separated by two col...
virtual tlp::View * view() const =0
static tlp::PluginLister * instance()
Gets the static instance of this class. If not already done, creates it beforehand.
virtual std::string author() const =0
The name of the author of this plug-in.
Copy an existing Tulip interactor and sets it compatible with a given View.
This macro is used when you're making your own View and want to use an existing interactor with it. Interactors are declared to be compatible with a list of View. This macro extends the compatibility of an existing interactor by subclassing it.