]> SALOME platform Git repositories - modules/paravis.git/commitdiff
Salome HOME
Connecting restore default signal in settings dialog.
authorabn <adrien.bruneton@cea.fr>
Tue, 28 Oct 2014 11:36:59 +0000 (12:36 +0100)
committerabn <adrien.bruneton@cea.fr>
Tue, 28 Oct 2014 11:36:59 +0000 (12:36 +0100)
src/PVGUI/PVGUI_Module.cxx
src/PVGUI/PVGUI_ParaViewSettingsPane.cxx
src/PVGUI/PVGUI_ParaViewSettingsPane.h

index 9f8165a3d920b50b2e90149527a26c644a0771d2..b94515efa3edff9f56d430afa7bec1362da5ab11 100644 (file)
@@ -999,7 +999,7 @@ void PVGUI_Module::createPreferences()
   setPreferenceProperty(aParaViewSettingsTab, "stretch", false );
   int aPanel = addPreference(QString(), aParaViewSettingsTab, LightApp_Preferences::UserDefined, PARAVIS_MODULE_NAME, "");
 
-  setPreferenceProperty(aPanel, "content", (qint64)(new PVGUI_ParaViewSettingsPane()));
+  setPreferenceProperty(aPanel, "content", (qint64)(new PVGUI_ParaViewSettingsPane(0, getApp())));
 
   // Paravis settings tab
   int aParaVisSettingsTab = addPreference( tr( "TIT_PVISSETTINGS" ) );
index ac9e5431d8e13899d4545a44bc1aa51ea6dad2aa..ea616e434403fa0958b848b2de0475bfb820e2e3 100644 (file)
@@ -25,6 +25,8 @@
 #include "PVGUI_ParaViewSettingsPane.h"
 #include "ui_pqCustomSettingsWidget.h"
 
+#include <LightApp_Application.h>
+
 #include <QtxDialog.h>
 
 #include <QString>
@@ -70,7 +72,7 @@ public:
 bool PVGUI_ParaViewSettingsPane::ShowRestartRequired = false;
 
 //----------------------------------------------------------------------------
-PVGUI_ParaViewSettingsPane::PVGUI_ParaViewSettingsPane(QWidget *widgetParent)
+PVGUI_ParaViewSettingsPane::PVGUI_ParaViewSettingsPane(QWidget *widgetParent, LightApp_Application * app)
   : QtxUserDefinedContent(widgetParent),
     Internals (new PVGUI_ParaViewSettingsPane::pqInternals())
 {
@@ -156,6 +158,10 @@ PVGUI_ParaViewSettingsPane::PVGUI_ParaViewSettingsPane(QWidget *widgetParent)
 //  this->connect(ui.buttonBox->button(QDialogButtonBox::RestoreDefaults), SIGNAL(clicked()),
 //                SLOT(onRestoreDefaults()));
 //  this->connect(ui.buttonBox, SIGNAL(clicked(QAbstractButton*)), SLOT(clicked(QAbstractButton*)));
+
+  // [ABN] connect to reset to default emitted by Light_App:
+  this->connect(app, SIGNAL(preferenceResetToDefaults()), this, SLOT(onRestoreDefaults()));
+
   this->connect(this, SIGNAL(accepted()), SLOT(onAccepted()));
   this->connect(this, SIGNAL(rejected()), SLOT(onRejected()));
   this->connect(ui.tabBar, SIGNAL(currentChanged(int)), this, SLOT(onTabIndexChanged(int)));
index 31729139da5d888160419a07ad39e758ba3716c2..a8e9467c94212bced5699ad73b8b43780f3741ca 100644 (file)
@@ -32,6 +32,7 @@ class QAbstractButton;
 class vtkSMProperty;
 class QShowEvent;
 class QHideEvent;
+class LightApp_Application;
 
 /**!
  * Almost identical copy/paste of what is found in
@@ -45,7 +46,7 @@ class PVGUI_ParaViewSettingsPane : public QtxUserDefinedContent
   Q_OBJECT
 
 public:
-  PVGUI_ParaViewSettingsPane(QWidget *parent=0);
+  PVGUI_ParaViewSettingsPane(QWidget *parent, LightApp_Application * app);
   virtual ~PVGUI_ParaViewSettingsPane();
 
   /// Implementation of QtxUserDefinedContent interface