Debian Codegraph @

src/gui/settingsDialog/SnippingAreaSettings.h

raw symbols SCIP
1 /*
2 * Copyright (C) 2020 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_SNIPPINGAREASETTINGS_H
21 #define KSNIP_SNIPPINGAREASETTINGS_H
22
23 #include <QGroupBox>
24 #include <QCheckBox>
25 #include <QLabel>
26 #include <QGridLayout>
27 #include <QDoubleSpinBox>
28
29 #include "src/backend/config/IConfig.h"
30 #include "src/widgets/ColorButton.h"
31 #include "src/widgets/NumericComboBox.h"
32 #include "src/common/provider/scaledSizeProvider/IScaledSizeProvider.h"
33
34 class SnippingAreaSettings : public QGroupBox
35 {
36 Q_OBJECT
37 public:
38 explicit SnippingAreaSettings(const QSharedPointer<IConfig> &config, const QSharedPointer<IScaledSizeProvider> &scaledSizeProvider);
39 ~SnippingAreaSettings() override;
40 void saveSettings();
41
42 private:
43 QCheckBox *mFreezeImageWhileSnippingCheckbox;
44 QCheckBox *mSnippingAreaRulersCheckbox;
45 QCheckBox *mSnippingAreaPositionAndSizeInfoCheckbox;
46 QCheckBox *mSnippingAreaMagnifyingGlassCheckbox;
47 QCheckBox *mAllowResizingRectSelectionCheckbox;
48 QCheckBox *mShowSnippingAreaInfoTextCheckbox;
49 QCheckBox *mSnippingAreaOffsetEnabledCheckbox;
50 QLabel *mSnippingCursorSizeLabel;
51 QLabel *mSnippingCursorColorLabel;
52 QLabel *mSnippingAdornerColorLabel;
53 QLabel *mSnippingAreaTransparencyLabel;
54 QLabel *mSnippingAreaOffsetXLabel;
55 QLabel *mSnippingAreaOffsetYLabel;
56 ColorButton *mSnippingCursorColorButton;
57 ColorButton *mSnippingAdornerColorButton;
58 NumericComboBox *mSnippingCursorSizeCombobox;
59 QSpinBox *mSnippingAreaTransparencySpinBox;
60 QDoubleSpinBox *mSnippingAreaOffsetXSpinBox;
61 QDoubleSpinBox *mSnippingAreaOffsetYSpinBox;
62 QGridLayout *mLayout;
63 QSharedPointer<IConfig> mConfig;
64 QSharedPointer<IScaledSizeProvider> mScaledSizeProvider;
65
66 void initGui();
67 void loadConfig();
68
69 private slots:
70 void freezeImageWhileSnippingStateChanged();
71 void snippingAreaOffsetEnableStateChanged();
72 };
73
74 #endif //KSNIP_SNIPPINGAREASETTINGS_H