303 m_name->setText(curWeaponsName); |
303 m_name->setText(curWeaponsName); |
304 QMessageBox deniedMsg(this); |
304 QMessageBox deniedMsg(this); |
305 deniedMsg.setIcon(QMessageBox::Warning); |
305 deniedMsg.setIcon(QMessageBox::Warning); |
306 deniedMsg.setWindowTitle(QMessageBox::tr("Weapons - Warning")); |
306 deniedMsg.setWindowTitle(QMessageBox::tr("Weapons - Warning")); |
307 deniedMsg.setText(QMessageBox::tr("A weapon scheme with the name '%1' already exists. Changes made to the weapon scheme have been discarded.").arg(compName)); |
307 deniedMsg.setText(QMessageBox::tr("A weapon scheme with the name '%1' already exists. Changes made to the weapon scheme have been discarded.").arg(compName)); |
|
308 deniedMsg.setTextFormat(Qt::PlainText); |
308 deniedMsg.setWindowModality(Qt::WindowModal); |
309 deniedMsg.setWindowModality(Qt::WindowModal); |
309 deniedMsg.exec(); |
310 deniedMsg.exec(); |
310 return; |
311 return; |
311 } |
312 } |
312 } |
313 } |
348 { |
349 { |
349 QMessageBox deniedMsg(this); |
350 QMessageBox deniedMsg(this); |
350 deniedMsg.setIcon(QMessageBox::Warning); |
351 deniedMsg.setIcon(QMessageBox::Warning); |
351 deniedMsg.setWindowTitle(QMessageBox::tr("Weapons - Warning")); |
352 deniedMsg.setWindowTitle(QMessageBox::tr("Weapons - Warning")); |
352 deniedMsg.setText(QMessageBox::tr("Cannot delete default weapon set '%1'!").arg(cDefaultAmmos[i].first)); |
353 deniedMsg.setText(QMessageBox::tr("Cannot delete default weapon set '%1'!").arg(cDefaultAmmos[i].first)); |
|
354 deniedMsg.setTextFormat(Qt::PlainText); |
353 deniedMsg.setWindowModality(Qt::WindowModal); |
355 deniedMsg.setWindowModality(Qt::WindowModal); |
354 deniedMsg.exec(); |
356 deniedMsg.exec(); |
355 return; |
357 return; |
356 } |
358 } |
357 } |
359 } |
358 |
360 |
359 QMessageBox reallyDeleteMsg(this); |
361 QMessageBox reallyDeleteMsg(this); |
360 reallyDeleteMsg.setIcon(QMessageBox::Question); |
362 reallyDeleteMsg.setIcon(QMessageBox::Question); |
361 reallyDeleteMsg.setWindowTitle(QMessageBox::tr("Weapons - Are you sure?")); |
363 reallyDeleteMsg.setWindowTitle(QMessageBox::tr("Weapons - Are you sure?")); |
362 reallyDeleteMsg.setText(QMessageBox::tr("Do you really want to delete the weapon set '%1'?").arg(delWeaponsName)); |
364 reallyDeleteMsg.setText(QMessageBox::tr("Do you really want to delete the weapon set '%1'?").arg(delWeaponsName)); |
|
365 reallyDeleteMsg.setTextFormat(Qt::PlainText); |
363 reallyDeleteMsg.setWindowModality(Qt::WindowModal); |
366 reallyDeleteMsg.setWindowModality(Qt::WindowModal); |
364 reallyDeleteMsg.setStandardButtons(QMessageBox::Ok | QMessageBox::Cancel); |
367 reallyDeleteMsg.setStandardButtons(QMessageBox::Ok | QMessageBox::Cancel); |
365 |
368 |
366 if (reallyDeleteMsg.exec() == QMessageBox::Ok) |
369 if (reallyDeleteMsg.exec() == QMessageBox::Ok) |
367 { |
370 { |