Developer Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
CoreWidget.hh
Go to the documentation of this file.
1 /*===========================================================================*\
2 * *
3 * OpenFlipper *
4  * Copyright (c) 2001-2015, RWTH-Aachen University *
5  * Department of Computer Graphics and Multimedia *
6  * All rights reserved. *
7  * www.openflipper.org *
8  * *
9  *---------------------------------------------------------------------------*
10  * This file is part of OpenFlipper. *
11  *---------------------------------------------------------------------------*
12  * *
13  * Redistribution and use in source and binary forms, with or without *
14  * modification, are permitted provided that the following conditions *
15  * are met: *
16  * *
17  * 1. Redistributions of source code must retain the above copyright notice, *
18  * this list of conditions and the following disclaimer. *
19  * *
20  * 2. Redistributions in binary form must reproduce the above copyright *
21  * notice, this list of conditions and the following disclaimer in the *
22  * documentation and/or other materials provided with the distribution. *
23  * *
24  * 3. Neither the name of the copyright holder nor the names of its *
25  * contributors may be used to endorse or promote products derived from *
26  * this software without specific prior written permission. *
27  * *
28  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS *
29  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED *
30  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A *
31  * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER *
32  * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, *
33  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, *
34  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR *
35  * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF *
36  * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING *
37  * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS *
38  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *
39 * *
40 \*===========================================================================*/
41 
42 /*===========================================================================*\
43 * *
44 * $Revision$ *
45 * $LastChangedBy$ *
46 * $Date$ *
47 * *
48 \*===========================================================================*/
49 
50 
51 //=============================================================================
52 //
53 // CLASS CoreWidget
54 //
55 //=============================================================================
56 
62 #ifndef COREWIDGET_HH
63 #define COREWIDGET_HH
64 
65 
66 //== INCLUDES =================================================================
67 
68 #include <set>
69 
75 #include <OpenFlipper/BasePlugin/ViewInterface.hh>
77 
78 #include <OpenFlipper/widgets/coreWidget/SideArea.hh>
79 #include <OpenFlipper/widgets/coreWidget/ColorStatusBar.hh>
80 
81 #include <OpenFlipper/widgets/glWidget/QtBaseViewer.hh>
82 #include <OpenFlipper/widgets/glWidget/QtGLGraphicsScene.hh>
83 #include <OpenFlipper/widgets/glWidget/QtGLGraphicsView.hh>
84 #include <OpenFlipper/widgets/glWidget/QtMultiViewLayout.hh>
85 #include <OpenFlipper/widgets/glWidget/QtSlideWindow.hh>
86 
87 // QT INCLUDES
88 #include <QMainWindow>
89 #include <QStackedWidget>
90 #include <QTextEdit>
91 #include <QToolBar>
92 #include <QStatusBar>
93 
94 #include <QFuture>
95 #include <QFutureWatcher>
96 
97 #include <QDockWidget>
98 
99 #include <OpenFlipper/widgets/aboutWidget/aboutWidget.hh>
100 #include <OpenFlipper/widgets/loggerWidget/loggerWidget.hh>
101 #include <OpenFlipper/widgets/optionsWidget/optionsWidget.hh>
102 #include <OpenFlipper/widgets/helpWidget/helpWidget.hh>
103 #include <OpenFlipper/widgets/stereoSettingsWidget/stereoSettingsWidget.hh>
104 #include <OpenFlipper/widgets/postProcessorWidget/postProcessorWidget.hh>
105 #include <OpenFlipper/widgets/rendererWidget/rendererWidget.hh>
106 #include <OpenFlipper/widgets/rendererWidget/rendererObjectWidget.hh>
107 
108 #include <OpenFlipper/Core/PluginInfo.hh>
109 
110 #include <ACG/QtWidgets/QtSceneGraphWidget.hh>
111 
112 #include <ACG/Scenegraph/DrawModes.hh>
113 #include <ACG/Scenegraph/CoordsysNode.hh>
114 
115 #include <OpenFlipper/INIFile/INIFile.hh>
117 
118 #include "../viewModeWidget/viewModeChangeWidget.hh"
119 
129 struct ViewMode{
130 
132  QString name;
133 
136  QString icon;
137 
139  bool custom;
140 
142  QStringList visibleToolboxes;
143 
145  QStringList visibleToolbars;
146 
148  QStringList visibleContextMenus;
149 };
150 
152  public:
153  StackWidgetInfo(bool _editable,QString _name,QWidget* _widget);
154 
155  bool editable;
156  QString name;
157  QWidget* widget;
158 };
159 
162 class MenuInfo {
163  public:
164  MenuInfo():
165  action(0),
167  {}
168 
170  QAction* action;
171 
174 
177 };
178 
184 class PickMode
185 {
186  public:
188  PickMode(const std::string& _n, const bool _t, const bool _v, QCursor _c, QToolBar *_tb = 0 );
189 
191  ~PickMode() {};
192 
193 
198  void visible(const bool _visible);
199 
204  bool visible() const;
205 
210  std::string name() const;
211 
219  void tracking(const bool _tracking);
220 
226  bool tracking() const;
227 
233  QCursor cursor() const;
234 
242  void cursor(const QCursor _cursor);
243 
251  void toolbar(QToolBar* _toolbar);
252 
258  QToolBar* toolbar() const;
259 
260  private:
261 
263  std::string name_;
264 
267  bool tracking_;
268 
271  bool visible_;
272 
275  QCursor cursor_;
276 
279  QToolBar * toolbar_;
280 };
281 
284 class CoreWidget : public QMainWindow
285 {
286  Q_OBJECT
287 
288 public:
289 
290  friend class Core;
291 
293  CoreWidget( QVector<ViewMode*>& _viewModes, std::vector<PluginInfo>& _plugins, QList< SlotInfo >& _coreSlots );
294 
296  ~CoreWidget();
297 
298  signals:
299  void clearAll();
300  void loadMenu();
301  void addEmptyObjectMenu();
302  void saveMenu();
303  void saveToMenu();
304  void loadIniMenu();
305  void saveIniMenu();
306  void recentOpen(QAction*);
307  void exit();
308 
309  void loadPlugin();
310  void showPlugins();
311 
312  private slots:
313 
315  void closeEvent ( QCloseEvent * event );
316 
317  //===========================================================================
320  //===========================================================================
321 
322  signals :
323  void log(Logtype _type, QString _message);
324  void log(QString _message);
325 
328  //===========================================================================
331  //===========================================================================
332 
333  protected :
334 
336  virtual void keyPressEvent (QKeyEvent* _e);
337  virtual void keyReleaseEvent(QKeyEvent* _e);
338 
339  // Filter alt key events under windows
340  //bool eventFilter(QObject *obj, QEvent *ev);
341 
342  private:
343  //event handling
344  bool event( QEvent *event );
345 
346  bool eventFilter(QObject *_obj, QEvent *_event);
347 
348  signals :
349 
353  void PluginKeyEvent(QKeyEvent* );
354 
358  void PluginKeyReleaseEvent(QKeyEvent* );
359 
361  void registerKey(int _key, Qt::KeyboardModifiers _modifiers, QString _description,
362  bool _multiUse = false);
363 
365  void call( QString _expression , bool& _success );
366 
367  private:
369  typedef std::multimap< std::pair< int, Qt::KeyboardModifiers > , std::pair< QObject*, int > > KeyMap;
370 
371  typedef std::pair< KeyMap::iterator, KeyMap::iterator > KeyRange;
372 
375  void registerCoreKeys();
376 
381  void coreKeyPressEvent();
382 
384  void coreKeyPressEvent (QKeyEvent* _e);
385  void coreKeyReleaseEvent(QKeyEvent* _e);
386 
387  KeyBinding getKeyBinding(QObject* _plugin, int _keyIndex );
388  QString getRPCName(QObject* _plugin );
389 
391  std::vector<KeyBinding> coreKeys_;
392 
394  KeyMap keys_;
395 
397  InverseKeyMap invKeys_;
398 
400  QList< SlotInfo >& coreSlots_;
401 
402  private slots:
408  void slotRegisterKey(int _key, Qt::KeyboardModifiers _modifiers, QString _description,
409  bool _multiUse = false);
410 
411  public slots:
416  void slotAddKeyMapping(int _key, Qt::KeyboardModifiers _modifiers, QObject* _plugin, int _keyBindingID);
417 
424 
425  public:
427  void loadKeyBindings(INIFile& _ini);
428 
430  void saveKeyBindings(INIFile& _ini);
431 
432  void showReducedMenuBar(bool reduced);
433 
434  private:
437 
440  //===========================================================================
443  //===========================================================================
444 
445  public:
446 
448  void setupMenuBar();
449 
452  //===========================================================================
455  //===========================================================================
456 
457  signals:
458  void startVideoCapture(QString _baseName, int _fps, bool _captureViewers);
459  void stopVideoCapture();
460 
461  void resizeViewers(int _width, int _height);
462  void resizeApplication(int _width, int _height);
463 
464  private slots:
465  void startVideoCaptureDialog();
466 
469  //===========================================================================
472  //===========================================================================
473 
474  public:
475 
477  void addRecent(QString _filename, DataType _type);
478 
480  void updateRecent();
481 
484  //===========================================================================
487  //===========================================================================
488 
489  public :
490 
492  void showLoggerInSplitView(bool _show);
493 
496 
498  void setForceNativeCursor ( bool _state );
499 
500  QSize defaultIconSize();
501 
502  QScrollArea* getToolboxScrollArea() { return toolBoxScroll_; }
503  QWidget* getToolboxArea() { return toolBoxArea_; }
504  SideArea* getToolbox() { return toolBox_; }
505 
506  public slots:
507 
509  void toggleFullscreen();
510 
512  void setFullscreen(bool _state );
513 
515  void toggleLogger();
516 
518  void showLogger(OpenFlipper::Options::LoggerState _state);
519 
521  void toggleToolbox();
522 
524  void showToolbox( bool _state );
525 
527  void toggleStatusBar();
528 
530  void showStatusBar( bool _state );
531 
533  void showMenuBar( bool _state );
534 
536  void toggleMenuBar();
537 
539  void toggleToolBar();
540 
542  void showToolBar( bool _state );
543  signals:
545  void toolBarVisChanged( bool _state );
546 
548  void toolBoxVisChanged( bool _state );
549 
551  void statusBarVisChanged( bool _state );
552 
554  void menuBarVisChanged( bool _state );
555 
557  void fullScreenChanged( bool _state );
558 
559  private:
560  OpenFlipper::Options::LoggerState loggerState_;
561 
563 
566  //===========================================================================
569  //===========================================================================
570 
571  private:
573  QVector<QWidget*> toolWidgets_;
574 
575  public:
577  QVector<ViewMode*>& viewModes_;
578 
579  private:
580 
581  QAction* viewModeButton_;
582 
585 
586  public slots:
587 
589  void initViewModes( );
590 
592  void slotAddViewModeToolboxes(QString _mode, QStringList _usedWidgets);
593 
595  void slotAddViewModeToolboxes(QString _mode, bool _custom, QStringList _usedWidgets);
596 
598  void slotAddViewModeToolbars(QString _mode, QStringList _usedToolbars);
599 
601  void slotAddViewModeToolbars(QString _mode, bool _custom, QStringList _usedToolbars);
602 
604  void slotAddViewModeContextMenus(QString _mode, QStringList _usedToolbars);
605 
607  void slotAddViewModeContextMenus(QString _mode, bool _custom, QStringList _usedToolbars);
608 
610  void slotAddViewModeComplete(QString _mode , bool _custom, QStringList _toolboxes, QStringList _toolbars, QStringList _contextmenus);
611 
613  void slotSetViewModeIcon(QString _mode, QString _iconName);
614 
616  void slotSetViewModeIcon(QString _mode, bool _custom, QString _iconName);
617 
619  void slotChangeView(QString _mode, QStringList _toolboxWidgets, QStringList _toolbars, QStringList _contextmenus, bool _expandAll = false);
620 
622  void setToolBoxOrientationOnTheRight(bool _toolBoxRight);
623 
625  void showViewModeControls(bool _show);
626 
628  void slotHideContextMenu();
629 
630  private slots:
632  void slotRemoveViewMode(QString _name);
633 
635  void slotSetViewMode( QAction* action);
636 
638  void slotViewModeDialog();
639 
642 
644  void slotUpdateExaminer(unsigned _id);
645 
646  public slots :
647 
649  void setViewMode( QString _mode, bool _expandAll = false );
650 
652  void moveToolBoxToTop(QString _name);
653 
655  void moveToolBoxToBottom(QString _name);
656 
661  //===========================================================================
664  //===========================================================================
665 
666  private:
667 
669  std::vector< glViewer* > examiner_widgets_;
670 
672  QSplitter* splitter_;
673 
676 
679 
682 
685 
688 
690  QMenu* helpMenu_;
691 
693  QMenu* windowMenu_;
694 
697 
699  QGLWidget* glWidget_;
700 
703 
706 
708  QGraphicsWidget* centerWidget_;
709 
712 
715 
717  QWidget* toolBoxArea_;
718 
720  QToolButton *viewModePopupBtn_;
721 
723  QSplitter* toolSplitter_;
724 
727 
729  QScrollArea* toolBoxScroll_;
730 
732  typedef std::map<QToolBar*,QGraphicsProxyWidget*> PickToolBarMap;
733  PickToolBarMap curPickingToolbarItems_;
734 
737 
739  std::set<QToolBar*> registeredToolbars_;
740 
743 
744 
745  // widget showing the scenegraph
747 
749 
751 
754  private slots:
755 
759 
760 
763  void slotActivateExaminer ();
764 
765 
770  void slotLog(Logtype _type, QString _message);
771 
774  void sceneRectChanged(const QRectF &rect);
775 
776  //===========================================================================
779  //===========================================================================
780  private slots :
781 
782  void slotAddMenubarAction( QAction* _action , QString _name );
783  void slotAddMenubarActions( std::vector<QAction*> _actions , QString _name );
784  void slotGetMenubarMenu (QString _name, QMenu *& _menu, bool _create);
785 
786  private:
787 
789  QMenu *fileMenu_;
790 
792  QMenu *viewMenu_;
793 
795  QMenu *toolsMenu_;
796 
798  QAction* fileMenuEnd_;
799 
801  QMap<QString, QMenu *> menus_;
802 
805  //===========================================================================
808  //===========================================================================
809  private:
810  QToolBar* viewerToolbar_;
811 
813 
814  QToolButton* stereoButton_;
815  QToolButton* moveButton_;
816  QToolButton* pickButton_;
817  QToolButton* questionButton_;
818 
819  QComboBox* viewerLayoutBox_;
820 
823  //===========================================================================
826  //===========================================================================
827 
828  public slots:
831 
833  void slotUpdateRendererMenu();
834 
836  void setViewerLayout(int _idx);
837 
838  private slots:
840  void nextViewerLayout();
841 
843  void slotGlobalDrawMenu(QAction * _action);
844 
847 
849  void slotGlobalRendererMenu(QAction * _action);
850 
852  void slotGlobalPostProcessorMenu(QAction * _action);
853 
854  private:
857 
860 
861  QActionGroup * drawGroup_;
862 
864  QActionGroup * rendererGroup_;
865 
867  QActionGroup* viewGroup_;
868 
871 
874 
877 
880 
883 
886 
888 
890 
893  //===========================================================================
896  //===========================================================================
897 
898  signals :
900  void updateContextMenu(int);
901 
903  void updateContextMenuNode(int);
904 
907 
908 
909  private slots:
911  void slotCustomContextMenu( const QPoint& _point );
912 
914  void slotAddContextItem(QAction* _entry, ContextMenuType _type);
915 
917  void slotAddContextItem( QAction* _entry , DataType _dataType ,ContextMenuType type_);
918 
920  void slotAddContextItemToViewMode( QAction* _entry );
921 
923  void slotPasteView( );
924 
926  void slotPasteViewAndWindow( );
927 
929  void slotSetView( QString view );
930 
932  void slotSetViewAndWindowGeometry( QString view );
933 
935  void slotCopyView( );
936 
938  void slotViewerDrawMenu( QAction * _action );
939 
941  void slotPostProcessorMenu( QAction * _action);
942 
944  void slotRenderMenu( QAction * _action);
945 
948 
950  void slotExaminerSnapshot();
951 
953  void slotSwitchWheels(bool _state);
954 
956  void slotSwitchNavigation(bool _egomode);
957 
959  void slotSnapshotName();
960 
962  void slotCoordSysVisibility(bool _visible);
963 
964  private :
969  void updatePopupMenu(const QPoint& _point);
970 
971  void updatePopupMenuCoordsysNode(QMenu* _menu , const int _part);
972  void updatePopupMenuObject(QMenu* _menu , BaseObjectData* _object );
973  void updatePopupMenuBackground(QMenu* _menu , const QPoint& _point);
974  void updatePopupMenuNode(QMenu* _menu , ACG::SceneGraph::BaseNode* _node);
975 
976  bool addContextMenus( QMenu* _menu , ContextMenuType _type, int _id = -1);
977 
978  private :
980  QMenu* contextMenu_;
981 
984 
986  std::vector< MenuInfo > contextMenus_;
987 
989  QActionGroup* drawGroupViewer_;
990 
993 
996 
1000 
1003  //===========================================================================
1006  //===========================================================================
1007 
1008  private:
1009 
1010  QString snapshotName_;
1012 
1013  public slots:
1014 
1016  void viewerSnapshotDialog();
1017 
1019  void viewerSnapshot();
1020 
1023 
1025  void applicationSnapshot();
1026 
1028  void applicationSnapshotName(QString _name);
1029 
1031  void viewerSnapshot(QString file_name, bool store_comments,
1032  bool comments_visible_only, bool comments_targeted_only,
1033  bool store_material_info, int snapshot_width, int snapshot_height,
1034  bool snapshot_transparent, bool hide_coord_sys,
1035  int snapshot_multisampling, bool store_view);
1036 
1039  //===========================================================================
1042  //===========================================================================
1043 
1044  public:
1045 
1046  void writeImageAsynchronously(QImage* _image, const QString _name);
1047 
1048  private:
1049 
1050  // Store pointers to QFuture and QFutureWatcher
1051  std::map<QFutureWatcher<void>*,QFuture<void>*> watcher_garbage_;
1052 
1053  // Mutex for operations on map
1054  QMutex map_mutex_;
1055 
1056  private slots:
1057 
1058  void delete_garbage();
1059 
1062  //===========================================================================
1065  //===========================================================================
1066 
1067  private slots:
1068  void slotGetStackWidget( QString _name, QWidget*& _widget );
1069  void slotAddStackWidget( QString _name, QWidget* _widget );
1070  void slotUpdateStackWidget( QString _name, QWidget* _widget );
1071 
1072  void slotViewMenuAction( QAction * _action);
1073 
1074  void slotUpdateStackMenu();
1075 
1076 
1077  private :
1079  QMenu* stackMenu_;
1080 
1081  std::vector< StackWidgetInfo > stackWidgetList_;
1082 
1083  public :
1085  QStackedWidget* stackedWidget_;
1086 
1089  //===========================================================================
1092  //===========================================================================
1093 
1094  private:
1095  static const QString homePage_;
1096 
1097  public slots:
1099  void showHelpBrowser(const QString &page = homePage_);
1100 
1101  signals:
1102  void changeHelpSite(QUrl);
1103 
1104  private:
1107 
1110  //===========================================================================
1113  //===========================================================================
1114 
1115 
1116  public slots:
1117 
1118  void slotShowPostProcessorManager();
1119 
1120  private:
1121  PostProcessorDialog* postProcessorDialog_;
1122 
1125  //===========================================================================
1128  //===========================================================================
1129 
1130 
1131  public slots:
1132 
1134  void slotShowRenderManager();
1135 
1138 
1139  private:
1142 
1145  //===========================================================================
1148  //===========================================================================
1149 
1150  public slots:
1152  void stereoButtonContextMenu(const QPoint& _pos);
1153 
1157  void slotApplyStereoSettings(int _tmpParam = 0);
1158 
1159 
1160  private:
1163 
1166  //===========================================================================
1169  //===========================================================================
1170 
1171  public slots:
1173  void showAboutWidget();
1174 
1180  void addAboutInfo(QString _text, QString _tabName );
1181 
1182  private:
1187  void addCoreLicenseInfo();
1188 
1189  private:
1192 
1194  QMap<QString,QString> additionalAboutTabs_;
1195 
1198  //===========================================================================
1201  //===========================================================================
1202 
1203  public slots:
1205  void showOptionsWidget();
1206 
1207  signals:
1208  void applyOptions();
1209  void saveOptions();
1210 
1211  private:
1212 
1215 
1218  //===========================================================================
1221  //===========================================================================
1222  private slots:
1224  void slotAddToolbar(QToolBar* _toolbar);
1225 
1227  void slotRemoveToolbar(QToolBar* _toolbar);
1228 
1230  void getToolBar( QString _name, QToolBar*& _toolbar);
1231 
1232  private :
1233  QToolBar* mainToolbar_;
1234 
1235  std::vector< QToolBar* > toolbars_;
1236 
1239  //===========================================================================
1242  //===========================================================================
1243  public slots:
1244  void statusMessage(QString _message, int _timeout = 0);
1245 
1246  void clearStatusMessage();
1247 
1248  void setStatus( ApplicationStatus::applicationStatus _status);
1249 
1250  void addWidgetToStatusbar(QWidget* _widget);
1251 
1252  private:
1253  void setupStatusBar();
1254 
1255  private :
1256  ColorStatusBar* statusBar_;
1257 
1258  QLabel* statusIcon_;
1259 
1262  //===========================================================================
1265  //===========================================================================
1266 
1267  signals:
1268  void dragOpenFile(QString _filename);
1269 
1270  private slots:
1271  void startDrag( QMouseEvent* _event );
1272 
1273  void dragEnterEvent(QDragEnterEvent* _event);
1274 
1275  void dropEvent( QDropEvent* _event );
1276 
1279  private :
1280 
1281  std::vector<PluginInfo>& plugins_;
1282 
1283 
1284  //===========================================================================
1287  //===========================================================================
1288 
1289  private slots:
1290 
1292  void slotToggleStereoMode();
1293 
1296 
1299 
1300 
1301 
1303  void slotContextHomeView();
1304 
1306  void slotGlobalHomeView();
1307 
1308 
1309 
1311  void slotContextSetHomeView();
1312 
1314  void slotGlobalSetHomeView();
1315 
1316 
1317 
1319  void slotContextViewAll();
1320 
1322  void slotGlobalViewAll();
1323 
1324 
1327 
1330 
1333 
1336 
1339 
1340 
1342  void slotSetViewingDirection(QAction* _action);
1343 
1345  void slotLockRotation(bool _lock);
1346 
1347 
1348 
1351 
1353  void slotGlobalChangeAnimation(bool _animation);
1354 
1356  void slotLocalChangeAnimation(bool _animation);
1357 
1358 
1359 
1362 
1364  void slotGlobalChangeBackFaceCulling(bool _backFaceCulling);
1365 
1367  void slotLocalChangeBackFaceCulling(bool _backFaceCulling);
1368 
1369 
1370 
1373 
1375  void slotGlobalChangeTwoSidedLighting(bool _lighting);
1376 
1378  void slotLocalChangeTwoSidedLighting(bool _lighting);
1379 
1380 
1381 
1384 
1386  void slotGlobalChangeMultisampling(bool _multisampling);
1387 
1389  void slotLocalChangeMultisampling(bool _multisampling);
1390 
1391 
1394 
1396  void slotGlobalChangeMipmapping(bool _multisampling);
1397 
1399  void slotLocalChangeMipmapping(bool _mipmapping);
1400 
1401 
1403  void moveBack();
1404 
1406  void moveForward();
1407 
1409  void strafeLeft();
1410 
1412  void strafeRight();
1413 
1414  signals :
1418  void drawModeChanged(int _viewerId);
1419 
1420  private :
1422 
1425  //===========================================================================
1428  //===========================================================================
1429 
1430  public slots:
1431 
1432  bool examineMode() { return(actionMode_ == Viewer::ExamineMode ); };
1433  bool pickingMode() { return(actionMode_ == Viewer::PickingMode ); };
1434  bool lightMode() { return(actionMode_ == Viewer::LightMode ); };
1435  bool questionMode(){ return(actionMode_ == Viewer::QuestionMode ); };
1436 
1440  void setExamineMode() { setActionMode(Viewer::ExamineMode ); };
1441  void setPickingMode() { setActionMode(Viewer::PickingMode ); };
1442  void setQuestionMode(){ setActionMode(Viewer::QuestionMode ); };
1443 
1444  void setActionMode(const Viewer::ActionMode _am);
1445  void getActionMode(Viewer::ActionMode& _am);
1446 
1447  public:
1448  Viewer::ActionMode actionMode() { return actionMode_; };
1449  Viewer::ActionMode lastActionMode() { return lastActionMode_; };
1450 
1451  private :
1452  Viewer::ActionMode actionMode_, lastActionMode_;
1453 
1456  //===========================================================================
1459  //===========================================================================
1460 
1461  public:
1462 
1471  void addPickMode(const std::string& _name,
1472  bool _mouse_tracking = false,
1473  int _pos = -1,
1474  bool _visible = true,
1475  QCursor _cursor = Qt::ArrowCursor );
1476 
1479  void clearPickModes();
1480 
1483  const std::string& pickMode() const;
1484 
1488  void pickMode( int _id );
1489 
1490  void expandToolBoxWidget(QWidget *widget, bool expand);
1491 
1492  public slots:
1493 
1497  void setPickMode(const std::string& _name);
1498 
1499 
1500  void getPickMode(std::string& _name);
1501 
1503  void setActivePickToolBar(QToolBar* _tool);
1504 
1506  void hidePickToolBar();
1507 
1508  public slots:
1509 
1515  void setPickModeCursor(const std::string& _name, QCursor _cursor);
1516 
1522  void setPickModeMouseTracking(const std::string& _name, bool _mouseTracking);
1523 
1531  void setPickModeToolbar( const std::string& _mode , QToolBar * _toolbar );
1532 
1539  void removePickModeToolbar( const std::string& _mode );
1540 
1541  void actionPickMenu( QAction * _action );
1542 
1543  signals:
1546  void signalPickModeChanged(const std::string&);
1547 
1548  private:
1549 
1550  QMenu* pickMenu_;
1551 
1554  std::vector<PickMode> pick_modes_;
1555 
1558  std::string pick_mode_name_;
1559 
1563 
1567  std::vector<QAction*> extended_actions;
1568 
1569 
1571  void updatePickMenu();
1572 
1573  private slots:
1574 
1575  void hidePopupMenus();
1577 };
1578 
1579 
1580 //=============================================================================
1581 #endif // COREWIDGET_HH defined
1582 //=============================================================================
1583 
void removePickModeToolbar(const std::string &_mode)
Removes the additional toolbar of the given PickMode.
Definition: picking.cc:461
void resizeApplication(int _width, int _height)
resize the whole Application
Definition: Core.cc:1491
void slotSetViewMode(QAction *action)
Slot for setting ViewMode from Menu.
Definition: viewMode.cc:311
void drawModeChanged(int _viewerId)
The viewer with id _viewerId changed its draw Mode.
void updatePopupMenuObject(QMenu *_menu, BaseObjectData *_object)
Update popup Menu when an object has been clicked on.
Definition: ContextMenu.cc:507
bool tracking() const
PickMode mouse tracking.
Definition: CoreWidget.cc:107
void slotContextSetHomeView()
Set the active viewers home position.
void moveToolBoxToBottom(QString _name)
Move a specific toolbox widget to the bottom of the side area.
Definition: viewMode.cc:457
void slotAddStackWidget(QString _name, QWidget *_widget)
QMenu containing the recently opened files.
Definition: StackWidget.cc:85
void getActionMode(Viewer::ActionMode &_am)
Definition: picking.cc:158
void dropEvent(QDropEvent *_event)
Definition: dragAndDrop.cc:148
void PluginKeyReleaseEvent(QKeyEvent *)
QMap< QString, QString > additionalAboutTabs_
Additional tab information, that could be provided by plugins.
Definition: CoreWidget.hh:1194
void updateContextMenuBackground()
tells the plugins to update their context menu when the background is picked
static const QString homePage_
Pointer to the help Browser.
Definition: CoreWidget.hh:1095
void slotAddViewModeToolboxes(QString _mode, QStringList _usedWidgets)
Add or change Toolboxes for a ViewMode (non-userdefined viewMode)
Definition: viewMode.cc:99
void slotSetContextBackgroundColor()
Set Background Color for one viewer.
QAction * orthogonalProjectionAction_
This variable holds the global draw menu.
Definition: CoreWidget.hh:870
void changeHelpSite(QUrl)
Pointer to the help Browser.
void addCoreLicenseInfo()
Add license information about core parts.
void clearAll()
Clear all data objects.
Definition: Core.cc:987
void registerCoreKeys()
Register all events related to the core.
Definition: keyHandling.cc:508
void slotAddMenubarActions(std::vector< QAction * > _actions, QString _name)
File Menu.
Definition: MenuBar.cc:88
QSize defaultIconSize()
Show logger in splitter or not.
void slotApplyStereoSettings(int _tmpParam=0)
Definition: viewMode.cc:484
void slotLocalChangeBackFaceCulling(bool _backFaceCulling)
Set backface culling for active viewer.
void slotLocalChangeMultisampling(bool _multisampling)
Set multisampling for active viewer.
QtGLGraphicsView * glView_
graphics view that holds the gl scene
Definition: CoreWidget.hh:705
QMenu * coordSysMenu_
Definition: CoreWidget.hh:999
ACG::SceneGraph::DrawModes::DrawMode activeDrawModes_
This variable holds the global draw menu.
Definition: CoreWidget.hh:887
void hidePopupMenus()
Definition: picking.cc:345
void addPickMode(const std::string &_name, bool _mouse_tracking=false, int _pos=-1, bool _visible=true, QCursor _cursor=Qt::ArrowCursor)
add pick mode
Definition: picking.cc:389
void viewerSnapshotDialog()
Create a snapshot of the whole app with fileDialog.
CursorPainter * cursorPainter_
Cursor handling.
Definition: CoreWidget.hh:742
Logtype
Log types for Message Window.
int snapshotCounter_
Create a snapshot of the whole app with fileDialog.
Definition: CoreWidget.hh:1011
QWidgetAction * viewModeChangePopupAction_
Handle to picking toolbar.
Definition: CoreWidget.hh:748
void setPickingMode()
Definition: CoreWidget.hh:1441
void setActivePickToolBar(QToolBar *_tool)
Set toolbar to be active pick toolbar.
Definition: picking.cc:185
void setPickModeToolbar(const std::string &_mode, QToolBar *_toolbar)
Set the additional toolbar of the given PickMode.
Definition: picking.cc:442
QMap< QString, QMenu * > menus_
All available menus.
Definition: CoreWidget.hh:801
void slotCoordSysVisibility(bool _visible)
Hide coordinate systems in all viewers.
std::string name_
Name of the pickMode.
Definition: CoreWidget.hh:263
QActionGroup * drawGroupViewer_
DrawGroup for per Viewer Draw Modes.
Definition: CoreWidget.hh:989
QMenu * viewMenu_
View Menu.
Definition: CoreWidget.hh:792
QToolBar * toolbar_
Definition: CoreWidget.hh:279
void applicationSnapshotDialog()
Create a snapshot of the whole app with fileDialog.
void slotPostProcessorMenu(QAction *_action)
Called when a different post processor has been chosen.
Definition: ContextMenu.cc:904
void expandToolBoxWidget(QWidget *widget, bool expand)
Definition: picking.cc:487
void startVideoCapture(QString _baseName, int _fps, bool _captureViewers)
Start video capturing.
Definition: Video.cc:69
QToolBar * mainToolbar_
Called by Plugins to add a Toolbar.
Definition: CoreWidget.hh:1233
applicationStatus
Enum for the statusBar Status Icon.
void slotShowRenderObjectWidget()
Shows the widget containing the current render objects.
void slotAddViewModeContextMenus(QString _mode, QStringList _usedToolbars)
Add or change Toolbars for a ViewMode (non-userdefined viewMode)
Definition: viewMode.cc:200
QActionGroup * rendererGroup_
Group for all renderers.
Definition: CoreWidget.hh:864
SideArea * getToolbox()
Show logger in splitter or not.
Definition: CoreWidget.hh:504
QtGLGraphicsScene * glScene_
graphics scene used to paint gl context and widgets
Definition: CoreWidget.hh:702
void dragEnterEvent(QDragEnterEvent *_event)
Definition: dragAndDrop.cc:134
void setForceNativeCursor(bool _state)
Use native or gl painted cursor.
Definition: CoreWidget.cc:1109
void resizeViewers(int _width, int _height)
resize the examinerViewer
Definition: Core.cc:1480
void updateContextMenuNode(int)
tells the plugins to update their context menu when a node is picked
SideArea * toolBox_
Toolbox.
Definition: CoreWidget.hh:726
void slotLog(Logtype _type, QString _message)
Slot writing everything to the Logger widget.
QMenu * rendererMenu_
This variable holds the global renderer menu.
Definition: CoreWidget.hh:859
void showToolBar(bool _state)
Show or hide toolbar, emits toolBarToggled( bool _state )
Definition: CoreWidget.cc:808
void saveOptions()
Pointer to the OptionsWidget.
void statusBarVisChanged(bool _state)
will be emitted if the visibility of the statusbar is changed
void setFullscreen(bool _state)
Enable or disable fullscreen mode.
Definition: CoreWidget.cc:715
QMenu * windowMenu_
Window Menu.
Definition: CoreWidget.hh:693
RendererDialog * rendererDialog_
shows the widget for the rendermanager
Definition: CoreWidget.hh:1140
QSplitter * toolSplitter_
Spliter between toplevel objects and toolbox.
Definition: CoreWidget.hh:723
void slotSwitchNavigation(bool _egomode)
Switch navigation mode.
void updateRecent()
Update the recent files menu.
Definition: CoreWidget.cc:907
void strafeLeft()
When using first person mode strafe to the left.
void slotViewModeDialog()
Show a dialog in which the viewMode can be edited.
Definition: viewMode.cc:327
void showViewModeControls(bool _show)
Hide or show the View Mode controls.
Definition: CoreWidget.cc:733
QToolButton * questionButton_
Called by Plugins to add a Toolbar.
Definition: CoreWidget.hh:817
void slotShowRenderManager()
shows the widget for the rendermanager
void registerKey(int _key, Qt::KeyboardModifiers _modifiers, QString _description, bool _multiUse=false)
internal signal to register CoreWidget keys
void slotCustomContextMenu(const QPoint &_point)
This slot is called by the examiner widgets gl area when a context menu is requested.
Definition: ContextMenu.cc:66
void setPickModeMouseTracking(const std::string &_name, bool _mouseTracking)
set mouseTracking for the pick mode
Definition: picking.cc:425
void closeEvent(QCloseEvent *event)
Called on applications close.
Definition: CoreWidget.cc:936
ProjectionMode
projection mode
Definition: CoordsysNode.hh:93
void slotUpdateViewerDrawMenu()
Creates a draw Menu for the currently active Viewer.
Definition: ContextMenu.cc:810
QMenu * viewModeMenu_
Submenu holding all ViewMode actions.
Definition: CoreWidget.hh:584
void slotSetViewModeIcon(QString _mode, QString _iconName)
Sets the Icon for a given View Mode (non-userdefined viewMode)
Definition: viewMode.cc:247
QAction * globalMultisamplingAction_
Action to globally set multisampling.
Definition: CoreWidget.hh:882
void slotViewMenuAboutToShow()
Called before the view Menu is shown.
Definition: MenuBar.cc:641
Viewer::ActionMode lastActionMode_
Definition: CoreWidget.hh:1449
Definition: Core.hh:139
void slotChangeView(QString _mode, QStringList _toolboxWidgets, QStringList _toolbars, QStringList _contextmenus, bool _expandAll=false)
Slot for Changing visible toolWidgets.
Definition: viewMode.cc:347
AboutWidget * aboutWidget_
Pointer to the about widget.
Definition: CoreWidget.hh:1191
void addAboutInfo(QString _text, QString _tabName)
Adds an entry to the about dialog.
Definition: About.cc:87
QActionGroup * drawGroup_
This variable holds the global draw menu.
Definition: CoreWidget.hh:861
void slotGlobalHomeView()
Set the viewer to home position.
void coreKeyReleaseEvent(QKeyEvent *_e)
if a keyReleaseEvent belongs to the core this functions is called
Definition: keyHandling.cc:658
void slotToggleStereoMode()
Enable or disable Stereo.
LoggerWidget * logWidget_
Textedit at the bottom for log messages.
Definition: CoreWidget.hh:678
bool questionMode()
Definition: CoreWidget.hh:1435
void showOptionsWidget()
Display the Options Browser.
Definition: CoreWidget.cc:940
void showLogger(OpenFlipper::Options::LoggerState _state)
Change visibility of the logger.
PickToolBarMap curPickingToolbarItems_
Handle to picking toolbar.
Definition: CoreWidget.hh:733
void slotUpdateExaminer(unsigned _id)
update the content of the specified examiner
Definition: viewMode.cc:510
void slotUpdateGlobalDrawMenu()
Setup and update the global draw menu.
Definition: MenuBar.cc:829
void toolBoxVisChanged(bool _state)
will be emitted if the visibility of the toolbox is changed
void setViewerLayout(int _idx)
Change viewer layout that was selected in the combo box.
Definition: CoreWidget.cc:1006
void slotGlobalChangeMipmapping(bool _multisampling)
Set mipmapping for all viewers.
QtMultiViewLayout * baseLayout_
Base layout that holds gl views.
Definition: CoreWidget.hh:711
QAction * perspectiveProjectionAction_
This variable holds the global draw menu.
Definition: CoreWidget.hh:869
void showReducedMenuBar(bool reduced)
typedefs
Definition: MenuBar.cc:153
void menuBarVisChanged(bool _state)
will be emitted if the visibility of the menubar is changed
void getPickMode(std::string &_name)
Definition: picking.cc:179
std::vector< QAction * > extended_actions
Definition: CoreWidget.hh:1567
std::multimap< std::pair< int, Qt::KeyboardModifiers >, std::pair< QObject *, int > > KeyMap
typedefs
Definition: CoreWidget.hh:369
void slotRemoveViewMode(QString _name)
Remove viewMode.
Definition: viewMode.cc:293
void slotUpdateStackMenu()
QMenu containing the recently opened files.
Definition: StackWidget.cc:149
bool eventFilter(QObject *_obj, QEvent *_event)
typedefs
Definition: MenuBar.cc:137
QMenu * stackMenu_
QMenu containing the recently opened files.
Definition: CoreWidget.hh:1079
void stopVideoCapture()
Stop video capturing.
Definition: Video.cc:110
void call(QString _expression, bool &_success)
call a scripting function
void toggleLogger()
Hide or show logging area.
QGraphicsWidget * centerWidget_
center widged
Definition: CoreWidget.hh:708
void slotGlobalChangeMultisampling(bool _multisampling)
Set multisampling for all viewers.
void slotGlobalToggleMipmapping()
If mipmapping is disabled in all viewers, enable it in all viewers. Otherwise disable it...
void slotSetViewingDirection(QAction *_action)
Change the viewing direction from context-menu.
void toggleFullscreen()
Set application to Fullscreen and back.
Definition: CoreWidget.cc:703
void slotExaminerSnapshot()
Create a snapshot of the last active examiner.
void updatePopupMenuNode(QMenu *_menu, ACG::SceneGraph::BaseNode *_node)
Update context Menu when an arbitrary node has been clicked on.
Definition: ContextMenu.cc:97
void slotActivateExaminer()
Definition: CoreWidget.cc:1087
Viewer::ActionMode lastActionMode()
Definition: CoreWidget.hh:1449
void nextViewerLayout()
Switches over to the next view mode.
Definition: CoreWidget.cc:967
QString snapshotName_
Create a snapshot of the whole app with fileDialog.
Definition: CoreWidget.hh:1010
void setExamineMode()
Definition: CoreWidget.hh:1440
QAction * fileMenuEnd_
First entry after all relevant parts of the File Menu.
Definition: CoreWidget.hh:798
void slotAddToolbar(QToolBar *_toolbar)
Called by Plugins to add a Toolbar.
void coreKeyPressEvent()
handle key events for the core
The Menu will be shown when the background was picked.
void slotRegisterKey(int _key, Qt::KeyboardModifiers _modifiers, QString _description, bool _multiUse=false)
key registration
Definition: keyHandling.cc:212
void slotAddKeyMapping(int _key, Qt::KeyboardModifiers _modifiers, QObject *_plugin, int _keyBindingID)
add a new key Mapping
Definition: keyHandling.cc:336
QWidget * getToolboxArea()
Show logger in splitter or not.
Definition: CoreWidget.hh:503
void dragOpenFile(QString _filename)
QWidget * toolBoxArea_
Widget for toolBox.
Definition: CoreWidget.hh:717
void initViewModes()
init ViewModes that were loaded via ini-file
Definition: viewMode.cc:60
QStringList visibleContextMenus
List of context Menus in this view mode.
Definition: CoreWidget.hh:148
void saveKeyBindings(INIFile &_ini)
Store current key assignments to a given INI file.
Definition: keyHandling.cc:459
Class for the handling of simple configuration files.
Definition: INIFile.hh:105
void viewerSnapshot()
Create a snapshot of the whole app.
void showToolbox(bool _state)
Show or hide toolbox.
Definition: CoreWidget.cc:774
virtual void keyReleaseEvent(QKeyEvent *_e)
passes keyReleaseEvents to either the Core or a Plugin depending on who has registered the key ...
Definition: keyHandling.cc:155
bool custom
Is this a user defined custom view mode or a plugin generated one.
Definition: CoreWidget.hh:139
QCursor cursor_
Definition: CoreWidget.hh:275
QMenu * fileMenu_
File Menu.
Definition: CoreWidget.hh:789
QMenu * algorithmMenu_
Algorithms Menu.
Definition: CoreWidget.hh:687
std::vector< PluginInfo > plugins_
List of all loaded plugins_.
Definition: Core.hh:1208
void slotContextViewAll()
Change view on active viewer to view complete scene.
HelpWidget * helpWidget_
Pointer to the help Browser.
Definition: CoreWidget.hh:1106
void updatePopupMenuCoordsysNode(QMenu *_menu, const int _part)
Update context Menu when Coordsys node has been clicked on.
Definition: ContextMenu.cc:119
void applicationSnapshot()
Create a snapshot of the whole app.
void setPickModeCursor(const std::string &_name, QCursor _cursor)
set a new cursor for the pick mode
Definition: picking.cc:410
void log(Logtype _type, QString _message)
Logg with OUT,WARN or ERR as type.
QString name
Name of the View Mode.
Definition: CoreWidget.hh:132
ACG::SceneGraph::CoordsysNode::ProjectionMode getCoordsysProjection()
Toggle coordsys projection mode of the active viewer.
bool tracking_
Definition: CoreWidget.hh:267
void showStatusBar(bool _state)
Show or hide status bar.
Definition: StatusBar.cc:161
void slotGlobalDrawMenu(QAction *_action)
Called when the global drawMode is selected.
Definition: MenuBar.cc:914
void slotGlobalToggleMultisampling()
If multisampling is disabled in all viewers, enable it in all viewers. Otherwise disable it...
QStringList visibleToolboxes
List of Visible Toolboxes in this view mode.
Definition: CoreWidget.hh:142
QSplitter * splitter_
Spliter between toplevel objects and the textedit at the bottom.
Definition: CoreWidget.hh:672
void slotAddMenubarAction(QAction *_action, QString _name)
File Menu.
Definition: MenuBar.cc:67
void setActionMode(const Viewer::ActionMode _am)
Definition: picking.cc:68
QMenu * globalDrawMenu_
This variable holds the global draw menu.
Definition: CoreWidget.hh:856
Implementation of the logger Widget.
Definition: loggerWidget.hh:70
QToolBar * pickToolBarExternal_
Extra toolbar not in scene for picking.
Definition: CoreWidget.hh:736
int pick_mode_idx_
Definition: CoreWidget.hh:1562
void slotGlobalSetHomeView()
Set the home position for all viewers.
void setViewMode(QString _mode, bool _expandAll=false)
Set the view Mode to the given Mode.
Definition: viewMode.cc:316
void stereoButtonContextMenu(const QPoint &_pos)
Creates custom context menu for stereo viewer settings.
Definition: viewMode.cc:462
Struct containing information about pickModes.
Definition: CoreWidget.hh:184
void toggleStatusBar()
Change visibility of the Status Bar.
Definition: StatusBar.cc:150
std::pair< KeyMap::iterator, KeyMap::iterator > KeyRange
typedefs
Definition: CoreWidget.hh:371
QGLWidget * glWidget_
gl widget used as drawing area to paint the graphics scene
Definition: CoreWidget.hh:699
void setToolBoxOrientationOnTheRight(bool _toolBoxRight)
Set orientation of tool box (either on the right or the left side of the screen)
Definition: CoreWidget.cc:853
QList< SlotInfo > & coreSlots_
list of scripting slots from core
Definition: CoreWidget.hh:400
void hidePickToolBar()
Hide picking toolbar.
Definition: picking.cc:266
std::set< QToolBar * > registeredToolbars_
Store all toolbars that once have been registered.
Definition: CoreWidget.hh:739
QtSlideWindow * slidingLogger_
Class that holds the animated log widget.
Definition: CoreWidget.hh:714
RendererObjectWidget * rendererObjectWidget_
shows the widget for the rendermanager
Definition: CoreWidget.hh:1141
void showAboutWidget()
Display the about widget.
Definition: About.cc:91
PickMode(const std::string &_n, const bool _t, const bool _v, QCursor _c, QToolBar *_tb=0)
Constructor.
Definition: CoreWidget.cc:81
std::string name() const
PickMode Name.
Definition: CoreWidget.cc:99
viewModeChangeWidget * modeChangeWidget
Handle to picking toolbar.
Definition: CoreWidget.hh:750
void showLoggerInSplitView(bool _show)
Show logger in splitter or not.
QMenu * pickMenu_
Definition: CoreWidget.hh:1550
void slotGlobalToggleTwoSidedLighting()
If two-sided lighting is disabled in all viewers, enable it in all viewers. Otherwise disable it...
ContextMenuType type
Type of the context Menu ( Context for what type .. Background,Object,Node)
Definition: CoreWidget.hh:176
QStackedWidget * stackedWidget_
Container widget for holding multiple views.
Definition: CoreWidget.hh:1085
QActionGroup * viewGroup_
Group for all menu items.
Definition: CoreWidget.hh:867
QMenu * toolsMenu_
Tools Menu.
Definition: CoreWidget.hh:795
bool shiftPressed_
Store the state of the shift key.
Definition: CoreWidget.hh:436
void actionPickMenu(QAction *_action)
Definition: picking.cc:329
void closeChangeViewModePopup()
Closes the change view mode popup.
Definition: viewMode.cc:340
QString getRPCName(QObject *_plugin)
typedefs
Definition: keyHandling.cc:69
void slotUpdateRendererMenu()
Setup and update the global renderer menu.
Definition: MenuBar.cc:760
void addRecent(QString _filename, DataType _type)
Add a recent file and update menu.
Definition: CoreWidget.cc:893
void slotLockRotation(bool _lock)
Lock rotation in current examiner widget.
bool examineMode()
Definition: CoreWidget.hh:1432
QString icon
Definition: CoreWidget.hh:136
void slotRegisterSlotKeyBindings()
register scripting slots to allow keyBindings
Definition: keyHandling.cc:289
~CoreWidget()
destructor
Definition: CoreWidget.cc:694
void showMenuBar(bool _state)
Show or hide menubar.
Definition: CoreWidget.cc:791
std::string pick_mode_name_
Definition: CoreWidget.hh:1558
bool visible() const
PickMode visible.
Definition: CoreWidget.cc:95
void slotShowSceneGraphDialog()
Definition: CoreWidget.cc:1038
void updatePickMenu()
update pick mode menu
Definition: picking.cc:287
ACG::SceneGraph::DrawModes::DrawMode availableGlobalDrawModes_
This variable holds the global draw menu.
Definition: CoreWidget.hh:889
void moveForward()
When using first person mode move forward.
OpenFlipper::Options::LoggerState loggerState_
Show logger in splitter or not.
Definition: CoreWidget.hh:560
ViewMode struct This struct contains a ViewMode and its status information such as used widgets...
Definition: CoreWidget.hh:129
void updatePopupMenuBackground(QMenu *_menu, const QPoint &_point)
Update context Menu when background has been clicked on.
Definition: ContextMenu.cc:457
void startDrag(QMouseEvent *_event)
Definition: dragAndDrop.cc:73
bool stereoActive_
The viewer with id _viewerId changed its draw Mode.
Definition: CoreWidget.hh:1421
void moveToolBoxToTop(QString _name)
Move a specific toolbox widget to the top of the side area.
Definition: viewMode.cc:452
~PickMode()
Destructor.
Definition: CoreWidget.hh:191
bool lightMode()
Definition: CoreWidget.hh:1434
KeyMap keys_
mapping of all keys to registered keys and the corresponding plugins
Definition: CoreWidget.hh:394
void slotGlobalViewAll()
Change view on all viewers to view complete scene.
void slotGlobalChangeAnimation(bool _animation)
Set the animation mode for all viewers.
void slotRemoveToolbar(QToolBar *_toolbar)
Called by Plugins to remove a Toolbar.
void slotGlobalOrthographicProjection()
Toggle projection mode of all viewers to orthographic projection.
void applicationSnapshotName(QString _name)
Set the snapshot name.
ACG::QtWidgets::QtSceneGraphDialog * sceneGraphDialog_
Handle to picking toolbar.
Definition: CoreWidget.hh:746
QAction * action
The context item.
Definition: CoreWidget.hh:170
void slotSetViewAndWindowGeometry(QString view)
Set the supplied serialized view.
QToolButton * pickButton_
Called by Plugins to add a Toolbar.
Definition: CoreWidget.hh:816
QMenu * contextMenu_
context Menu for the gl area
Definition: CoreWidget.hh:980
void slotLocalChangeTwoSidedLighting(bool _lighting)
Set two-sided lighting for active viewer.
void toggleToolbox()
Hide or show toolbox area.
Definition: CoreWidget.cc:762
void toolBarVisChanged(bool _state)
will be emitted if the visibility of the toolbar is changed
QCursor cursor() const
PickMode cursor.
Definition: CoreWidget.cc:115
std::vector< QToolBar * > toolbars_
Called by Plugins to add a Toolbar.
Definition: CoreWidget.hh:1235
void slotViewMenuAction(QAction *_action)
QMenu containing the recently opened files.
Definition: StackWidget.cc:128
void PluginKeyEvent(QKeyEvent *)
void slotAddContextItem(QAction *_entry, ContextMenuType _type)
called by plugins to add a new context menu item
Definition: ContextMenu.cc:754
QAction * globalTwosidedLightingAction_
Action to globally set two-sided lighting.
Definition: CoreWidget.hh:879
bool event(QEvent *event)
typedefs
Definition: CoreWidget.cc:1116
bool visible_
Definition: CoreWidget.hh:271
KeyBinding getKeyBinding(QObject *_plugin, int _keyIndex)
typedefs
Definition: keyHandling.cc:56
QMenu * helpMenu_
Help Menu.
Definition: CoreWidget.hh:690
QWidget * viewerDrawMenuWidget_
owns all the checkboxes of viewerDrawMenu_
Definition: CoreWidget.hh:995
void slotAddViewModeComplete(QString _mode, bool _custom, QStringList _toolboxes, QStringList _toolbars, QStringList _contextmenus)
Completly configure a view mode ( set toolbars, toolboxes, context menus, ... )
Definition: viewMode.cc:320
Viewer::ActionMode actionMode_
Definition: CoreWidget.hh:1449
void toggleToolBar()
Hide or show current toolbar.
Definition: CoreWidget.cc:844
QScrollArea * toolBoxScroll_
Toolbox scroll area.
Definition: CoreWidget.hh:729
QMenu * recentFilesMenu_
QMenu containing the recently opened files.
Definition: CoreWidget.hh:684
bool pickingMode()
Definition: CoreWidget.hh:1433
void updateContextMenu(int)
tells the plugins to update their context menu when an object is picked
void getToolBar(QString _name, QToolBar *&_toolbar)
Called by Plugins to get access to specific Toolbars by name.
QToolButton * viewModePopupBtn_
view mode gear icon at the upper left of the tool box
Definition: CoreWidget.hh:720
void slotAddContextItemToViewMode(QAction *_entry)
called by slotAddContextItem to add the item to the view mode
Definition: ContextMenu.cc:773
DataType contextType
Type of objects for which the context Menu should be visible.
Definition: CoreWidget.hh:173
const std::string & pickMode() const
Definition: picking.cc:492
void slotContextSwitchProjection()
Toggle projection mode of the active viewer.
void signalPickModeChanged(const std::string &)
void clearPickModes()
Definition: picking.cc:476
std::vector< StackWidgetInfo > stackWidgetList_
QMenu containing the recently opened files.
Definition: CoreWidget.hh:1081
QAction * globalAnimationAction_
Action to globally set animation.
Definition: CoreWidget.hh:873
void updateInSceneLoggerGeometry()
Set in-scene logger geometry right.
void slotPasteView()
Paste the view to the last active examiner.
void slotSetGlobalBackgroundColor()
Set Background Color for all viewers at once.
int originalLoggerSize_
Size of the logging window ( defaults to 240 )
Definition: CoreWidget.hh:681
void slotContextSwitchCoordsysProjection()
Toggle coordsys projection mode of the active viewer.
QAction * viewModeButton_
a List of all widgets in the toolbar
Definition: CoreWidget.hh:581
QAction * globalBackfaceCullingAction_
Action to globally set backface culling.
Definition: CoreWidget.hh:876
void slotGlobalRendererMenu(QAction *_action)
Called when the global renderer is selected.
Definition: MenuBar.cc:888
Viewer::ActionMode actionMode()
Definition: CoreWidget.hh:1448
QStringList visibleToolbars
List of Toolbars in this view mode.
Definition: CoreWidget.hh:145
QMenu * contextSelectionMenu_
Context Menu containing all selection elements.
Definition: CoreWidget.hh:983
void moveBack()
When using first person mode move backward.
void loadPlugin(const QString &_filename, const bool _silent, QString &_licenseErrors, QObject *_plugin=0)
Function for loading Plugins.
void slotSetView(QString view)
Set the supplied serialized view.
void strafeRight()
When using first person mode strafe to the right.
void slotGetStackWidget(QString _name, QWidget *&_widget)
QMenu containing the recently opened files.
Definition: StackWidget.cc:73
std::vector< PickMode > pick_modes_
Definition: CoreWidget.hh:1554
QVector< ViewMode * > & viewModes_
List of currently available viewModes.
Definition: CoreWidget.hh:577
std::vector< MenuInfo > contextMenus_
All real context menu entries.
Definition: CoreWidget.hh:986
Predefined datatypes.
Definition: DataTypes.hh:96
void slotPasteViewAndWindow()
Paste the view, the window and toolbox size to the last active examiner.
void showHelpBrowser(const QString &page=homePage_)
Display the help Browser.
Definition: Help.cc:71
void loadKeyBindings(INIFile &_ini)
Load key assignments from a given INI file.
Definition: keyHandling.cc:402
void slotGlobalPerspectiveProjection()
Toggle projection mode of all viewers to perspective projection.
void toggleMenuBar()
Hide or show menu bar.
Definition: CoreWidget.cc:836
QToolButton * stereoButton_
Called by Plugins to add a Toolbar.
Definition: CoreWidget.hh:814
void setQuestionMode()
Definition: CoreWidget.hh:1442
void slotViewerDrawMenu(QAction *_action)
Called when a coordsys drawMode has been changed.
Definition: ContextMenu.cc:876
InverseKeyMap invKeys_
mapping of all registered keys and the corresponding plugins to currently assigned keys ...
Definition: CoreWidget.hh:397
std::map< QToolBar *, QGraphicsProxyWidget * > PickToolBarMap
Handle to picking toolbar.
Definition: CoreWidget.hh:732
QToolBar * viewerToolbar_
Called by Plugins to add a Toolbar.
Definition: CoreWidget.hh:810
void slotContextHomeView()
Set the active viewer to home position.
void slotHideContextMenu()
Hide the context menu.
Definition: ContextMenu.cc:85
QSize defaultIconSize_
Show logger in splitter or not.
Definition: CoreWidget.hh:562
QAction * AC_ShowViewModeControls_
Action for View Mode Widget Conrol in Menu.
Definition: CoreWidget.hh:696
void slotLocalChangeAnimation(bool _animation)
Set the animation mode for active viewer.
void slotSwitchWheels(bool _state)
Show / hide wheels.
void fullScreenChanged(bool _state)
will be emitted if the fullscreen state is changed (_state = true => in fullscreen) ...
CoreWidget(QVector< ViewMode * > &_viewModes, std::vector< PluginInfo > &_plugins, QList< SlotInfo > &_coreSlots)
constructor
Definition: CoreWidget.cc:138
void slotGlobalToggleAnimation()
If animation is disabled in all viewers, enable it in all viewers. Otherwise disable it...
bool addContextMenus(QMenu *_menu, ContextMenuType _type, int _id=-1)
Definition: ContextMenu.cc:529
void setPickMode(const std::string &_name)
Definition: picking.cc:164
void slotSnapshotName()
Set the snapShot name for all examiners.
Definition: ContextMenu.cc:728
void slotGetMenubarMenu(QString _name, QMenu *&_menu, bool _create)
File Menu.
Definition: MenuBar.cc:114
void slotGlobalChangeBackFaceCulling(bool _backFaceCulling)
Set backface culling for all viewers.
virtual void keyPressEvent(QKeyEvent *_e)
Handle key events.
Definition: keyHandling.cc:83
int toolbarCount_
Called by Plugins to add a Toolbar.
Definition: CoreWidget.hh:812
QScrollArea * getToolboxScrollArea()
Show logger in splitter or not.
Definition: CoreWidget.hh:502
void slotRenderMenu(QAction *_action)
Called when a different renderer has been chosen.
Definition: ContextMenu.cc:909
QComboBox * viewerLayoutBox_
Called by Plugins to add a Toolbar.
Definition: CoreWidget.hh:819
void slotAddViewModeToolbars(QString _mode, QStringList _usedToolbars)
Add or change Toolbars for a ViewMode (non-userdefined viewMode)
Definition: viewMode.cc:146
std::vector< KeyBinding > coreKeys_
vector of keys registered to the core
Definition: CoreWidget.hh:391
void slotGlobalPostProcessorMenu(QAction *_action)
Called when the global postprocessor is selected.
Definition: MenuBar.cc:904
QVector< QWidget * > toolWidgets_
a List of all widgets in the toolbar
Definition: CoreWidget.hh:573
void slotGlobalToggleBackFaceCulling()
If backface culling is disabled in all viewers, enable it in all viewers. Otherwise disable it...
void slotGlobalChangeTwoSidedLighting(bool _lighting)
Set two-sided lighting for all viewers.
QToolButton * moveButton_
Called by Plugins to add a Toolbar.
Definition: CoreWidget.hh:815
void slotUpdateStackWidget(QString _name, QWidget *_widget)
QMenu containing the recently opened files.
Definition: StackWidget.cc:102
void sceneRectChanged(const QRectF &rect)
Definition: CoreWidget.cc:1064
StereoSettingsWidget * stereoSettingsWidget_
Widget to change stereo settings.
Definition: CoreWidget.hh:1162
QAction * globalMipmappingAction_
Action to globally set mipmapping.
Definition: CoreWidget.hh:885
QWidget * viewModeControlBox_
Group box containing Task Switcher Controls.
Definition: CoreWidget.hh:675
QMenu * viewerDrawMenu_
Draw Menu for per Viewer Draw Modes.
Definition: CoreWidget.hh:992
void updatePopupMenu(const QPoint &_point)
check current context and initialize context menu according to this context.
Definition: ContextMenu.cc:665
void slotLocalChangeMipmapping(bool _mipmapping)
Set mipmapping for active viewer.
std::vector< glViewer * > examiner_widgets_
Examiner Widget.
Definition: CoreWidget.hh:669
void setupMenuBar()
Setup the main menubar.
Definition: MenuBar.cc:159
void slotCopyView()
Copy view from the last active examiner.
QToolBar * toolbar() const
PickMode toolbar.
Definition: CoreWidget.cc:123
OptionsWidget * optionsWidget_
Pointer to the OptionsWidget.
Definition: CoreWidget.hh:1214
void applyOptions()
Pointer to the OptionsWidget.