-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlayerlistview.h
More file actions
60 lines (48 loc) · 1.39 KB
/
layerlistview.h
File metadata and controls
60 lines (48 loc) · 1.39 KB
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#ifndef LAYERLISTVIEW_H
#define LAYERLISTVIEW_H
#include <QWidget>
#include <QList>
#include <QIcon>
#include <QString>
#include <QVariant>
#include "canvaswidget.h"
#include "layershuffletype.h"
class LayerListViewPrivate;
class LayerListView : public QWidget
{
Q_OBJECT
public:
explicit LayerListView(QWidget *parent = 0);
~LayerListView();
QSize sizeHint() const;
int rowHeight();
void setData(const QList<CanvasWidget::LayerInfo> &data, int selection);
int getSelectedRow();
enum {
VisibleColumn,
EditableColumn,
NameColumn
};
protected:
void paintEvent(QPaintEvent *event);
void mousePressEvent(QMouseEvent *event);
void mouseReleaseEvent(QMouseEvent *event);
void mouseMoveEvent(QMouseEvent *event);
void dragEnterEvent(QDragEnterEvent *event);
void dragMoveEvent(QDragMoveEvent *event);
void dragLeaveEvent(QDragLeaveEvent *event);
void dropEvent(QDropEvent *event);
bool eventFilter(QObject *watched, QEvent *event);
QIcon visibleIcon;
QIcon lockedIcon;
void recalulateSize();
private:
QScopedPointer<LayerListViewPrivate> const d_ptr;
Q_DECLARE_PRIVATE(LayerListView)
signals:
void shuffleLayers(int srcIndex, int targetIndex, LayerShuffle::Type op);
void edited(int row, int column, QVariant value);
void selectionChanged(int row);
public slots:
};
#endif // LAYERLISTVIEW_H