-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathglobalvariables.h
132 lines (90 loc) · 3.04 KB
/
globalvariables.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
/*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef GLOBALVARIABLES_H
#define GLOBALVARIABLES_H
#include <QObject>
#include <QRect>
#include <QMap>
// Some global variables
class GlobalVariables {
public:
GlobalVariables() {
rotation = 0;
skipTrayIcon = false;
windowMaximised = true;
blocked = false;
zoomed = false;
zoomedByMouse = true;
zoomedImgAtLeastOnce = false;
originalImageSize = QSize();
systemSh << "Escape" << "Enter" << "Return" << "Ctrl+s" << "Left" << "Right" << "Up" << "Down" << "Alt+Up" << "Alt+Left" << "Alt+Right" << "Alt+1" << "Alt+2" << "Alt+3" << "Alt+4" << "Alt+5" << "Ctrl+Tab" << "Ctrl+Shift+Tab";
flipVer = false;
flipHor = false;
exifRead = false;
zoomToActualSize = false;
restoringFromTrayNoResize = 0;
startupMessageInstallUpdateShown = 0;
store_rotation.clear();
store_flipHor.clear();
store_flipVer.clear();
// rotation indicator
/* tosave.clear(); */
fileBeforeEmptyFilter = "";
curDir = "";
}
bool verbose;
// The current file
QString currentfile;
// the current directory (used suring filtering)
QString curDir;
// Are we ignoring the tray icon and just exit
bool skipTrayIcon;
// The original image size
QSize originalImageSize;
// The current rotation of the image
int rotation;
// Is current image zoomed? By Mouse or key combo?
bool zoomed;
bool zoomedByMouse;
// Is a widget opened?
bool blocked;
// This list holds all shortcuts that are to be set up as system shortcuts
QStringList systemSh;
// Was the current image zoomed in any way
bool zoomedImgAtLeastOnce;
// Is the current image flipped?
bool flipVer;
bool flipHor;
// The "read" is in past tense
bool exifRead;
// Currently zoomed to actual size
bool zoomToActualSize;
// When restoring PhotoQt from system tray, it emits a resizeEvent -> ignore it
uint restoringFromTrayNoResize;
// Is a slideshow running
bool slideshowRunning;
// Is the startup message shown (displayed after update/fresh install)
int startupMessageInstallUpdateShown;
bool windowMaximised;
// These two QMap's store the rotation/flipping of each image while it's being displayed (nothing changed permanently)
QMap<QString,int> store_rotation;
QMap<QString,bool> store_flipHor;
QMap<QString,bool> store_flipVer;
// rotation indicator
/* QMap<QString,bool> tosave;*/
QString fileBeforeEmptyFilter;
};
#endif // GLOBALVARIABLES_H