Changeset 6378 in vbox for trunk/src/VBox
- Timestamp:
- Jan 18, 2008 2:47:11 PM (17 years ago)
- svn:sync-xref-src-repo-rev:
- 27321
- Location:
- trunk/src/VBox/Frontends/VirtualBox/ui
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/ui/VBoxVMNetworkSettings.ui
r6372 r6378 99 99 <widget class="QLabel" row="2" column="0"> 100 100 <property name="name"> 101 <cstring>txInternalNetwork _WIN</cstring>101 <cstring>txInternalNetwork</cstring> 102 102 </property> 103 103 <property name="sizePolicy"> … … 113 113 </property> 114 114 <property name="buddy" stdset="0"> 115 <cstring>cbInternalNetworkName _WIN</cstring>115 <cstring>cbInternalNetworkName</cstring> 116 116 </property> 117 117 </widget> … … 216 216 <widget class="QComboBox" row="2" column="1" rowspan="1" colspan="2"> 217 217 <property name="name"> 218 <cstring>cbInternalNetworkName _WIN</cstring>218 <cstring>cbInternalNetworkName</cstring> 219 219 </property> 220 220 <property name="editable"> … … 566 566 </widget> 567 567 </vbox> 568 </widget>569 <widget class="QGroupBox">570 <property name="name">571 <cstring>grbIntNet</cstring>572 </property>573 <property name="title">574 <string>Internal Network Settings</string>575 </property>576 <property name="flat">577 <bool>false</bool>578 </property>579 <hbox>580 <property name="name">581 <cstring>unnamed</cstring>582 </property>583 <widget class="QLabel">584 <property name="name">585 <cstring>txInternalNetwork_X11</cstring>586 </property>587 <property name="text">588 <string>&Network Name</string>589 </property>590 <property name="buddy" stdset="0">591 <cstring>cbInternalNetworkName_X11</cstring>592 </property>593 </widget>594 <widget class="QComboBox">595 <property name="name">596 <cstring>cbInternalNetworkName_X11</cstring>597 </property>598 <property name="editable">599 <bool>true</bool>600 </property>601 <property name="insertionPolicy">602 <enum>NoInsertion</enum>603 </property>604 <property name="autoCompletion">605 <bool>true</bool>606 </property>607 <property name="duplicatesEnabled">608 <bool>false</bool>609 </property>610 </widget>611 </hbox>612 568 </widget> 613 569 <spacer> … … 659 615 <tabstop>cbNetworkAttachment</tabstop> 660 616 <tabstop>cbHostInterfaceName</tabstop> 661 <tabstop>cbInternalNetworkName _WIN</tabstop>617 <tabstop>cbInternalNetworkName</tabstop> 662 618 <tabstop>leMACAddress</tabstop> 663 619 </tabstops> -
trunk/src/VBox/Frontends/VirtualBox/ui/VBoxVMNetworkSettings.ui.h
r6376 r6378 50 50 /* disable unused interface name UI */ 51 51 grbTAP->setHidden (true); 52 grbIntNet->setHidden (true);53 52 connect (grbEnabled, SIGNAL (toggled (bool)), 54 53 this, SLOT (grbEnabledToggled (bool))); … … 57 56 txHostInterface_WIN->setHidden (true); 58 57 cbHostInterfaceName->setHidden (true); 59 txInternalNetwork_WIN->setHidden (true);60 cbInternalNetworkName_WIN->setHidden (true);61 58 /* setup iconsets */ 62 59 pbTAPSetup->setIconSet (VBoxGlobal::iconSet ("select_file_16px.png", … … 84 81 isInterfaceInvalid (aList, cbHostInterfaceName->currentText())) 85 82 return IncorrectInterface; 86 else if (type == CEnums::InternalNetworkAttachment && 87 cbInternalNetworkName_WIN->currentText().isEmpty()) 83 else 84 #else 85 NOREF (aList); 86 #endif 87 if (type == CEnums::InternalNetworkAttachment && 88 cbInternalNetworkName->currentText().isEmpty()) 88 89 return MissedNetworkName; 89 90 else 90 91 return NoErrors; 91 #else92 NOREF (aList);93 if (type == CEnums::InternalNetworkAttachment &&94 cbInternalNetworkName_X11->currentText().isEmpty())95 return MissedNetworkName;96 else97 return NoErrors;98 #endif99 92 } 100 93 … … 128 121 void VBoxVMNetworkSettings::loadNetworksList (const QStringList &aList) 129 122 { 130 QComboBox *cbNetworkName = 0; 131 #if defined Q_WS_WIN 132 cbNetworkName = cbInternalNetworkName_WIN; 133 #else 134 cbNetworkName = cbInternalNetworkName_X11; 135 #endif 136 Assert (cbNetworkName); 137 QString curText = cbNetworkName->currentText(); 138 cbNetworkName->clear(); 139 cbNetworkName->clearEdit(); 140 cbNetworkName->insertStringList (aList); 141 cbNetworkName->setCurrentText (curText); 123 QString curText = cbInternalNetworkName->currentText(); 124 cbInternalNetworkName->clear(); 125 cbInternalNetworkName->clearEdit(); 126 cbInternalNetworkName->insertStringList (aList); 127 cbInternalNetworkName->setCurrentText (curText); 142 128 } 143 129 … … 172 158 if (cbHostInterfaceName->currentItem() == -1) 173 159 cbHostInterfaceName->setCurrentText (name); 174 cbInternalNetworkName_WIN->setCurrentText (adapter.GetInternalNetwork());175 160 #else 176 161 leHostInterface->setText (adapter.GetHostInterface()); 177 cbInternalNetworkName_X11->setCurrentText (adapter.GetInternalNetwork()); 178 #endif 162 #endif 163 cbInternalNetworkName->setCurrentText (adapter.GetInternalNetwork()); 179 164 180 165 #if defined Q_WS_X11 … … 232 217 } 233 218 else if (type == CEnums::InternalNetworkAttachment) 234 { 235 #if defined Q_WS_WIN 236 if (!cbInternalNetworkName_WIN->currentText().isEmpty()) 237 cadapter.SetInternalNetwork (cbInternalNetworkName_WIN->currentText()); 238 #else 239 if (!cbInternalNetworkName_X11->currentText().isEmpty()) 240 cadapter.SetInternalNetwork (cbInternalNetworkName_X11->currentText()); 241 #endif 242 } 219 cadapter.SetInternalNetwork (cbInternalNetworkName->currentText()); 243 220 } 244 221 … … 275 252 txHostInterface_WIN->setEnabled (enableHostIf); 276 253 cbHostInterfaceName->setEnabled (enableHostIf); 277 txInternalNetwork_WIN->setEnabled (enableIntNet);278 cbInternalNetworkName_WIN->setEnabled (enableIntNet);279 254 #else 280 255 grbTAP->setEnabled (enableHostIf); 281 grbIntNet->setEnabled (enableIntNet); 282 #endif 256 #endif 257 txInternalNetwork->setEnabled (enableIntNet); 258 cbInternalNetworkName->setEnabled (enableIntNet); 283 259 } 284 260 -
trunk/src/VBox/Frontends/VirtualBox/ui/VBoxVMSettingsDlg.ui.h
r6376 r6378 2348 2348 2349 2349 /* setup validation */ 2350 QComboBox *cbNetworkName = 0;2351 #ifdef Q_WS_WIN2352 cbNetworkName = page->cbInternalNetworkName_WIN;2353 #else2354 cbNetworkName = page->cbInternalNetworkName_X11;2355 #endif2356 Assert (cbNetworkName);2357 2358 2350 QIWidgetValidator *wval = 2359 2351 new QIWidgetValidator (QString ("%1: %2") … … 2363 2355 connect (page->cbNetworkAttachment, SIGNAL (activated (const QString &)), 2364 2356 wval, SLOT (revalidate())); 2365 connect ( cbNetworkName, SIGNAL (activated (const QString &)),2357 connect (page->cbInternalNetworkName, SIGNAL (activated (const QString &)), 2366 2358 wval, SLOT (revalidate())); 2367 connect ( cbNetworkName, SIGNAL (textChanged (const QString &)),2359 connect (page->cbInternalNetworkName, SIGNAL (textChanged (const QString &)), 2368 2360 this, SLOT (updateNetworksList())); 2369 connect ( cbNetworkName, SIGNAL (textChanged (const QString &)),2361 connect (page->cbInternalNetworkName, SIGNAL (textChanged (const QString &)), 2370 2362 wval, SLOT (revalidate())); 2371 2363 connect (wval, SIGNAL (validityChanged (const QIWidgetValidator *)), … … 2402 2394 if (pg) 2403 2395 { 2404 QComboBox *cb = 0; 2405 #if defined Q_WS_WIN 2406 cb = pg->cbInternalNetworkName_WIN; 2407 #else 2408 cb = pg->cbInternalNetworkName_X11; 2409 #endif 2410 Assert (cb); 2411 QString curText = cb->currentText(); 2396 QString curText = pg->cbInternalNetworkName->currentText(); 2412 2397 if (!curText.isEmpty() && !curList.contains (curText)) 2413 2398 curList << curText;
Note:
See TracChangeset
for help on using the changeset viewer.