1

Topic: Couleur de Remplissage

Bonjour,

Actuellement à part Blanc ou Noir il n'y a pas d'autre choix.

Par exemple, je voudrai materialiser un voyant led ou autre par une couleur et ce n'est pas possible ( d'après ce que j'ai vu )

Alors pourquoi ne pas offrir cette possibilité en limitant seulement aux couleurs de base.

Pierre, Espagne

2

Re: Couleur de Remplissage

Bonjour Pierre,

Cela a été voulu des le départ, nous ne voulions pas de schéma en mode sapin de noël .
Mais de nos jours Qet est de plus en plus utilisé par l'enseignement, donc oui pourquoi pas ajouter de la couleur dans les symboles si c'est à titre pédagogique.

"Le jour où tu découvres le Libre, tu sais que tu ne pourras jamais plus revenir en arrière..."Questions regarding QET belong in this forum and will NOT be answered via PM! – Les questions concernant QET doivent être posées sur ce forum et ne seront pas traitées par MP !

3

Re: Couleur de Remplissage

Bonjour,

Il ne s'agit pas de schema en mode sapin de noel ! soyons sérieux !!!

Colorier des fils cela vous parait un sapin de noel ? seulement donne un + réaliste et visuel au schéma.

Dommage que je ne programme plus ( j'ai 70 printemps) sinon j'aurai ajouté depuis longtemps une propriété couleur aux fils - ..

Bon travail..

4

Re: Couleur de Remplissage

Bonsoir,

Caracole wrote:

Colorier des fils cela vous parait un sapin de noel ? seulement donne un + réaliste et visuel au schéma.

La possibilité de tracer des conducteurs en couleur à été ajouté à Qet depuis plus de deux ans .....
Quelle version utilise tu ?

Caracole wrote:

Dommage que je ne programme plus ( j'ai 70 printemps) sinon j'aurai ajouté depuis longtemps une propriété couleur aux fils - ..

C'est bien dommage, nous sommes en recherche de développeurs C++  Qt, pour nous aider à faire avancer le projet .

"Le jour où tu découvres le Libre, tu sais que tu ne pourras jamais plus revenir en arrière..."Questions regarding QET belong in this forum and will NOT be answered via PM! – Les questions concernant QET doivent être posées sur ce forum et ne seront pas traitées par MP !

5

Re: Couleur de Remplissage

Pour faire ça j'ai bien peur qu'il ne faille pas y compter :p
http://scorpio.kindwolf.org/temp/color1.png


r2181-scorpio810.diff
Modified: trunk/sources/customelement.cpp
===================================================================
--- trunk/sources/customelement.cpp     2013-05-28 16:50:35 UTC (rev 2180)
+++ trunk/sources/customelement.cpp     2013-05-29 09:02:26 UTC (rev 2181)
@@ -765,6 +765,15 @@
                                } else if (style_value == "black") {
                                        brush.setStyle(Qt::SolidPattern);
                                        brush.setColor(Qt::black);
+                               } else if (style_value == "blue") {
+                                       brush.setStyle(Qt::SolidPattern);
+                                       brush.setColor(Qt::blue);
+                               } else if (style_value == "red") {
+                                       brush.setStyle(Qt::SolidPattern);
+                                       brush.setColor(Qt::red);
+                               } else if (style_value == "green") {
+                                       brush.setStyle(Qt::SolidPattern);
+                                       brush.setColor(Qt::green);
                                } else if (style_value == "none") {
                                        brush.setStyle(Qt::NoBrush);
                                }

Modified: trunk/sources/editor/customelementgraphicpart.cpp
===================================================================
--- trunk/sources/editor/customelementgraphicpart.cpp   2013-05-28 16:50:35 UTC (rev 2180)
+++ trunk/sources/editor/customelementgraphicpart.cpp   2013-05-29 09:02:26 UTC (rev 2181)
@@ -39,6 +39,10 @@
        if      (_filling == NoneFilling)  css_like_styles += "none";
        else if (_filling == BlackFilling) css_like_styles += "black";
        else if (_filling == WhiteFilling) css_like_styles += "white";
+       else if (_filling == GreenFilling) css_like_styles += "green";
+       else if (_filling == BlueFilling) css_like_styles += "blue";
+       else if (_filling == RedFilling) css_like_styles += "red";
+
        
        css_like_styles += ";color:";
        if      (_color == WhiteColor) css_like_styles += "white";
@@ -76,6 +80,9 @@
                } else if (style_name == "filling") {
                        if      (style_value == "white") _filling = WhiteFilling;
                        else if (style_value == "black") _filling = BlackFilling;
+                       else if (style_value == "red") _filling = RedFilling;
+                       else if (style_value == "green") _filling = GreenFilling;
+                       else if (style_value == "blue") _filling = BlueFilling;
                        else if (style_value == "none")  _filling = NoneFilling;
                } else if (style_name == "color") {
                        if      (style_value == "black") _color = BlackColor;
@@ -126,6 +133,15 @@
        } else if (_filling == WhiteFilling) {
                brush.setStyle(Qt::SolidPattern);
                brush.setColor(Qt::white);
+       } else if (_filling == GreenFilling) {
+               brush.setStyle(Qt::SolidPattern);
+               brush.setColor(Qt::green);
+       } else if (_filling == RedFilling) {
+               brush.setStyle(Qt::SolidPattern);
+               brush.setColor(Qt::red);
+       } else if (_filling == BlueFilling) {
+               brush.setStyle(Qt::SolidPattern);
+               brush.setColor(Qt::blue);
        }
        
        // applique la couleur de trait

Modified: trunk/sources/editor/customelementgraphicpart.h
===================================================================
--- trunk/sources/editor/customelementgraphicpart.h     2013-05-28 16:50:35 UTC (rev 2180)
+++ trunk/sources/editor/customelementgraphicpart.h     2013-05-29 09:02:26 UTC (rev 2181)
@@ -46,7 +46,10 @@
        enum Filling {
                NoneFilling,  ///< No filling (i.e. transparent)
                BlackFilling, ///< Black filling
-               WhiteFilling  ///< White filling
+               WhiteFilling,  ///< White filling
+               GreenFilling, ///< Green filling
+               RedFilling,  ///< Red filling
+               BlueFilling  ///< Green filling
        };
        
        /// This enum lists the various line colors available to draw primitives.

Modified: trunk/sources/editor/styleeditor.cpp
===================================================================
--- trunk/sources/editor/styleeditor.cpp        2013-05-28 16:50:35 UTC (rev 2180)
+++ trunk/sources/editor/styleeditor.cpp        2013-05-29 09:02:26 UTC (rev 2181)
@@ -32,6 +32,7 @@
        color = new QButtonGroup(this);
        color -> addButton(black_color = new QRadioButton(tr("Noir", "element part color")),  CustomElementGraphicPart::BlackColor);
        color -> addButton(white_color = new QRadioButton(tr("Blanc", "element part color")), CustomElementGraphicPart::WhiteColor);
+
        
        // style
        style = new QButtonGroup(this);
@@ -51,7 +52,10 @@
        filling -> addButton(no_filling    = new QRadioButton(tr("Aucun", "element part filling")), CustomElementGraphicPart::NoneFilling );
        filling -> addButton(black_filling = new QRadioButton(tr("Noir", "element part filling")),  CustomElementGraphicPart::BlackFilling);
        filling -> addButton(white_filling = new QRadioButton(tr("Blanc", "element part filling")), CustomElementGraphicPart::WhiteFilling);
-       
+       filling -> addButton(green_filling = new QRadioButton(tr("Vert", "element part filling")),  CustomElementGraphicPart::GreenFilling);
+       filling -> addButton(red_filling   = new QRadioButton(tr("Rouge", "element part filling")),   CustomElementGraphicPart::RedFilling);
+       filling -> addButton(blue_filling  = new QRadioButton(tr("Blue", "element part filling")),   CustomElementGraphicPart::BlueFilling);
+
        // antialiasing
        antialiasing = new QCheckBox(tr("Antialiasing"));
        
@@ -91,11 +95,14 @@
        filling_layout -> addWidget(no_filling);
        filling_layout -> addWidget(black_filling);
        filling_layout -> addWidget(white_filling);
+       filling_layout -> addWidget(green_filling);
+       filling_layout -> addWidget(red_filling);
+       filling_layout -> addWidget(blue_filling);
        filling_layout -> addStretch();
        main_layout -> addLayout(filling_layout);
        
        main_layout -> addStretch();
-       
+
        setLayout(main_layout);
 }
 

Modified: trunk/sources/editor/styleeditor.h
===================================================================
--- trunk/sources/editor/styleeditor.h  2013-05-28 16:50:35 UTC (rev 2180)
+++ trunk/sources/editor/styleeditor.h  2013-05-29 09:02:26 UTC (rev 2181)
@@ -41,9 +41,9 @@
        CustomElementGraphicPart *part;
        QVBoxLayout *main_layout;
        QButtonGroup *color, *style, *weight, *filling;
-       QRadioButton *black_color, *white_color, *normal_style, *dashed_style, *dotted_style;
+       QRadioButton *black_color, *white_color,  *normal_style, *dashed_style, *dotted_style;
        QRadioButton *none_weight, *thin_weight, *normal_weight, *no_filling;
-       QRadioButton *black_filling, *white_filling;
+       QRadioButton *black_filling, *white_filling, *green_filling, *red_filling, *blue_filling;
        QCheckBox *antialiasing;
        
        // methods

"Le jour où tu découvres le Libre, tu sais que tu ne pourras jamais plus revenir en arrière..."Questions regarding QET belong in this forum and will NOT be answered via PM! – Les questions concernant QET doivent être posées sur ce forum et ne seront pas traitées par MP !

6

Re: Couleur de Remplissage

Y a moyen de rajouter l'option guirlande ?