VirtualBox

Changeset 33923 in vbox


Ignore:
Timestamp:
Nov 9, 2010 8:22:17 PM (14 years ago)
Author:
vboxsync
Message:

FE/Qt: Some rework for r67571 (GUI part).

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  
    902902    else
    903903        return QModelIndex();
    904 }
    905 
    906 KChipsetType StorageModel::getChipsetType() const
    907 {
    908 #if 0
    909     CMachine mach = vboxGlobal().virtualBox().FindMachine(mRootItem->machineId());
    910     Assert(!mach.isNull());
    911     return mach.GetChipsetType();
    912 #else
    913     return KChipsetType_PIIX3;
    914 #endif
    915904}
    916905
     
    10341023        {
    10351024            return static_cast <RootItem*> (mRootItem)->childCount (KStorageBus_IDE) <
    1036                     vboxGlobal().virtualBox().GetSystemProperties().GetMaxInstancesOfStorageBus (getChipsetType(), KStorageBus_IDE);
     1025                    vboxGlobal().virtualBox().GetSystemProperties().GetMaxInstancesOfStorageBus (chipsetType(), KStorageBus_IDE);
    10371026        }
    10381027        case R_IsMoreSATAControllersPossible:
    10391028        {
    10401029            return static_cast <RootItem*> (mRootItem)->childCount (KStorageBus_SATA) <
    1041                    vboxGlobal().virtualBox().GetSystemProperties().GetMaxInstancesOfStorageBus (getChipsetType(), KStorageBus_SATA);
     1030                   vboxGlobal().virtualBox().GetSystemProperties().GetMaxInstancesOfStorageBus (chipsetType(), KStorageBus_SATA);
    10421031        }
    10431032        case R_IsMoreSCSIControllersPossible:
    10441033        {
    10451034            return static_cast <RootItem*> (mRootItem)->childCount (KStorageBus_SCSI) <
    1046                    vboxGlobal().virtualBox().GetSystemProperties().GetMaxInstancesOfStorageBus (getChipsetType(), KStorageBus_SCSI);
     1035                   vboxGlobal().virtualBox().GetSystemProperties().GetMaxInstancesOfStorageBus (chipsetType(), KStorageBus_SCSI);
    10471036        }
    10481037        case R_IsMoreFloppyControllersPossible:
    10491038        {
    10501039            return static_cast <RootItem*> (mRootItem)->childCount (KStorageBus_Floppy) <
    1051                    vboxGlobal().virtualBox().GetSystemProperties().GetMaxInstancesOfStorageBus (getChipsetType(), KStorageBus_Floppy);
     1040                   vboxGlobal().virtualBox().GetSystemProperties().GetMaxInstancesOfStorageBus (chipsetType(), KStorageBus_Floppy);
    10521041        }
    10531042        case R_IsMoreSASControllersPossible:
    10541043        {
    10551044            return static_cast <RootItem*> (mRootItem)->childCount (KStorageBus_SAS) <
    1056                    vboxGlobal().virtualBox().GetSystemProperties().GetMaxInstancesOfStorageBus (getChipsetType(), KStorageBus_SAS);
     1045                   vboxGlobal().virtualBox().GetSystemProperties().GetMaxInstancesOfStorageBus (chipsetType(), KStorageBus_SAS);
    10571046        }
    10581047        case R_IsMoreAttachmentsPossible:
     
    15221511    return !aIndex.isValid() ? QAbstractItemModel::flags (aIndex) :
    15231512           Qt::ItemIsEnabled | Qt::ItemIsSelectable;
     1513}
     1514
     1515KChipsetType StorageModel::chipsetType() const
     1516{
     1517    CMachine machine = vboxGlobal().virtualBox().FindMachine(mRootItem->machineId());
     1518    Assert(!machine.isNull());
     1519    return machine.GetChipsetType();
    15241520}
    15251521
     
    17881784    connect (mCbPassthrough, SIGNAL (stateChanged (int)), this, SLOT (setInformation()));
    17891785
    1790     /* Update actions */
    1791     updateActionsState();
    1792 
    17931786    /* Applying language settings */
    17941787    retranslateUi();
     
    18801873    if (mStorageModel->rowCount(mStorageModel->root()) > 0)
    18811874        mTwStorageTree->setCurrentIndex(mStorageModel->index(0, 0, mStorageModel->root()));
     1875
     1876    /* Update actions: */
     1877    updateActionsState();
    18821878
    18831879    /* Revalidate if possible: */
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsStorage.h

    r33915 r33923  
    502502    Qt::ItemFlags flags (const QModelIndex &aIndex) const;
    503503
     504    KChipsetType chipsetType() const;
     505
    504506    AbstractItem *mRootItem;
    505507
     
    511513
    512514    ToolTipType mToolTipType;
    513 
    514     KChipsetType getChipsetType() const;
    515515};
    516516Q_DECLARE_METATYPE (StorageModel::ToolTipType);
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette