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