]> git.sesse.net Git - mlt/blob - src/modules/qimage/kdenlivetitle_wrapper.h
Cleanup & fix crash
[mlt] / src / modules / qimage / kdenlivetitle_wrapper.h
1 /*
2  * kdenlivetitle_wrapper.h -- kdenlivetitle wrapper
3  * Copyright (c) 2009 Marco Gittler <g.marco@freenet.de>
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
18  */
19
20 #include <QtCore/QObject>
21 #include <QtCore/QString>
22 #include <framework/mlt_frame.h>
23 #include <QtXml/QDomElement>
24
25 class QGraphicsPolygonItem;
26 class QCoreApplication;
27 class QApplication;
28 class Title;
29 class QGraphicsScene;
30
31 class Title: public QObject
32 {
33
34 public:
35         Title( const QString & );
36         virtual ~Title();
37         void drawKdenliveTitle( uint8_t*, int, int, double, char*, char* );
38         void reloadXml(char *templatexml, char *templatetext);
39 private:
40         QString m_filename;
41         int loadDocument( const QString& url, const QString templateXml, const QString templateText );
42         int  loadFromXml( QDomDocument doc, const QString templateText );
43         QGraphicsScene *m_scene;
44         QRectF m_start, m_end;
45         QString colorToString( const QColor& );
46         QString rectFToString( const QRectF& );
47         QRectF stringToRect( const QString & );
48         QColor stringToColor( const QString & );
49         QTransform stringToTransform( const QString & );
50 };
51