Provide an abstract view with OpenGl rendering.
More...
#include <GlMainView.h>
List of all members.
Public Slots |
virtual void | draw () |
virtual void | refresh () |
virtual void | hideOverview (bool) |
virtual void | displayOverview (bool display) |
virtual void | showDialog (QAction *action) |
bool | eventFilter (QObject *object, QEvent *event) |
virtual void | exportImage (QAction *action) |
virtual void | setGraph (Graph *graph)=0 |
| Sets the Graph on this View.
|
virtual void | init ()=0 |
| Centers and draws the view. Calls centerview() [where applicable], then draw(). This might be removed in a future version (3.6 or later) as all this does is calling centerview on the GlMainWidget if this is a GlMainView. Adding a centerView function in View would allow to remove this function.
|
Public Member Functions |
| GlMainView () |
virtual | ~GlMainView () |
virtual QWidget * | construct (QWidget *parent) |
Graph * | getGraph () |
virtual GlMainWidget * | getGlMainWidget () |
virtual void | createPicture (const std::string &pictureName, int width=0, int height=0) |
virtual bool | createPicture (const std::string &pictureName, int width, int height, bool center, int zoom=1, int xOffset=0, int yOffset=0) |
virtual QImage | createPicture (int width, int height, bool center, int zoom=1, int xOffset=0, int yOffset=0) |
virtual void | buildContextMenu (QObject *object, QContextMenuEvent *event, QMenu *contextMenu) |
GWOverviewWidget * | getOverviewWidget () |
QAction * | getOverviewAction () |
| AbstractView () |
virtual | ~AbstractView () |
QWidget * | getWidget () |
virtual void | setInteractors (const std::list< Interactor * > &interactorsList) |
virtual std::list< Interactor * > | getInteractors () |
virtual void | setActiveInteractor (Interactor *interactor) |
Interactor * | getActiveInteractor () |
QWidget * | getCentralWidget () const |
bool | savePicture (const std::string &pictureName, int width, int height, bool center, int zoom=1, int xOffset=0, int yOffset=0) |
| Default implementation of the savePicture function. Use the image objects returned by the createPicture function and save it to a picture file on disk.
|
virtual | ~View () |
virtual void | setData (Graph *graph, DataSet dataSet)=0 |
| Set the View's Graph and DataSet.
|
virtual void | getData (Graph **graph, DataSet *dataSet)=0 |
| Gets the Graph and DataSet of the view.
|
virtual std::list< std::pair
< QWidget *, std::string > > | getConfigurationWidget () |
| Returns the configuration widgets this view should use. These widgets will be displayed in the left dock of the MainController, in the View Editor tab. Each widget will be in a tab whose text is the string of the pair.
|
virtual std::string | getRealViewName () const |
| Return the real view name (if "" the real name is the name given by the plugin).
|
virtual void | undoIsDone () |
| This function is called when an undo is performed by the controller.
|
Detailed Description
Provide an abstract view with OpenGl rendering.
This class provide an abstract view with OpenGl rendering and overview To do this rendering GlMainView class is use
Constructor & Destructor Documentation
tlp::GlMainView::GlMainView |
( |
| ) |
|
virtual tlp::GlMainView::~GlMainView |
( |
| ) |
|
|
virtual |
Member Function Documentation
virtual void tlp::GlMainView::buildContextMenu |
( |
QObject * |
object, |
|
|
QContextMenuEvent * |
event, |
|
|
QMenu * |
contextMenu |
|
) |
| |
|
virtual |
virtual QWidget* tlp::GlMainView::construct |
( |
QWidget * |
parent | ) |
|
|
virtual |
virtual void tlp::GlMainView::createPicture |
( |
const std::string & |
pictureName, |
|
|
int |
width = 0 , |
|
|
int |
height = 0 |
|
) |
| |
|
virtual |
Take a snapshot of the view and put it in a picture
- Deprecated:
- In Tulip 4.x.y this function will be replace by void createPicture(const string &pictureName,int width, int height, bool center, int zoom, int xOffset, int yOffset)
Reimplemented from tlp::View.
virtual bool tlp::GlMainView::createPicture |
( |
const std::string & |
pictureName, |
|
|
int |
width, |
|
|
int |
height, |
|
|
bool |
center, |
|
|
int |
zoom = 1 , |
|
|
int |
xOffset = 0 , |
|
|
int |
yOffset = 0 |
|
) |
| |
|
virtual |
Take a snapshot of the view like old createPicture function but we add some parameters
- Parameters:
-
pictureName | : name of the picture with extension, extension is used to encode the picture |
width | : width of the picture |
height | : height of the picture |
center | : if we do a center view before create picture or use the current zoom and pan |
zoom | : create a picture of a sub part of the view : with zoom=0 : create only one picture with entire view, with zoom=N : the view is cut into 2^N part in width and height |
xOffset | : this parameters is used to know the part of the view to render if zoom!=0 : xOffset must be : 0 <= xOffset < 2^zoom |
yOffset | : this parameters is used to know the part of the view to render if zoom!=0 : yOffset must be : 0 <= yOffset < 2^zoom |
Reimplemented from tlp::View.
virtual QImage tlp::GlMainView::createPicture |
( |
int |
width, |
|
|
int |
height, |
|
|
bool |
center, |
|
|
int |
zoom = 1 , |
|
|
int |
xOffset = 0 , |
|
|
int |
yOffset = 0 |
|
) |
| |
|
virtual |
Take a snapshot of the view like old createPicture function and return a QImage
- Parameters:
-
width | : width of the picture |
height | : height of the picture |
center | : if we do a center view before create picture or use the current zoom and pan |
zoom | : create a picture of a sub part of the view : with zoom=0 : create only one picture with entire view, with zoom=N : the view is cut into 2^N part in width and height |
xOffset | : this parameters is used to know the part of the view to render if zoom!=0 : xOffset must be : 0 <= xOffset < 2^zoom |
yOffset | : this parameters is used to know the part of the view to render if zoom!=0 : yOffset must be : 0 <= yOffset < 2^zoom |
Reimplemented from tlp::View.
virtual void tlp::GlMainView::displayOverview |
( |
bool |
display | ) |
|
|
inlinevirtualslot |
virtual void tlp::GlMainView::draw |
( |
| ) |
|
|
virtualslot |
You can call this function if you want to have the GlMainWidget of this view If this view doesn't use GlMainWidget : this function return NULL This function is use to export a view to a picture
Graph* tlp::GlMainView::getGraph |
( |
| ) |
|
|
virtual |
get the graph use in this view
- Returns:
- the graph use in this view
Implements tlp::View.
QAction* tlp::GlMainView::getOverviewAction |
( |
| ) |
|
|
inline |
Return QAction of overview use in the context menu
Return the overview widget use by this view
virtual void tlp::GlMainView::hideOverview |
( |
bool |
| ) |
|
|
virtualslot |
virtual void tlp::GlMainView::refresh |
( |
| ) |
|
|
virtualslot |
virtual void tlp::GlMainView::showDialog |
( |
QAction * |
action | ) |
|
|
virtualslot |
Member Data Documentation
QMenu* tlp::GlMainView::dialogMenu |
|
protected |
QAction* tlp::GlMainView::overviewAction |
|
protected |
QDockWidget* tlp::GlMainView::overviewDock |
|
protected |
QFrame* tlp::GlMainView::overviewFrame |
|
protected |
|