qlcdnumber.sip 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. // qlcdnumber.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 QLCDNumber : public QFrame
  22. {
  23. %TypeHeaderCode
  24. #include <qlcdnumber.h>
  25. %End
  26. public:
  27. explicit QLCDNumber(QWidget *parent /TransferThis/ = 0);
  28. QLCDNumber(uint numDigits, QWidget *parent /TransferThis/ = 0);
  29. virtual ~QLCDNumber();
  30. enum Mode
  31. {
  32. Hex,
  33. Dec,
  34. Oct,
  35. Bin,
  36. };
  37. enum SegmentStyle
  38. {
  39. Outline,
  40. Filled,
  41. Flat,
  42. };
  43. bool smallDecimalPoint() const;
  44. int digitCount() const;
  45. void setDigitCount(int nDigits);
  46. void setNumDigits(int nDigits);
  47. %MethodCode
  48. // This is implemented for Qt v5 so that .ui files created with Designer for Qt v4 will continue to work.
  49. sipCpp->setDigitCount(a0);
  50. %End
  51. bool checkOverflow(double num /Constrained/) const;
  52. bool checkOverflow(int num) const;
  53. QLCDNumber::Mode mode() const;
  54. void setMode(QLCDNumber::Mode);
  55. QLCDNumber::SegmentStyle segmentStyle() const;
  56. void setSegmentStyle(QLCDNumber::SegmentStyle);
  57. double value() const;
  58. int intValue() const;
  59. virtual QSize sizeHint() const;
  60. void display(const QString &str);
  61. void display(double num /Constrained/);
  62. void display(int num);
  63. void setHexMode();
  64. void setDecMode();
  65. void setOctMode();
  66. void setBinMode();
  67. void setSmallDecimalPoint(bool);
  68. signals:
  69. void overflow();
  70. protected:
  71. virtual bool event(QEvent *e);
  72. virtual void paintEvent(QPaintEvent *);
  73. };