VirtualBox

Changeset 6789 in vbox


Ignore:
Timestamp:
Feb 4, 2008 4:33:41 PM (17 years ago)
Author:
vboxsync
Message:

1761: Create VM session information dialog:

Latest statistics format update.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/ui/VBoxVMInformationDlg.ui.h

    r6728 r6789  
    412412
    413413    QString table = "<p><table border=0 cellspacing=0 cellpadding=0 width=100%>%1</table></p>";
    414     QString hdrRow = "<tr><td align=left><img src='%1'></td><td colspan=2><b>%2</b></td></tr>";
    415     QString bdyRow = "<tr><td></td><td><nobr>%1</nobr></td><td width=100%><nobr>%2</nobr></td></tr>";
    416     QString paragraph = "<tr><td colspan=3></td></tr>";
    417     QString interline = "<tr><td colspan=3><font size=1>&nbsp;</font></td></tr>";
     414    QString hdrRow = "<tr><td align=left><img src='%1'></td><td colspan=3><b>%2</b></td></tr>";
     415    QString bdyRow = "<tr><td></td><td><nobr>%1</nobr></td><td colspan=2><nobr>%2</nobr></td></tr>";
     416    QString paragraph = "<tr><td colspan=4></td></tr>";
     417    QString interline = "<tr><td colspan=4><font size=1>&nbsp;</font></td></tr>";
    418418    QString result;
    419419
     
    437437
    438438    /* Hard Disk Statistics. */
    439     result += hdrRow.arg ("hd_16px.png").arg (tr ("Hard Disks Statistics"));
     439    result += hdrRow.arg ("hd_16px.png").arg (tr ("IDE Hard Disk Statistics"));
    440440    result += formatHardDisk (tr ("Primary Master"), CEnums::IDE0Controller, 0, 0, 1);
    441441    result += interline;
    442442    result += formatHardDisk (tr ("Primary Slave"), CEnums::IDE0Controller, 1, 4, 5);
    443443    result += interline;
    444     result += formatHardDisk (tr ("Secondary Master"), CEnums::IDE1Controller, 0, 8, 9);
    445     result += interline;
    446444    result += formatHardDisk (tr ("Secondary Slave"), CEnums::IDE1Controller, 1, 12, 13);
     445    result += paragraph;
     446
     447    /* CD/DVD-ROM Statistics. */
     448    result += hdrRow.arg ("cd_16px.png").arg (tr ("CD/DVD-ROM Statistics"));
     449    result += formatHardDisk (QString::null /* tr ("Secondary Master") */,
     450                              CEnums::IDE1Controller, 0, 8, 9);
    447451    result += paragraph;
    448452
     
    469473        return QString::null;
    470474
    471     QString header = "<tr><td></td><td colspan=2><nobr><u>%1</u></nobr></td></tr>";
     475    QString header = "<tr><td></td><td colspan=3><nobr><u>%1</u></nobr></td></tr>";
    472476    CMachine machine = mSession.GetMachine();
    473477
    474     QString result = header.arg (aName);
     478    QString result = aName.isNull() ? QString::null : header.arg (aName);
    475479    CHardDisk hd = machine.GetHardDisk (aType, aSlot);
    476480    if (!hd.isNull() || (aType == CEnums::IDE1Controller && aSlot == 0))
     
    492496        return QString::null;
    493497
    494     QString header = "<tr><td></td><td colspan=2><nobr><u>%1</u></nobr></td></tr>";
     498    QString header = "<tr><td></td><td colspan=3><nobr><u>%1</u></nobr></td></tr>";
    495499    CMachine machine = mSession.GetMachine();
    496500
     
    507511                                              int aStart, int aFinish)
    508512{
    509     QString body = "<tr><td></td><td><nobr>%1</nobr></td><td width=100%><nobr>%2</nobr></td></tr>";
     513    QString body = "<tr><td></td><td><nobr>%1</nobr></td><td align=right><nobr>%2%3</nobr></td><td width=100%></td></tr>";
    510514
    511515    QString result;
    512516
    513517    if (aStart == -1 && aFinish == -1)
    514         result += body.arg (aUnits).arg (QString::null);
     518        result += body.arg (aUnits).arg (QString::null).arg (QString::null);
    515519    else for (int id = aStart; id <= aFinish; ++ id)
    516520    {
     
    518522        if (mValuesMap.contains (mNamesMap.keys() [id]))
    519523        {
    520             line = line.arg (mNamesMap.values() [id]);
    521524            ULONG64 value = mValuesMap.values() [id].toULongLong();
     525            line = line.arg (mNamesMap.values() [id])
     526                       .arg (QString ("%L1").arg (value));
    522527            line = aUnits.isNull() ?
    523                 line.arg (QString ("%L1").arg (value)) :
    524                 line.arg (QString ("%L1 %2").arg (value).arg (aUnits));
     528                line.arg (QString ("<img src=tpixel.png width=%1 height=1>")
     529                          .arg (QApplication::fontMetrics().width (" B"))) :
     530                line.arg (QString (" %1").arg (aUnits));
    525531        }
    526532        result += line;
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