@@ -57,7 +57,9 @@ MainWindow::MainWindow(QWidget *parent) :
5757 args[ COMMONARGS ].insert (" metricoutput" , QPair<QRadioButton *, QRadioButton *>(ui->outputMetricRadioButton , ui->outputImperialRadioButton ) );
5858 args[ COMMONARGS ].insert (" zsafe" , ui->zsafeDoubleSpinBox );
5959 args[ COMMONARGS ].insert (" zchange" , ui->zchangeDoubleSpinBox );
60- args[ COMMONARGS ].insert (" g64" , ui->g64DoubleSpinBox );
60+ args[ COMMONARGS ].insert (" vectorial" , ui->vectorialCheckBox );
61+ args[ COMMONARGS ].insert (" nog64" , ui->nog64CheckBox );
62+ args[ COMMONARGS ].insert (" tolerance" , ui->toleranceDoubleSpinBox );
6163 args[ COMMONARGS ].insert (" optimise" , ui->optimiseCheckBox );
6264 args[ COMMONARGS ].insert (" zero-start" , ui->zerostartCheckBox );
6365 args[ COMMONARGS ].insert (" mirror-absolute" , ui->mirrorabsoluteCheckBox );
@@ -70,15 +72,18 @@ MainWindow::MainWindow(QWidget *parent) :
7072 args[ MILLARGS ].insert (" mill-feed" , ui->millfeedSpinBox );
7173 args[ MILLARGS ].insert (" mill-speed" , ui->millspeedSpinBox );
7274 args[ MILLARGS ].insert (" offset" , ui->offsetDoubleSpinBox );
75+ args[ MILLARGS ].insert (" voronoi" , ui->voronoiCheckBox );
7376 args[ MILLARGS ].insert (" extra-passes" , ui->extrapassesSpinBox );
7477
7578 args[ DRILLARGS ].insert (" zdrill" , ui->zdrillDoubleSpinBox );
7679 args[ DRILLARGS ].insert (" drill-feed" , ui->drillfeedSpinBox );
7780 args[ DRILLARGS ].insert (" drill-speed" , ui->drillspeedSpinBox );
7881 args[ DRILLARGS ].insert (" milldrill" , ui->milldrillCheckBox );
82+ args[ DRILLARGS ].insert (" milldrill-diameter" , ui->milldrilldiameterDoubleSpinBox );
7983 args[ DRILLARGS ].insert (" drill-side" , ui->drillsideComboBox );
8084 args[ DRILLARGS ].insert (" onedrill" , ui->onedrillCheckBox );
8185 args[ DRILLARGS ].insert (" nog81" , ui->nog81CheckBox );
86+ args[ DRILLARGS ].insert (" nog91-1" , ui->nog911CheckBox );
8287
8388 args[ OUTLINEARGS ].insert (" cutter-diameter" , ui->cutterdiameterDoubleSpinBox );
8489 args[ OUTLINEARGS ].insert (" zcut" , ui->zcutDoubleSpinBox );
@@ -124,12 +129,14 @@ MainWindow::MainWindow(QWidget *parent) :
124129 connect (ui->postamblePushButton , SIGNAL (clicked ()), this , SLOT (getPostambleFile ()));
125130 connect (ui->outputDirPushButton , SIGNAL (clicked ()), this , SLOT (getOutputDirectory ()));
126131
127- connect (ui->g64CheckBox , SIGNAL (toggled (bool )), ui->g64DoubleSpinBox , SLOT (setEnabled (bool )));
132+ connect (ui->vectorialCheckBox , SIGNAL (toggled (bool )), this , SLOT (vectorialEnable (bool )));
133+ connect (ui->vectorialCheckBox , SIGNAL (toggled (bool )), this , SLOT (bridgesAvailable ()));
134+ connect (ui->vectorialCheckBox , SIGNAL (toggled (bool )), ui->voronoiCheckBox , SLOT (setEnabled (bool )));
135+ connect (ui->voronoiCheckBox , SIGNAL (toggled (bool )), this , SLOT (extrapassesSetDisabled (bool )));
128136 connect (ui->filloutlineCheckBox , SIGNAL (toggled (bool )), ui->outlinewidthDoubleSpinBox , SLOT (setEnabled (bool )));
129137 connect (ui->svgCheckBox , SIGNAL (toggled (bool )), ui->svgLineEdit , SLOT (setEnabled (bool )));
130- connect (ui->optimiseCheckBox , SIGNAL (toggled (bool )), ui->bridgesDoubleSpinBox , SLOT (setEnabled (bool )));
131- connect (ui->optimiseCheckBox , SIGNAL (toggled (bool )), ui->zbridgesDoubleSpinBox , SLOT (setEnabled (bool )));
132- connect (ui->optimiseCheckBox , SIGNAL (toggled (bool )), ui->bridgesnumSpinBox , SLOT (setEnabled (bool )));
138+ connect (ui->optimiseCheckBox , SIGNAL (toggled (bool )), this , SLOT (bridgesAvailable ()));
139+ connect (ui->milldrillCheckBox , SIGNAL (toggled (bool )), ui->milldrilldiameterDoubleSpinBox , SLOT (setEnabled (bool )));
133140 connect (ui->softwareComboBox , SIGNAL (currentTextChanged (QString)), this , SLOT (updateAlCustomEnableState (QString)));
134141
135142 connect (ui->startPushButton , SIGNAL (clicked ()), this , SLOT (startPcb2gcode ()));
@@ -151,6 +158,33 @@ MainWindow::MainWindow(QWidget *parent) :
151158 loadConfFile (appDataLocation + default_config_filename);
152159}
153160
161+ void MainWindow::vectorialEnable (bool enable)
162+ {
163+ ui->dpiSpinBox ->setEnabled (!enable);
164+
165+ if (enable)
166+ {
167+ if (ui->voronoiCheckBox ->isChecked ())
168+ ui->extrapassesSpinBox ->setEnabled (false );
169+ }
170+ else
171+ ui->extrapassesSpinBox ->setEnabled (true );
172+ }
173+
174+ void MainWindow::extrapassesSetDisabled (bool disable)
175+ {
176+ ui->extrapassesSpinBox ->setEnabled (!disable);
177+ }
178+
179+ void MainWindow::bridgesAvailable ()
180+ {
181+ bool bridgesEnabled = ui->vectorialCheckBox ->isChecked () || ui->optimiseCheckBox ->isChecked ();
182+
183+ ui->bridgesDoubleSpinBox ->setEnabled (bridgesEnabled);
184+ ui->zbridgesDoubleSpinBox ->setEnabled (bridgesEnabled);
185+ ui->bridgesnumSpinBox ->setEnabled (bridgesEnabled);
186+ }
187+
154188MainWindow::~MainWindow ()
155189{
156190 delete ui;
@@ -221,7 +255,7 @@ void MainWindow::changeMetricInputUnits(bool metric)
221255 ui->zdrillDoubleSpinBox , ui->zchangeDoubleSpinBox , ui->cutterdiameterDoubleSpinBox ,
222256 ui->zcutDoubleSpinBox , ui->cutinfeedDoubleSpinBox , ui->outlinewidthDoubleSpinBox ,
223257 ui->bridgesDoubleSpinBox , ui->zbridgesDoubleSpinBox , ui->alxDoubleSpinBox ,
224- ui->alyDoubleSpinBox , ui->g64DoubleSpinBox };
258+ ui->alyDoubleSpinBox , ui->toleranceDoubleSpinBox };
225259
226260 QSpinBox *spinBoxes[] = { ui->millfeedSpinBox , ui->drillfeedSpinBox , ui->cutfeedSpinBox , ui->alprobefeedSpinBox };
227261
@@ -551,7 +585,6 @@ bool MainWindow::loadConfFile(const QString filename)
551585 QMessageBox::information (this , tr (" Error" ), tr (" Invalid parameter in configuration file: key=" ) + key + tr (" value=" ) + value);
552586 }
553587 }
554- ui->g64CheckBox ->setChecked (ui->g64DoubleSpinBox ->isEnabled ()); // Sync checkBox checked state with doubleSpinBox enabled state
555588 ui->svgCheckBox ->setChecked (ui->svgLineEdit ->isEnabled ()); // Sync checkBox checked state with lineEdit enabled state
556589
557590 changeMetricImperialValues = true ;
0 commit comments