changeset 398:80e279e4f9fe

* Add more data-editor support to various models
author Chris Cannam
date Thu, 12 Jun 2008 14:33:45 +0000
parents 2c59b0cd176b
children 80c7dd3c8dce
files view/ViewManager.cpp widgets/CommandHistory.cpp widgets/ModelDataTableDialog.cpp widgets/ModelDataTableDialog.h
diffstat 4 files changed, 11 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/view/ViewManager.cpp	Thu Jun 12 10:47:11 2008 +0000
+++ b/view/ViewManager.cpp	Thu Jun 12 14:33:45 2008 +0000
@@ -474,7 +474,9 @@
 {
     View *v = dynamic_cast<View *>(sender());
 
+#ifdef DEBUG_VIEW_MANAGER
     std::cerr << "ViewManager::viewCentreFrameChanged(" << f << ", " << locked << ", " << mode << "), view is " << v << std::endl;
+#endif
 
     if (locked) {
         m_globalCentreFrame = f;
--- a/widgets/CommandHistory.cpp	Thu Jun 12 10:47:11 2008 +0000
+++ b/widgets/CommandHistory.cpp	Thu Jun 12 14:33:45 2008 +0000
@@ -35,7 +35,7 @@
 
 #include <iostream>
 
-#define DEBUG_COMMAND_HISTORY 1
+//#define DEBUG_COMMAND_HISTORY 1
 
 CommandHistory *CommandHistory::m_instance = 0;
 
--- a/widgets/ModelDataTableDialog.cpp	Thu Jun 12 10:47:11 2008 +0000
+++ b/widgets/ModelDataTableDialog.cpp	Thu Jun 12 14:33:45 2008 +0000
@@ -17,6 +17,7 @@
 
 #include "data/model/ModelDataTableModel.h"
 #include "data/model/TabularModel.h"
+#include "data/model/Model.h"
 
 #include "CommandHistory.h"
 
@@ -30,7 +31,7 @@
 
 #include <iostream>
 
-ModelDataTableDialog::ModelDataTableDialog(TabularModel *model, QWidget *parent) :
+ModelDataTableDialog::ModelDataTableDialog(TabularModel *model, QString title, QWidget *parent) :
     QMainWindow(parent)
 {
     setWindowTitle(tr("Data Editor"));
@@ -45,7 +46,11 @@
     mainFrame->setLayout(grid);
     
     QGroupBox *box = new QGroupBox;
-    box->setTitle(tr("Layer Data"));
+    if (title != "") {
+        box->setTitle(title);
+    } else {
+        box->setTitle(tr("Data in Layer"));
+    }
     grid->addWidget(box, 0, 0);
     grid->setRowStretch(0, 15);
 
--- a/widgets/ModelDataTableDialog.h	Thu Jun 12 10:47:11 2008 +0000
+++ b/widgets/ModelDataTableDialog.h	Thu Jun 12 14:33:45 2008 +0000
@@ -29,7 +29,7 @@
     Q_OBJECT
     
 public:
-    ModelDataTableDialog(TabularModel *model, QWidget *parent = 0);
+    ModelDataTableDialog(TabularModel *model, QString title, QWidget *parent =0);
     ~ModelDataTableDialog();
 
 signals: