]> git.sesse.net Git - kdenlive/blob - src/parameterplotter.h
uses mix/max as limit and stretch value range to max
[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 #include <KPlotWidget>
19 #include <QDomElement>
20 #include <QMap>
21
22 class ParameterPlotter : public KPlotWidget {
23         Q_OBJECT
24         public:
25                 ParameterPlotter (QWidget *parent=0);
26                 virtual ~ParameterPlotter(){}
27                 void setMoveX(bool);
28                 void setMoveY(bool);
29                 void setMoveTimeLine(bool);
30                 void setNewPoints(bool);
31                 bool isMoveX();
32                 bool isMoveY();
33                 bool isMoveTimeline();
34                 bool isNewPoints();
35                 void replot(const QString& name="");
36         private:
37                 KPlotPoint* movepoint;
38                 int activeIndexPlot;
39                 bool m_moveX,m_moveY,m_moveTimeline,m_newPoints;
40                 QPoint oldmousepoint;
41                 int maxx,maxy;
42                 QStringList parameterNameList;
43                 void createParametersNew();
44                 QList<KPlotObject*> plotobjects;
45                 QMap<int,double> stretchFactors;
46                 QList<QColor> colors;
47                 QDomElement itemParameter;
48                 int max_y,min_y;
49         protected:
50                 void mouseMoveEvent ( QMouseEvent * event );
51                 void mousePressEvent ( QMouseEvent * event );
52         public slots:
53                 void setPointLists(const QDomElement&,int ,int);
54         signals:
55                 void parameterChanged(QDomElement );
56                 void updateFrame(int);
57                 void parameterList(QStringList);
58         
59 };