123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100 |
- #ifndef QSCROLLBAR_H
- #define QSCROLLBAR_H
- #include <QtWidgets/qwidget.h>
- #include <QtWidgets/qabstractslider.h>
- QT_BEGIN_NAMESPACE
- #ifndef QT_NO_SCROLLBAR
- class QScrollBarPrivate;
- class QStyleOptionSlider;
- class Q_WIDGETS_EXPORT QScrollBar : public QAbstractSlider
- {
- Q_OBJECT
- public:
- explicit QScrollBar(QWidget *parent = Q_NULLPTR);
- explicit QScrollBar(Qt::Orientation, QWidget *parent = Q_NULLPTR);
- ~QScrollBar();
- QSize sizeHint() const Q_DECL_OVERRIDE;
- bool event(QEvent *event) Q_DECL_OVERRIDE;
- protected:
- #ifndef QT_NO_WHEELEVENT
- void wheelEvent(QWheelEvent *) Q_DECL_OVERRIDE;
- #endif
- void paintEvent(QPaintEvent *) Q_DECL_OVERRIDE;
- void mousePressEvent(QMouseEvent *) Q_DECL_OVERRIDE;
- void mouseReleaseEvent(QMouseEvent *) Q_DECL_OVERRIDE;
- void mouseMoveEvent(QMouseEvent *) Q_DECL_OVERRIDE;
- void hideEvent(QHideEvent*) Q_DECL_OVERRIDE;
- void sliderChange(SliderChange change) Q_DECL_OVERRIDE;
- #ifndef QT_NO_CONTEXTMENU
- void contextMenuEvent(QContextMenuEvent *) Q_DECL_OVERRIDE;
- #endif
- void initStyleOption(QStyleOptionSlider *option) const;
- private:
- friend class QAbstractScrollAreaPrivate;
- friend Q_WIDGETS_EXPORT QStyleOptionSlider qt_qscrollbarStyleOption(QScrollBar *scrollBar);
- Q_DISABLE_COPY(QScrollBar)
- Q_DECLARE_PRIVATE(QScrollBar)
- #ifndef QT_NO_ITEMVIEWS
- friend class QTableView;
- friend class QTreeViewPrivate;
- friend class QCommonListViewBase;
- friend class QListModeViewBase;
- friend class QAbstractItemView;
- #endif
- };
- #endif
- QT_END_NAMESPACE
- #endif
|