Changeset 46634 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Jun 18, 2013 5:02:39 PM (12 years ago)
- svn:sync-xref-src-repo-rev:
- 86518
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/settings/machine
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsAudio.cpp
r46631 r46634 71 71 72 72 /* Load audio data to page: */ 73 m GbAudio->setChecked(audioData.m_fAudioEnabled);74 m CbAudioDriver->setCurrentIndex(mCbAudioDriver->findText(gpConverter->toString(audioData.m_audioDriverType)));75 m CbAudioController->setCurrentIndex(mCbAudioController->findText(gpConverter->toString(audioData.m_audioControllerType)));73 m_pCheckBoxAudio->setChecked(audioData.m_fAudioEnabled); 74 m_pComboAudioDriver->setCurrentIndex(m_pComboAudioDriver->findText(gpConverter->toString(audioData.m_audioDriverType))); 75 m_pComboAudioController->setCurrentIndex(m_pComboAudioController->findText(gpConverter->toString(audioData.m_audioControllerType))); 76 76 77 77 /* Polish page finally: */ … … 87 87 88 88 /* Gather audio data: */ 89 audioData.m_fAudioEnabled = m GbAudio->isChecked();90 audioData.m_audioDriverType = gpConverter->fromString<KAudioDriverType>(m CbAudioDriver->currentText());91 audioData.m_audioControllerType = gpConverter->fromString<KAudioControllerType>(m CbAudioController->currentText());89 audioData.m_fAudioEnabled = m_pCheckBoxAudio->isChecked(); 90 audioData.m_audioDriverType = gpConverter->fromString<KAudioDriverType>(m_pComboAudioDriver->currentText()); 91 audioData.m_audioControllerType = gpConverter->fromString<KAudioControllerType>(m_pComboAudioController->currentText()); 92 92 93 93 /* Cache audio data: */ … … 128 128 void UIMachineSettingsAudio::setOrderAfter (QWidget *aWidget) 129 129 { 130 setTabOrder (aWidget, m GbAudio);131 setTabOrder (m GbAudio, mCbAudioDriver);132 setTabOrder (m CbAudioDriver, mCbAudioController);130 setTabOrder (aWidget, m_pCheckBoxAudio); 131 setTabOrder (m_pCheckBoxAudio, m_pComboAudioDriver); 132 setTabOrder (m_pComboAudioDriver, m_pComboAudioController); 133 133 } 134 134 … … 144 144 { 145 145 /* Save the current selected value */ 146 int currentDriver = m CbAudioDriver->currentIndex();146 int currentDriver = m_pComboAudioDriver->currentIndex(); 147 147 /* Clear the driver box */ 148 m CbAudioDriver->clear();148 m_pComboAudioDriver->clear(); 149 149 /* Refill them */ 150 m CbAudioDriver->addItem (gpConverter->toString (KAudioDriverType_Null));150 m_pComboAudioDriver->addItem (gpConverter->toString (KAudioDriverType_Null)); 151 151 #if defined Q_WS_WIN32 152 m CbAudioDriver->addItem (gpConverter->toString (KAudioDriverType_DirectSound));152 m_pComboAudioDriver->addItem (gpConverter->toString (KAudioDriverType_DirectSound)); 153 153 # ifdef VBOX_WITH_WINMM 154 m CbAudioDriver->addItem (gpConverter->toString (KAudioDriverType_WinMM));154 m_pComboAudioDriver->addItem (gpConverter->toString (KAudioDriverType_WinMM)); 155 155 # endif 156 156 #endif 157 157 #if defined Q_OS_SOLARIS 158 m CbAudioDriver->addItem (gpConverter->toString (KAudioDriverType_SolAudio));158 m_pComboAudioDriver->addItem (gpConverter->toString (KAudioDriverType_SolAudio)); 159 159 # if defined VBOX_WITH_SOLARIS_OSS 160 m CbAudioDriver->addItem (gpConverter->toString (KAudioDriverType_OSS));160 m_pComboAudioDriver->addItem (gpConverter->toString (KAudioDriverType_OSS)); 161 161 #endif 162 162 #endif 163 163 #if defined Q_OS_LINUX || defined Q_OS_FREEBSD 164 m CbAudioDriver->addItem (gpConverter->toString (KAudioDriverType_OSS));164 m_pComboAudioDriver->addItem (gpConverter->toString (KAudioDriverType_OSS)); 165 165 # ifdef VBOX_WITH_PULSE 166 m CbAudioDriver->addItem (gpConverter->toString (KAudioDriverType_Pulse));166 m_pComboAudioDriver->addItem (gpConverter->toString (KAudioDriverType_Pulse)); 167 167 # endif 168 168 #endif 169 169 #if defined Q_OS_LINUX 170 170 # ifdef VBOX_WITH_ALSA 171 m CbAudioDriver->addItem (gpConverter->toString (KAudioDriverType_ALSA));171 m_pComboAudioDriver->addItem (gpConverter->toString (KAudioDriverType_ALSA)); 172 172 # endif 173 173 #endif 174 174 #if defined Q_OS_MACX 175 m CbAudioDriver->addItem (gpConverter->toString (KAudioDriverType_CoreAudio));175 m_pComboAudioDriver->addItem (gpConverter->toString (KAudioDriverType_CoreAudio)); 176 176 #endif 177 177 /* Set the old value */ 178 m CbAudioDriver->setCurrentIndex (currentDriver);178 m_pComboAudioDriver->setCurrentIndex (currentDriver); 179 179 180 180 /* Save the current selected value */ 181 int currentController = m CbAudioController->currentIndex();181 int currentController = m_pComboAudioController->currentIndex(); 182 182 /* Clear the controller box */ 183 m CbAudioController->clear();183 m_pComboAudioController->clear(); 184 184 /* Refill them */ 185 m CbAudioController->insertItem (mCbAudioController->count(),185 m_pComboAudioController->insertItem (m_pComboAudioController->count(), 186 186 gpConverter->toString (KAudioControllerType_HDA)); 187 m CbAudioController->insertItem (mCbAudioController->count(),187 m_pComboAudioController->insertItem (m_pComboAudioController->count(), 188 188 gpConverter->toString (KAudioControllerType_AC97)); 189 m CbAudioController->insertItem (mCbAudioController->count(),189 m_pComboAudioController->insertItem (m_pComboAudioController->count(), 190 190 gpConverter->toString (KAudioControllerType_SB16)); 191 191 /* Set the old value */ 192 m CbAudioController->setCurrentIndex (currentController);192 m_pComboAudioController->setCurrentIndex (currentController); 193 193 } 194 194 … … 196 196 { 197 197 m_pContainerAudioOptions->setEnabled(isMachineOffline()); 198 m AudioChild->setEnabled(mGbAudio->isChecked());199 } 200 198 m_pContainerAudioSubOptions->setEnabled(m_pCheckBoxAudio->isChecked()); 199 } 200 -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsAudio.ui
r46631 r46634 3 3 VBox frontends: Qt4 GUI ("VirtualBox"): 4 4 5 Copyright (C) 2008-201 2Oracle Corporation5 Copyright (C) 2008-2013 Oracle Corporation 6 6 7 7 This file is part of VirtualBox Open Source Edition (OSE), as … … 18 18 <item> 19 19 <widget class="QWidget" name="m_pContainerAudioOptions"> 20 <layout class="QGridLayout" >20 <layout class="QGridLayout" name="m_pContainerLayoutAudioOptions"> 21 21 <item row="0" column="0" colspan="2"> 22 <widget class="QCheckBox" name="m GbAudio">22 <widget class="QCheckBox" name="m_pCheckBoxAudio"> 23 23 <property name="whatsThis"> 24 24 <string>When checked, a virtual PCI audio card will be plugged into the virtual machine and will communicate with the host audio system using the specified driver.</string> … … 46 46 </item> 47 47 <item row="1" column="1"> 48 <widget class="QWidget" name="m AudioChild">49 <layout class="QGridLayout" >48 <widget class="QWidget" name="m_pContainerAudioSubOptions"> 49 <layout class="QGridLayout" name="m_pContainerLayoutAudioSubOptions"> 50 50 <property name="margin"> 51 51 <number>0</number> 52 52 </property> 53 53 <item row="0" column="0"> 54 <widget class="QLabel" name="m LbAudioDriver">54 <widget class="QLabel" name="m_pLabelAudioDriver"> 55 55 <property name="text"> 56 56 <string>Host Audio &Driver:</string> … … 60 60 </property> 61 61 <property name="buddy"> 62 <cstring>m CbAudioDriver</cstring>62 <cstring>m_pComboAudioDriver</cstring> 63 63 </property> 64 64 </widget> 65 65 </item> 66 66 <item row="0" column="1"> 67 <widget class="QComboBox" name="m CbAudioDriver">67 <widget class="QComboBox" name="m_pComboAudioDriver"> 68 68 <property name="sizePolicy"> 69 69 <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed"> … … 78 78 </item> 79 79 <item row="1" column="0"> 80 <widget class="QLabel" name="m LbAudioController">80 <widget class="QLabel" name="m_pLabelAudioController"> 81 81 <property name="text"> 82 82 <string>Audio &Controller:</string> … … 86 86 </property> 87 87 <property name="buddy"> 88 <cstring>m CbAudioController</cstring>88 <cstring>m_pComboAudioController</cstring> 89 89 </property> 90 90 </widget> 91 91 </item> 92 92 <item row="1" column="1"> 93 <widget class="QComboBox" name="m CbAudioController">93 <widget class="QComboBox" name="m_pComboAudioController"> 94 94 <property name="sizePolicy"> 95 95 <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed"> … … 127 127 <connections> 128 128 <connection> 129 <sender>m GbAudio</sender>129 <sender>m_pCheckBoxAudio</sender> 130 130 <signal>toggled(bool)</signal> 131 <receiver>m AudioChild</receiver>131 <receiver>m_pContainerAudioSubOptions</receiver> 132 132 <slot>setEnabled(bool)</slot> 133 133 </connection>
Note:
See TracChangeset
for help on using the changeset viewer.