[qet] [3970] Add ability to have an empty outline for hatching

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


Revision: 3970
Author:   scorpio810
Date:     2015-05-13 14:48:31 +0200 (Wed, 13 May 2015)
Log Message:
-----------
Add ability to have an empty outline for hatching

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

Modified: trunk/sources/editor/graphicspart/customelementgraphicpart.cpp
===================================================================
--- trunk/sources/editor/graphicspart/customelementgraphicpart.cpp	2015-05-13 06:31:16 UTC (rev 3969)
+++ trunk/sources/editor/graphicspart/customelementgraphicpart.cpp	2015-05-13 12:48:31 UTC (rev 3970)
@@ -198,7 +198,9 @@
 	else if (_color == LightgrayColor)  css_like_styles += "lightgray";
 	else if (_color == OrangeColor)  css_like_styles += "orange";
 	else if (_color == PurpleColor)  css_like_styles += "purple";
+	else if (_color == NoneColor)  css_like_styles += "none";
 
+
 	qde.setAttribute("style", css_like_styles);
 	qde.setAttribute("antialias", _antialiased ? "true" : "false");
 }
@@ -274,6 +276,7 @@
 			else if (style_value == "lightgray")  _color = LightgrayColor;
 			else if (style_value == "orange")  _color = OrangeColor;
 			else if (style_value == "purple")  _color = PurpleColor;
+			else if (style_value == "none")  _color = NoneColor;
 		}
 	}
 		//Get antialiasing
@@ -357,6 +360,7 @@
 	else if (_color == LightgrayColor)  pen.setColor(Qt::lightGray);
 	else if (_color == OrangeColor)  pen.setColor(QColor(255, 128, 0));
 	else if (_color == PurpleColor)  pen.setColor(QColor(136, 28, 168));
+	else if (_color == NoneColor)  pen.setBrush(Qt::transparent);
 	
 		//Apply antialiasing
 	painter.setRenderHint(QPainter::Antialiasing,          _antialiased);

Modified: trunk/sources/editor/graphicspart/customelementgraphicpart.h
===================================================================
--- trunk/sources/editor/graphicspart/customelementgraphicpart.h	2015-05-13 06:31:16 UTC (rev 3969)
+++ trunk/sources/editor/graphicspart/customelementgraphicpart.h	2015-05-13 12:48:31 UTC (rev 3970)
@@ -59,7 +59,7 @@
 		enum Filling { NoneFilling, BlackFilling, WhiteFilling, GreenFilling, RedFilling, BlueFilling, GrayFilling, BrunFilling, YellowFilling, CyanFilling, MagentaFilling, LightgrayFilling, OrangeFilling, PurpleFilling, HorFilling, VerFilling, BdiagFilling, FdiagFilling};
 
 			//Line color
-		enum Color {BlackColor, WhiteColor, GreenColor, RedColor, BlueColor, GrayColor, BrunColor, YellowColor, CyanColor, MagentaColor, LightgrayColor, OrangeColor, PurpleColor};
+		enum Color {BlackColor, WhiteColor, GreenColor, RedColor, BlueColor, GrayColor, BrunColor, YellowColor, CyanColor, MagentaColor, LightgrayColor, OrangeColor, PurpleColor, NoneColor};
 	
 		// constructors, destructor
 	public:

Modified: trunk/sources/editor/styleeditor.cpp
===================================================================
--- trunk/sources/editor/styleeditor.cpp	2015-05-13 06:31:16 UTC (rev 3969)
+++ trunk/sources/editor/styleeditor.cpp	2015-05-13 12:48:31 UTC (rev 3970)
@@ -43,6 +43,7 @@
 	outline_color -> addItem(tr("Gris clair", "element part color"), CustomElementGraphicPart::LightgrayColor);
 	outline_color -> addItem(tr("Orange", "element part color"), CustomElementGraphicPart::OrangeColor);
 	outline_color -> addItem(tr("Violet", "element part color"), CustomElementGraphicPart::PurpleColor);
+	outline_color -> addItem(tr("Aucun", "element part color"), CustomElementGraphicPart::NoneColor);
 
 	// style
 	line_style = new QComboBox(this);

Modified: trunk/sources/editor/styleeditor.h
===================================================================
--- trunk/sources/editor/styleeditor.h	2015-05-13 06:31:16 UTC (rev 3969)
+++ trunk/sources/editor/styleeditor.h	2015-05-13 12:48:31 UTC (rev 3970)
@@ -43,9 +43,6 @@
 		QList <CustomElementGraphicPart *> m_part_list;
 		QList <CustomElementPart *> m_cep_list;
 		QVBoxLayout *main_layout;
-		QRadioButton *black_color, *white_color,  *normal_style, *dashed_style, *dashdotted_style, *dotted_style, *green_color, *red_color, *blue_color, *gray_color, *brun_color, *yellow_color, *cyan_color, *magenta_color, *gris_clair_color, orange_color, *violet_color, *hor_filling, *ver_filling;
-		QRadioButton *none_weight, *thin_weight, *normal_weight, *no_filling;
-		QRadioButton *black_filling, *white_filling, *green_filling, *red_filling, *blue_filling, *gray_filling, *brun_filling, *yellow_filling, *cyan_filling, *magenta_filling, *gris_clair_filling, orange_filling, *violet_filling, *hachures1_filling, hachures2_filling;
 		QCheckBox *antialiasing;
 		QComboBox *filling_color, *outline_color, *size_weight, *line_style;
 	

Modified: trunk/sources/qetgraphicsitem/customelement.cpp
===================================================================
--- trunk/sources/qetgraphicsitem/customelement.cpp	2015-05-13 06:31:16 UTC (rev 3969)
+++ trunk/sources/qetgraphicsitem/customelement.cpp	2015-05-13 12:48:31 UTC (rev 3970)
@@ -843,6 +843,11 @@
 			- lightgray : trait gris clair
 			- orange : trait orange
 			- purple : trait violet
+			- lignes Horizontales
+			- lignes Verticales
+			- hachures gauche
+			- hachures  droite
+			- none : pas de contour
 			
 	Les autres valeurs ne sont pas prises en compte.
 	@param e L'element XML a parser
@@ -960,6 +965,8 @@
 					pen.setColor(QColor(255, 128, 0));
 				}else if (style_value == "purple") {
 					pen.setColor(QColor(136, 28, 168));
+				} else if (style_value == "none") {
+					pen.setBrush(Qt::transparent);
 				}
 			}
 		}


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