QElectroTech 0.200.1-dev
Loading...
Searching...
No Matches
PartTerminal Class Reference

#include <partterminal.h>

Inheritance diagram for PartTerminal:
Inheritance graph
Collaboration diagram for PartTerminal:
Collaboration graph

Public Types

enum  { Type = UserType + 1106 }
Public Types inherited from CustomElementGraphicPart
enum  LineStyle { NormalStyle , DashedStyle , DottedStyle , DashdottedStyle }
enum  LineWeight {
  NoneWeight , ThinWeight , NormalWeight , UltraWeight ,
  BigWeight
}
enum  Filling {
  NoneFilling , BlackFilling , WhiteFilling , GreenFilling ,
  RedFilling , BlueFilling , GrayFilling , BrunFilling ,
  YellowFilling , CyanFilling , MagentaFilling , LightgrayFilling ,
  OrangeFilling , PurpleFilling , HTMLPinkPinkFilling , HTMLPinkLightPinkFilling ,
  HTMLPinkHotPinkFilling , HTMLPinkDeepPinkFilling , HTMLPinkPaleVioletRedFilling , HTMLPinkMediumVioletRedFilling ,
  HTMLRedLightSalmonFilling , HTMLRedSalmonFilling , HTMLRedDarkSalmonFilling , HTMLRedLightCoralFilling ,
  HTMLRedIndianRedFilling , HTMLRedCrimsonFilling , HTMLRedFirebrickFilling , HTMLRedDarkRedFilling ,
  HTMLRedRedFilling , HTMLOrangeOrangeRedFilling , HTMLOrangeTomatoFilling , HTMLOrangeCoralFilling ,
  HTMLOrangeDarkOrangeFilling , HTMLOrangeOrangeFilling , HTMLYellowYellowFilling , HTMLYellowLightYellowFilling ,
  HTMLYellowLemonChiffonFilling , HTMLYellowLightGoldenrodYellowFilling , HTMLYellowPapayaWhipFilling , HTMLYellowMoccasinFilling ,
  HTMLYellowPeachPuffFilling , HTMLYellowPaleGoldenrodFilling , HTMLYellowKhakiFilling , HTMLYellowDarkKhakiFilling ,
  HTMLYellowGoldFilling , HTMLBrownCornsilkFilling , HTMLBrownBlanchedAlmondFilling , HTMLBrownBisqueFilling ,
  HTMLBrownNavajoWhiteFilling , HTMLBrownWheatFilling , HTMLBrownBurlywoodFilling , HTMLBrownTanFilling ,
  HTMLBrownRosyBrownFilling , HTMLBrownSandyBrownFilling , HTMLBrownGoldenrodFilling , HTMLBrownDarkGoldenrodFilling ,
  HTMLBrownPeruFilling , HTMLBrownChocolateFilling , HTMLBrownSaddleBrownFilling , HTMLBrownSiennaFilling ,
  HTMLBrownBrownFilling , HTMLBrownMaroonFilling , HTMLGreenDarkOliveGreenFilling , HTMLGreenOliveFilling ,
  HTMLGreenOliveDrabFilling , HTMLGreenYellowGreenFilling , HTMLGreenLimeGreenFilling , HTMLGreenLimeFilling ,
  HTMLGreenLawnGreenFilling , HTMLGreenChartreuseFilling , HTMLGreenGreenYellowFilling , HTMLGreenSpringGreenFilling ,
  HTMLGreenMediumSpringGreenFilling , HTMLGreenLightGreenFilling , HTMLGreenPaleGreenFilling , HTMLGreenDarkSeaGreenFilling ,
  HTMLGreenMediumAquamarineFilling , HTMLGreenMediumSeaGreenFilling , HTMLGreenSeaGreenFilling , HTMLGreenForestGreenFilling ,
  HTMLGreenGreenFilling , HTMLGreenDarkGreenFilling , HTMLCyanAquaFilling , HTMLCyanCyanFilling ,
  HTMLCyanLightCyanFilling , HTMLCyanPaleTurquoiseFilling , HTMLCyanAquamarineFilling , HTMLCyanTurquoiseFilling ,
  HTMLCyanMediumTurquoiseFilling , HTMLCyanDarkTurquoiseFilling , HTMLCyanLightSeaGreenFilling , HTMLCyanCadetBlueFilling ,
  HTMLCyanDarkCyanFilling , HTMLCyanTealFilling , HTMLBlueLightSteelBlueFilling , HTMLBluePowderBlueFilling ,
  HTMLBlueLightBlueFilling , HTMLBlueSkyBlueFilling , HTMLBlueLightSkyBlueFilling , HTMLBlueDeepSkyBlueFilling ,
  HTMLBlueDodgerBlueFilling , HTMLBlueCornflowerBlueFilling , HTMLBlueSteelBlueFilling , HTMLBlueRoyalBlueFilling ,
  HTMLBlueBlueFilling , HTMLBlueMediumBlueFilling , HTMLBlueDarkBlueFilling , HTMLBlueNavyFilling ,
  HTMLBlueMidnightBlueFilling , HTMLPurpleLavenderFilling , HTMLPurpleThistleFilling , HTMLPurplePlumFilling ,
  HTMLPurpleVioletFilling , HTMLPurpleOrchidFilling , HTMLPurpleFuchsiaFilling , HTMLPurpleMagentaFilling ,
  HTMLPurpleMediumOrchidFilling , HTMLPurpleMediumPurpleFilling , HTMLPurpleBlueVioletFilling , HTMLPurpleDarkVioletFilling ,
  HTMLPurpleDarkOrchidFilling , HTMLPurpleDarkMagentaFilling , HTMLPurplePurpleFilling , HTMLPurpleIndigoFilling ,
  HTMLPurpleDarkSlateBlueFilling , HTMLPurpleSlateBlueFilling , HTMLPurpleMediumSlateBlueFilling , HTMLWhiteWhiteFilling ,
  HTMLWhiteSnowFilling , HTMLWhiteHoneydewFilling , HTMLWhiteMintCreamFilling , HTMLWhiteAzureFilling ,
  HTMLWhiteAliceBlueFilling , HTMLWhiteGhostWhiteFilling , HTMLWhiteWhiteSmokeFilling , HTMLWhiteSeashellFilling ,
  HTMLWhiteBeigeFilling , HTMLWhiteOldLaceFilling , HTMLWhiteFloralWhiteFilling , HTMLWhiteIvoryFilling ,
  HTMLWhiteAntiqueWhiteFilling , HTMLWhiteLinenFilling , HTMLWhiteLavenderBlushFilling , HTMLWhiteMistyRoseFilling ,
  HTMLGrayGainsboroFilling , HTMLGrayLightGrayFilling , HTMLGraySilverFilling , HTMLGrayDarkGrayFilling ,
  HTMLGrayGrayFilling , HTMLGrayDimGrayFilling , HTMLGrayLightSlateGrayFilling , HTMLGraySlateGrayFilling ,
  HTMLGrayDarkSlateGrayFilling , HTMLGrayBlackFilling , HorFilling , VerFilling ,
  BdiagFilling , FdiagFilling
}
enum  Color {
  BlackColor , WhiteColor , GreenColor , RedColor ,
  BlueColor , GrayColor , BrunColor , YellowColor ,
  CyanColor , MagentaColor , LightgrayColor , OrangeColor ,
  PurpleColor , HTMLPinkPinkColor , HTMLPinkLightPinkColor , HTMLPinkHotPinkColor ,
  HTMLPinkDeepPinkColor , HTMLPinkPaleVioletRedColor , HTMLPinkMediumVioletRedColor , HTMLRedLightSalmonColor ,
  HTMLRedSalmonColor , HTMLRedDarkSalmonColor , HTMLRedLightCoralColor , HTMLRedIndianRedColor ,
  HTMLRedCrimsonColor , HTMLRedFirebrickColor , HTMLRedDarkRedColor , HTMLRedRedColor ,
  HTMLOrangeOrangeRedColor , HTMLOrangeTomatoColor , HTMLOrangeCoralColor , HTMLOrangeDarkOrangeColor ,
  HTMLOrangeOrangeColor , HTMLYellowYellowColor , HTMLYellowLightYellowColor , HTMLYellowLemonChiffonColor ,
  HTMLYellowLightGoldenrodYellowColor , HTMLYellowPapayaWhipColor , HTMLYellowMoccasinColor , HTMLYellowPeachPuffColor ,
  HTMLYellowPaleGoldenrodColor , HTMLYellowKhakiColor , HTMLYellowDarkKhakiColor , HTMLYellowGoldColor ,
  HTMLBrownCornsilkColor , HTMLBrownBlanchedAlmondColor , HTMLBrownBisqueColor , HTMLBrownNavajoWhiteColor ,
  HTMLBrownWheatColor , HTMLBrownBurlywoodColor , HTMLBrownTanColor , HTMLBrownRosyBrownColor ,
  HTMLBrownSandyBrownColor , HTMLBrownGoldenrodColor , HTMLBrownDarkGoldenrodColor , HTMLBrownPeruColor ,
  HTMLBrownChocolateColor , HTMLBrownSaddleBrownColor , HTMLBrownSiennaColor , HTMLBrownBrownColor ,
  HTMLBrownMaroonColor , HTMLGreenDarkOliveGreenColor , HTMLGreenOliveColor , HTMLGreenOliveDrabColor ,
  HTMLGreenYellowGreenColor , HTMLGreenLimeGreenColor , HTMLGreenLimeColor , HTMLGreenLawnGreenColor ,
  HTMLGreenChartreuseColor , HTMLGreenGreenYellowColor , HTMLGreenSpringGreenColor , HTMLGreenMediumSpringGreenColor ,
  HTMLGreenLightGreenColor , HTMLGreenPaleGreenColor , HTMLGreenDarkSeaGreenColor , HTMLGreenMediumAquamarineColor ,
  HTMLGreenMediumSeaGreenColor , HTMLGreenSeaGreenColor , HTMLGreenForestGreenColor , HTMLGreenGreenColor ,
  HTMLGreenDarkGreenColor , HTMLCyanAquaColor , HTMLCyanCyanColor , HTMLCyanLightCyanColor ,
  HTMLCyanPaleTurquoiseColor , HTMLCyanAquamarineColor , HTMLCyanTurquoiseColor , HTMLCyanMediumTurquoiseColor ,
  HTMLCyanDarkTurquoiseColor , HTMLCyanLightSeaGreenColor , HTMLCyanCadetBlueColor , HTMLCyanDarkCyanColor ,
  HTMLCyanTealColor , HTMLBlueLightSteelBlueColor , HTMLBluePowderBlueColor , HTMLBlueLightBlueColor ,
  HTMLBlueSkyBlueColor , HTMLBlueLightSkyBlueColor , HTMLBlueDeepSkyBlueColor , HTMLBlueDodgerBlueColor ,
  HTMLBlueCornflowerBlueColor , HTMLBlueSteelBlueColor , HTMLBlueRoyalBlueColor , HTMLBlueBlueColor ,
  HTMLBlueMediumBlueColor , HTMLBlueDarkBlueColor , HTMLBlueNavyColor , HTMLBlueMidnightBlueColor ,
  HTMLPurpleLavenderColor , HTMLPurpleThistleColor , HTMLPurplePlumColor , HTMLPurpleVioletColor ,
  HTMLPurpleOrchidColor , HTMLPurpleFuchsiaColor , HTMLPurpleMagentaColor , HTMLPurpleMediumOrchidColor ,
  HTMLPurpleMediumPurpleColor , HTMLPurpleBlueVioletColor , HTMLPurpleDarkVioletColor , HTMLPurpleDarkOrchidColor ,
  HTMLPurpleDarkMagentaColor , HTMLPurplePurpleColor , HTMLPurpleIndigoColor , HTMLPurpleDarkSlateBlueColor ,
  HTMLPurpleSlateBlueColor , HTMLPurpleMediumSlateBlueColor , HTMLWhiteWhiteColor , HTMLWhiteSnowColor ,
  HTMLWhiteHoneydewColor , HTMLWhiteMintCreamColor , HTMLWhiteAzureColor , HTMLWhiteAliceBlueColor ,
  HTMLWhiteGhostWhiteColor , HTMLWhiteWhiteSmokeColor , HTMLWhiteSeashellColor , HTMLWhiteBeigeColor ,
  HTMLWhiteOldLaceColor , HTMLWhiteFloralWhiteColor , HTMLWhiteIvoryColor , HTMLWhiteAntiqueWhiteColor ,
  HTMLWhiteLinenColor , HTMLWhiteLavenderBlushColor , HTMLWhiteMistyRoseColor , HTMLGrayGainsboroColor ,
  HTMLGrayLightGrayColor , HTMLGraySilverColor , HTMLGrayDarkGrayColor , HTMLGrayGrayColor ,
  HTMLGrayDimGrayColor , HTMLGrayLightSlateGrayColor , HTMLGraySlateGrayColor , HTMLGrayDarkSlateGrayColor ,
  HTMLGrayBlackColor , NoneColor
}

Signals

void orientationChanged ()
void nameChanged ()
void terminalTypeChanged ()
void showNameChanged ()
void labelPosChanged ()
void labelFontChanged ()
void labelRotationChanged ()
void labelHAlignmentChanged ()
void labelVAlignmentChanged ()
void labelFrameChanged ()
void labelColorChanged ()
void useMasterLabelChanged ()
void masterLabelIndexChanged ()

Public Member Functions

 PartTerminal (QETElementEditor *editor, QGraphicsItem *parent=nullptr)
 PartTerminal::PartTerminal.
 ~PartTerminal () override
 Destructeur.
int type () const override
QString xmlName () const override
void fromXml (const QDomElement &) override
const QDomElement toXml (QDomDocument &) const override
void paint (QPainter *painter, const QStyleOptionGraphicsItem *, QWidget *) override
QPainterPath shape () const override
 PartTerminal::shape.
QPainterPath shadowShape () const override
 PartTerminal::shadowShape.
QRectF boundingRect () const override
 PartTerminal::boundingRect.
bool isUseless () const override
QRectF sceneGeometricRect () const override
void startUserTransformation (const QRectF &) override
void handleUserTransformation (const QRectF &, const QRectF &) override
Qet::Orientation orientation () const
void setOrientation (Qet::Orientation ori)
void setRotation (qreal angle)
qreal rotation () const
 PartTerminal::rotation.
void flip (qreal axis_y=0)
 PartTerminal::flip turn part upside down.
void mirror (qreal axis_x=0)
 PartTerminal::mirror turn part from left to right.
void nextOrientation ()
void previousOrientation ()
QString terminalName () const
void setTerminalName (const QString &name)
 PartTerminal::setTerminalName.
QString name () const override
TerminalData::Type terminalType () const
void setTerminalType (TerminalData::Type type)
 PartTerminal::setTerminalType Set the type of terminal to 'type'.
bool showName () const
void setShowName (bool show)
QPointF labelPos () const
void setLabelPos (QPointF pos)
QFont labelFont () const
void setLabelFont (QFont font)
qreal labelRotation () const
void setLabelRotation (qreal rotation)
Qt::Alignment labelHAlignment () const
void setLabelHAlignment (Qt::Alignment align)
Qt::Alignment labelVAlignment () const
void setLabelVAlignment (Qt::Alignment align)
bool labelFrame () const
void setLabelFrame (bool frame)
QColor labelColor () const
void setLabelColor (QColor color)
bool useMasterLabel () const
void setUseMasterLabel (bool use)
int masterLabelIndex () const
void setMasterLabelIndex (int index)
void setNewUuid ()
QRectF labelRect () const
 PartTerminal::labelRect.
Public Member Functions inherited from CustomElementGraphicPart
 CustomElementGraphicPart (QETElementEditor *editor, QGraphicsItem *parent=nullptr)
 CustomElementGraphicPart::CustomElementGraphicPart Default constructor. By default, item is selectable, send geometry change (Qt > 4.6), accept mouse left button and accept hover event.
 ~CustomElementGraphicPart () override
 CustomElementGraphicPart::~CustomElementGraphicPart Destructor.
LineStyle lineStyle () const
void setLineStyle (const LineStyle ls)
 CustomElementGraphicPart::setLineStyle Set line style to ls.
LineWeight lineWeight () const
void setLineWeight (const LineWeight lw)
 CustomElementGraphicPart::setLineWeight Set line weight to lw.
qreal penWeight () const
 CustomElementGraphicPart::penWeight.
Filling filling () const
void setFilling (const Filling f)
 CustomElementGraphicPart::setFilling Set filling to f.
Color color () const
void setColor (const Color c)
 CustomElementGraphicPart::setColor Set color to c.
bool antialiased () const
void setAntialiased (const bool b)
 CustomElementGraphicPart::setAntialiased Set antialias to b.
void setProperty (const char *name, const QVariant &value) override
QVariant property (const char *name) const override
virtual void addHandler ()
virtual void removeHandler ()
virtual void setHandlerColor (QPointF, const QColor &)
virtual void resetAllHandlerColor ()
Public Member Functions inherited from CustomElementPart
 CustomElementPart (QETElementEditor *editor)
 CustomElementPart Constructor.
virtual ~CustomElementPart ()
 ~CustomElementPart Destructor
virtual QETElementEditorelementEditor () const
virtual void updateCurrentPartEditor () const
virtual ElementSceneelementScene () const
virtual QUndoStack & undoStack () const
virtual QGraphicsItem * toItem ()
virtual QET::ScalingMethod preferredScalingMethod () const

Protected Member Functions

void mousePressEvent (QGraphicsSceneMouseEvent *event) override
void mouseMoveEvent (QGraphicsSceneMouseEvent *event) override
void mouseReleaseEvent (QGraphicsSceneMouseEvent *event) override
Protected Member Functions inherited from CustomElementGraphicPart
void stylesToXml (QDomElement &) const
 CustomElementGraphicPart::stylesToXml Write the current style to xml element. The style are stored like this: name-of-style:value;name-of-style:value Each style separate by ; and name-style/value are separate by :
void stylesFromXml (const QDomElement &)
 CustomElementGraphicPart::stylesFromXml Read the style used by this, from a xml element.
void resetStyles ()
 CustomElementGraphicPart::resetStyles Reset the current style to default, same style of default constructor.
void applyStylesToQPainter (QPainter &) const
 CustomElementGraphicPart::applyStylesToQPainter Apply the current style to the QPainter.
void drawShadowShape (QPainter *painter)
 CustomElementGraphicPart::drawShadowShape Draw a transparent blue shadow arround the shape of this item. The QPainterPathStroker used to draw shadows have a width of SHADOWS_HEIGHT Be carefull if penWeight of this item is to 0 the outline of strock is bigger of 0.5.
void hoverEnterEvent (QGraphicsSceneHoverEvent *event) override
 CustomElementGraphicPart::hoverEnterEvent Reimplemented from QGraphicsObject. Set m_hovered to true.
void hoverLeaveEvent (QGraphicsSceneHoverEvent *event) override
 CustomElementGraphicPart::hoverLeaveEvent Reimplemented from QGraphicsObject. Set m_hovered to false.
void mousePressEvent (QGraphicsSceneMouseEvent *event) override
void mouseMoveEvent (QGraphicsSceneMouseEvent *event) override
void mouseReleaseEvent (QGraphicsSceneMouseEvent *event) override
Protected Member Functions inherited from CustomElementPart
QList< QPointF > mapPoints (const QRectF &, const QRectF &, const QList< QPointF > &)

Properties

Qet::Orientation orientation
QString terminal_name
TerminalData::Type terminal_type
bool show_name
QPointF label_pos
QFont label_font
qreal label_rotation
Qt::Alignment label_halignment
Qt::Alignment label_valignment
bool label_frame
QColor label_color
bool use_master_label
int master_label_index
Properties inherited from CustomElementGraphicPart
LineStyle line_style
LineWeight line_weight
Filling filling
Color color
bool antialias

Private Member Functions

 PartTerminal (const PartTerminal &)
void updateSecondPoint ()

Private Attributes

TerminalDatad
QPointF saved_position_
bool m_dragging_label = false
QPointF m_original_label_pos

Additional Inherited Members

Static Public Member Functions inherited from CustomElementGraphicPart
static void drawCross (const QPointF &center, QPainter *painter)
 CustomElementGraphicPart::drawCross Draw a cross at pos center.
Protected Attributes inherited from CustomElementGraphicPart
bool m_hovered

Detailed Description

This class represents a terminal which may be used to compose the drawing of an electrical element within the element editor.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
Type 

Constructor & Destructor Documentation

◆ PartTerminal() [1/2]

PartTerminal::PartTerminal ( QETElementEditor * editor,
QGraphicsItem * parent = nullptr )

PartTerminal::PartTerminal.

Parameters
editor: L'editeur d'element concerne
parent: Le QGraphicsItem parent de cette borne
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ~PartTerminal()

PartTerminal::~PartTerminal ( )
override

Destructeur.

◆ PartTerminal() [2/2]

PartTerminal::PartTerminal ( const PartTerminal & )
private
Here is the call graph for this function:

Member Function Documentation

◆ boundingRect()

QRectF PartTerminal::boundingRect ( ) const
override

PartTerminal::boundingRect.

Returns
the bounding rect of this item
Here is the call graph for this function:

◆ flip()

void PartTerminal::flip ( qreal axis_y = 0)

PartTerminal::flip turn part upside down.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ fromXml()

void PartTerminal::fromXml ( const QDomElement & xml_elmt)
overridevirtual

Import terminal properties from an XML element Importe les proprietes d'une borne depuis un element XML

Parameters
xml_elmtElement XML a lire / XML element to read

Implements CustomElementPart.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ handleUserTransformation()

void PartTerminal::handleUserTransformation ( const QRectF & initial_selection_rect,
const QRectF & new_selection_rect )
overridevirtual

Handle the user-induced transformation from initial_selection_rect to new_selection_rect

Implements CustomElementPart.

Here is the call graph for this function:

◆ isUseless()

bool PartTerminal::isUseless ( ) const
overridevirtual
Returns
true si cette partie n'est pas pertinente et ne merite pas d'etre conservee / enregistree. Une borne est toujours pertinente ; cette fonction renvoie donc toujours false

Implements CustomElementPart.

◆ labelColor()

QColor PartTerminal::labelColor ( ) const
inline

◆ labelColorChanged

void PartTerminal::labelColorChanged ( )
signal
Here is the call graph for this function:
Here is the caller graph for this function:

◆ labelFont()

QFont PartTerminal::labelFont ( ) const
inline

◆ labelFontChanged

void PartTerminal::labelFontChanged ( )
signal
Here is the call graph for this function:
Here is the caller graph for this function:

◆ labelFrame()

bool PartTerminal::labelFrame ( ) const
inline

◆ labelFrameChanged

void PartTerminal::labelFrameChanged ( )
signal
Here is the call graph for this function:
Here is the caller graph for this function:

◆ labelHAlignment()

Qt::Alignment PartTerminal::labelHAlignment ( ) const
inline

◆ labelHAlignmentChanged

void PartTerminal::labelHAlignmentChanged ( )
signal
Here is the call graph for this function:
Here is the caller graph for this function:

◆ labelPos()

QPointF PartTerminal::labelPos ( ) const
inline

◆ labelPosChanged

void PartTerminal::labelPosChanged ( )
signal
Here is the call graph for this function:
Here is the caller graph for this function:

◆ labelRect()

QRectF PartTerminal::labelRect ( ) const

PartTerminal::labelRect.

Returns
the rectangle of the label text (in item coordinates), or an empty rect if the label is not shown
Here is the caller graph for this function:

◆ labelRotation()

qreal PartTerminal::labelRotation ( ) const
inline

◆ labelRotationChanged

void PartTerminal::labelRotationChanged ( )
signal
Here is the call graph for this function:
Here is the caller graph for this function:

◆ labelVAlignment()

Qt::Alignment PartTerminal::labelVAlignment ( ) const
inline

◆ labelVAlignmentChanged

void PartTerminal::labelVAlignmentChanged ( )
signal
Here is the call graph for this function:
Here is the caller graph for this function:

◆ masterLabelIndex()

int PartTerminal::masterLabelIndex ( ) const
inline

◆ masterLabelIndexChanged

void PartTerminal::masterLabelIndexChanged ( )
signal
Here is the call graph for this function:
Here is the caller graph for this function:

◆ mirror()

void PartTerminal::mirror ( qreal axis_x = 0)

PartTerminal::mirror turn part from left to right.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ mouseMoveEvent()

void PartTerminal::mouseMoveEvent ( QGraphicsSceneMouseEvent * event)
overrideprotected
Here is the call graph for this function:

◆ mousePressEvent()

void PartTerminal::mousePressEvent ( QGraphicsSceneMouseEvent * event)
overrideprotected
Here is the call graph for this function:

◆ mouseReleaseEvent()

void PartTerminal::mouseReleaseEvent ( QGraphicsSceneMouseEvent * event)
overrideprotected
Here is the call graph for this function:

◆ name()

QString PartTerminal::name ( ) const
inlineoverridevirtual
Returns
the name of the primitive

Implements CustomElementPart.

Here is the caller graph for this function:

◆ nameChanged

void PartTerminal::nameChanged ( )
signal
Here is the call graph for this function:
Here is the caller graph for this function:

◆ nextOrientation()

void PartTerminal::nextOrientation ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ orientation()

Qet::Orientation PartTerminal::orientation ( ) const
inline

◆ orientationChanged

void PartTerminal::orientationChanged ( )
signal
Here is the call graph for this function:
Here is the caller graph for this function:

◆ paint()

void PartTerminal::paint ( QPainter * painter,
const QStyleOptionGraphicsItem * options,
QWidget * widget )
override

Dessine la borne

Parameters
painterQPainter a utiliser pour rendre le dessin
optionsOptions pour affiner le rendu
widgetWidget sur lequel le rendu est effectue
Here is the call graph for this function:

◆ previousOrientation()

void PartTerminal::previousOrientation ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rotation()

qreal PartTerminal::rotation ( ) const

PartTerminal::rotation.

Returns
current rotation-angle in degrees
Here is the caller graph for this function:

◆ sceneGeometricRect()

QRectF PartTerminal::sceneGeometricRect ( ) const
overridevirtual
Returns
the minimum, margin-less rectangle this part can fit into, in scene coordinates. It is different from boundingRect() because it is not supposed to imply any margin, and it is different from shape because it is a regular rectangle, not a complex shape.

Implements CustomElementPart.

◆ setLabelColor()

void PartTerminal::setLabelColor ( QColor color)
Here is the call graph for this function:

◆ setLabelFont()

void PartTerminal::setLabelFont ( QFont font)
Here is the call graph for this function:

◆ setLabelFrame()

void PartTerminal::setLabelFrame ( bool frame)
Here is the call graph for this function:

◆ setLabelHAlignment()

void PartTerminal::setLabelHAlignment ( Qt::Alignment align)
Here is the call graph for this function:

◆ setLabelPos()

void PartTerminal::setLabelPos ( QPointF pos)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setLabelRotation()

void PartTerminal::setLabelRotation ( qreal rotation)
Here is the call graph for this function:

◆ setLabelVAlignment()

void PartTerminal::setLabelVAlignment ( Qt::Alignment align)
Here is the call graph for this function:

◆ setMasterLabelIndex()

void PartTerminal::setMasterLabelIndex ( int index)
Here is the call graph for this function:

◆ setNewUuid()

void PartTerminal::setNewUuid ( )
Here is the caller graph for this function:

◆ setOrientation()

void PartTerminal::setOrientation ( Qet::Orientation ori)

Definit l'orientation de la borne

Parameters
orila nouvelle orientation de la borne
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setRotation()

void PartTerminal::setRotation ( qreal angle)

Redefines setRotation to call setOrientation

Parameters
angle
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setShowName()

void PartTerminal::setShowName ( bool show)
Here is the call graph for this function:

◆ setTerminalName()

void PartTerminal::setTerminalName ( const QString & name)

PartTerminal::setTerminalName.

Parameters
name
Here is the call graph for this function:

◆ setTerminalType()

void PartTerminal::setTerminalType ( TerminalData::Type type)

PartTerminal::setTerminalType Set the type of terminal to 'type'.

Parameters
type
Here is the call graph for this function:

◆ setUseMasterLabel()

void PartTerminal::setUseMasterLabel ( bool use)
Here is the call graph for this function:

◆ shadowShape()

QPainterPath PartTerminal::shadowShape ( ) const
overridevirtual

PartTerminal::shadowShape.

Returns
the hover outline shape (terminal line only, no label rect)

Implements CustomElementGraphicPart.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ shape()

QPainterPath PartTerminal::shape ( ) const
override

PartTerminal::shape.

Returns
the shape of this item
Here is the call graph for this function:
Here is the caller graph for this function:

◆ showName()

bool PartTerminal::showName ( ) const
inline

◆ showNameChanged

void PartTerminal::showNameChanged ( )
signal
Here is the call graph for this function:
Here is the caller graph for this function:

◆ startUserTransformation()

void PartTerminal::startUserTransformation ( const QRectF & initial_selection_rect)
overridevirtual

Start the user-induced transformation, provided this primitive is contained within the initial_selection_rect bounding rectangle.

Implements CustomElementPart.

◆ terminalName()

QString PartTerminal::terminalName ( ) const
inline

◆ terminalType()

TerminalData::Type PartTerminal::terminalType ( ) const
inline

◆ terminalTypeChanged

void PartTerminal::terminalTypeChanged ( )
signal
Here is the call graph for this function:
Here is the caller graph for this function:

◆ toXml()

const QDomElement PartTerminal::toXml ( QDomDocument & xml_document) const
overridevirtual

Exporte la borne en XML

Parameters
xml_documentDocument XML a utiliser pour creer l'element XML
Returns
un element XML decrivant la borne

Implements CustomElementPart.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ type()

int PartTerminal::type ( ) const
inlineoverride

Enable the use of qgraphicsitem_cast to safely cast a QGraphicsItem into a PartTerminal.

Returns
the QGraphicsItem type
Here is the caller graph for this function:

◆ updateSecondPoint()

void PartTerminal::updateSecondPoint ( )
private

Updates the position of the second point according to the position and orientation of the terminal. Met a jour la position du second point en fonction de la position et de l'orientation de la borne.

Here is the caller graph for this function:

◆ useMasterLabel()

bool PartTerminal::useMasterLabel ( ) const
inline

◆ useMasterLabelChanged

void PartTerminal::useMasterLabelChanged ( )
signal
Here is the call graph for this function:
Here is the caller graph for this function:

◆ xmlName()

QString PartTerminal::xmlName ( ) const
inlineoverridevirtual
Returns
the name that will be used as XML tag when exporting the primitive

Implements CustomElementPart.

Member Data Documentation

◆ d

TerminalData* PartTerminal::d
private

◆ m_dragging_label

bool PartTerminal::m_dragging_label = false
private

◆ m_original_label_pos

QPointF PartTerminal::m_original_label_pos
private

◆ saved_position_

QPointF PartTerminal::saved_position_
private

Property Documentation

◆ label_color

QColor PartTerminal::label_color
readwrite

◆ label_font

QFont PartTerminal::label_font
readwrite

◆ label_frame

bool PartTerminal::label_frame
readwrite

◆ label_halignment

Qt::Alignment PartTerminal::label_halignment
readwrite

◆ label_pos

QPointF PartTerminal::label_pos
readwrite

◆ label_rotation

qreal PartTerminal::label_rotation
readwrite

◆ label_valignment

Qt::Alignment PartTerminal::label_valignment
readwrite

◆ master_label_index

int PartTerminal::master_label_index
readwrite

◆ orientation

Qet::Orientation PartTerminal::orientation
readwrite

◆ show_name

bool PartTerminal::show_name
readwrite

◆ terminal_name

QString PartTerminal::terminal_name
readwrite

◆ terminal_type

TerminalData::Type PartTerminal::terminal_type
readwrite

◆ use_master_label

bool PartTerminal::use_master_label
readwrite

The documentation for this class was generated from the following files: