All Classes Namespaces Functions Variables Enumerations Properties Pages
tooloptionwidget.h
1 /*
2 
3 Pencil2D - Traditional Animation Software
4 Copyright (C) 2005-2007 Patrick Corrieri & Pascal Naidon
5 Copyright (C) 2012-2020 Matthew 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 
23 namespace Ui
24 {
25  class ToolOptions;
26 }
27 class QToolButton;
28 class SpinSlider;
29 class QCheckBox;
30 class QComboBox;
31 class QSpinBox;
32 class QDoubleSpinBox;
33 class QGroupBox;
34 class Editor;
35 class BaseTool;
37 
38 
40 {
41  Q_OBJECT
42 public:
43  explicit ToolOptionWidget(QWidget* parent);
44  virtual ~ToolOptionWidget() override;
45 
46  void initUI() override;
47  void updateUI() override;
48 
49  void makeConnectionToEditor(Editor* editor);
50 
51 public slots:
52  void onToolPropertyChanged(ToolType, ToolPropertyType);
53  void onToolChanged(ToolType);
54  void setVisibility(BaseTool*);
55 
56 private:
57  void setPenWidth(qreal);
58  void setPenFeather(qreal);
59  void setUseFeather(bool);
60  void setPenInvisibility(int);
61  void setPressure(int);
62  void setPreserveAlpha(int);
63  void setVectorMergeEnabled(int);
64  void setAA(int);
65  void setStabilizerLevel(int);
66  void setFillContour(int);
67  void setBezier(bool);
68  void setShowSelectionInfo(bool);
69 
70  void disableAllOptions();
71  void createUI();
72 
73 private:
74  Ui::ToolOptions* ui = nullptr;
75 
76  BucketOptionsWidget* mBucketOptionsWidget = nullptr;
77 };
78 
79 #endif // TOOLOPTIONDOCKWIDGET_H
Q_OBJECTQ_OBJECT
Definition: editor.h:55
QObject * parent() const const