儲存庫 vbox 的更動 18235
- 時間撮記:
- 2009-3-25 上午02:42:57 (16 年 以前)
- 位置:
- trunk/src/VBox/Frontends/VirtualBox
- 檔案:
-
- 新增 6 筆資料
- 修改 10 筆資料
圖例:
- 未更動
- 新增
- 刪除
-
trunk/src/VBox/Frontends/VirtualBox/Makefile.kmk
r18071 r18235 284 284 include/VBoxGLSettingsUpdate.h \ 285 285 include/VBoxGLSettingsLanguage.h \ 286 include/VBoxGLSettingsNetwork.h \ 287 include/VBoxGLSettingsNetworkDetails.h \ 286 288 include/VBoxSettingsDialog.h \ 287 289 include/VBoxSettingsDialogSpecific.h \ … … 366 368 src/VBoxGLSettingsUpdate.cpp \ 367 369 src/VBoxGLSettingsLanguage.cpp \ 370 src/VBoxGLSettingsNetwork.cpp \ 371 src/VBoxGLSettingsNetworkDetails.cpp \ 368 372 src/VBoxSettingsDialog.cpp \ 369 373 src/VBoxSettingsDialogSpecific.cpp \ -
trunk/src/VBox/Frontends/VirtualBox/VBoxUI.pro
r17784 r18235 57 57 ui/VBoxGLSettingsUpdate.ui \ 58 58 ui/VBoxGLSettingsLanguage.ui \ 59 ui/VBoxGLSettingsNetwork.ui \ 60 ui/VBoxGLSettingsNetworkDetails.ui \ 59 61 ui/VBoxImportApplianceWgt.ui \ 60 62 ui/VBoxImportApplianceWzd.ui \ -
trunk/src/VBox/Frontends/VirtualBox/include/VBoxSettingsDialog.h
r14339 r18235 24 24 #define __VBoxSettingsDialog_h__ 25 25 26 #include "VBoxSettingsDialog.gen.h" 26 /* VBox includes */ 27 27 #include "QIMainDialog.h" 28 28 #include "QIWithRetranslateUI.h" 29 #include "VBoxSettingsDialog.gen.h" 29 30 31 /* Qt forwards */ 32 class QIWidgetValidator; 33 class QStackedWidget; 34 class QTimer; 35 36 /* VBox forwards*/ 30 37 class VBoxWarnIconLabel; 31 class QIWidgetValidator;32 38 class VBoxSettingsSelector; 33 class QTimer; 34 class QStackedWidget; 39 class VBoxSettingsPage; 35 40 36 41 /* … … 52 57 protected slots: 53 58 54 virtual void revalidate (QIWidgetValidator * /* aWval */) {}59 virtual void revalidate (QIWidgetValidator *aWval); 55 60 void categoryChanged (int aId); 56 61 … … 64 69 void setError (const QString &aError); 65 70 void setWarning (const QString &aWarning); 71 72 void addItem (const QString &aBigIcon, const QString &aBigIconDisabled, 73 const QString &aSmallIcon, const QString &aSmallIconDisabled, 74 int aId, const QString &aLink, 75 VBoxSettingsPage* aPrefPage = NULL, int aParentId = -1); 66 76 67 77 VBoxSettingsSelector *mSelector; … … 78 88 bool eventFilter (QObject *aObject, QEvent *aEvent); 79 89 void showEvent (QShowEvent *aEvent); 90 91 VBoxSettingsPage* attachValidator (VBoxSettingsPage *aPage); 80 92 81 93 /* Flags */ -
trunk/src/VBox/Frontends/VirtualBox/include/VBoxSettingsDialogSpecific.h
r12130 r18235 24 24 #define __VBoxSettingsDialogSpecific_h__ 25 25 26 #include "COMDefs.h" 26 27 #include "VBoxSettingsDialog.h" 27 #include "COMDefs.h"28 29 class VBoxGlobalSettings;30 class VBoxSettingsPage;31 28 32 29 /* … … 46 43 UpdateId, 47 44 LanguageId, 48 USBId 45 USBId, 46 NetworkId 49 47 }; 50 48 … … 95 93 const QString &aCategory, const QString &aControl); 96 94 97 protected slots:98 99 void revalidate (QIWidgetValidator *aWval);100 101 95 protected: 102 96 … … 115 109 private: 116 110 117 void addItem (const QString &aBigIcon, const QString &aBigIconDisabled, const QString &aSmallIcon, const QString &aSmallIconDisabled, int aId, const QString &aLink, VBoxSettingsPage* aPrefPage = NULL, int aParentId = -1);118 111 void updateAvailability(); 119 VBoxSettingsPage* attachValidator (VBoxSettingsPage *aPage);120 112 121 113 CMachine mMachine; -
trunk/src/VBox/Frontends/VirtualBox/include/VBoxVMSettingsNetworkDetails.h
r17789 r18235 56 56 57 57 void accept(); 58 void hostOnlyInterfaceChanged();59 void hostOnlyDHCPChanged();60 58 void genMACClicked(); 61 #if defined (Q_WS_WIN32)62 void addInterface();63 void delInterface();64 #endif65 59 66 60 private: -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxSettingsDialog.cpp
r17150 r18235 35 35 /* Qt includes */ 36 36 #include <QTimer> 37 #include <QPushButton>38 37 #include <QStackedWidget> 39 38 … … 43 42 44 43 VBoxSettingsDialog::VBoxSettingsDialog (QWidget *aParent /* = NULL */) 45 : QIWithRetranslateUI <QIMainDialog> (aParent)44 : QIWithRetranslateUI <QIMainDialog> (aParent) 46 45 , mPolished (false) 47 46 , mValid (true) … … 68 67 mLbTitle->setFont (f); 69 68 70 QGridLayout *mainLayout = static_cast <QGridLayout*> (mAllWidget->layout());69 QGridLayout *mainLayout = static_cast <QGridLayout*> (mAllWidget->layout()); 71 70 #ifdef VBOX_GUI_WITH_TOOLBAR_SETTINGS 72 71 mLbTitle->hide(); 73 72 mLbWhatsThis->hide(); 74 73 mSelector = new VBoxSettingsToolBarSelector (this); 75 static_cast <VBoxToolBar*> (mSelector->widget())->setMacToolbar();76 addToolBar (qobject_cast <QToolBar*> (mSelector->widget()));74 static_cast <VBoxToolBar*> (mSelector->widget())->setMacToolbar(); 75 addToolBar (qobject_cast <QToolBar*> (mSelector->widget())); 77 76 /* No title in this mode, we change the title of the window. */ 78 77 mainLayout->setColumnMinimumWidth (0, 0); … … 124 123 } 125 124 125 void VBoxSettingsDialog::revalidate (QIWidgetValidator *aWval) 126 { 127 /* Perform validations for particular page */ 128 VBoxSettingsPage *page = qobject_cast <VBoxSettingsPage*> (aWval->widget()); 129 AssertMsg (page, ("Every validator should corresponds a page!\n")); 130 131 QString warning; 132 QString title = mSelector->itemTextByPage (page); 133 bool valid = page->revalidate (warning, title); 134 warning = warning.isEmpty() ? QString::null : 135 tr ("On the <b>%1</b> page, %2").arg (title, warning); 136 aWval->setLastWarning (warning); 137 valid ? setWarning (warning) : setError (warning); 138 139 aWval->setOtherValid (valid); 140 } 141 142 void VBoxSettingsDialog::categoryChanged (int aId) 143 { 144 QWidget *rootPage = mSelector->rootPage (aId); 145 #ifndef Q_WS_MAC 146 mLbTitle->setText (mSelector->itemText (aId)); 147 mStack->setCurrentIndex (mStack->indexOf (rootPage)); 148 #else /* Q_WS_MAC */ 149 QSize cs = size(); 150 /* First make all fully resizeable */ 151 setMinimumSize (QSize (minimumWidth(), 0)); 152 setMaximumSize (QSize (minimumWidth(), QWIDGETSIZE_MAX)); 153 for (int i = 0; i < mStack->count(); ++i) 154 mStack->widget (i)->setSizePolicy (QSizePolicy::Preferred, QSizePolicy::Ignored); 155 int a = mStack->indexOf (rootPage); 156 if (a < mSizeList.count()) 157 { 158 QSize ss = mSizeList.at (a); 159 mStack->widget (a)->setSizePolicy (QSizePolicy::Preferred, QSizePolicy::Preferred); 160 /* Switch to the new page first if we are shrinking */ 161 if (cs.height() > ss.height()) 162 mStack->setCurrentIndex (mStack->indexOf (rootPage)); 163 /* Do the animation */ 164 ::darwinWindowAnimateResize (this, QRect (x(), y(), 165 ss.width(), ss.height())); 166 /* Switch to the new page last if we are zooming */ 167 if (cs.height() <= ss.height()) 168 mStack->setCurrentIndex (mStack->indexOf (rootPage)); 169 /* Make the widget fixed size */ 170 setFixedSize (ss); 171 } 172 ::darwinSetShowsResizeIndicator (this, false); 173 #endif /* !Q_WS_MAC */ 174 # ifdef VBOX_GUI_WITH_TOOLBAR_SETTINGS 175 setWindowTitle (dialogTitle()); 176 # endif 177 } 178 126 179 void VBoxSettingsDialog::retranslateUi() 127 180 { … … 136 189 mIconLabel->setWarningText (mWarnHint); 137 190 138 QList <QIWidgetValidator*> vlist = findChildren<QIWidgetValidator*>();191 QList <QIWidgetValidator*> vlist = findChildren <QIWidgetValidator*> (); 139 192 140 193 /* Rename all validators to make them feat new language. */ 141 194 foreach (QIWidgetValidator *wval, vlist) 142 195 wval->setCaption (mSelector->itemTextByPage ( 143 qobject_cast <VBoxSettingsPage*> (wval->widget())));196 qobject_cast <VBoxSettingsPage*> (wval->widget()))); 144 197 145 198 /* Revalidate all pages to retranslate the warning messages also. */ … … 147 200 if (!wval->isValid()) 148 201 revalidate (wval); 202 } 203 204 QString VBoxSettingsDialog::titleExtension() const 205 { 206 #ifdef VBOX_GUI_WITH_TOOLBAR_SETTINGS 207 return mSelector->itemText (mSelector->currentId()); 208 #else 209 return tr ("Settings"); 210 #endif 149 211 } 150 212 … … 193 255 } 194 256 257 void VBoxSettingsDialog::addItem (const QString &aBigIcon, 258 const QString &aBigIconDisabled, 259 const QString &aSmallIcon, 260 const QString &aSmallIconDisabled, 261 int aId, 262 const QString &aLink, 263 VBoxSettingsPage* aPrefPage /* = NULL*/, 264 int aParentId /* = -1 */) 265 { 266 QWidget *page = mSelector->addItem (aBigIcon, aBigIconDisabled, aSmallIcon, aSmallIconDisabled, 267 aId, aLink, 268 aPrefPage, aParentId); 269 if (page) 270 mStack->addWidget (page); 271 if (aPrefPage) 272 attachValidator (aPrefPage); 273 } 274 195 275 void VBoxSettingsDialog::enableOk (const QIWidgetValidator*) 196 276 { 197 QList <QIWidgetValidator*> vlist (findChildren <QIWidgetValidator*> ());277 QList <QIWidgetValidator*> vlist (findChildren <QIWidgetValidator*> ()); 198 278 199 279 /* Detect ERROR presence */ … … 260 340 } 261 341 262 QString VBoxSettingsDialog::titleExtension() const263 {264 #ifdef VBOX_GUI_WITH_TOOLBAR_SETTINGS265 return mSelector->itemText (mSelector->currentId());266 #else267 return tr ("Settings");268 #endif269 }270 271 void VBoxSettingsDialog::categoryChanged (int aId)272 {273 QWidget *rootPage = mSelector->rootPage (aId);274 #ifndef Q_WS_MAC275 mLbTitle->setText (mSelector->itemText (aId));276 mStack->setCurrentIndex (mStack->indexOf (rootPage));277 #else /* Q_WS_MAC */278 QSize cs = size();279 /* First make all fully resizeable */280 setMinimumSize (QSize (minimumWidth(), 0));281 setMaximumSize (QSize (minimumWidth(), QWIDGETSIZE_MAX));282 for (int i = 0; i < mStack->count(); ++i)283 mStack->widget (i)->setSizePolicy (QSizePolicy::Preferred, QSizePolicy::Ignored);284 int a = mStack->indexOf (rootPage);285 if (a < mSizeList.count())286 {287 QSize ss = mSizeList.at (a);288 mStack->widget (a)->setSizePolicy (QSizePolicy::Preferred, QSizePolicy::Preferred);289 /* Switch to the new page first if we are shrinking */290 if (cs.height() > ss.height())291 mStack->setCurrentIndex (mStack->indexOf (rootPage));292 /* Do the animation */293 ::darwinWindowAnimateResize (this, QRect (x(), y(),294 ss.width(), ss.height()));295 /* Switch to the new page last if we are zooming */296 if (cs.height() <= ss.height())297 mStack->setCurrentIndex (mStack->indexOf (rootPage));298 /* Make the widget fixed size */299 setFixedSize (ss);300 }301 ::darwinSetShowsResizeIndicator (this, false);302 #endif /* !Q_WS_MAC */303 # ifdef VBOX_GUI_WITH_TOOLBAR_SETTINGS304 setWindowTitle (dialogTitle());305 # endif306 }307 308 342 void VBoxSettingsDialog::updateWhatsThis (bool aGotFocus /* = false */) 309 343 { … … 353 387 return QIMainDialog::eventFilter (aObject, aEvent); 354 388 355 QWidget *widget = static_cast <QWidget*> (aObject);389 QWidget *widget = static_cast <QWidget*> (aObject); 356 390 if (widget->window() != this) 357 391 return QIMainDialog::eventFilter (aObject, aEvent); … … 446 480 } 447 481 482 VBoxSettingsPage* VBoxSettingsDialog::attachValidator (VBoxSettingsPage *aPage) 483 { 484 QIWidgetValidator *wval = new QIWidgetValidator (mSelector->itemTextByPage (aPage), 485 aPage, this); 486 connect (wval, SIGNAL (validityChanged (const QIWidgetValidator*)), 487 this, SLOT (enableOk (const QIWidgetValidator*))); 488 connect (wval, SIGNAL (isValidRequested (QIWidgetValidator*)), 489 this, SLOT (revalidate (QIWidgetValidator*))); 490 491 aPage->setValidator (wval); 492 aPage->setOrderAfter (mSelector->widget()); 493 494 return aPage; 495 } 496 -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxSettingsDialogSpecific.cpp
r17394 r18235 33 33 #include "VBoxGLSettingsUpdate.h" 34 34 #include "VBoxGLSettingsLanguage.h" 35 #include "VBoxGLSettingsNetwork.h" 35 36 36 37 #include "VBoxVMSettingsGeneral.h" … … 62 63 /* General page */ 63 64 prefPage = new VBoxGLSettingsGeneral(); 64 page = mSelector->addItem (":/machine_32px.png", ":/machine_disabled_32px.png", ":/machine_16px.png", ":/machine_disabled_16px.png", 65 GeneralId, "#general", 66 prefPage); 67 if (page) 68 mStack->addWidget (page); 69 prefPage->setOrderAfter (mSelector->widget()); 65 addItem (":/machine_32px.png", ":/machine_disabled_32px.png", ":/machine_16px.png", ":/machine_disabled_16px.png", 66 GeneralId, "#general", 67 prefPage); 70 68 71 69 /* Input page */ 72 70 prefPage = new VBoxGLSettingsInput(); 73 page = mSelector->addItem (":/hostkey_32px.png", ":/hostkey_disabled_32px.png", ":/hostkey_16px.png", ":/hostkey_disabled_16px.png", 74 InputId, "#input", 75 prefPage); 76 if (page) 77 mStack->addWidget (page); 78 prefPage->setOrderAfter (mSelector->widget()); 71 addItem (":/hostkey_32px.png", ":/hostkey_disabled_32px.png", ":/hostkey_16px.png", ":/hostkey_disabled_16px.png", 72 InputId, "#input", 73 prefPage); 79 74 80 75 /* Update page */ 81 76 prefPage = new VBoxGLSettingsUpdate(); 82 page = mSelector->addItem (":/refresh_32px.png", ":/refresh_disabled_32px.png", ":/refresh_16px.png", ":/refresh_disabled_16px.png", 83 UpdateId, "#update", 84 prefPage); 85 if (page) 86 mStack->addWidget (page); 87 prefPage->setOrderAfter (mSelector->widget()); 77 addItem (":/refresh_32px.png", ":/refresh_disabled_32px.png", ":/refresh_16px.png", ":/refresh_disabled_16px.png", 78 UpdateId, "#update", 79 prefPage); 88 80 89 81 /* Language page */ 90 82 prefPage = new VBoxGLSettingsLanguage(); 91 page = mSelector->addItem (":/site_32px.png", ":/site_disabled_32px.png", ":/site_16px.png", ":/site_disabled_16px.png", 92 LanguageId, "#language", 93 prefPage); 94 if (page) 95 mStack->addWidget (page); 96 prefPage->setOrderAfter (mSelector->widget()); 83 addItem (":/site_32px.png", ":/site_disabled_32px.png", ":/site_16px.png", ":/site_disabled_16px.png", 84 LanguageId, "#language", 85 prefPage); 97 86 98 87 #ifdef ENABLE_GLOBAL_USB 99 88 /* USB page */ 100 89 prefPage = VBoxVMSettingsUSB (VBoxVMSettingsUSB::HostType); 101 page = mSelector->addItem (":/usb_32px.png", ":/usb_disabled_32px.png", ":/usb_16px.png", ":/usb_disabled_16px.png" 102 USBId, "#usb", 103 prefPage); 104 if (page) 105 mStack->addWidget (page); 106 prefPage->setOrderAfter (mSelector->widget()); 90 addItem (":/usb_32px.png", ":/usb_disabled_32px.png", ":/usb_16px.png", ":/usb_disabled_16px.png" 91 USBId, "#usb", 92 prefPage); 107 93 #endif 94 95 /* Network page */ 96 prefPage = new VBoxGLSettingsNetwork(); 97 addItem (":/nw_32px.png", ":/nw_disabled_32px.png", ":/nw_16px.png", ":/nw_disabled_16px.png", 98 NetworkId, "#language", 99 prefPage); 108 100 109 101 /* Update Selector with available items */ … … 122 114 VBoxGlobalSettings sett = vboxGlobal().settings(); 123 115 124 QList <VBoxSettingsPage*> pages = mSelector->settingPages();116 QList <VBoxSettingsPage*> pages = mSelector->settingPages(); 125 117 foreach (VBoxSettingsPage *page, pages) 126 118 if (page->isEnabled()) … … 134 126 VBoxGlobalSettings newsett = sett; 135 127 136 QList <VBoxSettingsPage*> pages = mSelector->settingPages();128 QList <VBoxSettingsPage*> pages = mSelector->settingPages(); 137 129 foreach (VBoxSettingsPage *page, pages) 138 130 if (page->isEnabled()) … … 170 162 #endif 171 163 164 /* Network page */ 165 mSelector->setItemText (NetworkId, tr ("Network")); 166 172 167 /* Translate the selector */ 173 168 mSelector->polish(); … … 310 305 if (!aControl.isNull()) 311 306 { 312 if (QWidget *w = mStack->currentWidget()->findChild <QWidget*> (aControl))307 if (QWidget *w = mStack->currentWidget()->findChild <QWidget*> (aControl)) 313 308 { 314 QList <QWidget*> parents;309 QList <QWidget*> parents; 315 310 QWidget *p = w; 316 311 while ((p = p->parentWidget()) != NULL) 317 312 { 318 if (QTabWidget *tb = qobject_cast <QTabWidget*> (p))313 if (QTabWidget *tb = qobject_cast <QTabWidget*> (p)) 319 314 { 320 315 /* The tab contents widget is two steps down … … 336 331 } 337 332 338 void VBoxVMSettingsDlg::addItem (const QString &aBigIcon,339 const QString &aBigIconDisabled,340 const QString &aSmallIcon,341 const QString &aSmallIconDisabled,342 int aId,343 const QString &aLink,344 VBoxSettingsPage* aPrefPage /* = NULL*/,345 int aParentId /* = -1 */)346 {347 QWidget *page = mSelector->addItem (aBigIcon, aBigIconDisabled, aSmallIcon, aSmallIconDisabled,348 aId, aLink,349 aPrefPage, aParentId);350 if (page)351 mStack->addWidget (page);352 if (aPrefPage)353 attachValidator (aPrefPage);354 }355 356 void VBoxVMSettingsDlg::revalidate (QIWidgetValidator *aWval)357 {358 /* Do individual validations for pages */359 QWidget *pg = aWval->widget();360 bool valid = aWval->isOtherValid();361 362 VBoxSettingsPage *page = static_cast <VBoxSettingsPage*> (pg);363 QString pageTitle = mSelector->itemTextByPage (page);364 365 QString text;366 valid = page->revalidate (text, pageTitle);367 text = text.isEmpty() ? QString::null :368 tr ("On the <b>%1</b> page, %2").arg (pageTitle, text);369 aWval->setLastWarning (text);370 valid ? setWarning (text) : setError (text);371 372 aWval->setOtherValid (valid);373 }374 375 333 void VBoxVMSettingsDlg::getFrom() 376 334 { 377 QList <VBoxSettingsPage*> pages = mSelector->settingPages();335 QList <VBoxSettingsPage*> pages = mSelector->settingPages(); 378 336 foreach (VBoxSettingsPage *page, pages) 379 337 page->getFrom (mMachine); … … 387 345 void VBoxVMSettingsDlg::putBackTo() 388 346 { 389 QList <VBoxSettingsPage*> pages = mSelector->settingPages();347 QList <VBoxSettingsPage*> pages = mSelector->settingPages(); 390 348 foreach (VBoxSettingsPage *page, pages) 391 349 page->putBackTo(); … … 462 420 463 421 /* Revalidate all pages to retranslate the warning messages also. */ 464 QList <QIWidgetValidator*> l = this->findChildren<QIWidgetValidator*>();422 QList <QIWidgetValidator*> l = this->findChildren <QIWidgetValidator*> (); 465 423 foreach (QIWidgetValidator *wval, l) 466 424 if (!wval->isValid()) … … 486 444 if (mAllowResetFirstRunFlag) 487 445 mResetFirstRunFlag = true; 488 }489 490 VBoxSettingsPage* VBoxVMSettingsDlg::attachValidator (VBoxSettingsPage *aPage)491 {492 QIWidgetValidator *wval = new QIWidgetValidator (mSelector->itemTextByPage (aPage),493 aPage, this);494 connect (wval, SIGNAL (validityChanged (const QIWidgetValidator*)),495 this, SLOT (enableOk (const QIWidgetValidator*)));496 connect (wval, SIGNAL (isValidRequested (QIWidgetValidator*)),497 this, SLOT (revalidate (QIWidgetValidator*)));498 499 aPage->setValidator (wval);500 aPage->setOrderAfter (mSelector->widget());501 502 return aPage;503 446 } 504 447 -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxVMSettingsNetwork.cpp
r18063 r18235 39 39 /* Setup widgets */ 40 40 mTbDetails->setIcon (VBoxGlobal::iconSet ( 41 ":/g lobal_settings_16px.png", ":/global_settings_disabled_16px.png"));41 ":/guesttools_16px.png", ":/guesttools_disabled_16px.png")); 42 42 43 43 /* Applying language settings */ … … 177 177 void VBoxVMSettingsNetwork::updateAttachmentInfo() 178 178 { 179 KNetworkAttachmentType type = attachmentType();180 179 QString line ("<tr><td><i><b><nobr><font color=grey>%1: </font></nobr></b></i></td>" 181 180 "<td><i><font color=grey>%2</font></i></td></tr>"); 181 QString info; 182 183 /* Append alternative information */ 184 KNetworkAttachmentType type = attachmentType(); 182 185 switch (type) 183 186 { 184 187 case KNetworkAttachmentType_Bridged: 185 188 { 186 QString info;187 189 QString name (mDetails->currentName (type)); 188 info += line.arg (tr ("Adapter")) 189 .arg (name.isEmpty() ? tr ("Not Selected") : name); 190 mLbInfo->setText ("<table>" + info + "</table>"); 190 info += line.arg (tr ("Adapter", "network")) 191 .arg (name.isEmpty() ? tr ("not selected", "adapter") : name); 191 192 break; 192 193 } 193 194 case KNetworkAttachmentType_Internal: 194 195 { 195 QString info;196 196 QString name (mDetails->currentName (type)); 197 info += line.arg (tr ("Name")) 198 .arg (name.isEmpty() ? tr ("Not Selected") : name); 199 mLbInfo->setText ("<table>" + info + "</table>"); 197 info += line.arg (tr ("Network", "internal")) 198 .arg (name.isEmpty() ? tr ("not selected", "network") : name); 200 199 break; 201 200 } 202 201 case KNetworkAttachmentType_HostOnly: 203 202 { 204 QString info;205 203 QString name (mDetails->currentName (type)); 206 info += line.arg (tr ("Interface")) 207 .arg (name.isEmpty() ? tr ("Not Selected") : name); 208 if (!name.isEmpty()) 209 { 210 bool dhcp = mDetails->property ("HOI_DhcpEnabled").toBool(); 211 info += line.arg (tr ("Configuration")) 212 .arg (dhcp ? tr ("Automatic", "configuration") 213 : tr ("Manual", "configuration")); 214 if (!dhcp) 215 { 216 QString ipv4addr (mDetails->property ("HOI_IPv4Addr").toString()); 217 QString ipv4mask (mDetails->property ("HOI_IPv4Mask").toString()); 218 info += line.arg (tr ("IPv4 Address")) 219 .arg (ipv4addr.isEmpty() ? tr ("Not Set", "address") : ipv4addr) + 220 line.arg (tr ("IPv4 Mask")) 221 .arg (ipv4mask.isEmpty() ? tr ("Not Set", "mask") : ipv4mask); 222 bool ipv6 = mDetails->property ("HOI_IPv6Supported").toBool(); 223 if (ipv6) 224 { 225 QString ipv6addr (mDetails->property ("HOI_IPv6Addr").toString()); 226 QString ipv6mask (mDetails->property ("HOI_IPv6Mask").toString()); 227 info += line.arg (tr ("IPv6 Address")) 228 .arg (ipv6addr.isEmpty() ? tr ("Not Set", "address") : ipv6addr) + 229 line.arg (tr ("IPv6 Mask")) 230 .arg (ipv6mask.isEmpty() ? tr ("Not Set", "length") : ipv6mask); 231 } 232 } 233 } 234 mLbInfo->setText ("<table>" + info + "</table>"); 204 info += line.arg (tr ("Interface", "network")) 205 .arg (name.isEmpty() ? tr ("not selected", "interface") : name); 235 206 break; 236 207 } 237 208 default: 238 mLbInfo->clear(); 239 break; 240 } 209 break; 210 } 211 212 #if 0 213 /* Append common information */ 214 QString macAddress (mDetails->property ("MAC_Address").toString()); 215 info += line.arg (tr ("MAC Address")) 216 .arg (macAddress.isEmpty() ? tr ("not selected", "address") : macAddress); 217 bool cableConnected (mDetails->property ("Cable_Connected").toBool()); 218 info += line.arg (tr ("Cable")) 219 .arg (cableConnected ? tr ("connected", "cable") : tr ("not connected", "cable")); 220 #endif 221 222 /* Finally set full label text */ 223 if (info.isEmpty()) 224 mLbInfo->clear(); 225 else 226 mLbInfo->setText ("<table>" + info + "</table>"); 241 227 242 228 if (mValidator) -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxVMSettingsNetworkDetails.cpp
r18065 r18235 46 46 /* Setup alternative widgets */ 47 47 mCbINT->setInsertPolicy (QComboBox::NoInsert); 48 mLeIPv4->setValidator (new QRegExpValidator49 (QRegExp ("\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}"), this));50 mLeHMv4->setValidator (new QRegExpValidator51 (QRegExp ("\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}"), this));52 mLeIPv6->setValidator (new QRegExpValidator53 (QRegExp ("[0-9a-fA-Z]{1,4}:{1,2}[0-9a-fA-Z]{1,4}:{1,2}"54 "[0-9a-fA-Z]{1,4}:{1,2}[0-9a-fA-Z]{1,4}:{1,2}"55 "[0-9a-fA-Z]{1,4}:{1,2}[0-9a-fA-Z]{1,4}:{1,2}"56 "[0-9a-fA-Z]{1,4}:{1,2}[0-9a-fA-Z]{1,4}"), this));57 mLeHMv6->setValidator (new QRegExpValidator58 (QRegExp ("[1-9][0-9]|1[0-1][0-9]|12[0-8]"), this));59 mLeIPv6->setFixedWidthByText (QString().fill ('X', 32) + QString().fill (':', 7));60 connect (mCbHOI, SIGNAL (currentIndexChanged (int)),61 this, SLOT (hostOnlyInterfaceChanged()));62 #if defined (Q_WS_WIN32)63 mTbAdd->setIcon (VBoxGlobal::iconSet (":/add_host_iface_16px.png",64 ":/add_host_iface_disabled_16px.png"));65 mTbDel->setIcon (VBoxGlobal::iconSet (":/remove_host_iface_16px.png",66 ":/remove_host_iface_disabled_16px.png"));67 connect (mTbAdd, SIGNAL (clicked()), this, SLOT (addInterface()));68 connect (mTbDel, SIGNAL (clicked()), this, SLOT (delInterface()));69 connect (mRbAuto, SIGNAL (toggled (bool)),70 this, SLOT (hostOnlyDHCPChanged()));71 connect (mRbManual, SIGNAL (toggled (bool)),72 this, SLOT (hostOnlyDHCPChanged()));73 #endif74 48 75 49 /* Setup common widgets */ 76 50 mLeMAC->setValidator (new QRegExpValidator 77 51 (QRegExp ("[0-9A-Fa-f][02468ACEace][0-9A-Fa-f]{10}"), this)); 78 mLeMAC->setFixedWidthByText (QString().fill ('X', 12)); 52 QStyleOptionFrame sof; 53 sof.initFrom (mLeMAC); 54 sof.rect = mLeMAC->contentsRect(); 55 sof.lineWidth = mLeMAC->style()->pixelMetric (QStyle::PM_DefaultFrameWidth); 56 sof.midLineWidth = 0; 57 sof.state |= QStyle::State_Sunken; 58 QSize sc (mLeMAC->fontMetrics().width (QString().fill ('X', 12)) + 2*2, 59 mLeMAC->fontMetrics().xHeight() + 2*1); 60 QSize sa = mLeMAC->style()->sizeFromContents (QStyle::CT_LineEdit, &sof, sc, mLeMAC); 61 mLeMAC->setMinimumWidth (sa.width()); 79 62 connect (mTbMAC, SIGNAL (clicked()), this, SLOT (genMACClicked())); 80 63 #if defined (Q_WS_MAC) … … 88 71 mAdapter = aAdapter; 89 72 90 /* Load alternate attributes */73 /* Load alternate settings */ 91 74 QString intName (mAdapter.GetInternalNetwork()); 92 75 if (!intName.isEmpty()) 93 76 setProperty ("INT_Name", QVariant (intName)); 94 95 77 QString ifsName (mAdapter.GetHostInterface()); 96 78 CHostNetworkInterface ifs = 97 79 vboxGlobal().virtualBox().GetHost().FindHostNetworkInterfaceByName (ifsName); 98 80 if (!ifs.isNull() && ifs.GetInterfaceType() == KHostNetworkInterfaceType_Bridged) 99 {100 81 setProperty ("BRG_Name", QVariant (ifsName)); 101 }102 82 else if (!ifs.isNull() && ifs.GetInterfaceType() == KHostNetworkInterfaceType_HostOnly) 103 {104 83 setProperty ("HOI_Name", QVariant (ifsName)); 105 #if defined (Q_WS_WIN32) 106 setProperty ("HOI_DhcpEnabled", QVariant (ifs.GetDhcpEnabled())); 107 #endif 108 setProperty ("HOI_IPv6Supported", QVariant (ifs.GetIPV6Supported())); 109 if (!ifs.GetDhcpEnabled()) 110 { 111 setProperty ("HOI_IPv4Addr", QVariant (ifs.GetIPAddress())); 112 setProperty ("HOI_IPv4Mask", QVariant (ifs.GetNetworkMask())); 113 if (ifs.GetIPV6Supported()) 114 { 115 setProperty ("HOI_IPv6Addr", QVariant (ifs.GetIPV6Address())); 116 setProperty ("HOI_IPv6Mask", QVariant (QString::number (ifs.GetIPV6NetworkMaskPrefixLength()))); 117 } 118 } 119 } 120 84 85 /* Load common settings */ 121 86 setProperty ("MAC_Address", QVariant (aAdapter.GetMACAddress())); 122 87 setProperty ("Cable_Connected", QVariant (aAdapter.GetCableConnected())); … … 130 95 { 131 96 case KNetworkAttachmentType_Bridged: 132 {133 97 mAdapter.SetHostInterface (name); 134 98 break; 135 } 136 case KNetworkAttachmentType_Internal: 137 { 99 case KNetworkAttachmentType_Internal: 138 100 mAdapter.SetInternalNetwork (name); 139 101 break; 140 } 141 case KNetworkAttachmentType_HostOnly: 142 { 143 CHostNetworkInterface iface = 144 vboxGlobal().virtualBox().GetHost().FindHostNetworkInterfaceByName (name); 145 if (!iface.isNull()) 146 { 147 if (property ("HOI_DhcpEnabled").toBool()) 148 { 149 iface.EnableDynamicIpConfig(); 150 } 151 else 152 { 153 iface.EnableStaticIpConfig (property ("HOI_IPv4Addr").toString(), 154 property ("HOI_IPv4Mask").toString()); 155 156 if (property ("HOI_IPv6Supported").toBool()) 157 { 158 iface.EnableStaticIpConfigV6 (property ("HOI_IPv6Addr").toString(), 159 property ("HOI_IPv6Mask").toString().toULong()); 160 } 161 } 162 } 102 case KNetworkAttachmentType_HostOnly: 163 103 mAdapter.SetHostInterface (name); 164 104 break; 165 }166 105 default: 167 106 break; … … 187 126 mLbHOI->setVisible (mType == KNetworkAttachmentType_HostOnly); 188 127 mCbHOI->setVisible (mType == KNetworkAttachmentType_HostOnly); 189 mLbIPv4->setVisible (mType == KNetworkAttachmentType_HostOnly);190 mLeIPv4->setVisible (mType == KNetworkAttachmentType_HostOnly);191 mLbHMv4->setVisible (mType == KNetworkAttachmentType_HostOnly);192 mLeHMv4->setVisible (mType == KNetworkAttachmentType_HostOnly);193 mLbIPv6->setVisible (mType == KNetworkAttachmentType_HostOnly);194 mLeIPv6->setVisible (mType == KNetworkAttachmentType_HostOnly);195 mLbHMv6->setVisible (mType == KNetworkAttachmentType_HostOnly);196 mLeHMv6->setVisible (mType == KNetworkAttachmentType_HostOnly);197 #if defined (Q_WS_WIN32)198 mTbAdd->setVisible (mType == KNetworkAttachmentType_HostOnly);199 mTbDel->setVisible (mType == KNetworkAttachmentType_HostOnly);200 mLbCT->setVisible (mType == KNetworkAttachmentType_HostOnly);201 mRbAuto->setVisible (mType == KNetworkAttachmentType_HostOnly);202 mRbManual->setVisible (mType == KNetworkAttachmentType_HostOnly);203 #endif204 128 205 129 /* Repopulate alternate combo-box with items */ … … 214 138 } 215 139 216 /* Reload alternate combo-box dependences */217 if (mType == KNetworkAttachmentType_HostOnly)218 {219 hostOnlyInterfaceChanged();220 if (property ("HOI_DhcpEnabled").toBool())221 {222 mRbAuto->setChecked (true);223 }224 else225 {226 mRbManual->setChecked (true);227 QString ipv4 (property ("HOI_IPv4Addr").toString());228 if (ipv4 != mLeIPv4->text())229 mLeIPv4->setText (ipv4);230 QString nmv4 (property ("HOI_IPv4Mask").toString());231 if (nmv4 != mLeHMv4->text())232 mLeHMv4->setText (nmv4);233 if (property ("HOI_IPv6Supported").toBool())234 {235 QString ipv6 (property ("HOI_IPv6Addr").toString());236 if (ipv6 != mLeIPv6->text())237 mLeIPv6->setText (ipv6);238 QString nmv6 (property ("HOI_IPv6Mask").toString());239 if (nmv6 != mLeHMv6->text())240 mLeHMv6->setText (nmv6);241 }242 }243 }244 245 140 /* Load common settings */ 246 141 mLeMAC->setText (property ("MAC_Address").toString()); … … 275 170 return false; 276 171 } 277 else if (!property ("HOI_DhcpEnabled").toBool())278 {279 if (!property ("HOI_IPv4Addr").toString().isEmpty() &&280 QHostAddress (property ("HOI_IPv4Addr").toString()).protocol()281 != QAbstractSocket::IPv4Protocol)282 {283 aWarning = tr ("host IPv4 address is wrong");284 return false;285 }286 if (!property ("HOI_IPv4Mask").toString().isEmpty() &&287 QHostAddress (property ("HOI_IPv4Mask").toString()).protocol()288 != QAbstractSocket::IPv4Protocol)289 {290 aWarning = tr ("host IPv4 network mask is wrong");291 return false;292 }293 if (property ("HOI_IPv6Supported").toBool())294 {295 if (!property ("HOI_IPv6Addr").toString().isEmpty() &&296 QHostAddress (property ("HOI_IPv6Addr").toString()).protocol()297 != QAbstractSocket::IPv6Protocol)298 {299 aWarning = tr ("host IPv6 address is wrong");300 return false;301 }302 }303 }304 172 break; 305 173 default: … … 356 224 357 225 /* Translate empty items */ 358 mNotSelected = tr ("Not Selected");226 mNotSelected = tr ("Not selected"); 359 227 populateComboboxes(); 360 228 } … … 402 270 QVariant (mCbHOI->itemData (mCbHOI->currentIndex()).toString() == QString (emptyItemCode) ? 403 271 QString::null : mCbHOI->currentText())); 404 setProperty ("HOI_DhcpEnabled", QVariant (mRbAuto->isChecked())); 405 setProperty ("HOI_IPv6Supported", QVariant (mLeIPv6->isEnabled())); 406 setProperty ("HOI_IPv4Addr", QVariant (mLeIPv4->text())); 407 setProperty ("HOI_IPv4Mask", QVariant (mLeHMv4->text())); 408 setProperty ("HOI_IPv6Addr", QVariant (mLeIPv6->text())); 409 setProperty ("HOI_IPv6Mask", QVariant (mLeHMv6->text())); 410 break; 411 default: 412 break; 413 } 414 272 break; 273 default: 274 break; 275 } 415 276 setProperty ("MAC_Address", QVariant (mLeMAC->text())); 416 277 setProperty ("Cable_Connected", QVariant (mCbCable->isChecked())); … … 419 280 } 420 281 421 void VBoxVMSettingsNetworkDetails::hostOnlyInterfaceChanged()422 {423 #if defined (Q_WS_WIN32)424 CHostNetworkInterface iface =425 vboxGlobal().virtualBox().GetHost().FindHostNetworkInterfaceByName (mCbHOI->currentText());426 427 bool isValid = !iface.isNull() &&428 iface.GetInterfaceType() == KHostNetworkInterfaceType_HostOnly;429 bool isManual = isValid && !iface.GetDhcpEnabled();430 431 mLbCT->setEnabled (isValid);432 mRbAuto->setEnabled (isValid);433 mRbManual->setEnabled (isValid);434 435 if (isManual)436 {437 mRbManual->blockSignals (true);438 mRbManual->setChecked (true);439 mRbManual->blockSignals (false);440 }441 else442 {443 mRbAuto->blockSignals (true);444 mRbAuto->setChecked (true);445 mRbAuto->blockSignals (false);446 }447 448 mTbDel->setEnabled (isValid);449 #endif450 451 hostOnlyDHCPChanged();452 }453 454 void VBoxVMSettingsNetworkDetails::hostOnlyDHCPChanged()455 {456 CHostNetworkInterface iface =457 vboxGlobal().virtualBox().GetHost().FindHostNetworkInterfaceByName (mCbHOI->currentText());458 459 bool isManual = !iface.isNull() &&460 iface.GetInterfaceType() == KHostNetworkInterfaceType_HostOnly &&461 mRbManual->isChecked();462 bool isIPv6Supported = isManual && iface.GetIPV6Supported();463 464 mLeIPv4->clear();465 mLeHMv4->clear();466 mLeIPv6->clear();467 mLeHMv6->clear();468 469 mLbIPv4->setEnabled (isManual);470 mLbHMv4->setEnabled (isManual);471 mLeIPv4->setEnabled (isManual);472 mLeHMv4->setEnabled (isManual);473 mLbIPv6->setEnabled (isIPv6Supported);474 mLbHMv6->setEnabled (isIPv6Supported);475 mLeIPv6->setEnabled (isIPv6Supported);476 mLeHMv6->setEnabled (isIPv6Supported);477 478 if (isManual)479 {480 mLeIPv4->setText (iface.GetIPAddress());481 mLeHMv4->setText (iface.GetNetworkMask());482 483 if (isIPv6Supported)484 {485 mLeIPv6->setText (iface.GetIPV6Address());486 mLeHMv6->setText (QString::number (iface.GetIPV6NetworkMaskPrefixLength()));487 }488 }489 }490 491 282 void VBoxVMSettingsNetworkDetails::genMACClicked() 492 283 { … … 494 285 mLeMAC->setText (mAdapter.GetMACAddress()); 495 286 } 496 497 #if defined (Q_WS_WIN32)498 void VBoxVMSettingsNetworkDetails::addInterface()499 {500 /* Allow the started helper process to make itself the foreground window */501 AllowSetForegroundWindow (ASFW_ANY);502 503 /* Creating interface */504 CHost host = vboxGlobal().virtualBox().GetHost();505 CHostNetworkInterface iface;506 CProgress progress = host.CreateHostOnlyNetworkInterface (iface);507 if (host.isOk())508 {509 vboxProblem().showModalProgressDialog (progress,510 tr ("Performing", "creating/removing host-only interface"), this);511 if (progress.GetResultCode() == 0)512 {513 mCbHOI->insertItem (mCbHOI->count(), iface.GetName());514 mCbHOI->setCurrentIndex (mCbHOI->count() - 1);515 }516 else517 vboxProblem().cannotCreateHostInterface (progress, this);518 }519 else520 vboxProblem().cannotCreateHostInterface (host, this);521 522 /* Allow the started helper process to make itself the foreground window */523 AllowSetForegroundWindow (ASFW_ANY);524 }525 526 void VBoxVMSettingsNetworkDetails::delInterface()527 {528 /* Allow the started helper process to make itself the foreground window */529 AllowSetForegroundWindow (ASFW_ANY);530 531 Assert (mCbHOI->itemData (mCbHOI->currentIndex()).toString()532 != QString (emptyItemCode));533 534 /* Check interface name */535 QString name (mCbHOI->currentText());536 537 /* Asking user about deleting selected network interface */538 int delNetIface = vboxProblem().confirmDeletingHostInterface (name, this);539 if (delNetIface == QIMessageBox::Cancel) return;540 541 /* Removing interface */542 CHost host = vboxGlobal().virtualBox().GetHost();543 CHostNetworkInterface iface = host.FindHostNetworkInterfaceByName (name);544 if (!iface.isNull())545 {546 /* Delete interface */547 CProgress progress = host.RemoveHostOnlyNetworkInterface (iface.GetId(), iface);548 if (host.isOk())549 {550 vboxProblem().showModalProgressDialog (progress,551 tr ("Performing", "creating/removing host-only interface"), this);552 if (progress.GetResultCode() == 0)553 {554 int pos = mCbHOI->findText (name);555 Assert (pos != -1);556 mCbHOI->removeItem (pos);557 }558 else559 vboxProblem().cannotRemoveHostInterface (progress, iface, this);560 }561 }562 if (!host.isOk())563 vboxProblem().cannotRemoveHostInterface (host, iface, this);564 565 /* Allow the started helper process to make itself the foreground window */566 AllowSetForegroundWindow (ASFW_ANY);567 }568 #endif569 287 570 288 void VBoxVMSettingsNetworkDetails::populateComboboxes() -
trunk/src/VBox/Frontends/VirtualBox/ui/VBoxVMSettingsNetworkDetails.ui
r17960 r18235 28 28 </property> 29 29 <layout class="QGridLayout" > 30 <item row="0" column="0" colspan=" 5" >30 <item row="0" column="0" colspan="4" > 31 31 <widget class="QILabelSeparator" name="mLsHost" > 32 32 <property name="sizePolicy" > … … 54 54 </widget> 55 55 </item> 56 <item row="1" column="2" colspan=" 3" >56 <item row="1" column="2" colspan="2" > 57 57 <widget class="QComboBox" name="mCbBRG" > 58 <property name="sizePolicy" > 59 <sizepolicy vsizetype="Fixed" hsizetype="Expanding" > 60 <horstretch>0</horstretch> 61 <verstretch>0</verstretch> 62 </sizepolicy> 63 </property> 58 64 <property name="toolTip" > 59 65 <string>Displays the name of the host network adapter selected for bridged networking.</string> … … 74 80 </widget> 75 81 </item> 76 <item row="2" column="2" colspan=" 3" >82 <item row="2" column="2" colspan="2" > 77 83 <widget class="QComboBox" name="mCbINT" > 84 <property name="sizePolicy" > 85 <sizepolicy vsizetype="Fixed" hsizetype="Expanding" > 86 <horstretch>0</horstretch> 87 <verstretch>0</verstretch> 88 </sizepolicy> 89 </property> 78 90 <property name="toolTip" > 79 91 <string>Displays the name of the internal network selected for this adapter.</string> … … 97 109 </widget> 98 110 </item> 99 <item row="3" column="2" colspan="3" > 100 <layout class="QHBoxLayout" > 101 <item> 102 <widget class="QComboBox" name="mCbHOI" > 103 <property name="toolTip" > 104 <string>Displays the name of the VirtualBox network interface selected for host-only networking.</string> 105 </property> 106 </widget> 107 </item> 108 <item> 109 <widget class="QToolButton" name="mTbAdd" > 110 <property name="toolTip" > 111 <string>Add new VirtualBox host-only network interface.</string> 112 </property> 113 <property name="autoRaise" > 114 <bool>true</bool> 115 </property> 116 <property name="visible" > 117 <bool>false</bool> 118 </property> 119 </widget> 120 </item> 121 <item> 122 <widget class="QToolButton" name="mTbDel" > 123 <property name="toolTip" > 124 <string>Remove selected VirtualBox host-only network interface.</string> 125 </property> 126 <property name="autoRaise" > 127 <bool>true</bool> 128 </property> 129 <property name="visible" > 130 <bool>false</bool> 131 </property> 132 </widget> 133 </item> 134 </layout> 135 </item> 136 <item row="4" column="1" > 137 <widget class="QLabel" name="mLbCT" > 138 <property name="visible" > 139 <bool>false</bool> 140 </property> 141 <property name="text" > 142 <string>Configuration Type:</string> 143 </property> 144 <property name="alignment" > 145 <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> 146 </property> 147 </widget> 148 </item> 149 <item row="4" column="2" colspan="3" > 150 <widget class="QRadioButton" name="mRbAuto" > 151 <property name="visible" > 152 <bool>false</bool> 153 </property> 154 <property name="toolTip" > 155 <string>Use DHCP automatic configuration for this host-only network interface.</string> 156 </property> 157 <property name="text" > 158 <string>&DHCP Automatic Configuration</string> 159 </property> 160 </widget> 161 </item> 162 <item row="5" column="2" colspan="3" > 163 <widget class="QRadioButton" name="mRbManual" > 164 <property name="visible" > 165 <bool>false</bool> 166 </property> 167 <property name="checked" > 168 <bool>true</bool> 169 </property> 170 <property name="toolTip" > 171 <string>Use manual configuration for this host-only network interface.</string> 172 </property> 173 <property name="text" > 174 <string>M&anual Configuration</string> 175 </property> 176 </widget> 177 </item> 178 <item row="6" column="1" > 179 <widget class="QLabel" name="mLbIPv4" > 180 <property name="text" > 181 <string>&Host IPv4 Address:</string> 182 </property> 183 <property name="alignment" > 184 <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> 185 </property> 186 <property name="buddy" > 187 <cstring>mLeIPv4</cstring> 188 </property> 189 </widget> 190 </item> 191 <item row="6" column="2" colspan="3" > 192 <widget class="QILineEdit" name="mLeIPv4" > 193 <property name="sizePolicy" > 194 <sizepolicy vsizetype="Fixed" hsizetype="Preferred" > 195 <horstretch>0</horstretch> 196 <verstretch>0</verstretch> 197 </sizepolicy> 198 </property> 199 <property name="toolTip" > 200 <string>Displays the host IPv4 address for this interface.</string> 201 </property> 202 </widget> 203 </item> 204 <item row="7" column="1" > 205 <widget class="QLabel" name="mLbHMv4" > 206 <property name="text" > 207 <string>H&ost IPv4 Network Mask:</string> 208 </property> 209 <property name="alignment" > 210 <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> 211 </property> 212 <property name="buddy" > 213 <cstring>mLeHMv4</cstring> 214 </property> 215 </widget> 216 </item> 217 <item row="7" column="2" colspan="3" > 218 <widget class="QILineEdit" name="mLeHMv4" > 219 <property name="sizePolicy" > 220 <sizepolicy vsizetype="Fixed" hsizetype="Preferred" > 221 <horstretch>0</horstretch> 222 <verstretch>0</verstretch> 223 </sizepolicy> 224 </property> 225 <property name="toolTip" > 226 <string>Displays the host IPv4 network mask for this interface.</string> 227 </property> 228 </widget> 229 </item> 230 <item row="8" column="1" > 231 <widget class="QLabel" name="mLbIPv6" > 232 <property name="text" > 233 <string>Ho&st IPv6 Address:</string> 234 </property> 235 <property name="alignment" > 236 <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> 237 </property> 238 <property name="buddy" > 239 <cstring>mLeIPv6</cstring> 240 </property> 241 </widget> 242 </item> 243 <item row="8" column="2" colspan="3" > 244 <widget class="QILineEdit" name="mLeIPv6" > 245 <property name="sizePolicy" > 246 <sizepolicy vsizetype="Fixed" hsizetype="Preferred" > 247 <horstretch>0</horstretch> 248 <verstretch>0</verstretch> 249 </sizepolicy> 250 </property> 251 <property name="toolTip" > 252 <string>Displays the host IPv6 address for this interface if IPv6 protocol is supported.</string> 253 </property> 254 </widget> 255 </item> 256 <item row="9" column="1" > 257 <widget class="QLabel" name="mLbHMv6" > 258 <property name="text" > 259 <string>Hos&t IPv6 Network Mask Length:</string> 260 </property> 261 <property name="alignment" > 262 <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> 263 </property> 264 <property name="buddy" > 265 <cstring>mLeHMv6</cstring> 266 </property> 267 </widget> 268 </item> 269 <item row="9" column="2" colspan="3" > 270 <widget class="QILineEdit" name="mLeHMv6" > 271 <property name="sizePolicy" > 272 <sizepolicy vsizetype="Fixed" hsizetype="Preferred" > 273 <horstretch>0</horstretch> 274 <verstretch>0</verstretch> 275 </sizepolicy> 276 </property> 277 <property name="toolTip" > 278 <string>Displays the host IPv6 network mask prefix length for this interface if IPv6 protocol is supported.</string> 279 </property> 280 </widget> 281 </item> 282 <item row="10" column="0" colspan="5" > 111 <item row="3" column="2" colspan="2" > 112 <widget class="QComboBox" name="mCbHOI" > 113 <property name="sizePolicy" > 114 <sizepolicy vsizetype="Fixed" hsizetype="Expanding" > 115 <horstretch>0</horstretch> 116 <verstretch>0</verstretch> 117 </sizepolicy> 118 </property> 119 <property name="toolTip" > 120 <string>Displays the name of the VirtualBox network interface selected for host-only networking.</string> 121 </property> 122 </widget> 123 </item> 124 <item row="4" column="0" colspan="4" > 283 125 <widget class="QILabelSeparator" name="mLsGuest" > 284 126 <property name="sizePolicy" > … … 293 135 </widget> 294 136 </item> 295 <item row=" 11" column="0" >137 <item row="5" column="0" > 296 138 <spacer> 297 139 <property name="orientation" > … … 309 151 </spacer> 310 152 </item> 311 <item row=" 11" column="1" >153 <item row="5" column="1" > 312 154 <widget class="QLabel" name="mLbMAC" > 313 155 <property name="text" > … … 322 164 </widget> 323 165 </item> 324 <item row=" 11" column="2" colspan="2" >325 <widget class="Q ILineEdit" name="mLeMAC" >326 <property name="sizePolicy" > 327 <sizepolicy vsizetype="Fixed" hsizetype=" Preferred" >166 <item row="5" column="2" > 167 <widget class="QLineEdit" name="mLeMAC" > 168 <property name="sizePolicy" > 169 <sizepolicy vsizetype="Fixed" hsizetype="Expanding" > 328 170 <horstretch>0</horstretch> 329 171 <verstretch>0</verstretch> … … 335 177 </widget> 336 178 </item> 337 <item row=" 11" column="4" >179 <item row="5" column="3" > 338 180 <widget class="QToolButton" name="mTbMAC" > 339 181 <property name="toolTip" > … … 348 190 </widget> 349 191 </item> 350 <item row=" 12" column="2" colspan="3" >192 <item row="6" column="2" colspan="2" > 351 193 <widget class="QCheckBox" name="mCbCable" > 352 194 <property name="text" > … … 358 200 </widget> 359 201 </item> 360 <item row=" 13" column="0" colspan="5" >202 <item row="7" column="0" colspan="4" > 361 203 <spacer name="verticalSpacer" > 362 204 <property name="orientation" > … … 371 213 </spacer> 372 214 </item> 373 <item row=" 14" column="0" colspan="5" >215 <item row="8" column="0" colspan="4" > 374 216 <widget class="QIDialogButtonBox" name="mButtonBox" > 375 217 <property name="standardButtons" > … … 385 227 <extends>QLabel</extends> 386 228 <header>QILabelSeparator.h</header> 387 </customwidget>388 <customwidget>389 <class>QILineEdit</class>390 <extends>QLineEdit</extends>391 <header>QILineEdit.h</header>392 229 </customwidget> 393 230 <customwidget>
注意:
瀏覽 TracChangeset
來幫助您使用更動檢視器