butterfly.h
来自「Linux窗口程序设计__Qt4精彩实例分析上面的源代码第二部分.以循序渐进的方」· C头文件 代码 · 共 30 行
H
30 行
#ifndef BUTTERFLY_H
#define BUTTERFLY_H
#include <QGraphicsItem>
#include <QObject>
class Butterfly : public QObject, public QGraphicsItem
{
Q_OBJECT
public:
Butterfly();
void timerEvent(QTimerEvent *);
QRectF boundingRect() const;
protected:
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
private:
bool up;
QPixmap pix_up;
QPixmap pix_down;
qreal angle;
};
#endif // BUTTERFLY_H
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?