From 9c89e2f83415c876f28f15ebff31c8325754a936 Mon Sep 17 00:00:00 2001 From: Arno Date: Sun, 27 Nov 2016 06:52:50 +0100 Subject: Add picture viewer Opens on doubleclick when it's image/*. --- globals.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'globals.cpp') diff --git a/globals.cpp b/globals.cpp index 2bdb175..53bd1f0 100644 --- a/globals.cpp +++ b/globals.cpp @@ -1,6 +1,7 @@ #include #include "globals.h" +#include "viewer.h" Globals *Globals::mInstance = nullptr; @@ -19,4 +20,11 @@ QAction *Globals::action(int actionType){ return mActions.value(actionType); } -Globals::Globals(){} +Viewer *Globals::viewer(){ + if(!mViewer){ + mViewer = new Viewer; + } + return mViewer; +} + +Globals::Globals() : mViewer(nullptr) {} -- cgit v1.2.3-70-g09d2