qspinbox.sip 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. // qspinbox.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 QSpinBox : public QAbstractSpinBox
  22. {
  23. %TypeHeaderCode
  24. #include <qspinbox.h>
  25. %End
  26. public:
  27. explicit QSpinBox(QWidget *parent /TransferThis/ = 0);
  28. virtual ~QSpinBox();
  29. int value() const;
  30. QString prefix() const;
  31. void setPrefix(const QString &p);
  32. QString suffix() const;
  33. void setSuffix(const QString &s);
  34. QString cleanText() const;
  35. int singleStep() const;
  36. void setSingleStep(int val);
  37. int minimum() const;
  38. void setMinimum(int min);
  39. int maximum() const;
  40. void setMaximum(int max);
  41. void setRange(int min, int max);
  42. protected:
  43. virtual QValidator::State validate(QString &input /In,Out/, int &pos /In,Out/) const;
  44. virtual int valueFromText(const QString &text) const;
  45. virtual QString textFromValue(int v) const;
  46. virtual void fixup(QString &str /In,Out/) const;
  47. virtual bool event(QEvent *e);
  48. public slots:
  49. void setValue(int val);
  50. signals:
  51. void valueChanged(int);
  52. void textChanged(const QString &);
  53. public:
  54. int displayIntegerBase() const;
  55. void setDisplayIntegerBase(int base);
  56. QAbstractSpinBox::StepType stepType() const;
  57. void setStepType(QAbstractSpinBox::StepType stepType);
  58. };
  59. class QDoubleSpinBox : public QAbstractSpinBox
  60. {
  61. %TypeHeaderCode
  62. #include <qspinbox.h>
  63. %End
  64. public:
  65. explicit QDoubleSpinBox(QWidget *parent /TransferThis/ = 0);
  66. virtual ~QDoubleSpinBox();
  67. double value() const;
  68. QString prefix() const;
  69. void setPrefix(const QString &p);
  70. QString suffix() const;
  71. void setSuffix(const QString &s);
  72. QString cleanText() const;
  73. double singleStep() const;
  74. void setSingleStep(double val);
  75. double minimum() const;
  76. void setMinimum(double min);
  77. double maximum() const;
  78. void setMaximum(double max);
  79. void setRange(double min, double max);
  80. int decimals() const;
  81. void setDecimals(int prec);
  82. virtual QValidator::State validate(QString &input /In,Out/, int &pos /In,Out/) const;
  83. virtual double valueFromText(const QString &text) const;
  84. virtual QString textFromValue(double v) const;
  85. virtual void fixup(QString &str /In,Out/) const;
  86. public slots:
  87. void setValue(double val);
  88. signals:
  89. void valueChanged(double);
  90. void textChanged(const QString &);
  91. public:
  92. QAbstractSpinBox::StepType stepType() const;
  93. void setStepType(QAbstractSpinBox::StepType stepType);
  94. };