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 QCOLUMNVIEWGRIP_P_H
5#define QCOLUMNVIEWGRIP_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 for the convenience
12// of other Qt classes. 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/qwidget_p.h>
20
21QT_REQUIRE_CONFIG(columnview);
22
23QT_BEGIN_NAMESPACE
24
25class QColumnViewGripPrivate;
26
27class Q_AUTOTEST_EXPORT QColumnViewGrip : public QWidget {
28
29Q_OBJECT
30
31Q_SIGNALS:
32 void gripMoved(int offset);
33
34public:
35 explicit QColumnViewGrip(QWidget *parent = nullptr);
36 ~QColumnViewGrip();
37 int moveGrip(int offset);
38
39protected:
40 QColumnViewGrip(QColumnViewGripPrivate &, QWidget *parent = nullptr, Qt::WindowFlags f = { });
41 void paintEvent(QPaintEvent *event) override;
42 void mouseDoubleClickEvent(QMouseEvent *event) override;
43 void mouseMoveEvent(QMouseEvent *event) override;
44 void mouseReleaseEvent(QMouseEvent *event) override;
45 void mousePressEvent(QMouseEvent *event) override;
46
47private:
48 Q_DECLARE_PRIVATE(QColumnViewGrip)
49 Q_DISABLE_COPY_MOVE(QColumnViewGrip)
50};
51
52class QColumnViewGripPrivate : public QWidgetPrivate
53{
54 Q_DECLARE_PUBLIC(QColumnViewGrip)
55
56public:
57 QColumnViewGripPrivate();
58 ~QColumnViewGripPrivate() {}
59
60 int originalXLocation;
61};
62
63QT_END_NAMESPACE
64
65#endif //QCOLUMNVIEWGRIP_P_H
66

source code of qtbase/src/widgets/itemviews/qcolumnviewgrip_p.h