-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdragscrollarea.h
More file actions
29 lines (24 loc) · 815 Bytes
/
dragscrollarea.h
File metadata and controls
29 lines (24 loc) · 815 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#ifndef DRAGSCROLLAREA_H
#define DRAGSCROLLAREA_H
#include <QAbstractScrollArea>
class DragScrollAreaPrivate;
class DragScrollArea : public QAbstractScrollArea
{
Q_OBJECT
public:
explicit DragScrollArea(QWidget *parent = 0);
virtual ~DragScrollArea() override;
virtual QSize rowSize() const = 0;
virtual int rowCount() const = 0;
QSize viewportSizeHint() const override;
protected:
void resizeEvent(QResizeEvent *event) override;
void mousePressEvent(QMouseEvent *event) override;
void mouseMoveEvent(QMouseEvent *event) override;
void mouseReleaseEvent(QMouseEvent *event) override;
virtual void viewportClicked(QMouseEvent *event);
private:
QScopedPointer<DragScrollAreaPrivate> const d_ptr;
Q_DECLARE_PRIVATE(DragScrollArea)
};
#endif // DRAGSCROLLAREA_H