mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-09-14 20:33:05 +02:00
Replace Q_ENUMS (with S, deprecated since Qt5.5) by Q_ENUM (without S)
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5800 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
parent
07da381515
commit
1ac950cd81
@ -36,12 +36,6 @@ class CustomElementGraphicPart : public QGraphicsObject, public CustomElementPar
|
||||
|
||||
Q_OBJECT
|
||||
|
||||
//Made this Q_ENUMS to be used by the Q_PROPERTY system.
|
||||
Q_ENUMS (LineStyle)
|
||||
Q_ENUMS (LineWeight)
|
||||
Q_ENUMS (Filling)
|
||||
Q_ENUMS (Color)
|
||||
|
||||
Q_PROPERTY(LineStyle line_style READ lineStyle WRITE setLineStyle)
|
||||
Q_PROPERTY(LineWeight line_weight READ lineWeight WRITE setLineWeight)
|
||||
Q_PROPERTY(Filling filling READ filling WRITE setFilling)
|
||||
@ -51,16 +45,20 @@ class CustomElementGraphicPart : public QGraphicsObject, public CustomElementPar
|
||||
public:
|
||||
//Line style
|
||||
enum LineStyle {NormalStyle, DashedStyle, DottedStyle, DashdottedStyle};
|
||||
Q_ENUM (LineStyle)
|
||||
|
||||
//Line weight : invisible, 0px, 1px, 2px, 5px
|
||||
enum LineWeight {NoneWeight, ThinWeight, NormalWeight, UltraWeight, BigWeight};
|
||||
Q_ENUM (LineWeight)
|
||||
|
||||
//Filling color of the part : NoneFilling -> No filling (i.e. transparent)
|
||||
enum Filling { NoneFilling, BlackFilling, WhiteFilling, GreenFilling, RedFilling, BlueFilling, GrayFilling, BrunFilling, YellowFilling, CyanFilling, MagentaFilling, LightgrayFilling, OrangeFilling, PurpleFilling, HorFilling, VerFilling, BdiagFilling, FdiagFilling};
|
||||
Q_ENUM (Filling)
|
||||
|
||||
//Line color
|
||||
enum Color {BlackColor, WhiteColor, GreenColor, RedColor, BlueColor, GrayColor, BrunColor, YellowColor, CyanColor, MagentaColor, LightgrayColor, OrangeColor, PurpleColor, NoneColor};
|
||||
|
||||
Q_ENUM (Color)
|
||||
|
||||
// constructors, destructor
|
||||
public:
|
||||
|
||||
|
@ -182,37 +182,41 @@ namespace QET {
|
||||
|
||||
Q_DECLARE_METATYPE(QET::DepthOption)
|
||||
|
||||
class Qet : public QObject {
|
||||
class Qet : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
///This enum lists the various available endings for line primitives when drawing an electrical element.
|
||||
Q_ENUMS(EndType)
|
||||
enum EndType {
|
||||
None, ///< Regular line
|
||||
Simple, ///< Base-less triangle
|
||||
Triangle, ///< Triangle
|
||||
Circle, ///< Circle
|
||||
Diamond ///< Diamond
|
||||
};
|
||||
static QString endTypeToString(const Qet::EndType &);
|
||||
static Qet::EndType endTypeFromString(const QString &);
|
||||
///This enum lists the various available endings for line primitives when drawing an electrical element.
|
||||
enum EndType {
|
||||
None, ///< Regular line
|
||||
Simple, ///< Base-less triangle
|
||||
Triangle, ///< Triangle
|
||||
Circle, ///< Circle
|
||||
Diamond ///< Diamond
|
||||
};
|
||||
Q_ENUM (EndType)
|
||||
|
||||
/// Orientation (used for electrical elements and their terminals)
|
||||
Q_ENUMS(Orientation)
|
||||
enum Orientation {North,
|
||||
East,
|
||||
South,
|
||||
West};
|
||||
static Qet::Orientation nextOrientation(Qet::Orientation);
|
||||
static Qet::Orientation previousOrientation(Qet::Orientation);
|
||||
static QString endTypeToString(const Qet::EndType &);
|
||||
static Qet::EndType endTypeFromString(const QString &);
|
||||
|
||||
static Qet::Orientation orientationFromString (const QString &);
|
||||
static QString orientationToString (Qet::Orientation);
|
||||
/// Orientation (used for electrical elements and their terminals)
|
||||
enum Orientation {North,
|
||||
East,
|
||||
South,
|
||||
West};
|
||||
Q_ENUM (Orientation)
|
||||
|
||||
static bool surLeMemeAxe (Qet::Orientation, Qet::Orientation);
|
||||
static bool isOpposed (Qet::Orientation a, Qet::Orientation b);
|
||||
static bool isHorizontal (Qet::Orientation);
|
||||
static bool isVertical (Qet::Orientation);
|
||||
static Qet::Orientation nextOrientation(Qet::Orientation);
|
||||
static Qet::Orientation previousOrientation(Qet::Orientation);
|
||||
|
||||
static Qet::Orientation orientationFromString (const QString &);
|
||||
static QString orientationToString (Qet::Orientation);
|
||||
|
||||
static bool surLeMemeAxe (Qet::Orientation, Qet::Orientation);
|
||||
static bool isOpposed (Qet::Orientation a, Qet::Orientation b);
|
||||
static bool isHorizontal (Qet::Orientation);
|
||||
static bool isVertical (Qet::Orientation);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -50,12 +50,13 @@ class DynamicElementTextItem : public DiagramTextItem
|
||||
Q_PROPERTY(qreal textWidth READ textWidth WRITE setTextWidth NOTIFY textWidthChanged)
|
||||
|
||||
public:
|
||||
Q_ENUMS(TextFrom)
|
||||
|
||||
enum TextFrom {
|
||||
UserText,
|
||||
ElementInfo,
|
||||
CompositeText
|
||||
};
|
||||
Q_ENUM (TextFrom)
|
||||
enum {Type = UserType + 1010};
|
||||
int type() const override {return Type;}
|
||||
|
||||
|
@ -54,11 +54,11 @@ class QetShapeItem : public QetGraphicsItem
|
||||
|
||||
|
||||
public:
|
||||
Q_ENUMS(ShapeType)
|
||||
enum ShapeType {Line =1,
|
||||
Rectangle =2,
|
||||
Ellipse =4,
|
||||
Polygon =8 };
|
||||
Q_ENUM (ShapeType)
|
||||
|
||||
enum { Type = UserType + 1008 };
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user