QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
SettingsFact.h
Go to the documentation of this file.
1#pragma once
2
3#include <QtCore/QLoggingCategory>
4#include <QtCore/QObject>
5#include <QtCore/QString>
6
7#include "Fact.h"
8
9Q_DECLARE_LOGGING_CATEGORY(SettingsFactLog)
10
11
12class SettingsFact : public Fact
13{
14 Q_OBJECT
15 Q_PROPERTY(bool visible MEMBER _visible CONSTANT)
16
17public:
18 explicit SettingsFact(QObject *parent = nullptr);
19 explicit SettingsFact(const QString &settingsGroup, FactMetaData *metaData, QObject *parent = nullptr);
20 explicit SettingsFact(const SettingsFact &other, QObject *parent = nullptr);
22
23 const SettingsFact &operator=(const SettingsFact &other);
24
25 // Must be called before any references to fact
26 void setVisible(bool visible) { _visible = visible; }
27
28private slots:
29 void _rawValueChanged(const QVariant &value);
30
31private:
32 QString _settingsGroup;
33 bool _visible = true;
34};
Q_DECLARE_LOGGING_CATEGORY(AndroidSerialLog)
A Fact is used to hold a single value within the system.
Definition Fact.h:19
A SettingsFact is Fact which holds a QSettings value.
void setVisible(bool visible)