Changeset 19837 in vbox
- Timestamp:
- May 19, 2009 6:54:45 PM (15 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox
- Files:
-
- 5 added
- 15 edited
-
Makefile.kmk (modified) (2 diffs)
-
VBoxUI.pro (modified) (1 diff)
-
VirtualBox.qrc (modified) (1 diff)
-
images/chipset_16px.png (added)
-
images/chipset_32px.png (added)
-
include/VBoxGlobal.h (modified) (1 diff)
-
include/VBoxSettingsDialog.h (modified) (1 diff)
-
include/VBoxSettingsDialogSpecific.h (modified) (2 diffs)
-
include/VBoxVMSettingsGeneral.h (modified) (3 diffs)
-
include/VBoxVMSettingsHD.h (modified) (1 diff)
-
include/VBoxVMSettingsSystem.h (added)
-
src/VBoxGlobal.cpp (modified) (20 diffs)
-
src/VBoxSettingsDialog.cpp (modified) (2 diffs)
-
src/VBoxSettingsDialogSpecific.cpp (modified) (6 diffs)
-
src/VBoxVMSettingsGeneral.cpp (modified) (13 diffs)
-
src/VBoxVMSettingsHD.cpp (modified) (11 diffs)
-
src/VBoxVMSettingsSystem.cpp (added)
-
ui/VBoxVMSettingsGeneral.ui (modified) (9 diffs)
-
ui/VBoxVMSettingsHD.ui (modified) (4 diffs)
-
ui/VBoxVMSettingsSystem.ui (added)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/Makefile.kmk
r19664 r19837 269 269 include/VBoxSettingsUtils.h \ 270 270 include/VBoxVMSettingsGeneral.h \ 271 include/VBoxVMSettingsSystem.h \ 271 272 include/VBoxVMSettingsDisplay.h \ 272 273 include/VBoxVMSettingsHD.h \ … … 357 358 src/VBoxVMLogViewer.cpp \ 358 359 src/VBoxVMSettingsGeneral.cpp \ 360 src/VBoxVMSettingsSystem.cpp \ 359 361 src/VBoxVMSettingsDisplay.cpp \ 360 362 src/VBoxVMSettingsHD.cpp \ -
trunk/src/VBox/Frontends/VirtualBox/VBoxUI.pro
r19664 r19837 40 40 ui/VBoxVMLogViewer.ui \ 41 41 ui/VBoxVMSettingsGeneral.ui \ 42 ui/VBoxVMSettingsSystem.ui \ 42 43 ui/VBoxVMSettingsDisplay.ui \ 43 44 ui/VBoxVMSettingsHD.ui \ -
trunk/src/VBox/Frontends/VirtualBox/VirtualBox.qrc
r17784 r19837 336 336 <file alias="connect_16px.png">images/connect_16px.png</file> 337 337 <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> 338 340 </qresource> 339 341 </RCC> -
trunk/src/VBox/Frontends/VirtualBox/include/VBoxGlobal.h
r19664 r19837 928 928 QPixmap mWarningIcon, mErrorIcon; 929 929 930 mutable bool mDetailReportTemplatesReady;931 932 930 friend VBoxGlobal &vboxGlobal(); 933 931 friend class VBoxCallback; -
trunk/src/VBox/Frontends/VirtualBox/include/VBoxSettingsDialog.h
r18235 r19837 75 75 VBoxSettingsPage* aPrefPage = NULL, int aParentId = -1); 76 76 77 virtual bool correlate (QWidget *aPage, QString &aWarning); 78 77 79 VBoxSettingsSelector *mSelector; 78 80 QStackedWidget *mStack; -
trunk/src/VBox/Frontends/VirtualBox/include/VBoxSettingsDialogSpecific.h
r19664 r19837 76 76 { 77 77 GeneralId = 0, 78 SystemId, 78 79 DisplayId, 79 80 StorageId, … … 102 103 QString dialogTitle() const; 103 104 105 bool correlate (QWidget *aPage, QString &aWarning); 106 104 107 private slots: 105 108 -
trunk/src/VBox/Frontends/VirtualBox/include/VBoxVMSettingsGeneral.h
r19664 r19837 37 37 VBoxVMSettingsGeneral(); 38 38 39 signals: 40 41 void tableChanged(); 39 bool is64BitOSTypeSelected() const; 42 40 43 41 protected: … … 47 45 48 46 void setValidator (QIWidgetValidator *aVal); 49 bool revalidate (QString &aWarning, QString &aTitle);50 47 51 48 void setOrderAfter (QWidget *aWidget); … … 53 50 void retranslateUi(); 54 51 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 67 52 private: 68 53 69 void adjustBootOrderTWSize();70 71 bool eventFilter (QObject *aObject, QEvent *aEvent);72 54 void showEvent (QShowEvent *aEvent); 73 55 -
trunk/src/VBox/Frontends/VirtualBox/include/VBoxVMSettingsHD.h
r19239 r19837 385 385 QString getWithNewHDWizard(); 386 386 int maxNameLength() const; 387 void prepareComboboxes();388 387 void removeFocus(); 389 388 KStorageControllerType currentControllerType() const -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxGlobal.cpp
r19670 r19837 759 759 , mMediaEnumThread (NULL) 760 760 , mVerString ("1.0") 761 , mDetailReportTemplatesReady (false)762 761 { 763 762 } … … 1581 1580 QString VBoxGlobal::detailsReport (const CMachine &aMachine, bool aWithLinks) 1582 1581 { 1582 /* Details templates */ 1583 1583 static const char *sTableTpl = 1584 1584 "<table border=0 cellspacing=1 cellpadding=0>%1</table>"; … … 1598 1598 "<tr><td width=40%><nobr>%1:</nobr></td><td/><td>%2</td></tr>"; 1599 1599 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 §ionTpl = aWithLinks ? sSectionHrefTpl : sSectionBoldTpl; 1632 1601 1633 1602 /* Compose details report */ 1634 const QString §ionTpl = aWithLinks ? sSectionHrefTpl : sSectionBoldTpl;1635 const QString &generalFullTpl = aWithLinks ? sGeneralFullHrefTpl : sGeneralFullBoldTpl;1636 1637 1603 QString report; 1638 QString item;1639 1604 1640 1605 /* General */ 1641 1606 { 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 1642 1625 /* Boot order */ 1643 1626 QString bootOrder; … … 1654 1637 bootOrder = toString (KDeviceType_Null); 1655 1638 1656 CBIOSSettings biosSettings = aMachine.GetBIOSSettings();1657 1658 1639 /* ACPI */ 1659 1640 QString acpi = biosSettings.GetACPIEnabled() … … 1666 1647 : tr ("Disabled", "details report (IO APIC)"); 1667 1648 1649 /* PAE/NX */ 1650 QString pae = aMachine.GetPAEEnabled() 1651 ? tr ("Enabled", "details report (PAE/NX)") 1652 : tr ("Disabled", "details report (PAE/NX)"); 1653 1668 1654 /* VT-x/AMD-V */ 1669 1655 QString virt = aMachine.GetHWVirtExEnabled() == KTSBool_True ? … … 1676 1662 : tr ("Disabled", "details report (Nested Paging)"); 1677 1663 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 */ 1694 1683 } 1695 1684 1696 1685 /* Display */ 1697 1686 { 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; 1702 1689 1703 1690 /* Video tab */ … … 1706 1693 : tr ("Disabled", "details report (3D Acceleration)"); 1707 1694 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); 1715 1701 1716 1702 rows += 2; … … 1731 1717 } 1732 1718 1733 /* Full report */1734 1719 report += sectionTpl 1735 1720 .arg (rows) /* rows */ … … 1742 1727 /* Hard Disks */ 1743 1728 { 1744 /* Erase temp item*/1745 i tem = 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; 1748 1733 1749 1734 CHardDiskAttachmentVector vec = aMachine.GetHardDiskAttachments(); … … 1789 1774 /* DVD */ 1790 1775 { 1776 QString item; 1777 1791 1778 CDVDDrive dvd = aMachine.GetDVDDrive(); 1792 1779 switch (dvd.GetState()) … … 1820 1807 AssertMsgFailed (("Invalid DVD state: %d", dvd.GetState())); 1821 1808 } 1809 1822 1810 report += sectionTpl 1823 1811 .arg (2 + 1) /* rows */ … … 1830 1818 /* Floppy */ 1831 1819 { 1820 QString item; 1821 1832 1822 CFloppyDrive floppy = aMachine.GetFloppyDrive(); 1833 1823 switch (floppy.GetState()) … … 1861 1851 AssertMsgFailed (("Invalid floppy state: %d", floppy.GetState())); 1862 1852 } 1853 1863 1854 report += sectionTpl 1864 1855 .arg (2 + 1) /* rows */ … … 1871 1862 /* Audio */ 1872 1863 { 1864 QString item; 1865 1873 1866 CAudioAdapter audio = aMachine.GetAudioAdapter(); 1874 1867 int rows = audio.GetEnabled() ? 3 : 2; … … 1894 1887 /* Network */ 1895 1888 { 1896 /* Erase temp item */ 1897 item = QString::null; 1889 QString item; 1898 1890 1899 1891 ulong count = mVBox.GetSystemProperties().GetNetworkAdapterCount(); … … 1946 1938 /* Serial Ports */ 1947 1939 { 1948 /* Erase temp item */ 1949 item = QString::null; 1940 QString item; 1950 1941 1951 1942 ulong count = mVBox.GetSystemProperties().GetSerialPortCount(); … … 1992 1983 /* Parallel Ports */ 1993 1984 { 1994 /* Erase temp item */ 1995 item = QString::null; 1985 QString item; 1996 1986 1997 1987 ulong count = mVBox.GetSystemProperties().GetParallelPortCount(); … … 2032 2022 /* USB */ 2033 2023 { 2024 QString item; 2025 2034 2026 CUSBController ctl = aMachine.GetUSBController(); 2035 2027 if (!ctl.isNull()) … … 2065 2057 /* Shared Folders */ 2066 2058 { 2059 QString item; 2060 2067 2061 ulong count = aMachine.GetSharedFolders().size(); 2068 2062 if (count > 0) … … 2969 2963 mErrorIcon = standardIcon (QStyle::SP_MessageBoxCritical, 0).pixmap (16, 16); 2970 2964 Assert (!mErrorIcon.isNull()); 2971 2972 mDetailReportTemplatesReady = false;2973 2965 2974 2966 /* refresh media properties since they contain some translations too */ -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxSettingsDialog.cpp
r18236 r19837 133 133 QString title = mSelector->itemTextByPage (page); 134 134 bool valid = page->revalidate (warning, title); 135 if (valid && warning.isEmpty()) 136 valid = correlate (page, warning); 135 137 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); 137 139 aWval->setLastWarning (warning); 138 140 valid ? setWarning (warning) : setError (warning); … … 272 274 if (aPrefPage) 273 275 attachValidator (aPrefPage); 276 } 277 278 bool VBoxSettingsDialog::correlate (QWidget*, QString&) 279 { 280 return true; 274 281 } 275 282 -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxSettingsDialogSpecific.cpp
r19664 r19837 36 36 37 37 #include "VBoxVMSettingsGeneral.h" 38 #include "VBoxVMSettingsSystem.h" 38 39 #include "VBoxVMSettingsDisplay.h" 39 40 #include "VBoxVMSettingsHD.h" … … 243 244 { 244 245 prefPage = new VBoxVMSettingsGeneral(); 245 connect (prefPage, SIGNAL (tableChanged()), this, SLOT (resetFirstRunFlag()));246 246 addItem (":/machine_32px.png", ":/machine_disabled_32px.png", 247 247 ":/machine_16px.png", ":/machine_disabled_16px.png", 248 248 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); 249 259 } 250 260 … … 398 408 void VBoxVMSettingsDlg::getFrom() 399 409 { 410 /* Load all the settings pages */ 400 411 QList <VBoxSettingsPage*> pages = mSelector->settingPages(); 401 412 foreach (VBoxSettingsPage *page, pages) … … 410 421 void VBoxVMSettingsDlg::putBackTo() 411 422 { 423 /* Commit all the settings pages */ 412 424 QList <VBoxSettingsPage*> pages = mSelector->settingPages(); 413 425 foreach (VBoxSettingsPage *page, pages) 414 426 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); 415 436 416 437 /* Clear the "GUI_FirstRun" extra data key in case if the boot order … … 434 455 mSelector->setItemText (GeneralId, tr ("General")); 435 456 457 /* System page */ 458 mSelector->setItemText (SystemId, tr ("System")); 459 436 460 /* Display page */ 437 461 mSelector->setItemText (DisplayId, tr ("Display")); … … 497 521 } 498 522 523 bool 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 499 554 void VBoxVMSettingsDlg::onMediaEnumerationDone() 500 555 { -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxVMSettingsGeneral.cpp
r19664 r19837 25 25 #include "VBoxProblemReporter.h" 26 26 #include "QIWidgetValidator.h" 27 #include <iprt/asm.h>28 #include <VBox/x86.h>29 27 30 28 #include <QDir> 31 32 #define ITEM_TYPE_ROLE Qt::UserRole + 133 34 /**35 * Calculates a suitable page step size for the given max value. The returned36 * size is so that there will be no more than 32 pages. The minimum returned37 * 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 }53 29 54 30 VBoxVMSettingsGeneral::VBoxVMSettingsGeneral() … … 58 34 Ui::VBoxVMSettingsGeneral::setupUi (this); 59 35 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 67 36 /* Setup validators */ 68 37 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());110 38 111 39 /* Shared Clipboard mode */ … … 115 43 mCbClipboard->addItem (""); /* KClipboardMode_Bidirectional */ 116 44 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 124 45 /* Applying language settings */ 125 46 retranslateUi(); 47 } 48 49 bool VBoxVMSettingsGeneral::is64BitOSTypeSelected() const 50 { 51 return mOSTypeSelector->type().GetIs64Bit(); 126 52 } 127 53 … … 129 55 { 130 56 mMachine = aMachine; 131 CBIOSSettings biosSettings = mMachine.GetBIOSSettings();132 57 133 58 /* Name */ … … 137 62 mOSTypeSelector->setType (vboxGlobal().vmGuestOSType (aMachine.GetOSTypeId())); 138 63 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"); 201 67 202 68 /* Snapshot folder */ … … 204 70 mPsSnapshot->setHomeDir (QFileInfo (mMachine.GetSettingsFilePath()).absolutePath()); 205 71 206 /* Description */207 mTeDescription->setPlainText (aMachine.GetDescription());208 209 72 /* Shared clipboard mode */ 210 73 mCbClipboard->setCurrentIndex (aMachine.GetClipboardMode()); 211 74 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()); 221 77 222 78 if (mValidator) … … 226 82 void VBoxVMSettingsGeneral::putBackTo() 227 83 { 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 238 84 /* Name */ 239 85 mMachine.SetName (mLeName->text()); … … 243 89 mMachine.SetOSTypeId (mOSTypeSelector->type().GetId()); 244 90 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"); 287 94 288 95 /* Saved state folder */ … … 295 102 } 296 103 104 /* Shared clipboard mode */ 105 mMachine.SetClipboardMode ((KClipboardMode) mCbClipboard->currentIndex()); 106 297 107 /* Description (set empty to null to avoid an empty <Description> node 298 108 * in the settings file) */ 299 109 mMachine.SetDescription (mTeDescription->toPlainText().isEmpty() ? 300 110 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");313 111 } 314 112 … … 316 114 { 317 115 mValidator = aVal; 318 connect (mCbVirt, SIGNAL (stateChanged (int)), mValidator, SLOT (revalidate()));319 116 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 to325 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;430 117 } 431 118 … … 433 120 { 434 121 /* Setup Tab order */ 435 setTabOrder (aWidget, mT abGeneral->focusProxy());436 setTabOrder (mT abGeneral->focusProxy(), mLeName);122 setTabOrder (aWidget, mTwGeneral->focusProxy()); 123 setTabOrder (mTwGeneral->focusProxy(), mLeName); 437 124 setTabOrder (mLeName, mOSTypeSelector); 438 setTabOrder (mOSTypeSelector, mSlRam);439 setTabOrder (mSlRam, mLeRam);440 125 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); 452 129 453 setTabOrder (mPsSnapshot, mTeDescription); 454 455 setTabOrder (mTeDescription, mCbSaveMounted); 130 setTabOrder (mCbSaveMounted, mTeDescription); 456 131 } 457 132 … … 460 135 /* Translate uic generated strings */ 461 136 Ui::VBoxVMSettingsGeneral::retranslateUi (this); 462 mTwBootOrder->header()->setResizeMode (QHeaderView::ResizeToContents);463 mTwBootOrder->resizeColumnToContents (0);464 mTwBootOrder->updateGeometry();465 137 466 CSystemProperties sys = vboxGlobal().virtualBox().GetSystemProperties(); 467 mLbRamMin->setText (tr ("<qt>%1 MB</qt>").arg (sys.GetMinGuestRAM())); 468 mLbRamMax->setText (tr ("<qt>%1 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.")); 481 143 482 144 /* Shared Clipboard mode */ … … 485 147 mCbClipboard->setItemText (2, vboxGlobal().toString (KClipboardMode_GuestToHost)); 486 148 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 fixed565 * 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 else598 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);617 149 } 618 150 -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxVMSettingsHD.cpp
r19239 r19837 574 574 575 575 /* Setup table-view */ 576 mTwAts->setMinimumHeight (100); 576 577 mTwAts->verticalHeader()->setDefaultSectionSize ( 577 578 (int) (mTwAts->fontMetrics().height() * 1.30 /* 130% of font height */)); … … 637 638 HDSettings::instance(), SLOT (update())); 638 639 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 639 651 /* Install global event filter */ 640 652 qApp->installEventFilter (this); … … 648 660 mMachine = aMachine; 649 661 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()))); 650 668 651 669 /* For now we search for the first one which isn't IDE */ … … 691 709 void VBoxVMSettingsHD::putBackTo() 692 710 { 711 /* IDE controller type */ 712 const QString ideName = QString ("IDE"); 713 CStorageController ideCtl = mMachine.GetStorageControllerByName(ideName); 714 ideCtl.SetControllerType (vboxGlobal().toIDEControllerType (mCbIDEController->currentText())); 715 693 716 /* Detach all attached Hard Disks */ 694 717 CHardDiskAttachmentVector vec = mMachine.GetHardDiskAttachments(); … … 702 725 if (!mMachine.isOk()) 703 726 { 704 CStorageController ctl = mMachine.GetStorageControllerByName (hda.GetController());727 CStorageController ctl = mMachine.GetStorageControllerByName (hda.GetController()); 705 728 vboxProblem().cannotDetachHardDisk (this, mMachine, 706 729 vboxGlobal().getMedium (CMedium (hda.GetHardDisk())).location(), … … 709 732 } 710 733 711 712 734 /* Clear all storage controllers beside the IDE one */ 713 735 CStorageController addController; 714 QVector <CStorageController> scs = mMachine.GetStorageControllers();736 QVector <CStorageController> scs = mMachine.GetStorageControllers(); 715 737 foreach (const CStorageController &sc, scs) 716 738 if (sc.GetBus() != KStorageBus_IDE) … … 748 770 } 749 771 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); 752 774 /* [dsen] check this */ 753 775 if (!mMachine.isOk()) 754 776 vboxProblem().cannotAttachHardDisk (this, mMachine, 755 777 vboxGlobal().getMedium (CMedium (vboxGlobal().virtualBox() 756 .GetHardDisk (list [i].disk.id))).location(),778 .GetHardDisk (list [i].disk.id))).location(), 757 779 list [i].slot.bus, list [i].slot.channel, list [i].slot.device); 758 780 } … … 804 826 void VBoxVMSettingsHD::setOrderAfter (QWidget *aWidget) 805 827 { 806 setTabOrder (aWidget, mAddControllerCheck); 807 setTabOrder (mAddControllerCheck, mTwAts); 828 setTabOrder (aWidget, mCbIDEController); 829 setTabOrder (mCbIDEController, mAddControllerCheck); 830 setTabOrder (mAddControllerCheck, mCbControllerType); 831 setTabOrder (mCbControllerType, mTwAts); 808 832 setTabOrder (mTwAts, mShowDiffsCheck); 809 833 } … … 814 838 Ui::VBoxVMSettingsHD::retranslateUi (this); 815 839 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 */ 816 854 mNewAction->setText (tr ("&Add Attachment")); 817 855 mDelAction->setText (tr ("&Remove Attachment")); … … 830 868 "a hard disk to attach to the currently " 831 869 "highlighted slot.")); 832 833 prepareComboboxes();834 870 } 835 871 … … 1182 1218 } 1183 1219 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 1201 1220 void VBoxVMSettingsHD::removeFocus() 1202 1221 { -
trunk/src/VBox/Frontends/VirtualBox/ui/VBoxVMSettingsGeneral.ui
r19664 r19837 23 23 <x>0</x> 24 24 <y>0</y> 25 <width> 451</width>26 <height> 497</height>25 <width>350</width> 26 <height>250</height> 27 27 </rect> 28 28 </property> 29 <layout class="QHBoxLayout" >29 <layout class="QHBoxLayout" name="mLtMain" > 30 30 <item> 31 <widget class="QTabWidget" name="mT abGeneral" >31 <widget class="QTabWidget" name="mTwGeneral" > 32 32 <property name="currentIndex" > 33 33 <number>0</number> … … 37 37 <string>&Basic</string> 38 38 </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" > 53 47 <number>0</number> 54 48 </property> … … 71 65 <string>Displays the name of the virtual machine.</string> 72 66 </property> 73 </widget> 74 </item> 75 <item row="3" column="0" > 76 <widget class="QLabel" name="mLbRam" > 77 <property name="text" > 78 <string>Base &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> 184 71 </item> 185 72 </layout> … … 187 74 </item> 188 75 <item> 189 <spacer >76 <spacer name="mSpVer1" > 190 77 <property name="orientation" > 191 78 <enum>Qt::Vertical</enum> 192 79 </property> 193 <property name="sizeHint" >80 <property name="sizeHint" stdset="0" > 194 81 <size> 195 <width> 20</width>82 <width>0</width> 196 83 <height>0</height> 197 84 </size> … … 205 92 <string>&Advanced</string> 206 93 </attribute> 207 <layout class="QGridLayout" > 208 <item row="0" column="0" > 209 <widget class="QLabel" name="mGbBootOrder" > 210 <property name="text" > 211 <string>Boo&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" > 231 102 <number>0</number> 232 103 </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&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>&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>&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> 359 193 </widget> 360 194 </item> … … 362 196 </widget> 363 197 </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). <b>Note:</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&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. <b>Note:</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&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 &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&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&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>&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>&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&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" > 582 200 <property name="orientation" > 583 201 <enum>Qt::Vertical</enum> 584 202 </property> 585 <property name="sizeHint" >203 <property name="sizeHint" stdset="0" > 586 204 <size> 587 <width> 20</width>588 <height> 40</height>205 <width>0</width> 206 <height>0</height> 589 207 </size> 590 208 </property> … … 597 215 <string>&Description</string> 598 216 </attribute> 599 <layout class="QVBoxLayout" > 217 <layout class="QVBoxLayout" name="mLtDescription" > 218 <property name="spacing" > 219 <number>0</number> 220 </property> 600 221 <item> 601 222 <widget class="QTextEdit" name="mTeDescription" > … … 607 228 </property> 608 229 </widget> 609 </item>610 </layout>611 </widget>612 <widget class="QWidget" name="mTabOther" >613 <attribute name="title" >614 <string>&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>&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>684 230 </item> 685 231 </layout> … … 701 247 <container>1</container> 702 248 </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>718 249 </customwidgets> 719 250 <resources/> -
trunk/src/VBox/Frontends/VirtualBox/ui/VBoxVMSettingsHD.ui
r18246 r19837 28 28 </rect> 29 29 </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 &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> 31 80 <item> 32 81 <widget class="QCheckBox" name="mAddControllerCheck"> … … 40 89 </item> 41 90 <item> 42 <layout class="QHBoxLayout" name=" horizontalLayout">91 <layout class="QHBoxLayout" name="mLtAddControllers"> 43 92 <item> 44 <spacer name=" horizontalSpacer">93 <spacer name="mSpAddControllers"> 45 94 <property name="orientation"> 46 95 <enum>Qt::Horizontal</enum> … … 51 100 <property name="sizeHint" stdset="0"> 52 101 <size> 53 <width> 17</width>54 <height> 17</height>102 <width>20</width> 103 <height>0</height> 55 104 </size> 56 105 </property> … … 84 133 <item> 85 134 <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>92 135 <layout class="QHBoxLayout"> 93 136 <property name="margin">
Note:
See TracChangeset
for help on using the changeset viewer.

