]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
Minor: PVViewer: breaking depy to SUIT when this is not necessary
authorabn <adrien.bruneton@cea.fr>
Tue, 16 Jun 2015 13:45:58 +0000 (15:45 +0200)
committerabn <adrien.bruneton@cea.fr>
Tue, 16 Jun 2015 13:45:58 +0000 (15:45 +0200)
src/PVViewer/PVViewer_Behaviors.cxx
src/PVViewer/PVViewer_Behaviors.h
src/PVViewer/PVViewer_GUIElements.cxx
src/PVViewer/PVViewer_GUIElements.h

index 1edd81a6617d189580dcd2350067711b021af30b..fefe75e5bd7671ca542687801e196c1a0101a697 100644 (file)
@@ -20,7 +20,7 @@
 
 #include "PVViewer_Behaviors.h"
 
-#include <SUIT_Desktop.h>
+#include <QMainWindow>
 
 #include <pqInterfaceTracker.h>
 #include <pqApplicationCore.h>
@@ -53,8 +53,8 @@
 
 int PVViewer_Behaviors::BehaviorLoadingLevel = 0;
 
-PVViewer_Behaviors::PVViewer_Behaviors(SUIT_Desktop * parent)
-  : QObject(static_cast<QObject *>(parent))
+PVViewer_Behaviors::PVViewer_Behaviors(QMainWindow * parent)
+  : QObject(parent)
 {
 }
 
@@ -62,7 +62,7 @@ PVViewer_Behaviors::PVViewer_Behaviors(SUIT_Desktop * parent)
  * This method should be updated at each new version of ParaView with what is found in
  *    Qt/ApplicationComponents/pqParaViewBehaviors.cxx
  */
-void PVViewer_Behaviors::instanciateMinimalBehaviors(SUIT_Desktop * desk)
+void PVViewer_Behaviors::instanciateMinimalBehaviors(QMainWindow * desk)
 {
   if (BehaviorLoadingLevel < 1)
     {
@@ -93,7 +93,7 @@ void PVViewer_Behaviors::instanciateMinimalBehaviors(SUIT_Desktop * desk)
  * This method should be updated at each new version of ParaView with what is found in
  *    Qt/ApplicationComponents/pqParaViewBehaviors.cxx
  */
-void PVViewer_Behaviors::instanciateAllBehaviors(SUIT_Desktop * desk)
+void PVViewer_Behaviors::instanciateAllBehaviors(QMainWindow * desk)
 {
   //    "new pqParaViewBehaviors(anApp->desktop(), this);"
   // -> (which loads all standard ParaView behaviors at once) has to be replaced in order to
index 8adc8dc2803b1ffa48beb025fbea3d7cd0c6bf8a..ebda1dc7b77447f34b01596977b27ab474420dbb 100644 (file)
@@ -26,8 +26,7 @@
 
 #include <QObject>
 
-class SalomeApp_Module;
-class SUIT_Desktop;
+class QMainWindow;
 class pqPropertiesPanel;
 
 /**!
@@ -40,10 +39,10 @@ class PVVIEWER_EXPORT PVViewer_Behaviors: public QObject
   Q_OBJECT
 
 public:
-  PVViewer_Behaviors(SUIT_Desktop * parent);
+  PVViewer_Behaviors(QMainWindow * parent);
 
-  void instanciateMinimalBehaviors(SUIT_Desktop * desk);
-  void instanciateAllBehaviors(SUIT_Desktop * desk);
+  void instanciateMinimalBehaviors(QMainWindow * desk);
+  void instanciateAllBehaviors(QMainWindow * desk);
 
   virtual ~PVViewer_Behaviors() {}
 
index ac4a4536740ed2f82ed3ec70a185b31f4b369808..a02dc5f2887adb4ca30c3ccb1e309b572568aca1 100644 (file)
@@ -19,7 +19,6 @@
 // Author: Adrien Bruneton (CEA)
 
 #include "PVViewer_GUIElements.h"
-#include "SUIT_Desktop.h"
 
 #include <pqPropertiesPanel.h>
 #include <pqPipelineBrowserWidget.h>
@@ -36,6 +35,7 @@
 #include <pqPythonManager.h>
 #include <pqApplicationCore.h>
 
+#include <QMainWindow>
 #include <QMenu>
 #include <QList>
 #include <QAction>
@@ -46,7 +46,7 @@
 
 PVViewer_GUIElements * PVViewer_GUIElements::theInstance = 0;
 
-PVViewer_GUIElements::PVViewer_GUIElements(SUIT_Desktop* desk) :
+PVViewer_GUIElements::PVViewer_GUIElements(QMainWindow* desk) :
   propertiesPanel(0), pipelineBrowserWidget(0),
   sourcesMenu(0)
 {
@@ -65,7 +65,7 @@ PVViewer_GUIElements::PVViewer_GUIElements(SUIT_Desktop* desk) :
   myBuildToolbars(desk);
 }
 
-PVViewer_GUIElements * PVViewer_GUIElements::GetInstance(SUIT_Desktop* desk)
+PVViewer_GUIElements * PVViewer_GUIElements::GetInstance(QMainWindow* desk)
 {
   if (! theInstance)
     theInstance = new PVViewer_GUIElements(desk);
@@ -76,7 +76,7 @@ PVViewer_GUIElements * PVViewer_GUIElements::GetInstance(SUIT_Desktop* desk)
  * See ParaView source code: pqParaViewMenuBuilders::buildToolbars()
  * to keep this function up to date:
  */
-void PVViewer_GUIElements::myBuildToolbars(SUIT_Desktop* mainWindow)
+void PVViewer_GUIElements::myBuildToolbars(QMainWindow* mainWindow)
 {
   mainToolBar = new pqMainControlsToolbar(mainWindow)
     << pqSetName("MainControlsToolbar");
@@ -158,7 +158,7 @@ void PVViewer_GUIElements::setToolBarVisible(bool show)
   dataAction->trigger();
 }
 
-void PVViewer_GUIElements::addToolbars(SUIT_Desktop* desk)
+void PVViewer_GUIElements::addToolbars(QMainWindow* desk)
 {
   desk->addToolBar(Qt::TopToolBarArea, mainToolBar);
   desk->addToolBar(Qt::TopToolBarArea, vcrToolbar);
index 92d5d7111094195ba039ca0e11d2260b48aa54e5..73a659ff7665bfcf33876331421554447f040db7 100644 (file)
@@ -28,7 +28,7 @@
 
 class pqPropertiesPanel;
 class pqPipelineBrowserWidget;
-class SUIT_Desktop;
+class QMainWindow;
 class QMenu;
 class QToolBar;
 class QAction;
@@ -44,7 +44,7 @@ class PVVIEWER_EXPORT PVViewer_GUIElements: public QObject
   Q_OBJECT
 
 public:
-  static PVViewer_GUIElements * GetInstance(SUIT_Desktop* desk);
+  static PVViewer_GUIElements * GetInstance(QMainWindow * desk);
 
   pqPropertiesPanel * getPropertiesPanel() { return propertiesPanel; }
   pqPipelineBrowserWidget * getPipelineBrowserWidget() { return pipelineBrowserWidget; }
@@ -56,8 +56,8 @@ public:
   pqVCRToolbar* getVCRToolbar() { return vcrToolbar; }
   pqAnimationTimeToolbar* getTimeToolbar() { return timeToolbar; }
 
-  void myBuildToolbars(SUIT_Desktop* desk);
-  void addToolbars(SUIT_Desktop* desk);
+  void myBuildToolbars(QMainWindow* desk);
+  void addToolbars(QMainWindow* desk);
   void setToolBarVisible(bool show);
   void setToolBarEnabled(bool enabled);
   QList<QToolBar*> getToolbars();
@@ -66,7 +66,7 @@ public slots:
   void onEmulateApply();  // better use the slot from PVViewer_ViewManager if you want to trigger "Apply"
 
 private:
-  PVViewer_GUIElements(SUIT_Desktop* desk);
+  PVViewer_GUIElements(QMainWindow* desk);
   virtual ~PVViewer_GUIElements() {}
 
   static PVViewer_GUIElements* theInstance;