Bigger list item.
[kineticlist.git] / main.cpp
blobfa362c0f806b60f456d2e94d38a59090a239aabb
1 #include <QtGui>
2 #include "item.h"
3 #include "kineticview.h"
5 int main(int argc, char *argv[])
7 QApplication app(argc, argv);
8 QGraphicsScene scene;
9 scene.setSceneRect(0, 0, 600, 600);
11 AItem ui[30];
12 KineticView *t = new KineticView;
14 scene.addItem( t );
15 QGraphicsWidget *w = new QGraphicsWidget;
16 QGraphicsLinearLayout *l = new QGraphicsLinearLayout( Qt::Vertical, w );
17 t->setWidget( w );
19 ui[0].setColor( Qt::black );
20 ui[1].setColor( Qt::green );
21 ui[2].setColor( Qt::red );
22 ui[3].setColor( Qt::blue );
23 ui[4].setColor( Qt::gray );
24 ui[5].setColor( Qt::lightGray );
25 ui[6].setColor( Qt::yellow );
26 ui[7].setColor( Qt::black );
27 ui[8].setColor( Qt::green );
28 ui[9].setColor( Qt::red );
29 ui[10].setColor( Qt::black );
30 ui[11].setColor( Qt::green );
31 ui[12].setColor( Qt::red );
32 ui[13].setColor( Qt::blue );
33 ui[14].setColor( Qt::gray );
34 ui[15].setColor( Qt::lightGray );
35 ui[16].setColor( Qt::yellow );
36 ui[17].setColor( Qt::black );
37 ui[18].setColor( Qt::green );
38 ui[19].setColor( Qt::red );
39 ui[20].setColor( Qt::black );
40 ui[21].setColor( Qt::green );
41 ui[22].setColor( Qt::red );
42 ui[23].setColor( Qt::blue );
43 ui[24].setColor( Qt::gray );
44 ui[25].setColor( Qt::lightGray );
45 ui[26].setColor( Qt::yellow );
46 ui[27].setColor( Qt::black );
47 ui[28].setColor( Qt::green );
48 ui[29].setColor( Qt::red );
51 for( int i = 0 ; i < 30; i++ ) {
52 l->addItem( &ui[i] );
54 QGraphicsView view(&scene);
55 view.setRenderHint(QPainter::Antialiasing);
56 /* view drag */
57 //view.setDragMode(QGraphicsView::ScrollHandDrag);
58 view.show();
60 return app.exec();