1 /***************************************************************************
2 titlewidget.h - description
5 copyright : (C) 2008 by Marco Gittler
6 email : g.marco@freenet.de
7 ***************************************************************************/
9 /***************************************************************************
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. *
16 ***************************************************************************/
26 #include "ui_titlewidget_ui.h"
27 #include "titledocument.h"
29 #include "graphicsscenerectmove.h"
40 double scalex, scaley;
44 class TitleWidget : public QDialog , public Ui::TitleWidget_UI {
47 TitleWidget(KUrl url, QString projectPath, Render *render, QWidget *parent = 0);
49 void setXml(QDomDocument doc);
52 virtual void resizeEvent(QResizeEvent * event);
55 QGraphicsPolygonItem *startViewport, *endViewport;
56 GraphicsSceneRectMove *m_scene;
58 QMap<QGraphicsItem*, Transform > transformations;
59 TitleDocument m_titledocument;
60 QGraphicsRectItem *m_frameBorder;
61 QGraphicsPixmapItem *m_frameImage;
66 QAction *m_buttonRect;
67 QAction *m_buttonText;
68 QAction *m_buttonImage;
69 QAction *m_buttonCursor;
70 QAction *m_buttonSave;
71 QAction *m_buttonLoad;
72 /** project path for storing title clips */
73 QString m_projectPath;
76 void slotNewText(QGraphicsTextItem *tt);
77 void slotNewRect(QGraphicsRectItem *rect);
78 void slotChangeBackground();
79 void selectionChanged();
83 void setupViewports();
84 void zIndexChanged(int);
89 void saveTitle(KUrl url = KUrl());
91 QPixmap renderedPixmap();
94 void slotAdjustSelectedItem();
95 void slotUpdateZoom(int pos);
96 void slotZoom(bool up);
97 void slotAdjustZoom();
98 void slotZoomOneToOne();
99 void slotUpdateText();
100 void displayBackgroundFrame();
101 void setCurrentItem(QGraphicsItem *item);
104 void slotSelectTool();
105 void slotImageTool();