mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-24 03:10:52 +01:00
(basic implementation, need to be improved) git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@2906 bfdf4180-ca20-0410-9c96-a3a8aa849046
42 lines
794 B
C++
42 lines
794 B
C++
#ifndef CROSSREFITEM_H
|
|
#define CROSSREFITEM_H
|
|
|
|
#include "qetgraphicsitem/qetgraphicsitem.h"
|
|
class element;
|
|
|
|
|
|
class CrossRefItem : public QetGraphicsItem
|
|
{
|
|
Q_OBJECT
|
|
|
|
//Methods
|
|
public:
|
|
explicit CrossRefItem(Element *elmt, QetGraphicsItem *parent = 0);
|
|
~CrossRefItem();
|
|
|
|
QRectF boundingRect() const;
|
|
|
|
signals:
|
|
|
|
public slots:
|
|
void updateLabel();
|
|
void autoPos();
|
|
|
|
protected:
|
|
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
|
|
virtual void mouseMoveEvent(QGraphicsSceneMouseEvent *e);
|
|
virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent *e);
|
|
|
|
private:
|
|
void fillCrossRef(QPainter *painter);
|
|
|
|
//Attributes
|
|
private:
|
|
Element *element_; //element to display the cross reference
|
|
QPicture drawing_;
|
|
bool b;
|
|
|
|
};
|
|
|
|
#endif // CROSSREFITEM_H
|