changeset 395:33c2f268c950

* reorganise tabular data editor model support
author Chris Cannam
date Wed, 11 Jun 2008 16:13:25 +0000
parents 592d692b4f8b
children 2669267fb7ea
files widgets/AudioDial.cpp widgets/ModelDataTableDialog.cpp widgets/ModelDataTableDialog.h
diffstat 3 files changed, 6 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/widgets/AudioDial.cpp	Wed Jun 11 12:54:18 2008 +0000
+++ b/widgets/AudioDial.cpp	Wed Jun 11 16:13:25 2008 +0000
@@ -515,7 +515,7 @@
              tr("Enter new value"),
              tr("Enter a new value from %1 to %2:")
              .arg(minimum()).arg(maximum()),
-             value(), minimum(), maximum(), pageStep(), &ok);
+             value(), minimum(), maximum(), singleStep(), &ok);
         
         if (ok) {
             setValue(newPosition);
--- a/widgets/ModelDataTableDialog.cpp	Wed Jun 11 12:54:18 2008 +0000
+++ b/widgets/ModelDataTableDialog.cpp	Wed Jun 11 16:13:25 2008 +0000
@@ -16,6 +16,7 @@
 #include "ModelDataTableDialog.h"
 
 #include "data/model/ModelDataTableModel.h"
+#include "data/model/TabularModel.h"
 
 #include "CommandHistory.h"
 
@@ -29,7 +30,7 @@
 
 #include <iostream>
 
-ModelDataTableDialog::ModelDataTableDialog(Model *model, QWidget *parent) :
+ModelDataTableDialog::ModelDataTableDialog(TabularModel *model, QWidget *parent) :
     QDialog(parent)
 {
     setWindowTitle(tr("Data Editor"));
@@ -54,7 +55,7 @@
     m_tableView->verticalHeader()->hide();
 //    m_tableView->horizontalHeader()->setResizeMode(QHeaderView::ResizeToContents);
 //    m_tableView->setShowGrid(false);
-//    m_tableView->setSortingEnabled(true);
+    m_tableView->setSortingEnabled(true);
 
     m_table = new ModelDataTableModel(model);
     m_tableView->setModel(m_table);
--- a/widgets/ModelDataTableDialog.h	Wed Jun 11 12:54:18 2008 +0000
+++ b/widgets/ModelDataTableDialog.h	Wed Jun 11 16:13:25 2008 +0000
@@ -18,7 +18,7 @@
 
 #include <QDialog>
 
-class Model;
+class TabularModel;
 class ModelDataTableModel;
 class QTableView;
 class QModelIndex;
@@ -29,7 +29,7 @@
     Q_OBJECT
     
 public:
-    ModelDataTableDialog(Model *model, QWidget *parent = 0);
+    ModelDataTableDialog(TabularModel *model, QWidget *parent = 0);
     ~ModelDataTableDialog();
 
 signals: