X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FPVGUI%2FPVGUI_ParaViewSettingsPane.cxx;h=79d22048f83ba101009bbae444f1cac05c2d176e;hb=35665aca0031dc689940d59cc17e148e6c61334b;hp=fb095ece4472858f947ac8e2b38f916c4fa92c58;hpb=0b0ae0fc3e2c5cfe8f03cf40e7eee698ecb5c09d;p=modules%2Fparavis.git diff --git a/src/PVGUI/PVGUI_ParaViewSettingsPane.cxx b/src/PVGUI/PVGUI_ParaViewSettingsPane.cxx index fb095ece..79d22048 100644 --- a/src/PVGUI/PVGUI_ParaViewSettingsPane.cxx +++ b/src/PVGUI/PVGUI_ParaViewSettingsPane.cxx @@ -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 + #include #include @@ -57,18 +59,9 @@ #include #include -// This class is revisited to hack on the SALOME's Preferences "Default" button -// to ParaView's "Default" behavior. class PVGUI_ParaViewSettingsPane::pqInternals { public: - pqInternals() - { - // Get the containing preference tab to identify when it has focus - - } - ~pqInternals(); - Ui::CustomSettingsWidget Ui; // Map from tab indices to stack widget indices. This is needed because there @@ -79,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()) { @@ -165,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))); @@ -220,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);