67 #include <OpenFlipper/BasePlugin/ViewInterface.hh> 70 #include <OpenFlipper/widgets/coreWidget/SideArea.hh> 71 #include <OpenFlipper/widgets/coreWidget/ColorStatusBar.hh> 73 #include <OpenFlipper/widgets/glWidget/QtBaseViewer.hh> 74 #include <OpenFlipper/widgets/glWidget/QtGLGraphicsScene.hh> 75 #include <OpenFlipper/widgets/glWidget/QtGLGraphicsView.hh> 76 #include <OpenFlipper/widgets/glWidget/QtMultiViewLayout.hh> 77 #include <OpenFlipper/widgets/glWidget/QtSlideWindow.hh> 80 #include <QMainWindow> 81 #include <QStackedWidget> 87 #include <QFutureWatcher> 89 #include <QDockWidget> 91 #include <OpenFlipper/common/OFGLWidget.hh> 93 #include <OpenFlipper/widgets/pythonWidget/pythonWidget.hh> 94 #include <OpenFlipper/widgets/aboutWidget/aboutWidget.hh> 95 #include <OpenFlipper/widgets/loggerWidget/loggerWidget.hh> 96 #include <OpenFlipper/widgets/optionsWidget/optionsWidget.hh> 97 #include <OpenFlipper/widgets/helpWidget/helpWidget.hh> 98 #include <OpenFlipper/widgets/stereoSettingsWidget/stereoSettingsWidget.hh> 99 #include <OpenFlipper/widgets/postProcessorWidget/postProcessorWidget.hh> 100 #include <OpenFlipper/widgets/rendererWidget/rendererWidget.hh> 101 #include <OpenFlipper/widgets/rendererWidget/rendererObjectWidget.hh> 103 #include <OpenFlipper/Core/PluginInfo.hh> 105 #include <ACG/QtWidgets/QtSceneGraphWidget.hh> 107 #include <ACG/Scenegraph/DrawModes.hh> 108 #include <ACG/Scenegraph/CoordsysNode.hh> 110 #include <OpenFlipper/INIFile/INIFile.hh> 113 #include "../viewModeWidget/viewModeChangeWidget.hh" 183 PickMode(
const std::string& _n,
const bool _t,
const bool _v, QCursor _c, QToolBar *_tb = 0 );
193 void visible(
const bool _visible);
199 bool visible()
const;
205 std::string
name()
const;
214 void tracking(
const bool _tracking);
221 bool tracking()
const;
228 QCursor cursor()
const;
237 void cursor(
const QCursor _cursor);
246 void toolbar(QToolBar* _toolbar);
253 QToolBar* toolbar()
const;
288 CoreWidget( QVector<ViewMode*>& _viewModes, QList< SlotInfo >& _coreSlots );
296 void addEmptyObjectMenu();
301 void recentOpen(QAction*);
310 void closeEvent ( QCloseEvent * event );
319 void log(QString _message);
331 virtual void keyPressEvent (QKeyEvent* _e);
332 virtual void keyReleaseEvent(QKeyEvent* _e);
339 bool event( QEvent *event );
341 bool eventFilter(QObject *_obj, QEvent *_event);
348 void PluginKeyEvent(QKeyEvent* );
353 void PluginKeyReleaseEvent(QKeyEvent* );
356 void registerKey(
int _key, Qt::KeyboardModifiers _modifiers, QString _description,
357 bool _multiUse =
false);
360 void call( QString _expression ,
bool& _success );
364 typedef std::multimap< std::pair< int, Qt::KeyboardModifiers > , std::pair< QObject*, int > >
KeyMap;
366 typedef std::pair< KeyMap::iterator, KeyMap::iterator >
KeyRange;
370 void registerCoreKeys();
376 void coreKeyPressEvent();
379 void coreKeyPressEvent (QKeyEvent* _e);
380 void coreKeyReleaseEvent(QKeyEvent* _e);
382 KeyBinding getKeyBinding(QObject* _plugin,
int _keyIndex );
383 QString getRPCName(QObject* _plugin );
403 void slotRegisterKey(
int _key, Qt::KeyboardModifiers _modifiers, QString _description,
404 bool _multiUse =
false);
411 void slotAddKeyMapping(
int _key, Qt::KeyboardModifiers _modifiers, QObject* _plugin,
int _keyBindingID);
418 void slotRegisterSlotKeyBindings();
422 void loadKeyBindings(
INIFile& _ini);
425 void saveKeyBindings(
INIFile& _ini);
456 std::vector<PluginInfo>&
plugins();
473 void startVideoCaptureDialog();
485 void addRecent(QString _filename,
DataType _type);
500 void showLoggerInSplitView(
bool _show);
503 void updateInSceneLoggerGeometry();
506 void setForceNativeCursor (
bool _state );
508 QSize defaultIconSize();
517 void toggleFullscreen();
520 void setFullscreen(
bool _state );
529 void toggleToolbox();
535 void toggleStatusBar();
541 void showMenuBar(
bool _state );
544 void toggleMenuBar();
547 void toggleToolBar();
550 void showToolBar(
bool _state );
553 void toolBarVisChanged(
bool _state );
556 void toolBoxVisChanged(
bool _state );
559 void statusBarVisChanged(
bool _state );
562 void menuBarVisChanged(
bool _state );
565 void fullScreenChanged(
bool _state );
597 void initViewModes( );
600 void slotAddViewModeToolboxes(QString _mode, QStringList _usedWidgets);
603 void slotAddViewModeToolboxes(QString _mode,
bool _custom, QStringList _usedWidgets);
606 void slotAddViewModeToolbars(QString _mode, QStringList _usedToolbars);
609 void slotAddViewModeToolbars(QString _mode,
bool _custom, QStringList _usedToolbars);
612 void slotAddViewModeContextMenus(QString _mode, QStringList _usedToolbars);
615 void slotAddViewModeContextMenus(QString _mode,
bool _custom, QStringList _usedToolbars);
618 void slotAddViewModeComplete(QString _mode ,
bool _custom, QStringList _toolboxes, QStringList _toolbars, QStringList _contextmenus);
621 void slotSetViewModeIcon(QString _mode, QString _iconName);
624 void slotSetViewModeIcon(QString _mode,
bool _custom, QString _iconName);
627 void slotChangeView(QString _mode, QStringList _toolboxWidgets, QStringList _toolbars, QStringList _contextmenus,
bool _expandAll =
false);
630 void setToolBoxOrientationOnTheRight(
bool _toolBoxRight);
636 void slotHideContextMenu();
640 void slotRemoveViewMode(QString _name);
643 void slotSetViewMode( QAction* action);
646 void slotViewModeDialog();
649 void closeChangeViewModePopup();
652 void slotUpdateExaminer(
unsigned _id);
657 void setViewMode( QString _mode,
bool _expandAll =
false );
766 void slotShowSceneGraphDialog();
771 void slotActivateExaminer ();
782 void sceneRectChanged(
const QRectF &rect);
790 void slotAddMenubarAction( QAction* _action , QString _name );
791 void slotAddMenubarActions( std::vector<QAction*> _actions , QString _name );
792 void slotGetMenubarMenu (QString _name, QMenu *& _menu,
bool _create);
841 void slotUpdateGlobalDrawMenu();
844 void slotUpdateRendererMenu();
847 void setViewerLayout(
int _idx);
851 void nextViewerLayout();
854 void slotGlobalDrawMenu(QAction * _action);
857 void slotViewMenuAboutToShow();
860 void slotGlobalRendererMenu(QAction * _action);
863 void slotGlobalPostProcessorMenu(QAction * _action);
911 void updateContextMenu(
int);
914 void updateContextMenuNode(
int);
917 void updateContextMenuBackground();
922 void slotCustomContextMenu(
const QPoint& _point );
931 void slotAddContextItemToViewMode( QAction* _entry );
934 void slotPasteView( );
937 void slotPasteViewAndWindow( );
940 void slotSetView( QString view );
943 void slotSetViewAndWindowGeometry( QString view );
946 void slotCopyView( );
949 void slotViewerDrawMenu( QAction * _action );
952 void slotPostProcessorMenu( QAction * _action);
955 void slotRenderMenu( QAction * _action);
958 void slotUpdateViewerDrawMenu();
961 void slotExaminerSnapshot();
964 void slotSwitchWheels(
bool _state);
967 void slotSwitchNavigation(
bool _egomode);
970 void slotSnapshotName();
973 void slotCoordSysVisibility(
bool _visible);
980 void updatePopupMenu(
const QPoint& _point);
982 void updatePopupMenuCoordsysNode(QMenu* _menu ,
const int _part);
983 void updatePopupMenuObject(QMenu* _menu ,
BaseObjectData* _object );
984 void updatePopupMenuBackground(QMenu* _menu ,
const QPoint& _point);
987 bool addContextMenus( QMenu* _menu ,
ContextMenuType _type,
int _id = -1);
1027 void viewerSnapshotDialog();
1033 void applicationSnapshotDialog();
1043 bool comments_visible_only,
bool comments_targeted_only,
1044 bool store_material_info,
int snapshot_width,
int snapshot_height,
1045 bool snapshot_transparent,
bool hide_coord_sys,
1046 int snapshot_multisampling,
bool store_view);
1057 void writeImageAsynchronously(QImage* _image,
const QString _name);
1062 std::map<QFutureWatcher<void>*,QFuture<void>*> watcher_garbage_;
1069 void delete_garbage();
1079 void slotGetStackWidget( QString _name, QWidget*& _widget );
1080 void slotAddStackWidget( QString _name, QWidget* _widget );
1081 void slotUpdateStackWidget( QString _name, QWidget* _widget );
1083 void slotViewMenuAction( QAction * _action);
1085 void slotUpdateStackMenu();
1110 void showHelpBrowser(
const QString &page = homePage_);
1113 void changeHelpSite(QUrl);
1129 void slotShowPostProcessorManager();
1145 void slotShowRenderManager();
1148 void slotShowRenderObjectWidget();
1163 void stereoButtonContextMenu(
const QPoint& _pos);
1168 void slotApplyStereoSettings(
int _tmpParam = 0);
1184 void showAboutWidget();
1191 void addAboutInfo(QString _text, QString _tabName );
1198 void addCoreLicenseInfo();
1216 void showOptionsWidget();
1237 void showPythonScriptInterpreter();
1251 void slotAddToolbar(QToolBar* _toolbar);
1254 void slotRemoveToolbar(QToolBar* _toolbar);
1257 void getToolBar( QString _name, QToolBar*& _toolbar);
1271 void statusMessage(QString _message,
int _timeout = 0);
1273 void clearStatusMessage();
1277 void addWidgetToStatusbar(QWidget* _widget);
1280 void setupStatusBar();
1285 QLabel* statusIcon_;
1295 void dragOpenFile(QString _filename);
1298 void startDrag( QMouseEvent* _event );
1300 void dragEnterEvent(QDragEnterEvent* _event);
1302 void dropEvent( QDropEvent* _event );
1314 void slotToggleStereoMode();
1317 void slotSetGlobalBackgroundColor();
1320 void slotSetContextBackgroundColor();
1325 void slotContextHomeView();
1328 void slotGlobalHomeView();
1333 void slotContextSetHomeView();
1336 void slotGlobalSetHomeView();
1341 void slotContextViewAll();
1344 void slotGlobalViewAll();
1348 void slotContextSwitchProjection();
1354 void slotContextSwitchCoordsysProjection();
1357 void slotGlobalPerspectiveProjection();
1360 void slotGlobalOrthographicProjection();
1364 void slotSetViewingDirection(QAction* _action);
1367 void slotLockRotation(
bool _lock);
1372 void slotGlobalToggleAnimation();
1375 void slotGlobalChangeAnimation(
bool _animation);
1378 void slotLocalChangeAnimation(
bool _animation);
1383 void slotGlobalToggleBackFaceCulling();
1386 void slotGlobalChangeBackFaceCulling(
bool _backFaceCulling);
1389 void slotLocalChangeBackFaceCulling(
bool _backFaceCulling);
1394 void slotGlobalToggleTwoSidedLighting();
1397 void slotGlobalChangeTwoSidedLighting(
bool _lighting);
1400 void slotLocalChangeTwoSidedLighting(
bool _lighting);
1405 void slotGlobalToggleMultisampling();
1408 void slotGlobalChangeMultisampling(
bool _multisampling);
1411 void slotLocalChangeMultisampling(
bool _multisampling);
1415 void slotGlobalToggleMipmapping();
1418 void slotGlobalChangeMipmapping(
bool _multisampling);
1421 void slotLocalChangeMipmapping(
bool _mipmapping);
1440 void drawModeChanged(
int _viewerId);
1456 bool lightMode() {
return(actionMode_ == Viewer::LightMode ); };
1493 void addPickMode(
const std::string& _name,
1494 bool _mouse_tracking =
false,
1496 bool _visible =
true,
1497 QCursor _cursor = Qt::ArrowCursor );
1501 void clearPickModes();
1505 const std::string& pickMode()
const;
1510 void pickMode(
int _id );
1512 void expandToolBoxWidget(QWidget *widget,
bool expand);
1519 void setPickMode(
const std::string& _name);
1522 void getPickMode(std::string& _name);
1525 void setActivePickToolBar(QToolBar* _tool);
1528 void hidePickToolBar();
1537 void setPickModeCursor(
const std::string& _name, QCursor _cursor);
1544 void setPickModeMouseTracking(
const std::string& _name,
bool _mouseTracking);
1553 void setPickModeToolbar(
const std::string& _mode , QToolBar * _toolbar );
1561 void removePickModeToolbar(
const std::string& _mode );
1563 void actionPickMenu( QAction * _action );
1568 void signalPickModeChanged(
const std::string&);
1593 void updatePickMenu();
1597 void hidePopupMenus();
1603 #endif // COREWIDGET_HH defined
void startVideoCapture(QString _baseName, int _fps, bool _captureViewers)
Start video capturing.
void clearAll()
Clear all data objects.
void loadPlugin(const QString &_filename, const bool _silent, QString &_licenseErrors, QObject *_plugin=0)
Function for loading Plugins.
void showStatusBar(bool _state)
Show or hide Status Bar.
QStringList visibleContextMenus
List of context Menus in this view mode.
ViewMode struct This struct contains a ViewMode and its status information such as used widgets...
void showToolbox(bool _state)
Show or hide toolbox.
void saveOptions()
Save the current options to the standard ini file.
ProjectionMode
projection mode
ActionMode
Enum listing action modes of the viewers.
Logtype
Log types for Message Window.
applicationStatus
Enum for the statusBar Status Icon.
void showViewModeControls(bool _show)
Show or Hide the viewmode control widget.
void log(Logtype _type, QString _message)
Logg with OUT,WARN or ERR as type.
void applyOptions()
after ini-files have been loaded and core is up or if options have been changed -> apply Options ...
LoggerState
State of the logging widget.
void resizeViewers(int _width, int _height)
resize the examinerViewer
void resizeApplication(int _width, int _height)
resize the whole Application
void slotLog(Logtype _type, QString _message)
Console logger.
Struct containing information about pickModes.
std::string name_
Name of the pickMode.
QString name
Name of the View Mode.
QStringList visibleToolboxes
List of Visible Toolboxes in this view mode.
Class for the handling of simple configuration files.
QStringList visibleToolbars
List of Toolbars in this view mode.
void applicationSnapshotName(QString _name)
Set the baseName for the application snapshot.
void showReducedMenuBar(bool reduced)
Core scripting engine.
void setViewMode(QString _viewMode)
Set the active ViewMode.
bool custom
Is this a user defined custom view mode or a plugin generated one.
std::vector< PluginInfo > & plugins()
Index of Plugins toolbox widget.
void moveToolBoxToTop(QString _name)
Move selected toolbox to top of side area.
void viewerSnapshot()
Take a snapshot from all viewers.
void moveToolBoxToBottom(QString _name)
Move selected toolbox to bottom of side area.
void applicationSnapshot()
Take a snapshot from the whole app.
void stopVideoCapture()
Stop video capturing.