Tulip
5.3.1
Large graphs analysis and drawing
|
#include <ViewWidget.h>
Public Slots | |
void | draw () override |
void | setupUi () override |
Public Slots inherited from tlp::View | |
void | addRedrawTrigger (tlp::Observable *) |
virtual void | applySettings () |
virtual void | centerView (bool graphChanged=false) |
virtual bool | checkOnClose () |
void | clearRedrawTriggers () |
virtual void | draw ()=0 |
void | emitDrawNeededSignal () |
virtual bool | getNodeOrEdgeAtViewportPos (int, int, node &, edge &) const |
virtual void | refresh () |
void | removeRedrawTrigger (tlp::Observable *) |
void | setCurrentInteractor (tlp::Interactor *currentInteractor) |
void | setGraph (tlp::Graph *graph) |
virtual void | setInteractors (const QList< tlp::Interactor *> &) |
virtual void | setState (const tlp::DataSet &) |
virtual void | setupUi ()=0 |
void | treatEvent (const Event &) override |
virtual void | undoCallback () |
Public Member Functions | |
QGraphicsView * | graphicsView () const override |
void | resetGraphicsScene () override |
Public Member Functions inherited from tlp::View | |
View () | |
~View () override | |
std::string | category () const override |
virtual QList< QWidget * > | configurationWidgets () const |
virtual QString | configurationWidgetsStyleSheet () const |
tlp::Interactor * | currentInteractor () const |
tlp::Graph * | graph () const |
std::string | icon () const override |
const QList< Interactor * > & | interactors () const |
virtual bool | interactorsEnabled () const |
void | setShowContextMenu (bool show) |
void | showContextMenu (const QPoint &point, const QPointF &scenePoint) |
virtual tlp::DataSet | state () const |
void | treatEvents (const std::vector< Event > &events) override |
QSet< tlp::Observable * > | triggers () const |
Public Member Functions inherited from tlp::Plugin | |
virtual std::string | author () const =0 |
virtual std::string | date () const =0 |
void | declareDeprecatedName (const std::string &oldName) |
std::string | deprecatedName () |
virtual std::string | group () const =0 |
virtual int | id () const |
virtual std::string | info () const =0 |
virtual std::string | major () const |
virtual std::string | minor () const |
virtual std::string | name () const =0 |
virtual std::string | programmingLanguage () const |
virtual std::string | release () const =0 |
virtual std::string | tulipMajor () const |
virtual std::string | tulipMinor () const |
virtual std::string | tulipRelease () const =0 |
Public Member Functions inherited from tlp::Observable | |
void | addListener (Observable *const listener) const |
void | addListener (Observable &listener) const |
void | addObserver (Observable *const observer) const |
void | addObserver (Observable &observer) const |
unsigned int | countListeners () const |
unsigned int | countObservers () const |
unsigned int | getReceived () const |
unsigned int | getSent () const |
void | removeListener (Observable *const listener) const |
void | removeListener (Observable &listener) const |
void | removeObserver (Observable *const observer) const |
void | removeObserver (Observable &observer) const |
Protected Slots | |
void | currentInteractorChanged (tlp::Interactor *) override |
void | graphDeleted (Graph *parentGraph) override |
Protected Slots inherited from tlp::View | |
void | activateTooltipAndUrlManager (QWidget *) |
virtual void | currentInteractorChanged (tlp::Interactor *) |
virtual void | fillContextMenu (QMenu *, const QPointF &) |
void | fillContextMenu (QMenu *menu, node n) |
void | fillContextMenu (QMenu *menu, edge e) |
virtual void | graphChanged (tlp::Graph *)=0 |
virtual void | graphDeleted (tlp::Graph *parentGraph)=0 |
virtual void | interactorsInstalled (const QList< tlp::Interactor *> &interactors) |
void | toggleInteractors (const bool activate, const std::unordered_set< const char *> &exceptions) |
Protected Member Functions | |
void | addToScene (QGraphicsItem *item) |
QGraphicsItem * | centralItem () const override |
void | removeFromScene (QGraphicsItem *item) |
void | setCentralWidget (QWidget *, bool deleteOldCentralWidget=true) |
virtual void | setupWidget ()=0 |
QPixmap | snapshot (const QSize &outputSize=QSize()) const override |
Protected Member Functions inherited from tlp::Observable | |
Observable (const Observable &) | |
bool | hasOnlookers () const |
void | observableDeleted () |
Observable & | operator= (const Observable &) |
void | sendEvent (const Event &message) |
virtual void | treatEvent (const Event &message) |
Additional Inherited Members | |
Signals inherited from tlp::View | |
void | drawNeeded () |
void | graphSet (tlp::Graph *) |
void | interactorsChanged () |
Static Public Member Functions inherited from tlp::Observable | |
static void | disableEventNotification () |
static void | enableEventNotification () |
static tlp::node | getNode (const tlp::Observable *obs) |
static Observable * | getObject (tlp::node n) |
static const tlp::VectorGraph & | getObservableGraph () |
static unsigned int | getScheduled (tlp::node n) |
static void | holdObservers () |
static bool | isAlive (tlp::node n) |
static unsigned int | observersHoldCounter () |
static void | unholdObservers () |
Protected Attributes inherited from tlp::Plugin | |
std::string | oldName |
ViewWidget provides convenience functions to allow the user to build a view plugin that displays a QWidget as its main element.
The ViewWidget class will build a QGraphicsView that sets a widget as the background of the whole panel. Sublassing ViewWidget means that you'll have to provide a centralWidget (see ViewWidget::setCentralWidget) that will take up the whole panel and be drawn in the background. You can use the addToScene() and removeFromScene() methods to edit the QGraphicsItems that will drawn over the widget.
By default, when an interactor gets active on a ViewWidget, it gets installed on the centralWidget (see Interactor::install)
Definition at line 49 of file ViewWidget.h.
|
protected |
Adds an item to the graphicsView that will be drawn on top of the widget This is a convenience function for the user to avoid taking care of item parenthood.
|
overrideprotectedvirtual |
Reimplemented from tlp::View.
|
overrideprotectedslot |
By default, the current interactor gets installed over the central widget.
|
inlineoverrideslot |
Reimplemented from View::draw() By default, this method does nothing. We assume the widget is automatically repainted by Qt's windowing manager.
Definition at line 82 of file ViewWidget.h.
|
overridevirtual |
Implements tlp::View.
|
protected |
Removes a graphics item from the view. This is a convenience function for the user to avoid taking care of item parenthood.
|
protected |
Sets the widget to be drawn as the view's background. This method may be called several times. Parenthood between the widget and items added using addToScene will be automatically updated.
|
overrideslot |
|
protectedpure virtual |
Sets up the central widget. This is similar to View::setupUi in the sense that the purpose of setupWidget is to construct the GUI element.
Implemented in tlp::GlMainView.
|
overrideprotectedvirtual |
Takes a snapshot of the view's screen and saves it into the given pixmap. The snapshot is scaled to outputSize. If a null size is given, the snapshot is to be on a 1:1 ratio.
Implements tlp::View.