qtv.cpp
Go to the documentation of this file.
00001 #include "qtv.h"
00002 
00003 int main(int argc, char*argv[]) {
00004         
00005         QApplication app(argc, argv);
00006    
00007         QFile *qin = new QFile();
00008         if(!qin->open(stdin, QIODevice::ReadOnly)) {
00009                 printf("Could not open stding as QFile.\n");
00010                 exit(1);
00011         }
00012         QFileReader *qfr = new QFileReader(qin);
00013         QParser *qp = new QParser;
00014         
00015         QScene * qscene = new QScene();
00016         
00017         QObject::connect(qfr, SIGNAL(new_line(QString)), qp,  SLOT(new_line(QString)));
00018         QObject::connect(qfr, SIGNAL(eof()), qscene,  SLOT(adjust()));
00019 
00020         QObject::connect(qp, SIGNAL(parsed_laser_data(LDP)), qscene,  SLOT(new_laser_data(LDP)));
00021         
00022         
00023         QMapView view;
00024         view.setScene(qscene);
00025    view.setCacheMode(QGraphicsView::CacheBackground);
00026    view.setDragMode(QGraphicsView::ScrollHandDrag);
00027         view.scale(10,10);
00028    view.show();
00029         qfr->start();
00030         
00031         return app.exec();
00032 }


csm
Author(s): Andrea Censi
autogenerated on Fri May 17 2019 02:28:33