コード例 #1
0
void VBoxOSTypeSelectorButton::setOSTypeId (const QString& aOSTypeId)
{
    mOSTypeId = aOSTypeId;
    CGuestOSType type = vboxGlobal().vmGuestOSType (aOSTypeId);
    /* Looks ugly on the Mac */
#ifndef Q_WS_MAC
    setIcon (vboxGlobal().vmGuestOSTypeIcon (type.GetId()));
#endif /* Q_WS_MAC */
    setText (type.GetDescription());
}
void UIGuestOSTypeSelectionButton::setOSTypeId(const QString &strOSTypeId)
{
    m_strOSTypeId = strOSTypeId;
    CGuestOSType enmType = vboxGlobal().vmGuestOSType(strOSTypeId);

#ifndef VBOX_WS_MAC
    /* Looks ugly on the Mac: */
    setIcon(vboxGlobal().vmGuestOSTypePixmapDefault(enmType.GetId()));
#endif

    setText(enmType.GetDescription());
}