29 #ifdef ACTIVELASERVIEW
30 #include <QGraphicsScene>
38 #ifdef ACTIVELASERVIEW
45 #include "ui_direcsSmall.h"
47 #include "ui_direcs.h"
51 #include <qwt_plot_layout.h>
52 #include <qwt_plot_curve.h>
53 #include <qwt_plot_grid.h>
54 #include <qwt_scale_draw.h>
55 #include <qwt_scale_widget.h>
56 #include <qwt_legend.h>
57 #include <qwt_legend_item.h>
59 #include <qwt_dial_needle.h>
67 class Gui :
public QMainWindow
109 void showAlarm(
short int sensor,
bool state);
119 #ifdef ACTIVELASERVIEW
123 void initLaserView();
129 void initLaserStuff();
141 void appendLog(QString text,
bool CR=
true,
bool sayIt=
false,
bool addTimestamp=
true);
187 void showFaceTrackData(
int faces,
int faceX,
int faceY,
int faceRadius,
int lastFaceX,
int lastFaceY);
259 #ifndef BUILDFORROBOT
267 void setPlotData5(
double *xval,
double *yval,
int size);
270 #ifndef BUILDFORROBOT
278 void setPlotData6(
double *xval,
double *yval,
int size);
281 #ifndef BUILDFORROBOT
292 #ifdef ACTIVELASERVIEW
296 void refreshLaserViewFront(QList <float> laserScannerValues, QList <int> laserScannerFlags);
301 void refreshLaserViewRear(QList <float> laserScannerValues, QList <int> laserScannerFlags);
306 void setRobotPosition(QGraphicsSceneMouseEvent* mouseEvent);
323 #ifdef ACTIVELASERVIEW
327 void zoomLaserView(QGraphicsSceneWheelEvent* wheelEvent);
337 void showLaserFrontAngles(
int largestFreeAreaStart,
int largestFreeAreaEnd,
int centerOfFreeWay,
float width);
458 void drive(
const int command);
505 void speak(QString text);
533 void demo(
bool state);
578 #ifdef ACTIVELASERVIEW
579 void on_sliderZoom_valueChanged(
int);
612 #ifndef BUILDFORROBOT
617 #ifdef ACTIVELASERVIEW
621 void createLaserScannerObjects();
622 void createLaserDistanceObjects();
623 void createLaserWidthObjects();
640 #ifndef BUILDFORROBOT
683 #ifdef ACTIVELASERVIEW
689 QGraphicsScene *scene;
690 QList <QGraphicsLineItem*> *laserLineListFront;
691 QList <QGraphicsLineItem*> *laserLineListRear;
692 QList <QGraphicsEllipseItem*> *laserDistanceLineListFront;
693 QList <QGraphicsSimpleTextItem*> *laserDistanceTextFront;
694 QList <QGraphicsEllipseItem*> *laserDistanceLineListRear;
695 QList <QGraphicsSimpleTextItem*> *laserDistanceTextRear;
696 QGraphicsPixmapItem *pixmapBot1;
697 QGraphicsPixmapItem *pixmapBot2;
698 QGraphicsEllipseItem *widthLeftCircleFront;
699 QGraphicsEllipseItem *widthRightCircleFront;
700 QGraphicsLineItem *widthLineFront;
701 QGraphicsSimpleTextItem *widthTextFront;
702 QGraphicsEllipseItem *widthLeftCircleRear;
703 QGraphicsEllipseItem *widthRightCircleRear;
704 QGraphicsLineItem *widthLineRear;
705 QGraphicsSimpleTextItem *widthTextRear;
706 qreal widthCirclesWidth;
727 static const bool ON =
true;
728 static const bool OFF =
false;
787 static const short int NONE = 0;
860 static const unsigned char RED = 1;
861 static const unsigned char GREEN = 2;