VirtualBox

Changeset 52012 in vbox for trunk


Ignore:
Timestamp:
Jul 14, 2014 11:07:33 AM (10 years ago)
Author:
vboxsync
Message:

FE/Qt: UIConverter extension: Convert status-bar indicator-types to corresponding icons.

Location:
trunk/src/VBox/Frontends/VirtualBox/src/converter
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/converter/UIConverterBackend.h

    r51988 r52012  
    160160template<> QString toInternalString(const IndicatorType &indicatorType);
    161161template<> IndicatorType fromInternalString<IndicatorType>(const QString &strIndicatorType);
     162template<> QIcon toIcon(const IndicatorType &indicatorType);
    162163template<> QString toInternalString(const MachineCloseAction &machineCloseAction);
    163164template<> MachineCloseAction fromInternalString<MachineCloseAction>(const QString &strMachineCloseAction);
  • trunk/src/VBox/Frontends/VirtualBox/src/converter/UIConverterBackendGlobal.cpp

    r51654 r52012  
    11361136}
    11371137
     1138/* QIcon <= IndicatorType: */
     1139template<> QIcon toIcon(const IndicatorType &indicatorType)
     1140{
     1141    switch (indicatorType)
     1142    {
     1143        case IndicatorType_HardDisks:     return UIIconPool::iconSet(":/hd_16px.png");
     1144        case IndicatorType_OpticalDisks:  return UIIconPool::iconSet(":/cd_16px.png");
     1145        case IndicatorType_FloppyDisks:   return UIIconPool::iconSet(":/fd_16px.png");
     1146        case IndicatorType_Network:       return UIIconPool::iconSet(":/nw_16px.png");
     1147        case IndicatorType_USB:           return UIIconPool::iconSet(":/usb_16px.png");
     1148        case IndicatorType_SharedFolders: return UIIconPool::iconSet(":/sf_16px.png");
     1149        case IndicatorType_VideoCapture:  return UIIconPool::iconSet(":/video_capture_16px.png");
     1150        case IndicatorType_Features:      return UIIconPool::iconSet(":/vtx_amdv_16px.png");
     1151        case IndicatorType_Mouse:         return UIIconPool::iconSet(":/mouse_16px.png");
     1152        case IndicatorType_Keyboard:      return UIIconPool::iconSet(":/hostkey_16px.png");
     1153        default:
     1154        {
     1155            AssertMsgFailed(("No icon for indicator type=%d", indicatorType));
     1156            break;
     1157        }
     1158    }
     1159    return QIcon();
     1160}
     1161
    11381162/* QString <= MachineCloseAction: */
    11391163template<> QString toInternalString(const MachineCloseAction &machineCloseAction)
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