qabstractbutton.sip 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. // qabstractbutton.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 QAbstractButton : public QWidget
  22. {
  23. %TypeHeaderCode
  24. #include <qabstractbutton.h>
  25. %End
  26. public:
  27. explicit QAbstractButton(QWidget *parent /TransferThis/ = 0);
  28. virtual ~QAbstractButton();
  29. void setAutoRepeatDelay(int);
  30. int autoRepeatDelay() const;
  31. void setAutoRepeatInterval(int);
  32. int autoRepeatInterval() const;
  33. void setText(const QString &text);
  34. QString text() const;
  35. void setIcon(const QIcon &icon);
  36. QIcon icon() const;
  37. QSize iconSize() const;
  38. void setShortcut(const QKeySequence &key);
  39. QKeySequence shortcut() const;
  40. void setCheckable(bool);
  41. bool isCheckable() const;
  42. bool isChecked() const;
  43. void setDown(bool);
  44. bool isDown() const;
  45. void setAutoRepeat(bool);
  46. bool autoRepeat() const;
  47. void setAutoExclusive(bool);
  48. bool autoExclusive() const;
  49. QButtonGroup *group() const;
  50. public slots:
  51. void setIconSize(const QSize &size);
  52. void animateClick();
  53. void click();
  54. void toggle();
  55. void setChecked(bool);
  56. signals:
  57. void pressed();
  58. void released();
  59. void clicked(bool checked = false);
  60. void toggled(bool checked);
  61. protected:
  62. virtual void paintEvent(QPaintEvent *e) = 0;
  63. virtual bool hitButton(const QPoint &pos) const;
  64. virtual void checkStateSet();
  65. virtual void nextCheckState();
  66. virtual bool event(QEvent *e);
  67. virtual void keyPressEvent(QKeyEvent *e);
  68. virtual void keyReleaseEvent(QKeyEvent *e);
  69. virtual void mousePressEvent(QMouseEvent *e);
  70. virtual void mouseReleaseEvent(QMouseEvent *e);
  71. virtual void mouseMoveEvent(QMouseEvent *e);
  72. virtual void focusInEvent(QFocusEvent *e);
  73. virtual void focusOutEvent(QFocusEvent *e);
  74. virtual void changeEvent(QEvent *e);
  75. virtual void timerEvent(QTimerEvent *e);
  76. };