dRonin  adbada4
dRonin GCS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Groups Pages
iuavgadgetconfiguration.h
Go to the documentation of this file.
1 
13 /*
14  * This program is free software; you can redistribute it and/or modify
15  * it under the terms of the GNU General Public License as published by
16  * the Free Software Foundation; either version 3 of the License, or
17  * (at your option) any later version.
18  *
19  * This program is distributed in the hope that it will be useful, but
20  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
21  * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22  * for more details.
23  *
24  * You should have received a copy of the GNU General Public License along
25  * with this program; if not, see <http://www.gnu.org/licenses/>
26  *
27  * Additional note on redistribution: The copyright and license notices above
28  * must be maintained in each individual source file that is a derivative work
29  * of this source file; otherwise redistribution is prohibited.
30  */
31 
32 #ifndef IUAVGADGETCONFIGURATION_H
33 #define IUAVGADGETCONFIGURATION_H
34 
35 #include <coreplugin/core_global.h>
37 #include <QObject>
38 #include <QSettings>
39 
40 namespace Core {
41 
42 class UAVConfigInfo;
43 
44 class CORE_EXPORT IUAVGadgetConfiguration : public QObject
45 {
46  Q_OBJECT
47 public:
48  explicit IUAVGadgetConfiguration(QString classId, QObject *parent = nullptr);
49  QString classId() { return m_classId; }
50  QString name() { return m_name; }
51  void setName(QString name) { m_name = name; }
52  QString provisionalName() { return m_provisionalName; }
53  void setProvisionalName(QString name) { m_provisionalName = name; }
54  bool locked() const { return m_locked; }
55  void setLocked(bool locked) { m_locked = locked; }
56 
57  virtual void saveConfig() const {};
58  virtual void saveConfig(QSettings * /*settings*/) const {};
59  virtual void saveConfig(QSettings *settings, UAVConfigInfo * /*configInfo*/) const
60  {
61  saveConfig(settings);
62  }
63 
64  virtual IUAVGadgetConfiguration *clone() = 0;
65 
66 signals:
67 
68 public slots:
69 
70 private:
71  bool m_locked;
72  QString m_classId;
73  QString m_name;
74  QString m_provisionalName;
75 };
76 
77 } // namespace Core
78 
79 #endif // IUAVGADGETCONFIGURATION_H
virtual void saveConfig(QSettings *settings, UAVConfigInfo *) const
The Config Info is a helper-class to handle version changes in GCS configuration files.
Definition: uavconfiginfo.h:53
UAVDataObject * clone(quint32 instID)
virtual void saveConfig(QSettings *) const