Explore rooms page RoundedItemDelegate

Move the explore rooms page to using the new RoundedItemDelegate
This commit is contained in:
James Graham
2023-09-10 09:00:57 +00:00
parent b2f592afeb
commit 323cd4962e
5 changed files with 109 additions and 78 deletions

View File

@@ -58,10 +58,10 @@ public:
* @brief Defines the model roles.
*/
enum EventRoles {
NameRole = Qt::DisplayRole + 1, /**< The name of the room. */
AvatarRole, /**< The source URL for the room's avatar. */
DisplayNameRole = Qt::DisplayRole + 1, /**< The name of the room. */
AvatarUrlRole, /**< The source URL for the room's avatar. */
TopicRole, /**< The room topic. */
RoomIDRole, /**< The room matrix ID. */
RoomIdRole, /**< The room matrix ID. */
AliasRole, /**< The room canonical alias. */
MemberCountRole, /**< The number of members in the room. */
AllowGuestsRole, /**< Whether the room allows guest users. */
@@ -76,7 +76,7 @@ public:
*
* @sa QAbstractItemModel::data
*/
[[nodiscard]] QVariant data(const QModelIndex &index, int role = NameRole) const override;
[[nodiscard]] QVariant data(const QModelIndex &index, int role = DisplayNameRole) const override;
/**
* @brief Number of rows in the model.