Tree Model 2 Electric Boogaloo

This draws heavily on what @carlschwan did in network/neochat!1579 but I found it easier to start again and grab the bits as I needed them plus some other copying from what I did in the Space tree model.

From my current limited testing this seems to work nicely try and break it.
This commit is contained in:
James Graham
2024-04-02 14:44:20 +00:00
parent 6373186c15
commit 6cfab9e3ea
7 changed files with 308 additions and 60 deletions

View File

@@ -7,6 +7,7 @@
#include <QPointer>
#include "enums/neochatroomtype.h"
#include "roomtreeitem.h"
namespace Quotient
{
@@ -83,9 +84,11 @@ Q_SIGNALS:
private:
QPointer<NeoChatConnection> m_connection;
QMap<NeoChatRoomType::Types, QList<QPointer<NeoChatRoom>>> m_rooms;
std::unique_ptr<RoomTreeItem> m_rootItem;
void initializeCategories();
RoomTreeItem *getItem(const QModelIndex &index) const;
void resetModel();
void connectRoomSignals(NeoChatRoom *room);
void newRoom(Quotient::Room *room);