[qet] [3952] Add brun and yellow colors for element part

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


Revision: 3952
Author:   scorpio810
Date:     2015-05-11 14:45:08 +0200 (Mon, 11 May 2015)
Log Message:
-----------
Add brun and yellow colors for element part

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-11 11:06:58 UTC (rev 3951)
+++ trunk/sources/editor/graphicspart/customelementgraphicpart.cpp	2015-05-11 12:45:08 UTC (rev 3952)
@@ -172,8 +172,10 @@
 	else if (_filling == BlueFilling)  css_like_styles += "blue";
 	else if (_filling == RedFilling)   css_like_styles += "red";
 	else if (_filling == GrayFilling)  css_like_styles += "gray";
+	else if (_filling == BrunFilling)  css_like_styles += "brun";
+	else if (_filling == YellowFilling)  css_like_styles += "yellow";
 
-	
+
 	css_like_styles += ";color:";
 	if      (_color == WhiteColor) css_like_styles += "white";
 	else if (_color == BlackColor) css_like_styles += "black";
@@ -181,6 +183,8 @@
 	else if (_color == RedColor)   css_like_styles += "red";
 	else if (_color == BlueColor)  css_like_styles += "blue";
 	else if (_color == GrayColor)  css_like_styles += "gray";
+	else if (_color == BrunColor)  css_like_styles += "brun";
+	else if (_color == YellowColor)  css_like_styles += "yellow";
 
 	qde.setAttribute("style", css_like_styles);
 	qde.setAttribute("antialias", _antialiased ? "true" : "false");
@@ -229,6 +233,8 @@
 			else if (style_value == "green") _filling = GreenFilling;
 			else if (style_value == "blue")  _filling = BlueFilling;
 			else if (style_value == "gray")  _filling = GrayFilling;
+			else if (style_value == "brun")  _filling = BrunFilling;
+			else if (style_value == "yellow")  _filling = YellowFilling;
 			else if (style_value == "none")  _filling = NoneFilling;
 		}
 		else if (style_name == "color")
@@ -239,6 +245,8 @@
 			else if (style_value == "red")   _color = RedColor;
 			else if (style_value == "blue")  _color = BlueColor;
 			else if (style_value == "gray")  _color = GrayColor;
+			else if (style_value == "brun")  _color = BrunColor;
+			else if (style_value == "yellow")  _color = YellowColor;
 		}
 	}
 		//Get antialiasing
@@ -295,6 +303,8 @@
 		else if (_filling == RedFilling)   brush.setColor(Qt::red);
 		else if (_filling == BlueFilling)  brush.setColor(Qt::blue);
 		else if (_filling == GrayFilling)  brush.setColor(Qt::gray);
+		else if (_filling == BrunFilling)  brush.setColor(QColor(97, 44, 0));
+		else if (_filling == YellowFilling)  brush.setColor(Qt::yellow);
 	}
 	
 		//Apply pen color
@@ -304,6 +314,8 @@
 	else if (_color == RedColor)   pen.setColor(QColor(Qt::red));
 	else if (_color == BlueColor)  pen.setColor(QColor(Qt::blue));
 	else if (_color == GrayColor)  pen.setColor(QColor(Qt::gray));
+	else if (_color == BrunColor)  pen.setColor(QColor(97, 44, 0));
+	else if (_color == YellowColor)  pen.setColor(QColor(Qt::yellow));
 	
 		//Apply antialiasing
 	painter.setRenderHint(QPainter::Antialiasing,          _antialiased);

Modified: trunk/sources/editor/graphicspart/customelementgraphicpart.h
===================================================================
--- trunk/sources/editor/graphicspart/customelementgraphicpart.h	2015-05-11 11:06:58 UTC (rev 3951)
+++ trunk/sources/editor/graphicspart/customelementgraphicpart.h	2015-05-11 12:45:08 UTC (rev 3952)
@@ -56,10 +56,10 @@
 		enum LineWeight {NoneWeight, ThinWeight, NormalWeight, UltraWeight, BigWeight};
 
 			//Filling color of the part : NoneFilling -> No filling (i.e. transparent)
-		enum Filling { NoneFilling, BlackFilling, WhiteFilling, GreenFilling, RedFilling, BlueFilling, GrayFilling};
+		enum Filling { NoneFilling, BlackFilling, WhiteFilling, GreenFilling, RedFilling, BlueFilling, GrayFilling, BrunFilling, YellowFilling};
 
 			//Line color
-		enum Color {BlackColor, WhiteColor, GreenColor, RedColor, BlueColor, GrayColor};
+		enum Color {BlackColor, WhiteColor, GreenColor, RedColor, BlueColor, GrayColor, BrunColor, YellowColor};
 	
 		// constructors, destructor
 	public:

Modified: trunk/sources/editor/styleeditor.cpp
===================================================================
--- trunk/sources/editor/styleeditor.cpp	2015-05-11 11:06:58 UTC (rev 3951)
+++ trunk/sources/editor/styleeditor.cpp	2015-05-11 12:45:08 UTC (rev 3952)
@@ -36,6 +36,8 @@
 	outline_color -> addItem(tr("Rouge", "element part color"), CustomElementGraphicPart::RedColor);
 	outline_color -> addItem(tr("Bleu", "element part color"), CustomElementGraphicPart::BlueColor);
 	outline_color -> addItem(tr("Gris", "element part color"), CustomElementGraphicPart::GrayColor);
+	outline_color -> addItem(tr("Marron", "element part color"), CustomElementGraphicPart::BrunColor);
+	outline_color -> addItem(tr("Jaune", "element part color"), CustomElementGraphicPart::YellowColor);
 
 	// style
 	line_style = new QComboBox(this);
@@ -62,6 +64,8 @@
 	filling_color -> addItem(tr("Rouge", "element part filling"), CustomElementGraphicPart::RedFilling);
 	filling_color -> addItem(tr("Bleu", "element part filling"), CustomElementGraphicPart::BlueFilling);
 	filling_color -> addItem(tr("Gris", "element part filling"), CustomElementGraphicPart::GrayFilling);
+	filling_color -> addItem(tr("marron", "element part filling"), CustomElementGraphicPart::BrunFilling);
+	filling_color -> addItem(tr("Jaune", "element part filling"), CustomElementGraphicPart::YellowFilling);
 
 	// antialiasing
 	antialiasing = new QCheckBox(tr("Antialiasing"));

Modified: trunk/sources/editor/styleeditor.h
===================================================================
--- trunk/sources/editor/styleeditor.h	2015-05-11 11:06:58 UTC (rev 3951)
+++ trunk/sources/editor/styleeditor.h	2015-05-11 12:45:08 UTC (rev 3952)
@@ -43,9 +43,9 @@
 		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;
+		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;
 		QRadioButton *none_weight, *thin_weight, *normal_weight, *no_filling;
-		QRadioButton *black_filling, *white_filling, *green_filling, *red_filling, *blue_filling, *gray_filling;
+		QRadioButton *black_filling, *white_filling, *green_filling, *red_filling, *blue_filling, *gray_filling, *brun_filling, *yellow_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-11 11:06:58 UTC (rev 3951)
+++ trunk/sources/qetgraphicsitem/customelement.cpp	2015-05-11 12:45:08 UTC (rev 3952)
@@ -823,6 +823,8 @@
 			- blue  : remplissage bleu
 			- green : remplissage vert
 			- gray : remplissage gris
+			- brun : remplissage marron
+			- yellow : remplissage jaune
 			- none : pas de remplissage [par defaut]
 		- color : couleur du trait et du texte
 			- white : trait noir [par defaut]
@@ -831,6 +833,8 @@
 			- blue  : trait bleu
 			- green : trait vert
 			- gray : trait gris
+			- brun : trait marron
+			- yellow : trait jaune
 			
 	Les autres valeurs ne sont pas prises en compte.
 	@param e L'element XML a parser
@@ -885,6 +889,12 @@
 				} else if (style_value == "gray") {
 					brush.setStyle(Qt::SolidPattern);
 					brush.setColor(Qt::gray);
+				} else if (style_value == "brun") {
+					brush.setStyle(Qt::SolidPattern);
+					brush.setColor(QColor(97, 44, 0));
+				} else if (style_value == "yellow") {
+					brush.setStyle(Qt::SolidPattern);
+					brush.setColor(Qt::yellow);
 				} else if (style_value == "none") {
 					brush.setStyle(Qt::NoBrush);
 				}
@@ -901,6 +911,11 @@
 					pen.setColor(Qt::green);
 				}else if (style_value == "gray") {
 					pen.setColor(Qt::gray);
+				}else if (style_value == "brun") {
+					pen.setColor(QColor(97, 44, 0));
+				}else if (style_value == "yellow") {
+					pen.setColor(Qt::yellow);
+
 				}
 			}
 		}


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