Debian Codegraph @

src/gui/settingsDialog/ApplicationSettings.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_APPLICATIONSETTINGS_H
21 #define KSNIP_APPLICATIONSETTINGS_H
22
23 #include <QGroupBox>
24 #include <QCheckBox>
25 #include <QLineEdit>
26 #include <QComboBox>
27 #include <QLabel>
28 #include <QPushButton>
29 #include <QGridLayout>
30 #include <QStyleFactory>
31 #include <QFileDialog>
32
33 #include "src/backend/config/IConfig.h"
34 #include "src/common/helper/EnumTranslator.h"
35 #include "src/widgets/CustomSpinBox.h"
36 #include "src/common/adapter/fileDialog/IFileDialogService.h"
37
38 class ApplicationSettings : public QGroupBox
39 {
40 Q_OBJECT
41 public:
42 explicit ApplicationSettings(const QSharedPointer<IConfig> &config, const QSharedPointer<IFileDialogService> &fileDialogService);
43 ~ApplicationSettings() override = default;
44 void saveSettings();
45
46 private:
47 QCheckBox *mAutoCopyToClipboardNewCapturesCheckbox;
48 QCheckBox *mRememberPositionCheckbox;
49 QCheckBox *mCaptureOnStartupCheckbox;
50 QCheckBox *mUseTabsCheckbox;
51 QCheckBox *mAutoHideTabsCheckbox;
52 QCheckBox *mUseSingleInstanceCheckBox;
53 QCheckBox *mAutoHideDocksCheckBox;
54 QCheckBox *mAutoResizeToContentCheckBox;
55 QCheckBox *mEnableDebugging;
56 QLabel *mApplicationStyleLabel;
57 QLabel *mResizeToContentDelayLabel;
58 QLabel *mTempDirectoryLabel;
59 QLineEdit *mTempDirectoryLineEdit;
60 QPushButton *mBrowseButton;
61 QComboBox *mApplicationStyleCombobox;
62 CustomSpinBox *mResizeToContentDelaySpinBox;
63 QGridLayout *mLayout;
64 QSharedPointer<IConfig> mConfig;
65 QSharedPointer<IFileDialogService> mFileDialogService;
66
67 void initGui();
68 void loadConfig();
69
70 private slots:
71 void useTabsChanged();
72 void chooseTempDirectory();
73 };
74
75 #endif //KSNIP_APPLICATIONSETTINGS_H