Changeset 33906 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Nov 9, 2010 3:16:17 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsNetwork.cpp
r33882 r33906 634 634 */ 635 635 mDisableStaticControls = aDisableStaticControls; 636 637 /* How many adapters to display */ 638 ulong uCount = qMin((ULONG)4, vboxGlobal().virtualBox().GetSystemProperties().GetNetworkAdapterCount()); 639 /* Add the tab pages to parent tab widget. Needed for space calculations. */ 640 for (ulong iSlot = 0; iSlot < uCount; ++iSlot) 641 { 642 /* Creating adapter's page: */ 643 UIMachineSettingsNetwork *pPage = new UIMachineSettingsNetwork(this, mDisableStaticControls); 644 645 /* Attach adapter's page to Tab Widget: */ 646 mTwAdapters->addTab(pPage, pPage->pageTitle()); 647 648 /* Disable tab page of disabled adapter if it is being configured dynamically: */ 649 if (mDisableStaticControls && !m_cache.m_items[iSlot].m_fAdapterEnabled) 650 mTwAdapters->setTabEnabled(iSlot, false); 651 } 636 652 } 637 653 … … 823 839 QWidget *pLastFocusWidget = mTwAdapters->focusProxy(); 824 840 825 /* Apply internal variables data to QWidget(s): */ 826 for (int iSlot = 0; iSlot < m_cache.m_items.size(); ++iSlot) 827 { 828 /* Creating adapter's page: */ 829 UIMachineSettingsNetwork *pPage = new UIMachineSettingsNetwork(this, mDisableStaticControls); 841 int uCount = qMin(mTwAdapters->count(), m_cache.m_items.size()); 842 for (int iSlot = 0; iSlot < uCount; ++iSlot) 843 { 844 UIMachineSettingsNetwork *pPage = 845 qobject_cast<UIMachineSettingsNetwork *>(mTwAdapters->widget(iSlot)); 846 Assert(pPage); 830 847 831 848 /* Loading adapter's data into page: */ 832 849 pPage->fetchAdapterData(m_cache.m_items[iSlot]); 833 834 /* Attach adapter's page to Tab Widget: */835 mTwAdapters->addTab(pPage, pPage->pageTitle());836 850 837 851 /* Disable tab page of disabled adapter if it is being configured dynamically: */
Note:
See TracChangeset
for help on using the changeset viewer.