Changeset 10670 in vbox for trunk/src/VBox/Frontends/VirtualBox4
- Timestamp:
- Jul 15, 2008 3:21:03 PM (16 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox4
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox4/include/VBoxGlobal.h
r10439 r10670 209 209 210 210 QStringList vmGuestOSTypeDescriptions() const; 211 QList<QPixmap> vmGuestOSTypeIcons (int aHorizonalMargin, int aVerticalMargin) const; 211 212 CGuestOSType vmGuestOSType (int aIndex) const; 212 213 int vmGuestOSTypeIndex (const QString &aId) const; -
trunk/src/VBox/Frontends/VirtualBox4/src/VBoxGlobal.cpp
r10515 r10670 46 46 #include <QProcess> 47 47 #include <QThread> 48 #include <QPainter> 48 49 49 50 #ifdef Q_WS_X11 … … 857 858 for (int i = 0; i < vm_os_types.count(); i++) { 858 859 list += vm_os_types [i].GetDescription(); 860 } 861 } 862 return list; 863 } 864 865 QList<QPixmap> VBoxGlobal::vmGuestOSTypeIcons (int aHorizonalMargin, int aVerticalMargin) const 866 { 867 static QList<QPixmap> list; 868 if (list.empty()) 869 { 870 for (int i = 0; i < vm_os_types.count(); i++) 871 { 872 QPixmap image(32 + 2*aHorizonalMargin, 32 + 2*aVerticalMargin); 873 image.fill (Qt::transparent); 874 QPainter p(&image); 875 p.drawPixmap (aHorizonalMargin, aVerticalMargin, *vm_os_type_icons.value (vm_os_types [i].GetId())); 876 p.end(); 877 list << image; 859 878 } 860 879 } -
trunk/src/VBox/Frontends/VirtualBox4/src/VBoxVMSettingsGeneral.cpp
r10649 r10670 101 101 102 102 /* Setup initial values */ 103 104 103 mCbOsType->insertItems (0, vboxGlobal().vmGuestOSTypeDescriptions()); 104 QList<QPixmap> list = vboxGlobal().vmGuestOSTypeIcons (0, 2); 105 for (int i=0; i < list.count(); ++i) 106 mCbOsType->setItemIcon (i, list.at (i)); 105 107 106 108 mSlRam->setPageStep (calcPageStep (MaxRAM));
Note:
See TracChangeset
for help on using the changeset viewer.