[qet] [2193] Add dashdotted_style for line in symbol editor.

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


Revision: 2193
Author:   scorpio810
Date:     2013-06-01 18:09:58 +0200 (Sat, 01 Jun 2013)
Log Message:
-----------
Add dashdotted_style for line in symbol editor.

Modified Paths:
--------------
    trunk/sources/customelement.cpp
    trunk/sources/editor/customelementgraphicpart.cpp
    trunk/sources/editor/customelementgraphicpart.h
    trunk/sources/editor/styleeditor.cpp
    trunk/sources/editor/styleeditor.h

Modified: trunk/sources/customelement.cpp
===================================================================
--- trunk/sources/customelement.cpp	2013-06-01 14:41:43 UTC (rev 2192)
+++ trunk/sources/customelement.cpp	2013-06-01 16:09:58 UTC (rev 2193)
@@ -711,6 +711,7 @@
 	Les styles possibles sont :
 		- line-style : style du trait
 			- dashed : trait en pointilles (tirets)
+			- dashdotted : Traits et points
 			- dotted : trait en pointilles (points)
 			- normal : trait plein [par defaut]
 		- line-weight : epaiseur du trait
@@ -720,16 +721,9 @@
 			- white : remplissage blanc
 			- black : remplissage noir
 			- none : pas de remplissage [par defaut]
-			- red   : remplissage rouge
-			- blue  : remplissage bleu
-			- green : remplissage vert
-			
 		- color : couleur du trait et du texte
 			- white : trait noir [par defaut]
 			- black : trait blanc
-			- red   : trait rouge
-			- blue  : trait bleu
-			- green : trait vert
 			
 	Les autres valeurs ne sont pas prises en compte.
 	@param e L'element XML a parser
@@ -763,6 +757,7 @@
 			if (style_name == "line-style") {
 				if (style_value == "dashed") pen.setStyle(Qt::DashLine);
 				else if (style_value == "dotted") pen.setStyle(Qt::DotLine);
+				else if (style_value == "dashdoted") pen.setStyle(Qt::DashDotLine);
 				else if (style_value == "normal") pen.setStyle(Qt::SolidLine);
 			} else if (style_name == "line-weight") {
 				if (style_value == "thin") pen.setWidth(0);

Modified: trunk/sources/editor/customelementgraphicpart.cpp
===================================================================
--- trunk/sources/editor/customelementgraphicpart.cpp	2013-06-01 14:41:43 UTC (rev 2192)
+++ trunk/sources/editor/customelementgraphicpart.cpp	2013-06-01 16:09:58 UTC (rev 2193)
@@ -28,6 +28,7 @@
 	css_like_styles += "line-style:";
 	if      (_linestyle == DashedStyle) css_like_styles += "dashed";
 	if      (_linestyle == DottedStyle) css_like_styles += "dotted";
+	if      (_linestyle == DashdottedStyle)css_like_styles += "dashdotted";
 	else if (_linestyle == NormalStyle) css_like_styles += "normal";
 	
 	css_like_styles += ";line-weight:";
@@ -122,6 +123,7 @@
 	
 	// applique le style de trait
 	if      (_linestyle == DashedStyle) pen.setStyle(Qt::DashLine);
+	if      (_linestyle == DashdottedStyle) pen.setStyle(Qt::DashDotLine);
 	if      (_linestyle == DottedStyle) pen.setStyle(Qt::DotLine);
 	else if (_linestyle == NormalStyle) pen.setStyle(Qt::SolidLine);
 	

Modified: trunk/sources/editor/customelementgraphicpart.h
===================================================================
--- trunk/sources/editor/customelementgraphicpart.h	2013-06-01 14:41:43 UTC (rev 2192)
+++ trunk/sources/editor/customelementgraphicpart.h	2013-06-01 16:09:58 UTC (rev 2193)
@@ -32,7 +32,8 @@
 	enum LineStyle {
 		NormalStyle, ///< Normal line
 		DashedStyle, ///< Dashed line
-		DottedStyle  ///< Dotted line
+		DottedStyle,  ///< Dotted line
+		DashdottedStyle  ///< Dashdotted  line
 	};
 	
 	/// This enum lists the various line weights available to draw primitives.

Modified: trunk/sources/editor/styleeditor.cpp
===================================================================
--- trunk/sources/editor/styleeditor.cpp	2013-06-01 14:41:43 UTC (rev 2192)
+++ trunk/sources/editor/styleeditor.cpp	2013-06-01 16:09:58 UTC (rev 2193)
@@ -42,6 +42,7 @@
 	style -> addButton(normal_style = new QRadioButton(tr("Normal",       "element part line style")), CustomElementGraphicPart::NormalStyle);
 	style -> addButton(dashed_style = new QRadioButton(tr("Tiret",        "element part line style")), CustomElementGraphicPart::DashedStyle);
 	style -> addButton(dotted_style = new QRadioButton(tr("Pointill\351", "element part line style")), CustomElementGraphicPart::DottedStyle);
+	style -> addButton(dashdotted_style = new QRadioButton(tr("Traits et points", "element part line style")), CustomElementGraphicPart::DashdottedStyle);
 	normal_style -> setChecked(true);
 	
 	// epaisseur
@@ -83,6 +84,7 @@
 	style_layout -> addWidget(new QLabel(tr("Style : ")));
 	style_layout -> addWidget(normal_style);
 	style_layout -> addWidget(dashed_style);
+	style_layout -> addWidget(dashdotted_style);
 	style_layout -> addWidget(dotted_style);
 	style_layout -> addStretch();
 	main_layout -> addLayout(style_layout);

Modified: trunk/sources/editor/styleeditor.h
===================================================================
--- trunk/sources/editor/styleeditor.h	2013-06-01 14:41:43 UTC (rev 2192)
+++ trunk/sources/editor/styleeditor.h	2013-06-01 16:09:58 UTC (rev 2193)
@@ -41,7 +41,7 @@
 	CustomElementGraphicPart *part;
 	QVBoxLayout *main_layout;
 	QButtonGroup *color, *style, *weight, *filling;
-	QRadioButton *black_color, *white_color,  *normal_style, *dashed_style, *dotted_style, *green_color, *red_color, *blue_color;
+	QRadioButton *black_color, *white_color,  *normal_style, *dashed_style, *dashdotted_style, *dotted_style, *green_color, *red_color, *blue_color;
 	QRadioButton *none_weight, *thin_weight, *normal_weight, *no_filling;
 	QRadioButton *black_filling, *white_filling, *green_filling, *red_filling, *blue_filling;
 	QCheckBox *antialiasing;


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