X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FPVGUI%2FPVGUI_Module.h;h=6918361eb1d372d2a3314d3e2d73e83ad2804ce3;hb=0f9c3a16952f077e2cd32193d6ce940e0af45cbf;hp=8f1c26180c0ed9dba5a10773f2c6d418ea57a8dd;hpb=0976ef5de189d261d8bbdc6820b2b7aa66995ce8;p=modules%2Fparavis.git diff --git a/src/PVGUI/PVGUI_Module.h b/src/PVGUI/PVGUI_Module.h index 8f1c2618..6918361e 100644 --- a/src/PVGUI/PVGUI_Module.h +++ b/src/PVGUI/PVGUI_Module.h @@ -23,12 +23,16 @@ // Author : Sergey ANIKIN // + #ifndef PVGUI_Module_H #define PVGUI_Module_H #include +#include + class QMenu; +class QDockWidget; class LightApp_Selection; class LightApp_SelectionMgr; class PVGUI_ProcessModuleHelper; @@ -43,16 +47,115 @@ class PVGUI_Module : public LightApp_Module Q_OBJECT //! Menu actions - /*enum { - lgLoadFile = 931, //!< load text file - lgSaveFile, //!< save text file - lgDisplayLine, //!< display selected line - lgEraseLine, //!< erase selected line - lgEditLine, //!< edit selected line - lgAddLine, //!< insert new line - lgDelLine, //!< delete selected line - lgClear //!< clear all contents - };*/ + enum { // Menu "File" + OpenFileId, + + LoadStateId, + SaveStateId, + + SaveDataId, + SaveScreenshotId, + ExportId, + + SaveAnimationId, + SaveGeometryId, + + ConnectId, + DisconnectId, + + // Menu "Edit" + UndoId, + RedoId, + + CameraUndoId, + CameraRedoId, + + ChangeInputId, + DeleteId, + DeleteAllId, + + InteractId, + SelectCellsOnId, + SelectPointsOnId, + SelectCellsThroughId, + SelectPointsThroughId, + SelectBlockId, + + SettingsId, + ViewSettingsId, + + // Menu "View" + ResetCameraId, + PositiveXId, + NegativeXId, + PositiveYId, + NegativeYId, + PositiveZId, + NegativeZId, + + ShowCenterId, + ResetCenterId, + PickCenterId, + ShowColorLegendId, + EditColorMapId, + ResetRangeId, + + AnimationInspectorId, + AnimationViewId, + ComparativeViewInspectorId, + SelectionInspectorId, + LookmarkBrowserId, + LookmarkInspectorId, + ObjectInspectorId, + PipelineBrowserId, + StatisticsViewId, + + // Menu "Sources" + // TODO... + + // Menu "Filters" + // TODO... + + // Menu "Animation" + FirstFrameId, + PreviousFrameId, + PlayId, + NextFrameId, + LastFrameId, + LoopId, + + // Menu "Tools" + CreateCustomFilterId, + ManageCustomFiltersId, + CreateLookmarkId, + ManageLinksId, + AddCameraLinkId, + ManagePluginsExtensionsId, + DumpWidgetNamesId, + RecordTestId, + RecordTestScreenshotId, + PlayTestId, + MaxWindowSizeId, + TimerLogId, + OutputWindowId, + PythonShellId, + + // Menu "Help" + AboutParaViewId, + ParaViewHelpId, + EnableTooltipsId + + /* + lgLoadFile = 931, //!< load text file + lgSaveFile, //!< save text file + lgDisplayLine, //!< display selected line + lgEraseLine, //!< erase selected line + lgEditLine, //!< edit selected line + lgAddLine, //!< insert new line + lgDelLine, //!< delete selected line + lgClear //!< clear all contents + */ + }; public: PVGUI_Module(); @@ -63,9 +166,14 @@ public: //virtual LightApp_Selection* createSelection() const; - pqServer* getActiveServer() const; pqViewManager* getMultiViewManager() const; + virtual bool eventFilter( QObject*, QEvent* ); + + //! Compares the contents of the window with the given reference image, returns true if they "match" within some tolerance + bool compareView( const QString& ReferenceImage, double Threshold, + ostream& Output, const QString& TempDirectory ); + protected: //virtual CAM_DataModel* createDataModel(); @@ -76,25 +184,76 @@ private: static void pvShutdown(); //! Create actions for ParaView GUI operations - //! duplicating menus and toolbars in pqMainWindow ParaView class - void pvCreateActions(); + void pvCreateActions(); + + //! Create menus for ParaView GUI operations + //! duplicating menus in pqMainWindow ParaView class + void pvCreateMenus(); + + //! Create toolbars for ParaView GUI operations + //! duplicating toolbars in pqMainWindow ParaView class + void pvCreateToolBars(); + + //! Create dock widgets for ParaView widgets + void setupDockWidgets(); + + //! Create dock widgets context menus + void setupDockWidgetsContextMenu(); + + //! Save states of dockable ParaView widgets + void saveDockWidgetsState(); + + //! Restore states of dockable ParaView widgets + void restoreDockWidgetsState(); //! Shows or hides ParaView view window - void showView( bool ); + void showView( bool ); + + //! Returns QMenu object for a given menu id + QMenu* getMenu( const int ); + +private slots: + void onUndoLabel( const QString& ); + void onRedoLabel( const QString& ); + + void onCameraUndoLabel( const QString& ); + void onCameraRedoLabel( const QString& ); + + void onDeleteAll(); + + void onSelectionModeChanged( int mode ); - void makeDefaultConnectionIfNoneExists(); + void onShowCenterAxisChanged( bool ); + + void setTimeRanges( double, double ); + + void onPlaying( bool ); + + void onAddCameraLink(); + + void onHelpAbout(); + + void showHelpForProxy( const QString& proxy ); + void makeAssistant(); + void assistantError( const QString& err ); + + void onPreAccept(); + void onPostAccept(); + void endWaitCursor(); public slots: virtual bool activateModule( SUIT_Study* ); virtual bool deactivateModule( SUIT_Study* ); private: - static vtkPVMain* myPVMain; - static pqOptions* myPVOptions; - static PVGUI_ProcessModuleHelper* myPVHelper; + class pqImplementation; + pqImplementation* Implementation; + + int mySelectionControlsTb; + int mySourcesMenuId; + int myFiltersMenuId; - //! pqMainWindowCore stuff - pqActiveServer* myActiveServer; + QList myDockWidgets; }; #endif // PVGUI_Module_H