Changeset 17217 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Feb 27, 2009 5:13:14 PM (16 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/include/VBoxVMSettingsNetwork.h
r16927 r17217 71 71 void naTypeChanged (const QString &aString); 72 72 void genMACClicked(); 73 #if defined (Q_WS_X11) && !defined (VBOX_WITH_NETFLT)74 void tapSetupClicked();75 void tapTerminateClicked();76 #endif77 73 78 74 private: -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxVMSettingsNetwork.cpp
r17115 r17217 66 66 #if !defined (Q_WS_X11) || defined (VBOX_WITH_NETFLT) 67 67 setTapVisible (false); 68 #else69 /* Setup iconsets */70 mTbSetup_x11->setIcon (VBoxGlobal::iconSet (":/select_file_16px.png",71 ":/select_file_dis_16px.png"));72 mTbTerminate_x11->setIcon (VBoxGlobal::iconSet (":/select_file_16px.png",73 ":/select_file_dis_16px.png"));74 68 #endif 75 69 … … 116 110 #if defined (Q_WS_X11) && !defined (VBOX_WITH_NETFLT) 117 111 mLeInterface_x11->setText (aAdapter.GetHostInterface()); 118 mLeSetup_x11->setText (aAdapter.GetTAPSetupApplication());119 mLeTerminate_x11->setText (aAdapter.GetTAPTerminateApplication());120 112 #endif 121 113 } … … 168 160 QString iface = mLeInterface_x11->text(); 169 161 mAdapter.SetHostInterface (iface.isEmpty() ? QString::null : iface); 170 QString setup = mLeSetup_x11->text();171 mAdapter.SetTAPSetupApplication (setup.isEmpty() ? QString::null : setup);172 QString term = mLeTerminate_x11->text();173 mAdapter.SetTAPTerminateApplication (term.isEmpty() ? QString::null : term);174 162 #endif 175 163 } … … 200 188 mValidator, SLOT (revalidate())); 201 189 connect (mPbMAC, SIGNAL (clicked()), this, SLOT (genMACClicked())); 202 #if defined (Q_WS_X11) && !defined (VBOX_WITH_NETFLT)203 connect (mTbSetup_x11, SIGNAL (clicked()), this, SLOT (tapSetupClicked()));204 connect (mTbTerminate_x11, SIGNAL (clicked()), this, SLOT (tapTerminateClicked()));205 #endif206 190 207 191 mValidator->revalidate(); … … 218 202 setTabOrder (mPbMAC, mCbCable); 219 203 setTabOrder (mCbCable, mLeInterface_x11); 220 setTabOrder (mLeInterface_x11, mLeSetup_x11); 221 setTabOrder (mLeSetup_x11, mTbSetup_x11); 222 setTabOrder (mTbSetup_x11, mLeTerminate_x11); 223 setTabOrder (mLeTerminate_x11, mTbTerminate_x11); 224 return mTbTerminate_x11; 204 return mLeInterface_x11; 225 205 } 226 206 … … 289 269 mLeMAC->setText (mAdapter.GetMACAddress()); 290 270 } 291 292 #if defined (Q_WS_X11) && !defined (VBOX_WITH_NETFLT)293 void VBoxVMSettingsNetwork::tapSetupClicked()294 {295 QString selected = QFileDialog::getOpenFileName (296 this, tr ("Select TAP setup application"), "/");297 298 if (!selected.isEmpty())299 mLeSetup_x11->setText (selected);300 }301 302 void VBoxVMSettingsNetwork::tapTerminateClicked()303 {304 QString selected = QFileDialog::getOpenFileName (305 this, tr ("Select TAP terminate application"), "/");306 307 if (!selected.isEmpty())308 mLeTerminate_x11->setText (selected);309 }310 #endif311 271 312 272 void VBoxVMSettingsNetwork::prepareComboboxes() … … 374 334 mLbInterface_x11->setEnabled (aEnabled); 375 335 mLeInterface_x11->setEnabled (aEnabled); 376 mLbSetup_x11->setEnabled (aEnabled);377 mLeSetup_x11->setEnabled (aEnabled);378 mTbSetup_x11->setEnabled (aEnabled);379 mLbTerminate_x11->setEnabled (aEnabled);380 mLeTerminate_x11->setEnabled (aEnabled);381 mTbTerminate_x11->setEnabled (aEnabled);382 336 } 383 337 … … 387 341 mLbInterface_x11->setVisible (aVisible); 388 342 mLeInterface_x11->setVisible (aVisible); 389 mLbSetup_x11->setVisible (aVisible);390 mLeSetup_x11->setVisible (aVisible);391 mTbSetup_x11->setVisible (aVisible);392 mLbTerminate_x11->setVisible (aVisible);393 mLeTerminate_x11->setVisible (aVisible);394 mTbTerminate_x11->setVisible (aVisible);395 343 #ifdef Q_WS_MAC 396 344 /* Make sure the layout is recalculated (Important on the mac). */ -
trunk/src/VBox/Frontends/VirtualBox/ui/VBoxVMSettingsNetwork.ui
r12030 r17217 217 217 </widget> 218 218 </item> 219 <item row="7" column="0" >220 <widget class="QLabel" name="mLbSetup_x11" >221 <property name="text" >222 <string>&Setup Application:</string>223 </property>224 <property name="alignment" >225 <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>226 </property>227 <property name="buddy" >228 <cstring>mLeSetup_x11</cstring>229 </property>230 </widget>231 </item>232 <item row="7" column="1" >233 <widget class="QLineEdit" name="mLeSetup_x11" >234 <property name="sizePolicy" >235 <sizepolicy vsizetype="Fixed" hsizetype="Preferred" >236 <horstretch>0</horstretch>237 <verstretch>0</verstretch>238 </sizepolicy>239 </property>240 <property name="whatsThis" >241 <string>Displays the command executed to set up the TAP interface.</string>242 </property>243 </widget>244 </item>245 <item row="7" column="2" >246 <widget class="QToolButton" name="mTbSetup_x11" >247 <property name="whatsThis" >248 <string>Selects the setup application.</string>249 </property>250 <property name="autoRaise" >251 <bool>true</bool>252 </property>253 </widget>254 </item>255 <item row="8" column="0" >256 <widget class="QLabel" name="mLbTerminate_x11" >257 <property name="text" >258 <string>&Terminate Application:</string>259 </property>260 <property name="alignment" >261 <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>262 </property>263 <property name="buddy" >264 <cstring>mLeTerminate_x11</cstring>265 </property>266 </widget>267 </item>268 <item row="8" column="1" >269 <widget class="QLineEdit" name="mLeTerminate_x11" >270 <property name="sizePolicy" >271 <sizepolicy vsizetype="Fixed" hsizetype="Preferred" >272 <horstretch>0</horstretch>273 <verstretch>0</verstretch>274 </sizepolicy>275 </property>276 <property name="whatsThis" >277 <string>Displays the command executed to terminate the TAP interface.</string>278 </property>279 </widget>280 </item>281 <item row="8" column="2" >282 <widget class="QToolButton" name="mTbTerminate_x11" >283 <property name="whatsThis" >284 <string>Selects the terminate application.</string>285 </property>286 <property name="autoRaise" >287 <bool>true</bool>288 </property>289 </widget>290 </item>291 219 </layout> 292 220 </widget>
Note:
See TracChangeset
for help on using the changeset viewer.