All Classes Namespaces Functions Variables Enumerations Properties Pages
toolbox.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 TOOLBOXWIDGET_H
18 #define TOOLBOXWIDGET_H
19 
20 #include "pencildef.h"
21 #include "basedockwidget.h"
22 
23 class QToolButton;
24 class QGridLayout;
25 class QIcon;
26 class SpinSlider;
28 class ToolOptionWidget;
29 class Editor;
30 
31 namespace Ui {
32 class ToolBoxWidget;
33 }
34 
36 {
37  Q_OBJECT
38 
39 public:
41  ~ToolBoxWidget() override;
42 
43  void initUI() override;
44  void updateUI() override;
45 
46 public slots:
47  void pencilOn();
48  void eraserOn();
49  void selectOn();
50  void moveOn();
51  void penOn();
52  void handOn();
53  void polylineOn();
54  void bucketOn();
55  void eyedropperOn();
56  void brushOn();
57  void smudgeOn();
58 
59 protected:
60  int getMinHeightForWidth(int width) override;
61 
62 signals:
63  void clearButtonClicked();
64 
65 private:
66  void deselectAllTools();
67  bool leavingTool(QToolButton*);
68 
69  Ui::ToolBoxWidget* ui = nullptr;
70 };
71 
72 #endif
int width() const const
Q_OBJECTQ_OBJECT
Definition: editor.h:51
QObject * parent() const const