qtv.cpp
Go to the documentation of this file.
1 #include "qtv.h"
2 
3 int main(int argc, char*argv[]) {
4 
5  QApplication app(argc, argv);
6 
7  QFile *qin = new QFile();
8  if(!qin->open(stdin, QIODevice::ReadOnly)) {
9  printf("Could not open stding as QFile.\n");
10  exit(1);
11  }
12  QFileReader *qfr = new QFileReader(qin);
13  QParser *qp = new QParser;
14 
15  QScene * qscene = new QScene();
16 
17  QObject::connect(qfr, SIGNAL(new_line(QString)), qp, SLOT(new_line(QString)));
18  QObject::connect(qfr, SIGNAL(eof()), qscene, SLOT(adjust()));
19 
20  QObject::connect(qp, SIGNAL(parsed_laser_data(LDP)), qscene, SLOT(new_laser_data(LDP)));
21 
22 
23  QMapView view;
24  view.setScene(qscene);
25  view.setCacheMode(QGraphicsView::CacheBackground);
26  view.setDragMode(QGraphicsView::ScrollHandDrag);
27  view.scale(10,10);
28  view.show();
29  qfr->start();
30 
31  return app.exec();
32 }
Definition: qscene.h:6
Definition: qparser.h:6
int main(int argc, char *argv[])
Definition: qtv.cpp:3


csm
Author(s): Andrea Censi
autogenerated on Tue May 11 2021 02:18:23