Krita Source Code Documentation
Loading...
Searching...
No Matches
KoToolBox_p.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2005 Boudewijn Rempt <boud@valdyas.org>
3 * SPDX-FileCopyrightText: 2005-2008 Thomas Zander <zander@kde.org>
4 * SPDX-FileCopyrightText: 2009 Peter Simonsson <peter.simonsson@gmail.com>
5 * SPDX-FileCopyrightText: 2010 Cyrille Berger <cberger@cberger.net>
6 * SPDX-FileCopyrightText: 2022 Alvin Wong <alvin@alvinhc.com>
7 *
8 * SPDX-License-Identifier: LGPL-2.0-or-later
9 */
10#ifndef _KO_TOOLBOX_H_
11#define _KO_TOOLBOX_H_
12
14
15#include <QWidget>
16#include <QList>
17
18#include <KoToolManager.h>
19
20class KisViewManager;
22class KoShapeLayer;
23class KoToolBoxLayout;
24
39class KoToolBox : public QWidget {
40 Q_OBJECT
41public:
43 explicit KoToolBox();
44 ~KoToolBox() override;
45
46 void applyIconSize();
47 void setViewManager(KisViewManager *viewManager);
48
49public Q_SLOTS:
55
63 void setButtonsVisible(const QList<QString> &codes);
64
65
67 void setOrientation(Qt::Orientation orientation);
68
69 void setFloating(bool v);
70
72
73private:
82 void addButton(KoToolAction *toolAction);
83
84private Q_SLOTS:
85 void setCurrentLayer(const KoCanvasController *canvas, const KoShapeLayer* newLayer);
86
88 void toolAdded(KoToolAction *toolAction, KoCanvasController *canvas);
89
92
93protected:
94 void paintEvent(QPaintEvent *event) override;
95 void changeEvent(QEvent *event) override;
96
97private:
98 void setupIconSizeMenu(QMenu *menu);
99
100 friend class KoToolBoxDocker;
101
102private:
103 class Private;
104 Private * const d;
105};
106
107#endif // _KO_TOOLBOX_H_
qreal v
void setButtonsVisible(const QList< QString > &codes)
void addButton(KoToolAction *toolAction)
void setupIconSizeMenu(QMenu *menu)
~KoToolBox() override
void paintEvent(QPaintEvent *event) override
void setCurrentLayer(const KoCanvasController *canvas, const KoShapeLayer *newLayer)
void setFloating(bool v)
void applyIconSize()
void toolAdded(KoToolAction *toolAction, KoCanvasController *canvas)
add a tool post-initialization. The tool will also be activated.
void setActiveTool(KoCanvasController *canvas)
KoToolBoxLayout * toolBoxLayout() const
void setViewManager(KisViewManager *viewManager)
void changeEvent(QEvent *event) override
void slotContextIconSize()
set the icon size for all the buttons
Private *const d
void setOrientation(Qt::Orientation orientation)
Set the orientation of the layout to orientation.
KoToolBox()
constructor
Definition KoToolBox.cpp:87