Krita Source Code Documentation
Loading...
Searching...
No Matches
KisOptionButtonStrip.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2022 Deif Lou <ginoba@gmail.com>
3 *
4 * SPDX-License-Identifier: GPL-2.0-or-later
5 */
6
7#ifndef KISOPTIONBUTTONSTRIP_H
8#define KISOPTIONBUTTONSTRIP_H
9
10#include <QList>
11#include <QScopedPointer>
12#include <QWidget>
13
14#include <kritawidgetutils_export.h>
15
16class KoGroupButton;
17
21class KRITAWIDGETUTILS_EXPORT KisOptionButtonStrip : public QWidget
22{
23 Q_OBJECT
24
25public:
26 explicit KisOptionButtonStrip(QWidget *parent = nullptr);
27 ~KisOptionButtonStrip() override;
28
29 KoGroupButton *addButton(const QIcon &icon,
30 const QString &text = QString());
31 KoGroupButton *addButton(const QString &text);
32 KoGroupButton *addButton();
33
34 KoGroupButton *button(int index) const;
36
37 bool exclusive() const;
38 void setExclusive(bool exclusive);
39
40 KoGroupButton *checkedButton() const;
41 int checkedButtonIndex() const;
42
43Q_SIGNALS:
44 void buttonToggled(KoGroupButton *button, bool checked);
45 void buttonToggled(int index, bool checked);
46
47private:
48 class Private;
49 QScopedPointer<Private> m_d;
50};
51
52#endif
Provides a list of consecutive tool buttons.
QScopedPointer< Private > m_d
void buttonToggled(KoGroupButton *button, bool checked)
void buttonToggled(int index, bool checked)
QString button(const QWheelEvent &ev)
QString buttons(const T &ev)