Go to the
documentation of this file.
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042 #ifndef QSCROLLBAR_H
00043 #define QSCROLLBAR_H
00044
00045 #include <QtGui/qwidget.h>
00046 #include <QtGui/qabstractslider.h>
00047
00048 QT_BEGIN_HEADER
00049
00050 QT_BEGIN_NAMESPACE
00051
00052 QT_MODULE(Gui)
00053
00054 #ifndef QT_NO_SCROLLBAR
00055
00056 class QScrollBarPrivate;
00057 class QStyleOptionSlider;
00058
00059 class Q_GUI_EXPORT QScrollBar : public QAbstractSlider
00060 {
00061 Q_OBJECT
00062 public:
00063 explicit QScrollBar(QWidget *parent=0);
00064 explicit QScrollBar(Qt::Orientation, QWidget *parent=0);
00065 ~QScrollBar();
00066
00067 QSize sizeHint() const;
00068 bool event(QEvent *event);
00069
00070 protected:
00071 void paintEvent(QPaintEvent *);
00072 void mousePressEvent(QMouseEvent *);
00073 void mouseReleaseEvent(QMouseEvent *);
00074 void mouseMoveEvent(QMouseEvent *);
00075 void hideEvent(QHideEvent*);
00076 void sliderChange(SliderChange change);
00077 #ifndef QT_NO_CONTEXTMENU
00078 void contextMenuEvent(QContextMenuEvent *);
00079 #endif
00080 void initStyleOption(QStyleOptionSlider *option) const;
00081
00082 #ifdef QT3_SUPPORT
00083 public:
00084 QT3_SUPPORT_CONSTRUCTOR QScrollBar(QWidget *parent, const char* name);
00085 QT3_SUPPORT_CONSTRUCTOR QScrollBar(Qt::Orientation, QWidget *parent, const char* name);
00086 QT3_SUPPORT_CONSTRUCTOR QScrollBar(int minValue, int maxValue, int lineStep, int pageStep,
00087 int value, Qt::Orientation, QWidget *parent=0, const char* name = 0);
00088 inline QT3_SUPPORT bool draggingSlider() { return isSliderDown(); }
00089 #endif
00090
00091 private:
00092 friend Q_GUI_EXPORT QStyleOptionSlider qt_qscrollbarStyleOption(QScrollBar *scrollBar);
00093
00094 Q_DISABLE_COPY(QScrollBar)
00095 Q_DECLARE_PRIVATE(QScrollBar)
00096 };
00097
00098 #endif // QT_NO_SCROLLBAR
00099
00100 QT_END_NAMESPACE
00101
00102 QT_END_HEADER
00103
00104 #endif // QSCROLLBAR_H