?? radar.cpp
字號:
//// C++ Implementation: radar//// Description: ////// Author: zeki <czm@zeki>, (C) 2007//// Copyright: See COPYING file that comes with this distribution////#include <math.h>#include <QtGui>#include "radar.h"#include "target.h"RadarView::RadarView( QGraphicsScene * scene, QWidget * parent) : QGraphicsView(scene, parent){ startTimer(1000);}void RadarView::timerEvent(QTimerEvent *){ QList<QGraphicsItem *> itemList = items(); QGraphicsItem *item; foreach(item, itemList) { Target* target = (Target*) item; target->setPos(target->mapToParent(target->speed * cos(target->course), target->speed * sin(target->course))); }}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -