27 #include <tulip/tulipconf.h> 28 #include <tulip/Observable.h> 29 #include <tulip/Plugin.h> 40 static const std::string VIEW_CATEGORY =
"Panel";
76 QList<tlp::Interactor*> _interactors;
80 QSet<tlp::Observable*> _triggers;
100 return ":/tulip/gui/icons/32/plugin_view.png";
107 virtual QGraphicsView* graphicsView()
const=0;
108 #if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)) 112 virtual void resetGraphicsScene() {}
120 QList<tlp::Interactor*> interactors()
const;
136 virtual QList<QWidget*> configurationWidgets()
const;
144 virtual QString configurationWidgetsStyleSheet()
const;
162 QSet<tlp::Observable*> triggers()
const;
168 void treatEvents(
const std::vector<Event> &events);
175 virtual QGraphicsItem* centralItem()
const;
182 virtual QPixmap snapshot(
const QSize& outputSize=QSize())
const=0;
189 void showContextMenu(
const QPoint& point,
const QPointF &scenePoint);
195 virtual void undoCallback();
202 virtual void applySettings();
211 virtual void centerView(
bool graphChanged =
false);
218 virtual void setInteractors(
const QList<tlp::Interactor*>&);
245 virtual void draw()=0;
259 virtual void setupUi()=0;
265 virtual void treatEvent(
const Event&);
288 void clearRedrawTriggers();
293 void emitDrawNeededSignal();
316 void interactorsChanged();
323 virtual void interactorsInstalled(
const QList<tlp::Interactor*>& interactors);
343 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...
std::string icon() const
The icon (preferably a thumbnail) of the plugin.
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 std::string category() const
A string identifier for a plugin used for categorization purposes.
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.
Top-level interface for plug-ins.
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.