src/configDialog.cpp

changeset 191
9bb6a17305ad
parent 189
ac2d3e8dd110
child 192
c414924a647c
equal deleted inserted replaced
190:82f784cf2ce5 191:9bb6a17305ad
36 extern_cfg (bool, gl_colorbfc); 36 extern_cfg (bool, gl_colorbfc);
37 extern_cfg (float, gl_maincolor_alpha); 37 extern_cfg (float, gl_maincolor_alpha);
38 extern_cfg (int, gl_linethickness); 38 extern_cfg (int, gl_linethickness);
39 extern_cfg (int, gui_toolbar_iconsize); 39 extern_cfg (int, gui_toolbar_iconsize);
40 extern_cfg (str, gui_colortoolbar); 40 extern_cfg (str, gui_colortoolbar);
41 extern_cfg (bool, gl_selflash);
42 extern_cfg (bool, edit_schemanticinline); 41 extern_cfg (bool, edit_schemanticinline);
43 extern_cfg (bool, gl_blackedges); 42 extern_cfg (bool, gl_blackedges);
44 43
45 ConfigDialog* g_ConfigDialog = null; 44 ConfigDialog* g_ConfigDialog = null;
46 45
122 cb_colorBFC = new QCheckBox ("Red/green BFC view"); 121 cb_colorBFC = new QCheckBox ("Red/green BFC view");
123 cb_colorBFC->setChecked (gl_colorbfc); 122 cb_colorBFC->setChecked (gl_colorbfc);
124 cb_colorBFC->setWhatsThis ("Polygons' front sides become green and back " 123 cb_colorBFC->setWhatsThis ("Polygons' front sides become green and back "
125 "sides red. Not implemented yet."); 124 "sides red. Not implemented yet.");
126 125
127 cb_selFlash = new QCheckBox ("Selection flash");
128 cb_selFlash->setChecked (gl_selflash);
129 cb_colorBFC->setWhatsThis ("A pulse effect for clearer selection view.");
130
131 cb_blackEdges = new QCheckBox ("Black edges"); 126 cb_blackEdges = new QCheckBox ("Black edges");
132 cb_blackEdges->setWhatsThis ("Makes all edgelines appear black. If this is " 127 cb_blackEdges->setWhatsThis ("Makes all edgelines appear black. If this is "
133 "not set, edge lines take their color as defined in LDConfig.ldr"); 128 "not set, edge lines take their color as defined in LDConfig.ldr");
134 cb_blackEdges->setChecked (gl_blackedges); 129 cb_blackEdges->setChecked (gl_blackedges);
135 130
138 cb_colorBFC->setWhatsThis ("When inserting objects through inlining, file " 133 cb_colorBFC->setWhatsThis ("When inserting objects through inlining, file "
139 "inserting or through external programs, all non-schemantics (those without " 134 "inserting or through external programs, all non-schemantics (those without "
140 "actual meaning in the part file like comments and such) are filtered out."); 135 "actual meaning in the part file like comments and such) are filtered out.");
141 136
142 cb_schemanticInline->setEnabled (false); 137 cb_schemanticInline->setEnabled (false);
143 cb_colorBFC->setEnabled (false);
144 138
145 QGridLayout* layout = new QGridLayout; 139 QGridLayout* layout = new QGridLayout;
146 layout->addWidget (lb_viewBg, 0, 0); 140 layout->addWidget (lb_viewBg, 0, 0);
147 layout->addWidget (pb_viewBg, 0, 1); 141 layout->addWidget (pb_viewBg, 0, 1);
148 layout->addWidget (lb_viewFg, 0, 2); 142 layout->addWidget (lb_viewFg, 0, 2);
156 layout->addWidget (lb_iconSize, 2, 0); 150 layout->addWidget (lb_iconSize, 2, 0);
157 layout->addWidget (sl_iconSize, 2, 1); 151 layout->addWidget (sl_iconSize, 2, 1);
158 152
159 layout->addWidget (cb_colorize, 3, 0, 1, 4); 153 layout->addWidget (cb_colorize, 3, 0, 1, 4);
160 layout->addWidget (cb_colorBFC, 4, 0, 1, 4); 154 layout->addWidget (cb_colorBFC, 4, 0, 1, 4);
161 layout->addWidget (cb_selFlash, 5, 0, 1, 4); 155 layout->addWidget (cb_blackEdges, 5, 0, 1, 4);
162 layout->addWidget (cb_blackEdges, 6, 0, 1, 4); 156 layout->addWidget (cb_schemanticInline, 6, 0, 1, 4);
163 layout->addWidget (cb_schemanticInline, 7, 0, 1, 4);
164 mainTab->setLayout (layout); 157 mainTab->setLayout (layout);
165 158
166 // Add the tab to the manager 159 // Add the tab to the manager
167 tabs->addTab (mainTab, "Main settings"); 160 tabs->addTab (mainTab, "Main settings");
168 } 161 }
687 ConfigDialog dlg (g_win); 680 ConfigDialog dlg (g_win);
688 681
689 if (dlg.exec ()) { 682 if (dlg.exec ()) {
690 lv_colorize = dlg.cb_colorize->isChecked (); 683 lv_colorize = dlg.cb_colorize->isChecked ();
691 gl_colorbfc = dlg.cb_colorBFC->isChecked (); 684 gl_colorbfc = dlg.cb_colorBFC->isChecked ();
692 gl_selflash = dlg.cb_selFlash->isChecked ();
693 edit_schemanticinline = dlg.cb_schemanticInline->isChecked (); 685 edit_schemanticinline = dlg.cb_schemanticInline->isChecked ();
694 gl_blackedges = dlg.cb_blackEdges->isChecked (); 686 gl_blackedges = dlg.cb_blackEdges->isChecked ();
695 687
696 gl_maincolor_alpha = ((double)dlg.sl_viewFgAlpha->value ()) / 10.0f; 688 gl_maincolor_alpha = ((double)dlg.sl_viewFgAlpha->value ()) / 10.0f;
697 gl_linethickness = dlg.sl_lineThickness->value (); 689 gl_linethickness = dlg.sl_lineThickness->value ();

mercurial