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);
50 virtual void resizeEvent(QResizeEvent * event);
53 QGraphicsPolygonItem *startViewport, *endViewport;
54 GraphicsSceneRectMove *m_scene;
56 QMap<QGraphicsItem*, Transform > transformations;
57 TitleDocument m_titledocument;
58 QGraphicsRectItem *m_frameBorder;
59 QGraphicsPixmapItem *m_frameImage;
64 QAction *m_buttonRect;
65 QAction *m_buttonText;
66 QAction *m_buttonImage;
67 QAction *m_buttonCursor;
68 QAction *m_buttonSave;
69 QAction *m_buttonLoad;
70 /** project path for storing title clips */
71 QString m_projectPath;
74 void slotNewText(QGraphicsTextItem *tt);
75 void slotNewRect(QGraphicsRectItem *rect);
76 void slotChangeBackground();
77 void selectionChanged();
81 void setupViewports();
82 void zIndexChanged(int);
85 void saveTitle(KUrl url = KUrl());
87 QPixmap renderedPixmap();
90 void slotAdjustSelectedItem();
91 void slotUpdateZoom(int pos);
92 void slotZoom(bool up);
93 void slotAdjustZoom();
94 void slotZoomOneToOne();
95 void slotUpdateText();
96 void displayBackgroundFrame();
97 void setCurrentItem(QGraphicsItem *item);
100 void slotSelectTool();
101 void slotImageTool();