Guest User

Untitled

a guest
Jul 24th, 2015
228
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. displayData.cpp
  2.  
  3. #include "displaydata.h"
  4. #include "plane.h"
  5.  
  6. #include <QTimer>
  7. #include <QDebug>
  8. #include <QPainter>
  9.  
  10. extern double speed;
  11. extern int planeRotation;
  12.  
  13. displayData::displayData()
  14. {
  15.  
  16. }
  17.  
  18. void displayData::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
  19. {
  20. painter->setFont(QFont("times", 13));
  21. painter->drawText(5,15, QString("Speed: " + QString::number(speed)));
  22. painter->drawText(5, 30, QString("Rotation: " + QString::number(planeRotation)));
  23. }
RAW Paste Data