Tulip
4.6.0
Better Visualization Through Research
|
#include <GlMainView.h>
Public Types | |
enum | OverviewPosition { OVERVIEW_TOP_LEFT, OVERVIEW_TOP_RIGHT, OVERVIEW_BOTTOM_LEFT, OVERVIEW_BOTTOM_RIGHT } |
Public Slots | |
void | applySettings () |
virtual void | centerView (bool graphChanged=false) |
virtual void | draw () |
virtual void | drawOverview (bool generatePixmap=true) |
void | openSnapshotDialog () |
void | redraw () |
virtual void | refresh () |
void | setAdvancedAntiAliasing (bool) |
void | setAntiAliasing (bool) |
void | setOverviewVisible (bool) |
void | setViewOrtho (bool) |
void | undoCallback () |
Public Member Functions | |
virtual QList< QWidget * > | configurationWidgets () const |
tlp::GlMainWidget * | getGlMainWidget () const |
OverviewPosition | overviewPosition () const |
bool | overviewVisible () const |
void | setOverviewPosition (const OverviewPosition &position) |
void | setUpdateOverview (bool updateOverview) |
QPixmap | snapshot (const QSize &outputSize=QSize()) const |
bool | updateOverview () const |
Protected Slots | |
void | delayedCenterView () |
void | fillContextMenu (QMenu *menu, const QPointF &) |
virtual void | glMainViewDrawn (bool graphChanged) |
virtual void | sceneRectChanged (const QRectF &) |
void | setQuickAccessBarVisible (bool) |
Protected Member Functions | |
void | assignNewGlMainWidget (GlMainWidget *glMainWidget, bool deleteOldGlMainWidget=true) |
bool | eventFilter (QObject *obj, QEvent *event) |
tlp::GlOverviewGraphicsItem * | overviewItem () const |
bool | quickAccessBarVisible () const |
virtual void | setupWidget () |
Protected Attributes | |
OverviewPosition | _overviewPosition |
tlp::QuickAccessBar * | _quickAccessBar |
tlp::SceneConfigWidget * | _sceneConfigurationWidget |
tlp::SceneLayersConfigWidget * | _sceneLayersConfigurationWidget |
bool | _updateOverview |
An abstract view that displays a GlMainWidget as its central widget.
The GlMainView subclasses ViewWidget and always uses a GlMainWidget as the central widget of the panel. It also adds the following features:
Subclassing GlMainView means you will only want to display graphs in a single GlMainWidget. Switching the central widget can only be achieved from the ViewWidget class.
void MyView::setupWidget() { // Where MyView is a subclass of tlp::GlMainView GlMainView::setupWidget(); // call this first // insert custom behavior here }
Definition at line 61 of file GlMainView.h.
void tlp::GlMainView::applySettings | ( | ) | [virtual, slot] |
Force the settings set in the configuration widgets to be re-applied.
Reimplemented from tlp::View.
virtual void tlp::GlMainView::centerView | ( | bool | graphChanged = false | ) | [virtual, slot] |
Centers the scene's camera.
Reimplemented from tlp::View.
virtual QList<QWidget*> tlp::GlMainView::configurationWidgets | ( | ) | const [virtual] |
Reimplemented from tlp::View.
virtual void tlp::GlMainView::draw | ( | ) | [virtual, slot] |
Calls GlMainWidget::draw();.
Reimplemented from tlp::ViewWidget.
virtual void tlp::GlMainView::drawOverview | ( | bool | generatePixmap = true | ) | [virtual, slot] |
Force the overview to be redrawn. Since GlMainView already detects graph's modifications, this method should not be called manually to avoid extra rendering.
void tlp::GlMainView::fillContextMenu | ( | QMenu * | , |
const QPointF & | |||
) | [protected, virtual, slot] |
fills the context menu with entries related to the view. This method is called whenever the context menu is displayed on the panel.
QMenu | The popup menu that will be displayed. This menu should be populated with context action related to the panel. |
Reimplemented from tlp::View.
void tlp::GlMainView::openSnapshotDialog | ( | ) | [slot] |
Display a dialog that takes a snapshot of the current scene.
void tlp::GlMainView::redraw | ( | ) | [slot] |
Calls GlMainWidget::redraw();.
virtual void tlp::GlMainView::refresh | ( | ) | [virtual, slot] |
Calls GlMainWidget::redraw();.
Reimplemented from tlp::View.
void tlp::GlMainView::setOverviewVisible | ( | bool | ) | [slot] |
Toggles the overview on or off.
virtual void tlp::GlMainView::setupWidget | ( | ) | [protected, 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.
Implements tlp::ViewWidget.
void tlp::GlMainView::setViewOrtho | ( | bool | ) | [slot] |
Toggles the orthogonal projection on or off, then draws.
QPixmap tlp::GlMainView::snapshot | ( | const QSize & | outputSize = QSize() | ) | const [virtual] |
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.
Reimplemented from tlp::ViewWidget.
void tlp::GlMainView::undoCallback | ( | ) | [virtual, slot] |
This method is a callback to notify the panel that the pop() method (undo) has just been called on the graph. By default, this method will make a call to centerView()
Reimplemented from tlp::View.