hemeraqmlappliance.h
1 #ifndef HEMERA_QML_SETTINGS_HEMERAQMLAPPLIANCE_H
2 #define HEMERA_QML_SETTINGS_HEMERAQMLAPPLIANCE_H
3 
4 #include <QtCore/QObject>
5 
15 namespace Hemera {
16 
17 namespace Qml {
18 
19 namespace Settings {
20 
21 class Orbit;
22 
29 class UpdateStrategy : public QObject
30 {
31  Q_OBJECT
32  Q_DISABLE_COPY(UpdateStrategy)
33 
34 public:
40  enum Strategy {
59  AllowOTA = 1 << 4
60  };
61  Q_ENUMS(Strategy)
62  Q_DECLARE_FLAGS(Strategies, Strategy)
63  Q_FLAGS(Strategies)
64 };
65 
90 class Appliance : public QObject
91 {
92  Q_OBJECT
93  Q_DISABLE_COPY(Appliance)
94 
95 
100  Q_PROPERTY(QString activeOrbit MEMBER m_activeOrbit NOTIFY activeOrbitChanged)
102  Q_PROPERTY(QString name MEMBER m_name)
107  Q_PROPERTY(QString residentOrbit MEMBER m_residentOrbit)
112  Q_PROPERTY(Hemera::Qml::Settings::UpdateStrategy::Strategies updateStrategies MEMBER m_updateStrategies)
113 
114 public:
115  explicit Appliance(QObject *parent = 0);
116  virtual ~Appliance();
117 
118 Q_SIGNALS:
119  void activeOrbitChanged();
120 
121 private:
122  QString m_activeOrbit;
123  QString m_name;
124  QString m_residentOrbit;
125  UpdateStrategy::Strategies m_updateStrategies;
126 };
127 
128 }
129 
130 }
131 
132 }
133 
134 Q_DECLARE_OPERATORS_FOR_FLAGS(Hemera::Qml::Settings::UpdateStrategy::Strategies)
135 
136 #endif // HEMERA_QML_SETTINGS_HEMERAQMLAPPLIANCE_H
Definition: hemeraqmlappliance.cpp:3
Automatically download updates (both system and applications) when idle. Does not imply CheckForUpdat...
Definition: hemeraqmlappliance.h:50
Automatically check for updates when idle.
Definition: hemeraqmlappliance.h:48
Appliance is the base object for Gravity configurations. Each system is an appliance, and as such a system is represented by one and only one appliance.
Definition: hemeraqmlappliance.h:90
Allows removable media (e.g.: USB keys) as a source for fetching updates.
Definition: hemeraqmlappliance.h:57
Allows Over The Air (remote) as a source for fetching updates.
Definition: hemeraqmlappliance.h:59
Strategy
Defines the update strategy for the system.
Definition: hemeraqmlappliance.h:40
Container for UpdateStrategy enum.
Definition: hemeraqmlappliance.h:29