Salome HOME
SIMAN removal
[modules/gui.git] / src / PVViewer / PVViewer_Behaviors.cxx
index 75fc467cc2adfedf8f4b30a805225316464b446b..fefe75e5bd7671ca542687801e196c1a0101a697 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2010-2014  CEA/DEN, EDF R&D
+// Copyright (C) 2010-2015  CEA/DEN, EDF R&D
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
@@ -20,8 +20,7 @@
 
 #include "PVViewer_Behaviors.h"
 
-#include <SUIT_Desktop.h>
-#include <SalomeApp_Module.h>
+#include <QMainWindow>
 
 #include <pqInterfaceTracker.h>
 #include <pqApplicationCore.h>
@@ -54,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)
 {
 }
 
@@ -63,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)
     {
@@ -80,7 +79,6 @@ void PVViewer_Behaviors::instanciateMinimalBehaviors(SUIT_Desktop * desk)
 
       new pqDefaultViewBehavior(this);  // shows a 3D view as soon as a server connection is made
       new pqAlwaysConnectedBehavior(this);  // client always connected to a server
-      new pqAutoLoadPluginXMLBehavior(this);  // auto load plugins
       new pqVerifyRequiredPluginBehavior(this);
       new pqPluginSettingsBehavior(this);
       new pqFixPathsInStateFilesBehavior(this);
@@ -95,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
@@ -112,6 +110,7 @@ void PVViewer_Behaviors::instanciateAllBehaviors(SUIT_Desktop * desk)
       new pqSpreadSheetVisibilityBehavior(this);
       new pqPipelineContextMenuBehavior(this);
       new pqUndoRedoBehavior(this);
+      new pqAutoLoadPluginXMLBehavior(this);  // auto load plugins GUI stuff
       new pqPluginDockWidgetsBehavior(desk);
       new pqPluginActionGroupBehavior(desk);
       new pqPersistentMainWindowStateBehavior(desk);