Pencil2D  ff90c0872e88be3bf81c548cd60f01983012ec49
Pencil2D is an animation software for both bitmap and vector graphics. It is free, multi-platform, and open source.
 All Classes Functions
tooloptionwidget.h
1 /*
2 
3 Pencil - Traditional Animation Software
4 Copyright (C) 2005-2007 Patrick Corrieri & Pascal Naidon
5 Copyright (C) 2013-2017 Matt Chiawen Chang
6 
7 This program is free software; you can redistribute it and/or
8 modify it under the terms of the GNU General Public License
9 as published by the Free Software Foundation; version 2 of the License.
10 
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15 
16 */
17 #ifndef TOOLOPTIONDOCKWIDGET_H
18 #define TOOLOPTIONDOCKWIDGET_H
19 
20 #include "basedockwidget.h"
21 #include "pencildef.h"
22 class QToolButton;
23 class SpinSlider;
24 class QCheckBox;
25 class QRadioButton;
26 class QSpinBox;
27 class QGroupBox;
28 class Editor;
29 class BaseTool;
30 
31 
32 
34 {
35  Q_OBJECT
36 public:
37  explicit ToolOptionWidget( QWidget* parent );
38  virtual ~ToolOptionWidget();
39 
40  void initUI() override;
41  void updateUI() override;
42 
43  void makeConnectionToEditor(Editor* editor);
44 
45 public slots:
46  void onToolPropertyChanged( ToolType, ToolPropertyType );
47  void onToolChanged( ToolType );
48  void visibilityOnLayer( );
49 
50 private:
51  void setPenWidth( qreal );
52  void setPenFeather( qreal );
53  void setUseFeather( bool );
54  void setPenInvisibility( int );
55  void setPressure( int );
56  void setPreserveAlpha( int );
57  void setVectorMergeEnabled( int );
58  void setAA( int );
59  void setInpolLevel( int );
60  void setTolerance( int );
61  void setFillContour( int );
62 
63  void disableAllOptions();
64  void createUI();
65 
66  QCheckBox* mUseBezierBox = nullptr;
67  QCheckBox* mUsePressureBox = nullptr;
68  QCheckBox* mUseFeatherBox = nullptr;
69  QCheckBox* mMakeInvisibleBox = nullptr;
70  QCheckBox* mPreserveAlphaBox = nullptr;
71  QCheckBox* mVectorMergeBox = nullptr;
72  QSpinBox* mBrushSpinBox = nullptr;
73  QSpinBox* mFeatherSpinBox = nullptr;
74  SpinSlider* mSizeSlider = nullptr;
75  SpinSlider* mFeatherSlider = nullptr;
76  QCheckBox* mUseAABox = nullptr;
77  QRadioButton* mNoInpol = nullptr;
78  QRadioButton* mSimpleInpol = nullptr;
79  QRadioButton* mStrongInpol = nullptr;
80  QRadioButton* mExtremeInpol = nullptr;
81  QGroupBox* mInpolLevelsBox = nullptr;
82  SpinSlider* mToleranceSlider = nullptr;
83  QSpinBox* mToleranceSpinBox = nullptr;
84  QCheckBox* mFillContour = nullptr;
85 
86 };
87 
88 #endif // TOOLOPTIONDOCKWIDGET_H
Definition: editor.h:45