serverselector.h 795 Bytes
Newer Older
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
#ifndef SERVERSELECTOR_H
#define SERVERSELECTOR_H

#include <QObject>
#include <QMap>
#include <QSettings>

#include "rocketchatserver.h"

class ServerSelector : public QObject
{
    Q_OBJECT
public:
    explicit ServerSelector( QSharedPointer<RocketChatServerData> pServer);

    Q_INVOKABLE void selectServer( QString pServerAddress );
    Q_INVOKABLE void addServer( QString pName, QString pServer );
    Q_INVOKABLE QVariantList getServerList();
    Q_INVOKABLE void removeServer( QString pServerAddress );

private:
     QSharedPointer<RocketChatServerData> mServer;
     QVariantList mServers;
     QSettings mSettings;

signals:
    void serverSelected(QSharedPointer<RocketChatServerData> server);
    void newServerList(QVariantList list);

public slots:
};

#endif // SERVERSELECTOR_H