Mercurial > hg > svgui
comparison widgets/ModelDataTableDialog.cpp @ 1479:9bf8aa2916e9 by-id
Further ModelId updates
author | Chris Cannam |
---|---|
date | Wed, 03 Jul 2019 14:20:42 +0100 |
parents | d39db4673676 |
children | 873ff035364c |
comparison
equal
deleted
inserted
replaced
1478:d39db4673676 | 1479:9bf8aa2916e9 |
---|---|
34 #include <QAction> | 34 #include <QAction> |
35 #include <QToolBar> | 35 #include <QToolBar> |
36 | 36 |
37 #include <iostream> | 37 #include <iostream> |
38 | 38 |
39 ModelDataTableDialog::ModelDataTableDialog(TabularModel *model, | 39 ModelDataTableDialog::ModelDataTableDialog(ModelId tabularModelId, |
40 QString title, QWidget *parent) : | 40 QString title, QWidget *parent) : |
41 QMainWindow(parent), | 41 QMainWindow(parent), |
42 m_currentRow(0), | 42 m_currentRow(0), |
43 m_trackPlayback(true) | 43 m_trackPlayback(true) |
44 { | 44 { |
117 subgrid->addWidget(m_tableView, 0, 0, 1, 3); | 117 subgrid->addWidget(m_tableView, 0, 0, 1, 3); |
118 | 118 |
119 m_tableView->setSortingEnabled(true); | 119 m_tableView->setSortingEnabled(true); |
120 m_tableView->sortByColumn(0, Qt::AscendingOrder); | 120 m_tableView->sortByColumn(0, Qt::AscendingOrder); |
121 | 121 |
122 m_table = new ModelDataTableModel(model); | 122 m_table = new ModelDataTableModel(tabularModelId); |
123 m_tableView->setModel(m_table); | 123 m_tableView->setModel(m_table); |
124 | 124 |
125 m_tableView->horizontalHeader()->setStretchLastSection(true); | 125 m_tableView->horizontalHeader()->setStretchLastSection(true); |
126 | 126 |
127 connect(m_tableView, SIGNAL(clicked(const QModelIndex &)), | 127 connect(m_tableView, SIGNAL(clicked(const QModelIndex &)), |