VirtualBox

Changeset 37463 in vbox


Ignore:
Timestamp:
Jun 15, 2011 10:02:15 AM (14 years ago)
Author:
vboxsync
Message:

Frontends/VirtualBox: show the properties of a network card configured for the generic driver attachment. Adapted first part of a contribution by Christophe Devriese.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/selector/UIVMDesktop.cpp

    r37200 r37463  
    716716}
    717717
     718/**
     719 * Return a text summary of the properties of a generic network adapter
     720 */
     721QString summarizeGenericProperties(const CNetworkAdapter &adapter)
     722{
     723    QVector<QString> names;
     724    QVector<QString> props;
     725    props = adapter.GetProperties(QString(), names); // all properties, please
     726
     727    QString result;
     728    for (int i = 0; i < names.size(); i++)
     729    {
     730        result += names[i] + "=" + props[i];
     731        if (i != names.size() - 1)
     732            result += ", ";
     733    }
     734
     735    return result;
     736}
     737
    718738void UIDetailsPagePrivate::sltUpdateNetwork()
    719739{
     
    748768                                                 "details report (network)").arg(adapter.GetHostOnlyInterface()));
    749769                    else if (type == KNetworkAttachmentType_Generic)
    750                         attType = attType.arg(tr("Generic, '%1'",
    751                                                  "details report (network)").arg(adapter.GetGenericDriver()));
     770                        attType = attType.arg(tr("Generic, '%1' {&nbsp;%2&nbsp;}",
     771                                                 "details report (network)").arg(adapter.GetGenericDriver(), summarizeGenericProperties(adapter)));
    752772                    else
    753773                        attType = attType.arg(vboxGlobal().toString(type));
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