]> git.sesse.net Git - kdenlive/blob - src/titlewidget.h
c6c9362bb8c82bf17612389bdac543e55295d0e5
[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 "titledocument.h"
23 #include <QDialog>
24 #include <QMap>
25
26 class Transform{
27         public:
28                 Transform(){
29                         scalex=1.0;
30                         scaley=1.0;
31                         rotate=0.0;
32                 }
33                 double scalex,scaley;
34                 double rotate;
35 };
36
37 class TitleWidget : public QDialog , public Ui::TitleWidget_UI{
38         Q_OBJECT
39 public:
40         TitleWidget(QDialog *parent=0);
41 private:
42         QGraphicsPolygonItem *startViewport,*endViewport;
43         void initViewports();
44         QMap<QGraphicsItem*,Transform > transformations;
45         TitleDocument m_titledocument;
46 public slots:
47         void slotNewText();
48         void slotNewRect();
49         void slotChangeBackground();
50         void selectionChanged();
51         void textChanged();
52         void rectChanged();
53         void fontBold();
54         void setupViewports();
55         void zIndexChanged(int);
56         void svgSelected(const KUrl&);
57         void itemScaled(int);
58         void itemRotate(int);
59         void saveTitle();
60         void loadTitle();
61 };
62
63
64 #endif