1 // PARAVIS : ParaView wrapper SALOME module
3 // Copyright (C) 2010-2014 CEA/DEN, EDF R&D
5 // This library is free software; you can redistribute it and/or
6 // modify it under the terms of the GNU Lesser General Public
7 // License as published by the Free Software Foundation; either
8 // version 2.1 of the License, or (at your option) any later version.
10 // This library is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 // Lesser General Public License for more details.
15 // You should have received a copy of the GNU Lesser General Public
16 // License along with this library; if not, write to the Free Software
17 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 // File : PVGUI_ParaViewSettingsPane.h
22 // Author : Vitaly Smetannikov
26 #ifndef PVGUI_ParaViewSettingsPane_H
27 #define PVGUI_ParaViewSettingsPane_H
29 #include <QtxPagePrefMgr.h>
31 class QAbstractButton;
37 * Almost identical copy/paste of what is found in
38 * <PARAVIEW>/Qt/Components/pqSettingsDialog.h
39 * This is (almost) the same, except for the inheritance to QtxUserDefinedContent providing the link
40 * to SALOME preference mechanism.
41 * The UI content of pqSettingsDialog is put in a (PARAVIS) widget called pqCustomSettingsWidget.
43 class PVGUI_ParaViewSettingsPane : public QtxUserDefinedContent
48 PVGUI_ParaViewSettingsPane(QWidget *parent=0);
49 virtual ~PVGUI_ParaViewSettingsPane();
51 /// Implementation of QtxUserDefinedContent interface
52 virtual void store(QtxResourceMgr* theRes, QtxPreferenceMgr* thePref);
53 virtual void retrieve(QtxResourceMgr* theRes, QtxPreferenceMgr* thePref);
56 void accepted(); // emulate the initial QDialogBox signal since some stuff are connected to it.
59 virtual void showEvent(QShowEvent * ev);
60 virtual void hideEvent(QHideEvent * ev);
62 // ---- From now on, this the same interface as in pqSettingsDialog
64 void clicked(QAbstractButton*);
67 void onRestoreDefaults();
69 void onTabIndexChanged(int index);
70 void onChangeAvailable();
71 void showRestartRequiredMessage();
73 void filterPanelWidgets();
76 void filterWidgets(bool showAdvanced, const QString& text);
79 void saveInQSettings(const char* key, vtkSMProperty* smproperty);
82 Q_DISABLE_COPY(PVGUI_ParaViewSettingsPane);
84 pqInternals* Internals;
86 /// Set to true if a setting that requires a restart to take effect
87 /// is modified. Made static to persist across instantiations of
89 static bool ShowRestartRequired;