43 lines
1.0 KiB
C++
43 lines
1.0 KiB
C++
#ifndef PICTEXTITEM_H
|
|
#define PICTEXTITEM_H
|
|
|
|
#include <QGraphicsTextItem>
|
|
#include <QPen>
|
|
#include <QGraphicsSceneMouseEvent>
|
|
class QFocusEvent;
|
|
class QGraphicsItem;
|
|
class QGraphicsScene;
|
|
class QGraphicsSceneMouseEvent;
|
|
|
|
class PicTextItem : public QGraphicsTextItem
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
enum { Type = UserType + 3 };
|
|
explicit PicTextItem(QGraphicsItem *parent = 0, QGraphicsScene *scene = 0);
|
|
|
|
int type() const
|
|
{ return Type; }
|
|
|
|
signals:
|
|
void lostFocus(PicTextItem *item);
|
|
void selectedChange(QGraphicsItem *item);
|
|
void itemEdit(QString);
|
|
|
|
protected:
|
|
QVariant itemChange(GraphicsItemChange change, const QVariant &value);
|
|
void focusOutEvent(QFocusEvent *event);
|
|
void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event);
|
|
void mouseReleaseEvent(QGraphicsSceneMouseEvent * event);
|
|
void keyPressEvent(QKeyEvent *event);
|
|
|
|
public slots:
|
|
|
|
public:
|
|
bool SpecialConditions;
|
|
int CatchCnt1StartValue;
|
|
int CatchCnt1CurrValue;
|
|
|
|
};
|
|
#endif // PICTEXTITEM_H
|