1 /***************************************************************************
2 geomeytrval.cpp - 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 ***************************************************************************/
19 #include "geometryval.h"
20 #include <QGraphicsView>
21 #include <QVBoxLayout>
22 #include <QGraphicsScene>
23 #include "graphicsscenerectmove.h"
24 #include <QGraphicsRectItem>
26 Geometryval::Geometryval(QWidget* parent): QWidget(parent) {
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);
34 ui.frame->setTickPosition(QSlider::TicksBelow);
36 scene = new GraphicsSceneRectMove(this);
37 scene->setTool(TITLE_SELECT);
38 view->setScene(scene);
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));
44 scene->addItem(m_frameBorder);
46 QGraphicsRectItem *m_frameBorder1 = new QGraphicsRectItem(QRectF(-30, -20, 30, 20));
48 m_frameBorder1->setZValue(0);
49 m_frameBorder1->setBrush(QColor(255, 0, 0, 0));
51 scene->addItem(m_frameBorder1);
53 scene->setSceneRect(-80, -60, 80, 60);
55 QDomElement Geometryval::getParamDesc() {}
57 void Geometryval::setupParam(const QDomElement&, const QString& paramName, int, int) {}