Added a ModelSummary class to make the overview over the model content accessible via QProperty system & a SummaryWidget to show this information. Only property rowCount as a proof of concept. Other properties will follow.
This commit is contained in:
@ -17,11 +17,10 @@
|
||||
#include "data/settingshandler.h"
|
||||
#include "model/generalsortfiltermodel.h"
|
||||
#include "model/metadata.h"
|
||||
#include "model/modelsummary.h"
|
||||
#include "model/tablemodel.h"
|
||||
#include "network/servercommunicator.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
GenericCore::GenericCore() {
|
||||
qDebug() << "Creating core...";
|
||||
|
||||
@ -97,6 +96,8 @@ std::shared_ptr<GeneralSortFilterModel> GenericCore::getSortFilterModel() const
|
||||
return m_sortFilterModel;
|
||||
}
|
||||
|
||||
shared_ptr<ModelSummary> GenericCore::getModelSummary() const { return m_modelSummary; }
|
||||
|
||||
/**
|
||||
* Save items to default file (in standard location).
|
||||
* @brief GenericCore::saveItems Saves item fo file.
|
||||
@ -163,6 +164,8 @@ void GenericCore::setupModels() {
|
||||
m_mainModel = make_shared<TableModel>(m_modelUndoStack, this);
|
||||
m_sortFilterModel = make_shared<GeneralSortFilterModel>(m_mainModel);
|
||||
|
||||
m_modelSummary = make_shared<ModelSummary>(m_mainModel, this);
|
||||
|
||||
/// QAbstractItemModelTester
|
||||
#ifdef QT_DEBUG
|
||||
m_mainModelTester = make_unique<QAbstractItemModelTester>(
|
||||
|
||||
Reference in New Issue
Block a user