Revert rev 4814 and 4820 momentarily

git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4823 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
scorpio810
2016-12-24 12:48:44 +00:00
parent 7f46479222
commit 52f911887d
10 changed files with 95 additions and 170 deletions

View File

@@ -45,7 +45,6 @@ class Conductor : public QObject, public QGraphicsPathItem
Q_PROPERTY(QPointF pos READ pos WRITE setPos)
Q_PROPERTY(int animPath READ fakePath WRITE updatePathAnimate)
Q_PROPERTY(ConductorProperties properties READ properties WRITE setProperties)
Q_PROPERTY(autonum::sequentialNumbers sequenceNum READ sequenceNum WRITE setSequenceNum)
signals:
void propertiesChange();
@@ -63,7 +62,9 @@ class Conductor : public QObject, public QGraphicsPathItem
enum { Type = UserType + 1001 };
enum Highlight { None, Normal, Alert };
/// First terminal the wire is attached to
Terminal *terminal1;
/// Second terminal the wire is attached to
Terminal *terminal2;
public:
@@ -88,6 +89,8 @@ class Conductor : public QObject, public QGraphicsPathItem
qreal length() const;
ConductorSegment *middleSegment();
QPointF posForText(Qt::Orientations &flag);
QString text() const;
void setText(const QString &);
void refreshText();
public:
@@ -100,11 +103,8 @@ class Conductor : public QObject, public QGraphicsPathItem
public:
QVector <QPointF> handlerPoints() const;
const QList<ConductorSegment *> segmentsList() const;
void setPropertyToPotential(const ConductorProperties &property, bool only_text = false);
void setProperties(const ConductorProperties &property);
void setProperties(const ConductorProperties &properties);
ConductorProperties properties() const;
void setProfile(const ConductorProfile &, Qt::Corner);
ConductorProfile profile(Qt::Corner) const;
void setProfiles(const ConductorProfilesGroup &);
@@ -118,7 +118,6 @@ class Conductor : public QObject, public QGraphicsPathItem
autonum::sequentialNumbers sequenceNum () const {return m_autoNum_seq;}
autonum::sequentialNumbers& rSequenceNum() {return m_autoNum_seq;}
void setSequenceNum(autonum::sequentialNumbers sn);
private:
autonum::sequentialNumbers m_autoNum_seq;
@@ -144,7 +143,7 @@ class Conductor : public QObject, public QGraphicsPathItem
/// Functional properties
ConductorProperties m_properties;
/// Text input for non simple, non-singleline conductors
ConductorTextItem *m_text_item;
ConductorTextItem *text_item;
/// Segments composing the conductor
ConductorSegment *segments;
/// Attributs related to mouse interaction
@@ -160,15 +159,14 @@ class Conductor : public QObject, public QGraphicsPathItem
/// conductor profile: "photography" of what the conductor is supposed to look
/// like - there is one profile per kind of traject
ConductorProfilesGroup conductor_profiles;
/// QPen et QBrush objects used to draw conductors
static QPen conductor_pen;
static QBrush conductor_brush;
static bool pen_and_brush_initialized;
/// Define whether and how the conductor should be highlighted
Highlight must_highlight_;
bool m_valid;
bool m_freeze_label = false;
/// QPen et QBrush objects used to draw conductors
static QPen conductor_pen;
static QBrush conductor_brush;
static bool pen_and_brush_initialized;
private:
void segmentsToPath();