1// qtoolbox.sip generated by MetaSIP
2//
3// This file is part of the QtWidgets Python extension module.
4//
5// Copyright (c) 2021 Riverbank Computing Limited <info@riverbankcomputing.com>
6//
7// This file is part of PyQt5.
8//
9// This file may be used under the terms of the GNU General Public License
10// version 3.0 as published by the Free Software Foundation and appearing in
11// the file LICENSE included in the packaging of this file.  Please review the
12// following information to ensure the GNU General Public License version 3.0
13// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
14//
15// If you do not wish to use this file under the terms of the GPL version 3.0
16// then you may purchase a commercial license.  For more information contact
17// info@riverbankcomputing.com.
18//
19// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
20// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
21
22
23class QToolBox : QFrame
24{
25%TypeHeaderCode
26#include <qtoolbox.h>
27%End
28
29public:
30    QToolBox(QWidget *parent /TransferThis/ = 0, Qt::WindowFlags flags = Qt::WindowFlags());
31    virtual ~QToolBox();
32    int addItem(QWidget *item /Transfer/, const QString &text);
33    int addItem(QWidget *item /Transfer/, const QIcon &iconSet, const QString &text);
34    int insertItem(int index, QWidget *item /Transfer/, const QString &text);
35    int insertItem(int index, QWidget *widget /Transfer/, const QIcon &icon, const QString &text);
36    void removeItem(int index);
37    void setItemEnabled(int index, bool enabled);
38    bool isItemEnabled(int index) const;
39    void setItemText(int index, const QString &text);
40    QString itemText(int index) const;
41    void setItemIcon(int index, const QIcon &icon);
42    QIcon itemIcon(int index) const;
43    void setItemToolTip(int index, const QString &toolTip);
44    QString itemToolTip(int index) const;
45    int currentIndex() const;
46    QWidget *currentWidget() const;
47    QWidget *widget(int index) const;
48    int indexOf(QWidget *widget) const;
49    int count() const /__len__/;
50
51public slots:
52    void setCurrentIndex(int index);
53    void setCurrentWidget(QWidget *widget);
54
55signals:
56    void currentChanged(int index);
57
58protected:
59    virtual void itemInserted(int index);
60    virtual void itemRemoved(int index);
61    virtual bool event(QEvent *e);
62    virtual void showEvent(QShowEvent *e);
63    virtual void changeEvent(QEvent *);
64};
65