Changeset 33923 in vbox
- Timestamp:
- Nov 9, 2010 8:22:17 PM (14 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/settings/machine
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsStorage.cpp
r33920 r33923 902 902 else 903 903 return QModelIndex(); 904 }905 906 KChipsetType StorageModel::getChipsetType() const907 {908 #if 0909 CMachine mach = vboxGlobal().virtualBox().FindMachine(mRootItem->machineId());910 Assert(!mach.isNull());911 return mach.GetChipsetType();912 #else913 return KChipsetType_PIIX3;914 #endif915 904 } 916 905 … … 1034 1023 { 1035 1024 return static_cast <RootItem*> (mRootItem)->childCount (KStorageBus_IDE) < 1036 vboxGlobal().virtualBox().GetSystemProperties().GetMaxInstancesOfStorageBus ( getChipsetType(), KStorageBus_IDE);1025 vboxGlobal().virtualBox().GetSystemProperties().GetMaxInstancesOfStorageBus (chipsetType(), KStorageBus_IDE); 1037 1026 } 1038 1027 case R_IsMoreSATAControllersPossible: 1039 1028 { 1040 1029 return static_cast <RootItem*> (mRootItem)->childCount (KStorageBus_SATA) < 1041 vboxGlobal().virtualBox().GetSystemProperties().GetMaxInstancesOfStorageBus ( getChipsetType(), KStorageBus_SATA);1030 vboxGlobal().virtualBox().GetSystemProperties().GetMaxInstancesOfStorageBus (chipsetType(), KStorageBus_SATA); 1042 1031 } 1043 1032 case R_IsMoreSCSIControllersPossible: 1044 1033 { 1045 1034 return static_cast <RootItem*> (mRootItem)->childCount (KStorageBus_SCSI) < 1046 vboxGlobal().virtualBox().GetSystemProperties().GetMaxInstancesOfStorageBus ( getChipsetType(), KStorageBus_SCSI);1035 vboxGlobal().virtualBox().GetSystemProperties().GetMaxInstancesOfStorageBus (chipsetType(), KStorageBus_SCSI); 1047 1036 } 1048 1037 case R_IsMoreFloppyControllersPossible: 1049 1038 { 1050 1039 return static_cast <RootItem*> (mRootItem)->childCount (KStorageBus_Floppy) < 1051 vboxGlobal().virtualBox().GetSystemProperties().GetMaxInstancesOfStorageBus ( getChipsetType(), KStorageBus_Floppy);1040 vboxGlobal().virtualBox().GetSystemProperties().GetMaxInstancesOfStorageBus (chipsetType(), KStorageBus_Floppy); 1052 1041 } 1053 1042 case R_IsMoreSASControllersPossible: 1054 1043 { 1055 1044 return static_cast <RootItem*> (mRootItem)->childCount (KStorageBus_SAS) < 1056 vboxGlobal().virtualBox().GetSystemProperties().GetMaxInstancesOfStorageBus ( getChipsetType(), KStorageBus_SAS);1045 vboxGlobal().virtualBox().GetSystemProperties().GetMaxInstancesOfStorageBus (chipsetType(), KStorageBus_SAS); 1057 1046 } 1058 1047 case R_IsMoreAttachmentsPossible: … … 1522 1511 return !aIndex.isValid() ? QAbstractItemModel::flags (aIndex) : 1523 1512 Qt::ItemIsEnabled | Qt::ItemIsSelectable; 1513 } 1514 1515 KChipsetType StorageModel::chipsetType() const 1516 { 1517 CMachine machine = vboxGlobal().virtualBox().FindMachine(mRootItem->machineId()); 1518 Assert(!machine.isNull()); 1519 return machine.GetChipsetType(); 1524 1520 } 1525 1521 … … 1788 1784 connect (mCbPassthrough, SIGNAL (stateChanged (int)), this, SLOT (setInformation())); 1789 1785 1790 /* Update actions */1791 updateActionsState();1792 1793 1786 /* Applying language settings */ 1794 1787 retranslateUi(); … … 1880 1873 if (mStorageModel->rowCount(mStorageModel->root()) > 0) 1881 1874 mTwStorageTree->setCurrentIndex(mStorageModel->index(0, 0, mStorageModel->root())); 1875 1876 /* Update actions: */ 1877 updateActionsState(); 1882 1878 1883 1879 /* Revalidate if possible: */ -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsStorage.h
r33915 r33923 502 502 Qt::ItemFlags flags (const QModelIndex &aIndex) const; 503 503 504 KChipsetType chipsetType() const; 505 504 506 AbstractItem *mRootItem; 505 507 … … 511 513 512 514 ToolTipType mToolTipType; 513 514 KChipsetType getChipsetType() const;515 515 }; 516 516 Q_DECLARE_METATYPE (StorageModel::ToolTipType);
Note:
See TracChangeset
for help on using the changeset viewer.