move from tabs to spaces
This commit is contained in:
parent
a6aad07f05
commit
fa45072998
86 changed files with 2611 additions and 2486 deletions
|
|
@ -11,30 +11,33 @@ class Microcontroller;
|
|||
|
||||
class Relay : public Item
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_OBJECT
|
||||
private:
|
||||
static Microcontroller* micro_;
|
||||
static Microcontroller* micro_;
|
||||
|
||||
uint8_t id_;
|
||||
uint16_t address_;
|
||||
uint8_t id_;
|
||||
uint16_t address_;
|
||||
|
||||
public slots:
|
||||
|
||||
virtual void setValue(uint8_t value);
|
||||
void on();
|
||||
void off();
|
||||
void toggle();
|
||||
virtual void setValue(uint8_t value);
|
||||
void on();
|
||||
void off();
|
||||
void toggle();
|
||||
|
||||
public:
|
||||
Relay(uint8_t id = 0, QString name = "", uint16_t address = 0, bool state = false, QObject* parent = nullptr);
|
||||
Relay(uint8_t id = 0, QString name = "", uint16_t address = 0, bool state = false, QObject* parent = nullptr);
|
||||
|
||||
uint16_t getAddress() const;
|
||||
uint8_t getId() const;
|
||||
void setId(uint8_t id);
|
||||
uint16_t getAddress() const;
|
||||
uint8_t getId() const;
|
||||
void setId(uint8_t id);
|
||||
|
||||
inline static void setMicrocontroller(Microcontroller* micro){ micro_ = micro; }
|
||||
inline static void setMicrocontroller(Microcontroller* micro)
|
||||
{
|
||||
micro_ = micro;
|
||||
}
|
||||
|
||||
virtual void store(QJsonObject& json);
|
||||
virtual void load(const QJsonObject& json, const bool preserve = false);
|
||||
virtual void store(QJsonObject& json);
|
||||
virtual void load(const QJsonObject& json, const bool preserve = false);
|
||||
};
|
||||
#endif // RELAY_H
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue