27 #include <tulip/tulipconf.h> 28 #include <tulip/Observable.h> 29 #include <tulip/Plugin.h> 40 static const std::string VIEW_CATEGORY =
"Panel";
93 QList<tlp::Interactor *> _interactors;
97 QSet<tlp::Observable *> _triggers;
116 return VIEW_CATEGORY;
118 std::string
icon()
const override {
119 return ":/tulip/gui/icons/32/plugin_view.png";
126 virtual QGraphicsView *graphicsView()
const = 0;
127 #if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)) 131 virtual void resetGraphicsScene() {}
139 QList<tlp::Interactor *> interactors()
const;
156 virtual QList<QWidget *> configurationWidgets()
const;
166 virtual QString configurationWidgetsStyleSheet()
const;
185 QSet<tlp::Observable *> triggers()
const;
191 void treatEvents(
const std::vector<Event> &events)
override;
199 virtual QGraphicsItem *centralItem()
const;
207 virtual QPixmap snapshot(
const QSize &outputSize = QSize())
const = 0;
214 void showContextMenu(
const QPoint &point,
const QPointF &scenePoint);
221 virtual void undoCallback();
229 virtual void applySettings();
240 virtual void centerView(
bool graphChanged =
false);
246 virtual void setInteractors(
const QList<tlp::Interactor *> &);
278 virtual void draw() = 0;
294 virtual void setupUi() = 0;
302 void treatEvent(
const Event &)
override;
331 void clearRedrawTriggers();
336 void emitDrawNeededSignal();
361 void interactorsChanged();
368 virtual void interactorsInstalled(
const QList<tlp::Interactor *> &interactors);
391 virtual void graphDeleted(
tlp::Graph *parentGraph) = 0;
Interactor provides a way to handle user inputs over a view. Basically, The interactor class is an ov...
A container that can store data from any type.
virtual void refresh()
Refresh the View's panel. Calling refresh() means that no internal data has been modified. This can happen when the view's panel gets resized, restored etc.
virtual bool checkOnClose()
allow to add some check when a user want to close a view.
virtual void fillContextMenu(QMenu *, const QPointF &)
fills the context menu with entries related to the view. This method is called whenever the context m...
Event is the base class for all events used in the Observation mechanism.
std::string category() const override
A string identifier for a plugin used for categorization purposes.
Top-level interface for plug-ins.
std::string icon() const override
The icon (preferably a thumbnail) of the plugin.
View plugins provide a way to dynamically add to a Tulip plateform various ways to visualize a graph...
The Observable class is the base of Tulip's observation system.