1 /***
2 
3     Olive - Non-Linear Video Editor
4     Copyright (C) 2019  Olive Team
5 
6     This program is free software: you can redistribute it and/or modify
7     it under the terms of the GNU General Public License as published by
8     the Free Software Foundation, either version 3 of the License, or
9     (at your option) any later version.
10 
11     This program is distributed in the hope that it will be useful,
12     but WITHOUT ANY WARRANTY; without even the implied warranty of
13     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14     GNU General Public License for more details.
15 
16     You should have received a copy of the GNU General Public License
17     along with this program.  If not, see <http://www.gnu.org/licenses/>.
18 
19 ***/
20 
21 #ifndef EFFECTGIZMO_H
22 #define EFFECTGIZMO_H
23 
24 enum GizmoType {
25   GIZMO_TYPE_DOT,
26   GIZMO_TYPE_POLY,
27   GIZMO_TYPE_TARGET
28 };
29 
30 #define GIZMO_DOT_SIZE 2.5
31 #define GIZMO_TARGET_SIZE 5.0
32 
33 #include <QObject>
34 #include <QString>
35 #include <QRect>
36 #include <QPoint>
37 #include <QVector>
38 #include <QColor>
39 
40 class DoubleField;
41 class Effect;
42 
43 class EffectGizmo : public QObject {
44   Q_OBJECT
45 public:
46   EffectGizmo(Effect* parent, int type);
47 
48   QVector<QPoint> world_pos;
49   QVector<QPoint> screen_pos;
50 
51   DoubleField* x_field1;
52   double x_field_multi1;
53   DoubleField* y_field1;
54   double y_field_multi1;
55   DoubleField* x_field2;
56   double x_field_multi2;
57   DoubleField* y_field2;
58   double y_field_multi2;
59 
60   QColor color;
61   int get_point_count();
62 
63   int get_type();
64 
65   int get_cursor();
66   void set_cursor(int c);
67 private:
68   int type;
69   int cursor;
70 };
71 
72 #endif // EFFECTGIZMO_H
73