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:
@ -16,10 +16,12 @@
|
||||
#include "genericcore.h"
|
||||
#include "model/generalsortfiltermodel.h"
|
||||
#include "model/metadata.h"
|
||||
#include "model/modelsummary.h"
|
||||
#include "model/tablemodel.h"
|
||||
#include "widgets/biddingroundcontrol.h"
|
||||
#include "widgets/comboboxdelegate.h"
|
||||
#include "widgets/spinboxdelegate.h"
|
||||
#include "widgets/summarywidget.h"
|
||||
|
||||
static int intColumnWidth = 30;
|
||||
|
||||
@ -349,6 +351,8 @@ void MainWindow::setupModelViews() {
|
||||
ui->tableView->setModel((QAbstractItemModel*)m_proxyModel.get());
|
||||
ui->tableView->setSortingEnabled(true);
|
||||
ui->tableView->setColumnWidth(0, intColumnWidth);
|
||||
|
||||
m_modelSummary = m_core->getModelSummary();
|
||||
}
|
||||
|
||||
void MainWindow::createActions() {
|
||||
@ -554,5 +558,8 @@ void MainWindow::setupEventTab() {
|
||||
connect(m_core.get(), &GenericCore::currentBiddingRoundChanged, m_biddingRoundControl.get(),
|
||||
&BiddingRoundControl::onCurrentBiddingRoundChanged);
|
||||
|
||||
SummaryWidget* summaryWidget = new SummaryWidget(m_modelSummary, this);
|
||||
containerLayout->addWidget(summaryWidget);
|
||||
|
||||
ui->tabWidget->insertTab(0, containerWidget, "Event (&1)");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user