Changeset 84028 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Apr 28, 2020 8:40:04 AM (5 years ago)
- svn:sync-xref-src-repo-rev:
- 137599
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/globals
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/globals/UICloudNetworkingStuff.cpp
r84020 r84028 205 205 } 206 206 207 bool UICloudNetworkingStuff::cloudMachineSettingsForm(CCloudMachine &comCloudMachine,207 bool UICloudNetworkingStuff::cloudMachineSettingsForm(CCloudMachine comCloudMachine, 208 208 CForm &comResult, 209 209 QWidget *pParent /* = 0 */) … … 240 240 } 241 241 242 bool UICloudNetworkingStuff::cloudMachineSettingsForm(CCloudMachine &comCloudMachine,242 bool UICloudNetworkingStuff::cloudMachineSettingsForm(CCloudMachine comCloudMachine, 243 243 CForm &comResult, 244 244 QString &strErrorMessage) … … 268 268 } 269 269 270 bool UICloudNetworkingStuff::applyCloudMachineSettingsForm(CCloudMachine &comCloudMachine,271 CForm &comForm,270 bool UICloudNetworkingStuff::applyCloudMachineSettingsForm(CCloudMachine comCloudMachine, 271 CForm comForm, 272 272 QWidget *pParent /* = 0 */) 273 273 { … … 352 352 } 353 353 354 QVector<CCloudMachine> UICloudNetworkingStuff::listCloudMachines(CCloudClient &comCloudClient,354 QVector<CCloudMachine> UICloudNetworkingStuff::listCloudMachines(CCloudClient comCloudClient, 355 355 QString &strErrorMessage, 356 356 QWidget *pParent /* = 0 */) … … 485 485 } 486 486 487 void UICloudNetworkingStuff::refreshCloudMachineInfo(CCloudMachine &comCloudMachine,487 void UICloudNetworkingStuff::refreshCloudMachineInfo(CCloudMachine comCloudMachine, 488 488 QString &strErrorMessage, 489 489 QWidget *pParent /* = 0 */) … … 566 566 return resultMap; 567 567 } 568 569 QString UICloudNetworkingStuff::fetchOsType(const QMap<KVirtualSystemDescriptionType, QString> &infoMap)570 {571 /* Prepare a map of known OS types: */572 QMap<QString, QString> osTypes;573 osTypes["Custom"] = QString("Other");574 osTypes["Oracle Linux"] = QString("Oracle_64");575 osTypes["Canonical Ubuntu"] = QString("Ubuntu_64");576 577 /* Return OS type value: */578 return osTypes.value(infoMap.value(KVirtualSystemDescriptionType_OS), "Other");579 }580 581 int UICloudNetworkingStuff::fetchMemorySize(const QMap<KVirtualSystemDescriptionType, QString> &infoMap)582 {583 /* Return memory size value: */584 return infoMap.value(KVirtualSystemDescriptionType_Memory).toInt();585 }586 587 int UICloudNetworkingStuff::fetchCpuCount(const QMap<KVirtualSystemDescriptionType, QString> &infoMap)588 {589 /* Return CPU count value: */590 return infoMap.value(KVirtualSystemDescriptionType_CPU).toInt();591 }592 593 QString UICloudNetworkingStuff::fetchShape(const QMap<KVirtualSystemDescriptionType, QString> &infoMap)594 {595 /* Return shape value: */596 return infoMap.value(KVirtualSystemDescriptionType_CloudInstanceShape);597 }598 599 QString UICloudNetworkingStuff::fetchDomain(const QMap<KVirtualSystemDescriptionType, QString> &infoMap)600 {601 /* Return domain value: */602 return infoMap.value(KVirtualSystemDescriptionType_CloudDomain);603 }604 605 KMachineState UICloudNetworkingStuff::fetchMachineState(const QMap<KVirtualSystemDescriptionType, QString> &infoMap)606 {607 /* Prepare a map of known machine states: */608 QMap<QString, KMachineState> machineStates;609 machineStates["RUNNING"] = KMachineState_Running;610 machineStates["STOPPED"] = KMachineState_Paused;611 machineStates["STOPPING"] = KMachineState_Stopping;612 machineStates["STARTING"] = KMachineState_Starting;613 614 /* Return machine state value: */615 return machineStates.value(infoMap.value(KVirtualSystemDescriptionType_CloudInstanceState), KMachineState_PoweredOff);616 }617 618 QString UICloudNetworkingStuff::fetchBootingFirmware(const QMap<KVirtualSystemDescriptionType, QString> &infoMap)619 {620 /* Return booting firmware value: */621 return infoMap.value(KVirtualSystemDescriptionType_BootingFirmware);622 }623 624 QString UICloudNetworkingStuff::fetchImageId(const QMap<KVirtualSystemDescriptionType, QString> &infoMap)625 {626 /* Return image id value: */627 return infoMap.value(KVirtualSystemDescriptionType_CloudImageId);628 } -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UICloudNetworkingStuff.h
r84020 r84028 32 32 #include "CCloudClient.h" 33 33 #include "CCloudMachine.h" 34 #include "CForm.h" 34 35 35 36 /** Cloud networking stuff namespace. */ … … 78 79 /** Acquires @a comCloudMachine settings form as a @a comResult, using @a pParent to show messages according to. 79 80 * @note Be aware, this is a blocking function, corresponding progress dialog will be executed. */ 80 SHARED_LIBRARY_STUFF bool cloudMachineSettingsForm(CCloudMachine &comCloudMachine,81 SHARED_LIBRARY_STUFF bool cloudMachineSettingsForm(CCloudMachine comCloudMachine, 81 82 CForm &comResult, 82 83 QWidget *pParent = 0); 83 84 /** Acquires @a comCloudMachine settings form as a @a comResult, using @a strErrorMessage to store messages to. 84 85 * @note Be aware, this is a blocking function, it will hang for a time of progress being executed. */ 85 SHARED_LIBRARY_STUFF bool cloudMachineSettingsForm(CCloudMachine &comCloudMachine,86 SHARED_LIBRARY_STUFF bool cloudMachineSettingsForm(CCloudMachine comCloudMachine, 86 87 CForm &comResult, 87 88 QString &strErrorMessage); … … 89 90 /** Applies @a comCloudMachine @a comForm settings, using @a pParent to show messages according to. 90 91 * @note Be aware, this is a blocking function, corresponding progress dialog will be executed. */ 91 SHARED_LIBRARY_STUFF bool applyCloudMachineSettingsForm(CCloudMachine &comCloudMachine,92 CForm &comForm,92 SHARED_LIBRARY_STUFF bool applyCloudMachineSettingsForm(CCloudMachine comCloudMachine, 93 CForm comForm, 93 94 QWidget *pParent = 0); 94 95 … … 106 107 * @param pWidget Brings parent widget to show messages according to, 107 108 * if no parent set, progress will be executed in blocking way. */ 108 SHARED_LIBRARY_STUFF QVector<CCloudMachine> listCloudMachines(CCloudClient &comCloudClient,109 SHARED_LIBRARY_STUFF QVector<CCloudMachine> listCloudMachines(CCloudClient comCloudClient, 109 110 QString &strErrorMessage, 110 111 QWidget *pParent = 0); … … 136 137 * @param pWidget Brings parent widget to show messages according to, 137 138 * if no parent set, progress will be executed in blocking way. */ 138 SHARED_LIBRARY_STUFF void refreshCloudMachineInfo(CCloudMachine &comCloudMachine,139 SHARED_LIBRARY_STUFF void refreshCloudMachineInfo(CCloudMachine comCloudMachine, 139 140 QString &strErrorMessage, 140 141 QWidget *pParent = 0); … … 150 151 QString &strErrorMessage, 151 152 QWidget *pParent = 0); 152 153 /** Fetches cloud instance OS type from the passed @a info. */154 SHARED_LIBRARY_STUFF QString fetchOsType(const QMap<KVirtualSystemDescriptionType, QString> &infoMap);155 /** Fetches cloud instance memory size from the passed @a info. */156 SHARED_LIBRARY_STUFF int fetchMemorySize(const QMap<KVirtualSystemDescriptionType, QString> &infoMap);157 /** Fetches cloud instance CPU count from the passed @a info. */158 SHARED_LIBRARY_STUFF int fetchCpuCount(const QMap<KVirtualSystemDescriptionType, QString> &infoMap);159 /** Fetches cloud instance shape from the passed @a info. */160 SHARED_LIBRARY_STUFF QString fetchShape(const QMap<KVirtualSystemDescriptionType, QString> &infoMap);161 /** Fetches cloud instance domain from the passed @a info. */162 SHARED_LIBRARY_STUFF QString fetchDomain(const QMap<KVirtualSystemDescriptionType, QString> &infoMap);163 /** Fetches cloud instance state from the passed @a info. */164 SHARED_LIBRARY_STUFF KMachineState fetchMachineState(const QMap<KVirtualSystemDescriptionType, QString> &infoMap);165 /** Fetches cloud instance booting firmware from the passed @a info. */166 SHARED_LIBRARY_STUFF QString fetchBootingFirmware(const QMap<KVirtualSystemDescriptionType, QString> &infoMap);167 /** Fetches cloud instance image id from the passed @a info. */168 SHARED_LIBRARY_STUFF QString fetchImageId(const QMap<KVirtualSystemDescriptionType, QString> &infoMap);169 153 } 170 154
Note:
See TracChangeset
for help on using the changeset viewer.