blob: 79090066d994ed14dbffbbe523a9f279a48a4ec9 (
plain)
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
|
// Copyright (C) 2019 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0+ OR GPL-3.0 WITH Qt-GPL-exception-1.0
#pragma once
#include "curveitem.h"
#include "selectionmodel.h"
#include <QTreeView>
namespace QmlDesigner {
class AnimationCurve;
class CurveEditorModel;
struct CurveEditorStyle;
class TreeView : public QTreeView
{
Q_OBJECT
signals:
void curvesSelected(const std::vector<CurveItem *> &curves);
void treeItemLocked(TreeItem *item, bool val);
void treeItemPinned(TreeItem *item, bool val);
public:
TreeView(CurveEditorModel *model, QWidget *parent = nullptr);
SelectionModel *selectionModel() const;
void changeCurve(unsigned int id, const AnimationCurve &curve);
void setStyle(const CurveEditorStyle &style);
protected:
QSize sizeHint() const override;
void mousePressEvent(QMouseEvent *event) override;
};
} // End namespace QmlDesigner.
|