From 6ac73f31213a0faadd92eed42e4e27d1b0820eaf Mon Sep 17 00:00:00 2001 From: nds Date: Fri, 24 Apr 2015 17:50:39 +0300 Subject: [PATCH] Corrections for extrusion/revolution xml definition and random color --- src/PartSet/PartSet_icons.qrc | 6 ++++++ src/PartSet/icons/angle.png | Bin 0 -> 340 bytes src/PartSet/icons/angle_down.png | Bin 0 -> 313 bytes src/PartSet/icons/angle_up.png | Bin 0 -> 309 bytes src/PartSet/icons/dimension_down.png | Bin 0 -> 247 bytes src/PartSet/icons/dimension_up.png | Bin 0 -> 255 bytes src/PartSet/icons/plane_inverted.png | Bin 0 -> 538 bytes src/XGUI/XGUI_Workshop.cpp | 25 +++++++++++++++++++++---- 8 files changed, 27 insertions(+), 4 deletions(-) create mode 100644 src/PartSet/icons/angle.png create mode 100644 src/PartSet/icons/angle_down.png create mode 100644 src/PartSet/icons/angle_up.png create mode 100644 src/PartSet/icons/dimension_down.png create mode 100644 src/PartSet/icons/dimension_up.png create mode 100644 src/PartSet/icons/plane_inverted.png diff --git a/src/PartSet/PartSet_icons.qrc b/src/PartSet/PartSet_icons.qrc index b37f9e71a..ffff1c6bd 100644 --- a/src/PartSet/PartSet_icons.qrc +++ b/src/PartSet/PartSet_icons.qrc @@ -1,10 +1,14 @@ + icons/angle.png + icons/angle_up.png + icons/angle_down.png icons/arc.png icons/circle.png icons/color.png icons/point.png icons/plane.png + icons/plane_inverted.png icons/axis.png icons/duplicate.png icons/remove.png @@ -19,6 +23,8 @@ icons/line.png icons/sketch.png icons/hand_point.png + icons/dimension_up.png + icons/dimension_down.png icons/dimension_v.png icons/radius.png icons/perpendicular.png diff --git a/src/PartSet/icons/angle.png b/src/PartSet/icons/angle.png new file mode 100644 index 0000000000000000000000000000000000000000..6330d604b5509083e6360aadaf2de295884acf13 GIT binary patch literal 340 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Ea{HEjtmSN`?>!lvI6;>1s;*b z3=Dh+L6~vJ#O${~L8%hgh?3y^w370~qEv=}#LT=BJwMkFg)(D3Q$0figD*u3fvPTe zx;Tbd_|KiZk@t{+fUB=NyQ->kfDw~wa=;;hDyBAwf&xeZV?*Nv-TdX`WY1`fCcq&;GYN$a7xR z>|d6`!>(l3MgGmg=R`Z!v&m{)U%l+(o=Q7(8A5T-G@yGywn;>46jg literal 0 HcmV?d00001 diff --git a/src/PartSet/icons/angle_down.png b/src/PartSet/icons/angle_down.png new file mode 100644 index 0000000000000000000000000000000000000000..495ee771414c45bf5cbae509cdfc2ea625777dd0 GIT binary patch literal 313 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Ea{HEjtmSN`?>!lvI6;>1s;*b z3=Dh+K$tP>S|=w^P^!c=q9iy!t)x7$D3u`~F*C13&(AePq0Cs%RL{`B;7id$psKB& zE{-7<{%iZ!3LbJ0a8oW+m^h_j35!aq!a@#{u7x})UJgM_stJy*-&4hQym`y2c6fH> z&AqqhtB9H`a8L6JnI6{Nz5mC2*7!Y-1g9Tm{bwYaw&R$TzeQ2$(RTr!5s7c#iR|vJ z&0^eF?=JB9*rW{yYm36pNP8cW(Vw=x#^^AA<-;~%)uamdKI;Vst E0Ih3tZvX%Q literal 0 HcmV?d00001 diff --git a/src/PartSet/icons/angle_up.png b/src/PartSet/icons/angle_up.png new file mode 100644 index 0000000000000000000000000000000000000000..dc085e71eced4b18d5be26fb6b2dfa00f848dc13 GIT binary patch literal 309 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Ea{HEjtmSN`?>!lvI6;>1s;*b z3=Dh+K$tP>S|=w^P^!c=q9iy!t)x7$D3u`~F*C13&(AePq0Cs%RL{`B;7id$psJ0Y zE{-7<{%89Qg%}M*+7@39)RH}DIHhml6M?L$g*;E?9A9$uEihi(_5Qqzjla(Bsrk=N z@2jo+sm>{|wMO|^gz4L*rY)TBCe+pLSaxC8!R&P}ueWD+m8>{w{I2kx*oI@#>t62X z@hR-&l`DAh?XsewlWpt2;sadVIWg;5MBX%rmrVX7^N^YCTZ4Gm4%7d0^9>FMuM?ij zq!LrG#_0>E#jIbp4}_ly$P0h?@$;%Z&x`zy@&e|Y&-?$nC;%PL;OXk;vd$@?2>^B) Bc2)oY literal 0 HcmV?d00001 diff --git a/src/PartSet/icons/dimension_down.png b/src/PartSet/icons/dimension_down.png new file mode 100644 index 0000000000000000000000000000000000000000..111720060222d4a373baf9d0c55dbb6a1dd5149a GIT binary patch literal 247 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Ea{HEjtmSN`?>!lvI6;>1s;*b z3=DjSK$uZf!>a)(C{^MbQ4*Y=R#Ki=l*$m0n3-3i=jR%tP-d)Ws%L0m@TF)WP*t&~ zi(`m||K14~IU5XkT%yH4TsM_HBp4I=K|9W1t?GK}x3lX5>(UPKt%_nd^wt|3;V3_GT6#{x m49OzK_{Ym^ZwGn2WMJ7nZ&J~ocb|aPGkCiCxvX!lvI6;>1s;*b z3=DjSK$uZf!>a)(C{^MbQ4*Y=R#Ki=l*$m0n3-3i=jR%tP-d)Ws%L0m@TF)WP*t_3 zi(`m||K14~IS(lCxLnq|aDUxRMXRROV!x)wsW|b3J?`i4Q=Vn*QdHoOnCHP1K2ObZ zA^W5zajONILMiig*UvoE*4^T3>%&>q=DPb=yyJ|ctY>08`#!l&32U6q{nmfWX{mESv7Bx)X`}UKxZ&`y85}Sb4q9e0G1C|IsgCw literal 0 HcmV?d00001 diff --git a/src/PartSet/icons/plane_inverted.png b/src/PartSet/icons/plane_inverted.png new file mode 100644 index 0000000000000000000000000000000000000000..a13a8bba65378b5347bcf87d433ae15cc2a7031b GIT binary patch literal 538 zcmV+#0_FXQP)004R=004l4008;_004mL004C`008P>0026e000+nl3&F}00009 za7bBm000XR000XR0j(pwbpQYW8gxZibW?9;ba!ELWdKlNX>N2bPDNB8b~7$DE-^4L z^m3s900C-AL_t(IPo0uWO9D|ChDQZOLIg!z$SfqmrJ+_sjtw)5B*-=q(Z&%Gf`W{K z3@QqYXpxMIh@ed^qJmn4bfueZ`dM%1JDFtDZG7N`Im~%pz8OBDNf%3srNUBYdHN;v zp6=0o^31Z$X2aLm?RHa~PAAxXv)nULK{8iGZ@z}U!Vdb2yBM51g}Qiwq2()#tlc6I z2ymHb$<&(E4KAf-4k6DTaZ#B+p1Jtnsv5s5@vGC>6f$$pqp~Y%G c{(vC70mB@dT3EXUuK)l507*qoM6N<$g6{d);Q#;t literal 0 HcmV?d00001 diff --git a/src/XGUI/XGUI_Workshop.cpp b/src/XGUI/XGUI_Workshop.cpp index 71f296c1a..8280cb14d 100644 --- a/src/XGUI/XGUI_Workshop.cpp +++ b/src/XGUI/XGUI_Workshop.cpp @@ -1529,6 +1529,9 @@ bool XGUI_Workshop::canChangeColor() const } //************************************************************** +#include +#include +#include void XGUI_Workshop::changeColor(const QObjectPtrList& theObjects) { std::vector aColor; @@ -1545,19 +1548,33 @@ void XGUI_Workshop::changeColor(const QObjectPtrList& theObjects) // 2. show the dialog to change the value QDialog* aDlg = new QDialog(); - QVBoxLayout* aLay = new QVBoxLayout(aDlg); + aDlg->setWindowTitle("Color"); + QGridLayout* aLay = new QGridLayout(aDlg); + + QRadioButton* aRandomChoiceBtn = new QRadioButton(aDlg); + QRadioButton* aColorChoiceBtn = new QRadioButton(aDlg); + aColorChoiceBtn->setChecked(true); + QButtonGroup* aGroup = new QButtonGroup(aDlg); + aGroup->setExclusive(true); + aGroup->addButton(aColorChoiceBtn); + aGroup->addButton(aRandomChoiceBtn); + + aLay->addWidget(aColorChoiceBtn, 0, 0); + aLay->addWidget(aRandomChoiceBtn, 1, 0); QtxColorButton* aColorBtn = new QtxColorButton(aDlg); aColorBtn->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); - - aLay->addWidget(aColorBtn); + aLay->addWidget(aColorBtn, 0, 1); aColorBtn->setColor(QColor(aColor[0], aColor[1], aColor[2])); + QLabel* aRandomLabel = new QLabel("Random", aDlg); + aLay->addWidget(aRandomLabel, 1, 1); + QDialogButtonBox* aButtons = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel, Qt::Horizontal, aDlg); connect(aButtons, SIGNAL(accepted()), aDlg, SLOT(accept())); connect(aButtons, SIGNAL(rejected()), aDlg, SLOT(reject())); - aLay->addWidget(aButtons); + aLay->addWidget(aButtons, 2, 0, 1, 2); aDlg->move(QCursor::pos()); bool isDone = aDlg->exec() == QDialog::Accepted; -- 2.39.2