1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QSCROLLBAR_P_H
5#define QSCROLLBAR_P_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists purely as an
12// implementation detail. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include <QtWidgets/private/qtwidgetsglobal_p.h>
19#include "private/qabstractslider_p.h"
20#include "qstyle.h"
21
22QT_REQUIRE_CONFIG(scrollbar);
23
24QT_BEGIN_NAMESPACE
25
26class QScrollBarPrivate : public QAbstractSliderPrivate
27{
28 Q_DECLARE_PUBLIC(QScrollBar)
29public:
30 QStyle::SubControl pressedControl;
31 bool pointerOutsidePressedControl;
32
33 int clickOffset, snapBackPosition;
34
35 void activateControl(uint control, int threshold = 500);
36 void stopRepeatAction();
37 int pixelPosToRangeValue(int pos) const;
38 void init();
39 bool updateHoverControl(const QPoint &pos);
40 QStyle::SubControl newHoverControl(const QPoint &pos);
41
42 QStyle::SubControl hoverControl;
43 QRect hoverRect;
44
45 bool transient;
46 void setTransient(bool value);
47
48 bool flashed;
49 int flashTimer;
50 void flash();
51};
52
53QT_END_NAMESPACE
54
55#endif // QSCROLLBAR_P_H
56

source code of qtbase/src/widgets/widgets/qscrollbar_p.h