diff options
author | Thanos Doukoudakis <thanos.doukoudakis@isode.com> | 2018-07-02 11:33:41 (GMT) |
---|---|---|
committer | Thanos Doukoudakis <thanos.doukoudakis@isode.com> | 2018-07-19 12:13:09 (GMT) |
commit | 0011a649c6bf997dd3a5cf7fabe3c9733fc573f9 (patch) | |
tree | 14151eb85e0c276420e87f21e1caffca34f07ad4 /Swift/QtUI/QtSingleWindow.h | |
parent | 0d5cd98d372c6b9235b55cd8d16e93647c9d017f (diff) | |
download | swift-0011a649c6bf997dd3a5cf7fabe3c9733fc573f9.zip swift-0011a649c6bf997dd3a5cf7fabe3c9733fc573f9.tar.bz2 |
Add server avatars to multiaccount
This patch implements a Model/View/Delegate for the multiple accounts a
user might have. The list is shown on the left of the client, with an
avatar, status presence and unread message counter. Mouse over a server
avatar will show the user jid that was used to connect to the server.
Server avatars are currently using the default Swift logo, server
information are not connected with the actual data, and the presence
icon is not being rendered. Future patches will improve this and connect
to the actual server data.
Test-Information
Tested the changes in the UI in Windows 10 Qt5.8 and Ubuntu 16.04 Qt
5.6. Tested the status change, login, logout and saving account
information during startup.
Change-Id: I4aa86afffe6a02d589b47185cc587b2e09de7450
Diffstat (limited to 'Swift/QtUI/QtSingleWindow.h')
-rw-r--r-- | Swift/QtUI/QtSingleWindow.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/Swift/QtUI/QtSingleWindow.h b/Swift/QtUI/QtSingleWindow.h index 9a7e475..a707cd3 100644 --- a/Swift/QtUI/QtSingleWindow.h +++ b/Swift/QtUI/QtSingleWindow.h @@ -10,11 +10,14 @@ #include <QSplitter> #include <QStackedWidget> +#include <Swift/QtUI/ServerList/ServerListModel.h> namespace Swift { class QtChatTabs; class QtLoginWindow; class QtSettingsProvider; + class QtServerListView; + class ServerListModel; class QtSingleWindow : public QSplitter { Q_OBJECT @@ -32,7 +35,7 @@ namespace Swift { private slots: void handleSplitterMoved(); void handleTabsTitleChanged(const QString& title); - void handleListItemClicked(QListWidgetItem*); + void handleListItemClicked(const QModelIndex&); private: void handleGeometryChanged(); void restoreSplitters(); @@ -40,7 +43,9 @@ namespace Swift { private: QtSettingsProvider* settings_; - QListWidget* list_; + SwiftAccountData accountData_; + QtServerListView* serverList_; + ServerListModel* serverListModel_; QStackedWidget* loginWindows_; QStackedWidget* tabs_; }; |