Somewhat better login logic.

This commit is contained in:
Black Hat
2018-09-13 08:22:41 +08:00
parent 2d2d35fcf5
commit 5890a0e133
6 changed files with 22 additions and 2 deletions

View File

@@ -17,6 +17,8 @@ class Controller : public QObject {
Q_OBJECT
Q_PROPERTY(bool busy READ busy WRITE setBusy NOTIFY busyChanged)
Q_PROPERTY(int accountCount READ accountCount NOTIFY connectionAdded NOTIFY
connectionDropped)
public:
explicit Controller(QObject* parent = nullptr);
@@ -40,6 +42,8 @@ class Controller : public QObject {
}
}
int accountCount() { return m_connections.count(); }
Q_INVOKABLE QColor color(QString userId);
Q_INVOKABLE void setColor(QString userId, QColor newColor);
@@ -66,6 +70,7 @@ class Controller : public QObject {
void toggleWindow();
void connectionAdded(Connection* conn);
void connectionDropped(Connection* conn);
void initiated();
public slots:
void logout(Connection* conn);