Changeset 10332 in vbox for trunk/src/VBox/Frontends/VirtualBox4
- Timestamp:
- Jul 7, 2008 2:33:02 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox4/src/VBoxSettingsDialogSpecific.cpp
r10212 r10332 209 209 VBoxSettingsPage *page = 0; 210 210 211 page = attachPage ( (VBoxSettingsPage*)new VBoxVMSettingsGeneral());211 page = attachPage (new VBoxVMSettingsGeneral()); 212 212 connect (page, SIGNAL (tableChanged()), this, SLOT (resetFirstRunFlag())); 213 213 214 page = attachPage ( (VBoxSettingsPage*)new VBoxVMSettingsHD());214 page = attachPage (new VBoxVMSettingsHD()); 215 215 connect (page, SIGNAL (hdChanged()), this, SLOT (resetFirstRunFlag())); 216 216 217 page = attachPage ( (VBoxSettingsPage*)new VBoxVMSettingsCD());217 page = attachPage (new VBoxVMSettingsCD()); 218 218 connect (page, SIGNAL (cdChanged()), this, SLOT (resetFirstRunFlag())); 219 219 220 page = attachPage ( (VBoxSettingsPage*)new VBoxVMSettingsFD());220 page = attachPage (new VBoxVMSettingsFD()); 221 221 connect (page, SIGNAL (fdChanged()), this, SLOT (resetFirstRunFlag())); 222 222 223 attachPage ( (VBoxSettingsPage*)new VBoxVMSettingsAudio());224 225 attachPage ( (VBoxSettingsPage*)new VBoxVMSettingsNetworkPage());226 227 attachPage ( (VBoxSettingsPage*)new VBoxVMSettingsSerialPage());228 229 attachPage ( (VBoxSettingsPage*)new VBoxVMSettingsParallelPage());230 231 attachPage ( (VBoxSettingsPage*)new VBoxVMSettingsUSB (VBoxVMSettingsUSB::MachineType));232 233 attachPage ( (VBoxSettingsPage*)new VBoxVMSettingsSF (MachineType));234 235 attachPage ( (VBoxSettingsPage*)new VBoxVMSettingsVRDP());223 attachPage (new VBoxVMSettingsAudio()); 224 225 attachPage (new VBoxVMSettingsNetworkPage()); 226 227 attachPage (new VBoxVMSettingsSerialPage()); 228 229 attachPage (new VBoxVMSettingsParallelPage()); 230 231 attachPage (new VBoxVMSettingsUSB (VBoxVMSettingsUSB::MachineType)); 232 233 attachPage (new VBoxVMSettingsSF (MachineType)); 234 235 attachPage (new VBoxVMSettingsVRDP()); 236 236 237 237 /* Setup Settings Dialog */ … … 239 239 { 240 240 /* Search for a list view item corresponding to the category */ 241 QTreeWidgetItem *item = findItem (mTwSelector, aCategory, treeWidget_Link); 242 if (item) 241 if (QTreeWidgetItem *item = findItem (mTwSelector, aCategory, treeWidget_Link)) 243 242 { 244 243 mTwSelector->setCurrentItem (item); 245 246 244 /* Search for a widget with the given name */ 247 245 if (!aControl.isNull()) 248 246 { 249 QObject *obj = mStack->currentWidget()->findChild<QWidget*> (aControl); 250 if (obj && obj->isWidgetType()) 247 if (QWidget *w = mStack->currentWidget()->findChild<QWidget*> (aControl)) 251 248 { 252 QWidget *w = static_cast<QWidget*> (obj);253 249 QList<QWidget*> parents; 254 250 QWidget *p = w; 255 251 while ((p = p->parentWidget()) != NULL) 256 252 { 257 if ( p->inherits ("QTabWidget"))253 if (QTabWidget *tb = qobject_cast<QTabWidget*> (p)) 258 254 { 259 255 /* The tab contents widget is two steps down … … 263 259 c = parents [parents.count() - 2]; 264 260 if (c) 265 static_cast<QTabWidget*> (p)->setCurrentWidget (c);261 tb->setCurrentWidget (c); 266 262 } 267 263 parents.append (p);
Note:
See TracChangeset
for help on using the changeset viewer.