1 // PARAVIS : ParaView wrapper SALOME module
3 // Copyright (C) 2010-2015 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;
35 class LightApp_Application;
38 * Almost identical copy/paste of what is found in
39 * <PARAVIEW>/Qt/Components/pqSettingsDialog.h
40 * This is (almost) the same, except for the inheritance to QtxUserDefinedContent providing the link
41 * to SALOME preference mechanism.
42 * The UI content of pqSettingsDialog is put in a (PARAVIS) widget called pqCustomSettingsWidget.
44 class PVGUI_ParaViewSettingsPane : public QtxUserDefinedContent
49 PVGUI_ParaViewSettingsPane(QWidget *parent, LightApp_Application * app);
50 virtual ~PVGUI_ParaViewSettingsPane();
52 /// Implementation of QtxUserDefinedContent interface
53 virtual void store(QtxResourceMgr* theRes, QtxPreferenceMgr* thePref);
54 virtual void retrieve(QtxResourceMgr* theRes, QtxPreferenceMgr* thePref);
57 void accepted(); // emulate the initial QDialogBox signal since some stuff are connected to it.
60 virtual void showEvent(QShowEvent * ev);
61 virtual void hideEvent(QHideEvent * ev);
63 // ---- From now on, this the same interface as in pqSettingsDialog
65 void clicked(QAbstractButton*);
68 void onRestoreDefaults();
70 void onTabIndexChanged(int index);
71 void onChangeAvailable();
72 void showRestartRequiredMessage();
74 void filterPanelWidgets();
77 void filterWidgets(bool showAdvanced, const QString& text);
80 void saveInQSettings(const char* key, vtkSMProperty* smproperty);
83 Q_DISABLE_COPY(PVGUI_ParaViewSettingsPane);
85 pqInternals* Internals;
87 /// Set to true if a setting that requires a restart to take effect
88 /// is modified. Made static to persist across instantiations of
90 static bool ShowRestartRequired;