// PARAVIS : ParaView wrapper SALOME module
//
-// Copyright (C) 2010-2014 CEA/DEN, EDF R&D
+// Copyright (C) 2010-2015 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
#include <QtxPagePrefMgr.h>
-#include <QWidget>
-
-#include "vtkPVConfig.h"
-
-class pqOptionsContainer;
-class OptionsDialogForm;
-class pqOptionsPage;
-class QString;
-
-
+class QAbstractButton;
+class vtkSMProperty;
+class QShowEvent;
+class QHideEvent;
+class LightApp_Application;
+
+/**!
+ * This class is (almost) a copy/paste of what is found in
+ * *<PARAVIEW>/Qt/Components/pqSettingsDialog.h*
+ * This is (almost) the same, except for the inheritance to QtxUserDefinedContent providing the link
+ * to SALOME preference mechanism.
+ * The UI content of pqSettingsDialog is put in a (PARAVIS) widget called pqCustomSettingsWidget.
+ */
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
virtual void store(QtxResourceMgr* theRes, QtxPreferenceMgr* thePref);
virtual void retrieve(QtxResourceMgr* theRes, QtxPreferenceMgr* thePref);
+ signals:
+ void accepted(); // emulate the initial QDialogBox signal since some stuff are connected to it.
+
+protected:
+ virtual void showEvent(QShowEvent * ev);
+ virtual void hideEvent(QHideEvent * ev);
+
+ // ---- From now on, this the same interface as in pqSettingsDialog
+ private slots:
+ void clicked(QAbstractButton*);
+ void onAccepted();
+ void onRejected();
+ void onRestoreDefaults();
-public slots:
- /// Calls each page to apply any changes.
- void applyChanges();
+ void onTabIndexChanged(int index);
+ void onChangeAvailable();
+ void showRestartRequiredMessage();
- /// Calls each page to reset any changes.
- void resetChanges();
+ void filterPanelWidgets();
- void onRequestParaviewSettings();
+ signals:
+ void filterWidgets(bool showAdvanced, const QString& text);
-signals:
- /// Emitted before the option changes are applied.
- void aboutToApplyChanges();
+ private:
+ void saveInQSettings(const char* key, vtkSMProperty* smproperty);
- /// Emitted after the option changes have been applied.
- void appliedChanges();
+ private:
+ Q_DISABLE_COPY(PVGUI_ParaViewSettingsPane);
+ class pqInternals;
+ pqInternals* Internals;
-private:
- OptionsDialogForm *Form; /// Stores the form and class data.
+ /// Set to true if a setting that requires a restart to take effect
+ /// is modified. Made static to persist across instantiations of
+ /// this class.
+ static bool ShowRestartRequired;
};
#endif