qabstractspinbox.sip 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. // qabstractspinbox.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 QAbstractSpinBox : public QWidget
  22. {
  23. %TypeHeaderCode
  24. #include <qabstractspinbox.h>
  25. %End
  26. public:
  27. explicit QAbstractSpinBox(QWidget *parent /TransferThis/ = 0);
  28. virtual ~QAbstractSpinBox();
  29. enum StepEnabledFlag /BaseType=Flag/
  30. {
  31. StepNone,
  32. StepUpEnabled,
  33. StepDownEnabled,
  34. };
  35. typedef QFlags<QAbstractSpinBox::StepEnabledFlag> StepEnabled;
  36. enum ButtonSymbols
  37. {
  38. UpDownArrows,
  39. PlusMinus,
  40. NoButtons,
  41. };
  42. QAbstractSpinBox::ButtonSymbols buttonSymbols() const;
  43. void setButtonSymbols(QAbstractSpinBox::ButtonSymbols bs);
  44. QString text() const;
  45. QString specialValueText() const;
  46. void setSpecialValueText(const QString &s);
  47. bool wrapping() const;
  48. void setWrapping(bool w);
  49. void setReadOnly(bool r);
  50. bool isReadOnly() const;
  51. void setAlignment(Qt::Alignment flag);
  52. Qt::Alignment alignment() const;
  53. void setFrame(bool);
  54. bool hasFrame() const;
  55. virtual QSize sizeHint() const;
  56. virtual QSize minimumSizeHint() const;
  57. void interpretText();
  58. virtual bool event(QEvent *event);
  59. virtual QValidator::State validate(QString &input /In,Out/, int &pos /In,Out/) const;
  60. virtual void fixup(QString &input /In,Out/) const;
  61. virtual void stepBy(int steps);
  62. public slots:
  63. void stepUp();
  64. void stepDown();
  65. void selectAll();
  66. virtual void clear();
  67. signals:
  68. void editingFinished();
  69. %If (Qt_6_10_0 -)
  70. void returnPressed();
  71. %End
  72. protected:
  73. virtual void resizeEvent(QResizeEvent *e);
  74. virtual void keyPressEvent(QKeyEvent *e);
  75. virtual void keyReleaseEvent(QKeyEvent *e);
  76. virtual void wheelEvent(QWheelEvent *e);
  77. virtual void focusInEvent(QFocusEvent *e);
  78. virtual void focusOutEvent(QFocusEvent *e);
  79. virtual void contextMenuEvent(QContextMenuEvent *e);
  80. virtual void changeEvent(QEvent *e);
  81. virtual void closeEvent(QCloseEvent *e);
  82. virtual void hideEvent(QHideEvent *e);
  83. virtual void mousePressEvent(QMouseEvent *e);
  84. virtual void mouseReleaseEvent(QMouseEvent *e);
  85. virtual void mouseMoveEvent(QMouseEvent *e);
  86. virtual void timerEvent(QTimerEvent *e);
  87. virtual void paintEvent(QPaintEvent *e);
  88. virtual void showEvent(QShowEvent *e);
  89. QLineEdit *lineEdit() const;
  90. void setLineEdit(QLineEdit *e /Transfer/);
  91. virtual QAbstractSpinBox::StepEnabled stepEnabled() const;
  92. virtual void initStyleOption(QStyleOptionSpinBox *option) const;
  93. public:
  94. enum CorrectionMode
  95. {
  96. CorrectToPreviousValue,
  97. CorrectToNearestValue,
  98. };
  99. void setCorrectionMode(QAbstractSpinBox::CorrectionMode cm);
  100. QAbstractSpinBox::CorrectionMode correctionMode() const;
  101. bool hasAcceptableInput() const;
  102. void setAccelerated(bool on);
  103. bool isAccelerated() const;
  104. void setKeyboardTracking(bool kt);
  105. bool keyboardTracking() const;
  106. virtual QVariant inputMethodQuery(Qt::InputMethodQuery) const;
  107. void setGroupSeparatorShown(bool shown);
  108. bool isGroupSeparatorShown() const;
  109. enum StepType
  110. {
  111. DefaultStepType,
  112. AdaptiveDecimalStepType,
  113. };
  114. };