[qet] qet/qet: [5800] Replace Q_ENUMS (with S, deprecated since Qt5.5) by Q_ENUM (without S)

[ Thread Index | Date Index | More lists.tuxfamily.org/qet Archives ]


Revision: 5800
Author:   blacksun
Date:     2019-03-18 20:49:12 +0100 (Mon, 18 Mar 2019)
Log Message:
-----------
Replace Q_ENUMS (with S, deprecated since Qt5.5) by Q_ENUM (without S)

Modified Paths:
--------------
    trunk/sources/editor/graphicspart/customelementgraphicpart.h
    trunk/sources/qet.h
    trunk/sources/qetgraphicsitem/dynamicelementtextitem.h
    trunk/sources/qetgraphicsitem/qetshapeitem.h

Modified: trunk/sources/editor/graphicspart/customelementgraphicpart.h
===================================================================
--- trunk/sources/editor/graphicspart/customelementgraphicpart.h	2019-03-18 19:27:37 UTC (rev 5799)
+++ trunk/sources/editor/graphicspart/customelementgraphicpart.h	2019-03-18 19:49:12 UTC (rev 5800)
@@ -36,12 +36,6 @@
 
 		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 @@
 	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:
 

Modified: trunk/sources/qet.h
===================================================================
--- trunk/sources/qet.h	2019-03-18 19:27:37 UTC (rev 5799)
+++ trunk/sources/qet.h	2019-03-18 19:49:12 UTC (rev 5800)
@@ -182,37 +182,41 @@
 
 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

Modified: trunk/sources/qetgraphicsitem/dynamicelementtextitem.h
===================================================================
--- trunk/sources/qetgraphicsitem/dynamicelementtextitem.h	2019-03-18 19:27:37 UTC (rev 5799)
+++ trunk/sources/qetgraphicsitem/dynamicelementtextitem.h	2019-03-18 19:49:12 UTC (rev 5800)
@@ -50,12 +50,13 @@
 	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;}
 		

Modified: trunk/sources/qetgraphicsitem/qetshapeitem.h
===================================================================
--- trunk/sources/qetgraphicsitem/qetshapeitem.h	2019-03-18 19:27:37 UTC (rev 5799)
+++ trunk/sources/qetgraphicsitem/qetshapeitem.h	2019-03-18 19:49:12 UTC (rev 5800)
@@ -54,11 +54,11 @@
 		
 		
 	public:
-		Q_ENUMS(ShapeType)
 		enum ShapeType {Line	  =1,
 						Rectangle =2,
 						Ellipse	  =4,
 						Polygon   =8 };
+		Q_ENUM (ShapeType)
 
 		enum { Type = UserType + 1008 };
 


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/