20 #ifndef Tulip_GLMAINVIEW_H 21 #define Tulip_GLMAINVIEW_H 23 #include <tulip/ViewWidget.h> 25 class QGraphicsProxyWidget;
31 class GlOverviewGraphicsItem;
32 class SceneConfigWidget;
33 class SceneLayersConfigWidget;
36 class ViewActionsManager;
73 tlp::GlOverviewGraphicsItem *_overviewItem;
74 tlp::ViewActionsManager *_viewActionsManager;
76 QPushButton *_showOvButton, *_showQabButton;
79 bool needQuickAccessBar, _needTooltipAndUrlManager;
80 QGraphicsProxyWidget *_quickAccessBarItem;
81 tlp::QuickAccessBar *_quickAccessBar;
82 tlp::SceneConfigWidget *_sceneConfigurationWidget;
83 tlp::SceneLayersConfigWidget *_sceneLayersConfigurationWidget;
86 enum OverviewPosition {
93 GlMainView(
bool needTooltipAndUrlManager =
false);
96 QList<QWidget *> configurationWidgets()
const override;
97 bool overviewVisible()
const;
98 QPixmap snapshot(
const QSize &outputSize = QSize())
const override;
100 void setOverviewPosition(
const OverviewPosition &position);
101 OverviewPosition overviewPosition()
const;
103 void setUpdateOverview(
bool updateOverview);
104 bool updateOverview()
const;
113 void draw()
override;
123 void refresh()
override;
129 virtual void drawOverview(
bool generatePixmap =
true);
134 void centerView(
bool graphChanged =
false)
override;
139 void setOverviewVisible(
bool);
144 void setViewOrtho(
bool);
149 void applySettings()
override;
151 void undoCallback()
override;
155 bool getNodeOrEdgeAtViewportPos(
int x,
int y,
node &n,
edge &e)
const override {
156 return getNodeOrEdgeAtViewportPos(_glMainWidget, x, y, n, e);
160 virtual void glMainViewDrawn(
bool graphChanged);
161 virtual void sceneRectChanged(
const QRectF &);
162 void setQuickAccessBarVisible(
bool);
163 void fillContextMenu(QMenu *menu,
const QPointF &)
override;
166 void setupWidget()
override;
167 bool quickAccessBarVisible()
const;
168 void assignNewGlMainWidget(
GlMainWidget *glMainWidget,
bool deleteOldGlMainWidget =
true);
169 bool eventFilter(QObject *obj, QEvent *event)
override;
171 tlp::GlOverviewGraphicsItem *overviewItem()
const;
172 void updateShowOverviewButton();
173 void updateShowQuickAccessBarButton();
174 virtual QuickAccessBar *getQuickAccessBarImpl();
176 OverviewPosition _overviewPosition;
178 bool _updateOverview;
An abstract view that displays a GlMainWidget as its central widget.
A container that can store data from any type.
The edge struct represents an edge in a Graph object.
The node struct represents a node in a Graph object.
This widget provide a simple system to visualize data/graph with OpenGL 3D engine.