Debian Codegraph @

src/gui/settingsDialog/AnnotationSettings.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_ANNOTATIONSETTINGS_H
21 #define KSNIP_ANNOTATIONSETTINGS_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/backend/WatermarkImageLoader.h"
31 #include "src/widgets/NumericComboBox.h"
32 #include "src/widgets/ColorButton.h"
33 #include "src/common/provider/scaledSizeProvider/IScaledSizeProvider.h"
34
35 class AnnotationSettings : public QGroupBox
36 {
37 Q_OBJECT
38 public:
39 explicit AnnotationSettings(const QSharedPointer<IConfig> &config, const QSharedPointer<IScaledSizeProvider> &scaledSizeProvider);
40 ~AnnotationSettings() override;
41 void saveSettings();
42
43 private:
44 QCheckBox *mSmoothPathCheckbox;
45 QCheckBox *mRememberToolSelectionCheckBox;
46 QCheckBox *mSwitchToSelectToolAfterDrawingItemCheckBox;
47 QCheckBox *mNumberToolSeedChangeUpdatesAllItemsCheckBox;
48 QCheckBox *mSelectItemAfterDrawingCheckBox;
49 QCheckBox *mIsControlsWidgetVisibleCheckBox;
50 QLabel *mSmoothFactorLabel;
51 QLabel *mCanvasColorLabel;
52 NumericComboBox *mSmoothFactorCombobox;
53 ColorButton *mCanvasColorButton;
54 QGridLayout *mLayout;
55 QSharedPointer<IConfig> mConfig;
56 QSharedPointer<IScaledSizeProvider> mScaledSizeProvider;
57
58 void initGui();
59 void loadConfig();
60
61 private slots:
62 void smoothPathCheckBoxClicked(bool checked);
63 void switchToSelectToolAfterDrawingItemCheckBoxClicked(bool checked);
64 };
65
66 #endif //KSNIP_ANNOTATIONSETTINGS_H