Ahh tout n'est pas partie à la poubelle, un vieux morceau de patch...
Index: sources/editor/customelementgraphicpart.cpp
===================================================================
--- sources/editor/customelementgraphicpart.cpp (révision 3402)
+++ sources/editor/customelementgraphicpart.cpp (copie de travail)
@@ -46,8 +46,12 @@
else if (_filling == GreenFilling) css_like_styles += "green";
else if (_filling == BlueFilling) css_like_styles += "blue";
else if (_filling == RedFilling) css_like_styles += "red";
+ else if (_filling == HorFilling) css_like_styles += "hor";
+ else if (_filling == VerFilling) css_like_styles += "ver";
+ else if (_filling == CrossFilling) css_like_styles += "cross";
+ else if (_filling == Dense7Filling) css_like_styles += "dense7";
-
+
css_like_styles += ";color:";
if (_color == WhiteColor) css_like_styles += "white";
else if (_color == BlackColor) css_like_styles += "black";
@@ -94,6 +98,10 @@
else if (style_value == "green") _filling = GreenFilling;
else if (style_value == "blue") _filling = BlueFilling;
else if (style_value == "none") _filling = NoneFilling;
+ else if (style_value == "hor") _filling = HorFilling;
+ else if (style_value == "ver") _filling = VerFilling;
+ else if (style_value == "cross") _filling = CrossFilling;
+ else if (style_value == "dense7") _filling = Dense7Filling;
} else if (style_name == "color") {
if (style_value == "black") _color = BlackColor;
else if (style_value == "white") _color = WhiteColor;
@@ -160,6 +168,18 @@
} else if (_filling == BlueFilling) {
brush.setStyle(Qt::SolidPattern);
brush.setColor(Qt::blue);
+ } else if (_filling == HorFilling) {
+ brush.setStyle(Qt::HorPattern);
+ brush.setColor(Qt::black);
+ } else if (_filling == VerFilling) {
+ brush.setStyle(Qt::VerPattern);
+ brush.setColor(Qt::black);
+ } else if (_filling == CrossFilling) {
+ brush.setStyle(Qt::CrossPattern);
+ brush.setColor(Qt::black);
+ } else if (_filling == Dense7Filling) {
+ brush.setStyle(Qt::Dense7Pattern);
+ brush.setColor(Qt::black);
}
// applique la couleur de trait
Index: sources/editor/customelementgraphicpart.h
===================================================================
--- sources/editor/customelementgraphicpart.h (révision 3402)
+++ sources/editor/customelementgraphicpart.h (copie de travail)
@@ -59,7 +59,12 @@
WhiteFilling, ///< White filling
GreenFilling, ///< Green filling
RedFilling, ///< Red filling
- BlueFilling ///< Green filling
+ BlueFilling, ///< Green filling
+ HorFilling,
+ VerFilling,
+ CrossFilling,
+ Dense7Filling
+
};
/// This enum lists the various line colors available to draw primitives.
Index: sources/editor/styleeditor.cpp
===================================================================
--- sources/editor/styleeditor.cpp (révision 3402)
+++ sources/editor/styleeditor.cpp (copie de travail)
@@ -60,6 +60,10 @@
filling_color -> addItem(tr("Vert", "element part filling"), CustomElementGraphicPart::GreenFilling);
filling_color -> addItem(tr("Rouge", "element part filling"), CustomElementGraphicPart::RedFilling);
filling_color -> addItem(tr("Bleu", "element part filling"), CustomElementGraphicPart::BlueFilling);
+ filling_color -> addItem(tr("Lignes Horizontales", "element part filling"), CustomElementGraphicPart::HorFilling);
+ filling_color -> addItem(tr("Lignes Verticales", "element part filling"), CustomElementGraphicPart::VerFilling);
+ filling_color -> addItem(tr("Lignes en croix", "element part filling"), CustomElementGraphicPart::CrossFilling);
+ filling_color -> addItem(tr("Dense7", "element part filling"), CustomElementGraphicPart::Dense7Filling);
// antialiasing
antialiasing = new QCheckBox(tr("Antialiasing"));
Index: sources/editor/styleeditor.h
===================================================================
--- sources/editor/styleeditor.h (révision 3402)
+++ sources/editor/styleeditor.h (copie de travail)
@@ -42,7 +42,7 @@
QVBoxLayout *main_layout;
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;
+ QRadioButton *black_filling, *white_filling, *green_filling, *red_filling, *blue_filling, *hor_filling, *ver_filling, *cross_filling, *dense7_filling;
QCheckBox *antialiasing;
QComboBox *filling_color, *outline_color, *size_weight, *line_style;
Index: sources/qetgraphicsitem/customelement.cpp
===================================================================
--- sources/qetgraphicsitem/customelement.cpp (révision 3402)
+++ sources/qetgraphicsitem/customelement.cpp (copie de travail)
@@ -883,6 +883,14 @@
brush.setColor(Qt::green);
} else if (style_value == "none") {
brush.setStyle(Qt::NoBrush);
+ } else if (style_value == "hor") {
+ brush.setStyle(Qt::HorPattern);
+ } else if (style_value == "ver") {
+ brush.setStyle(Qt::VerPattern);
+ } else if (style_value == "cros") {
+ brush.setStyle(Qt::CrossPattern);
+ }else if (style_value == "dense7") {
+ brush.setStyle(Qt::Dense7Pattern);
}
} else if (style_name == "color") {
if (style_value == "black") {