qtoolbox.sip 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. // qtoolbox.sip generated by MetaSIP
  2. //
  3. // This file is part of the QtWidgets Python extension module.
  4. //
  5. // Copyright (c) 2026 Riverbank Computing Limited <info@riverbankcomputing.com>
  6. //
  7. // This file is part of PyQt6.
  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. class QToolBox : public QFrame
  22. {
  23. %TypeHeaderCode
  24. #include <qtoolbox.h>
  25. %End
  26. public:
  27. QToolBox(QWidget *parent /TransferThis/ = 0, Qt::WindowFlags flags = Qt::WindowFlags());
  28. virtual ~QToolBox();
  29. int addItem(QWidget *item /Transfer/, const QString &text);
  30. int addItem(QWidget *item /Transfer/, const QIcon &iconSet, const QString &text);
  31. int insertItem(int index, QWidget *item /Transfer/, const QString &text);
  32. int insertItem(int index, QWidget *widget /Transfer/, const QIcon &icon, const QString &text);
  33. void removeItem(int index);
  34. void setItemEnabled(int index, bool enabled);
  35. bool isItemEnabled(int index) const;
  36. void setItemText(int index, const QString &text);
  37. QString itemText(int index) const;
  38. void setItemIcon(int index, const QIcon &icon);
  39. QIcon itemIcon(int index) const;
  40. void setItemToolTip(int index, const QString &toolTip);
  41. QString itemToolTip(int index) const;
  42. int currentIndex() const;
  43. QWidget *currentWidget() const;
  44. QWidget *widget(int index) const;
  45. int indexOf(const QWidget *widget) const;
  46. int count() const /__len__/;
  47. public slots:
  48. void setCurrentIndex(int index);
  49. void setCurrentWidget(QWidget *widget);
  50. signals:
  51. void currentChanged(int index);
  52. protected:
  53. virtual void itemInserted(int index);
  54. virtual void itemRemoved(int index);
  55. virtual bool event(QEvent *e);
  56. virtual void showEvent(QShowEvent *e);
  57. virtual void changeEvent(QEvent *);
  58. };