-
Notifications
You must be signed in to change notification settings - Fork 10
/
info.hpp
47 lines (36 loc) · 1.48 KB
/
info.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#ifndef MORSE_INFO_HPP
#define MORSE_INFO_HPP
#include <QObject>
class MorseInfo : public QObject
{
Q_OBJECT
Q_PROPERTY(QString version READ version CONSTANT)
Q_PROPERTY(QString buildVersion READ buildVersion CONSTANT)
Q_PROPERTY(quint32 appId READ appId CONSTANT)
Q_PROPERTY(QString appHash READ appHash CONSTANT)
Q_PROPERTY(QString accountDataDirectory READ accountDataDirectory NOTIFY accountDataDirectoryChanged)
Q_PROPERTY(QString accountDataFilePath READ accountDataFilePath NOTIFY accountDataDirectoryChanged)
Q_PROPERTY(QString accountIdentifier READ accountIdentifier WRITE setAccountIdentifier NOTIFY accountIdentifierChanged)
Q_PROPERTY(QString serverIdentifier READ serverIdentifier WRITE setServerIdentifier NOTIFY serverIdentifierChanged)
public:
explicit MorseInfo(QObject *parent = nullptr);
static QString version();
static QString buildVersion();
static quint32 appId();
static QString appHash();
QString accountDataDirectory() const;
QString accountDataFilePath() const;
QString accountIdentifier() const;
QString serverIdentifier() const;
public slots:
void setAccountIdentifier(const QString &newAccountIdentifier);
void setServerIdentifier(const QString &newServerIdentifier);
signals:
void accountDataDirectoryChanged();
void accountIdentifierChanged();
void serverIdentifierChanged();
protected:
QString m_accountIdentifier;
QString m_serverIdentifier;
};
#endif // MORSE_INFO_HPP