Changeset 91142 in vbox
- Timestamp:
- Sep 7, 2021 5:20:19 PM (3 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.cpp
r91132 r91142 1069 1069 } 1070 1070 1071 1072 1071 int UIMessageCenter::confirmSnapshotRestoring(const QString &strSnapshotName, bool fAlsoCreateNewSnapshot) const 1073 1072 { … … 1227 1226 } 1228 1227 1229 void UIMessageCenter::cannotAcquireHardDiskLocation(const CMedium &comMedium, QWidget *pParent /* = 0 */) const1230 {1231 /* Show the error: */1232 error(pParent, MessageType_Error,1233 tr("Failed to acquire hard disk location."), UIErrorString::formatErrorInfo(comMedium));1234 }1235 1236 void UIMessageCenter::cannotDeleteHardDiskStorage(const CMedium &medium, const QString &strLocation, QWidget *pParent /* = 0*/) const1237 {1238 error(pParent, MessageType_Error,1239 tr("Failed to delete the storage unit of the hard disk <b>%1</b>.")1240 .arg(strLocation),1241 UIErrorString::formatErrorInfo(medium));1242 }1243 1244 void UIMessageCenter::cannotDeleteHardDiskStorage(const CProgress &progress, const QString &strLocation, QWidget *pParent /* = 0*/) const1245 {1246 error(pParent, MessageType_Error,1247 tr("Failed to delete the storage unit of the hard disk <b>%1</b>.")1248 .arg(strLocation),1249 UIErrorString::formatErrorInfo(progress));1250 }1251 1252 void UIMessageCenter::cannotTakeSnapshot(const CMachine &machine, const QString &strMachineName, QWidget *pParent /* = 0*/) const1253 {1254 error(pParent, MessageType_Error,1255 tr("Failed to create a snapshot of the virtual machine <b>%1</b>.")1256 .arg(strMachineName),1257 UIErrorString::formatErrorInfo(machine));1258 }1259 1260 void UIMessageCenter::cannotTakeSnapshot(const CProgress &progress, const QString &strMachineName, QWidget *pParent /* = 0*/) const1261 {1262 error(pParent, MessageType_Error,1263 tr("Failed to create a snapshot of the virtual machine <b>%1</b>.")1264 .arg(strMachineName),1265 UIErrorString::formatErrorInfo(progress));1266 }1267 1268 void UIMessageCenter::cannotFindSnapshotByName(const CMachine &comMachine,1269 const QString &strName,1270 QWidget *pParent /* = 0 */) const1271 {1272 error(pParent, MessageType_Error,1273 tr("Can't find snapshot named <b>%1</b>.")1274 .arg(strName),1275 UIErrorString::formatErrorInfo(comMachine));1276 }1277 1278 bool UIMessageCenter::cannotRestoreSnapshot(const CMachine &machine, const QString &strSnapshotName, const QString &strMachineName) const1279 {1280 error(0, MessageType_Error,1281 tr("Failed to restore the snapshot <b>%1</b> of the virtual machine <b>%2</b>.")1282 .arg(strSnapshotName, strMachineName),1283 UIErrorString::formatErrorInfo(machine));1284 return false;1285 }1286 1287 bool UIMessageCenter::cannotRestoreSnapshot(const CProgress &progress, const QString &strSnapshotName, const QString &strMachineName) const1288 {1289 error(0, MessageType_Error,1290 tr("Failed to restore the snapshot <b>%1</b> of the virtual machine <b>%2</b>.")1291 .arg(strSnapshotName, strMachineName),1292 UIErrorString::formatErrorInfo(progress));1293 return false;1294 }1295 1296 bool UIMessageCenter::confirmNATNetworkRemoval(const QString &strName, QWidget *pParent /* = 0*/) const1297 {1298 return questionBinary(pParent, MessageType_Question,1299 tr("<p>Do you want to remove the NAT network <nobr><b>%1</b>?</nobr></p>"1300 "<p>If this network is in use by one or more virtual "1301 "machine network adapters these adapters will no longer be "1302 "usable until you correct their settings by either choosing "1303 "a different network name or a different adapter attachment "1304 "type.</p>")1305 .arg(strName),1306 0 /* auto-confirm id */,1307 tr("Remove") /* ok button text */,1308 QString() /* cancel button text */,1309 false /* ok button by default? */);1310 }1311 1312 1228 bool UIMessageCenter::confirmHostOnlyInterfaceRemoval(const QString &strName, QWidget *pParent /* = 0 */) const 1313 1229 { … … 1328 1244 } 1329 1245 1330 void UIMessageCenter::cannotAcquireHostNetworkInterfaces(const CHost &comHost, QWidget *pParent /* = 0 */) const 1331 { 1332 error(pParent, MessageType_Error, 1333 tr("Failed to acquire host network interfaces."), 1334 UIErrorString::formatErrorInfo(comHost)); 1335 } 1336 1337 void UIMessageCenter::cannotFindHostNetworkInterface(const CHost &comHost, const QString &strInterfaceName, QWidget *pParent /* = 0 */) const 1338 { 1339 error(pParent, MessageType_Error, 1340 tr("Unable to find the host network interface <b>%1</b>.") 1341 .arg(strInterfaceName), 1342 UIErrorString::formatErrorInfo(comHost)); 1343 } 1344 1345 void UIMessageCenter::cannotCreateHostNetworkInterface(const CHost &comHost, QWidget *pParent /* = 0 */) const 1346 { 1347 error(pParent, MessageType_Error, 1348 tr("Failed to create a host network interface."), 1349 UIErrorString::formatErrorInfo(comHost)); 1350 } 1351 1352 void UIMessageCenter::cannotCreateHostNetworkInterface(const CProgress &progress, QWidget *pParent /* = 0 */) const 1353 { 1354 error(pParent, MessageType_Error, 1355 tr("Failed to create a host network interface."), 1246 bool UIMessageCenter::confirmNATNetworkRemoval(const QString &strName, QWidget *pParent /* = 0*/) const 1247 { 1248 return questionBinary(pParent, MessageType_Question, 1249 tr("<p>Do you want to remove the NAT network <nobr><b>%1</b>?</nobr></p>" 1250 "<p>If this network is in use by one or more virtual " 1251 "machine network adapters these adapters will no longer be " 1252 "usable until you correct their settings by either choosing " 1253 "a different network name or a different adapter attachment " 1254 "type.</p>") 1255 .arg(strName), 1256 0 /* auto-confirm id */, 1257 tr("Remove") /* ok button text */, 1258 QString() /* cancel button text */, 1259 false /* ok button by default? */); 1260 } 1261 1262 void UIMessageCenter::cannotAcquireHardDiskLocation(const CMedium &comMedium, QWidget *pParent /* = 0 */) const 1263 { 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*/) const 1270 { 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*/) const 1278 { 1279 error(pParent, MessageType_Error, 1280 tr("Failed to delete the storage unit of the hard disk <b>%1</b>.") 1281 .arg(strLocation), 1356 1282 UIErrorString::formatErrorInfo(progress)); 1357 1283 } 1358 1284 1359 void UIMessageCenter::cannot RemoveHostNetworkInterface(const CHost &comHost, const QString &strInterfaceName, QWidget *pParent /* = 0*/) const1360 { 1361 error(pParent, MessageType_Error, 1362 tr("Failed to remove the host network interface <b>%1</b>.")1363 .arg(str InterfaceName),1364 UIErrorString::formatErrorInfo( comHost));1365 } 1366 1367 void UIMessageCenter::cannot RemoveHostNetworkInterface(const CProgress &progress, const QString &strInterfaceName, QWidget *pParent /* = 0*/) const1368 { 1369 error(pParent, MessageType_Error, 1370 tr("Failed to remove the host network interface <b>%1</b>.")1371 .arg(str InterfaceName),1285 void UIMessageCenter::cannotTakeSnapshot(const CMachine &machine, const QString &strMachineName, QWidget *pParent /* = 0*/) const 1286 { 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*/) const 1294 { 1295 error(pParent, MessageType_Error, 1296 tr("Failed to create a snapshot of the virtual machine <b>%1</b>.") 1297 .arg(strMachineName), 1372 1298 UIErrorString::formatErrorInfo(progress)); 1373 1299 } 1374 1300 1375 void UIMessageCenter::cannotAcquireHostNetworkInterfaceParameter(const CHostNetworkInterface &comInterface, QWidget *pParent /* = 0 */) const 1376 { 1377 error(pParent, MessageType_Error, 1378 tr("Failed to acquire host network interface parameter."), 1379 UIErrorString::formatErrorInfo(comInterface)); 1380 } 1381 1382 void UIMessageCenter::cannotSaveHostNetworkInterfaceParameter(const CHostNetworkInterface &comInterface, QWidget *pParent /* = 0 */) const 1383 { 1384 error(pParent, MessageType_Error, 1385 tr("Failed to save host network interface parameter."), 1386 UIErrorString::formatErrorInfo(comInterface)); 1387 } 1388 1389 void UIMessageCenter::cannotCreateDHCPServer(const CVirtualBox &comVBox, const QString &strInterfaceName, QWidget *pParent /* = 0 */) const 1390 { 1391 error(pParent, MessageType_Error, 1392 tr("Failed to create a DHCP server for the network interface <b>%1</b>.") 1393 .arg(strInterfaceName), 1394 UIErrorString::formatErrorInfo(comVBox)); 1395 } 1396 1397 void UIMessageCenter::cannotRemoveDHCPServer(const CVirtualBox &comVBox, const QString &strInterfaceName, QWidget *pParent /* = 0 */) const 1398 { 1399 error(pParent, MessageType_Error, 1400 tr("Failed to remove the DHCP server for the network interface <b>%1</b>.") 1401 .arg(strInterfaceName), 1402 UIErrorString::formatErrorInfo(comVBox)); 1403 } 1404 1405 void UIMessageCenter::cannotAcquireDHCPServerParameter(const CDHCPServer &comServer, QWidget *pParent /* = 0 */) const 1406 { 1407 error(pParent, MessageType_Error, 1408 tr("Failed to acquire DHCP server parameter."), 1409 UIErrorString::formatErrorInfo(comServer)); 1410 } 1411 1412 void UIMessageCenter::cannotSaveDHCPServerParameter(const CDHCPServer &comServer, QWidget *pParent /* = 0 */) const 1413 { 1414 error(pParent, MessageType_Error, 1415 tr("Failed to save DHCP server parameter."), 1416 UIErrorString::formatErrorInfo(comServer)); 1417 } 1418 1419 void UIMessageCenter::warnAboutDHCPServerIsNotEnabled(const QString &strName, QWidget *pParent /* = 0 */) const 1420 { 1421 alert(pParent, MessageType_Error, 1422 tr("Host interface <nobr><b>%1</b></nobr> is set to obtain the address " 1423 "automatically but the corresponding DHCP server is not enabled.").arg(strName)); 1424 } 1425 1426 void UIMessageCenter::warnAboutInvalidIPv4Address(const QString &strName, QWidget *pParent /* = 0 */) const 1427 { 1428 alert(pParent, MessageType_Error, 1429 tr("Host interface <nobr><b>%1</b></nobr> does not " 1430 "currently have a valid IPv4 address.").arg(strName)); 1431 } 1432 1433 void UIMessageCenter::warnAboutInvalidIPv4Mask(const QString &strName, QWidget *pParent /* = 0 */) const 1434 { 1435 alert(pParent, MessageType_Error, 1436 tr("Host interface <nobr><b>%1</b></nobr> does not " 1437 "currently have a valid IPv4 network mask.").arg(strName)); 1438 } 1439 1440 void UIMessageCenter::warnAboutInvalidIPv6Address(const QString &strName, QWidget *pParent /* = 0 */) const 1441 { 1442 alert(pParent, MessageType_Error, 1443 tr("Host interface <nobr><b>%1</b></nobr> does not " 1444 "currently have a valid IPv6 address.").arg(strName)); 1445 } 1446 1447 void UIMessageCenter::warnAboutInvalidIPv6PrefixLength(const QString &strName, QWidget *pParent /* = 0 */) const 1448 { 1449 alert(pParent, MessageType_Error, 1450 tr("Host interface <nobr><b>%1</b></nobr> does not " 1451 "currently have a valid IPv6 prefix length.").arg(strName)); 1452 } 1453 1454 void UIMessageCenter::warnAboutInvalidDHCPServerAddress(const QString &strName, QWidget *pParent /* = 0 */) const 1455 { 1456 alert(pParent, MessageType_Error, 1457 tr("Host interface <nobr><b>%1</b></nobr> does not " 1458 "currently have a valid DHCP server address.").arg(strName)); 1459 } 1460 1461 void UIMessageCenter::warnAboutInvalidDHCPServerMask(const QString &strName, QWidget *pParent /* = 0 */) const 1462 { 1463 alert(pParent, MessageType_Error, 1464 tr("Host interface <nobr><b>%1</b></nobr> does not " 1465 "currently have a valid DHCP server mask.").arg(strName)); 1466 } 1467 1468 void UIMessageCenter::warnAboutInvalidDHCPServerLowerAddress(const QString &strName, QWidget *pParent /* = 0 */) const 1469 { 1470 alert(pParent, MessageType_Error, 1471 tr("Host interface <nobr><b>%1</b></nobr> does not " 1472 "currently have a valid DHCP server lower address bound.").arg(strName)); 1473 } 1474 1475 void UIMessageCenter::warnAboutInvalidDHCPServerUpperAddress(const QString &strName, QWidget *pParent /* = 0 */) const 1476 { 1477 alert(pParent, MessageType_Error, 1478 tr("Host interface <nobr><b>%1</b></nobr> does not " 1479 "currently have a valid DHCP server upper address bound.").arg(strName)); 1480 } 1481 1482 void UIMessageCenter::cannotAcquireNATNetworks(const CVirtualBox &comVBox, QWidget *pParent /* = 0 */) const 1483 { 1484 error(pParent, MessageType_Error, 1485 tr("Failed to acquire NAT networks."), 1486 UIErrorString::formatErrorInfo(comVBox)); 1487 } 1488 1489 void UIMessageCenter::cannotAcquireNATNetworkParameter(const CNATNetwork &comNetwork, QWidget *pParent /* = 0 */) const 1490 { 1491 error(pParent, MessageType_Error, 1492 tr("Failed to acquire NAT network parameter."), 1493 UIErrorString::formatErrorInfo(comNetwork)); 1494 } 1495 1496 void UIMessageCenter::cannotCreateNATNetwork(const CVirtualBox &comVBox, QWidget *pParent /* = 0 */) 1497 { 1498 error(pParent, MessageType_Error, 1499 tr("Failed to create a NAT network."), 1500 UIErrorString::formatErrorInfo(comVBox)); 1501 } 1502 1503 void UIMessageCenter::cannotSaveNATNetworkParameter(const CNATNetwork &comNetwork, QWidget *pParent /* = 0 */) const 1504 { 1505 error(pParent, MessageType_Error, 1506 tr("Failed to save NAT network parameter."), 1507 UIErrorString::formatErrorInfo(comNetwork)); 1508 } 1509 1510 void UIMessageCenter::cannotFindNATNetwork(const CVirtualBox &comVBox, const QString &strNetworkName, QWidget *pParent /* = 0 */) const 1511 { 1512 error(pParent, MessageType_Error, 1513 tr("Unable to find the NAT network <b>%1</b>.") 1514 .arg(strNetworkName), 1515 UIErrorString::formatErrorInfo(comVBox)); 1516 } 1517 1518 void UIMessageCenter::cannotRemoveNATNetwork(const CVirtualBox &comVBox, const QString &strNetworkName, QWidget *pParent /* = 0 */) const 1519 { 1520 error(pParent, MessageType_Error, 1521 tr("Failed to remove the NAT network <b>%1</b>.") 1522 .arg(strNetworkName), 1523 UIErrorString::formatErrorInfo(comVBox)); 1524 } 1525 1526 void UIMessageCenter::warnAboutNoNameSpecified(const QString &strName, QWidget *pParent /* = 0 */) 1527 { 1528 alert(pParent, MessageType_Error, 1529 tr("No new name specified for the NAT network previously called <b>%1</b>.").arg(strName)); 1530 } 1531 1532 void UIMessageCenter::warnAboutNameAlreadyBusy(const QString &strName, QWidget *pParent /* = 0 */) 1533 { 1534 alert(pParent, MessageType_Error, 1535 tr("The name <b>%1</b> is being used for several NAT networks.").arg(strName)); 1536 } 1537 1538 void UIMessageCenter::warnAboutNoIPv4PrefixSpecified(const QString &strName, QWidget *pParent /* = 0 */) 1539 { 1540 alert(pParent, MessageType_Error, 1541 tr("No IPv4 prefix specified for the NAT network <b>%1</b>.").arg(strName)); 1542 } 1543 1544 void UIMessageCenter::warnAboutNoIPv6PrefixSpecified(const QString &strName, QWidget *pParent /* = 0 */) 1545 { 1546 alert(pParent, MessageType_Error, 1547 tr("No IPv6 prefix specified for the NAT network <b>%1</b>.").arg(strName)); 1548 } 1549 1550 void UIMessageCenter::warnAboutInvalidCIDRSpecified(const QString &strCIDR, const QString &strName, QWidget *pParent /* = 0 */) 1551 { 1552 alert(pParent, MessageType_Error, 1553 tr("Invalid CIDR specified (<i>%1</i>) for the NAT network <b>%2</b>.").arg(strCIDR, strName)); 1301 void UIMessageCenter::cannotFindSnapshotByName(const CMachine &comMachine, 1302 const QString &strName, 1303 QWidget *pParent /* = 0 */) const 1304 { 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) const 1312 { 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) const 1321 { 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; 1554 1327 } 1555 1328 -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.h
r91132 r91142 344 344 /** @} */ 345 345 346 /** @name VirtualBox Manager / Network Manager warnings. 347 * @{ */ 348 bool confirmHostOnlyInterfaceRemoval(const QString &strName, QWidget *pParent = 0) const; 349 bool confirmNATNetworkRemoval(const QString &strName, QWidget *pParent = 0) const; 350 /** @} */ 351 346 352 /** @name VirtualBox Manager / New VM wizard warnings. 347 353 * @{ */ … … 363 369 bool cannotRestoreSnapshot(const CProgress &progress, const QString &strSnapshotName, const QString &strMachineName) const; 364 370 /** @} */ 365 366 /* API: Network Manager warnings: */367 bool confirmNATNetworkRemoval(const QString &strName, QWidget *pParent = 0) const;368 bool confirmHostOnlyInterfaceRemoval(const QString &strName, QWidget *pParent = 0) const;369 void cannotAcquireHostNetworkInterfaces(const CHost &comHost, QWidget *pParent = 0) const;370 void cannotFindHostNetworkInterface(const CHost &comHost, const QString &strInterfaceName, QWidget *pParent = 0) const;371 void cannotCreateHostNetworkInterface(const CHost &comHost, QWidget *pParent = 0) const;372 void cannotCreateHostNetworkInterface(const CProgress &progress, QWidget *pParent = 0) const;373 void cannotRemoveHostNetworkInterface(const CHost &comHost, const QString &strInterfaceName, QWidget *pParent = 0) const;374 void cannotRemoveHostNetworkInterface(const CProgress &progress, const QString &strInterfaceName, QWidget *pParent = 0) const;375 void cannotAcquireHostNetworkInterfaceParameter(const CHostNetworkInterface &comInterface, QWidget *pParent = 0) const;376 void cannotSaveHostNetworkInterfaceParameter(const CHostNetworkInterface &comInterface, QWidget *pParent = 0) const;377 void cannotCreateDHCPServer(const CVirtualBox &comVBox, const QString &strInterfaceName, QWidget *pParent = 0) const;378 void cannotRemoveDHCPServer(const CVirtualBox &comVBox, const QString &strInterfaceName, QWidget *pParent = 0) const;379 void cannotAcquireDHCPServerParameter(const CDHCPServer &comServer, QWidget *pParent = 0) const;380 void cannotSaveDHCPServerParameter(const CDHCPServer &comServer, QWidget *pParent = 0) const;381 void warnAboutDHCPServerIsNotEnabled(const QString &strName, QWidget *pParent = 0) const;382 void warnAboutInvalidIPv4Address(const QString &strName, QWidget *pParent = 0) const;383 void warnAboutInvalidIPv4Mask(const QString &strName, QWidget *pParent = 0) const;384 void warnAboutInvalidIPv6Address(const QString &strName, QWidget *pParent = 0) const;385 void warnAboutInvalidIPv6PrefixLength(const QString &strName, QWidget *pParent = 0) const;386 void warnAboutInvalidDHCPServerAddress(const QString &strName, QWidget *pParent = 0) const;387 void warnAboutInvalidDHCPServerMask(const QString &strName, QWidget *pParent = 0) const;388 void warnAboutInvalidDHCPServerLowerAddress(const QString &strName, QWidget *pParent = 0) const;389 void warnAboutInvalidDHCPServerUpperAddress(const QString &strName, QWidget *pParent = 0) const;390 void cannotAcquireNATNetworks(const CVirtualBox &comVBox, QWidget *pParent = 0) const;391 void cannotAcquireNATNetworkParameter(const CNATNetwork &comNetwork, QWidget *pParent = 0) const;392 void cannotCreateNATNetwork(const CVirtualBox &comVBox, QWidget *pParent = 0);393 void cannotSaveNATNetworkParameter(const CNATNetwork &comNetwork, QWidget *pParent = 0) const;394 void cannotFindNATNetwork(const CVirtualBox &comVBox, const QString &strNetworkName, QWidget *pParent = 0) const;395 void cannotRemoveNATNetwork(const CVirtualBox &comVBox, const QString &strNetworkName, QWidget *pParent = 0) const;396 void warnAboutNoNameSpecified(const QString &strName, QWidget *pParent = 0);397 void warnAboutNameAlreadyBusy(const QString &strName, QWidget *pParent = 0);398 void warnAboutNoIPv4PrefixSpecified(const QString &strName, QWidget *pParent = 0);399 void warnAboutNoIPv6PrefixSpecified(const QString &strName, QWidget *pParent = 0);400 void warnAboutInvalidCIDRSpecified(const QString &strCIDR, const QString &strName, QWidget *pParent = 0);401 371 402 372 /* API: Cloud Profile Manager warnings: */ -
trunk/src/VBox/Frontends/VirtualBox/src/networkmanager/UIDetailsWidgetHostNetwork.cpp
r87306 r91142 33 33 #include "UIMessageCenter.h" 34 34 #include "UINetworkManagerUtils.h" 35 #include "UINotificationCenter.h" 35 36 36 37 /* Other VBox includes: */ … … 78 79 && !m_newData.m_dhcpserver.m_fEnabled) 79 80 { 80 msgCenter().warnAboutDHCPServerIsNotEnabled(m_newData.m_interface.m_strName);81 UINotificationMessage::warnAboutDHCPServerIsNotEnabled(m_newData.m_interface.m_strName); 81 82 return false; 82 83 } … … 86 87 || RTNetStrIsIPv4AddrAny(m_newData.m_interface.m_strAddress.toUtf8().constData()))) 87 88 { 88 msgCenter().warnAboutInvalidIPv4Address(m_newData.m_interface.m_strName);89 UINotificationMessage::warnAboutInvalidIPv4Address(m_newData.m_interface.m_strName); 89 90 return false; 90 91 } … … 94 95 || RTNetStrIsIPv4AddrAny(m_newData.m_interface.m_strMask.toUtf8().constData()))) 95 96 { 96 msgCenter().warnAboutInvalidIPv4Mask(m_newData.m_interface.m_strName);97 UINotificationMessage::warnAboutInvalidIPv4Mask(m_newData.m_interface.m_strName); 97 98 return false; 98 99 } … … 103 104 || RTNetStrIsIPv6AddrAny(m_newData.m_interface.m_strAddress6.toUtf8().constData()))) 104 105 { 105 msgCenter().warnAboutInvalidIPv6Address(m_newData.m_interface.m_strName);106 UINotificationMessage::warnAboutInvalidIPv6Address(m_newData.m_interface.m_strName); 106 107 return false; 107 108 } … … 114 115 || iMaskPrefixLength > 128)) 115 116 { 116 msgCenter().warnAboutInvalidIPv6PrefixLength(m_newData.m_interface.m_strName);117 UINotificationMessage::warnAboutInvalidIPv6PrefixLength(m_newData.m_interface.m_strName); 117 118 return false; 118 119 } … … 123 124 || RTNetStrIsIPv4AddrAny(m_newData.m_dhcpserver.m_strAddress.toUtf8().constData()))) 124 125 { 125 msgCenter().warnAboutInvalidDHCPServerAddress(m_newData.m_interface.m_strName);126 UINotificationMessage::warnAboutInvalidDHCPServerAddress(m_newData.m_interface.m_strName); 126 127 return false; 127 128 } … … 130 131 || RTNetStrIsIPv4AddrAny(m_newData.m_dhcpserver.m_strMask.toUtf8().constData()))) 131 132 { 132 msgCenter().warnAboutInvalidDHCPServerMask(m_newData.m_interface.m_strName);133 UINotificationMessage::warnAboutInvalidDHCPServerMask(m_newData.m_interface.m_strName); 133 134 return false; 134 135 } … … 137 138 || RTNetStrIsIPv4AddrAny(m_newData.m_dhcpserver.m_strLowerAddress.toUtf8().constData()))) 138 139 { 139 msgCenter().warnAboutInvalidDHCPServerLowerAddress(m_newData.m_interface.m_strName);140 UINotificationMessage::warnAboutInvalidDHCPServerLowerAddress(m_newData.m_interface.m_strName); 140 141 return false; 141 142 } … … 144 145 || RTNetStrIsIPv4AddrAny(m_newData.m_dhcpserver.m_strUpperAddress.toUtf8().constData()))) 145 146 { 146 msgCenter().warnAboutInvalidDHCPServerUpperAddress(m_newData.m_interface.m_strName);147 UINotificationMessage::warnAboutInvalidDHCPServerUpperAddress(m_newData.m_interface.m_strName); 147 148 return false; 148 149 } -
trunk/src/VBox/Frontends/VirtualBox/src/networkmanager/UIDetailsWidgetNATNetwork.cpp
r88750 r91142 35 35 #include "UIMessageCenter.h" 36 36 #include "UINetworkManagerUtils.h" 37 #include "UINotificationCenter.h" 37 38 38 39 /* Other VBox includes: */ … … 86 87 if (m_newData.m_strName.isEmpty()) 87 88 { 88 msgCenter().warnAboutNoNameSpecified(m_oldData.m_strName);89 UINotificationMessage::warnAboutNoNameSpecified(m_oldData.m_strName); 89 90 return false; 90 91 } … … 94 95 if (m_busyNames.contains(m_newData.m_strName)) 95 96 { 96 msgCenter().warnAboutNameAlreadyBusy(m_newData.m_strName);97 UINotificationMessage::warnAboutNameAlreadyBusy(m_newData.m_strName); 97 98 return false; 98 99 } … … 102 103 if (m_newData.m_strPrefixIPv4.isEmpty()) 103 104 { 104 msgCenter().warnAboutNoIPv4PrefixSpecified(m_newData.m_strName);105 UINotificationMessage::warnAboutNoIPv4PrefixSpecified(m_newData.m_strName); 105 106 return false; 106 107 } … … 108 109 if (m_newData.m_fSupportsIPv6 && m_newData.m_strPrefixIPv6.isEmpty()) 109 110 { 110 msgCenter().warnAboutNoIPv6PrefixSpecified(m_newData.m_strName);111 UINotificationMessage::warnAboutNoIPv6PrefixSpecified(m_newData.m_strName); 111 112 return false; 112 113 } -
trunk/src/VBox/Frontends/VirtualBox/src/networkmanager/UINetworkManager.cpp
r90564 r91142 409 409 /* Show error message if necessary: */ 410 410 if (!comInterface.isOk()) 411 msgCenter().cannotAcquireHostNetworkInterfaceParameter(comInterface);411 UINotificationMessage::cannotAcquireHostNetworkInterfaceParameter(comInterface); 412 412 else 413 413 { … … 422 422 /* Show error message if necessary: */ 423 423 if (!comVBox.isOk() || comServer.isNull()) 424 msgCenter().cannotCreateDHCPServer(comVBox, strNetworkName, this);424 UINotificationMessage::cannotCreateDHCPServer(comVBox, strNetworkName); 425 425 426 426 /* Add interface to the tree: */ … … 462 462 /* Show error message if necessary: */ 463 463 if (!comHost.isOk() || comInterface.isNull()) 464 msgCenter().cannotFindHostNetworkInterface(comHost, strInterfaceName, this);464 UINotificationMessage::cannotFindHostNetworkInterface(comHost, strInterfaceName); 465 465 else 466 466 { … … 476 476 /* Show error message if necessary: */ 477 477 if (!comInterface.isOk()) 478 msgCenter().cannotAcquireHostNetworkInterfaceParameter(comInterface, this);478 UINotificationMessage::cannotAcquireHostNetworkInterfaceParameter(comInterface); 479 479 else 480 480 { … … 491 491 /* Show error message if necessary: */ 492 492 if (!comVBox.isOk()) 493 msgCenter().cannotRemoveDHCPServer(comVBox, strInterfaceName, this);493 UINotificationMessage::cannotRemoveDHCPServer(comVBox, strInterfaceName); 494 494 } 495 495 … … 576 576 /* Show error message if necessary: */ 577 577 if (!comVBox.isOk()) 578 msgCenter().cannotCreateNATNetwork(comVBox, this);578 UINotificationMessage::cannotCreateNATNetwork(comVBox); 579 579 else 580 580 { … … 600 600 /* Show error message if necessary: */ 601 601 if (!comNetwork.isOk()) 602 msgCenter().cannotSaveNATNetworkParameter(comNetwork, this);602 UINotificationMessage::cannotChangeNATNetworkParameter(comNetwork); 603 603 604 604 /* Add network to the tree: */ … … 640 640 /* Show error message if necessary: */ 641 641 if (!comVBox.isOk() || comNetwork.isNull()) 642 msgCenter().cannotFindNATNetwork(comVBox, strNetworkName, this);642 UINotificationMessage::cannotFindNATNetwork(comVBox, strNetworkName); 643 643 else 644 644 { … … 648 648 /* Show error message if necessary: */ 649 649 if (!comVBox.isOk()) 650 msgCenter().cannotRemoveNATNetwork(comVBox, strNetworkName, this);650 UINotificationMessage::cannotRemoveNATNetwork(comVBox, strNetworkName); 651 651 else 652 652 { … … 847 847 /* Show error message if necessary: */ 848 848 if (!comHost.isOk() || comInterface.isNull()) 849 msgCenter().cannotFindHostNetworkInterface(comHost, oldData.m_interface.m_strName, this);849 UINotificationMessage::cannotFindHostNetworkInterface(comHost, oldData.m_interface.m_strName); 850 850 else 851 851 { … … 877 877 /* Show error message if necessary: */ 878 878 if (!comInterface.isOk()) 879 msgCenter().cannotSaveHostNetworkInterfaceParameter(comInterface, this);879 UINotificationMessage::cannotChangeHostNetworkInterfaceParameter(comInterface); 880 880 else 881 881 { … … 885 885 /* Show error message if necessary: */ 886 886 if (!comInterface.isOk()) 887 msgCenter().cannotAcquireHostNetworkInterfaceParameter(comInterface, this);887 UINotificationMessage::cannotAcquireHostNetworkInterfaceParameter(comInterface); 888 888 else 889 889 { … … 898 898 /* Show error message if necessary: */ 899 899 if (!comVBox.isOk() || comServer.isNull()) 900 msgCenter().cannotCreateDHCPServer(comVBox, strNetworkName, this);900 UINotificationMessage::cannotCreateDHCPServer(comVBox, strNetworkName); 901 901 else 902 902 { … … 917 917 /* Show error message if necessary: */ 918 918 if (!comServer.isOk()) 919 msgCenter().cannotSaveDHCPServerParameter(comServer, this);919 UINotificationMessage::cannotChangeDHCPServerParameter(comServer); 920 920 } 921 921 } … … 929 929 /* Show error message if necessary: */ 930 930 if (!comHost.isOk() || comInterface.isNull()) 931 msgCenter().cannotFindHostNetworkInterface(comHost, oldData.m_interface.m_strName, this);931 UINotificationMessage::cannotFindHostNetworkInterface(comHost, oldData.m_interface.m_strName); 932 932 } 933 933 … … 1033 1033 /* Show error message if necessary: */ 1034 1034 if (!comVBox.isOk() || comNetwork.isNull()) 1035 msgCenter().cannotFindNATNetwork(comVBox, oldData.m_strName, this);1035 UINotificationMessage::cannotFindNATNetwork(comVBox, oldData.m_strName); 1036 1036 else 1037 1037 { … … 1102 1102 /* Show error message if necessary: */ 1103 1103 if (!comNetwork.isOk()) 1104 msgCenter().cannotSaveNATNetworkParameter(comNetwork, this);1104 UINotificationMessage::cannotChangeNATNetworkParameter(comNetwork); 1105 1105 1106 1106 /* Update network in the tree: */ … … 1385 1385 /* Show error message if necessary: */ 1386 1386 if (!comHost.isOk()) 1387 msgCenter().cannotAcquireHostNetworkInterfaces(comHost, this);1387 UINotificationMessage::cannotAcquireHostParameter(comHost); 1388 1388 else 1389 1389 { … … 1433 1433 /* Show error message if necessary: */ 1434 1434 if (!comInterface.isOk()) 1435 msgCenter().cannotAcquireHostNetworkInterfaceParameter(comInterface, this);1435 UINotificationMessage::cannotAcquireHostNetworkInterfaceParameter(comInterface); 1436 1436 1437 1437 /* Get VBox for further activities: */ … … 1445 1445 /* Show error message if necessary: */ 1446 1446 if (!comVBox.isOk() || comServer.isNull()) 1447 msgCenter().cannotCreateDHCPServer(comVBox, strNetworkName, this);1447 UINotificationMessage::cannotCreateDHCPServer(comVBox, strNetworkName); 1448 1448 else 1449 1449 { … … 1462 1462 /* Show error message if necessary: */ 1463 1463 if (!comServer.isOk()) 1464 return msgCenter().cannotAcquireDHCPServerParameter(comServer, this);1464 return UINotificationMessage::cannotAcquireDHCPServerParameter(comServer); 1465 1465 } 1466 1466 } … … 1483 1483 /* Show error message if necessary: */ 1484 1484 if (!comVBox.isOk()) 1485 msgCenter().cannotAcquireNATNetworks(comVBox, this);1485 UINotificationMessage::cannotAcquireVirtualBoxParameter(comVBox); 1486 1486 else 1487 1487 { … … 1573 1573 /* Show error message if necessary: */ 1574 1574 if (!comNetwork.isOk()) 1575 msgCenter().cannotAcquireNATNetworkParameter(comNetwork, this);1575 UINotificationMessage::cannotAcquireNATNetworkParameter(comNetwork); 1576 1576 } 1577 1577 -
trunk/src/VBox/Frontends/VirtualBox/src/notificationcenter/UINotificationObjects.cpp
r91132 r91142 37 37 #include "CAudioAdapter.h" 38 38 #include "CConsole.h" 39 #include "CDHCPServer.h" 39 40 #include "CGraphicsAdapter.h" 41 #include "CHostNetworkInterface.h" 40 42 #include "CEmulatedUSB.h" 41 43 #include "CMediumAttachment.h" 44 #include "CNATNetwork.h" 42 45 #include "CNetworkAdapter.h" 43 46 #include "CVRDEServer.h" … … 159 162 QApplication::translate("UIMessageCenter", "Failed to open the public key file <nobr><b>%1</b></nobr>. Check file " 160 163 "permissions.").arg(strPath)); 164 } 165 166 /* static */ 167 void UINotificationMessage::warnAboutDHCPServerIsNotEnabled(const QString &strName) 168 { 169 createMessage( 170 QApplication::translate("UIMessageCenter", "DHCP server isn't enabled ..."), 171 QApplication::translate("UIMessageCenter", "Host interface <nobr><b>%1</b></nobr> is set to obtain the address " 172 "automatically but the corresponding DHCP server is not enabled.") 173 .arg(strName)); 174 } 175 176 /* static */ 177 void UINotificationMessage::warnAboutInvalidIPv4Address(const QString &strName) 178 { 179 createMessage( 180 QApplication::translate("UIMessageCenter", "Invalid IPv4 address ..."), 181 QApplication::translate("UIMessageCenter", "Host interface <nobr><b>%1</b></nobr> does not " 182 "currently have a valid IPv4 address.") 183 .arg(strName)); 184 } 185 186 /* static */ 187 void UINotificationMessage::warnAboutInvalidIPv4Mask(const QString &strName) 188 { 189 createMessage( 190 QApplication::translate("UIMessageCenter", "Invalid IPv4 mask ..."), 191 QApplication::translate("UIMessageCenter", "Host interface <nobr><b>%1</b></nobr> does not " 192 "currently have a valid IPv4 network mask.") 193 .arg(strName)); 194 } 195 196 /* static */ 197 void UINotificationMessage::warnAboutInvalidIPv6Address(const QString &strName) 198 { 199 createMessage( 200 QApplication::translate("UIMessageCenter", "Invalid IPv6 address ..."), 201 QApplication::translate("UIMessageCenter", "Host interface <nobr><b>%1</b></nobr> does not " 202 "currently have a valid IPv6 address.") 203 .arg(strName)); 204 } 205 206 /* static */ 207 void UINotificationMessage::warnAboutInvalidIPv6PrefixLength(const QString &strName) 208 { 209 createMessage( 210 QApplication::translate("UIMessageCenter", "Invalid IPv6 prefix length ..."), 211 QApplication::translate("UIMessageCenter", "Host interface <nobr><b>%1</b></nobr> does not " 212 "currently have a valid IPv6 prefix length.") 213 .arg(strName)); 214 } 215 216 /* static */ 217 void UINotificationMessage::warnAboutInvalidDHCPServerAddress(const QString &strName) 218 { 219 createMessage( 220 QApplication::translate("UIMessageCenter", "Invalid DHCP server address ..."), 221 QApplication::translate("UIMessageCenter", "Host interface <nobr><b>%1</b></nobr> does not " 222 "currently have a valid DHCP server address.") 223 .arg(strName)); 224 } 225 226 /* static */ 227 void UINotificationMessage::warnAboutInvalidDHCPServerMask(const QString &strName) 228 { 229 createMessage( 230 QApplication::translate("UIMessageCenter", "Invalid DHCP server mask ..."), 231 QApplication::translate("UIMessageCenter", "Host interface <nobr><b>%1</b></nobr> does not " 232 "currently have a valid DHCP server mask.") 233 .arg(strName)); 234 } 235 236 /* static */ 237 void UINotificationMessage::warnAboutInvalidDHCPServerLowerAddress(const QString &strName) 238 { 239 createMessage( 240 QApplication::translate("UIMessageCenter", "Invalid DHCP lower address ..."), 241 QApplication::translate("UIMessageCenter", "Host interface <nobr><b>%1</b></nobr> does not " 242 "currently have a valid DHCP server lower address bound.") 243 .arg(strName)); 244 } 245 246 /* static */ 247 void UINotificationMessage::warnAboutInvalidDHCPServerUpperAddress(const QString &strName) 248 { 249 createMessage( 250 QApplication::translate("UIMessageCenter", "Invalid DHCP upper address ..."), 251 QApplication::translate("UIMessageCenter", "Host interface <nobr><b>%1</b></nobr> does not " 252 "currently have a valid DHCP server upper address bound.") 253 .arg(strName)); 254 } 255 256 /* static */ 257 void UINotificationMessage::warnAboutNoNameSpecified(const QString &strName) 258 { 259 createMessage( 260 QApplication::translate("UIMessageCenter", "No name specified ..."), 261 QApplication::translate("UIMessageCenter", "No new name specified for the NAT network previously called <b>%1</b>.") 262 .arg(strName)); 263 } 264 265 /* static */ 266 void UINotificationMessage::warnAboutNameAlreadyBusy(const QString &strName) 267 { 268 createMessage( 269 QApplication::translate("UIMessageCenter", "Name already busy ..."), 270 QApplication::translate("UIMessageCenter", "The name <b>%1</b> is being used for several NAT networks.") 271 .arg(strName)); 272 } 273 274 /* static */ 275 void UINotificationMessage::warnAboutNoIPv4PrefixSpecified(const QString &strName) 276 { 277 createMessage( 278 QApplication::translate("UIMessageCenter", "No IPv4 prefix specified ..."), 279 QApplication::translate("UIMessageCenter", "No IPv4 prefix specified for the NAT network <b>%1</b>.") 280 .arg(strName)); 281 } 282 283 /* static */ 284 void UINotificationMessage::warnAboutNoIPv6PrefixSpecified(const QString &strName) 285 { 286 createMessage( 287 QApplication::translate("UIMessageCenter", "No IPv6 prefix specified ..."), 288 QApplication::translate("UIMessageCenter", "No IPv6 prefix specified for the NAT network <b>%1</b>.") 289 .arg(strName)); 161 290 } 162 291 … … 301 430 302 431 /* static */ 432 void UINotificationMessage::cannotAcquireHostParameter(const CHost &comHost) 433 { 434 createMessage( 435 QApplication::translate("UIMessageCenter", "Host failure ..."), 436 QApplication::translate("UIMessageCenter", "Failed to acquire host parameter.") + 437 UIErrorString::formatErrorInfo(comHost)); 438 } 439 440 /* static */ 303 441 void UINotificationMessage::cannotAcquireMediumParameter(const CMedium &comMedium) 304 442 { … … 346 484 347 485 /* static */ 486 void UINotificationMessage::cannotAcquireDHCPServerParameter(const CDHCPServer &comServer) 487 { 488 createMessage( 489 QApplication::translate("UIMessageCenter", "DHCP server failure ..."), 490 QApplication::translate("UIMessageCenter", "Failed to acquire DHCP server parameter.") + 491 UIErrorString::formatErrorInfo(comServer)); 492 } 493 494 /* static */ 495 void UINotificationMessage::cannotAcquireHostNetworkInterfaceParameter(const CHostNetworkInterface &comInterface) 496 { 497 createMessage( 498 QApplication::translate("UIMessageCenter", "Host network interface failure ..."), 499 QApplication::translate("UIMessageCenter", "Failed to acquire host network interface parameter.") + 500 UIErrorString::formatErrorInfo(comInterface)); 501 } 502 503 /* static */ 504 void UINotificationMessage::cannotAcquireNATNetworkParameter(const CNATNetwork &comNetwork) 505 { 506 createMessage( 507 QApplication::translate("UIMessageCenter", "NAT network failure ..."), 508 QApplication::translate("UIMessageCenter", "Failed to acquire NAT network parameter.") + 509 UIErrorString::formatErrorInfo(comNetwork)); 510 } 511 512 /* static */ 348 513 void UINotificationMessage::cannotChangeMediumParameter(const CMedium &comMedium) 349 514 { 350 515 createMessage( 351 516 QApplication::translate("UIMessageCenter", "Medium failure ..."), 352 QApplication::translate("UIMessageCenter", "Failed to change the attributeof the medium <b>%1</b>.")517 QApplication::translate("UIMessageCenter", "Failed to change the parameter of the medium <b>%1</b>.") 353 518 .arg(CMedium(comMedium).GetLocation()) + 354 519 UIErrorString::formatErrorInfo(comMedium)); … … 360 525 createMessage( 361 526 QApplication::translate("UIMessageCenter", "Machine failure ..."), 362 QApplication::translate("UIMessageCenter", "Failed to change the attributeof the virtual machine <b>%1</b>.")527 QApplication::translate("UIMessageCenter", "Failed to change the parameter of the virtual machine <b>%1</b>.") 363 528 .arg(CMachine(comMachine).GetName()) + 364 529 UIErrorString::formatErrorInfo(comMachine)); … … 370 535 createMessage( 371 536 QApplication::translate("UIMessageCenter", "Graphics adapter failure ..."), 372 QApplication::translate("UIMessageCenter", "Failed to change graphics adapter attribute.") +537 QApplication::translate("UIMessageCenter", "Failed to change graphics adapter parameter.") + 373 538 UIErrorString::formatErrorInfo(comAdapter)); 374 539 } … … 379 544 createMessage( 380 545 QApplication::translate("UIMessageCenter", "Audio adapter failure ..."), 381 QApplication::translate("UIMessageCenter", "Failed to change audio adapter attribute.") +546 QApplication::translate("UIMessageCenter", "Failed to change audio adapter parameter.") + 382 547 UIErrorString::formatErrorInfo(comAdapter)); 383 548 } … … 388 553 createMessage( 389 554 QApplication::translate("UIMessageCenter", "Network adapter failure ..."), 390 QApplication::translate("UIMessageCenter", "Failed to change network adapter attribute.") +555 QApplication::translate("UIMessageCenter", "Failed to change network adapter parameter.") + 391 556 UIErrorString::formatErrorInfo(comAdapter)); 557 } 558 559 /* static */ 560 void UINotificationMessage::cannotChangeDHCPServerParameter(const CDHCPServer &comServer) 561 { 562 createMessage( 563 QApplication::translate("UIMessageCenter", "DHCP server failure ..."), 564 QApplication::translate("UIMessageCenter", "Failed to change DHCP server parameter.") + 565 UIErrorString::formatErrorInfo(comServer)); 566 } 567 568 /* static */ 569 void UINotificationMessage::cannotChangeHostNetworkInterfaceParameter(const CHostNetworkInterface &comInterface) 570 { 571 createMessage( 572 QApplication::translate("UIMessageCenter", "Host network interface failure ..."), 573 QApplication::translate("UIMessageCenter", "Failed to change host network interface parameter.") + 574 UIErrorString::formatErrorInfo(comInterface)); 575 } 576 577 /* static */ 578 void UINotificationMessage::cannotChangeNATNetworkParameter(const CNATNetwork &comNetwork) 579 { 580 createMessage( 581 QApplication::translate("UIMessageCenter", "NAT network failure ..."), 582 QApplication::translate("UIMessageCenter", "Failed to change NAT network parameter.") + 583 UIErrorString::formatErrorInfo(comNetwork)); 392 584 } 393 585 … … 475 667 476 668 /* static */ 669 void UINotificationMessage::cannotCreateDHCPServer(const CVirtualBox &comVBox, const QString &strInterfaceName) 670 { 671 createMessage( 672 QApplication::translate("UIMessageCenter", "Can't create DHCP server ..."), 673 QApplication::translate("UIMessageCenter", "Failed to create a DHCP server for the network interface <b>%1</b>.") 674 .arg(strInterfaceName) + 675 UIErrorString::formatErrorInfo(comVBox)); 676 } 677 678 /* static */ 679 void UINotificationMessage::cannotRemoveDHCPServer(const CVirtualBox &comVBox, const QString &strInterfaceName) 680 { 681 createMessage( 682 QApplication::translate("UIMessageCenter", "Can't remove DHCP server ..."), 683 QApplication::translate("UIMessageCenter", "Failed to remove the DHCP server for the network interface <b>%1</b>.") 684 .arg(strInterfaceName) + 685 UIErrorString::formatErrorInfo(comVBox)); 686 } 687 688 /* static */ 689 void UINotificationMessage::cannotCreateNATNetwork(const CVirtualBox &comVBox) 690 { 691 createMessage( 692 QApplication::translate("UIMessageCenter", "Can't create NAT network ..."), 693 QApplication::translate("UIMessageCenter", "Failed to create a NAT network.") + 694 UIErrorString::formatErrorInfo(comVBox)); 695 } 696 697 /* static */ 698 void UINotificationMessage::cannotRemoveNATNetwork(const CVirtualBox &comVBox, const QString &strNetworkName) 699 { 700 createMessage( 701 QApplication::translate("UIMessageCenter", "Can't remove NAT network ..."), 702 QApplication::translate("UIMessageCenter", "Failed to remove the NAT network <b>%1</b>.") 703 .arg(strNetworkName) + 704 UIErrorString::formatErrorInfo(comVBox)); 705 } 706 707 /* static */ 477 708 void UINotificationMessage::cannotCloseMedium(const CMedium &comMedium) 478 709 { … … 525 756 .arg(strSnapshotName, strMachineName) + 526 757 UIErrorString::formatErrorInfo(comSnapshot)); 758 } 759 760 /* static */ 761 void UINotificationMessage::cannotFindHostNetworkInterface(const CHost &comHost, const QString &strInterfaceName) 762 { 763 createMessage( 764 QApplication::translate("UIMessageCenter", "Can't find host network interface ..."), 765 QApplication::translate("UIMessageCenter", "Unable to find the host network interface <b>%1</b>.") 766 .arg(strInterfaceName) + 767 UIErrorString::formatErrorInfo(comHost)); 768 } 769 770 /* static */ 771 void UINotificationMessage::cannotFindNATNetwork(const CVirtualBox &comVBox, const QString &strNetworkName) 772 { 773 createMessage( 774 QApplication::translate("UIMessageCenter", "Can't find NAT network ..."), 775 QApplication::translate("UIMessageCenter", "Unable to find the NAT network <b>%1</b>.") 776 .arg(strNetworkName) + 777 UIErrorString::formatErrorInfo(comVBox)); 527 778 } 528 779 -
trunk/src/VBox/Frontends/VirtualBox/src/notificationcenter/UINotificationObjects.h
r91132 r91142 90 90 static void cannotResolveCollisionAutomatically(const QString &strCollisionName, const QString &strGroupName); 91 91 92 /** Notifies about inability to remove machine. 93 * @param comMachine Brings machine being removed. */ 92 /** Notifies about public key path is empty. */ 94 93 static void warnAboutPublicKeyFilePathIsEmpty(); 95 /** Notifies about inability to remove machine.96 * @param comMachine Brings machine being removed. */94 /** Notifies about public key file doesn't exist. 95 * @param strPath Brings the path being checked. */ 97 96 static void warnAboutPublicKeyFileDoesntExist(const QString &strPath); 98 /** Notifies about inability to remove machine.99 * @param comMachine Brings machine being removed. */97 /** Notifies about public key file is of too large size. 98 * @param strPath Brings the path being checked. */ 100 99 static void warnAboutPublicKeyFileIsOfTooLargeSize(const QString &strPath); 101 /** Notifies about inability to remove machine.102 * @param comMachine Brings machine being removed. */100 /** Notifies about public key file isn't readable. 101 * @param strPath Brings the path being checked. */ 103 102 static void warnAboutPublicKeyFileIsntReadable(const QString &strPath); 103 104 /** Notifies about DHCP server isn't enabled. 105 * @param strName Brings the interface name. */ 106 static void warnAboutDHCPServerIsNotEnabled(const QString &strName); 107 /** Notifies about invalid IPv4 address. 108 * @param strName Brings the interface name. */ 109 static void warnAboutInvalidIPv4Address(const QString &strName); 110 /** Notifies about invalid IPv4 mask. 111 * @param strName Brings the interface name. */ 112 static void warnAboutInvalidIPv4Mask(const QString &strName); 113 /** Notifies about invalid IPv6 address. 114 * @param strName Brings the interface name. */ 115 static void warnAboutInvalidIPv6Address(const QString &strName); 116 /** Notifies about invalid IPv6 prefix length. 117 * @param strName Brings the interface name. */ 118 static void warnAboutInvalidIPv6PrefixLength(const QString &strName); 119 /** Notifies about invalid DHCP server address. 120 * @param strName Brings the interface name. */ 121 static void warnAboutInvalidDHCPServerAddress(const QString &strName); 122 /** Notifies about invalid DHCP server mask. 123 * @param strName Brings the interface name. */ 124 static void warnAboutInvalidDHCPServerMask(const QString &strName); 125 /** Notifies about invalid DHCP server lower address. 126 * @param strName Brings the interface name. */ 127 static void warnAboutInvalidDHCPServerLowerAddress(const QString &strName); 128 /** Notifies about invalid DHCP server upper address. 129 * @param strName Brings the interface name. */ 130 static void warnAboutInvalidDHCPServerUpperAddress(const QString &strName); 131 /** Notifies about no name specified. 132 * @param strName Brings the interface name. */ 133 static void warnAboutNoNameSpecified(const QString &strName); 134 /** Notifies about name already busy. 135 * @param strName Brings the interface name. */ 136 static void warnAboutNameAlreadyBusy(const QString &strName); 137 /** Notifies about no IPv4 prefix specified. 138 * @param strName Brings the interface name. */ 139 static void warnAboutNoIPv4PrefixSpecified(const QString &strName); 140 /** Notifies about no IPv6 prefix specified. 141 * @param strName Brings the interface name. */ 142 static void warnAboutNoIPv6PrefixSpecified(const QString &strName); 104 143 /** @} */ 105 144 … … 142 181 * @param comVBox Brings the object parameter get acquired from. */ 143 182 static void cannotAcquireVirtualBoxParameter(const CVirtualBox &comVBox); 183 /** Notifies about inability to acquire IHost parameter. 184 * @param comHost Brings the object parameter get acquired from. */ 185 static void cannotAcquireHostParameter(const CHost &comHost); 144 186 /** Notifies about inability to acquire IMedium parameter. 145 187 * @param comMedium Brings the object parameter get acquired from. */ … … 157 199 * @param comAttachment Brings the object parameter get acquired from. */ 158 200 static void cannotAcquireAttachmentParameter(const CMediumAttachment &comAttachment); 201 /** Notifies about inability to acquire IDHCPServer parameter. 202 * @param comServer Brings the object parameter get acquired from. */ 203 static void cannotAcquireDHCPServerParameter(const CDHCPServer &comServer); 204 /** Notifies about inability to acquire IHostNetworkInterface parameter. 205 * @param comInterface Brings the object parameter get acquired from. */ 206 static void cannotAcquireHostNetworkInterfaceParameter(const CHostNetworkInterface &comInterface); 207 /** Notifies about inability to acquire INATNetwork parameter. 208 * @param comNetwork Brings the object parameter get acquired from. */ 209 static void cannotAcquireNATNetworkParameter(const CNATNetwork &comNetwork); 159 210 160 211 /** Notifies about inability to change IMedium parameter. … … 173 224 * @param comAdapter Brings the object parameter being changed for. */ 174 225 static void cannotChangeNetworkAdapterParameter(const CNetworkAdapter &comAdapter); 226 /** Notifies about inability to change IDHCPServer parameter. 227 * @param comServer Brings the object parameter being changed for. */ 228 static void cannotChangeDHCPServerParameter(const CDHCPServer &comServer); 229 /** Notifies about inability to change IHostNetworkInterface parameter. 230 * @param comInterface Brings the object parameter being changed for. */ 231 static void cannotChangeHostNetworkInterfaceParameter(const CHostNetworkInterface &comInterface); 232 /** Notifies about inability to change INATNetwork parameter. 233 * @param comNetwork Brings the object parameter being changed for. */ 234 static void cannotChangeNATNetworkParameter(const CNATNetwork &comNetwork); 175 235 176 236 /** Notifies about inability to enumerate host USB devices. … … 203 263 * @param strLocation Brings the machine location. */ 204 264 static void cannotOpenMachine(const CVirtualBox &comVBox, const QString &strLocation); 265 /** Notifies about inability to create DHCP server. 266 * @param comVBox Brings common VBox object trying to create DHCP server. 267 * @param strInterfaceName Brings the interface name. */ 268 static void cannotCreateDHCPServer(const CVirtualBox &comVBox, const QString &strInterfaceName); 269 /** Notifies about inability to remove DHCP server. 270 * @param comVBox Brings common VBox object trying to remove DHCP server. 271 * @param strInterfaceName Brings the interface name. */ 272 static void cannotRemoveDHCPServer(const CVirtualBox &comVBox, const QString &strInterfaceName); 273 /** Notifies about inability to create NAT network. 274 * @param comVBox Brings common VBox object trying to create NAT network. */ 275 static void cannotCreateNATNetwork(const CVirtualBox &comVBox); 276 /** Notifies about inability to remove NAT network. 277 * @param comVBox Brings common VBox object trying to remove DHCP server. 278 * @param strNetworkName Brings the network name. */ 279 static void cannotRemoveNATNetwork(const CVirtualBox &comVBox, const QString &strNetworkName); 205 280 206 281 /** Notifies about inability to open machine. … … 224 299 * @param strMachineName Brings machine name. */ 225 300 static void cannotChangeSnapshot(const CSnapshot &comSnapshot, const QString &strSnapshotName, const QString &strMachineName); 301 302 /** Notifies about inability to find host network interface. 303 * @param comHost Brings the host being search through. 304 * @param strInterfaceName Brings interface name. */ 305 static void cannotFindHostNetworkInterface(const CHost &comHost, const QString &strInterfaceName); 306 /** Notifies about inability to find NAT network. 307 * @param comVBox Brings common VBox object being search through. 308 * @param strNetworkName Brings network name. */ 309 static void cannotFindNATNetwork(const CVirtualBox &comVBox, const QString &strNetworkName); 226 310 /** @} */ 227 311
Note:
See TracChangeset
for help on using the changeset viewer.