-
Notifications
You must be signed in to change notification settings - Fork 281
/
Copy pathtooloptionwidget.h
82 lines (66 loc) · 1.98 KB
/
tooloptionwidget.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
/*
Pencil2D - Traditional Animation Software
Copyright (C) 2005-2007 Patrick Corrieri & Pascal Naidon
Copyright (C) 2012-2020 Matthew Chiawen Chang
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
*/
#ifndef TOOLOPTIONDOCKWIDGET_H
#define TOOLOPTIONDOCKWIDGET_H
#include "basedockwidget.h"
#include "pencildef.h"
namespace Ui
{
class ToolOptions;
}
class QToolButton;
class SpinSlider;
class QCheckBox;
class QComboBox;
class QSpinBox;
class QDoubleSpinBox;
class QGroupBox;
class Editor;
class BaseTool;
class BucketOptionsWidget;
class CameraOptionsWidget;
class ToolOptionWidget : public BaseDockWidget
{
Q_OBJECT
public:
explicit ToolOptionWidget(QWidget* parent);
virtual ~ToolOptionWidget() override;
void initUI() override;
void updateUI() override;
void makeConnectionToEditor(Editor* editor);
public slots:
void onToolPropertyChanged(ToolType, ToolPropertyType);
void onToolChanged(ToolType);
private:
void setPenWidth(qreal);
void setPenFeather(qreal);
void setUseFeather(bool);
void setPenInvisibility(int);
void setPressure(int);
void setPreserveAlpha(int);
void setVectorMergeEnabled(int);
void setAA(int);
void setStabilizerLevel(int);
void setFillContour(int);
void setBezier(bool);
void setAutoSwitchTool(bool);
void setShowSelectionInfo(bool);
void disableAllOptions();
void setVisibility(BaseTool*);
void createUI();
private:
Ui::ToolOptions* ui = nullptr;
BucketOptionsWidget* mBucketOptionsWidget = nullptr;
CameraOptionsWidget* mCameraOptionsWidget = nullptr;
};
#endif // TOOLOPTIONDOCKWIDGET_H