Tulip  5.3.0
Large graphs analysis and drawing
ViewActionsManager.h
1 /*
2  *
3  * This file is part of Tulip (http://tulip.labri.fr)
4  *
5  * Authors: David Auber and the Tulip development Team
6  * from LaBRI, University of Bordeaux
7  *
8  * Tulip is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU Lesser General Public License
10  * as published by the Free Software Foundation, either version 3
11  * of the License, or (at your option) any later version.
12  *
13  * Tulip is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
16  * See the GNU General Public License for more details.
17  *
18  */
19 ///@cond DOXYGEN_HIDDEN
20 
21 #ifndef VIEW_ACTIONS_MANAGER_H
22 #define VIEW_ACTIONS_MANAGER_H
23 
24 #include <QMenu>
25 #include <QAction>
26 
27 #include <tulip/View.h>
28 #include <tulip/DataSet.h>
29 #include <tulip/GlMainWidget.h>
30 
31 namespace tlp {
32 class TLP_QT_SCOPE ViewActionsManager : public QObject {
33  Q_OBJECT
34 
35  View *_view;
36  GlMainWidget *_glMainWidget;
37  bool _keepSizeRatio;
38  QAction *_centerViewAction;
39  QAction *_forceRedrawAction;
40  QAction *_advAntiAliasingAction;
41  QAction *_snapshotAction;
42 
43 public:
44  ViewActionsManager(View *view, GlMainWidget *widget, bool keepRatio,
45  bool showAdvancedAntiAliasing = true);
46 
47  // the function below must be called by the associated view
48  // when overloading the View class corresponding method
49  void fillContextMenu(QMenu *menu);
50 
51 protected slots:
52  void centerView();
53  void redraw();
54  void openSnapshotDialog();
55  void setAntiAliasing(bool);
56  void setAdvancedAntiAliasing(bool);
57 };
58 } // namespace tlp
59 
60 #endif /* VIEW_ACTIONS_MANAGER_H */
61 
62 ///@endcond