VirtualBox

Changeset 19837 in vbox


Ignore:
Timestamp:
May 19, 2009 6:54:45 PM (15 years ago)
Author:
vboxsync
Message:

FE/Qt4: 3875: Guest SMP settings - Initial Commit.

Location:
trunk/src/VBox/Frontends/VirtualBox
Files:
5 added
15 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/Makefile.kmk

    r19664 r19837  
    269269        include/VBoxSettingsUtils.h \
    270270        include/VBoxVMSettingsGeneral.h \
     271        include/VBoxVMSettingsSystem.h \
    271272        include/VBoxVMSettingsDisplay.h \
    272273        include/VBoxVMSettingsHD.h \
     
    357358        src/VBoxVMLogViewer.cpp \
    358359        src/VBoxVMSettingsGeneral.cpp \
     360        src/VBoxVMSettingsSystem.cpp \
    359361        src/VBoxVMSettingsDisplay.cpp \
    360362        src/VBoxVMSettingsHD.cpp \
  • trunk/src/VBox/Frontends/VirtualBox/VBoxUI.pro

    r19664 r19837  
    4040    ui/VBoxVMLogViewer.ui \
    4141    ui/VBoxVMSettingsGeneral.ui \
     42    ui/VBoxVMSettingsSystem.ui \
    4243    ui/VBoxVMSettingsDisplay.ui \
    4344    ui/VBoxVMSettingsHD.ui \
  • trunk/src/VBox/Frontends/VirtualBox/VirtualBox.qrc

    r17784 r19837  
    336336    <file alias="connect_16px.png">images/connect_16px.png</file>
    337337    <file alias="disconnect_16px.png">images/disconnect_16px.png</file>
     338    <file alias="chipset_16px.png">images/chipset_16px.png</file>
     339    <file alias="chipset_32px.png">images/chipset_32px.png</file>
    338340 </qresource>
    339341 </RCC>
  • trunk/src/VBox/Frontends/VirtualBox/include/VBoxGlobal.h

    r19664 r19837  
    928928    QPixmap mWarningIcon, mErrorIcon;
    929929
    930     mutable bool mDetailReportTemplatesReady;
    931 
    932930    friend VBoxGlobal &vboxGlobal();
    933931    friend class VBoxCallback;
  • trunk/src/VBox/Frontends/VirtualBox/include/VBoxSettingsDialog.h

    r18235 r19837  
    7575                  VBoxSettingsPage* aPrefPage = NULL, int aParentId = -1);
    7676
     77    virtual bool correlate (QWidget *aPage, QString &aWarning);
     78
    7779    VBoxSettingsSelector *mSelector;
    7880    QStackedWidget *mStack;
  • trunk/src/VBox/Frontends/VirtualBox/include/VBoxSettingsDialogSpecific.h

    r19664 r19837  
    7676    {
    7777        GeneralId = 0,
     78        SystemId,
    7879        DisplayId,
    7980        StorageId,
     
    102103    QString dialogTitle() const;
    103104
     105    bool correlate (QWidget *aPage, QString &aWarning);
     106
    104107private slots:
    105108
  • trunk/src/VBox/Frontends/VirtualBox/include/VBoxVMSettingsGeneral.h

    r19664 r19837  
    3737    VBoxVMSettingsGeneral();
    3838
    39 signals:
    40 
    41     void tableChanged();
     39    bool is64BitOSTypeSelected() const;
    4240
    4341protected:
     
    4745
    4846    void setValidator (QIWidgetValidator *aVal);
    49     bool revalidate (QString &aWarning, QString &aTitle);
    5047
    5148    void setOrderAfter (QWidget *aWidget);
     
    5350    void retranslateUi();
    5451
    55 private slots:
    56 
    57     void valueChangedRAM (int aVal);
    58     void textChangedRAM (const QString &aText);
    59 
    60     void moveBootItemUp();
    61     void moveBootItemDown();
    62     void onCurrentBootItemChanged (QTreeWidgetItem *aItem,
    63                                    QTreeWidgetItem *aPrev = 0);
    64 
    65     void stateChangedVirt (int aState);
    66 
    6752private:
    6853
    69     void adjustBootOrderTWSize();
    70 
    71     bool eventFilter (QObject *aObject, QEvent *aEvent);
    7254    void showEvent (QShowEvent *aEvent);
    7355
  • trunk/src/VBox/Frontends/VirtualBox/include/VBoxVMSettingsHD.h

    r19239 r19837  
    385385    QString getWithNewHDWizard();
    386386    int maxNameLength() const;
    387     void prepareComboboxes();
    388387    void removeFocus();
    389388    KStorageControllerType currentControllerType() const
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxGlobal.cpp

    r19670 r19837  
    759759    , mMediaEnumThread (NULL)
    760760    , mVerString ("1.0")
    761     , mDetailReportTemplatesReady (false)
    762761{
    763762}
     
    15811580QString VBoxGlobal::detailsReport (const CMachine &aMachine, bool aWithLinks)
    15821581{
     1582    /* Details templates */
    15831583    static const char *sTableTpl =
    15841584        "<table border=0 cellspacing=1 cellpadding=0>%1</table>";
     
    15981598        "<tr><td width=40%><nobr>%1:</nobr></td><td/><td>%2</td></tr>";
    15991599
    1600     static QString sGeneralFullHrefTpl, sGeneralFullBoldTpl;
    1601 
    1602     /* Generate general template after every language change */
    1603     if (!mDetailReportTemplatesReady)
    1604     {
    1605         mDetailReportTemplatesReady = true;
    1606 
    1607         QString generalItems
    1608             = QString (sSectionItemTpl2).arg (tr ("Name", "details report"), "%1")
    1609             + QString (sSectionItemTpl2).arg (tr ("OS Type", "details report"), "%2")
    1610             + QString (sSectionItemTpl2).arg (tr ("Base Memory", "details report"),
    1611                                               tr ("<nobr>%3 MB</nobr>", "details report"))
    1612             + QString (sSectionItemTpl2).arg (tr ("Boot Order", "details report"), "%4")
    1613             + QString (sSectionItemTpl2).arg (tr ("ACPI", "details report"), "%5")
    1614             + QString (sSectionItemTpl2).arg (tr ("IO APIC", "details report"), "%6")
    1615             + QString (sSectionItemTpl2).arg (tr ("VT-x/AMD-V", "details report"), "%7")
    1616             + QString (sSectionItemTpl2).arg (tr ("Nested Paging", "details report"), "%8")
    1617             + QString (sSectionItemTpl2).arg (tr ("PAE/NX", "details report"), "%9");
    1618 
    1619         sGeneralFullHrefTpl = QString (sSectionHrefTpl)
    1620             .arg (2 + 9) /* rows */
    1621             .arg (":/machine_16px.png", /* icon */
    1622                   "#general", /* link */
    1623                   tr ("General", "details report"), /* title */
    1624                   generalItems); /* items */
    1625         sGeneralFullBoldTpl = QString (sSectionBoldTpl)
    1626             .arg (2 + 9) /* rows */
    1627             .arg (":/machine_16px.png", /* icon */
    1628                   "#general", /* link */
    1629                   tr ("General", "details report"), /* title */
    1630                   generalItems); /* items */
    1631     }
     1600    const QString &sectionTpl = aWithLinks ? sSectionHrefTpl : sSectionBoldTpl;
    16321601
    16331602    /* Compose details report */
    1634     const QString &sectionTpl = aWithLinks ? sSectionHrefTpl : sSectionBoldTpl;
    1635     const QString &generalFullTpl = aWithLinks ? sGeneralFullHrefTpl : sGeneralFullBoldTpl;
    1636 
    16371603    QString report;
    1638     QString item;
    16391604
    16401605    /* General */
    16411606    {
     1607        QString item = QString (sSectionItemTpl2).arg (tr ("Name", "details report"),
     1608                                                       aMachine.GetName())
     1609                     + QString (sSectionItemTpl2).arg (tr ("OS Type", "details report"),
     1610                                                       vmGuestOSTypeDescription (aMachine.GetOSTypeId()));
     1611
     1612        report += sectionTpl
     1613                  .arg (2 + 2) /* rows */
     1614                  .arg (":/machine_16px.png", /* icon */
     1615                        "#general", /* link */
     1616                        tr ("General", "details report"), /* title */
     1617                        item); /* items */
     1618    }
     1619
     1620    /* System */
     1621    {
     1622        /* BIOS Settings holder */
     1623        CBIOSSettings biosSettings = aMachine.GetBIOSSettings();
     1624
    16421625        /* Boot order */
    16431626        QString bootOrder;
     
    16541637            bootOrder = toString (KDeviceType_Null);
    16551638
    1656         CBIOSSettings biosSettings = aMachine.GetBIOSSettings();
    1657 
    16581639        /* ACPI */
    16591640        QString acpi = biosSettings.GetACPIEnabled()
     
    16661647            : tr ("Disabled", "details report (IO APIC)");
    16671648
     1649        /* PAE/NX */
     1650        QString pae = aMachine.GetPAEEnabled()
     1651            ? tr ("Enabled", "details report (PAE/NX)")
     1652            : tr ("Disabled", "details report (PAE/NX)");
     1653
    16681654        /* VT-x/AMD-V */
    16691655        QString virt = aMachine.GetHWVirtExEnabled() == KTSBool_True ?
     
    16761662            : tr ("Disabled", "details report (Nested Paging)");
    16771663
    1678         /* PAE/NX */
    1679         QString pae = aMachine.GetPAEEnabled()
    1680             ? tr ("Enabled", "details report (PAE/NX)")
    1681             : tr ("Disabled", "details report (PAE/NX)");
    1682 
    1683         /* General */
    1684         report = generalFullTpl
    1685                  .arg (aMachine.GetName())
    1686                  .arg (vmGuestOSTypeDescription (aMachine.GetOSTypeId()))
    1687                  .arg (aMachine.GetMemorySize())
    1688                  .arg (bootOrder)
    1689                  .arg (acpi)
    1690                  .arg (ioapic)
    1691                  .arg (virt)
    1692                  .arg (nested)
    1693                  .arg (pae);
     1664        QString item = QString (sSectionItemTpl2).arg (tr ("Base Memory", "details report"),
     1665                                                       tr ("<nobr>%1 MB</nobr>", "details report"))
     1666                       .arg (aMachine.GetMemorySize())
     1667                     + QString (sSectionItemTpl2).arg (tr ("CPU Count", "details report"),
     1668                                                       tr ("<nobr>%1</nobr>", "details report"))
     1669                       .arg (aMachine.GetCPUCount())
     1670                     + QString (sSectionItemTpl2).arg (tr ("Boot Order", "details report"), bootOrder)
     1671                     + QString (sSectionItemTpl2).arg (tr ("ACPI", "details report"), acpi)
     1672                     + QString (sSectionItemTpl2).arg (tr ("IO APIC", "details report"), ioapic)
     1673                     + QString (sSectionItemTpl2).arg (tr ("PAE/NX", "details report"), pae)
     1674                     + QString (sSectionItemTpl2).arg (tr ("VT-x/AMD-V", "details report"), virt)
     1675                     + QString (sSectionItemTpl2).arg (tr ("Nested Paging", "details report"), nested);
     1676
     1677        report += sectionTpl
     1678                  .arg (2 + 8) /* rows */
     1679                  .arg (":/chipset_16px.png", /* icon */
     1680                        "#system", /* link */
     1681                        tr ("System", "details report"), /* title */
     1682                        item); /* items */
    16941683    }
    16951684
    16961685    /* Display */
    16971686    {
    1698         /* Erase temp item */
    1699         item = QString::null;
    1700 
    1701         int rows = 2; /* including section header and footer */
     1687        /* Rows including section header and footer */
     1688        int rows = 2;
    17021689
    17031690        /* Video tab */
     
    17061693            : tr ("Disabled", "details report (3D Acceleration)");
    17071694
    1708         item += QString (sSectionItemTpl2)
    1709                 .arg (tr ("Video Memory", "details report"),
    1710                       tr ("<nobr>%1 MB</nobr>", "details report"))
    1711                 .arg (aMachine.GetVRAMSize());
    1712         item += QString (sSectionItemTpl2)
    1713                 .arg (tr ("3D Acceleration", "details report"), "%2")
    1714                 .arg (acc3d);
     1695        QString item = QString (sSectionItemTpl2)
     1696                       .arg (tr ("Video Memory", "details report"),
     1697                             tr ("<nobr>%1 MB</nobr>", "details report"))
     1698                       .arg (aMachine.GetVRAMSize())
     1699                     + QString (sSectionItemTpl2)
     1700                       .arg (tr ("3D Acceleration", "details report"), acc3d);
    17151701
    17161702        rows += 2;
     
    17311717        }
    17321718
    1733         /* Full report */
    17341719        report += sectionTpl
    17351720            .arg (rows) /* rows */
     
    17421727    /* Hard Disks */
    17431728    {
    1744         /* Erase temp item */
    1745         item = QString::null;
    1746 
    1747         int rows = 2; /* including section header and footer */
     1729        /* Rows including section header and footer */
     1730        int rows = 2;
     1731
     1732        QString item;
    17481733
    17491734        CHardDiskAttachmentVector vec = aMachine.GetHardDiskAttachments();
     
    17891774    /* DVD */
    17901775    {
     1776        QString item;
     1777
    17911778        CDVDDrive dvd = aMachine.GetDVDDrive();
    17921779        switch (dvd.GetState())
     
    18201807                AssertMsgFailed (("Invalid DVD state: %d", dvd.GetState()));
    18211808        }
     1809
    18221810        report += sectionTpl
    18231811            .arg (2 + 1) /* rows */
     
    18301818    /* Floppy */
    18311819    {
     1820        QString item;
     1821
    18321822        CFloppyDrive floppy = aMachine.GetFloppyDrive();
    18331823        switch (floppy.GetState())
     
    18611851                AssertMsgFailed (("Invalid floppy state: %d", floppy.GetState()));
    18621852        }
     1853
    18631854        report += sectionTpl
    18641855            .arg (2 + 1) /* rows */
     
    18711862    /* Audio */
    18721863    {
     1864        QString item;
     1865
    18731866        CAudioAdapter audio = aMachine.GetAudioAdapter();
    18741867        int rows = audio.GetEnabled() ? 3 : 2;
     
    18941887    /* Network */
    18951888    {
    1896         /* Erase temp item */
    1897         item = QString::null;
     1889        QString item;
    18981890
    18991891        ulong count = mVBox.GetSystemProperties().GetNetworkAdapterCount();
     
    19461938    /* Serial Ports */
    19471939    {
    1948         /* Erase temp item */
    1949         item = QString::null;
     1940        QString item;
    19501941
    19511942        ulong count = mVBox.GetSystemProperties().GetSerialPortCount();
     
    19921983    /* Parallel Ports */
    19931984    {
    1994         /* Erase temp item */
    1995         item = QString::null;
     1985        QString item;
    19961986
    19971987        ulong count = mVBox.GetSystemProperties().GetParallelPortCount();
     
    20322022    /* USB */
    20332023    {
     2024        QString item;
     2025
    20342026        CUSBController ctl = aMachine.GetUSBController();
    20352027        if (!ctl.isNull())
     
    20652057    /* Shared Folders */
    20662058    {
     2059        QString item;
     2060
    20672061        ulong count = aMachine.GetSharedFolders().size();
    20682062        if (count > 0)
     
    29692963    mErrorIcon = standardIcon (QStyle::SP_MessageBoxCritical, 0).pixmap (16, 16);
    29702964    Assert (!mErrorIcon.isNull());
    2971 
    2972     mDetailReportTemplatesReady = false;
    29732965
    29742966    /* refresh media properties since they contain some translations too  */
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxSettingsDialog.cpp

    r18236 r19837  
    133133    QString title = mSelector->itemTextByPage (page);
    134134    bool valid = page->revalidate (warning, title);
     135    if (valid && warning.isEmpty())
     136        valid = correlate (page, warning);
    135137    warning = warning.isEmpty() ? QString::null :
    136         tr ("On the <b>%1</b> page, %2").arg (title, warning);
     138              tr ("On the <b>%1</b> page, %2").arg (title, warning);
    137139    aWval->setLastWarning (warning);
    138140    valid ? setWarning (warning) : setError (warning);
     
    272274    if (aPrefPage)
    273275        attachValidator (aPrefPage);
     276}
     277
     278bool VBoxSettingsDialog::correlate (QWidget*, QString&)
     279{
     280    return true;
    274281}
    275282
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxSettingsDialogSpecific.cpp

    r19664 r19837  
    3636
    3737#include "VBoxVMSettingsGeneral.h"
     38#include "VBoxVMSettingsSystem.h"
    3839#include "VBoxVMSettingsDisplay.h"
    3940#include "VBoxVMSettingsHD.h"
     
    243244    {
    244245        prefPage = new VBoxVMSettingsGeneral();
    245         connect (prefPage, SIGNAL (tableChanged()), this, SLOT (resetFirstRunFlag()));
    246246        addItem (":/machine_32px.png", ":/machine_disabled_32px.png",
    247247                 ":/machine_16px.png", ":/machine_disabled_16px.png",
    248248                 GeneralId, "#general", prefPage);
     249    }
     250
     251    /* System page */
     252    if (isAvailable (SystemId))
     253    {
     254        prefPage = new VBoxVMSettingsSystem();
     255        connect (prefPage, SIGNAL (tableChanged()), this, SLOT (resetFirstRunFlag()));
     256        addItem (":/chipset_32px.png", ":/chipset_32px.png",
     257                 ":/chipset_16px.png", ":/chipset_16px.png",
     258                 SystemId, "#system", prefPage);
    249259    }
    250260
     
    398408void VBoxVMSettingsDlg::getFrom()
    399409{
     410    /* Load all the settings pages */
    400411    QList <VBoxSettingsPage*> pages = mSelector->settingPages();
    401412    foreach (VBoxSettingsPage *page, pages)
     
    410421void VBoxVMSettingsDlg::putBackTo()
    411422{
     423    /* Commit all the settings pages */
    412424    QList <VBoxSettingsPage*> pages = mSelector->settingPages();
    413425    foreach (VBoxSettingsPage *page, pages)
    414426        page->putBackTo();
     427
     428    /* Guest OS type & VT-x/AMD-V option correlation test */
     429    VBoxVMSettingsGeneral *generalPage =
     430        qobject_cast <VBoxVMSettingsGeneral*> (mSelector->idToPage (GeneralId));
     431    VBoxVMSettingsSystem *systemPage =
     432        qobject_cast <VBoxVMSettingsSystem*> (mSelector->idToPage (SystemId));
     433    if (generalPage && systemPage &&
     434        generalPage->is64BitOSTypeSelected() && !systemPage->isHWVirtExEnabled())
     435        mMachine.SetHWVirtExEnabled (KTSBool_True);
    415436
    416437    /* Clear the "GUI_FirstRun" extra data key in case if the boot order
     
    434455    mSelector->setItemText (GeneralId, tr ("General"));
    435456
     457    /* System page */
     458    mSelector->setItemText (SystemId, tr ("System"));
     459
    436460    /* Display page */
    437461    mSelector->setItemText (DisplayId, tr ("Display"));
     
    497521}
    498522
     523bool VBoxVMSettingsDlg::correlate (QWidget *aPage, QString &aWarning)
     524{
     525    /* This method performs correlation option check between
     526     * different pages of VM Settings dialog */
     527
     528    /* Guest OS type & VT-x/AMD-V option correlation test */
     529    if (aPage == mSelector->idToPage (GeneralId) ||
     530        aPage == mSelector->idToPage (SystemId))
     531    {
     532        VBoxVMSettingsGeneral *generalPage =
     533            qobject_cast <VBoxVMSettingsGeneral*> (mSelector->idToPage (GeneralId));
     534        VBoxVMSettingsSystem *systemPage =
     535            qobject_cast <VBoxVMSettingsSystem*> (mSelector->idToPage (SystemId));
     536
     537        if (generalPage && systemPage &&
     538            generalPage->is64BitOSTypeSelected() && !systemPage->isHWVirtExEnabled())
     539        {
     540            aWarning = tr (
     541                "there is a 64 bits guest OS type assigned for this VM, which "
     542                "requires virtualization feature (VT-x/AMD-V) to be enabled "
     543                "too, else your guest will fail to detect a 64 bits CPU and "
     544                "will not be able to boot, so this feature will be enabled "
     545                "automatically when you'll accept VM Settings by pressing OK "
     546                "button.");
     547            return true;
     548        }
     549    }
     550
     551    return true;
     552}
     553
    499554void VBoxVMSettingsDlg::onMediaEnumerationDone()
    500555{
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxVMSettingsGeneral.cpp

    r19664 r19837  
    2525#include "VBoxProblemReporter.h"
    2626#include "QIWidgetValidator.h"
    27 #include <iprt/asm.h>
    28 #include <VBox/x86.h>
    2927
    3028#include <QDir>
    31 
    32 #define ITEM_TYPE_ROLE Qt::UserRole + 1
    33 
    34 /**
    35  *  Calculates a suitable page step size for the given max value. The returned
    36  *  size is so that there will be no more than 32 pages. The minimum returned
    37  *  page size is 4.
    38  */
    39 static int calcPageStep (int aMax)
    40 {
    41     /* reasonable max. number of page steps is 32 */
    42     uint page = ((uint) aMax + 31) / 32;
    43     /* make it a power of 2 */
    44     uint p = page, p2 = 0x1;
    45     while ((p >>= 1))
    46         p2 <<= 1;
    47     if (page != p2)
    48         p2 <<= 1;
    49     if (p2 < 4)
    50         p2 = 4;
    51     return (int) p2;
    52 }
    5329
    5430VBoxVMSettingsGeneral::VBoxVMSettingsGeneral()
     
    5834    Ui::VBoxVMSettingsGeneral::setupUi (this);
    5935
    60     mOSTypeSelector->setLayoutPosition (1);
    61 
    62     /* Setup constants */
    63     CSystemProperties sys = vboxGlobal().virtualBox().GetSystemProperties();
    64     const uint MinRAM = sys.GetMinGuestRAM();
    65     const uint MaxRAM = sys.GetMaxGuestRAM();
    66 
    6736    /* Setup validators */
    6837    mLeName->setValidator (new QRegExpValidator (QRegExp (".+"), this));
    69     mLeRam->setValidator (new QIntValidator (MinRAM, MaxRAM, this));
    70 
    71     /* Setup connections */
    72     connect (mSlRam, SIGNAL (valueChanged (int)),
    73              this, SLOT (valueChangedRAM (int)));
    74     connect (mLeRam, SIGNAL (textChanged (const QString&)),
    75              this, SLOT (textChangedRAM (const QString&)));
    76     connect (mTbBootItemUp, SIGNAL (clicked()),
    77              this, SLOT (moveBootItemUp()));
    78     connect (mTbBootItemDown, SIGNAL (clicked()),
    79              this, SLOT (moveBootItemDown()));
    80     connect (mTwBootOrder, SIGNAL (moveItemUp()),
    81              this, SLOT (moveBootItemUp()));
    82     connect (mTwBootOrder, SIGNAL (moveItemDown()),
    83              this, SLOT (moveBootItemDown()));
    84     connect (mTwBootOrder, SIGNAL (itemToggled()),
    85              this, SIGNAL (tableChanged()));
    86     connect (mTwBootOrder, SIGNAL (currentItemChanged (QTreeWidgetItem*,
    87                                                        QTreeWidgetItem*)),
    88              this, SLOT (onCurrentBootItemChanged (QTreeWidgetItem*,
    89                                                    QTreeWidgetItem*)));
    90     connect (mCbVirt, SIGNAL (stateChanged (int)),
    91              this, SLOT (stateChangedVirt (int)));
    92 
    93     /* Setup iconsets */
    94     mTbBootItemUp->setIcon (VBoxGlobal::iconSet (":/list_moveup_16px.png",
    95                                                  ":/list_moveup_disabled_16px.png"));
    96     mTbBootItemDown->setIcon (VBoxGlobal::iconSet (":/list_movedown_16px.png",
    97                                                    ":/list_movedown_disabled_16px.png"));
    98 
    99     /* Setup initial values */
    100     mSlRam->setPageStep (calcPageStep (MaxRAM));
    101     mSlRam->setSingleStep (mSlRam->pageStep() / 4);
    102     mSlRam->setTickInterval (mSlRam->pageStep());
    103     /* Setup the scale so that ticks are at page step boundaries */
    104     mSlRam->setMinimum ((MinRAM / mSlRam->pageStep()) * mSlRam->pageStep());
    105     mSlRam->setMaximum (MaxRAM);
    106     /* Limit min/max. size of QLineEdit */
    107     mLeRam->setFixedWidthByText (QString().fill ('9', 5));
    108     /* Ensure mLeRam value and validation is updated */
    109     valueChangedRAM (mSlRam->value());
    11038
    11139    /* Shared Clipboard mode */
     
    11543    mCbClipboard->addItem (""); /* KClipboardMode_Bidirectional */
    11644
    117     /* IDE Controller Type */
    118     mCbIDEController->addItem (""); /* KIDEControllerType_PIIX3 */
    119     mCbIDEController->addItem (""); /* KIDEControllerType_PIIX4 */
    120     mCbIDEController->addItem (""); /* KIDEControllerType_ICH6  */
    121 
    122     qApp->installEventFilter (this);
    123 
    12445    /* Applying language settings */
    12546    retranslateUi();
     47}
     48
     49bool VBoxVMSettingsGeneral::is64BitOSTypeSelected() const
     50{
     51    return mOSTypeSelector->type().GetIs64Bit();
    12652}
    12753
     
    12955{
    13056    mMachine = aMachine;
    131     CBIOSSettings biosSettings = mMachine.GetBIOSSettings();
    13257
    13358    /* Name */
     
    13762    mOSTypeSelector->setType (vboxGlobal().vmGuestOSType (aMachine.GetOSTypeId()));
    13863
    139     /* RAM size */
    140     mSlRam->setValue (aMachine.GetMemorySize());
    141 
    142     /* Boot-order */
    143     {
    144         mTwBootOrder->clear();
    145         /* Load boot-items of current VM */
    146         QStringList uniqueList;
    147         for (int i = 1; i <= 4; ++ i)
    148         {
    149             KDeviceType type = mMachine.GetBootOrder (i);
    150             if (type != KDeviceType_Null)
    151             {
    152                 QString name = vboxGlobal().toString (type);
    153                 QTreeWidgetItem *item =
    154                     new QTreeWidgetItem (mTwBootOrder, QStringList (name));
    155                 QVariant vtype (type);
    156                 item->setData (0, ITEM_TYPE_ROLE, vtype);
    157                 item->setCheckState (0, Qt::Checked);
    158                 uniqueList << name;
    159             }
    160         }
    161         /* Load other unique boot-items */
    162         for (int i = KDeviceType_Floppy; i < KDeviceType_USB; ++ i)
    163         {
    164             QString name = vboxGlobal().toString ((KDeviceType) i);
    165             if (!uniqueList.contains (name))
    166             {
    167                 QTreeWidgetItem *item =
    168                     new QTreeWidgetItem (mTwBootOrder, QStringList (name));
    169                 item->setData (0, ITEM_TYPE_ROLE, i);
    170                 item->setCheckState (0, Qt::Unchecked);
    171                 uniqueList << name;
    172             }
    173         }
    174         adjustBootOrderTWSize();
    175     }
    176 
    177     /* ACPI */
    178     mCbAcpi->setChecked (biosSettings.GetACPIEnabled());
    179 
    180     /* IO APIC */
    181     mCbApic->setChecked (biosSettings.GetIOAPICEnabled());
    182 
    183     /* VT-x/AMD-V */
    184     bool fVTxAMDVSupported = vboxGlobal().virtualBox().GetHost()
    185                              .GetProcessorFeature (KProcessorFeature_HWVirtEx);
    186     mCbVirt->setEnabled (fVTxAMDVSupported);
    187     aMachine.GetHWVirtExEnabled() == KTSBool_True ?
    188         mCbVirt->setCheckState (Qt::Checked) :
    189         mCbVirt->setCheckState (Qt::Unchecked);
    190 
    191     /* Nested Paging */
    192     mCbNestedPaging->setEnabled (   fVTxAMDVSupported
    193                                  && aMachine.GetHWVirtExEnabled() == KTSBool_True);
    194     mCbNestedPaging->setChecked (aMachine.GetHWVirtExNestedPagingEnabled());
    195 
    196     /* PAE/NX */
    197     bool fPAESupported = vboxGlobal().virtualBox().GetHost()
    198                          .GetProcessorFeature (KProcessorFeature_PAE);
    199     mCbPae->setEnabled (fPAESupported);
    200     mCbPae->setChecked (aMachine.GetPAEEnabled());
     64    /* Remember mediums mounted at runtime */
     65    QString saveRtimeImages = mMachine.GetExtraData (VBoxDefs::GUI_SaveMountedAtRuntime);
     66    mCbSaveMounted->setChecked (saveRtimeImages != "no");
    20167
    20268    /* Snapshot folder */
     
    20470    mPsSnapshot->setHomeDir (QFileInfo (mMachine.GetSettingsFilePath()).absolutePath());
    20571
    206     /* Description */
    207     mTeDescription->setPlainText (aMachine.GetDescription());
    208 
    20972    /* Shared clipboard mode */
    21073    mCbClipboard->setCurrentIndex (aMachine.GetClipboardMode());
    21174
    212     /* IDE controller type */
    213     const QString ideName = QString("IDE");
    214     CStorageController ideCtl = aMachine.GetStorageControllerByName(ideName);
    215     mCbIDEController->setCurrentIndex (mCbIDEController->
    216         findText (vboxGlobal().toString (ideCtl.GetControllerType())));
    217 
    218     /* Other features */
    219     QString saveRtimeImages = mMachine.GetExtraData (VBoxDefs::GUI_SaveMountedAtRuntime);
    220     mCbSaveMounted->setChecked (saveRtimeImages != "no");
     75    /* Description */
     76    mTeDescription->setPlainText (aMachine.GetDescription());
    22177
    22278    if (mValidator)
     
    22682void VBoxVMSettingsGeneral::putBackTo()
    22783{
    228     /* Make auto-attenuation for some settings in this chapter: */
    229 
    230     /* Enable VT-x/AMD-V feature if the guest is of 64 bits */
    231     if (mOSTypeSelector->type().GetIs64Bit())
    232         mCbVirt->setChecked (true);
    233 
    234     /* Save user's predefined settings in this chapter: */
    235 
    236     CBIOSSettings biosSettings = mMachine.GetBIOSSettings();
    237 
    23884    /* Name */
    23985    mMachine.SetName (mLeName->text());
     
    24389    mMachine.SetOSTypeId (mOSTypeSelector->type().GetId());
    24490
    245     /* RAM size */
    246     mMachine.SetMemorySize (mSlRam->value());
    247 
    248     /* boot order */
    249     {
    250         /* Search for checked items */
    251         int index = 1;
    252 
    253         for (int i = 0; i < mTwBootOrder->topLevelItemCount(); ++ i)
    254         {
    255             QTreeWidgetItem *item = mTwBootOrder->topLevelItem (i);
    256             if (item->checkState (0) == Qt::Checked)
    257             {
    258                 KDeviceType type = vboxGlobal().toDeviceType (item->text (0));
    259                 mMachine.SetBootOrder (index ++, type);
    260             }
    261         }
    262 
    263         /* Search for non-checked items */
    264         for (int i = 0; i < mTwBootOrder->topLevelItemCount(); ++ i)
    265         {
    266             QTreeWidgetItem *item = mTwBootOrder->topLevelItem (i);
    267             if (item->checkState (0) != Qt::Checked)
    268                 mMachine.SetBootOrder (index ++, KDeviceType_Null);
    269         }
    270     }
    271 
    272     /* ACPI */
    273     biosSettings.SetACPIEnabled (mCbAcpi->isChecked());
    274 
    275     /* IO APIC */
    276     biosSettings.SetIOAPICEnabled (mCbApic->isChecked());
    277 
    278     /* VT-x/AMD-V */
    279     mMachine.SetHWVirtExEnabled (
    280         mCbVirt->checkState() == Qt::Checked ? KTSBool_True : KTSBool_False);
    281 
    282     /* Nested Paging */
    283     mMachine.SetHWVirtExNestedPagingEnabled (mCbNestedPaging->isChecked());
    284 
    285     /* PAE/NX */
    286     mMachine.SetPAEEnabled (mCbPae->isChecked());
     91    /* Remember mediums mounted at runtime */
     92    mMachine.SetExtraData (VBoxDefs::GUI_SaveMountedAtRuntime,
     93                           mCbSaveMounted->isChecked() ? "yes" : "no");
    28794
    28895    /* Saved state folder */
     
    295102    }
    296103
     104    /* Shared clipboard mode */
     105    mMachine.SetClipboardMode ((KClipboardMode) mCbClipboard->currentIndex());
     106
    297107    /* Description (set empty to null to avoid an empty <Description> node
    298108     * in the settings file) */
    299109    mMachine.SetDescription (mTeDescription->toPlainText().isEmpty() ?
    300110                             QString::null : mTeDescription->toPlainText());
    301 
    302     /* Shared clipboard mode */
    303     mMachine.SetClipboardMode ((KClipboardMode) mCbClipboard->currentIndex());
    304 
    305     /* IDE controller type */
    306     const QString ideName = QString("IDE");
    307     CStorageController ideCtl = mMachine.GetStorageControllerByName(ideName);
    308     ideCtl.SetControllerType (vboxGlobal().toIDEControllerType (mCbIDEController->currentText()));
    309 
    310     /* Other features */
    311     mMachine.SetExtraData (VBoxDefs::GUI_SaveMountedAtRuntime,
    312                            mCbSaveMounted->isChecked() ? "yes" : "no");
    313111}
    314112
     
    316114{
    317115    mValidator = aVal;
    318     connect (mCbVirt, SIGNAL (stateChanged (int)), mValidator, SLOT (revalidate()));
    319116    connect (mOSTypeSelector, SIGNAL (osTypeChanged()), mValidator, SLOT (revalidate()));
    320 }
    321 
    322 bool VBoxVMSettingsGeneral::revalidate (QString &aWarning, QString & /* aTitle */)
    323 {
    324     /* Come up with some nice round percent boundraries relative to
    325        the system memory. A max of 75% on a 256GB config is ridiculous,
    326        even on an 8GB rig reserving 2GB for the OS is way to conservative.
    327        The max numbers can be estimated using the following program:
    328 
    329             double calcMaxPct(uint64_t cbRam)
    330             {
    331                 double cbRamOverhead = cbRam * 0.0390625; // 160 bytes per page.
    332                 double cbRamForTheOS = RT_MAX(RT_MIN(_512M, cbRam * 0.25), _64M);
    333                 double OSPct  = (cbRamOverhead + cbRamForTheOS) * 100.0 / cbRam;
    334                 double MaxPct = 100 - OSPct;
    335                 return MaxPct;
    336             }
    337 
    338             int main()
    339             {
    340                 uint64_t cbRam = _1G;
    341                 for (; !(cbRam >> 33); cbRam += _1G)
    342                     printf("%8lluGB %.1f%% %8lluKB\n", cbRam >> 30, calcMaxPct(cbRam),
    343                            (uint64_t)(cbRam * calcMaxPct(cbRam) / 100.0) >> 20);
    344                 for (; !(cbRam >> 51); cbRam <<= 1)
    345                     printf("%8lluGB %.1f%% %8lluKB\n", cbRam >> 30, calcMaxPct(cbRam),
    346                            (uint64_t)(cbRam * calcMaxPct(cbRam) / 100.0) >> 20);
    347                 return 0;
    348             }
    349 
    350        Note. We might wanna put these calculations somewhere global later. */
    351     ulong fullSize = vboxGlobal().virtualBox().GetHost().GetMemorySize();
    352     double maxPct  = 0.75;
    353     double warnPct = 0.50;
    354     if (fullSize < 3072)
    355         /* done */;
    356     else if (fullSize < 4096)   /* 3GB */
    357         maxPct  = 0.80;
    358     else if (fullSize < 6144)   /* 4-5GB */
    359     {
    360         maxPct  = 0.84;
    361         warnPct = 0.60;
    362     }
    363     else if (fullSize < 8192)   /* 6-7GB */
    364     {
    365         maxPct  = 0.88;
    366         warnPct = 0.65;
    367     }
    368     else if (fullSize < 16384)  /* 8-15GB */
    369     {
    370         maxPct  = 0.90;
    371         warnPct = 0.70;
    372     }
    373     else if (fullSize < 32768)  /* 16-31GB */
    374     {
    375         maxPct  = 0.93;
    376         warnPct = 0.75;
    377     }
    378     else if (fullSize < 65536)  /* 32-63GB */
    379     {
    380         maxPct  = 0.94;
    381         warnPct = 0.80;
    382     }
    383     else if (fullSize < 131072) /* 64-127GB */
    384     {
    385         maxPct  = 0.95;
    386         warnPct = 0.85;
    387     }
    388     else                        /* 128GB- */
    389     {
    390         maxPct  = 0.96;
    391         warnPct = 0.90;
    392     }
    393 
    394     /* System RAM amount test */
    395     if (mSlRam->value() > maxPct * fullSize)
    396     {
    397         aWarning = tr (
    398             "you have assigned more than <b>%1%</b> of your computer's memory "
    399             "(<b>%2</b>) to the virtual machine. Not enough memory is left "
    400             "for your host operating system. Please select a smaller amount.")
    401             .arg ((unsigned)(maxPct * 100))
    402             .arg (vboxGlobal().formatSize ((uint64_t)fullSize * _1M));
    403         return false;
    404     }
    405     if (mSlRam->value() > warnPct * fullSize)
    406     {
    407         aWarning = tr (
    408             "you have assigned more than <b>%1%</b> of your computer's memory "
    409             "(<b>%2</b>) to the virtual machine. Not enough memory might be "
    410             "left for your host operating system. Continue at your own risk.")
    411             .arg ((unsigned)(warnPct * 100))
    412             .arg (vboxGlobal().formatSize ((uint64_t)fullSize * _1M));
    413         return true;
    414     }
    415 
    416     /* Guest OS type & VT-x/AMD-V option correlation test */
    417     if (mOSTypeSelector->type().GetIs64Bit() && !mCbVirt->isChecked())
    418     {
    419         aWarning = tr (
    420             "there is a 64 bits guest OS type assigned for this VM, which "
    421             "requires virtualization feature (VT-x/AMD-V) to be enabled "
    422             "too, else your guest will fail to detect a 64 bits CPU and "
    423             "will not be able to boot, so this feature will be enabled "
    424             "automatically when you'll accept VM Settings by pressing OK "
    425             "button.");
    426         return true;
    427     }
    428 
    429     return true;
    430117}
    431118
     
    433120{
    434121    /* Setup Tab order */
    435     setTabOrder (aWidget, mTabGeneral->focusProxy());
    436     setTabOrder (mTabGeneral->focusProxy(), mLeName);
     122    setTabOrder (aWidget, mTwGeneral->focusProxy());
     123    setTabOrder (mTwGeneral->focusProxy(), mLeName);
    437124    setTabOrder (mLeName, mOSTypeSelector);
    438     setTabOrder (mOSTypeSelector, mSlRam);
    439     setTabOrder (mSlRam, mLeRam);
    440125
    441     setTabOrder (mLeRam, mTwBootOrder);
    442     setTabOrder (mTwBootOrder, mTbBootItemUp);
    443     setTabOrder (mTbBootItemUp, mTbBootItemDown);
    444     setTabOrder (mTbBootItemDown, mCbAcpi);
    445     setTabOrder (mCbAcpi, mCbApic);
    446     setTabOrder (mCbApic, mCbVirt);
    447     setTabOrder (mCbVirt, mCbNestedPaging);
    448     setTabOrder (mCbNestedPaging, mCbPae);
    449     setTabOrder (mCbPae, mCbClipboard);
    450     setTabOrder (mCbClipboard, mCbIDEController);
    451     setTabOrder (mCbIDEController, mPsSnapshot);
     126    setTabOrder (mOSTypeSelector, mPsSnapshot);
     127    setTabOrder (mPsSnapshot, mCbClipboard);
     128    setTabOrder (mCbClipboard, mCbSaveMounted);
    452129
    453     setTabOrder (mPsSnapshot, mTeDescription);
    454 
    455     setTabOrder (mTeDescription, mCbSaveMounted);
     130    setTabOrder (mCbSaveMounted, mTeDescription);
    456131}
    457132
     
    460135    /* Translate uic generated strings */
    461136    Ui::VBoxVMSettingsGeneral::retranslateUi (this);
    462     mTwBootOrder->header()->setResizeMode (QHeaderView::ResizeToContents);
    463     mTwBootOrder->resizeColumnToContents (0);
    464     mTwBootOrder->updateGeometry();
    465137
    466     CSystemProperties sys = vboxGlobal().virtualBox().GetSystemProperties();
    467     mLbRamMin->setText (tr ("<qt>%1&nbsp;MB</qt>").arg (sys.GetMinGuestRAM()));
    468     mLbRamMax->setText (tr ("<qt>%1&nbsp;MB</qt>").arg (sys.GetMaxGuestRAM()));
    469 
    470     /* Retranslate the boot order items */
    471     QTreeWidgetItemIterator it (mTwBootOrder);
    472     while (*it)
    473     {
    474         QTreeWidgetItem *item = (*it);
    475         item->setText (0, vboxGlobal().toString (
    476              static_cast<KDeviceType> (item->data (0, ITEM_TYPE_ROLE).toInt())));
    477         ++it;
    478     }
    479     /* Readjust the tree widget size */
    480     adjustBootOrderTWSize();
     138    /* Path selector */
     139    mPsSnapshot->setWhatsThis (tr ("Displays the path where snapshots of this "
     140                                   "virtual machine will be stored. Note that "
     141                                   "snapshots can take quite a lot of disk "
     142                                   "space."));
    481143
    482144    /* Shared Clipboard mode */
     
    485147    mCbClipboard->setItemText (2, vboxGlobal().toString (KClipboardMode_GuestToHost));
    486148    mCbClipboard->setItemText (3, vboxGlobal().toString (KClipboardMode_Bidirectional));
    487 
    488     /* IDE Controller Type */
    489     mCbIDEController->setItemText (0, vboxGlobal().toString (KStorageControllerType_PIIX3));
    490     mCbIDEController->setItemText (1, vboxGlobal().toString (KStorageControllerType_PIIX4));
    491     mCbIDEController->setItemText (2, vboxGlobal().toString (KStorageControllerType_ICH6));
    492 
    493     /* Path selector */
    494     mPsSnapshot->setWhatsThis (tr ("Displays the path where snapshots of this "
    495                                    "virtual machine will be stored. Note that "
    496                                    "snapshots can take quite a lot of disk "
    497                                    "space."));
    498 }
    499 
    500 
    501 void VBoxVMSettingsGeneral::valueChangedRAM (int aVal)
    502 {
    503     mLeRam->setText (QString().setNum (aVal));
    504 }
    505 
    506 void VBoxVMSettingsGeneral::textChangedRAM (const QString &aText)
    507 {
    508     mSlRam->setValue (aText.toInt());
    509 }
    510 
    511 void VBoxVMSettingsGeneral::moveBootItemUp()
    512 {
    513     QTreeWidgetItem *item = mTwBootOrder->currentItem();
    514     Assert (item);
    515     if (!mTwBootOrder->itemAbove (item))
    516         return;
    517 
    518     int index = mTwBootOrder->indexOfTopLevelItem (item);
    519     QTreeWidgetItem *takenItem = mTwBootOrder->takeTopLevelItem (index);
    520     Assert (takenItem == item);
    521 
    522     mTwBootOrder->insertTopLevelItem (index - 1, takenItem);
    523     mTwBootOrder->setCurrentItem (item);
    524 
    525     emit tableChanged();
    526 }
    527 
    528 void VBoxVMSettingsGeneral::moveBootItemDown()
    529 {
    530     QTreeWidgetItem *item = mTwBootOrder->currentItem();
    531     Assert (item);
    532     if (!mTwBootOrder->itemBelow (item))
    533         return;
    534 
    535     int index = mTwBootOrder->indexOfTopLevelItem (item);
    536     QTreeWidgetItem *takenItem = mTwBootOrder->takeTopLevelItem (index);
    537     Assert (takenItem == item);
    538 
    539     mTwBootOrder->insertTopLevelItem (index + 1, takenItem);
    540     mTwBootOrder->setCurrentItem (item);
    541 
    542     emit tableChanged();
    543 }
    544 
    545 void VBoxVMSettingsGeneral::onCurrentBootItemChanged (QTreeWidgetItem *aItem,
    546                                                       QTreeWidgetItem *)
    547 {
    548     bool upEnabled   = aItem && mTwBootOrder->itemAbove (aItem);
    549     bool downEnabled = aItem && mTwBootOrder->itemBelow (aItem);
    550     if ((mTbBootItemUp->hasFocus() && !upEnabled) ||
    551         (mTbBootItemDown->hasFocus() && !downEnabled))
    552         mTwBootOrder->setFocus();
    553     mTbBootItemUp->setEnabled (upEnabled);
    554     mTbBootItemDown->setEnabled (downEnabled);
    555 }
    556 
    557 void VBoxVMSettingsGeneral::stateChangedVirt (int /* aState */)
    558 {
    559     mCbNestedPaging->setEnabled (mCbVirt->checkState());
    560 }
    561 
    562 void VBoxVMSettingsGeneral::adjustBootOrderTWSize()
    563 {
    564     /* Calculate the optimal size of the tree widget & set it as fixed
    565      * size. */
    566     mTwBootOrder->setFixedSize (
    567         static_cast<QAbstractItemView*> (mTwBootOrder)
    568         ->sizeHintForColumn (0) + 2 * mTwBootOrder->frameWidth(),
    569         static_cast<QAbstractItemView*> (mTwBootOrder)
    570         ->sizeHintForRow (0) * mTwBootOrder->topLevelItemCount() +
    571         2 * mTwBootOrder->frameWidth());
    572 
    573     /* Update the layout system */
    574     mWBootContainer->layout()->activate();
    575     mTabAdvanced->layout()->activate();
    576     mTabAdvanced->layout()->update();
    577 }
    578 
    579 bool VBoxVMSettingsGeneral::eventFilter (QObject *aObject, QEvent *aEvent)
    580 {
    581     if (!aObject->isWidgetType())
    582         return QWidget::eventFilter (aObject, aEvent);
    583 
    584     QWidget *widget = static_cast<QWidget*> (aObject);
    585     if (widget->window() != window())
    586         return QWidget::eventFilter (aObject, aEvent);
    587 
    588     switch (aEvent->type())
    589     {
    590         case QEvent::FocusIn:
    591         {
    592             /* Boot Table */
    593             if (widget == mTwBootOrder)
    594             {
    595                 if (!mTwBootOrder->currentItem())
    596                     mTwBootOrder->setCurrentItem (mTwBootOrder->topLevelItem (0));
    597                 else
    598                     onCurrentBootItemChanged (mTwBootOrder->currentItem());
    599                 mTwBootOrder->currentItem()->setSelected (true);
    600             }
    601             else if (widget != mTbBootItemUp && widget != mTbBootItemDown)
    602             {
    603                 if (mTwBootOrder->currentItem())
    604                 {
    605                     mTwBootOrder->currentItem()->setSelected (false);
    606                     mTbBootItemUp->setEnabled (false);
    607                     mTbBootItemDown->setEnabled (false);
    608                 }
    609             }
    610             break;
    611         }
    612         default:
    613             break;
    614     }
    615 
    616     return QWidget::eventFilter (aObject, aEvent);
    617149}
    618150
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxVMSettingsHD.cpp

    r19239 r19837  
    574574
    575575    /* Setup table-view */
     576    mTwAts->setMinimumHeight (100);
    576577    mTwAts->verticalHeader()->setDefaultSectionSize (
    577578        (int) (mTwAts->fontMetrics().height() * 1.30 /* 130% of font height */));
     
    637638             HDSettings::instance(), SLOT (update()));
    638639
     640    /* IDE Controller Type */
     641    mCbIDEController->addItem (""); /* KIDEControllerType_PIIX3 */
     642    mCbIDEController->addItem (""); /* KIDEControllerType_PIIX4 */
     643    mCbIDEController->addItem (""); /* KIDEControllerType_ICH6  */
     644
     645
     646    /* Additional Controller Type */
     647    mCbControllerType->addItem ("", KStorageControllerType_IntelAhci);
     648    mCbControllerType->addItem ("", KStorageControllerType_LsiLogic);
     649    mCbControllerType->addItem ("", KStorageControllerType_BusLogic);
     650
    639651    /* Install global event filter */
    640652    qApp->installEventFilter (this);
     
    648660    mMachine = aMachine;
    649661    HDSettings::instance()->setMachine (mMachine);
     662
     663    /* IDE controller type */
     664    const QString ideName = QString ("IDE");
     665    CStorageController ideCtl = aMachine.GetStorageControllerByName (ideName);
     666    mCbIDEController->setCurrentIndex (mCbIDEController->
     667        findText (vboxGlobal().toString (ideCtl.GetControllerType())));
    650668
    651669    /* For now we search for the first one which isn't IDE */
     
    691709void VBoxVMSettingsHD::putBackTo()
    692710{
     711    /* IDE controller type */
     712    const QString ideName = QString ("IDE");
     713    CStorageController ideCtl = mMachine.GetStorageControllerByName(ideName);
     714    ideCtl.SetControllerType (vboxGlobal().toIDEControllerType (mCbIDEController->currentText()));
     715
    693716    /* Detach all attached Hard Disks */
    694717    CHardDiskAttachmentVector vec = mMachine.GetHardDiskAttachments();
     
    702725        if (!mMachine.isOk())
    703726        {
    704             CStorageController ctl = mMachine.GetStorageControllerByName(hda.GetController());
     727            CStorageController ctl = mMachine.GetStorageControllerByName (hda.GetController());
    705728            vboxProblem().cannotDetachHardDisk (this, mMachine,
    706729                vboxGlobal().getMedium (CMedium (hda.GetHardDisk())).location(),
     
    709732    }
    710733
    711 
    712734    /* Clear all storage controllers beside the IDE one */
    713735    CStorageController addController;
    714     QVector<CStorageController> scs = mMachine.GetStorageControllers();
     736    QVector <CStorageController> scs = mMachine.GetStorageControllers();
    715737    foreach (const CStorageController &sc, scs)
    716738        if (sc.GetBus() != KStorageBus_IDE)
     
    748770        }
    749771
    750         mMachine.AttachHardDisk(list [i].disk.id,
    751                                 ctrlName, list [i].slot.channel, list [i].slot.device);
     772        mMachine.AttachHardDisk (list [i].disk.id,
     773                                 ctrlName, list [i].slot.channel, list [i].slot.device);
    752774        /* [dsen] check this */
    753775        if (!mMachine.isOk())
    754776            vboxProblem().cannotAttachHardDisk (this, mMachine,
    755777                vboxGlobal().getMedium (CMedium (vboxGlobal().virtualBox()
    756                 .GetHardDisk(list [i].disk.id))).location(),
     778                .GetHardDisk (list [i].disk.id))).location(),
    757779                list [i].slot.bus, list [i].slot.channel, list [i].slot.device);
    758780    }
     
    804826void VBoxVMSettingsHD::setOrderAfter (QWidget *aWidget)
    805827{
    806     setTabOrder (aWidget, mAddControllerCheck);
    807     setTabOrder (mAddControllerCheck, mTwAts);
     828    setTabOrder (aWidget, mCbIDEController);
     829    setTabOrder (mCbIDEController, mAddControllerCheck);
     830    setTabOrder (mAddControllerCheck, mCbControllerType);
     831    setTabOrder (mCbControllerType, mTwAts);
    808832    setTabOrder (mTwAts, mShowDiffsCheck);
    809833}
     
    814838    Ui::VBoxVMSettingsHD::retranslateUi (this);
    815839
     840    /* IDE Controller Type */
     841    mCbIDEController->setItemText (0, vboxGlobal().toString (KStorageControllerType_PIIX3));
     842    mCbIDEController->setItemText (1, vboxGlobal().toString (KStorageControllerType_PIIX4));
     843    mCbIDEController->setItemText (2, vboxGlobal().toString (KStorageControllerType_ICH6));
     844
     845    /* Additional Controller Type */
     846    mCbControllerType->setItemText (0, QString ("%1 (%2)").arg (vboxGlobal().toString (KStorageBus_SATA))
     847                                                          .arg (vboxGlobal().toString (KStorageControllerType_IntelAhci)));
     848    mCbControllerType->setItemText (1, QString ("%1 (%2)").arg (vboxGlobal().toString (KStorageBus_SCSI))
     849                                                          .arg (vboxGlobal().toString (KStorageControllerType_LsiLogic)));
     850    mCbControllerType->setItemText (2, QString ("%1 (%2)").arg (vboxGlobal().toString (KStorageBus_SCSI))
     851                                                          .arg (vboxGlobal().toString (KStorageControllerType_BusLogic)));
     852
     853    /* Attachments List */
    816854    mNewAction->setText (tr ("&Add Attachment"));
    817855    mDelAction->setText (tr ("&Remove Attachment"));
     
    830868                                  "a hard disk to attach to the currently "
    831869                                  "highlighted slot."));
    832 
    833     prepareComboboxes();
    834870}
    835871
     
    11821218}
    11831219
    1184 void VBoxVMSettingsHD::prepareComboboxes()
    1185 {
    1186     /* Save the current selected value */
    1187     int current = mCbControllerType->currentIndex();
    1188     if (current == -1)
    1189         current = 0;
    1190     /* Clear the driver box */
    1191     mCbControllerType->clear();
    1192     /* Refill them */
    1193     mCbControllerType->addItem (QString ("%1 (%2)").arg (vboxGlobal().toString (KStorageBus_SATA)).arg (vboxGlobal().toString (KStorageControllerType_IntelAhci)), KStorageControllerType_IntelAhci);
    1194     mCbControllerType->addItem (QString ("%1 (%2)").arg (vboxGlobal().toString (KStorageBus_SCSI)).arg (vboxGlobal().toString (KStorageControllerType_LsiLogic)), KStorageControllerType_LsiLogic);
    1195     mCbControllerType->addItem (QString ("%1 (%2)").arg (vboxGlobal().toString (KStorageBus_SCSI)).arg (vboxGlobal().toString (KStorageControllerType_BusLogic)), KStorageControllerType_BusLogic);
    1196 
    1197     /* Set the old value */
    1198     mCbControllerType->setCurrentIndex (current);
    1199 }
    1200 
    12011220void VBoxVMSettingsHD::removeFocus()
    12021221{
  • trunk/src/VBox/Frontends/VirtualBox/ui/VBoxVMSettingsGeneral.ui

    r19664 r19837  
    2323    <x>0</x>
    2424    <y>0</y>
    25     <width>451</width>
    26     <height>497</height>
     25    <width>350</width>
     26    <height>250</height>
    2727   </rect>
    2828  </property>
    29   <layout class="QHBoxLayout" >
     29  <layout class="QHBoxLayout" name="mLtMain" >
    3030   <item>
    31     <widget class="QTabWidget" name="mTabGeneral" >
     31    <widget class="QTabWidget" name="mTwGeneral" >
    3232     <property name="currentIndex" >
    3333      <number>0</number>
     
    3737       <string>&amp;Basic</string>
    3838      </attribute>
    39       <layout class="QVBoxLayout" >
    40        <item>
    41         <widget class="VBoxOSTypeSelectorWidget" name="mOSTypeSelector" >
    42          <layout class="QGridLayout" >
    43           <property name="leftMargin" >
    44            <number>0</number>
    45           </property>
    46           <property name="topMargin" >
    47            <number>0</number>
    48           </property>
    49           <property name="rightMargin" >
    50            <number>0</number>
    51           </property>
    52           <property name="bottomMargin" >
     39      <layout class="QVBoxLayout" name="mLtBasic" >
     40       <property name="spacing" >
     41        <number>0</number>
     42       </property>
     43       <item>
     44        <widget class="VBoxOSTypeSelectorWidget" native="1" name="mOSTypeSelector" >
     45         <layout class="QGridLayout" name="mLtOSTypeSelector" >
     46          <property name="margin" >
    5347           <number>0</number>
    5448          </property>
     
    7165             <string>Displays the name of the virtual machine.</string>
    7266            </property>
    73            </widget>
    74           </item>
    75           <item row="3" column="0" >
    76            <widget class="QLabel" name="mLbRam" >
    77             <property name="text" >
    78              <string>Base &amp;Memory:</string>
    79             </property>
    80             <property name="alignment" >
    81              <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
    82             </property>
    83             <property name="buddy" >
    84              <cstring>mLeRam</cstring>
    85             </property>
    86            </widget>
    87           </item>
    88           <item rowspan="2" row="3" column="1" colspan="2" >
    89            <layout class="QGridLayout" >
    90             <item rowspan="2" row="0" column="0" >
    91              <layout class="QVBoxLayout" >
    92               <property name="spacing" >
    93                <number>0</number>
    94               </property>
    95               <item>
    96                <widget class="QSlider" name="mSlRam" >
    97                 <property name="whatsThis" >
    98                  <string>Controls the amount of memory provided to the virtual machine. If you assign too much, the machine might not start.</string>
    99                 </property>
    100                 <property name="orientation" >
    101                  <enum>Qt::Horizontal</enum>
    102                 </property>
    103                 <property name="tickPosition" >
    104                  <enum>QSlider::TicksBelow</enum>
    105                 </property>
    106                </widget>
    107               </item>
    108               <item>
    109                <layout class="QHBoxLayout" >
    110                 <item>
    111                  <widget class="QLabel" name="mLbRamMin" >
    112                   <property name="sizePolicy" >
    113                    <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
    114                     <horstretch>0</horstretch>
    115                     <verstretch>0</verstretch>
    116                    </sizepolicy>
    117                   </property>
    118                  </widget>
    119                 </item>
    120                 <item>
    121                  <spacer>
    122                   <property name="orientation" >
    123                    <enum>Qt::Horizontal</enum>
    124                   </property>
    125                   <property name="sizeHint" >
    126                    <size>
    127                     <width>0</width>
    128                     <height>0</height>
    129                    </size>
    130                   </property>
    131                  </spacer>
    132                 </item>
    133                 <item>
    134                  <widget class="QLabel" name="mLbRamMax" >
    135                   <property name="sizePolicy" >
    136                    <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
    137                     <horstretch>0</horstretch>
    138                     <verstretch>0</verstretch>
    139                    </sizepolicy>
    140                   </property>
    141                   <property name="alignment" >
    142                    <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
    143                   </property>
    144                  </widget>
    145                 </item>
    146                </layout>
    147               </item>
    148              </layout>
    149             </item>
    150             <item row="0" column="1" >
    151              <layout class="QHBoxLayout" >
    152               <property name="spacing" >
    153                <number>4</number>
    154               </property>
    155               <item>
    156                <widget class="QILineEdit" name="mLeRam" >
    157                 <property name="sizePolicy" >
    158                  <sizepolicy vsizetype="Fixed" hsizetype="Maximum" >
    159                   <horstretch>0</horstretch>
    160                   <verstretch>0</verstretch>
    161                  </sizepolicy>
    162                 </property>
    163                 <property name="whatsThis" >
    164                  <string>Controls the amount of memory provided to the virtual machine. If you assign too much, the machine might not start.</string>
    165                 </property>
    166                </widget>
    167               </item>
    168               <item>
    169                <widget class="QLabel" name="mLbRamUnit" >
    170                 <property name="sizePolicy" >
    171                  <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
    172                   <horstretch>0</horstretch>
    173                   <verstretch>0</verstretch>
    174                  </sizepolicy>
    175                 </property>
    176                 <property name="text" >
    177                  <string>MB</string>
    178                 </property>
    179                </widget>
    180               </item>
    181              </layout>
    182             </item>
    183            </layout>
     67            <property name="text" >
     68             <string/>
     69            </property>
     70           </widget>
    18471          </item>
    18572         </layout>
     
    18774       </item>
    18875       <item>
    189         <spacer>
     76        <spacer name="mSpVer1" >
    19077         <property name="orientation" >
    19178          <enum>Qt::Vertical</enum>
    19279         </property>
    193          <property name="sizeHint" >
     80         <property name="sizeHint" stdset="0" >
    19481          <size>
    195            <width>20</width>
     82           <width>0</width>
    19683           <height>0</height>
    19784          </size>
     
    20592       <string>&amp;Advanced</string>
    20693      </attribute>
    207       <layout class="QGridLayout" >
    208        <item row="0" column="0" >
    209         <widget class="QLabel" name="mGbBootOrder" >
    210          <property name="text" >
    211           <string>Boo&amp;t Order:</string>
    212          </property>
    213          <property name="alignment" >
    214           <set>Qt::AlignRight|Qt::AlignTop|Qt::AlignTrailing</set>
    215          </property>
    216          <property name="buddy" >
    217           <cstring>mTwBootOrder</cstring>
    218          </property>
    219         </widget>
    220        </item>
    221        <item row="0" column="1" >
    222         <widget class="QWidget" native="1" name="widget" >
    223          <property name="sizePolicy" >
    224           <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
    225            <horstretch>0</horstretch>
    226            <verstretch>0</verstretch>
    227           </sizepolicy>
    228          </property>
    229          <layout class="QHBoxLayout" >
    230           <property name="leftMargin" >
     94      <layout class="QVBoxLayout" name="mLtAdvanced" >
     95       <property name="spacing" >
     96        <number>0</number>
     97       </property>
     98       <item>
     99        <widget class="QWidget" native="1" name="mWtAdvanced" >
     100         <layout class="QGridLayout" name="mLtAdvancedItems" >
     101          <property name="margin" >
    231102           <number>0</number>
    232103          </property>
    233           <property name="topMargin" >
    234            <number>0</number>
    235           </property>
    236           <property name="rightMargin" >
    237            <number>0</number>
    238           </property>
    239           <property name="bottomMargin" >
    240            <number>0</number>
    241           </property>
    242           <item>
    243            <widget class="QWidget" native="1" name="mWBootContainer" >
    244             <layout class="QHBoxLayout" >
    245              <property name="leftMargin" >
    246               <number>0</number>
    247              </property>
    248              <property name="topMargin" >
    249               <number>0</number>
    250              </property>
    251              <property name="rightMargin" >
    252               <number>0</number>
    253              </property>
    254              <property name="bottomMargin" >
    255               <number>0</number>
    256              </property>
    257              <item>
    258               <layout class="QVBoxLayout" >
    259                <property name="spacing" >
    260                 <number>0</number>
    261                </property>
    262                <item>
    263                 <widget class="BootItemsTable" name="mTwBootOrder" >
    264                  <property name="whatsThis" >
    265                   <string>Defines the boot device order. Use checkboxes to the left to enable or disable individual boot devices. Move items up and down to change the device order.</string>
    266                  </property>
    267                  <property name="verticalScrollBarPolicy" >
    268                   <enum>Qt::ScrollBarAlwaysOff</enum>
    269                  </property>
    270                  <property name="horizontalScrollBarPolicy" >
    271                   <enum>Qt::ScrollBarAlwaysOff</enum>
    272                  </property>
    273                  <property name="alternatingRowColors" >
    274                   <bool>true</bool>
    275                  </property>
    276                  <property name="rootIsDecorated" >
    277                   <bool>false</bool>
    278                  </property>
    279                  <property name="uniformRowHeights" >
    280                   <bool>true</bool>
    281                  </property>
    282                  <column>
    283                   <property name="text" >
    284                    <string>[device]</string>
    285                   </property>
    286                  </column>
    287                 </widget>
    288                </item>
    289               </layout>
    290              </item>
    291              <item>
    292               <layout class="QVBoxLayout" >
    293                <property name="spacing" >
    294                 <number>0</number>
    295                </property>
    296                <item>
    297                 <widget class="QToolButton" name="mTbBootItemUp" >
    298                  <property name="enabled" >
    299                   <bool>false</bool>
    300                  </property>
    301                  <property name="focusPolicy" >
    302                   <enum>Qt::StrongFocus</enum>
    303                  </property>
    304                  <property name="toolTip" >
    305                   <string>Move Up (Ctrl-Up)</string>
    306                  </property>
    307                  <property name="whatsThis" >
    308                   <string>Moves the selected boot device up.</string>
    309                  </property>
    310                  <property name="text" >
    311                   <string/>
    312                  </property>
    313                  <property name="autoRaise" >
    314                   <bool>true</bool>
    315                  </property>
    316                 </widget>
    317                </item>
    318                <item>
    319                 <widget class="QToolButton" name="mTbBootItemDown" >
    320                  <property name="enabled" >
    321                   <bool>false</bool>
    322                  </property>
    323                  <property name="focusPolicy" >
    324                   <enum>Qt::StrongFocus</enum>
    325                  </property>
    326                  <property name="toolTip" >
    327                   <string>Move Down (Ctrl-Down)</string>
    328                  </property>
    329                  <property name="whatsThis" >
    330                   <string>Moves the selected boot device down.</string>
    331                  </property>
    332                  <property name="text" >
    333                   <string/>
    334                  </property>
    335                  <property name="autoRaise" >
    336                   <bool>true</bool>
    337                  </property>
    338                 </widget>
    339                </item>
    340                <item>
    341                 <spacer>
    342                  <property name="orientation" >
    343                   <enum>Qt::Vertical</enum>
    344                  </property>
    345                  <property name="sizeType" >
    346                   <enum>QSizePolicy::Expanding</enum>
    347                  </property>
    348                  <property name="sizeHint" >
    349                   <size>
    350                    <width>4</width>
    351                    <height>0</height>
    352                   </size>
    353                  </property>
    354                 </spacer>
    355                </item>
    356               </layout>
    357              </item>
    358             </layout>
     104          <item row="0" column="0" >
     105           <widget class="QLabel" name="mLbSnapshot" >
     106            <property name="text" >
     107             <string>S&amp;napshot Folder:</string>
     108            </property>
     109            <property name="alignment" >
     110             <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
     111            </property>
     112            <property name="buddy" >
     113             <cstring>mPsSnapshot</cstring>
     114            </property>
     115           </widget>
     116          </item>
     117          <item row="0" column="1" colspan="2" >
     118           <widget class="VBoxFilePathSelectorWidget" name="mPsSnapshot" >
     119            <property name="sizePolicy" >
     120             <sizepolicy vsizetype="Fixed" hsizetype="MinimumExpanding" >
     121              <horstretch>0</horstretch>
     122              <verstretch>0</verstretch>
     123             </sizepolicy>
     124            </property>
     125           </widget>
     126          </item>
     127          <item row="1" column="0" >
     128           <widget class="QLabel" name="mLbClipboard" >
     129            <property name="text" >
     130             <string>&amp;Shared Clipboard:</string>
     131            </property>
     132            <property name="alignment" >
     133             <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
     134            </property>
     135            <property name="buddy" >
     136             <cstring>mCbClipboard</cstring>
     137            </property>
     138           </widget>
     139          </item>
     140          <item row="1" column="1" >
     141           <widget class="QComboBox" name="mCbClipboard" >
     142            <property name="sizePolicy" >
     143             <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
     144              <horstretch>0</horstretch>
     145              <verstretch>0</verstretch>
     146             </sizepolicy>
     147            </property>
     148            <property name="whatsThis" >
     149             <string>Defines the mode of sharing the clipboard between the guest and the host OS. Note that this feature requires Guest Additions to be installed in the guest OS.</string>
     150            </property>
     151           </widget>
     152          </item>
     153          <item row="1" column="2" >
     154           <spacer name="mSpHor1" >
     155            <property name="orientation" >
     156             <enum>Qt::Horizontal</enum>
     157            </property>
     158            <property name="sizeHint" stdset="0" >
     159             <size>
     160              <width>0</width>
     161              <height>0</height>
     162             </size>
     163            </property>
     164           </spacer>
     165          </item>
     166          <item row="2" column="1" >
     167           <widget class="QCheckBox" name="mCbSaveMounted" >
     168            <property name="sizePolicy" >
     169             <sizepolicy vsizetype="Fixed" hsizetype="MinimumExpanding" >
     170              <horstretch>0</horstretch>
     171              <verstretch>0</verstretch>
     172             </sizepolicy>
     173            </property>
     174            <property name="whatsThis" >
     175             <string>If checked, any change to mounted CD/DVD or Floppy media performed during machine execution will be saved in the settings file in order to preserve the configuration of mounted media between runs.</string>
     176            </property>
     177            <property name="text" >
     178             <string>&amp;Remember Runtime Changes</string>
     179            </property>
     180            <property name="checked" >
     181             <bool>true</bool>
     182            </property>
     183           </widget>
     184          </item>
     185          <item row="2" column="0" >
     186           <widget class="QLabel" name="mLbAdvanced" >
     187            <property name="text" >
     188             <string>Removable Media:</string>
     189            </property>
     190            <property name="alignment" >
     191             <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
     192            </property>
    359193           </widget>
    360194          </item>
     
    362196        </widget>
    363197       </item>
    364        <item row="1" column="0" >
    365         <widget class="QLabel" name="mGbAdvanced" >
    366          <property name="text" >
    367           <string>Extended Features:</string>
    368          </property>
    369          <property name="alignment" >
    370           <set>Qt::AlignRight|Qt::AlignTop|Qt::AlignTrailing</set>
    371          </property>
    372          <property name="buddy" >
    373           <cstring>mCbAcpi</cstring>
    374          </property>
    375         </widget>
    376        </item>
    377        <item row="1" column="1" >
    378         <layout class="QVBoxLayout" >
    379          <item>
    380           <widget class="QCheckBox" name="mCbAcpi" >
    381            <property name="sizePolicy" >
    382             <sizepolicy vsizetype="Fixed" hsizetype="MinimumExpanding" >
    383              <horstretch>0</horstretch>
    384              <verstretch>0</verstretch>
    385             </sizepolicy>
    386            </property>
    387            <property name="whatsThis" >
    388             <string>When checked, the virtual machine will support the Advanced Configuration and Power Management Interface (ACPI). &lt;b>Note:&lt;/b> don't disable this feature after having installed a Windows guest operating system!</string>
    389            </property>
    390            <property name="text" >
    391             <string>Enable A&amp;CPI</string>
    392            </property>
    393           </widget>
    394          </item>
    395          <item>
    396           <widget class="QCheckBox" name="mCbApic" >
    397            <property name="sizePolicy" >
    398             <sizepolicy vsizetype="Fixed" hsizetype="MinimumExpanding" >
    399              <horstretch>0</horstretch>
    400              <verstretch>0</verstretch>
    401             </sizepolicy>
    402            </property>
    403            <property name="whatsThis" >
    404             <string>When checked, the virtual machine will support the Input Output APIC (IO APIC), which may slightly decrease the VM performance. &lt;b>Note:&lt;/b> don't disable this feature after having installed a Windows guest operating system!</string>
    405            </property>
    406            <property name="text" >
    407             <string>Enable IO A&amp;PIC</string>
    408            </property>
    409           </widget>
    410          </item>
    411          <item>
    412           <widget class="QCheckBox" name="mCbVirt" >
    413            <property name="sizePolicy" >
    414             <sizepolicy vsizetype="Fixed" hsizetype="MinimumExpanding" >
    415              <horstretch>0</horstretch>
    416              <verstretch>0</verstretch>
    417             </sizepolicy>
    418            </property>
    419            <property name="whatsThis" >
    420             <string>When checked, the virtual machine will try to make use of the host CPU's hardware virtualization extensions such as Intel VT-x and AMD-V.</string>
    421            </property>
    422            <property name="text" >
    423             <string>Enable &amp;VT-x/AMD-V</string>
    424            </property>
    425           </widget>
    426          </item>
    427          <item>
    428           <layout class="QHBoxLayout" >
    429            <item>
    430             <spacer>
    431              <property name="orientation" >
    432               <enum>Qt::Horizontal</enum>
    433              </property>
    434              <property name="sizeType" >
    435               <enum>QSizePolicy::Fixed</enum>
    436              </property>
    437              <property name="sizeHint" >
    438               <size>
    439                <width>20</width>
    440                <height>0</height>
    441               </size>
    442              </property>
    443             </spacer>
    444            </item>
    445            <item>
    446             <widget class="QCheckBox" name="mCbNestedPaging" >
    447              <property name="sizePolicy" >
    448               <sizepolicy vsizetype="Fixed" hsizetype="MinimumExpanding" >
    449                <horstretch>0</horstretch>
    450                <verstretch>0</verstretch>
    451               </sizepolicy>
    452              </property>
    453              <property name="whatsThis" >
    454               <string>When checked, the virtual machine will try to make use of the nested paging extension of Intel VT-x and AMD-V.</string>
    455              </property>
    456              <property name="text" >
    457               <string>Enable Nested Pa&amp;ging</string>
    458              </property>
    459             </widget>
    460            </item>
    461           </layout>
    462          </item>
    463          <item>
    464           <widget class="QCheckBox" name="mCbPae" >
    465            <property name="sizePolicy" >
    466             <sizepolicy vsizetype="Fixed" hsizetype="MinimumExpanding" >
    467              <horstretch>0</horstretch>
    468              <verstretch>0</verstretch>
    469             </sizepolicy>
    470            </property>
    471            <property name="whatsThis" >
    472             <string>When checked, the Physical Address Extension (PAE) feature of the host CPU will be exposed to the virtual machine.</string>
    473            </property>
    474            <property name="text" >
    475             <string>Enable PA&amp;E/NX</string>
    476            </property>
    477           </widget>
    478          </item>
    479         </layout>
    480        </item>
    481        <item row="2" column="0" >
    482         <widget class="QLabel" name="mGbClipboard" >
    483          <property name="text" >
    484           <string>&amp;Shared Clipboard:</string>
    485          </property>
    486          <property name="alignment" >
    487           <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
    488          </property>
    489          <property name="buddy" >
    490           <cstring>mCbClipboard</cstring>
    491          </property>
    492         </widget>
    493        </item>
    494        <item rowspan="2" row="2" column="1" >
    495         <layout class="QHBoxLayout" >
    496          <item>
    497           <layout class="QVBoxLayout" >
    498            <item>
    499             <widget class="QComboBox" name="mCbClipboard" >
    500              <property name="sizePolicy" >
    501               <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
    502                <horstretch>0</horstretch>
    503                <verstretch>0</verstretch>
    504               </sizepolicy>
    505              </property>
    506              <property name="whatsThis" >
    507               <string>Defines the mode of sharing the clipboard between the guest and the host OS. Note that this feature requires Guest Additions to be installed in the guest OS.</string>
    508              </property>
    509             </widget>
    510            </item>
    511            <item>
    512             <widget class="QComboBox" name="mCbIDEController" >
    513              <property name="sizePolicy" >
    514               <sizepolicy vsizetype="Fixed" hsizetype="Minimum" >
    515                <horstretch>0</horstretch>
    516                <verstretch>0</verstretch>
    517               </sizepolicy>
    518              </property>
    519              <property name="whatsThis" >
    520               <string>Defines the type of the virtual IDE controller. Depending on this value, VirtualBox will provide different virtual IDE hardware devices to the guest OS.</string>
    521              </property>
    522             </widget>
    523            </item>
    524           </layout>
    525          </item>
    526          <item>
    527           <spacer>
    528            <property name="orientation" >
    529             <enum>Qt::Horizontal</enum>
    530            </property>
    531            <property name="sizeType" >
    532             <enum>QSizePolicy::Expanding</enum>
    533            </property>
    534            <property name="sizeHint" >
    535             <size>
    536              <width>40</width>
    537              <height>20</height>
    538             </size>
    539            </property>
    540           </spacer>
    541          </item>
    542         </layout>
    543        </item>
    544        <item row="3" column="0" >
    545         <widget class="QLabel" name="mGbIDEController" >
    546          <property name="text" >
    547           <string>&amp;IDE Controller Type:</string>
    548          </property>
    549          <property name="alignment" >
    550           <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
    551          </property>
    552          <property name="buddy" >
    553           <cstring>mCbIDEController</cstring>
    554          </property>
    555         </widget>
    556        </item>
    557        <item row="4" column="0" >
    558         <widget class="QLabel" name="mGbSnapshot" >
    559          <property name="text" >
    560           <string>S&amp;napshot Folder:</string>
    561          </property>
    562          <property name="alignment" >
    563           <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
    564          </property>
    565          <property name="buddy" >
    566           <cstring>mPsSnapshot</cstring>
    567          </property>
    568         </widget>
    569        </item>
    570        <item row="4" column="1" >
    571         <widget class="VBoxFilePathSelectorWidget" name="mPsSnapshot" >
    572          <property name="sizePolicy" >
    573           <sizepolicy vsizetype="Fixed" hsizetype="MinimumExpanding" >
    574            <horstretch>0</horstretch>
    575            <verstretch>0</verstretch>
    576           </sizepolicy>
    577          </property>
    578         </widget>
    579        </item>
    580        <item row="5" column="1" >
    581         <spacer>
     198       <item>
     199        <spacer name="mSpVer2" >
    582200         <property name="orientation" >
    583201          <enum>Qt::Vertical</enum>
    584202         </property>
    585          <property name="sizeHint" >
     203         <property name="sizeHint" stdset="0" >
    586204          <size>
    587            <width>20</width>
    588            <height>40</height>
     205           <width>0</width>
     206           <height>0</height>
    589207          </size>
    590208         </property>
     
    597215       <string>&amp;Description</string>
    598216      </attribute>
    599       <layout class="QVBoxLayout" >
     217      <layout class="QVBoxLayout" name="mLtDescription" >
     218       <property name="spacing" >
     219        <number>0</number>
     220       </property>
    600221       <item>
    601222        <widget class="QTextEdit" name="mTeDescription" >
     
    607228         </property>
    608229        </widget>
    609        </item>
    610       </layout>
    611      </widget>
    612      <widget class="QWidget" name="mTabOther" >
    613       <attribute name="title" >
    614        <string>&amp;Other</string>
    615       </attribute>
    616       <layout class="QGridLayout" >
    617        <item row="0" column="0" >
    618         <spacer>
    619          <property name="orientation" >
    620           <enum>Qt::Horizontal</enum>
    621          </property>
    622          <property name="sizeType" >
    623           <enum>QSizePolicy::Fixed</enum>
    624          </property>
    625          <property name="sizeHint" >
    626           <size>
    627            <width>60</width>
    628            <height>20</height>
    629           </size>
    630          </property>
    631         </spacer>
    632        </item>
    633        <item row="0" column="1" >
    634         <widget class="QLabel" name="mGbRuntime" >
    635          <property name="text" >
    636           <string>Runtime:</string>
    637          </property>
    638          <property name="alignment" >
    639           <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
    640          </property>
    641          <property name="buddy" >
    642           <cstring>mCbSaveMounted</cstring>
    643          </property>
    644         </widget>
    645        </item>
    646        <item row="0" column="2" >
    647         <widget class="QCheckBox" name="mCbSaveMounted" >
    648          <property name="whatsThis" >
    649           <string>If checked, any change to mounted CD/DVD or Floppy media performed during machine execution will be saved in the settings file in order to preserve the configuration of mounted media between runs.</string>
    650          </property>
    651          <property name="text" >
    652           <string>&amp;Remember Mounted Media</string>
    653          </property>
    654          <property name="checked" >
    655           <bool>true</bool>
    656          </property>
    657         </widget>
    658        </item>
    659        <item row="0" column="3" >
    660         <spacer>
    661          <property name="orientation" >
    662           <enum>Qt::Horizontal</enum>
    663          </property>
    664          <property name="sizeHint" >
    665           <size>
    666            <width>40</width>
    667            <height>20</height>
    668           </size>
    669          </property>
    670         </spacer>
    671        </item>
    672        <item row="1" column="2" >
    673         <spacer>
    674          <property name="orientation" >
    675           <enum>Qt::Vertical</enum>
    676          </property>
    677          <property name="sizeHint" >
    678           <size>
    679            <width>20</width>
    680            <height>40</height>
    681           </size>
    682          </property>
    683         </spacer>
    684230       </item>
    685231      </layout>
     
    701247   <container>1</container>
    702248  </customwidget>
    703   <customwidget>
    704    <class>BootItemsTable</class>
    705    <extends>QTreeWidget</extends>
    706    <header>VBoxSettingsUtils.h</header>
    707   </customwidget>
    708   <customwidget>
    709    <class>QILabelSeparator</class>
    710    <extends>QLabel</extends>
    711    <header>QILabelSeparator.h</header>
    712   </customwidget>
    713   <customwidget>
    714    <class>QILineEdit</class>
    715    <extends>QLineEdit</extends>
    716    <header>QILineEdit.h</header>
    717   </customwidget>
    718249 </customwidgets>
    719250 <resources/>
  • trunk/src/VBox/Frontends/VirtualBox/ui/VBoxVMSettingsHD.ui

    r18246 r19837  
    2828   </rect>
    2929  </property>
    30   <layout class="QVBoxLayout" name="verticalLayout">
     30  <layout class="QVBoxLayout" name="mLtMain">
     31   <item>
     32    <widget class="QLabel" name="mLbIDEController" >
     33     <property name="sizePolicy" >
     34      <sizepolicy vsizetype="Fixed" hsizetype="Minimum" >
     35       <horstretch>0</horstretch>
     36       <verstretch>0</verstretch>
     37      </sizepolicy>
     38     </property>
     39     <property name="text" >
     40      <string>IDE &amp;Controller Type</string>
     41     </property>
     42     <property name="buddy" >
     43      <cstring>mCbIDEController</cstring>
     44     </property>
     45    </widget>
     46   </item>
     47   <item>
     48    <layout class="QHBoxLayout" name="mLtIDEControllers">
     49     <item>
     50      <spacer name="mSpIDEController">
     51       <property name="orientation">
     52        <enum>Qt::Horizontal</enum>
     53       </property>
     54       <property name="sizeType">
     55        <enum>QSizePolicy::Fixed</enum>
     56       </property>
     57       <property name="sizeHint" stdset="0">
     58        <size>
     59         <width>20</width>
     60         <height>0</height>
     61        </size>
     62       </property>
     63      </spacer>
     64     </item>
     65     <item>
     66      <widget class="QComboBox" name="mCbIDEController" >
     67       <property name="sizePolicy" >
     68        <sizepolicy vsizetype="Fixed" hsizetype="MinimumExpanding" >
     69         <horstretch>0</horstretch>
     70         <verstretch>0</verstretch>
     71        </sizepolicy>
     72       </property>
     73       <property name="whatsThis" >
     74        <string>Defines the type of the virtual IDE controller. Depending on this value, VirtualBox will provide different virtual IDE hardware devices to the guest OS.</string>
     75       </property>
     76      </widget>
     77     </item>
     78    </layout>
     79   </item>
    3180   <item>
    3281    <widget class="QCheckBox" name="mAddControllerCheck">
     
    4089   </item>
    4190   <item>
    42     <layout class="QHBoxLayout" name="horizontalLayout">
     91    <layout class="QHBoxLayout" name="mLtAddControllers">
    4392     <item>
    44       <spacer name="horizontalSpacer">
     93      <spacer name="mSpAddControllers">
    4594       <property name="orientation">
    4695        <enum>Qt::Horizontal</enum>
     
    51100       <property name="sizeHint" stdset="0">
    52101        <size>
    53          <width>17</width>
    54          <height>17</height>
     102         <width>20</width>
     103         <height>0</height>
    55104        </size>
    56105       </property>
     
    84133   <item>
    85134    <widget class="QWidget" name="mGbAts" native="true">
    86      <property name="minimumSize">
    87       <size>
    88        <width>0</width>
    89        <height>200</height>
    90       </size>
    91      </property>
    92135     <layout class="QHBoxLayout">
    93136      <property name="margin">
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