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 
19 class PQCORE_EXPORT pqSettings : public QSettings
20 {
21  Q_OBJECT
22  typedef QSettings Superclass;
23 
24 public:
25  pqSettings(
26  const QString& organization, const QString& application = QString(), QObject* parent = nullptr);
27  pqSettings(Scope scope, const QString& organization, const QString& application = QString(),
28  QObject* parent = nullptr);
29  pqSettings(Format format, Scope scope, const QString& organization,
30  const QString& application = QString(), QObject* parent = nullptr);
31  pqSettings(const QString& fileName, Format format, QObject* parent = nullptr);
32  pqSettings(QObject* parent = nullptr);
33  ~pqSettings() override;
34 
35  void saveState(const QMainWindow& window, const QString& key);
36  void saveState(const QDialog& dialog, const QString& key);
37 
38  void restoreState(const QString& key, QMainWindow& window);
39  void restoreState(const QString& key, QDialog& dialog);
40 
44  void alertSettingsModified();
45 
49  void saveInQSettings(const char* key, vtkSMProperty* smproperty);
50 
57  QString backup(const QString& filename = QString());
58 
59 private:
64  void sanityCheckDock(QDockWidget* dock_widget);
65 Q_SIGNALS:
66  void modified();
67 };
68 
69 #endif
superclass for all SM properties
pqSettings extends QSettings to add support for following:
Definition: pqSettings.h:19
#define PQCORE_EXPORT
Definition: pqCoreModule.h:15
key