Changeset 72913 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Jul 5, 2018 9:30:09 AM (7 years ago)
- svn:sync-xref-src-repo-rev:
- 123460
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/medium
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/medium/UIFDCreationDialog.cpp
r72903 r72913 21 21 22 22 /* Qt includes */ 23 # include<QCheckBox> 23 24 # include<QDialogButtonBox> 24 25 # include<QDir> … … 46 47 : QIWithRetranslateUI<QDialog>(pParent) 47 48 , m_pFilePathselector(0) 48 , m_strMachineName(strMachineName)49 , m_strMachineFolder(strMachineFolder)50 49 , m_pPathLabel(0) 51 50 , m_pSizeLabel(0) 52 51 , m_pSizeCombo(0) 53 52 , m_pButtonBox(0) 53 , m_pFormatCheckBox(0) 54 , m_strMachineName(strMachineName) 55 , m_strMachineFolder(strMachineFolder) 54 56 { 55 57 … … 73 75 if (m_pButtonBox) 74 76 m_pButtonBox->button(QDialogButtonBox::Ok)->setText("Create"); 77 if (m_pFormatCheckBox) 78 m_pFormatCheckBox->setText(QApplication::translate("UIMediumManager", "Format disk as FAT12")); 75 79 if (m_pSizeCombo) 76 80 { 77 m_pSizeCombo->setItemText(FDSize_2_88M, QApplication::translate("UIMediumManager", "2.88M"));81 //m_pSizeCombo->setItemText(FDSize_2_88M, QApplication::translate("UIMediumManager", "2.88M")); 78 82 m_pSizeCombo->setItemText(FDSize_1_44M, QApplication::translate("UIMediumManager", "1.44M")); 79 83 m_pSizeCombo->setItemText(FDSize_1_2M, QApplication::translate("UIMediumManager", "1.2M")); … … 126 130 { 127 131 pMainLayout->addWidget(m_pSizeCombo, 1, 1, 1, 1); 128 m_pSizeCombo->insertItem(FDSize_2_88M, "2.88M", 2949120);132 //m_pSizeCombo->insertItem(FDSize_2_88M, "2.88M", 2949120); 129 133 m_pSizeCombo->insertItem(FDSize_1_44M, "1.44M", 1474560); 130 134 m_pSizeCombo->insertItem(FDSize_1_2M, "1.2M", 1228800); … … 135 139 } 136 140 141 m_pFormatCheckBox = new QCheckBox; 142 if (m_pFormatCheckBox) 143 { 144 pMainLayout->addWidget(m_pFormatCheckBox, 2, 1, 1, 1); 145 m_pFormatCheckBox->setCheckState(Qt::Checked); 146 } 147 137 148 m_pButtonBox = 138 149 new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel, Qt::Horizontal, this); 139 150 if (m_pButtonBox) 140 151 { 141 pMainLayout->addWidget(m_pButtonBox, 2, 0, 1, 3);152 pMainLayout->addWidget(m_pButtonBox, 3, 0, 1, 3); 142 153 connect(m_pButtonBox, &QDialogButtonBox::accepted, this, &UIFDCreationDialog::accept); 143 154 connect(m_pButtonBox, &QDialogButtonBox::rejected, this, &UIFDCreationDialog::reject); … … 177 188 return; 178 189 } 190 179 191 QVector<KMediumVariant> variants(1, KMediumVariant_Fixed); 192 /* Decide if formatting the disk is required: */ 193 if (m_pFormatCheckBox && m_pFormatCheckBox->checkState() == Qt::Checked) 194 variants.push_back(KMediumVariant_Formatted); 180 195 CProgress progress = newMedium.CreateBaseStorage(m_pSizeCombo->currentData().toLongLong(), variants); 181 196 -
trunk/src/VBox/Frontends/VirtualBox/src/medium/UIFDCreationDialog.h
r72903 r72913 27 27 28 28 /* Forward declarations: */ 29 class QCheckBox; 30 class QComboBox; 29 31 class QDialogButtonBox; 30 32 class QLabel; 31 class QComboBox;32 33 class UIFilePathSelector; 33 34 … … 59 60 enum FDSize 60 61 { 61 FDSize_2_88M,62 //FDSize_2_88M, 62 63 FDSize_1_44M, 63 64 FDSize_1_2M, … … 67 68 void prepare(); 68 69 QString getDefaultFolder() const; 70 69 71 UIFilePathSelector *m_pFilePathselector; 70 QString m_strMachineName;71 QString m_strMachineFolder;72 72 QLabel *m_pPathLabel; 73 73 QLabel *m_pSizeLabel; 74 74 QComboBox *m_pSizeCombo; 75 75 QDialogButtonBox *m_pButtonBox; 76 QCheckBox *m_pFormatCheckBox; 77 QString m_strMachineName; 78 QString m_strMachineFolder; 76 79 QString m_strMediumID; 77 80 };
Note:
See TracChangeset
for help on using the changeset viewer.