Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:09:37

0001 // Copyright (C) 2016 The Qt Company Ltd.
0002 // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
0003 
0004 #ifndef QSCROLLBAR_H
0005 #define QSCROLLBAR_H
0006 
0007 #include <QtWidgets/qtwidgetsglobal.h>
0008 #include <QtWidgets/qwidget.h>
0009 
0010 #include <QtWidgets/qabstractslider.h>
0011 
0012 QT_REQUIRE_CONFIG(scrollbar);
0013 
0014 QT_BEGIN_NAMESPACE
0015 
0016 class QScrollBarPrivate;
0017 class QStyleOptionSlider;
0018 
0019 class Q_WIDGETS_EXPORT QScrollBar : public QAbstractSlider
0020 {
0021     Q_OBJECT
0022 public:
0023     explicit QScrollBar(QWidget *parent = nullptr);
0024     explicit QScrollBar(Qt::Orientation, QWidget *parent = nullptr);
0025     ~QScrollBar();
0026 
0027     QSize sizeHint() const override;
0028     bool event(QEvent *event) override;
0029 
0030 protected:
0031 #if QT_CONFIG(wheelevent)
0032     void wheelEvent(QWheelEvent *) override;
0033 #endif
0034     void paintEvent(QPaintEvent *) override;
0035     void mousePressEvent(QMouseEvent *) override;
0036     void mouseReleaseEvent(QMouseEvent *) override;
0037     void mouseMoveEvent(QMouseEvent *) override;
0038     void hideEvent(QHideEvent*) override;
0039     void sliderChange(SliderChange change) override;
0040 #ifndef QT_NO_CONTEXTMENU
0041     void contextMenuEvent(QContextMenuEvent *) override;
0042 #endif
0043     virtual void initStyleOption(QStyleOptionSlider *option) const;
0044 
0045 
0046 private:
0047     friend class QAbstractScrollAreaPrivate;
0048     friend Q_WIDGETS_EXPORT QStyleOptionSlider qt_qscrollbarStyleOption(QScrollBar *scrollBar);
0049 
0050     Q_DISABLE_COPY(QScrollBar)
0051     Q_DECLARE_PRIVATE(QScrollBar)
0052 #if QT_CONFIG(itemviews)
0053     friend class QTableView;
0054     friend class QTreeViewPrivate;
0055     friend class QCommonListViewBase;
0056     friend class QListModeViewBase;
0057     friend class QAbstractItemView;
0058 #endif
0059 };
0060 
0061 QT_END_NAMESPACE
0062 
0063 #endif // QSCROLLBAR_H