# HG changeset patch # User Chris Cannam # Date 1213281225 0 # Node ID 80e279e4f9febf71d7e24dd8b3520c204f71e342 # Parent 2c59b0cd176b455eeafe1015532393269de0deef * Add more data-editor support to various models diff -r 2c59b0cd176b -r 80e279e4f9fe view/ViewManager.cpp --- 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(sender()); +#ifdef DEBUG_VIEW_MANAGER std::cerr << "ViewManager::viewCentreFrameChanged(" << f << ", " << locked << ", " << mode << "), view is " << v << std::endl; +#endif if (locked) { m_globalCentreFrame = f; diff -r 2c59b0cd176b -r 80e279e4f9fe widgets/CommandHistory.cpp --- 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 -#define DEBUG_COMMAND_HISTORY 1 +//#define DEBUG_COMMAND_HISTORY 1 CommandHistory *CommandHistory::m_instance = 0; diff -r 2c59b0cd176b -r 80e279e4f9fe widgets/ModelDataTableDialog.cpp --- 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 -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); diff -r 2c59b0cd176b -r 80e279e4f9fe widgets/ModelDataTableDialog.h --- 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: