pqSettings.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Kitware Inc.
2 // SPDX-FileCopyrightText: Copyright (c) Sandia Corporation
3 // SPDX-License-Identifier: BSD-3-Clause
4 #ifndef pqSettings_h
5 #define pqSettings_h
6 
7 #include "pqCoreModule.h"
8 #include <QSettings>
9 
10 class QDialog;
11 class QMainWindow;
12 class QDockWidget;
13 class vtkSMProperty;
14 
23 class PQCORE_EXPORT pqSettings : public QSettings
24 {
25  Q_OBJECT
26  typedef QSettings Superclass;
27 
28 public:
30 
38  pqSettings(
39  const QString& organization, const QString& application = QString(), QObject* parent = nullptr);
40  pqSettings(Scope scope, const QString& organization, const QString& application = QString(),
41  QObject* parent = nullptr);
42  pqSettings(Format format, Scope scope, const QString& organization,
43  const QString& application = QString(), QObject* parent = nullptr);
44  pqSettings(const QString& fileName, Format format, QObject* parent = nullptr);
45  pqSettings(QObject* parent = nullptr);
46  ~pqSettings() override;
48 
49  void saveState(const QMainWindow& window, const QString& key);
50  void saveState(const QDialog& dialog, const QString& key);
51 
52  void restoreState(const QString& key, QMainWindow& window);
53  void restoreState(const QString& key, QDialog& dialog);
54 
58  void alertSettingsModified();
59 
63  void saveInQSettings(const char* key, vtkSMProperty* smproperty);
64 
71  QString backup(const QString& filename = QString());
72 
73 private:
78  void sanityCheckDock(QDockWidget* dock_widget);
79 Q_SIGNALS:
80  void modified();
81 };
82 
83 #endif
superclass for all SM properties
pqSettings extends QSettings to add support for following:
Definition: pqSettings.h:23
key