diff widgets/ModelDataTableDialog.cpp @ 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
line wrap: on
line diff
--- 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);