summary refs log tree commit diff
path: root/include/RoomList.h
diff options
context:
space:
mode:
authorKonstantinos Sideris <sideris.konstantin@gmail.com>2017-04-11 17:45:47 +0300
committerKonstantinos Sideris <sideris.konstantin@gmail.com>2017-04-11 17:45:47 +0300
commit6468faa39eda494d83310bec4a557d29bf037f8a (patch)
treec4a2632730c99500871fbc3a8f5d746585507089 /include/RoomList.h
parentMake the timer single shot (diff)
downloadnheko-6468faa39eda494d83310bec4a557d29bf037f8a.tar.xz
Use only a MatrixClient as a shared pointer
Diffstat (limited to 'include/RoomList.h')
-rw-r--r--include/RoomList.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/include/RoomList.h b/include/RoomList.h

index 313fab9e..42ded171 100644 --- a/include/RoomList.h +++ b/include/RoomList.h
@@ -19,9 +19,11 @@ #define ROOMLIST_H #include <QImage> +#include <QSharedPointer> #include <QUrl> #include <QWidget> +#include "MatrixClient.h" #include "RoomInfo.h" #include "RoomInfoListItem.h" #include "Sync.h" @@ -36,26 +38,27 @@ class RoomList : public QWidget Q_OBJECT public: - explicit RoomList(QWidget *parent = 0); + RoomList(QSharedPointer<MatrixClient> client, QWidget *parent = 0); ~RoomList(); void setInitialRooms(const Rooms &rooms); - void updateRoomAvatar(const QString &roomid, const QImage &avatar_image); void clear(); RoomInfo extractRoomInfo(const State &room_state); signals: void roomChanged(const RoomInfo &info); - void fetchRoomAvatar(const QString &roomid, const QUrl &avatar_url); public slots: + void updateRoomAvatar(const QString &roomid, const QPixmap &img); void highlightSelectedRoom(const RoomInfo &info); private: Ui::RoomList *ui; QMap<QString, RoomInfoListItem *> rooms_; + + QSharedPointer<MatrixClient> client_; }; #endif // ROOMLIST_H