target.h
来自「Qt4源代码,详细介绍了Qt4编程中的范例」· C头文件 代码 · 共 30 行
H
30 行
#ifndef TARGET_H#define TARGET_H#include <QGraphicsItem>#include <QObject>class Target : public QObject, public QGraphicsItem{ Q_OBJECTpublic: Target(); QRectF boundingRect() const; void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);public: qreal course; qreal speed; short type; // surface, underwater, air short attribute; // friend, foe, unknown QColor color; protected: void contextMenuEvent(QGraphicsSceneContextMenuEvent *event);};#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?