Port RoomList to TreeView

Use a tree model for the room list

closes network/neochat#156

BUG: 456643
This commit is contained in:
Tobias Fella
2024-02-19 20:09:43 +00:00
committed by James Graham
parent dae23ccd4b
commit fc6ea0b779
23 changed files with 1052 additions and 550 deletions

View File

@@ -5,7 +5,9 @@
#include <QDBusMetaType>
#include "controller.h"
#include "neochatroom.h"
#include "roomlistmodel.h"
#include "roommanager.h"
#include "windowcontroller.h"
@@ -27,6 +29,12 @@ RemoteImage Runner::serializeImage(const QImage &image)
Runner::Runner()
: QObject()
{
m_sourceModel = new RoomListModel(this);
m_model.setSourceModel(m_sourceModel);
connect(&Controller::instance(), &Controller::activeConnectionChanged, this, [this]() {
m_sourceModel->setConnection(Controller::instance().activeConnection());
});
qDBusRegisterMetaType<RemoteMatch>();
qDBusRegisterMetaType<RemoteMatches>();
qDBusRegisterMetaType<RemoteAction>();