[1] | 1 | /* |
---|
[6] | 2 | * TSPSG - TSP Solver and Generator |
---|
[17] | 3 | * Copyright (C) 2007-2009 Lёppa <contacts[at]oleksii[dot]name> |
---|
[1] | 4 | * |
---|
[6] | 5 | * $Id: mainwindow.cpp 38 2009-07-20 18:47:40Z laleppa $ |
---|
| 6 | * $URL: https://tspsg.svn.sourceforge.net/svnroot/tspsg/trunk/src/mainwindow.cpp $ |
---|
[4] | 7 | * |
---|
[6] | 8 | * This file is part of TSPSG. |
---|
[1] | 9 | * |
---|
[6] | 10 | * TSPSG is free software: you can redistribute it and/or modify |
---|
| 11 | * it under the terms of the GNU General Public License as published by |
---|
| 12 | * the Free Software Foundation, either version 3 of the License, or |
---|
| 13 | * (at your option) any later version. |
---|
[1] | 14 | * |
---|
[6] | 15 | * TSPSG is distributed in the hope that it will be useful, |
---|
| 16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
| 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
| 18 | * GNU General Public License for more details. |
---|
[1] | 19 | * |
---|
[6] | 20 | * You should have received a copy of the GNU General Public License |
---|
| 21 | * along with TSPSG. If not, see <http://www.gnu.org/licenses/>. |
---|
[1] | 22 | */ |
---|
| 23 | |
---|
| 24 | #include "mainwindow.h" |
---|
| 25 | |
---|
| 26 | MainWindow::MainWindow(QWidget *parent) |
---|
[21] | 27 | : QMainWindow(parent) |
---|
[1] | 28 | { |
---|
[29] | 29 | settings = new QSettings(QSettings::IniFormat,QSettings::UserScope,"TSPSG","tspsg"); |
---|
| 30 | loadLanguage(); |
---|
[1] | 31 | setupUi(this); |
---|
[38] | 32 | #ifdef Q_OS_WINCE |
---|
| 33 | // A little hack for toolbar icons to have sane size. |
---|
| 34 | int s = qMin(QApplication::desktop()->screenGeometry().width(),QApplication::desktop()->screenGeometry().height()); |
---|
| 35 | toolBar->setIconSize(QSize(s / 10,s / 10)); |
---|
| 36 | #endif |
---|
[29] | 37 | #ifndef Q_OS_WINCE |
---|
| 38 | printer = new QPrinter(); |
---|
| 39 | #endif // Q_OS_WINCE |
---|
| 40 | groupSettingsLanguageList = new QActionGroup(this); |
---|
[30] | 41 | actionSettingsLanguageEnglish->setData("en"); |
---|
| 42 | actionSettingsLanguageEnglish->setActionGroup(groupSettingsLanguageList); |
---|
[29] | 43 | loadLangList(); |
---|
[23] | 44 | spinCities->setValue(settings->value("NumCities",5).toInt()); |
---|
[29] | 45 | actionSettingsLanguageAutodetect->setChecked(settings->value("Language","").toString().isEmpty()); |
---|
| 46 | connect(actionFileNew,SIGNAL(triggered()),this,SLOT(actionFileNewTriggered())); |
---|
[31] | 47 | connect(actionFileOpen,SIGNAL(triggered()),this,SLOT(actionFileOpenTriggered())); |
---|
| 48 | connect(actionFileSaveTask,SIGNAL(triggered()),this,SLOT(actionFileSaveTaskTriggered())); |
---|
[29] | 49 | connect(actionSettingsPreferences,SIGNAL(triggered()),this,SLOT(actionSettingsPreferencesTriggered())); |
---|
| 50 | connect(actionSettingsLanguageAutodetect,SIGNAL(triggered(bool)),this,SLOT(actionSettingsLanguageAutodetectTriggered(bool))); |
---|
| 51 | connect(groupSettingsLanguageList,SIGNAL(triggered(QAction *)),this,SLOT(groupSettingsLanguageListTriggered(QAction *))); |
---|
[37] | 52 | connect(actionHelpAboutQt,SIGNAL(triggered()),qApp,SLOT(aboutQt())); |
---|
[29] | 53 | connect(actionHelpAbout,SIGNAL(triggered()),this,SLOT(actionHelpAboutTriggered())); |
---|
[17] | 54 | #ifndef Q_OS_WINCE |
---|
[29] | 55 | connect(actionFilePrintSetup,SIGNAL(triggered()),this,SLOT(actionFilePrintSetupTriggered())); |
---|
[17] | 56 | #endif // Q_OS_WINCE |
---|
[29] | 57 | connect(buttonSolve,SIGNAL(clicked()),this,SLOT(buttonSolveClicked())); |
---|
| 58 | connect(buttonRandom,SIGNAL(clicked()),this,SLOT(buttonRandomClicked())); |
---|
| 59 | connect(spinCities,SIGNAL(valueChanged(int)),this,SLOT(spinCitiesValueChanged(int))); |
---|
[17] | 60 | QRect rect = geometry(); |
---|
| 61 | #ifdef Q_OS_WINCE |
---|
| 62 | // HACK: Fix for all tabWidget elements becoming "unclickable" if making it central widget. |
---|
[38] | 63 | /* rect.setSize(QApplication::desktop()->availableGeometry().size()); |
---|
[17] | 64 | rect.setHeight(rect.height() - (QApplication::desktop()->screenGeometry().height() - QApplication::desktop()->availableGeometry().height())); |
---|
[38] | 65 | tabWidget->resize(rect.width(),rect.height() - toolBar->iconSize().height());*/ |
---|
| 66 | // Somehow, this works now. No more "unclickable" elements :-\ |
---|
| 67 | setCentralWidget(tabWidget); |
---|
[17] | 68 | #else |
---|
[23] | 69 | if (settings->value("SavePos",false).toBool()) { |
---|
[21] | 70 | // Loading of saved window state |
---|
[23] | 71 | settings->beginGroup("MainWindow"); |
---|
| 72 | resize(settings->value("Size",size()).toSize()); |
---|
| 73 | move(settings->value("Position",pos()).toPoint()); |
---|
| 74 | if (settings->value("Maximized",false).toBool()) |
---|
[21] | 75 | setWindowState(windowState() | Qt::WindowMaximized); |
---|
[23] | 76 | settings->endGroup(); |
---|
[21] | 77 | } else { |
---|
| 78 | // Centering main window |
---|
| 79 | rect.moveCenter(QApplication::desktop()->availableGeometry(this).center()); |
---|
| 80 | setGeometry(rect); |
---|
| 81 | } |
---|
[17] | 82 | #endif // Q_OS_WINCE |
---|
[11] | 83 | qsrand(QDateTime().currentDateTime().toTime_t()); |
---|
[15] | 84 | tspmodel = new CTSPModel(); |
---|
| 85 | tspmodel->setNumCities(spinCities->value()); |
---|
| 86 | taskView->setModel(tspmodel); |
---|
[31] | 87 | connect(tspmodel,SIGNAL(numCitiesChanged(int)),this,SLOT(numCitiesChanged(int))); |
---|
[37] | 88 | connect(tspmodel,SIGNAL(dataChanged(const QModelIndex &, const QModelIndex &)),this,SLOT(dataChanged())); |
---|
| 89 | connect(tspmodel,SIGNAL(layoutChanged()),this,SLOT(dataChanged())); |
---|
[21] | 90 | #ifdef Q_OS_WINCE |
---|
| 91 | taskView->resizeColumnsToContents(); |
---|
| 92 | taskView->resizeRowsToContents(); |
---|
| 93 | #endif // Q_OS_WINCE |
---|
[6] | 94 | } |
---|
| 95 | |
---|
[30] | 96 | bool MainWindow::loadLanguage(QString lang) |
---|
[4] | 97 | { |
---|
[29] | 98 | // i18n |
---|
[30] | 99 | bool ad = false; |
---|
| 100 | if (lang.isEmpty()) { |
---|
| 101 | ad = settings->value("Language","").toString().isEmpty(); |
---|
| 102 | lang = settings->value("Language",QLocale::system().name()).toString(); |
---|
| 103 | } |
---|
[29] | 104 | static QTranslator *qtTranslator; |
---|
| 105 | if (qtTranslator) { |
---|
| 106 | qApp->removeTranslator(qtTranslator); |
---|
| 107 | delete qtTranslator; |
---|
| 108 | qtTranslator = NULL; |
---|
| 109 | } |
---|
| 110 | qtTranslator = new QTranslator(); |
---|
[30] | 111 | static QTranslator *translator; |
---|
| 112 | if (translator) { |
---|
| 113 | qApp->removeTranslator(translator); |
---|
| 114 | delete translator; |
---|
| 115 | } |
---|
| 116 | translator = new QTranslator(); |
---|
[29] | 117 | if (lang.compare("en") && !lang.startsWith("en_")) { |
---|
| 118 | // Trying to load system Qt library translation... |
---|
| 119 | if (qtTranslator->load("qt_" + lang,QLibraryInfo::location(QLibraryInfo::TranslationsPath))) |
---|
| 120 | qApp->installTranslator(qtTranslator); |
---|
| 121 | else |
---|
| 122 | // No luck. Let's try to load bundled one. |
---|
| 123 | if (qtTranslator->load("qt_" + lang,"i18n")) |
---|
| 124 | qApp->installTranslator(qtTranslator); |
---|
| 125 | else { |
---|
| 126 | delete qtTranslator; |
---|
| 127 | qtTranslator = NULL; |
---|
| 128 | } |
---|
[30] | 129 | // Now let's load application translation. |
---|
[29] | 130 | if (translator->load(lang,"i18n")) |
---|
| 131 | qApp->installTranslator(translator); |
---|
| 132 | else { |
---|
| 133 | if (!ad) |
---|
| 134 | QMessageBox(QMessageBox::Warning,trUtf8("Language change"),trUtf8("Unable to load translation language."),QMessageBox::Ok,this).exec(); |
---|
| 135 | delete translator; |
---|
| 136 | translator = NULL; |
---|
| 137 | return false; |
---|
| 138 | } |
---|
| 139 | } |
---|
| 140 | return true; |
---|
| 141 | } |
---|
| 142 | |
---|
| 143 | void MainWindow::spinCitiesValueChanged(int n) |
---|
| 144 | { |
---|
[21] | 145 | #ifdef Q_OS_WINCE |
---|
| 146 | int count = tspmodel->numCities(); |
---|
| 147 | #endif // Q_OS_WINCE |
---|
[15] | 148 | tspmodel->setNumCities(n); |
---|
[21] | 149 | #ifdef Q_OS_WINCE |
---|
| 150 | if (n > count) |
---|
| 151 | for (int k = count; k < n; k++) { |
---|
| 152 | taskView->resizeColumnToContents(k); |
---|
| 153 | taskView->resizeRowToContents(k); |
---|
| 154 | } |
---|
| 155 | #endif // Q_OS_WINCE |
---|
[1] | 156 | } |
---|
| 157 | |
---|
[29] | 158 | |
---|
| 159 | void MainWindow::actionFileNewTriggered() |
---|
[1] | 160 | { |
---|
[37] | 161 | if (isWindowModified()) { |
---|
| 162 | int res = QMessageBox(QMessageBox::Warning,trUtf8("New Task"),trUtf8("Would you like to save changes in current task?"),QMessageBox::Yes | QMessageBox::No | QMessageBox::Cancel,this).exec(); |
---|
| 163 | if ((res == QMessageBox::Cancel) || ((res == QMessageBox::Yes) && !saveTask())) |
---|
| 164 | return; |
---|
| 165 | } |
---|
[29] | 166 | tspmodel->clear(); |
---|
[37] | 167 | setWindowModified(false); |
---|
[29] | 168 | } |
---|
| 169 | |
---|
[31] | 170 | void MainWindow::actionFileOpenTriggered() |
---|
| 171 | { |
---|
[37] | 172 | if (isWindowModified()) { |
---|
| 173 | int res = QMessageBox(QMessageBox::Warning,trUtf8("Task Open"),trUtf8("Would you like to save changes in current task?"),QMessageBox::Yes | QMessageBox::No | QMessageBox::Cancel,this).exec(); |
---|
| 174 | if ((res == QMessageBox::Cancel) || ((res == QMessageBox::Yes) && !saveTask())) |
---|
| 175 | return; |
---|
| 176 | } |
---|
[31] | 177 | QFileDialog od(this); |
---|
| 178 | od.setAcceptMode(QFileDialog::AcceptOpen); |
---|
| 179 | od.setFileMode(QFileDialog::ExistingFile); |
---|
| 180 | QStringList filters(trUtf8("All Supported Formats") + " (*.tspt *.zkt)"); |
---|
| 181 | filters.append(QString(trUtf8("%1 Task Files")).arg("TSPSG") + " (*.tspt)"); |
---|
| 182 | filters.append(QString(trUtf8("%1 Task Files")).arg("ZKomModRd") + " (*.zkt)"); |
---|
| 183 | filters.append(trUtf8("All Files") + " (*)"); |
---|
| 184 | od.setNameFilters(filters); |
---|
| 185 | if (od.exec() != QDialog::Accepted) |
---|
| 186 | return; |
---|
| 187 | QStringList files = od.selectedFiles(); |
---|
| 188 | if (files.size() < 1) |
---|
| 189 | return; |
---|
| 190 | tspmodel->loadTask(files.first()); |
---|
[37] | 191 | setWindowModified(false); |
---|
[31] | 192 | } |
---|
| 193 | |
---|
| 194 | void MainWindow::actionFileSaveTaskTriggered() |
---|
| 195 | { |
---|
[37] | 196 | saveTask(); |
---|
| 197 | } |
---|
| 198 | |
---|
| 199 | bool MainWindow::saveTask() { |
---|
[31] | 200 | QFileDialog sd(this); |
---|
| 201 | sd.setAcceptMode(QFileDialog::AcceptSave); |
---|
| 202 | QStringList filters(QString(trUtf8("%1 Task File")).arg("TSPSG") + " (*.tspt)"); |
---|
| 203 | filters.append(trUtf8("All Files") + " (*)"); |
---|
| 204 | sd.setNameFilters(filters); |
---|
| 205 | sd.setDefaultSuffix("tspt"); |
---|
| 206 | if (sd.exec() != QDialog::Accepted) |
---|
[37] | 207 | return false; |
---|
[31] | 208 | QStringList files = sd.selectedFiles(); |
---|
| 209 | if (files.size() < 1) |
---|
[37] | 210 | return false; |
---|
| 211 | if (tspmodel->saveTask(files.first())) { |
---|
| 212 | setWindowModified(false); |
---|
| 213 | return true; |
---|
| 214 | } else |
---|
| 215 | return false; |
---|
[31] | 216 | } |
---|
| 217 | |
---|
[29] | 218 | void MainWindow::actionSettingsPreferencesTriggered() |
---|
| 219 | { |
---|
[1] | 220 | SettingsDialog sd(this); |
---|
[21] | 221 | sd.exec(); |
---|
[1] | 222 | } |
---|
[6] | 223 | |
---|
[17] | 224 | #ifndef Q_OS_WINCE |
---|
[29] | 225 | void MainWindow::actionFilePrintSetupTriggered() |
---|
[17] | 226 | { |
---|
[29] | 227 | QPrintDialog pd(printer,this); |
---|
[33] | 228 | #if QT_VERSION >= 0x040500 |
---|
| 229 | // No such methods in Qt < 4.5 |
---|
[29] | 230 | pd.setOption(QAbstractPrintDialog::PrintSelection,false); |
---|
| 231 | pd.setOption(QAbstractPrintDialog::PrintPageRange,false); |
---|
[33] | 232 | #endif |
---|
[17] | 233 | pd.exec(); |
---|
| 234 | } |
---|
| 235 | #endif // Q_OS_WINCE |
---|
| 236 | |
---|
[29] | 237 | void MainWindow::buttonRandomClicked() |
---|
[6] | 238 | { |
---|
[15] | 239 | tspmodel->randomize(); |
---|
[37] | 240 | setWindowModified(true); |
---|
[21] | 241 | #ifdef Q_OS_WINCE |
---|
| 242 | taskView->resizeColumnsToContents(); |
---|
| 243 | taskView->resizeRowsToContents(); |
---|
| 244 | #endif // Q_OS_WINCE |
---|
[6] | 245 | } |
---|
| 246 | |
---|
[29] | 247 | void MainWindow::buttonSolveClicked() |
---|
[6] | 248 | { |
---|
[13] | 249 | // TODO: Task solving goes here :-) |
---|
| 250 | tMatrix matrix; |
---|
| 251 | double *row; |
---|
[15] | 252 | int n = spinCities->value(); |
---|
[13] | 253 | bool ok; |
---|
[15] | 254 | for (int r = 0; r < n; r++) { |
---|
| 255 | row = new double[n]; |
---|
| 256 | for (int c = 0; c < n; c++) { |
---|
| 257 | row[c] = tspmodel->index(r,c).data(Qt::UserRole).toDouble(&ok); |
---|
| 258 | if (!ok) { |
---|
[27] | 259 | QMessageBox(QMessageBox::Critical,trUtf8("Data error"),QString(trUtf8("Error in cell [Row %1; Column %2]: Invalid data format.")).arg(r + 1).arg(c + 1),QMessageBox::Ok,this).exec(); |
---|
[15] | 260 | return; |
---|
[13] | 261 | } |
---|
| 262 | } |
---|
| 263 | matrix.append(row); |
---|
| 264 | } |
---|
| 265 | CTSPSolver solver; |
---|
| 266 | sStep *root = solver.solve(spinCities->value(),matrix); |
---|
| 267 | if (!root) |
---|
[27] | 268 | QMessageBox(QMessageBox::Critical,trUtf8("Solution error"),trUtf8("There was an error while solving the task."),QMessageBox::Ok,this).exec(); |
---|
[12] | 269 | // tabWidget->setCurrentIndex(1); |
---|
[6] | 270 | } |
---|
[21] | 271 | |
---|
[29] | 272 | void MainWindow::actionHelpAboutTriggered() |
---|
[21] | 273 | { |
---|
| 274 | // TODO: Normal about window :-) |
---|
[30] | 275 | QString about = QString::fromUtf8("TSPSG - TSP Solver and Generator\n"); |
---|
| 276 | about += QString::fromUtf8(" Copyright (C) 2007-%1 Lёppa <contacts[at]oleksii[dot]name>\n").arg(QDate::currentDate().toString("yyyy")); |
---|
[37] | 277 | about += QString::fromUtf8("Target OS: %1\n").arg(OS); |
---|
| 278 | about += "Qt library:\n"; |
---|
[30] | 279 | about += QString::fromUtf8(" Compile time: %1\n").arg(QT_VERSION_STR); |
---|
| 280 | about += QString::fromUtf8(" Runtime: %1\n").arg(qVersion()); |
---|
| 281 | about += "\n"; |
---|
| 282 | about += "TSPSG is licensed under the terms of the GNU General Public License. You should have received a copy of the GNU General Public License along with TSPSG."; |
---|
[27] | 283 | QMessageBox(QMessageBox::Information,"About",about,QMessageBox::Ok,this).exec(); |
---|
[21] | 284 | } |
---|
| 285 | |
---|
[29] | 286 | void MainWindow::loadLangList() |
---|
| 287 | { |
---|
| 288 | QSettings langinfo("i18n/languages.ini",QSettings::IniFormat); |
---|
[33] | 289 | #if QT_VERSION >= 0x040500 |
---|
| 290 | // In Qt < 4.5 QSettings doesn't have method setIniCodec. |
---|
[29] | 291 | langinfo.setIniCodec("UTF-8"); |
---|
[33] | 292 | #endif |
---|
[29] | 293 | QDir dir("i18n","*.qm",QDir::Name | QDir::IgnoreCase,QDir::Files); |
---|
| 294 | if (!dir.exists()) |
---|
| 295 | return; |
---|
| 296 | QFileInfoList langs = dir.entryInfoList(); |
---|
| 297 | if (langs.size() <= 0) |
---|
| 298 | return; |
---|
| 299 | QAction *a; |
---|
| 300 | for (int k = 0; k < langs.size(); k++) { |
---|
| 301 | QFileInfo lang = langs.at(k); |
---|
[30] | 302 | if (!lang.completeBaseName().startsWith("qt_") && lang.completeBaseName().compare("en")) { |
---|
[33] | 303 | #if QT_VERSION >= 0x040500 |
---|
[29] | 304 | a = menuSettingsLanguage->addAction(langinfo.value(lang.completeBaseName() + "/NativeName",lang.completeBaseName()).toString()); |
---|
[33] | 305 | #else |
---|
| 306 | // We use Name if Qt < 4.5 because NativeName is in UTF-8, QSettings |
---|
| 307 | // reads .ini file as ASCII and there is no way to set file encoding. |
---|
| 308 | a = menuSettingsLanguage->addAction(langinfo.value(lang.completeBaseName() + "/Name",lang.completeBaseName()).toString()); |
---|
| 309 | #endif |
---|
[29] | 310 | a->setData(lang.completeBaseName()); |
---|
| 311 | a->setCheckable(true); |
---|
| 312 | a->setActionGroup(groupSettingsLanguageList); |
---|
| 313 | if (settings->value("Language",QLocale::system().name()).toString().startsWith(lang.completeBaseName())) |
---|
| 314 | a->setChecked(true); |
---|
| 315 | } |
---|
| 316 | } |
---|
| 317 | } |
---|
| 318 | |
---|
| 319 | void MainWindow::actionSettingsLanguageAutodetectTriggered(bool checked) |
---|
| 320 | { |
---|
| 321 | if (checked) { |
---|
| 322 | settings->remove("Language"); |
---|
| 323 | QMessageBox(QMessageBox::Information,trUtf8("Language change"),trUtf8("Language will be autodetected on next application start."),QMessageBox::Ok,this).exec(); |
---|
| 324 | } else |
---|
| 325 | settings->setValue("Language",groupSettingsLanguageList->checkedAction()->data().toString()); |
---|
| 326 | } |
---|
| 327 | |
---|
| 328 | void MainWindow::groupSettingsLanguageListTriggered(QAction *action) |
---|
| 329 | { |
---|
| 330 | if (actionSettingsLanguageAutodetect->isChecked()) { |
---|
| 331 | // We have language autodetection. It needs to be disabled to change language. |
---|
| 332 | if (QMessageBox(QMessageBox::Question,trUtf8("Language change"),trUtf8("You have language autodetection turned on.\nIt needs to be off.\nDo you wish to turn it off?"),QMessageBox::Yes | QMessageBox::No,this).exec() == QMessageBox::Yes) { |
---|
| 333 | actionSettingsLanguageAutodetect->trigger(); |
---|
| 334 | } else |
---|
| 335 | return; |
---|
| 336 | } |
---|
[30] | 337 | if (loadLanguage(action->data().toString())) { |
---|
[29] | 338 | settings->setValue("Language",action->data().toString()); |
---|
| 339 | retranslateUi(this); |
---|
| 340 | } |
---|
| 341 | } |
---|
| 342 | |
---|
[21] | 343 | void MainWindow::closeEvent(QCloseEvent *event) |
---|
| 344 | { |
---|
[37] | 345 | if (isWindowModified()) { |
---|
| 346 | int res = QMessageBox(QMessageBox::Warning,trUtf8("Application Close"),trUtf8("Would you like to save changes in current task?"),QMessageBox::Yes | QMessageBox::No | QMessageBox::Cancel,this).exec(); |
---|
| 347 | if ((res == QMessageBox::Cancel) || ((res == QMessageBox::Yes) && !saveTask())) { |
---|
| 348 | event->ignore(); |
---|
| 349 | return; |
---|
| 350 | } |
---|
| 351 | } |
---|
[26] | 352 | settings->setValue("NumCities",spinCities->value()); |
---|
| 353 | #ifndef Q_OS_WINCE |
---|
[21] | 354 | // Saving windows state |
---|
[23] | 355 | if (settings->value("SavePos",false).toBool()) { |
---|
| 356 | settings->beginGroup("MainWindow"); |
---|
| 357 | settings->setValue("Maximized",isMaximized()); |
---|
[21] | 358 | if (!isMaximized()) { |
---|
[23] | 359 | settings->setValue("Size",size()); |
---|
| 360 | settings->setValue("Position",pos()); |
---|
[21] | 361 | } |
---|
[23] | 362 | settings->endGroup(); |
---|
[21] | 363 | } |
---|
[26] | 364 | #endif // Q_OS_WINCE |
---|
[21] | 365 | QMainWindow::closeEvent(event); |
---|
| 366 | } |
---|
[31] | 367 | |
---|
[37] | 368 | void MainWindow::dataChanged() |
---|
| 369 | { |
---|
| 370 | setWindowModified(true); |
---|
| 371 | } |
---|
| 372 | |
---|
[31] | 373 | void MainWindow::numCitiesChanged(int nCities) |
---|
| 374 | { |
---|
| 375 | spinCities->setValue(nCities); |
---|
| 376 | } |
---|