Salome HOME
Copyright update 2022
[modules/paravis.git] / src / PVGUI / PVGUI_ParaViewSettingsPane.cxx
index ac9e5431d8e13899d4545a44bc1aa51ea6dad2aa..79d22048f83ba101009bbae444f1cac05c2d176e 100644 (file)
@@ -1,6 +1,6 @@
 // PARAVIS : ParaView wrapper SALOME module
 //
-// Copyright (C) 2010-2014  CEA/DEN, EDF R&D
+// Copyright (C) 2010-2022  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
@@ -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)));
@@ -211,7 +217,7 @@ void PVGUI_ParaViewSettingsPane::hideEvent(QHideEvent * ev)
 }
 
 //-----------------------------------------------------------------------------
-void PVGUI_ParaViewSettingsPane::clicked(QAbstractButton *button)
+void PVGUI_ParaViewSettingsPane::clicked(QAbstractButton * /*button*/)
 {
 //  Ui::CustomSettingsWidget &ui = this->Internals->Ui;
 //  QDialogButtonBox::ButtonRole role = ui.buttonBox->buttonRole(button);