Tulip
4.1.0
Better Visualization Through Research
|
#include <ViewWidget.h>
Inherits tlp::View.
Inherited by tlp::GlMainView.
Public Slots | |
virtual void | draw () |
virtual void | setupUi () |
Public Slots inherited from tlp::View | |
void | addRedrawTrigger (tlp::Observable *) |
virtual void | applySettings () |
virtual void | centerView () |
void | clearRedrawTriggers () |
virtual void | draw ()=0 |
void | emitDrawNeededSignal () |
virtual void | refresh () |
void | removeRedrawTrigger (tlp::Observable *) |
void | setCurrentInteractor (tlp::Interactor *currentInteractor) |
void | setGraph (tlp::Graph *graph) |
void | setInteractors (const QList< tlp::Interactor * > &) |
virtual void | setState (const tlp::DataSet &)=0 |
virtual void | setupUi ()=0 |
void | showContextMenu (const QPoint &point, const QPointF &scenePoint) |
virtual void | treatEvent (const Event &) |
void | undoCallback () |
Public Member Functions | |
virtual QGraphicsView * | graphicsView () const |
Public Member Functions inherited from tlp::View | |
View () | |
virtual | ~View () |
virtual std::string | category () const |
virtual QList< QWidget * > | configurationWidgets () const |
tlp::Interactor * | currentInteractor () const |
tlp::Graph * | graph () const |
std::string | icon () const |
QList< tlp::Interactor * > | interactors () const |
virtual tlp::DataSet | state () const =0 |
void | treatEvents (const std::vector< Event > &events) |
QSet< tlp::Observable * > | triggers () const |
Public Member Functions inherited from tlp::Plugin | |
virtual std::string | author () const =0 |
virtual std::string | date () const =0 |
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 | 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::WithParameter | |
template<typename T > | |
void | addInOutParameter (const std::string &name, const std::string &help=std::string(), const std::string &defaultValue=std::string(), bool isMandatory=true) |
template<typename T > | |
void | addInParameter (const std::string &name, const std::string &help, const std::string &defaultValue, bool isMandatory=true) |
template<typename T > | |
void | addOutParameter (const std::string &name, const std::string &help=std::string(), const std::string &defaultValue=std::string(), bool isMandatory=true) |
template<typename T > | |
void | addParameter (const std::string &name, const std::string &help=std::string(), const std::string &defaultValue=std::string(), bool isMandatory=true) |
const tlp::ParameterDescriptionList & | getParameters () const |
Public Member Functions inherited from tlp::WithDependency | |
void | addDependency (const char *name, const char *release) |
const std::list< Dependency > & | dependencies () const |
Public Member Functions inherited from tlp::Observable | |
void | addListener (Observable *const listener) const |
void | addObserver (Observable *const 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 | removeObserver (Observable *const observerver) const |
Protected Slots | |
virtual void | currentInteractorChanged (tlp::Interactor *) |
virtual void | graphDeleted (Graph *parentGraph) |
Protected Slots inherited from tlp::View | |
virtual void | currentInteractorChanged (tlp::Interactor *) |
virtual void | fillContextMenu (QMenu *, const QPointF &) |
virtual void | graphChanged (tlp::Graph *)=0 |
virtual void | graphDeleted (tlp::Graph *parentGraph)=0 |
virtual void | interactorsInstalled (const QList< tlp::Interactor * > &interactors) |
Protected Member Functions | |
void | addToScene (QGraphicsItem *item) |
virtual QGraphicsItem * | centralItem () const |
void | removeFromScene (QGraphicsItem *item) |
void | setCentralWidget (QWidget *, bool deleteOldCentralWidget=true) |
virtual void | setupWidget ()=0 |
QPixmap | snapshot (const QSize &outputSize=QSize()) |
Additional Inherited Members | |
Signals inherited from tlp::View | |
void | drawNeeded () |
void | graphSet (tlp::Graph *) |
Static Public Member Functions inherited from tlp::Observable | |
static Observable * | getObject (tlp::node n) |
static const tlp::VectorGraph & | getObservableGraph () |
static void | holdObservers () |
static bool | isAlive (tlp::node n) |
static unsigned int | observersHoldCounter () |
static void | unholdObservers () |
Protected Attributes inherited from tlp::WithParameter | |
ParameterDescriptionList | parameters |
Protected Attributes inherited from tlp::WithDependency | |
std::list< Dependency > | _dependencies |
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 43 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.
|
protectedvirtual |
Reimplemented from tlp::View.
|
protectedvirtualslot |
By default, the current interactor gets installed over the central widget.
|
inlinevirtualslot |
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 74 of file ViewWidget.h.
|
virtual |
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.
|
virtualslot |
|
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.
|
protectedvirtual |
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.