1 /////////////////////////////////////////////////////////////////////////
4 // Copyright(C) 2009 Igor Trindade Oliveira <igor.oliveira@indt.org.br>//
5 // Copyright(C) 2009 Adenilson Cavalcanti <adenilson.silva@idnt.org.br>//
7 // This library is free software; you can redistribute it and/or //
8 // modify it under the terms of the GNU Lesser General Public //
9 // License as published by the Free Software Foundation; either //
10 // version 2.1 of the License, or (at your option) any later version. //
12 // This library is distributed in the hope that it will be useful, //
13 // but WITHOUT ANY WARRANTY; without even the implied warranty of //
14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //
15 // Lesser General Public License for more details. //
17 // You should have received a copy of the GNU Lesser General Public //
18 // License along with this library; if not, write to the Free Software //
19 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA //
21 /////////////////////////////////////////////////////////////////////////
24 #include "kineticview.h"
26 int main(int argc
, char *argv
[])
28 QApplication
app(argc
, argv
);
30 scene
.setSceneRect(0, 0, 600, 600);
33 KineticView
*t
= new KineticView
;
36 QGraphicsWidget
*w
= new QGraphicsWidget
;
37 QGraphicsLinearLayout
*l
= new QGraphicsLinearLayout( Qt::Vertical
, w
);
39 ui
[0].setColor( Qt::black
);
40 ui
[1].setColor( Qt::green
);
41 ui
[2].setColor( Qt::red
);
42 ui
[3].setColor( Qt::blue
);
43 ui
[4].setColor( Qt::gray
);
44 ui
[5].setColor( Qt::lightGray
);
45 ui
[6].setColor( Qt::yellow
);
46 ui
[7].setColor( Qt::black
);
47 ui
[8].setColor( Qt::green
);
48 ui
[9].setColor( Qt::red
);
49 ui
[10].setColor( Qt::black
);
50 ui
[11].setColor( Qt::green
);
51 ui
[12].setColor( Qt::red
);
52 ui
[13].setColor( Qt::blue
);
53 ui
[14].setColor( Qt::gray
);
54 ui
[15].setColor( Qt::lightGray
);
55 ui
[16].setColor( Qt::yellow
);
56 ui
[17].setColor( Qt::black
);
57 ui
[18].setColor( Qt::green
);
58 ui
[19].setColor( Qt::red
);
59 ui
[20].setColor( Qt::black
);
60 ui
[21].setColor( Qt::green
);
61 ui
[22].setColor( Qt::red
);
62 ui
[23].setColor( Qt::blue
);
63 ui
[24].setColor( Qt::gray
);
64 ui
[25].setColor( Qt::lightGray
);
65 ui
[26].setColor( Qt::yellow
);
66 ui
[27].setColor( Qt::black
);
67 ui
[28].setColor( Qt::green
);
68 ui
[29].setColor( Qt::red
);
71 for( int i
= 0 ; i
< 30; i
++ ) {
77 QGraphicsView
view(&scene
);
78 view
.setRenderHint(QPainter::Antialiasing
);
80 //view.setDragMode(QGraphicsView::ScrollHandDrag);