qabstractslider.sip 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. // qabstractslider.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 QAbstractSlider : public QWidget
  22. {
  23. %TypeHeaderCode
  24. #include <qabstractslider.h>
  25. %End
  26. public:
  27. explicit QAbstractSlider(QWidget *parent /TransferThis/ = 0);
  28. virtual ~QAbstractSlider();
  29. Qt::Orientation orientation() const;
  30. void setMinimum(int);
  31. int minimum() const;
  32. void setMaximum(int);
  33. int maximum() const;
  34. void setRange(int min, int max);
  35. void setSingleStep(int);
  36. int singleStep() const;
  37. void setPageStep(int);
  38. int pageStep() const;
  39. void setTracking(bool enable);
  40. bool hasTracking() const;
  41. void setSliderDown(bool);
  42. bool isSliderDown() const;
  43. void setSliderPosition(int);
  44. int sliderPosition() const;
  45. void setInvertedAppearance(bool);
  46. bool invertedAppearance() const;
  47. void setInvertedControls(bool);
  48. bool invertedControls() const;
  49. enum SliderAction
  50. {
  51. SliderNoAction,
  52. SliderSingleStepAdd,
  53. SliderSingleStepSub,
  54. SliderPageStepAdd,
  55. SliderPageStepSub,
  56. SliderToMinimum,
  57. SliderToMaximum,
  58. SliderMove,
  59. };
  60. int value() const;
  61. void triggerAction(QAbstractSlider::SliderAction action);
  62. public slots:
  63. void setValue(int);
  64. void setOrientation(Qt::Orientation);
  65. signals:
  66. void valueChanged(int value);
  67. void sliderPressed();
  68. void sliderMoved(int position);
  69. void sliderReleased();
  70. void rangeChanged(int min, int max);
  71. void actionTriggered(int action);
  72. protected:
  73. void setRepeatAction(QAbstractSlider::SliderAction action, int thresholdTime = 500, int repeatTime = 50);
  74. QAbstractSlider::SliderAction repeatAction() const;
  75. enum SliderChange
  76. {
  77. SliderRangeChange,
  78. SliderOrientationChange,
  79. SliderStepsChange,
  80. SliderValueChange,
  81. };
  82. virtual void sliderChange(QAbstractSlider::SliderChange change);
  83. virtual bool event(QEvent *e);
  84. virtual void keyPressEvent(QKeyEvent *ev);
  85. virtual void timerEvent(QTimerEvent *);
  86. virtual void wheelEvent(QWheelEvent *e);
  87. virtual void changeEvent(QEvent *e);
  88. };