Debian Codegraph @

src/gui/settingsDialog/HotKeySettings.h

raw symbols SCIP
1 /*
2 * Copyright (C) 2019 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_HOTKEYSETTINGS_H
21 #define KSNIP_HOTKEYSETTINGS_H
22
23 #include <QGroupBox>
24 #include <QCheckBox>
25 #include <QLabel>
26 #include <QGridLayout>
27 #include <QPushButton>
28
29 #include "src/backend/config/IConfig.h"
30 #include "src/widgets/KeySequenceLineEdit.h"
31 #include "src/gui/globalHotKeys/HotKeyMap.h"
32
33 class HotKeySettings : public QGroupBox
34 {
35 Q_OBJECT
36 public:
37 explicit HotKeySettings(const QList<CaptureModes> &captureModes, const QSharedPointer<IPlatformChecker> &platformChecker, const QSharedPointer<IConfig> &config);
38 ~HotKeySettings() override;
39 void saveSettings();
40
41 private:
42 QCheckBox *mEnableGlobalHotKeysCheckBox;
43 QLabel *mRectAreaLabel;
44 QLabel *mLastRectAreaLabel;
45 QLabel *mFullScreenLabel;
46 QLabel *mCurrentScreenLabel;
47 QLabel *mActiveWindowLabel;
48 QLabel *mWindowUnderCursorLabel;
49 QLabel *mPortalLabel;
50 KeySequenceLineEdit *mRectAreaKeySequenceLineEdit;
51 KeySequenceLineEdit *mLastRectAreaKeySequenceLineEdit;
52 KeySequenceLineEdit *mFullScreenKeySequenceLineEdit;
53 KeySequenceLineEdit *mCurrentScreenKeySequenceLineEdit;
54 KeySequenceLineEdit *mActiveWindowKeySequenceLineEdit;
55 KeySequenceLineEdit *mWindowUnderCursorKeySequenceLineEdit;
56 KeySequenceLineEdit *mPortalKeySequenceLineEdit;
57 QPushButton *mRectAreaClearPushButton;
58 QPushButton *mLastRectAreaClearPushButton;
59 QPushButton *mFullScreenClearPushButton;
60 QPushButton *mCurrentScreenClearPushButton;
61 QPushButton *mActiveWindowClearPushButton;
62 QPushButton *mWindowUnderCursorClearPushButton;
63 QPushButton *mPortalClearPushButton;
64 QGridLayout *mLayout;
65 QList<CaptureModes> mCaptureModes;
66 QSharedPointer<IConfig> mConfig;
67 QSharedPointer<IPlatformChecker> mPlatformChecker;
68
69 void initGui();
70 void loadConfig();
71
72 private slots:
73 void globalHotKeysStateChanged();
74 };
75
76
77 #endif //KSNIP_HOTKEYSETTINGS_H