summaryrefslogtreecommitdiffstats
path: root/smglobals.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'smglobals.cpp')
-rw-r--r--smglobals.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/smglobals.cpp b/smglobals.cpp
index 5f26725..0cd0714 100644
--- a/smglobals.cpp
+++ b/smglobals.cpp
@@ -26,6 +26,7 @@
#include "filestreemodel.h"
#include "mappingtablemodel.h"
#include "seriesmetadatamodel.h"
+#include "mappingtreemodel.h"
#include "pictureviewer.h"
SmGlobals *SmGlobals::mInstance = 0;
@@ -86,7 +87,13 @@ QAbstractItemModel *SmGlobals::model(const QString &which){
SeriesMetadataModel *model = new SeriesMetadataModel(headers);
mModels.insert(which, model);
}
- }
+ }else if(which == "MappingTree"){
+ if(!mModels.contains("MappingTree")){
+ QStringList headers = QStringList() << tr("Name") << tr("Id") << tr("Date");
+ MappingTreeModel *model = new MappingTreeModel(headers);
+ mModels.insert(which, model);
+ }
+ }
return mModels.contains(which) ? mModels.value(which) : 0;
}