mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-05-22 13:19:58 +02:00
add cross reference graphic item, only for master element.
(basic implementation, need to be improved) git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@2906 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
41
sources/qetgraphicsitem/crossrefitem.h
Normal file
41
sources/qetgraphicsitem/crossrefitem.h
Normal file
@@ -0,0 +1,41 @@
|
||||
#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
|
||||
Reference in New Issue
Block a user