Debian Codegraph @

src/gui/actions/Action.h

raw symbols SCIP
1 /*
2 * Copyright (C) 2021 Damir Porobic <[email protected]>
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18 */
19
20 #ifndef KSNIP_ACTION_H
21 #define KSNIP_ACTION_H
22
23 #include <QString>
24 #include <QKeySequence>
25
26 #include "src/common/enum/CaptureModes.h"
27
28 class Action
29 {
30 public:
31 Action();
32 ~Action() = default;
33
34 QString name() const;
35 void setName(const QString &name);
36
37 QKeySequence shortcut() const;
38 void setShortcut(const QKeySequence &keySequence);
39
40 bool isCaptureEnabled() const;
41 void setIsCaptureEnabled(bool enabled);
42
43 int captureDelay() const;
44 void setCaptureDelay(int delayInMs);
45
46 bool isPinImageEnabled() const;
47 void setIsPinImageEnabled(bool enabled);
48
49 CaptureModes captureMode() const;
50 void setCaptureMode(CaptureModes mode);
51
52 bool includeCursor() const;
53 void setIncludeCursor(bool enabled);
54
55 bool isUploadEnabled() const;
56 void setIsUploadEnabled(bool enabled);
57
58 bool isSaveEnabled() const;
59 void setIsSaveEnabled(bool enabled);
60
61 bool isCopyToClipboardEnabled() const;
62 void setIsCopyToClipboardEnabled(bool enabled);
63
64 bool isOpenDirectoryEnabled() const;
65 void setIsOpenDirectoryEnabled(bool enabled);
66
67 bool isHideMainWindowEnabled() const;
68 void setIsHideMainWindowEnabled(bool enabled);
69
70 bool isGlobalShortcut() const;
71 void setIsGlobalShortcut(bool isGlobal);
72
73 friend bool operator==(const Action& left, const Action& right);
74
75 private:
76 QString mName;
77 bool mIsCaptureEnabled;
78 int mCaptureDelay;
79 bool mIncludeCursor;
80 CaptureModes mCaptureMode;
81 bool mIsPinImageEnabled;
82 bool mIsUploadEnabled;
83 bool mIsSaveEnabled;
84 bool mIsCopyToClipboardEnabled;
85 bool mIsOpenDirectoryEnabled;
86 bool mIsHideMainWindowEnabled;
87 QKeySequence mShortcut;
88 bool mIsGlobalShortcut;
89 };
90
91 bool operator==(const Action& left, const Action& right);
92
93 #endif //KSNIP_ACTION_H