dRonin  adbada4
dRonin GCS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Groups Pages
uavobjectbrowserconfiguration.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 
28 #ifndef UAVOBJECTBROWSERCONFIGURATION_H
29 #define UAVOBJECTBROWSERCONFIGURATION_H
30 
32 #include <QColor>
33 
34 using namespace Core;
35 
37 {
38  Q_OBJECT
39  Q_PROPERTY(
40  QColor m_recentlyUpdatedColor READ recentlyUpdatedColor WRITE setRecentlyUpdatedColor)
41  Q_PROPERTY(
42  QColor m_manuallyChangedColor READ manuallyChangedColor WRITE setManuallyChangedColor)
43  Q_PROPERTY(QColor m_notPresentOnHwColor READ notPresentOnHwColor WRITE setNotPresentOnHwColor)
44  Q_PROPERTY(bool m_onlyHighlightChangedValues READ onlyHighlightChangedValues WRITE
45  setOnlyHighlightChangedValues)
46  Q_PROPERTY(bool m_useScientificView READ scientificView WRITE setScientificView)
47  Q_PROPERTY(bool m_showMetaData READ showMetaData WRITE setShowMetaData)
48  Q_PROPERTY(bool m_hideNotPresentOnHw READ hideNotPresentOnHw WRITE setHideNotPresentOnHw)
49 
50 public:
51  explicit UAVObjectBrowserConfiguration(QString classId, QSettings *qSettings = nullptr,
52  QObject *parent = nullptr);
53 
54  void saveConfig(QSettings *settings) const;
56 
57  QColor recentlyUpdatedColor() const { return m_recentlyUpdatedColor; }
58  QColor manuallyChangedColor() const { return m_manuallyChangedColor; }
59  QColor notPresentOnHwColor() const { return m_notPresentOnHwColor; }
60  int recentlyUpdatedTimeout() const { return m_recentlyUpdatedTimeout; }
61  bool onlyHighlightChangedValues() const { return m_onlyHighlightChangedValues; }
62  bool scientificView() const { return m_useScientificView; }
63  bool showMetaData() const { return m_showMetaData; }
64  bool hideNotPresentOnHw() const { return m_hideNotPresentOnHw; }
65 
66 signals:
67 
68 public slots:
69  void setRecentlyUpdatedColor(QColor color) { m_recentlyUpdatedColor = color; }
70  void setManuallyChangedColor(QColor color) { m_manuallyChangedColor = color; }
71  void setNotPresentOnHwColor(QColor color) { m_notPresentOnHwColor = color; }
72  void setOnlyHighlightChangedValues(bool highlight) { m_onlyHighlightChangedValues = highlight; }
73  void setScientificView(bool value) { m_useScientificView = value; }
74  void setShowMetaData(bool value) { m_showMetaData = value; }
75  void setHideNotPresentOnHw(bool value) { m_hideNotPresentOnHw = value; }
76 private:
77  QColor m_recentlyUpdatedColor;
78  QColor m_manuallyChangedColor;
79  QColor m_notPresentOnHwColor;
80  int m_recentlyUpdatedTimeout;
81  bool m_onlyHighlightChangedValues;
82  bool m_useScientificView;
83  bool m_showMetaData;
84  bool m_hideNotPresentOnHw;
85 };
86 
87 #endif // UAVOBJECTBROWSERCONFIGURATION_H
UAVDataObject * clone(quint32 instID)