PageRenderTime 31ms CodeModel.GetById 19ms app.highlight 8ms RepoModel.GetById 1ms app.codeStats 0ms

/vp_plugins/global/picitem.h

http://cupsfilter.googlecode.com/
C++ Header | 39 lines | 29 code | 6 blank | 4 comment | 0 complexity | e0831d426028053e48ebc2d860a945a0 MD5 | raw file
 1#ifndef PICITEM_H
 2#define PICITEM_H
 3
 4#include <QGraphicsItem>
 5#include <QGraphicsSceneWheelEvent>
 6#include <QObject>
 7QT_BEGIN_NAMESPACE
 8class QFocusEvent;
 9class QGraphicsSceneMouseEvent;
10class QGraphicsSceneContextMenuEvent;
11class QAction;
12QT_END_NAMESPACE
13
14class PicItem: public QGraphicsPixmapItem//,public QObject
15{
16 //Q_OBJECT
17public:
18  PicItem(QGraphicsItem * parent = 0);
19  PicItem(const QPixmap & pixmap, QGraphicsItem * parent = 0);
20  void setMyTransform(const qreal m_angle,const qreal m_scale);
21
22  qreal  getAngle()  const {return m_Angle;}
23  qreal  getScaledSize()  const;
24
25  //void setAngle(qreal angle);
26  //void setScaledSize(qreal fd_xy);
27
28protected:
29  void wheelEvent (QGraphicsSceneWheelEvent * event);
30  void mousePressEvent(QGraphicsSceneMouseEvent *event);
31  void mouseMoveEvent(QGraphicsSceneMouseEvent *event);
32private:
33  //QAction *delElemAction;
34  QPointF lastPos;
35  qreal   m_Angle;
36  qreal   m_fd_xy;
37};
38
39#endif