| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 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 |