- Timestamp:
- Sep 7, 2021 7:11:26 PM (3 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/globals
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.cpp
r91142 r91146 1260 1260 } 1261 1261 1262 void UIMessageCenter::cannotAcquireHardDiskLocation(const CMedium &comMedium, QWidget *pParent /* = 0 */) const1263 {1264 /* Show the error: */1265 error(pParent, MessageType_Error,1266 tr("Failed to acquire hard disk location."), UIErrorString::formatErrorInfo(comMedium));1267 }1268 1269 void UIMessageCenter::cannotDeleteHardDiskStorage(const CMedium &medium, const QString &strLocation, QWidget *pParent /* = 0*/) const1270 {1271 error(pParent, MessageType_Error,1272 tr("Failed to delete the storage unit of the hard disk <b>%1</b>.")1273 .arg(strLocation),1274 UIErrorString::formatErrorInfo(medium));1275 }1276 1277 void UIMessageCenter::cannotDeleteHardDiskStorage(const CProgress &progress, const QString &strLocation, QWidget *pParent /* = 0*/) const1278 {1279 error(pParent, MessageType_Error,1280 tr("Failed to delete the storage unit of the hard disk <b>%1</b>.")1281 .arg(strLocation),1282 UIErrorString::formatErrorInfo(progress));1283 }1284 1285 void UIMessageCenter::cannotTakeSnapshot(const CMachine &machine, const QString &strMachineName, QWidget *pParent /* = 0*/) const1286 {1287 error(pParent, MessageType_Error,1288 tr("Failed to create a snapshot of the virtual machine <b>%1</b>.")1289 .arg(strMachineName),1290 UIErrorString::formatErrorInfo(machine));1291 }1292 1293 void UIMessageCenter::cannotTakeSnapshot(const CProgress &progress, const QString &strMachineName, QWidget *pParent /* = 0*/) const1294 {1295 error(pParent, MessageType_Error,1296 tr("Failed to create a snapshot of the virtual machine <b>%1</b>.")1297 .arg(strMachineName),1298 UIErrorString::formatErrorInfo(progress));1299 }1300 1301 void UIMessageCenter::cannotFindSnapshotByName(const CMachine &comMachine,1302 const QString &strName,1303 QWidget *pParent /* = 0 */) const1304 {1305 error(pParent, MessageType_Error,1306 tr("Can't find snapshot named <b>%1</b>.")1307 .arg(strName),1308 UIErrorString::formatErrorInfo(comMachine));1309 }1310 1311 bool UIMessageCenter::cannotRestoreSnapshot(const CMachine &machine, const QString &strSnapshotName, const QString &strMachineName) const1312 {1313 error(0, MessageType_Error,1314 tr("Failed to restore the snapshot <b>%1</b> of the virtual machine <b>%2</b>.")1315 .arg(strSnapshotName, strMachineName),1316 UIErrorString::formatErrorInfo(machine));1317 return false;1318 }1319 1320 bool UIMessageCenter::cannotRestoreSnapshot(const CProgress &progress, const QString &strSnapshotName, const QString &strMachineName) const1321 {1322 error(0, MessageType_Error,1323 tr("Failed to restore the snapshot <b>%1</b> of the virtual machine <b>%2</b>.")1324 .arg(strSnapshotName, strMachineName),1325 UIErrorString::formatErrorInfo(progress));1326 return false;1327 }1328 1329 void UIMessageCenter::cannotAcquireCloudProviderManager(const CVirtualBox &comVBox, QWidget *pParent /* = 0 */) const1330 {1331 error(pParent, MessageType_Error,1332 tr("Failed to acquire cloud provider manager."),1333 UIErrorString::formatErrorInfo(comVBox));1334 }1335 1336 void UIMessageCenter::cannotAcquireCloudProviderManagerParameter(const CCloudProviderManager &comManager, QWidget *pParent /* = 0 */) const1337 {1338 error(pParent, MessageType_Error,1339 tr("Failed to acquire cloud provider manager parameter."),1340 UIErrorString::formatErrorInfo(comManager));1341 }1342 1343 void UIMessageCenter::cannotFindCloudProvider(const CCloudProviderManager &comManager, const QUuid &uId, QWidget *pParent /* = 0 */) const1344 {1345 error(pParent, MessageType_Error,1346 tr("Failed to find cloud provider with following uuid: <b>%1</b>.").arg(uId.toString()),1347 UIErrorString::formatErrorInfo(comManager));1348 }1349 1350 void UIMessageCenter::cannotAcquireCloudProviderParameter(const CCloudProvider &comProvider, QWidget *pParent /* = 0 */) const1351 {1352 error(pParent, MessageType_Error,1353 tr("Failed to acquire cloud provider parameter."),1354 UIErrorString::formatErrorInfo(comProvider));1355 }1356 1357 void UIMessageCenter::cannotFindCloudProfile(const CCloudProvider &comProvider, const QString &strName, QWidget *pParent /* = 0 */) const1358 {1359 error(pParent, MessageType_Error,1360 tr("Failed to find cloud profile with following name: <b>%1</b>.").arg(strName),1361 UIErrorString::formatErrorInfo(comProvider));1362 }1363 1364 void UIMessageCenter::cannotCreateCloudProfile(const CCloudProvider &comProvider, QWidget *pParent /* = 0 */) const1365 {1366 error(pParent, MessageType_Error,1367 tr("Failed to create cloud profile."),1368 UIErrorString::formatErrorInfo(comProvider));1369 }1370 1371 void UIMessageCenter::cannotRemoveCloudProfile(const CCloudProfile &comProfile, QWidget *pParent /* = 0 */) const1372 {1373 error(pParent, MessageType_Error,1374 tr("Failed to remove cloud profile."),1375 UIErrorString::formatErrorInfo(comProfile));1376 }1377 1378 void UIMessageCenter::cannotSaveCloudProfiles(const CCloudProvider &comProvider, QWidget *pParent /* = 0 */) const1379 {1380 error(pParent, MessageType_Error,1381 tr("Failed to save cloud profiles."),1382 UIErrorString::formatErrorInfo(comProvider));1383 }1384 1385 void UIMessageCenter::cannotImportCloudProfiles(const CCloudProvider &comProvider, QWidget *pParent /* = 0 */) const1386 {1387 error(pParent, MessageType_Error,1388 tr("Failed to import cloud profiles."),1389 UIErrorString::formatErrorInfo(comProvider));1390 }1391 1392 void UIMessageCenter::cannotAcquireCloudProfileParameter(const CCloudProfile &comProfile, QWidget *pParent /* = 0 */) const1393 {1394 error(pParent, MessageType_Error,1395 tr("Failed to acquire cloud profile parameter."),1396 UIErrorString::formatErrorInfo(comProfile));1397 }1398 1399 void UIMessageCenter::cannotAssignCloudProfileParameter(const CCloudProfile &comProfile, QWidget *pParent /* = 0 */) const1400 {1401 error(pParent, MessageType_Error,1402 tr("Failed to assign cloud profile parameter."),1403 UIErrorString::formatErrorInfo(comProfile));1404 }1405 1406 void UIMessageCenter::cannotCreateCloudClient(const CCloudProfile &comProfile, QWidget *pParent /* = 0 */) const1407 {1408 error(pParent, MessageType_Error,1409 tr("Failed to create cloud client."),1410 UIErrorString::formatErrorInfo(comProfile));1411 }1412 1413 void UIMessageCenter::cannotCreateCloudMachine(const CCloudClient &comClient, QWidget *pParent /* = 0 */) const1414 {1415 error(pParent, MessageType_Error,1416 tr("Failed to create cloud machine."),1417 UIErrorString::formatErrorInfo(comClient));1418 }1419 1420 void UIMessageCenter::cannotCreateCloudMachine(const CProgress &comProgress, QWidget *pParent /* = 0 */) const1421 {1422 error(pParent, MessageType_Error,1423 tr("Failed to create cloud machine."),1424 UIErrorString::formatErrorInfo(comProgress));1425 }1426 1427 void UIMessageCenter::cannotAcquireCloudClientParameter(const CCloudClient &comClient, QWidget *pParent /* = 0 */) const1428 {1429 error(pParent, MessageType_Error,1430 tr("Failed to acquire cloud client parameter."),1431 UIErrorString::formatErrorInfo(comClient));1432 }1433 1434 void UIMessageCenter::cannotAcquireCloudClientParameter(const CProgress &comProgress, QWidget *pParent /* = 0 */) const1435 {1436 error(pParent, MessageType_Error,1437 tr("Failed to acquire cloud client parameter."),1438 UIErrorString::formatErrorInfo(comProgress));1439 }1440 1441 void UIMessageCenter::cannotAcquireCloudMachineParameter(const CCloudMachine &comMachine, QWidget *pParent /* = 0 */) const1442 {1443 error(pParent, MessageType_Error,1444 tr("Failed to acquire cloud machine parameter."),1445 UIErrorString::formatErrorInfo(comMachine));1446 }1447 1448 void UIMessageCenter::cannotAcquireCloudMachineParameter(const CProgress &comProgress, QWidget *pParent /* = 0 */) const1449 {1450 error(pParent, MessageType_Error,1451 tr("Failed to acquire cloud machine parameter."),1452 UIErrorString::formatErrorInfo(comProgress));1453 }1454 1455 void UIMessageCenter::cannotAcquireCloudMachineParameter(const QString &strErrorDetails, QWidget *pParent /* = 0 */) const1456 {1457 error(pParent, MessageType_Error,1458 tr("Failed to acquire cloud machine parameter."),1459 strErrorDetails);1460 }1461 1462 1262 bool UIMessageCenter::confirmCloudProfileRemoval(const QString &strName, QWidget *pParent /* = 0 */) const 1463 1263 { … … 1480 1280 QString() /* cancel button text */, 1481 1281 false /* ok button by default? */); 1482 }1483 1484 void UIMessageCenter::cannotAssignFormValue(const QString &strError, QWidget *pParent /* = 0 */) const1485 {1486 error(pParent, MessageType_Error,1487 tr("Failed to assign form value."),1488 strError);1489 1282 } 1490 1283 … … 1502 1295 tr("Accept", "cloud profile manager changes"), 1503 1296 tr("Reject", "cloud profile manager changes")); 1297 } 1298 1299 void UIMessageCenter::cannotAcquireHardDiskLocation(const CMedium &comMedium, QWidget *pParent /* = 0 */) const 1300 { 1301 /* Show the error: */ 1302 error(pParent, MessageType_Error, 1303 tr("Failed to acquire hard disk location."), UIErrorString::formatErrorInfo(comMedium)); 1304 } 1305 1306 void UIMessageCenter::cannotDeleteHardDiskStorage(const CMedium &medium, const QString &strLocation, QWidget *pParent /* = 0*/) const 1307 { 1308 error(pParent, MessageType_Error, 1309 tr("Failed to delete the storage unit of the hard disk <b>%1</b>.") 1310 .arg(strLocation), 1311 UIErrorString::formatErrorInfo(medium)); 1312 } 1313 1314 void UIMessageCenter::cannotDeleteHardDiskStorage(const CProgress &progress, const QString &strLocation, QWidget *pParent /* = 0*/) const 1315 { 1316 error(pParent, MessageType_Error, 1317 tr("Failed to delete the storage unit of the hard disk <b>%1</b>.") 1318 .arg(strLocation), 1319 UIErrorString::formatErrorInfo(progress)); 1320 } 1321 1322 void UIMessageCenter::cannotTakeSnapshot(const CMachine &machine, const QString &strMachineName, QWidget *pParent /* = 0*/) const 1323 { 1324 error(pParent, MessageType_Error, 1325 tr("Failed to create a snapshot of the virtual machine <b>%1</b>.") 1326 .arg(strMachineName), 1327 UIErrorString::formatErrorInfo(machine)); 1328 } 1329 1330 void UIMessageCenter::cannotTakeSnapshot(const CProgress &progress, const QString &strMachineName, QWidget *pParent /* = 0*/) const 1331 { 1332 error(pParent, MessageType_Error, 1333 tr("Failed to create a snapshot of the virtual machine <b>%1</b>.") 1334 .arg(strMachineName), 1335 UIErrorString::formatErrorInfo(progress)); 1336 } 1337 1338 void UIMessageCenter::cannotFindSnapshotByName(const CMachine &comMachine, 1339 const QString &strName, 1340 QWidget *pParent /* = 0 */) const 1341 { 1342 error(pParent, MessageType_Error, 1343 tr("Can't find snapshot named <b>%1</b>.") 1344 .arg(strName), 1345 UIErrorString::formatErrorInfo(comMachine)); 1346 } 1347 1348 void UIMessageCenter::cannotAcquireCloudProviderManager(const CVirtualBox &comVBox, QWidget *pParent /* = 0 */) const 1349 { 1350 error(pParent, MessageType_Error, 1351 tr("Failed to acquire cloud provider manager."), 1352 UIErrorString::formatErrorInfo(comVBox)); 1353 } 1354 1355 void UIMessageCenter::cannotFindCloudProvider(const CCloudProviderManager &comManager, const QUuid &uId, QWidget *pParent /* = 0 */) const 1356 { 1357 error(pParent, MessageType_Error, 1358 tr("Failed to find cloud provider with following uuid: <b>%1</b>.").arg(uId.toString()), 1359 UIErrorString::formatErrorInfo(comManager)); 1360 } 1361 1362 void UIMessageCenter::cannotFindCloudProfile(const CCloudProvider &comProvider, const QString &strName, QWidget *pParent /* = 0 */) const 1363 { 1364 error(pParent, MessageType_Error, 1365 tr("Failed to find cloud profile with following name: <b>%1</b>.").arg(strName), 1366 UIErrorString::formatErrorInfo(comProvider)); 1367 } 1368 1369 void UIMessageCenter::cannotAcquireCloudProviderManagerParameter(const CCloudProviderManager &comManager, QWidget *pParent /* = 0 */) const 1370 { 1371 error(pParent, MessageType_Error, 1372 tr("Failed to acquire cloud provider manager parameter."), 1373 UIErrorString::formatErrorInfo(comManager)); 1374 } 1375 1376 void UIMessageCenter::cannotAcquireCloudProviderParameter(const CCloudProvider &comProvider, QWidget *pParent /* = 0 */) const 1377 { 1378 error(pParent, MessageType_Error, 1379 tr("Failed to acquire cloud provider parameter."), 1380 UIErrorString::formatErrorInfo(comProvider)); 1381 } 1382 1383 void UIMessageCenter::cannotAcquireCloudProfileParameter(const CCloudProfile &comProfile, QWidget *pParent /* = 0 */) const 1384 { 1385 error(pParent, MessageType_Error, 1386 tr("Failed to acquire cloud profile parameter."), 1387 UIErrorString::formatErrorInfo(comProfile)); 1388 } 1389 1390 void UIMessageCenter::cannotAssignCloudProfileParameter(const CCloudProfile &comProfile, QWidget *pParent /* = 0 */) const 1391 { 1392 error(pParent, MessageType_Error, 1393 tr("Failed to assign cloud profile parameter."), 1394 UIErrorString::formatErrorInfo(comProfile)); 1395 } 1396 1397 bool UIMessageCenter::cannotRestoreSnapshot(const CMachine &machine, const QString &strSnapshotName, const QString &strMachineName) const 1398 { 1399 error(0, MessageType_Error, 1400 tr("Failed to restore the snapshot <b>%1</b> of the virtual machine <b>%2</b>.") 1401 .arg(strSnapshotName, strMachineName), 1402 UIErrorString::formatErrorInfo(machine)); 1403 return false; 1404 } 1405 1406 bool UIMessageCenter::cannotRestoreSnapshot(const CProgress &progress, const QString &strSnapshotName, const QString &strMachineName) const 1407 { 1408 error(0, MessageType_Error, 1409 tr("Failed to restore the snapshot <b>%1</b> of the virtual machine <b>%2</b>.") 1410 .arg(strSnapshotName, strMachineName), 1411 UIErrorString::formatErrorInfo(progress)); 1412 return false; 1413 } 1414 1415 void UIMessageCenter::cannotCreateCloudProfile(const CCloudProvider &comProvider, QWidget *pParent /* = 0 */) const 1416 { 1417 error(pParent, MessageType_Error, 1418 tr("Failed to create cloud profile."), 1419 UIErrorString::formatErrorInfo(comProvider)); 1420 } 1421 1422 void UIMessageCenter::cannotRemoveCloudProfile(const CCloudProfile &comProfile, QWidget *pParent /* = 0 */) const 1423 { 1424 error(pParent, MessageType_Error, 1425 tr("Failed to remove cloud profile."), 1426 UIErrorString::formatErrorInfo(comProfile)); 1427 } 1428 1429 void UIMessageCenter::cannotSaveCloudProfiles(const CCloudProvider &comProvider, QWidget *pParent /* = 0 */) const 1430 { 1431 error(pParent, MessageType_Error, 1432 tr("Failed to save cloud profiles."), 1433 UIErrorString::formatErrorInfo(comProvider)); 1434 } 1435 1436 void UIMessageCenter::cannotImportCloudProfiles(const CCloudProvider &comProvider, QWidget *pParent /* = 0 */) const 1437 { 1438 error(pParent, MessageType_Error, 1439 tr("Failed to import cloud profiles."), 1440 UIErrorString::formatErrorInfo(comProvider)); 1441 } 1442 1443 void UIMessageCenter::cannotCreateCloudClient(const CCloudProfile &comProfile, QWidget *pParent /* = 0 */) const 1444 { 1445 error(pParent, MessageType_Error, 1446 tr("Failed to create cloud client."), 1447 UIErrorString::formatErrorInfo(comProfile)); 1448 } 1449 1450 void UIMessageCenter::cannotAcquireCloudClientParameter(const CCloudClient &comClient, QWidget *pParent /* = 0 */) const 1451 { 1452 error(pParent, MessageType_Error, 1453 tr("Failed to acquire cloud client parameter."), 1454 UIErrorString::formatErrorInfo(comClient)); 1455 } 1456 1457 void UIMessageCenter::cannotAcquireCloudClientParameter(const CProgress &comProgress, QWidget *pParent /* = 0 */) const 1458 { 1459 error(pParent, MessageType_Error, 1460 tr("Failed to acquire cloud client parameter."), 1461 UIErrorString::formatErrorInfo(comProgress)); 1462 } 1463 1464 void UIMessageCenter::cannotAcquireCloudMachineParameter(const CCloudMachine &comMachine, QWidget *pParent /* = 0 */) const 1465 { 1466 error(pParent, MessageType_Error, 1467 tr("Failed to acquire cloud machine parameter."), 1468 UIErrorString::formatErrorInfo(comMachine)); 1469 } 1470 1471 void UIMessageCenter::cannotAcquireCloudMachineParameter(const CProgress &comProgress, QWidget *pParent /* = 0 */) const 1472 { 1473 error(pParent, MessageType_Error, 1474 tr("Failed to acquire cloud machine parameter."), 1475 UIErrorString::formatErrorInfo(comProgress)); 1476 } 1477 1478 void UIMessageCenter::cannotAcquireCloudMachineParameter(const QString &strErrorDetails, QWidget *pParent /* = 0 */) const 1479 { 1480 error(pParent, MessageType_Error, 1481 tr("Failed to acquire cloud machine parameter."), 1482 strErrorDetails); 1483 } 1484 1485 void UIMessageCenter::cannotAssignFormValue(const QString &strError, QWidget *pParent /* = 0 */) const 1486 { 1487 error(pParent, MessageType_Error, 1488 tr("Failed to assign form value."), 1489 strError); 1504 1490 } 1505 1491 -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.h
r91142 r91146 350 350 /** @} */ 351 351 352 /** @name VirtualBox Manager / Cloud Profile Manager warnings. 353 * @{ */ 354 bool confirmCloudProfileRemoval(const QString &strName, QWidget *pParent = 0) const; 355 bool confirmCloudProfilesImport(QWidget *pParent = 0) const; 356 int confirmCloudProfileManagerClosing(QWidget *pParent = 0) const; 357 /** @} */ 358 352 359 /** @name VirtualBox Manager / New VM wizard warnings. 353 360 * @{ */ … … 364 371 /** @} */ 365 372 373 /** @name VirtualBox Manager / Cloud networking stuff. 374 * @{ */ 375 void cannotAcquireCloudProviderManager(const CVirtualBox &comVBox, QWidget *pParent = 0) const; 376 377 void cannotFindCloudProvider(const CCloudProviderManager &comManager, const QUuid &uId, QWidget *pParent = 0) const; 378 void cannotFindCloudProfile(const CCloudProvider &comProvider, const QString &strName, QWidget *pParent = 0) const; 379 380 void cannotAcquireCloudProviderManagerParameter(const CCloudProviderManager &comManager, QWidget *pParent = 0) const; 381 void cannotAcquireCloudProviderParameter(const CCloudProvider &comProvider, QWidget *pParent = 0) const; 382 void cannotAcquireCloudProfileParameter(const CCloudProfile &comProfile, QWidget *pParent = 0) const; 383 void cannotAssignCloudProfileParameter(const CCloudProfile &comProfile, QWidget *pParent = 0) const; 384 /** @} */ 385 366 386 /** @name Runtime UI warnings. 367 387 * @{ */ … … 371 391 372 392 /* API: Cloud Profile Manager warnings: */ 373 void cannotAcquireCloudProviderManager(const CVirtualBox &comVBox, QWidget *pParent = 0) const;374 void cannotAcquireCloudProviderManagerParameter(const CCloudProviderManager &comManager, QWidget *pParent = 0) const;375 void cannotFindCloudProvider(const CCloudProviderManager &comManager, const QUuid &uId, QWidget *pParent = 0) const;376 void cannotAcquireCloudProviderParameter(const CCloudProvider &comProvider, QWidget *pParent = 0) const;377 void cannotFindCloudProfile(const CCloudProvider &comProvider, const QString &strName, QWidget *pParent = 0) const;378 393 void cannotCreateCloudProfile(const CCloudProvider &comProvider, QWidget *pParent = 0) const; 379 394 void cannotRemoveCloudProfile(const CCloudProfile &comProfile, QWidget *pParent = 0) const; 380 395 void cannotSaveCloudProfiles(const CCloudProvider &comProvider, QWidget *pParent = 0) const; 381 396 void cannotImportCloudProfiles(const CCloudProvider &comProvider, QWidget *pParent = 0) const; 382 void cannotAcquireCloudProfileParameter(const CCloudProfile &comProfile, QWidget *pParent = 0) const; 383 void cannotAssignCloudProfileParameter(const CCloudProfile &comProfile, QWidget *pParent = 0) const; 397 384 398 void cannotCreateCloudClient(const CCloudProfile &comProfile, QWidget *pParent = 0) const; 385 void cannotCreateCloudMachine(const CCloudClient &comClient, QWidget *pParent = 0) const;386 void cannotCreateCloudMachine(const CProgress &comProgress, QWidget *pParent = 0) const;387 399 void cannotAcquireCloudClientParameter(const CCloudClient &comClient, QWidget *pParent = 0) const; 388 400 void cannotAcquireCloudClientParameter(const CProgress &comProgress, QWidget *pParent = 0) const; … … 390 402 void cannotAcquireCloudMachineParameter(const CProgress &comProgress, QWidget *pParent = 0) const; 391 403 void cannotAcquireCloudMachineParameter(const QString &strErrorDetails, QWidget *pParent = 0) const; 392 bool confirmCloudProfileRemoval(const QString &strName, QWidget *pParent = 0) const;393 bool confirmCloudProfilesImport(QWidget *pParent = 0) const;394 404 void cannotAssignFormValue(const QString &strError, QWidget *pParent = 0) const; 395 int confirmCloudProfileManagerClosing(QWidget *pParent = 0) const;396 405 397 406 /* API: Cloud Console Manager warnings: */
Note:
See TracChangeset
for help on using the changeset viewer.