From ad322157891cec53a7b660629d7c244e75df81d5 Mon Sep 17 00:00:00 2001 From: Arno Date: Sat, 24 Jul 2010 17:15:00 +0200 Subject: 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. --- shemov.pro | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'shemov.pro') diff --git a/shemov.pro b/shemov.pro index 6569e7a..865e1d3 100644 --- a/shemov.pro +++ b/shemov.pro @@ -27,7 +27,7 @@ SOURCES = main.cpp \ pictureviewerinfoitem.cpp \ smtreeitem.cpp \ smtreemodel.cpp \ - smmodelsingleton.cpp \ + smglobals.cpp \ archivetreeview.cpp \ seriestreewidget.cpp \ seriestreemodel.cpp \ @@ -58,7 +58,7 @@ HEADERS = listitem.h \ pictureviewerinfoitem.h \ smtreeitem.h \ smtreemodel.h \ - smmodelsingleton.h \ + smglobals.h \ archivetreeview.h \ seriestreewidget.h \ seriestreemodel.h \ -- cgit v1.2.3-70-g09d2