]> git.sesse.net Git - kdenlive/blob - src/parameterplotter.h
Patches from Ray Lehtiniemi
[kdenlive] / src / parameterplotter.h
1 /***************************************************************************
2                           parameterplotter.h  -  description
3                              -------------------
4     begin                : Feb 15 2008
5     copyright            : (C) 2008 by Marco Gittler
6     email                : g.marco@freenet.de
7  ***************************************************************************/
8
9 /***************************************************************************
10  *                                                                         *
11  *   This program is free software; you can redistribute it and/or modify  *
12  *   it under the terms of the GNU General Public License as published by  *
13  *   the Free Software Foundation; either version 2 of the License, or     *
14  *   (at your option) any later version.                                   *
15  *                                                                         *
16  ***************************************************************************/
17
18 #ifndef _PARAMETERPLOTTER_H_
19 #define _PARAMETERPLOTTER_H_
20
21 #include <KPlotWidget>
22 #include <QDomElement>
23 #include <QMap>
24
25 class ParameterPlotter : public KPlotWidget {
26     Q_OBJECT
27 public:
28     ParameterPlotter(QWidget *parent = 0);
29     virtual ~ParameterPlotter() {}
30     void setMoveX(bool);
31     void setMoveY(bool);
32     void setMoveTimeLine(bool);
33     void setNewPoints(bool);
34     bool isMoveX();
35     bool isMoveY();
36     bool isMoveTimeline();
37     bool isNewPoints();
38     void replot(const QString& name = "");
39 private:
40     KPlotPoint* movepoint;
41     int activeIndexPlot;
42     bool m_moveX, m_moveY, m_moveTimeline, m_newPoints;
43     QPoint oldmousepoint;
44     int maxx, maxy;
45     QStringList parameterNameList;
46     void createParametersNew();
47     QList<KPlotObject*> plotobjects;
48     QMap<int, double> stretchFactors;
49     QList<QColor> colors;
50     QDomElement itemParameter;
51     int max_y, min_y;
52     QString m_paramName;
53 protected:
54     void mouseMoveEvent(QMouseEvent * event);
55     void mousePressEvent(QMouseEvent * event);
56 public slots:
57     void setPointLists(const QDomElement&, const QString& paramName, int , int);
58 signals:
59     void parameterChanged(QDomElement);
60     void updateFrame(int);
61     void parameterList(QStringList);
62
63 };
64
65 #endif