Changeset 104515 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- May 3, 2024 6:15:42 PM (12 months ago)
- svn:sync-xref-src-repo-rev:
- 163039
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppPageExpert.cpp
r103957 r104515 34 34 #include <QLabel> 35 35 #include <QLineEdit> 36 #include <QListWidget>37 36 #include <QPushButton> 38 37 #include <QRadioButton> … … 43 42 /* GUI includes: */ 44 43 #include "QIComboBox.h" 44 #include "QIListWidget.h" 45 45 #include "QIToolButton.h" 46 46 #include "UICommon.h" … … 108 108 { 109 109 /* Create VM selector: */ 110 m_pVMSelector = new Q ListWidget(m_pToolBox);110 m_pVMSelector = new QIListWidget(m_pToolBox); 111 111 if (m_pVMSelector) 112 112 { … … 407 407 connect(gVBoxEvents, &UIVirtualBoxEventHandler::sigCloudProfileChanged, 408 408 this, &UIWizardExportAppPageExpert::sltHandleFormatComboChange); 409 connect(m_pVMSelector, &Q ListWidget::itemSelectionChanged,409 connect(m_pVMSelector, &QIListWidget::itemSelectionChanged, 410 410 this, &UIWizardExportAppPageExpert::sltHandleVMItemSelectionChanged); 411 411 connect(m_pFileSelector, &UIEmptyFilePathSelector::pathChanged, … … 443 443 m_pToolBox->setPageTitle(1, UIWizardExportApp::tr("Format &settings")); 444 444 m_pToolBox->setPageTitle(2, UIWizardExportApp::tr("&Appliance settings")); 445 446 /* Translate Machine list: */ 447 m_pVMSelector->setWhatsThis(UIWizardExportApp::tr("Contains a list of Virtual Machines")); 445 448 446 449 /* Translate File selector: */ -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppPageExpert.h
r103982 r104515 50 50 class QGroupBox; 51 51 class QLabel; 52 class Q ListWidget;52 class QIListWidget; 53 53 class QStackedWidget; 54 54 class QIComboBox; … … 146 146 147 147 /** Holds the VM selector instance. */ 148 Q ListWidget *m_pVMSelector;148 QIListWidget *m_pVMSelector; 149 149 150 150 -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppPageVMs.cpp
r104358 r104515 28 28 /* Qt includes: */ 29 29 #include <QApplication> 30 #include <QListWidget>31 30 #include <QVBoxLayout> 32 31 33 32 /* GUI includes: */ 33 #include "QIListWidget.h" 34 34 #include "QIRichTextLabel.h" 35 35 #include "UICommon.h" … … 47 47 48 48 49 /** Q ListWidgetItem subclass for Export Appliance wizard VM list. */50 class UIVMListWidgetItem : public Q ListWidgetItem49 /** QIListWidgetItem subclass for Export Appliance wizard VM list. */ 50 class UIVMListWidgetItem : public QIListWidgetItem 51 51 { 52 52 public: … … 55 55 * @param strUuid Brings the machine ID. 56 56 * @param fInSaveState Brings whether machine is in Saved state. */ 57 UIVMListWidgetItem(QPixmap &pixIcon, QString &strText, QUuid uUuid, bool fInSaveState, Q ListWidget *pParent)58 : Q ListWidgetItem(pixIcon, strText, pParent)57 UIVMListWidgetItem(QPixmap &pixIcon, QString &strText, QUuid uUuid, bool fInSaveState, QIListWidget *pParent) 58 : QIListWidgetItem(pixIcon, strText, pParent) 59 59 , m_uUuid(uUuid) 60 60 , m_fInSaveState(fInSaveState) … … 62 62 63 63 /** Returns whether this item is less than @a other. */ 64 bool operator<(const Q ListWidgetItem &other) const RT_OVERRIDE RT_FINAL64 bool operator<(const QIListWidgetItem &other) const 65 65 { 66 66 return text().toLower() < other.text().toLower(); … … 85 85 *********************************************************************************************************************************/ 86 86 87 void UIWizardExportAppVMs::populateVMItems(Q ListWidget *pVMSelector, const QStringList &selectedVMNames)87 void UIWizardExportAppVMs::populateVMItems(QIListWidget *pVMSelector, const QStringList &selectedVMNames) 88 88 { 89 89 /* Add all VM items into VM selector: */ … … 112 112 pixIcon = QPixmap(":/os_other.png").scaled(iIconMetric, iIconMetric, Qt::IgnoreAspectRatio, Qt::SmoothTransformation); 113 113 } 114 Q ListWidgetItem *pItem = new UIVMListWidgetItem(pixIcon, strName, uUuid, fInSaveState, pVMSelector);114 QIListWidgetItem *pItem = new UIVMListWidgetItem(pixIcon, strName, uUuid, fInSaveState, pVMSelector); 115 115 if (!fEnabled) 116 116 pItem->setFlags(Qt::ItemFlags()); … … 122 122 foreach (const QString &strSelectedVMName, selectedVMNames) 123 123 { 124 const QList<Q ListWidgetItem*> list = pVMSelector->findItems(strSelectedVMName, Qt::MatchExactly);124 const QList<QIListWidgetItem*> list = pVMSelector->findItems(strSelectedVMName, Qt::MatchExactly); 125 125 if (list.size() > 0) 126 126 { … … 133 133 } 134 134 135 void UIWizardExportAppVMs::refreshSavedMachines(QStringList &savedMachines, Q ListWidget *pVMSelector)135 void UIWizardExportAppVMs::refreshSavedMachines(QStringList &savedMachines, QIListWidget *pVMSelector) 136 136 { 137 137 savedMachines.clear(); 138 foreach (Q ListWidgetItem *pItem, pVMSelector->selectedItems())138 foreach (QIListWidgetItem *pItem, pVMSelector->selectedItems()) 139 139 if (static_cast<UIVMListWidgetItem*>(pItem)->isInSaveState()) 140 140 savedMachines << pItem->text(); 141 141 } 142 142 143 QStringList UIWizardExportAppVMs::machineNames(Q ListWidget *pVMSelector)143 QStringList UIWizardExportAppVMs::machineNames(QIListWidget *pVMSelector) 144 144 { 145 145 /* Prepare list: */ 146 146 QStringList names; 147 147 /* Iterate over all the selected items: */ 148 foreach (Q ListWidgetItem *pItem, pVMSelector->selectedItems())148 foreach (QIListWidgetItem *pItem, pVMSelector->selectedItems()) 149 149 names << pItem->text(); 150 150 /* Return result list: */ … … 152 152 } 153 153 154 QList<QUuid> UIWizardExportAppVMs::machineIDs(Q ListWidget *pVMSelector)154 QList<QUuid> UIWizardExportAppVMs::machineIDs(QIListWidget *pVMSelector) 155 155 { 156 156 /* Prepare list: */ 157 157 QList<QUuid> ids; 158 158 /* Iterate over all the selected items: */ 159 foreach (Q ListWidgetItem *pItem, pVMSelector->selectedItems())159 foreach (QIListWidgetItem *pItem, pVMSelector->selectedItems()) 160 160 ids.append(static_cast<UIVMListWidgetItem*>(pItem)->uuid()); 161 161 /* Return result list: */ … … 184 184 185 185 /* Prepare VM selector: */ 186 m_pVMSelector = new Q ListWidget(this);186 m_pVMSelector = new QIListWidget(this); 187 187 if (m_pVMSelector) 188 188 { … … 194 194 195 195 /* Setup connections: */ 196 connect(m_pVMSelector, &Q ListWidget::itemSelectionChanged,196 connect(m_pVMSelector, &QIListWidget::itemSelectionChanged, 197 197 this, &UIWizardExportAppPageVMs::sltHandleVMItemSelectionChanged); 198 198 } … … 212 212 "You can select more than one. Please note that these machines have to be " 213 213 "turned off before they can be exported.</p>")); 214 215 /* Translate Machine list: */ 216 m_pVMSelector->setWhatsThis(UIWizardExportApp::tr("Contains a list of Virtual Machines")); 214 217 } 215 218 -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppPageVMs.h
r103982 r104515 39 39 40 40 /* Forward declarations: */ 41 class Q ListWidget;41 class QIListWidget; 42 42 class QIRichTextLabel; 43 43 class UIWizardExportApp; … … 47 47 { 48 48 /** Populates @a pVMSelector with items on the basis of passed @a selectedVMNames. */ 49 void populateVMItems(Q ListWidget *pVMSelector, const QStringList &selectedVMNames);49 void populateVMItems(QIListWidget *pVMSelector, const QStringList &selectedVMNames); 50 50 51 51 /** Refresh a list of saved machines selected in @a pVMSelector. */ 52 void refreshSavedMachines(QStringList &savedMachines, Q ListWidget *pVMSelector);52 void refreshSavedMachines(QStringList &savedMachines, QIListWidget *pVMSelector); 53 53 54 54 /** Returns a list of machine names selected in @a pVMSelector. */ 55 QStringList machineNames(Q ListWidget *pVMSelector);55 QStringList machineNames(QIListWidget *pVMSelector); 56 56 /** Returns a list of machine IDs selected in @a pVMSelector. */ 57 QList<QUuid> machineIDs(Q ListWidget *pVMSelector);57 QList<QUuid> machineIDs(QIListWidget *pVMSelector); 58 58 } 59 59 … … 103 103 104 104 /** Holds the VM selector instance. */ 105 Q ListWidget *m_pVMSelector;105 QIListWidget *m_pVMSelector; 106 106 }; 107 107
Note:
See TracChangeset
for help on using the changeset viewer.