/[projects]/infoscreen/clientsiderender.cpp
ViewVC logotype

Contents of /infoscreen/clientsiderender.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 515 - (show annotations) (download)
Tue Dec 15 20:36:26 2009 UTC (14 years, 5 months ago) by torben
File size: 826 byte(s)
code sync. start on client side render
1 #include <QGraphicsScene>
2 #include <QGraphicsView>
3 #include <QGraphicsTextItem>
4 #include <QDebug>
5 #include "clientsiderender.h"
6
7
8 ClientSideRender::ClientSideRender(QWidget* parent)
9 : QWidget(parent)
10 {
11 scene = new QGraphicsScene(QRectF( 0, 0, 1000, 1000));
12 view = new QGraphicsView(scene, this);
13 view->setFrameStyle(QFrame::NoFrame);
14
15 QFont font ("arial",12,1,false);
16 text = scene->addText( "Some Text", font);
17
18
19 text->rotate(225);
20 QRectF bb = text->boundingRect();
21 qDebug() << bb.height() << ":" << bb.width();
22 }
23 void ClientSideRender::resizeEvent ( QResizeEvent * event )
24 {
25 QWidget::resizeEvent(event);
26 view->resize( size() );
27 }
28 /*
29 QPointF pos = text->pos();
30 int y = pos.y() + 10;
31 y %= 400;
32 pos.setY( y );
33 text->setPos(pos);
34 */

  ViewVC Help
Powered by ViewVC 1.1.20