zz_configDialog.cpp

changeset 68
c637b172d565
parent 54
60f328f352c9
child 69
6790dea720a8
equal deleted inserted replaced
67:d523a370a17a 68:c637b172d565
57 qGLForegroundButton = new QPushButton; 57 qGLForegroundButton = new QPushButton;
58 setButtonBackground (qGLForegroundButton, gl_maincolor.value); 58 setButtonBackground (qGLForegroundButton, gl_maincolor.value);
59 connect (qGLForegroundButton, SIGNAL (clicked ()), 59 connect (qGLForegroundButton, SIGNAL (clicked ()),
60 this, SLOT (slot_setGLForeground ())); 60 this, SLOT (slot_setGLForeground ()));
61 61
62 qGLForegroundAlphaLabel = new QLabel ("Translucency:");
63 qGLForegroundAlpha = new QSlider (Qt::Horizontal);
64 qGLForegroundAlpha->setRange (1, 10);
65 qGLForegroundAlpha->setTickInterval (1);
66 qGLForegroundAlpha->setSliderPosition (gl_maincolor_alpha * 10.0f);
67 qGLForegroundAlpha->setTickPosition (QSlider::TicksAbove);
68
62 qGLLineThicknessLabel = new QLabel ("Line thickness:"); 69 qGLLineThicknessLabel = new QLabel ("Line thickness:");
63 qGLLineThickness = new QSlider (Qt::Horizontal); 70 qGLLineThickness = new QSlider (Qt::Horizontal);
64 qGLLineThickness->setRange (1, 8); 71 qGLLineThickness->setRange (1, 8);
65 qGLLineThickness->setSliderPosition (gl_linethickness); 72 qGLLineThickness->setSliderPosition (gl_linethickness);
66 qGLLineThickness->setTickPosition (QSlider::TicksBothSides); 73 qGLLineThickness->setTickPosition (QSlider::TicksAbove);
67 qGLLineThickness->setTickInterval (1); 74 qGLLineThickness->setTickInterval (1);
68 75
69 qLVColorize = new QCheckBox ("Colorize polygons in list view"); 76 qLVColorize = new QCheckBox ("Colorize polygons in list view");
70 INIT_CHECKBOX (qLVColorize, lv_colorize) 77 INIT_CHECKBOX (qLVColorize, lv_colorize)
71 78
84 layout->addWidget (qGLForegroundLabel, 1, 2); 91 layout->addWidget (qGLForegroundLabel, 1, 2);
85 layout->addWidget (qGLForegroundButton, 1, 3); 92 layout->addWidget (qGLForegroundButton, 1, 3);
86 93
87 layout->addWidget (qGLLineThicknessLabel, 2, 0); 94 layout->addWidget (qGLLineThicknessLabel, 2, 0);
88 layout->addWidget (qGLLineThickness, 2, 1); 95 layout->addWidget (qGLLineThickness, 2, 1);
96 layout->addWidget (qGLForegroundAlphaLabel, 2, 2);
97 layout->addWidget (qGLForegroundAlpha, 2, 3);
89 98
90 layout->addWidget (qLVColorize, 3, 0, 1, 2); 99 layout->addWidget (qLVColorize, 3, 0, 1, 2);
91 layout->addWidget (qGLColorBFC, 3, 2, 1, 2); 100 layout->addWidget (qGLColorBFC, 3, 2, 1, 2);
92 101
93 layout->addWidget (qButtons, 4, 2, 1, 2); 102 layout->addWidget (qButtons, 4, 2, 1, 2);
160 io_ldpath = dlg.qLDrawPath->text(); 169 io_ldpath = dlg.qLDrawPath->text();
161 170
162 APPLY_CHECKBOX (dlg.qLVColorize, lv_colorize) 171 APPLY_CHECKBOX (dlg.qLVColorize, lv_colorize)
163 APPLY_CHECKBOX (dlg.qGLColorBFC, gl_colorbfc) 172 APPLY_CHECKBOX (dlg.qGLColorBFC, gl_colorbfc)
164 173
174 gl_maincolor_alpha = ((double)dlg.qGLForegroundAlpha->value ()) / 10.0f;
165 gl_linethickness = dlg.qGLLineThickness->value (); 175 gl_linethickness = dlg.qGLLineThickness->value ();
166 176
167 // Save the config 177 // Save the config
168 config::save (); 178 config::save ();
169 179
170 // Reload all subfiles 180 // Reload all subfiles
171 reloadAllSubfiles (); 181 reloadAllSubfiles ();
172 182
173 window->R->setColor (gl_bgcolor, glClearColor); 183 window->R->setBackground ();
174 window->refresh (); 184 window->refresh ();
175 } 185 }
176 } 186 }

mercurial