Changeset 91437 in vbox for trunk/src/VBox
- Timestamp:
- Sep 28, 2021 4:55:54 PM (3 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/converter/UIConverterBackendCOM.cpp
r91416 r91437 378 378 switch (type) 379 379 { 380 case KNetworkAttachmentType_Null: return QApplication::translate("UICommon", "Not attached", "NetworkAttachmentType");381 case KNetworkAttachmentType_NAT: return QApplication::translate("UICommon", "NAT", "NetworkAttachmentType");382 case KNetworkAttachmentType_Bridged: return QApplication::translate("UICommon", "Bridged Adapter", "NetworkAttachmentType");383 case KNetworkAttachmentType_Internal: return QApplication::translate("UICommon", "Internal Network", "NetworkAttachmentType");380 case KNetworkAttachmentType_Null: return QApplication::translate("UICommon", "Not attached", "NetworkAttachmentType"); 381 case KNetworkAttachmentType_NAT: return QApplication::translate("UICommon", "NAT", "NetworkAttachmentType"); 382 case KNetworkAttachmentType_Bridged: return QApplication::translate("UICommon", "Bridged Adapter", "NetworkAttachmentType"); 383 case KNetworkAttachmentType_Internal: return QApplication::translate("UICommon", "Internal Network", "NetworkAttachmentType"); 384 384 #ifndef VBOX_WITH_VMNET 385 case KNetworkAttachmentType_HostOnly: return QApplication::translate("UICommon", "Host-only Adapter", "NetworkAttachmentType");385 case KNetworkAttachmentType_HostOnly: return QApplication::translate("UICommon", "Host-only Adapter", "NetworkAttachmentType"); 386 386 #else /* VBOX_WITH_VMNET */ 387 case KNetworkAttachmentType_HostOnly: return QApplication::translate("UICommon", "Host-only Adapter [DEPRECATED]", "NetworkAttachmentType");387 case KNetworkAttachmentType_HostOnly: return QApplication::translate("UICommon", "Host-only Adapter [DEPRECATED]", "NetworkAttachmentType"); 388 388 case KNetworkAttachmentType_HostOnlyNetwork: return QApplication::translate("UICommon", "Host-only Network", "NetworkAttachmentType"); 389 389 #endif /* VBOX_WITH_VMNET */ 390 case KNetworkAttachmentType_Generic: return QApplication::translate("UICommon", "Generic Driver", "NetworkAttachmentType");391 case KNetworkAttachmentType_NATNetwork: return QApplication::translate("UICommon", "NAT Network", "NetworkAttachmentType");390 case KNetworkAttachmentType_Generic: return QApplication::translate("UICommon", "Generic Driver", "NetworkAttachmentType"); 391 case KNetworkAttachmentType_NATNetwork: return QApplication::translate("UICommon", "NAT Network", "NetworkAttachmentType"); 392 392 #ifdef VBOX_WITH_CLOUD_NET 393 case KNetworkAttachmentType_Cloud: return QApplication::translate("UICommon", "Cloud Network [EXPERIMENTAL]", "NetworkAttachmentType");393 case KNetworkAttachmentType_Cloud: return QApplication::translate("UICommon", "Cloud Network [EXPERIMENTAL]", "NetworkAttachmentType"); 394 394 #endif /* VBOX_WITH_CLOUD_NET */ 395 395 default: AssertMsgFailed(("No text for %d", type)); break; -
trunk/src/VBox/Frontends/VirtualBox/src/converter/UIConverterBackendGlobal.cpp
r91416 r91437 1197 1197 case UIExtraDataMetaDefs::DetailsElementOptionTypeNetwork_InternalNetwork: strResult = QApplication::translate("UICommon", "Internal Network"); break; 1198 1198 case UIExtraDataMetaDefs::DetailsElementOptionTypeNetwork_HostOnlyAdapter: strResult = QApplication::translate("UICommon", "Host Only Adapter"); break; 1199 #ifdef VBOX_WITH_VMNET1200 case UIExtraDataMetaDefs::DetailsElementOptionTypeNetwork_HostOnlyNetwork: strResult = QApplication::translate("UICommon", "Host Only Network"); break;1201 #endif /* VBOX_WITH_VMNET */1202 1199 case UIExtraDataMetaDefs::DetailsElementOptionTypeNetwork_GenericDriver: strResult = QApplication::translate("UICommon", "Generic Driver"); break; 1203 1200 case UIExtraDataMetaDefs::DetailsElementOptionTypeNetwork_NATNetwork: strResult = QApplication::translate("UICommon", "NAT Network"); break; 1204 1201 #ifdef VBOX_WITH_CLOUD_NET 1205 1202 case UIExtraDataMetaDefs::DetailsElementOptionTypeNetwork_CloudNetwork: strResult = QApplication::translate("UICommon", "Cloud Network"); break; 1206 #endif /* VBOX_WITH_CLOUD_NET */ 1203 #endif 1204 #ifdef VBOX_WITH_VMNET 1205 case UIExtraDataMetaDefs::DetailsElementOptionTypeNetwork_HostOnlyNetwork: strResult = QApplication::translate("UICommon", "Host Only Network"); break; 1206 #endif 1207 1207 default: 1208 1208 { … … 1225 1225 case UIExtraDataMetaDefs::DetailsElementOptionTypeNetwork_InternalNetwork: strResult = "InternalNetwork"; break; 1226 1226 case UIExtraDataMetaDefs::DetailsElementOptionTypeNetwork_HostOnlyAdapter: strResult = "HostOnlyAdapter"; break; 1227 #ifdef VBOX_WITH_VMNET1228 case UIExtraDataMetaDefs::DetailsElementOptionTypeNetwork_HostOnlyNetwork: strResult = "HostOnlyNetwork"; break;1229 #endif /* VBOX_WITH_VMNET */1230 1227 case UIExtraDataMetaDefs::DetailsElementOptionTypeNetwork_GenericDriver: strResult = "GenericDriver"; break; 1231 1228 case UIExtraDataMetaDefs::DetailsElementOptionTypeNetwork_NATNetwork: strResult = "NATNetwork"; break; 1232 1229 #ifdef VBOX_WITH_CLOUD_NET 1233 1230 case UIExtraDataMetaDefs::DetailsElementOptionTypeNetwork_CloudNetwork: strResult = "CloudNetwork"; break; 1234 #endif /* VBOX_WITH_CLOUD_NET */ 1231 #endif 1232 #ifdef VBOX_WITH_VMNET 1233 case UIExtraDataMetaDefs::DetailsElementOptionTypeNetwork_HostOnlyNetwork: strResult = "HostOnlyNetwork"; break; 1234 #endif 1235 1235 default: 1236 1236 { … … 1253 1253 keys << "InternalNetwork"; values << UIExtraDataMetaDefs::DetailsElementOptionTypeNetwork_InternalNetwork; 1254 1254 keys << "HostOnlyAdapter"; values << UIExtraDataMetaDefs::DetailsElementOptionTypeNetwork_HostOnlyAdapter; 1255 #ifdef VBOX_WITH_VMNET1256 keys << "HostOnlyNetwork"; values << UIExtraDataMetaDefs::DetailsElementOptionTypeNetwork_HostOnlyNetwork;1257 #endif /* VBOX_WITH_VMNET */1258 1255 keys << "GenericDriver"; values << UIExtraDataMetaDefs::DetailsElementOptionTypeNetwork_GenericDriver; 1259 1256 keys << "NATNetwork"; values << UIExtraDataMetaDefs::DetailsElementOptionTypeNetwork_NATNetwork; 1260 1257 #ifdef VBOX_WITH_CLOUD_NET 1261 1258 keys << "CloudNetwork"; values << UIExtraDataMetaDefs::DetailsElementOptionTypeNetwork_CloudNetwork; 1262 #endif /* VBOX_WITH_CLOUD_NET */ 1259 #endif 1260 #ifdef VBOX_WITH_VMNET 1261 keys << "HostOnlyNetwork"; values << UIExtraDataMetaDefs::DetailsElementOptionTypeNetwork_HostOnlyNetwork; 1262 #endif 1263 1263 /* Invalid type for unknown words: */ 1264 1264 if (!keys.contains(strDetailsElementOptionTypeNetwork, Qt::CaseInsensitive)) -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMachineAttributeSetter.cpp
r91416 r91437 238 238 case KNetworkAttachmentType_Internal: comAdapter.SetInternalNetwork(nad.m_strName); break; 239 239 case KNetworkAttachmentType_HostOnly: comAdapter.SetHostOnlyInterface(nad.m_strName); break; 240 #ifdef VBOX_WITH_VMNET241 case KNetworkAttachmentType_HostOnlyNetwork: comAdapter.SetHostOnlyNetwork(nad.m_strName); break;242 #endif /* VBOX_WITH_VMNET */243 240 case KNetworkAttachmentType_Generic: comAdapter.SetGenericDriver(nad.m_strName); break; 244 241 case KNetworkAttachmentType_NATNetwork: comAdapter.SetNATNetwork(nad.m_strName); break; 245 242 #ifdef VBOX_WITH_CLOUD_NET 246 243 case KNetworkAttachmentType_Cloud: comAdapter.SetCloudNetwork(nad.m_strName); break; 247 #endif /* VBOX_WITH_CLOUD_NET */ 244 #endif 245 #ifdef VBOX_WITH_VMNET 246 case KNetworkAttachmentType_HostOnlyNetwork: comAdapter.SetHostOnlyNetwork(nad.m_strName); break; 247 #endif 248 248 default: break; 249 249 } -
trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UINetworkAttachmentEditor.cpp
r91416 r91437 29 29 30 30 /* COM includes: */ 31 #ifdef VBOX_WITH_CLOUD_NET32 # include "CCloudNetwork.h"33 #endif34 #ifdef VBOX_WITH_VMNET35 # include "CHostOnlyNetwork.h"36 #endif37 31 #include "CHostNetworkInterface.h" 38 32 #include "CNATNetwork.h" 39 33 #include "CSystemProperties.h" 34 #ifdef VBOX_WITH_CLOUD_NET 35 # include "CCloudNetwork.h" 36 #endif 37 #ifdef VBOX_WITH_VMNET 38 # include "CHostOnlyNetwork.h" 39 #endif 40 40 41 41 … … 166 166 } 167 167 168 #ifdef VBOX_WITH_CLOUD_NET 169 /* static */ 170 QStringList UINetworkAttachmentEditor::cloudNetworks() 171 { 172 QStringList cloudNetworkList; 173 foreach (const CCloudNetwork &comNetwork, uiCommon().virtualBox().GetCloudNetworks()) 174 cloudNetworkList << comNetwork.GetNetworkName(); 175 return cloudNetworkList; 176 } 177 #endif /* VBOX_WITH_CLOUD_NET */ 178 168 179 #ifdef VBOX_WITH_VMNET 169 180 /* static */ … … 176 187 } 177 188 #endif /* VBOX_WITH_VMNET */ 178 179 #ifdef VBOX_WITH_CLOUD_NET180 /* static */181 QStringList UINetworkAttachmentEditor::cloudNetworks()182 {183 QStringList cloudNetworkList;184 foreach (const CCloudNetwork &comNetwork, uiCommon().virtualBox().GetCloudNetworks())185 cloudNetworkList << comNetwork.GetNetworkName();186 return cloudNetworkList;187 }188 #endif /* VBOX_WITH_CLOUD_NET */189 189 190 190 void UINetworkAttachmentEditor::retranslateUi() … … 410 410 case KNetworkAttachmentType_Bridged: 411 411 case KNetworkAttachmentType_HostOnly: 412 #ifdef VBOX_WITH_VMNET413 case KNetworkAttachmentType_HostOnlyNetwork:414 #endif /* VBOX_WITH_VMNET */415 412 case KNetworkAttachmentType_NATNetwork: 416 413 #ifdef VBOX_WITH_CLOUD_NET 417 414 case KNetworkAttachmentType_Cloud: 418 #endif /* VBOX_WITH_CLOUD_NET */ 415 #endif 416 #ifdef VBOX_WITH_VMNET 417 case KNetworkAttachmentType_HostOnlyNetwork: 418 #endif 419 419 { 420 420 /* If adapter list is empty => add 'Not selected' item: */ … … 471 471 "settings in the virtual machine manager window.")); 472 472 break; 473 case KNetworkAttachmentType_Generic: 474 m_pComboName->setWhatsThis(tr("Selects the driver to be used with this network card.")); 475 break; 476 case KNetworkAttachmentType_NATNetwork: 477 m_pComboName->setWhatsThis(tr("Holds the name of the NAT network that this network card " 478 "will be connected to. You can create and remove networks " 479 "using the Network Manager tool in the virtual machine " 480 "manager window.")); 481 break; 482 #ifdef VBOX_WITH_CLOUD_NET 483 case KNetworkAttachmentType_Cloud: 484 m_pComboName->setWhatsThis(tr("(experimental) Holds the name of the cloud network that this network card " 485 "will be connected to. You can add and remove networks " 486 "using the Cloud Profile Manager tool in the virtual machine " 487 "manager window.")); 488 break; 489 #endif /* VBOX_WITH_CLOUD_NET */ 473 490 #ifdef VBOX_WITH_VMNET 474 491 case KNetworkAttachmentType_HostOnlyNetwork: 475 492 m_pComboName->setWhatsThis(tr("Holds the name of the host-only network that this network card " 476 "will be connected to. You can add and remove host-onlynetworks "477 "using the global network settingsin the virtual machine "493 "will be connected to. You can add and remove networks " 494 "using the Network Manager tool in the virtual machine " 478 495 "manager window.")); 479 496 break; 480 497 #endif /* VBOX_WITH_VMNET */ 481 case KNetworkAttachmentType_Generic:482 m_pComboName->setWhatsThis(tr("Selects the driver to be used with this network card."));483 break;484 case KNetworkAttachmentType_NATNetwork:485 m_pComboName->setWhatsThis(tr("Holds the name of the NAT network that this network card "486 "will be connected to. You can create and remove networks "487 "using the global network settings in the virtual machine "488 "manager window."));489 break;490 #ifdef VBOX_WITH_CLOUD_NET491 case KNetworkAttachmentType_Cloud:492 m_pComboName->setWhatsThis(tr("(experimental) Holds the name of the cloud network that this network card "493 "will be connected to. You can add and remove cloud networks "494 "using the global network settings in the virtual machine "495 "manager window."));496 break;497 #endif /* VBOX_WITH_CLOUD_NET */498 498 default: 499 499 m_pComboName->setWhatsThis(QString()); … … 510 510 case KNetworkAttachmentType_Internal: 511 511 case KNetworkAttachmentType_HostOnly: 512 #ifdef VBOX_WITH_VMNET513 case KNetworkAttachmentType_HostOnlyNetwork:514 #endif /* VBOX_WITH_VMNET */515 512 case KNetworkAttachmentType_Generic: 516 513 case KNetworkAttachmentType_NATNetwork: 517 514 #ifdef VBOX_WITH_CLOUD_NET 518 515 case KNetworkAttachmentType_Cloud: 519 #endif /* VBOX_WITH_CLOUD_NET */ 516 #endif 517 #ifdef VBOX_WITH_VMNET 518 case KNetworkAttachmentType_HostOnlyNetwork: 519 #endif 520 520 fSuccess = !valueName(valueType()).isEmpty(); 521 521 break; … … 532 532 switch (comEnum) 533 533 { 534 case KNetworkAttachmentType_NAT: return UIExtraDataMetaDefs::DetailsElementOptionTypeNetwork_NAT; 535 case KNetworkAttachmentType_Bridged: return UIExtraDataMetaDefs::DetailsElementOptionTypeNetwork_BridgetAdapter; 536 case KNetworkAttachmentType_Internal: return UIExtraDataMetaDefs::DetailsElementOptionTypeNetwork_InternalNetwork; 537 case KNetworkAttachmentType_HostOnly: return UIExtraDataMetaDefs::DetailsElementOptionTypeNetwork_HostOnlyAdapter; 534 case KNetworkAttachmentType_NAT: return UIExtraDataMetaDefs::DetailsElementOptionTypeNetwork_NAT; 535 case KNetworkAttachmentType_Bridged: return UIExtraDataMetaDefs::DetailsElementOptionTypeNetwork_BridgetAdapter; 536 case KNetworkAttachmentType_Internal: return UIExtraDataMetaDefs::DetailsElementOptionTypeNetwork_InternalNetwork; 537 case KNetworkAttachmentType_HostOnly: return UIExtraDataMetaDefs::DetailsElementOptionTypeNetwork_HostOnlyAdapter; 538 case KNetworkAttachmentType_Generic: return UIExtraDataMetaDefs::DetailsElementOptionTypeNetwork_GenericDriver; 539 case KNetworkAttachmentType_NATNetwork: return UIExtraDataMetaDefs::DetailsElementOptionTypeNetwork_NATNetwork; 540 #ifdef VBOX_WITH_CLOUD_NET 541 case KNetworkAttachmentType_Cloud: return UIExtraDataMetaDefs::DetailsElementOptionTypeNetwork_CloudNetwork; 542 #endif 538 543 #ifdef VBOX_WITH_VMNET 539 544 case KNetworkAttachmentType_HostOnlyNetwork: return UIExtraDataMetaDefs::DetailsElementOptionTypeNetwork_HostOnlyNetwork; 540 #endif /* VBOX_WITH_VMNET */ 541 case KNetworkAttachmentType_Generic: return UIExtraDataMetaDefs::DetailsElementOptionTypeNetwork_GenericDriver; 542 case KNetworkAttachmentType_NATNetwork: return UIExtraDataMetaDefs::DetailsElementOptionTypeNetwork_NATNetwork; 543 #ifdef VBOX_WITH_CLOUD_NET 544 case KNetworkAttachmentType_Cloud: return UIExtraDataMetaDefs::DetailsElementOptionTypeNetwork_CloudNetwork; 545 #endif /* VBOX_WITH_CLOUD_NET */ 546 default: return UIExtraDataMetaDefs::DetailsElementOptionTypeNetwork_Invalid; 547 } 548 } 545 #endif 546 default: return UIExtraDataMetaDefs::DetailsElementOptionTypeNetwork_Invalid; 547 } 548 } -
trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UINetworkAttachmentEditor.h
r91416 r91437 88 88 /** Returns cloud network list. */ 89 89 static QStringList cloudNetworks(); 90 #endif /* VBOX_WITH_CLOUD_NET */90 #endif 91 91 #ifdef VBOX_WITH_VMNET 92 92 /** Returns host-only network list. */ 93 93 static QStringList hostOnlyNetworks(); 94 #endif /* VBOX_WITH_VMNET */94 #endif 95 95 96 96 protected: -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsNetwork.cpp
r91416 r91437 74 74 #ifdef VBOX_WITH_CLOUD_NET 75 75 , m_strCloudNetworkName(QString()) 76 #endif /* VBOX_WITH_CLOUD_NET */76 #endif 77 77 #ifdef VBOX_WITH_VMNET 78 78 , m_strHostOnlyNetworkName(QString()) 79 #endif /* VBOX_WITH_VMNET */79 #endif 80 80 , m_strMACAddress(QString()) 81 81 , m_fCableConnected(false) … … 99 99 #ifdef VBOX_WITH_CLOUD_NET 100 100 && (m_strCloudNetworkName == other.m_strCloudNetworkName) 101 #endif /* VBOX_WITH_CLOUD_NET */101 #endif 102 102 #ifdef VBOX_WITH_VMNET 103 103 && (m_strHostOnlyNetworkName == other.m_strHostOnlyNetworkName) 104 #endif /* VBOX_WITH_VMNET */104 #endif 105 105 && (m_strMACAddress == other.m_strMACAddress) 106 106 && (m_fCableConnected == other.m_fCableConnected) … … 138 138 /** Holds the cloud network name. */ 139 139 QString m_strCloudNetworkName; 140 #endif /* VBOX_WITH_CLOUD_NET */140 #endif 141 141 #ifdef VBOX_WITH_VMNET 142 142 /** Holds the host-only network name. */ 143 143 QString m_strHostOnlyNetworkName; 144 #endif /* VBOX_WITH_VMNET */144 #endif 145 145 /** Holds the network adapter MAC address. */ 146 146 QString m_strMACAddress; … … 336 336 #ifdef VBOX_WITH_CLOUD_NET 337 337 m_pEditorAttachmentType->setValueName(KNetworkAttachmentType_Cloud, wipedOutString(oldAdapterData.m_strCloudNetworkName)); 338 #endif /* VBOX_WITH_CLOUD_NET */338 #endif 339 339 #ifdef VBOX_WITH_VMNET 340 340 m_pEditorAttachmentType->setValueName(KNetworkAttachmentType_HostOnlyNetwork, wipedOutString(oldAdapterData.m_strHostOnlyNetworkName)); 341 #endif /* VBOX_WITH_VMNET */341 #endif 342 342 /* Handle attachment type change: */ 343 343 sltHandleAttachmentTypeChange(); … … 627 627 #ifdef VBOX_WITH_CLOUD_NET 628 628 m_pEditorAttachmentType->setValueNames(KNetworkAttachmentType_Cloud, m_pParent->cloudNetworkList()); 629 #endif /* VBOX_WITH_CLOUD_NET */629 #endif 630 630 #ifdef VBOX_WITH_VMNET 631 631 m_pEditorAttachmentType->setValueNames(KNetworkAttachmentType_HostOnlyNetwork, m_pParent->hostOnlyNetworkList()); 632 #endif /* VBOX_WITH_VMNET */632 #endif 633 633 } 634 634 … … 1085 1085 #ifdef VBOX_WITH_CLOUD_NET 1086 1086 refreshCloudNetworkList(); 1087 #endif /* VBOX_WITH_CLOUD_NET */1087 #endif 1088 1088 #ifdef VBOX_WITH_VMNET 1089 1089 refreshHostOnlyNetworkList(); 1090 #endif /* VBOX_WITH_VMNET */1090 #endif 1091 1091 1092 1092 /* Prepare old network data: */ … … 1114 1114 #ifdef VBOX_WITH_CLOUD_NET 1115 1115 oldAdapterData.m_strCloudNetworkName = wipedOutString(comAdapter.GetCloudNetwork()); 1116 #endif /* VBOX_WITH_CLOUD_NET */1116 #endif 1117 1117 #ifdef VBOX_WITH_VMNET 1118 1118 oldAdapterData.m_strHostOnlyNetworkName = wipedOutString(comAdapter.GetHostOnlyNetwork()); 1119 #endif /* VBOX_WITH_VMNET */1119 #endif 1120 1120 oldAdapterData.m_adapterType = comAdapter.GetAdapterType(); 1121 1121 oldAdapterData.m_promiscuousMode = comAdapter.GetPromiscModePolicy(); -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsNetwork.h
r91416 r91437 59 59 /** Returns the cloud network list. */ 60 60 const QStringList &cloudNetworkList() const { return m_cloudNetworkList; } 61 #endif /* VBOX_WITH_CLOUD_NET */61 #endif 62 62 #ifdef VBOX_WITH_VMNET 63 63 /** Returns the host-only network list. */ 64 64 const QStringList &hostOnlyNetworkList() const { return m_hostOnlyNetworkList; } 65 #endif /* VBOX_WITH_VMNET */65 #endif 66 66 67 67 public slots: … … 123 123 /** Repopulates cloud network list. */ 124 124 void refreshCloudNetworkList(); 125 #endif /* VBOX_WITH_CLOUD_NET */125 #endif 126 126 #ifdef VBOX_WITH_VMNET 127 127 /** Repopulates host-only network list. */ 128 128 void refreshHostOnlyNetworkList(); 129 #endif /* VBOX_WITH_VMNET */129 #endif 130 130 131 131 /** Loads generic properties from passed @a adapter. */ … … 159 159 /** Holds the cloud network list. */ 160 160 QStringList m_cloudNetworkList; 161 #endif /* VBOX_WITH_CLOUD_NET */161 #endif 162 162 #ifdef VBOX_WITH_VMNET 163 163 /** Holds the host-only network list. */ 164 164 QStringList m_hostOnlyNetworkList; 165 #endif /* VBOX_WITH_VMNET */165 #endif 166 166 167 167 /** Holds the page data cache instance. */
Note:
See TracChangeset
for help on using the changeset viewer.