From b0d06e04e4f4a0c8645288d4a31449215ce58770 Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Thu, 17 Mar 2016 20:59:19 +0100 Subject: Store accounts in sink --- framework/domain/accountsmodel.h | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'framework/domain/accountsmodel.h') diff --git a/framework/domain/accountsmodel.h b/framework/domain/accountsmodel.h index a50c2e4a..9180bc09 100644 --- a/framework/domain/accountsmodel.h +++ b/framework/domain/accountsmodel.h @@ -20,11 +20,15 @@ #pragma once #include -#include +#include #include #include -class AccountsModel : public QAbstractListModel +namespace Sink { + class Query; +} + +class AccountsModel : public QIdentityProxyModel { Q_OBJECT @@ -32,8 +36,7 @@ public: AccountsModel(QObject *parent = Q_NULLPTR); ~AccountsModel(); - int rowCount(const QModelIndex &parent = QModelIndex()) const Q_DECL_OVERRIDE; - QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const Q_DECL_OVERRIDE; + QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const; enum Roles { Name = Qt::UserRole + 1, @@ -42,7 +45,9 @@ public: }; Q_ENUMS(Roles) - QHash roleNames() const Q_DECL_OVERRIDE; + QHash roleNames() const; + private: - QStringList mAccounts; + void runQuery(const Sink::Query &query); + QSharedPointer mModel; }; -- cgit v1.2.3