QElectroTech  0.8-dev
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Properties | Private Attributes | List of all members
CustomElementGraphicPart Class Referenceabstract

The CustomElementGraphicPart class This class is the base for all home-made primitive like line, rectangle, ellipse etc.... It provides methods and enums to manage style attributes available for primitive (color, pen style, etc...) More...

#include <customelementgraphicpart.h>

Inheritance diagram for CustomElementGraphicPart:
Inheritance graph
Collaboration diagram for CustomElementGraphicPart:
Collaboration graph

Public Types

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
}
 

Public Member Functions

 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. More...
 
 ~CustomElementGraphicPart () override
 CustomElementGraphicPart::~CustomElementGraphicPart Destructor. More...
 
LineStyle lineStyle () const
 
void setLineStyle (const LineStyle ls)
 CustomElementGraphicPart::setLineStyle Set line style to ls. More...
 
LineWeight lineWeight () const
 
void setLineWeight (const LineWeight lw)
 CustomElementGraphicPart::setLineWeight Set line weight to lw. More...
 
qreal penWeight () const
 CustomElementGraphicPart::penWeight. More...
 
Filling filling () const
 
void setFilling (const Filling f)
 CustomElementGraphicPart::setFilling Set filling to f. More...
 
Color color () const
 
void setColor (const Color c)
 CustomElementGraphicPart::setColor Set color to c. More...
 
bool antialiased () const
 
void setAntialiased (const bool b)
 CustomElementGraphicPart::setAntialiased Set antialias to b. More...
 
void setProperty (const char *name, const QVariant &value) override
 
QVariant property (const char *name) const override
 
virtual QPainterPath shadowShape () const =0
 
virtual void setHandlerColor (QPointF, const QColor &)
 
virtual void resetAllHandlerColor ()
 
- Public Member Functions inherited from CustomElementPart
 CustomElementPart (QETElementEditor *editor)
 CustomElementPart Constructor. More...
 
virtual ~CustomElementPart ()
 ~CustomElementPart Destructor More...
 
virtual void fromXml (const QDomElement &)=0
 
virtual const QDomElement toXml (QDomDocument &) const =0
 
virtual bool isUseless () const =0
 
virtual QRectF sceneGeometricRect () const =0
 
virtual void startUserTransformation (const QRectF &)=0
 
virtual void handleUserTransformation (const QRectF &, const QRectF &)=0
 
virtual QETElementEditorelementEditor () const
 
virtual void updateCurrentPartEditor () const
 
virtual ElementSceneelementScene () const
 
virtual QUndoStack & undoStack () const
 
virtual QString name () const =0
 
virtual QString xmlName () const =0
 
virtual QGraphicsItem * toItem ()
 
virtual QET::ScalingMethod preferredScalingMethod () const
 

Static Public Member Functions

static void drawCross (const QPointF &center, QPainter *painter)
 CustomElementGraphicPart::drawCross Draw a cross at pos center. More...
 

Protected Member Functions

void stylesToXml (QDomElement &) const
 CustomElementGraphicPart::stylesToXml Write the curent 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 : More...
 
void stylesFromXml (const QDomElement &)
 CustomElementGraphicPart::stylesFromXml Read the style used by this, from a xml element. More...
 
void resetStyles ()
 CustomElementGraphicPart::resetStyles Reset the curent style to default, same style of default constructor. More...
 
void applyStylesToQPainter (QPainter &) const
 CustomElementGraphicPart::applyStylesToQPainter Apply the current style to the QPainter. More...
 
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. More...
 
QVariant itemChange (GraphicsItemChange change, const QVariant &value) override
 CustomElementGraphicPart::itemChange Reimplemented from QGraphicsObject. If the item position change call updateCurrentPartEditor() the change is always send to QGraphicsObject. More...
 
void hoverEnterEvent (QGraphicsSceneHoverEvent *event) override
 CustomElementGraphicPart::hoverEnterEvent Reimplemented from QGraphicsObject. Set m_hovered to true. More...
 
void hoverLeaveEvent (QGraphicsSceneHoverEvent *event) override
 CustomElementGraphicPart::hoverLeaveEvent Reimplemented from QGraphicsObject. Set m_hovered to false. More...
 
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 > &)
 

Protected Attributes

bool m_hovered
 

Properties

LineStyle line_style
 
LineWeight line_weight
 
Filling filling
 
Color color
 
bool antialias
 

Private Attributes

LineStyle _linestyle
 
LineWeight _lineweight
 
Filling _filling
 
Color _color
 
bool _antialiased
 
QPointF m_origin_pos
 

Detailed Description

The CustomElementGraphicPart class This class is the base for all home-made primitive like line, rectangle, ellipse etc.... It provides methods and enums to manage style attributes available for primitive (color, pen style, etc...)

Member Enumeration Documentation

◆ Color

Enumerator
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 

◆ Filling

Enumerator
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 

◆ LineStyle

Enumerator
NormalStyle 
DashedStyle 
DottedStyle 
DashdottedStyle 

◆ LineWeight

Enumerator
NoneWeight 
ThinWeight 
NormalWeight 
UltraWeight 
BigWeight 

Constructor & Destructor Documentation

◆ CustomElementGraphicPart()

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.

Parameters
editorQETElement editor that belong this.
parent

◆ ~CustomElementGraphicPart()

CustomElementGraphicPart::~CustomElementGraphicPart ( )
override

Member Function Documentation

◆ antialiased()

bool CustomElementGraphicPart::antialiased ( ) const
inline

◆ applyStylesToQPainter()

void CustomElementGraphicPart::applyStylesToQPainter ( QPainter &  painter) const
protected

CustomElementGraphicPart::applyStylesToQPainter Apply the current style to the QPainter.

Parameters
painter
Here is the caller graph for this function:

◆ color()

Color CustomElementGraphicPart::color ( ) const
inline

◆ drawCross()

void CustomElementGraphicPart::drawCross ( const QPointF &  center,
QPainter *  painter 
)
static

CustomElementGraphicPart::drawCross Draw a cross at pos center.

Parameters
center: center of cross
painter: painter to use for draw cross, the painter state is restored at end of this method.
Here is the caller graph for this function:

◆ drawShadowShape()

void CustomElementGraphicPart::drawShadowShape ( QPainter *  painter)
protected

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.

Parameters
painter: painter to use for draw this shadows
Here is the call graph for this function:
Here is the caller graph for this function:

◆ filling()

Filling CustomElementGraphicPart::filling ( ) const
inline

◆ hoverEnterEvent()

void CustomElementGraphicPart::hoverEnterEvent ( QGraphicsSceneHoverEvent *  event)
overrideprotected

CustomElementGraphicPart::hoverEnterEvent Reimplemented from QGraphicsObject. Set m_hovered to true.

Parameters
event

◆ hoverLeaveEvent()

void CustomElementGraphicPart::hoverLeaveEvent ( QGraphicsSceneHoverEvent *  event)
overrideprotected

CustomElementGraphicPart::hoverLeaveEvent Reimplemented from QGraphicsObject. Set m_hovered to false.

Parameters
event

◆ itemChange()

QVariant CustomElementGraphicPart::itemChange ( GraphicsItemChange  change,
const QVariant &  value 
)
overrideprotected

CustomElementGraphicPart::itemChange Reimplemented from QGraphicsObject. If the item position change call updateCurrentPartEditor() the change is always send to QGraphicsObject.

Parameters
change
value
Returns
the returned value of QGraphicsObject::itemChange
Here is the call graph for this function:

◆ lineStyle()

LineStyle CustomElementGraphicPart::lineStyle ( ) const
inline

◆ lineWeight()

LineWeight CustomElementGraphicPart::lineWeight ( ) const
inline

◆ mouseMoveEvent()

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

◆ mousePressEvent()

void CustomElementGraphicPart::mousePressEvent ( QGraphicsSceneMouseEvent *  event)
overrideprotected

◆ mouseReleaseEvent()

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

◆ penWeight()

qreal CustomElementGraphicPart::penWeight ( ) const

CustomElementGraphicPart::penWeight.

Returns
the weight of pen
Here is the caller graph for this function:

◆ property()

QVariant CustomElementGraphicPart::property ( const char *  name) const
inlineoverridevirtual

Get the current value of a specific primitive property

Implements CustomElementPart.

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

◆ resetAllHandlerColor()

virtual void CustomElementGraphicPart::resetAllHandlerColor ( )
inlinevirtual

Reimplemented in PartPolygon.

◆ resetStyles()

void CustomElementGraphicPart::resetStyles ( )
protected

CustomElementGraphicPart::resetStyles Reset the curent style to default, same style of default constructor.

Here is the caller graph for this function:

◆ setAntialiased()

void CustomElementGraphicPart::setAntialiased ( const bool  b)

CustomElementGraphicPart::setAntialiased Set antialias to b.

Parameters
b

◆ setColor()

void CustomElementGraphicPart::setColor ( const Color  c)

CustomElementGraphicPart::setColor Set color to c.

Parameters
c

◆ setFilling()

void CustomElementGraphicPart::setFilling ( const Filling  f)

CustomElementGraphicPart::setFilling Set filling to f.

Parameters
f

◆ setHandlerColor()

virtual void CustomElementGraphicPart::setHandlerColor ( QPointF  ,
const QColor &   
)
inlinevirtual

Reimplemented in PartPolygon.

◆ setLineStyle()

void CustomElementGraphicPart::setLineStyle ( const LineStyle  ls)

CustomElementGraphicPart::setLineStyle Set line style to ls.

Parameters
ls

◆ setLineWeight()

void CustomElementGraphicPart::setLineWeight ( const LineWeight  lw)

CustomElementGraphicPart::setLineWeight Set line weight to lw.

Parameters
lw

◆ setProperty()

void CustomElementGraphicPart::setProperty ( const char *  name,
const QVariant &  value 
)
inlineoverridevirtual

Set a specific property of the primitive

Implements CustomElementPart.

Here is the call graph for this function:

◆ shadowShape()

virtual QPainterPath CustomElementGraphicPart::shadowShape ( ) const
pure virtual

Implemented in PartLine, PartRectangle, PartPolygon, PartTerminal, PartArc, and PartEllipse.

Here is the caller graph for this function:

◆ stylesFromXml()

void CustomElementGraphicPart::stylesFromXml ( const QDomElement &  qde)
protected

CustomElementGraphicPart::stylesFromXml Read the style used by this, from a xml element.

Parameters
qde: QDomElement used to read the style
Here is the call graph for this function:
Here is the caller graph for this function:

◆ stylesToXml()

void CustomElementGraphicPart::stylesToXml ( QDomElement &  qde) const
protected

CustomElementGraphicPart::stylesToXml Write the curent 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 :

Parameters
qde: QDOmElement used to write the style.
Here is the caller graph for this function:

Member Data Documentation

◆ _antialiased

bool CustomElementGraphicPart::_antialiased
private

◆ _color

Color CustomElementGraphicPart::_color
private

◆ _filling

Filling CustomElementGraphicPart::_filling
private

◆ _linestyle

LineStyle CustomElementGraphicPart::_linestyle
private

◆ _lineweight

LineWeight CustomElementGraphicPart::_lineweight
private

◆ m_hovered

bool CustomElementGraphicPart::m_hovered
protected

◆ m_origin_pos

QPointF CustomElementGraphicPart::m_origin_pos
private

Property Documentation

◆ antialias

bool CustomElementGraphicPart::antialias
readwrite

◆ color

Color CustomElementGraphicPart::color
readwrite

◆ filling

Filling CustomElementGraphicPart::filling
readwrite

◆ line_style

LineStyle CustomElementGraphicPart::line_style
readwrite

◆ line_weight

LineWeight CustomElementGraphicPart::line_weight
readwrite

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