]> git.sesse.net Git - kdenlive/blob - src/beziercurve/beziersplinewidget.h
Bezier Spline: Allow to link the handles of a point. They will then always remain...
[kdenlive] / src / beziercurve / beziersplinewidget.h
1 /***************************************************************************
2  *   Copyright (C) 2010 by Till Theato (root@ttill.de)                     *
3  *   This file is part of Kdenlive (www.kdenlive.org).                     *
4  *                                                                         *
5  *   Kdenlive is free software: you can redistribute it and/or modify      *
6  *   it under the terms of the GNU General Public License as published by  *
7  *   the Free Software Foundation, either version 2 of the License, or     *
8  *   (at your option) any later version.                                   *
9  *                                                                         *
10  *   Kdenlive is distributed in the hope that it will be useful,           *
11  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
12  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
13  *   GNU General Public License for more details.                          *
14  *                                                                         *
15  *   You should have received a copy of the GNU General Public License     *
16  *   along with Kdenlive.  If not, see <http://www.gnu.org/licenses/>.     *
17  ***************************************************************************/
18
19 #ifndef BEZIERSPLINEWIDGET_H
20 #define BEZIERSPLINEWIDGET_H
21
22 #include "cubicbezierspline.h"
23 #include "beziersplineeditor.h"
24 #include "ui_bezierspline_ui.h"
25
26 #include <QtCore>
27 #include <QWidget>
28
29 class BezierSplineWidget : public QWidget
30 {
31     Q_OBJECT
32     
33 public:
34     BezierSplineWidget(const QString &spline, QWidget* parent = 0);
35
36     QString spline();
37
38     enum CurveModes { ModeRed, ModeGreen, ModeBlue, ModeAlpha, ModeLuma, ModeRGB/*, ModeSaturation*/ };
39     void setMode(CurveModes mode);
40
41 private slots:
42     void slotUpdatePoint(const BPoint &p);
43
44     void slotUpdatePointP();
45     void slotUpdatePointH1();
46     void slotUpdatePointH2();
47
48     void slotGridChange();
49     void slotShowPixmap(bool show = true);
50     void slotResetSpline();
51     void slotSetHandlesLinked(bool linked);
52
53 private:
54     Ui::BezierSpline_UI m_ui;
55     BezierSplineEditor m_edit;
56     CurveModes m_mode;
57     bool m_showPixmap;
58
59 signals:
60     void modified();
61 };
62
63 #endif