summaryrefslogtreecommitdiffstats
path: root/qt-ui/mainwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'qt-ui/mainwindow.cpp')
-rw-r--r--qt-ui/mainwindow.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp
index 2ab3a6771..26f4d864d 100644
--- a/qt-ui/mainwindow.cpp
+++ b/qt-ui/mainwindow.cpp
@@ -16,6 +16,7 @@
#include <QApplication>
#include <QFontMetrics>
#include <QTextBrowser>
+#include <QTableView>
#include "divelistview.h"
#include "starwidget.h"
@@ -241,7 +242,10 @@ void MainWindow::on_actionToggleZoom_triggered()
void MainWindow::on_actionYearlyStatistics_triggered()
{
- qDebug("actionYearlyStatistics");
+ QTreeView *view = new QTreeView();
+ QAbstractItemModel *model = new YearlyStatisticsModel();
+ view->setModel(model);
+ view->show();
}
/**
@@ -438,7 +442,7 @@ void MainWindow::initialUiSetup()
/* if no width are set, use the calculated width for each column;
* for that to work we need to temporarily expand all rows */
ui->ListWidget->expandAll();
- for (i = TreeItemDT::NR; i < TreeItemDT::COLUMNS; i++) {
+ for (i = DiveTripModel::NR; i < DiveTripModel::COLUMNS; i++) {
QVariant width = settings.value(QString("colwidth%1").arg(i));
if (width.isValid())
ui->ListWidget->setColumnWidth(i, width.toInt());
@@ -527,7 +531,7 @@ void MainWindow::writeSettings()
settings.endGroup();
settings.beginGroup("ListWidget");
- for (i = TreeItemDT::NR; i < TreeItemDT::COLUMNS; i++)
+ for (i = DiveTripModel::NR; i < DiveTripModel::COLUMNS; i++)
if (!ui->ListWidget->isColumnHidden(i))
settings.setValue(QString("colwidth%1").arg(i), ui->ListWidget->columnWidth(i));
settings.endGroup();