]> git.sesse.net Git - kdenlive/blob - src/titlewidget.h
rotate and zoom ( but dialog seems not correct in resize sometimes)
[kdenlive] / src / titlewidget.h
1 /***************************************************************************
2                           titlewidget.h  -  description
3                              -------------------
4     begin                : Feb 28 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 TITLEWIDGET_H
19 #define TITLEWIDGET_H
20
21 #include "ui_titlewidget_ui.h"
22 #include <QDialog>
23 #include <QMap>
24
25 class Transform{
26         public:
27                 Transform(){
28                         scalex=1.0;
29                         scaley=1.0;
30                         rotate=0.0;
31                 }
32                 double scalex,scaley;
33                 double rotate;
34 };
35
36 class TitleWidget : public QDialog , public Ui::TitleWidget_UI{
37         Q_OBJECT
38 public:
39         TitleWidget(QDialog *parent=0);
40 private:
41         QGraphicsPolygonItem *startViewport,*endViewport;
42         void initViewports();
43         QMap<QGraphicsItem*,Transform > transformations;
44 public slots:
45         void slotNewText();
46         void slotNewRect();
47         void slotChangeBackground();
48         void selectionChanged();
49         void textChanged();
50         void rectChanged();
51         void fontBold();
52         void setupViewports();
53         void zIndexChanged(int);
54         void svgSelected(const KUrl&);
55         void itemScaled(int);
56         void itemRotate(int);
57 };
58
59
60 #endif