]> git.sesse.net Git - kdenlive/blob - src/geometryval.cpp
bf01ff524d69f18edc539aa2a0a7877689cfcb28
[kdenlive] / src / geometryval.cpp
1 /***************************************************************************
2                           geomeytrval.cpp  -  description
3                              -------------------
4     begin                : 03 Aug 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
19 #include "geometryval.h"
20 #include <QGraphicsView>
21 #include <QVBoxLayout>
22 #include <QGraphicsScene>
23 #include "graphicsscenerectmove.h"
24 #include <QGraphicsRectItem>
25
26 Geometryval::Geometryval(QWidget* parent): QWidget(parent) {
27     ui.setupUi(this);
28     QVBoxLayout* vbox = new QVBoxLayout(this);
29     ui.widget->setLayout(vbox);
30     QGraphicsView *view = new QGraphicsView(this);
31     //view->setBackgroundBrush(QBrush(QColor(0,0,0)));
32     vbox->addWidget(view);
33
34     ui.frame->setTickPosition(QSlider::TicksBelow);
35
36     scene = new GraphicsSceneRectMove(this);
37     scene->setTool(TITLE_SELECT);
38     view->setScene(scene);
39
40     QGraphicsRectItem *m_frameBorder = new QGraphicsRectItem(QRectF(-40, -30, 40, 30));
41     m_frameBorder->setZValue(-1100);
42     m_frameBorder->setBrush(QColor(255, 255, 255, 0));
43
44     scene->addItem(m_frameBorder);
45
46     QGraphicsRectItem *m_frameBorder1 = new QGraphicsRectItem(QRectF(-30, -20, 30, 20));
47
48     m_frameBorder1->setZValue(0);
49     m_frameBorder1->setBrush(QColor(255, 0, 0, 0));
50
51     scene->addItem(m_frameBorder1);
52
53     scene->setSceneRect(-80, -60, 80, 60);
54 }
55 QDomElement Geometryval::getParamDesc() {}
56
57 void Geometryval::setupParam(const QDomElement&, const QString& paramName, int, int) {}