Changeset 16736 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Feb 13, 2009 1:41:04 PM (16 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox
- Files:
-
- 2 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/include/VBoxImportAppliance.h
r16617 r16736 27 27 #include "QIWithRetranslateUI.h" 28 28 #include "QIDialog.h" 29 30 #include <QSortFilterProxyModel>31 29 32 30 class CAppliance; -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxImportAppliance.cpp
r16728 r16736 25 25 #include "VBoxProblemReporter.h" 26 26 #include "VBoxFilePathSelectorWidget.h" 27 #include "VBoxOSTypeSelectorButton.h" 27 28 28 29 #include <QItemDelegate> 30 #include <QSortFilterProxyModel> 29 31 #include <QHeaderView> 30 32 #include <QLineEdit> 31 33 #include <QSpinBox> 32 34 #include <QComboBox> 33 #include <QPushButton>34 35 35 36 class ModelItem; … … 388 389 case KVirtualSystemDescriptionType_OS: 389 390 { 390 QComboBox *e = new QComboBox (aParent); 391 /* Create a list of all possible OS types */ 392 QList <CGuestOSType> families = vboxGlobal().vmGuestOSFamilyList(); 393 QList <CGuestOSType> types; 394 foreach (const CGuestOSType& family, families) 395 types << vboxGlobal().vmGuestOSTypeList (family.GetFamilyId()); 396 /* Fill the combobox */ 397 foreach (const CGuestOSType& type, types) 398 e->addItem (vboxGlobal().vmGuestOSTypeIcon (type.GetId()), type.GetDescription(), type.GetId()); 391 VBoxOSTypeSelectorButton *e = new VBoxOSTypeSelectorButton (aParent); 392 /* Fill the background with the highlight color in the case 393 * the button hasn't a rectangle shape. This prevents the 394 * display of parts from the current text on the Mac. */ 395 e->setAutoFillBackground (true); 396 e->setBackgroundRole (QPalette::Highlight); 399 397 editor = e; 400 398 break; … … 472 470 { 473 471 case KVirtualSystemDescriptionType_OS: 472 { 473 if (VBoxOSTypeSelectorButton *e = qobject_cast<VBoxOSTypeSelectorButton*> (aEditor)) 474 { 475 e->setOSTypeId (mConfigValue); 476 fDone = true; 477 } 478 break; 479 } 474 480 case KVirtualSystemDescriptionType_HardDiskControllerIDE: 475 481 { … … 539 545 { 540 546 case KVirtualSystemDescriptionType_OS: 547 { 548 if (VBoxOSTypeSelectorButton *e = qobject_cast<VBoxOSTypeSelectorButton*> (aEditor)) 549 { 550 mConfigValue = e->osTypeId(); 551 fDone = true; 552 } 553 break; 554 } 541 555 case KVirtualSystemDescriptionType_HardDiskControllerIDE: 542 556 { … … 687 701 { 688 702 QSize size = QItemDelegate::sizeHint (aOption, aIndex); 689 size.setHeight (RT_MAX (24, size.height())); 703 #ifdef Q_WS_MAC 704 int h = 28; 705 #else /* Q_WS_MAC */ 706 int h = 24; 707 #endif /* Q_WS_MAC */ 708 size.setHeight (RT_MAX (h, size.height())); 690 709 return size; 691 710 }
Note:
See TracChangeset
for help on using the changeset viewer.