Add avatar support.

This commit is contained in:
Black Hat
2018-03-02 16:56:36 +08:00
parent 6a610e3808
commit d4c2a1ed50
10 changed files with 148 additions and 52 deletions

View File

@@ -12,28 +12,6 @@ namespace QMatrixClient {
class Room;
}
class RoomModel : public QObject
{
Q_OBJECT
Q_PROPERTY(QString name READ getName)
Q_PROPERTY(QString value READ getValue)
public:
explicit RoomModel(QString name, QString value);
QString getName() { return m_name; }
QString getValue() { return m_value; }
signals:
void nameChanged();
void valueChanged();
private:
QString m_name;
QString m_value;
};
class RoomListModel : public QAbstractListModel
{
Q_OBJECT
@@ -43,7 +21,7 @@ public:
~RoomListModel();
enum RoomModelRoles {
NameRole, ValueRole, IconRole
NameRole, ValueRole, AvatarRole
};
QHash<int, QByteArray> roleNames() const;