summaryrefslogtreecommitdiff
path: root/src/serverinfo.h
diff options
context:
space:
mode:
authorisanae <14251494+isanae@users.noreply.github.com>2019-08-26 00:21:41 -0400
committerisanae <14251494+isanae@users.noreply.github.com>2019-08-26 00:21:41 -0400
commit7395fbb7544740a136884e103cb0829bd10b5655 (patch)
tree06131c395344d1bd08eb3a8b40e4f22a66b66e69 /src/serverinfo.h
parentb1687380c5c10342699f95361e30f18a32bad585 (diff)
made ServerInfo a class
moved server functions together in Settings
Diffstat (limited to 'src/serverinfo.h')
-rw-r--r--src/serverinfo.h20
1 files changed, 15 insertions, 5 deletions
diff --git a/src/serverinfo.h b/src/serverinfo.h
index 8e5e935a..79b90e77 100644
--- a/src/serverinfo.h
+++ b/src/serverinfo.h
@@ -5,12 +5,22 @@
#include <QDate>
#include <QMetaType>
-struct ServerInfo
+class ServerInfo
{
- QString name;
- bool premium;
- QDate lastSeen;
- bool preferred;
+public:
+ ServerInfo();
+ ServerInfo(QString name, bool premium, QDate lastSeen, bool preferred);
+
+ const QString& name() const;
+ bool isPremium() const;
+ const QDate& lastSeen() const;
+ bool isPreferred() const;
+
+private:
+ QString m_name;
+ bool m_premium;
+ QDate m_lastSeen;
+ bool m_preferred;
};
Q_DECLARE_METATYPE(ServerInfo)