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