Changeset 6993 in vbox
- Timestamp:
- Feb 18, 2008 1:49:09 PM (17 years ago)
- svn:sync-xref-src-repo-rev:
- 28188
- Location:
- trunk/src/VBox/Frontends/VirtualBox
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/include/VBoxGlobal.h
r6917 r6993 361 361 AssertMsg (it != audioControllerTypes.end(), ("No value for {%s}", s.latin1())); 362 362 return CEnums::AudioControllerType (it - audioControllerTypes.begin()); 363 } 364 365 QString toString (CEnums::NetworkAdapterType t) const 366 { 367 AssertMsg (!networkAdapterTypes [t].isNull(), ("No text for %d", t)); 368 return networkAdapterTypes [t]; 369 } 370 371 CEnums::NetworkAdapterType toNetworkAdapterType (const QString &s) const 372 { 373 QStringVector::const_iterator it = 374 qFind (networkAdapterTypes.begin(), networkAdapterTypes.end(), s); 375 AssertMsg (it != networkAdapterTypes.end(), ("No value for {%s}", s.latin1())); 376 return CEnums::NetworkAdapterType (it - networkAdapterTypes.begin()); 363 377 } 364 378 … … 624 638 QStringVector audioDriverTypes; 625 639 QStringVector audioControllerTypes; 640 QStringVector networkAdapterTypes; 626 641 QStringVector networkAttachmentTypes; 627 642 QStringVector clipboardTypes; -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxGlobal.cpp
r6917 r6993 748 748 , audioDriverTypes (CEnums::AudioDriverType_COUNT) 749 749 , audioControllerTypes (CEnums::AudioControllerType_COUNT) 750 , networkAdapterTypes (CEnums::NetworkAdapterType_COUNT) 750 751 , networkAttachmentTypes (CEnums::NetworkAttachmentType_COUNT) 751 752 , clipboardTypes (CEnums::ClipboardMode_COUNT) … … 2250 2251 tr ("SoundBlaster 16", "AudioControllerType"); 2251 2252 2253 networkAdapterTypes [CEnums::NetworkAdapterAm79C970A] = 2254 tr ("PCnet-PCI II (Am79C970A)", "NetworkAdapterType"); 2255 networkAdapterTypes [CEnums::NetworkAdapterAm79C973] = 2256 tr ("PCnet-FAST III (Am79C973)", "NetworkAdapterType"); 2257 networkAdapterTypes [CEnums::NetworkAdapter82540EM] = 2258 tr ("E1000 PRO MT Desktop (82540EM)", "NetworkAdapterType"); 2259 2252 2260 networkAttachmentTypes [CEnums::NoNetworkAttachment] = 2253 2261 tr ("Not attached", "NetworkAttachmentType"); -
trunk/src/VBox/Frontends/VirtualBox/ui/VBoxVMNetworkSettings.ui
r6383 r6993 78 78 <cstring>unnamed</cstring> 79 79 </property> 80 <widget class="QLabel" row=" 1" column="0">80 <widget class="QLabel" row="2" column="0"> 81 81 <property name="name"> 82 82 <cstring>txHostInterface_WIN</cstring> … … 97 97 </property> 98 98 </widget> 99 <widget class="QLabel" row=" 2" column="0">99 <widget class="QLabel" row="3" column="0"> 100 100 <property name="name"> 101 101 <cstring>txInternalNetwork</cstring> … … 116 116 </property> 117 117 </widget> 118 <widget class="QLineEdit" row=" 3" column="1">118 <widget class="QLineEdit" row="4" column="1"> 119 119 <property name="name"> 120 120 <cstring>leMACAddress</cstring> … … 138 138 </property> 139 139 </widget> 140 <widget class="QLabel" row="0" column="0"> 141 <property name="name"> 142 <cstring>txAdapterType</cstring> 143 </property> 144 <property name="sizePolicy"> 145 <sizepolicy> 146 <hsizetype>0</hsizetype> 147 <vsizetype>0</vsizetype> 148 <horstretch>0</horstretch> 149 <verstretch>0</verstretch> 150 </sizepolicy> 151 </property> 152 <property name="text"> 153 <string>Adapter &type</string> 154 </property> 155 <property name="buddy" stdset="0"> 156 <cstring>cbAdapterType</cstring> 157 </property> 158 </widget> 140 159 <widget class="QComboBox" row="0" column="1" rowspan="1" colspan="2"> 141 160 <property name="name"> 161 <cstring>cbAdapterType</cstring> 162 </property> 163 <property name="whatsThis" stdset="0"> 164 <string>Type of the virtual network adapter. Depending on this value, VirtualBox will provide a different virtual network hardware to the guest.</string> 165 </property> 166 </widget> 167 <widget class="QComboBox" row="1" column="1" rowspan="1" colspan="2"> 168 <property name="name"> 142 169 <cstring>cbNetworkAttachment</cstring> 143 170 </property> 144 171 <property name="whatsThis" stdset="0"> 145 146 </property> 147 </widget> 148 <widget class="QToolButton" row=" 3" column="2">172 <string>Controls the way how this virtual adapter is attached to the real network of the Host OS.</string> 173 </property> 174 </widget> 175 <widget class="QToolButton" row="4" column="2"> 149 176 <property name="name"> 150 177 <cstring>pbGenerateMAC</cstring> … … 168 195 </property> 169 196 </widget> 170 <widget class="QLabel" row=" 0" column="0">197 <widget class="QLabel" row="1" column="0"> 171 198 <property name="name"> 172 199 <cstring>txNetworkAttachment</cstring> … … 187 214 </property> 188 215 </widget> 189 <widget class="QLabel" row=" 3" column="0">216 <widget class="QLabel" row="4" column="0"> 190 217 <property name="name"> 191 218 <cstring>txMACAddress</cstring> … … 206 233 </property> 207 234 </widget> 208 <widget class="QComboBox" row=" 1" column="1" rowspan="1" colspan="2">235 <widget class="QComboBox" row="2" column="1" rowspan="1" colspan="2"> 209 236 <property name="name"> 210 237 <cstring>cbHostInterfaceName</cstring> … … 214 241 </property> 215 242 </widget> 216 <widget class="QComboBox" row=" 2" column="1" rowspan="1" colspan="2">243 <widget class="QComboBox" row="3" column="1" rowspan="1" colspan="2"> 217 244 <property name="name"> 218 245 <cstring>cbInternalNetworkName</cstring> -
trunk/src/VBox/Frontends/VirtualBox/ui/VBoxVMNetworkSettings.ui.h
r6383 r6993 28 28 void VBoxVMNetworkSettings::init() 29 29 { 30 cbAdapterType->insertItem (vboxGlobal().toString (CEnums::NetworkAdapterAm79C970A)); 31 cbAdapterType->insertItem (vboxGlobal().toString (CEnums::NetworkAdapterAm79C973)); 32 cbAdapterType->insertItem (vboxGlobal().toString (CEnums::NetworkAdapter82540EM)); 33 30 34 leMACAddress->setValidator (new QRegExpValidator 31 35 (QRegExp ("[0-9A-Fa-f][02468ACEace][0-9A-Fa-f]{10}"), this)); … … 135 139 grbEnabled->setChecked (adapter.GetEnabled()); 136 140 141 cbAdapterType->setCurrentText (vboxGlobal(). 142 toString (adapter.GetAdapterType())); 143 137 144 CEnums::NetworkAttachmentType type = adapter.GetAttachmentType(); 138 145 cbNetworkAttachment->setCurrentItem (0); … … 175 182 cadapter.SetEnabled (grbEnabled->isChecked()); 176 183 184 cadapter.SetAdapterType (vboxGlobal(). 185 toNetworkAdapterType (cbAdapterType->currentText())); 186 177 187 CEnums::NetworkAttachmentType type = 178 188 vboxGlobal().toNetworkAttachmentType (cbNetworkAttachment->currentText());
Note:
See TracChangeset
for help on using the changeset viewer.