diff options
| author | Arno <am@disconnect.de> | 2010-07-24 17:15:00 +0200 | 
|---|---|---|
| committer | Arno <am@disconnect.de> | 2010-07-24 17:15:00 +0200 | 
| commit | ad322157891cec53a7b660629d7c244e75df81d5 (patch) | |
| tree | 0ffbc54d683f6e8c4925b669bb1732ac52cae0de /mappingtablewidget.cpp | |
| parent | b465c59cce7418968f268b9888a8236be281fda5 (diff) | |
| download | SheMov-ad322157891cec53a7b660629d7c244e75df81d5.tar.gz SheMov-ad322157891cec53a7b660629d7c244e75df81d5.tar.bz2 SheMov-ad322157891cec53a7b660629d7c244e75df81d5.zip | |
Act on doubleClick in FileTreeWidget
When doubleclicking a picture in FileTreeWidget the pictureViewer
is shown. Doubleclicking a movie file launches the default movie
player.
Since PictureViewer is now used in FileSystemWidget and
ArchiveTreeView a global instance is needed. The appropriate place
for this is a singleton. Since we already had a singleton for
QAbstractItemModels I renamed it to SmGlobals and added a function
to return a PictureViewer object. Renaming it was quite easy
thanks to QtCreator's ability to rename variable names.
Diffstat (limited to 'mappingtablewidget.cpp')
| -rw-r--r-- | mappingtablewidget.cpp | 4 | 
1 files changed, 2 insertions, 2 deletions
| diff --git a/mappingtablewidget.cpp b/mappingtablewidget.cpp index a96ff1d..85e0afb 100644 --- a/mappingtablewidget.cpp +++ b/mappingtablewidget.cpp @@ -17,7 +17,7 @@  #include "mappingtablewidget.h"  #include "mappingtablemodel.h" -#include "smmodelsingleton.h" +#include "smglobals.h"  MappingTableWidget::MappingTableWidget(const QString &table, QWidget *parent) : QWidget(parent), mTable(table), mCurrentId(-1){  	//the view @@ -28,7 +28,7 @@ MappingTableWidget::MappingTableWidget(const QString &table, QWidget *parent) :  	mView->setModel(mModel);  	//mapping model -	mMappingModel = static_cast<MappingTableModel*>(SmModelSingleton::instance()->model(mTable)); +	mMappingModel = static_cast<MappingTableModel*>(SmGlobals::instance()->model(mTable));  	//editor  	QHBoxLayout *itemEditLayout = new QHBoxLayout; | 
