// Author : Sergey ANIKIN
//
+
#ifndef PVGUI_Module_H
#define PVGUI_Module_H
#include <LightApp_Module.h>
+#include <ostream.h>
+
class QMenu;
+class QDockWidget;
class LightApp_Selection;
class LightApp_SelectionMgr;
class PVGUI_ProcessModuleHelper;
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();
//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();
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<QDockWidget*> myDockWidgets;
};
#endif // PVGUI_Module_H