Changeset 17884 in vbox for trunk/src/VBox/Frontends/VirtualBox/include
- Timestamp:
- Mar 15, 2009 12:55:09 PM (16 years ago)
- svn:sync-xref-src-repo-rev:
- 44443
- Location:
- trunk/src/VBox/Frontends/VirtualBox/include
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/include/VBoxGlobal.h
r17724 r17884 348 348 } 349 349 350 KStorageBus toStorageBusType (KStorageControllerType aControllerType) const 351 { 352 KStorageBus sb = KStorageBus_Null; 353 switch (aControllerType) 354 { 355 case KStorageControllerType_Null: sb = KStorageBus_Null; break; 356 case KStorageControllerType_PIIX3: 357 case KStorageControllerType_PIIX4: 358 case KStorageControllerType_ICH6: sb = KStorageBus_IDE; break; 359 case KStorageControllerType_IntelAhci: sb = KStorageBus_SATA; break; 360 case KStorageControllerType_LsiLogic: 361 case KStorageControllerType_BusLogic: sb = KStorageBus_SCSI; break; 362 default: 363 AssertMsgFailed (("toStorageBusType: %d not handled\n", aControllerType)); break; 364 } 365 return sb; 366 } 367 350 368 QString toString (KStorageBus aBus, LONG aChannel) const; 351 369 LONG toStorageChannel (KStorageBus aBus, const QString &aChannel) const; -
trunk/src/VBox/Frontends/VirtualBox/include/VBoxProblemReporter.h
r17867 r17884 232 232 const CProgress &aProgress); 233 233 234 int confirmDetachSATASlots (QWidget *aParent); 234 int confirmDetachAddControllerSlots (QWidget *aParent) const; 235 int confirmChangeAddControllerSlots (QWidget *aParent) const; 235 236 int confirmRunNewHDWzdOrVDM (QWidget* aParent); 236 237 -
trunk/src/VBox/Frontends/VirtualBox/include/VBoxVMSettingsHD.h
r17766 r17884 169 169 QList<Attachment> fullUsedList(); 170 170 171 void remove Sata();171 void removeAddController(); 172 172 void updateDisks(); 173 173 … … 280 280 void setMachine (const CMachine &aMachine) { mMachine = aMachine; } 281 281 282 int sataCount() const { return mSataCount; } 283 void setSataCount (int aSataCount) 284 { 285 if (mSataCount != aSataCount) 282 int addCount() const { return mAddCount; } 283 void setAddCount (int aAddCount, KStorageBus aAddBus) 284 { 285 if (mAddCount != aAddCount || 286 aAddBus != mAddBus) 286 287 { 287 mSataCount = aSataCount; 288 makeSATAList(); 288 mAddCount = aAddCount; 289 mAddBus = aAddBus; 290 makeAddControllerList(); 289 291 } 290 292 } … … 313 315 314 316 void makeIDEList(); 315 void make SATAList();317 void makeAddControllerList(); 316 318 void makeMediumList(); 319 317 320 318 321 static HDSettings *mInstance; … … 322 325 323 326 QList<SlotValue> mIDEList; 324 QList<SlotValue> m SATAList;327 QList<SlotValue> mAddControllerList; 325 328 QList<DiskValue> mDisksList; 326 329 327 int mSataCount; 330 int mAddCount; 331 KStorageBus mAddBus; 328 332 bool mShowDiffs; 329 333 }; … … 364 368 void showMediaManager(); 365 369 366 void onSATACheckToggled (int); 370 void onAddControllerCheckToggled (int); 371 void onAddControllerTypeChanged (int aIndex); 372 bool checkAddControllers (int aWhat); 367 373 void onShowDiffsCheckToggled (int); 368 374 … … 379 385 QUuid getWithNewHDWizard(); 380 386 int maxNameLength() const; 387 void prepareComboboxes(); 381 388 void removeFocus(); 389 KStorageControllerType currentControllerType() const 390 { 391 return static_cast<KStorageControllerType> (mCbControllerType->itemData (mCbControllerType->currentIndex()).toInt()); 392 } 393 KStorageBus currentBusType() const 394 { 395 return vboxGlobal().toStorageBusType (currentControllerType()); 396 } 397 int currentMaxPortCount() const 398 { 399 int c = 0; 400 switch (currentBusType()) 401 { 402 case KStorageBus_IDE: c = 2; break; 403 case KStorageBus_SATA: c = 30; break; 404 case KStorageBus_SCSI: c = 16; break; 405 default: break; 406 } 407 return c; 408 } 382 409 383 410 /* variables */ … … 392 419 bool mWasTableSelected; 393 420 bool mPolished; 421 422 int mLastSelAddControllerIndex; 394 423 }; 395 424
Note:
See TracChangeset
for help on using the changeset viewer.