VirtualBox

Changeset 83175 in vbox


Ignore:
Timestamp:
Feb 27, 2020 6:10:52 PM (5 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:9653: Extend UICloudMachine and UICloudNetworkingStuff to generate more of General and System details (s.a. r136281).

Location:
trunk/src/VBox/Frontends/VirtualBox/src/globals
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UICloudMachine.cpp

    r83162 r83175  
    3939    , m_iMemorySize(0)
    4040    , m_iCpuCount(0)
     41    //, m_strInstanceShape("None")
     42    //, m_strDomain("None")
     43    //, m_strBootingFirmware("None")
    4144{
    4245    //printf("Data for machine with id = {%s} is created\n", m_strId.toUtf8().constData());
     
    5356    , m_iMemorySize(other.m_iMemorySize)
    5457    , m_iCpuCount(other.m_iCpuCount)
     58    , m_strInstanceShape(other.m_strInstanceShape)
     59    , m_strDomain(other.m_strDomain)
     60    , m_strBootingFirmware(other.m_strBootingFirmware)
    5561{
    5662    //printf("Data for machine with id = {%s} is copied\n", m_strId.toUtf8().constData());
     
    7278    m_iCpuCount = fetchCpuCount(infoMap);
    7379    m_enmMachineState = fetchMachineState(infoMap);
     80    m_strInstanceShape = fetchInstanceShape(infoMap);
     81    m_strDomain = fetchDomain(infoMap);
     82    m_strBootingFirmware = fetchBootingFirmware(infoMap);
    7483}
    7584
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UICloudMachine.h

    r83162 r83175  
    7373    /** Returns cloud VM CPU count. */
    7474    int cpuCount() const { return m_iCpuCount; }
     75    /** Returns cloud VM instance shape. */
     76    QString instanceShape() const { return m_strInstanceShape; }
     77    /** Returns cloud VM domain. */
     78    QString domain() const { return m_strDomain; }
     79    /** Returns cloud VM booting firmware. */
     80    QString bootingFirmware() const { return m_strBootingFirmware; }
    7581
    7682private:
     
    96102    /** Holds the cloud VM CPU count. */
    97103    int      m_iCpuCount;
     104    /** Holds the cloud VM instance shape. */
     105    QString  m_strInstanceShape;
     106    /** Holds the cloud VM domain. */
     107    QString  m_strDomain;
     108    /** Holds the cloud VM booting firmware. */
     109    QString  m_strBootingFirmware;
    98110};
    99111
     
    144156    /** Returns cloud VM CPU count. */
    145157    int cpuCount() const { return d->cpuCount(); }
     158    /** Returns cloud VM instance shape. */
     159    QString instanceShape() const { return d->instanceShape(); }
     160    /** Returns cloud VM domain. */
     161    QString domain() const { return d->domain(); }
     162    /** Returns cloud VM booting firmware. */
     163    QString bootingFirmware() const { return d->bootingFirmware(); }
    146164
    147165private:
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UICloudNetworkingStuff.cpp

    r83160 r83175  
    208208}
    209209
     210QString UICloudNetworkingStuff::fetchInstanceShape(const QMap<KVirtualSystemDescriptionType, QString> &infoMap)
     211{
     212    /* Return instance shape value: */
     213    return infoMap.value(KVirtualSystemDescriptionType_CloudInstanceShape);
     214}
     215
     216QString UICloudNetworkingStuff::fetchDomain(const QMap<KVirtualSystemDescriptionType, QString> &infoMap)
     217{
     218    /* Return domain value: */
     219    return infoMap.value(KVirtualSystemDescriptionType_CloudDomain);
     220}
     221
    210222KMachineState UICloudNetworkingStuff::fetchMachineState(const QMap<KVirtualSystemDescriptionType, QString> &infoMap)
    211223{
     
    220232    return machineStates.value(infoMap.value(KVirtualSystemDescriptionType_CloudInstanceState), KMachineState_PoweredOff);
    221233}
     234
     235QString UICloudNetworkingStuff::fetchBootingFirmware(const QMap<KVirtualSystemDescriptionType, QString> &infoMap)
     236{
     237    /* Return booting firmware value: */
     238    return infoMap.value(KVirtualSystemDescriptionType_BootingFirmware);
     239}
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UICloudNetworkingStuff.h

    r83160 r83175  
    6464    /** Fetches cloud VM CPU count from the passed @a info. */
    6565    SHARED_LIBRARY_STUFF int fetchCpuCount(const QMap<KVirtualSystemDescriptionType, QString> &infoMap);
     66    /** Fetches cloud VM instance shape from the passed @a info. */
     67    SHARED_LIBRARY_STUFF QString fetchInstanceShape(const QMap<KVirtualSystemDescriptionType, QString> &infoMap);
     68    /** Fetches cloud VM domain from the passed @a info. */
     69    SHARED_LIBRARY_STUFF QString fetchDomain(const QMap<KVirtualSystemDescriptionType, QString> &infoMap);
    6670    /** Fetches cloud VM state from the passed @a info. */
    6771    SHARED_LIBRARY_STUFF KMachineState fetchMachineState(const QMap<KVirtualSystemDescriptionType, QString> &infoMap);
     72    /** Fetches cloud VM booting firmware from the passed @a info. */
     73    SHARED_LIBRARY_STUFF QString fetchBootingFirmware(const QMap<KVirtualSystemDescriptionType, QString> &infoMap);
    6874}
    6975
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIDetailsGenerator.cpp

    r83151 r83175  
    147147                                 uiCommon().vmGuestOSTypeDescription(guiCloudMachine.osType()));
    148148
     149    /* Domain: */
     150    if (fOptions & UIExtraDataMetaDefs::DetailsElementOptionTypeGeneral_Location)
     151        table << UITextTableLine(QApplication::translate("UIDetails", "Domain", "details (general)"),
     152                                 guiCloudMachine.domain());
     153
    149154    return table;
    150155}
     
    288293    }
    289294
     295    /* Instance Shape: */
     296    table << UITextTableLine(QApplication::translate("UIDetails", "Shape", "details (system)"),
     297                             guiCloudMachine.instanceShape());
     298
    290299    /* Base memory: */
    291300    if (fOptions & UIExtraDataMetaDefs::DetailsElementOptionTypeSystem_RAM)
     
    297306        table << UITextTableLine(QApplication::translate("UIDetails", "Processors", "details (system)"),
    298307                                 QString::number(guiCloudMachine.cpuCount()));
     308
     309    /* Booting firmware: */
     310    if (fOptions & UIExtraDataMetaDefs::DetailsElementOptionTypeSystem_Firmware)
     311        table << UITextTableLine(QApplication::translate("UIDetails", "Booting Firmware", "details (system)"),
     312                                 guiCloudMachine.bootingFirmware());
    299313
    300314    return table;
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette