- Timestamp:
- Sep 23, 2021 2:09:33 PM (3 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/medium
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/medium/UIFDCreationDialog.cpp
r91349 r91350 44 44 , m_strDefaultFolder(strDefaultFolder) 45 45 , m_strMachineName(strMachineName) 46 , m_p LabelPath(0)46 , m_pPathLabel(0) 47 47 , m_pFilePathSelector(0) 48 48 , m_pSizeLabel(0) 49 , m_p ComboSize(0)50 , m_p CheckBoxFormat(0)49 , m_pSizeCombo(0) 50 , m_pFormatCheckBox(0) 51 51 , m_pButtonBox(0) 52 52 { … … 86 86 QVector<KMediumVariant> variants(1, KMediumVariant_Fixed); 87 87 /* Decide if disk formatting is required: */ 88 if (m_p CheckBoxFormat && m_pCheckBoxFormat->checkState() == Qt::Checked)88 if (m_pFormatCheckBox && m_pFormatCheckBox->checkState() == Qt::Checked) 89 89 variants.push_back(KMediumVariant_Formatted); 90 90 91 91 /* Create medium storage, asynchronously: */ 92 92 UINotificationProgressMediumCreate *pNotification = 93 new UINotificationProgressMediumCreate(comMedium, m_p ComboSize->currentData().toLongLong(), variants);93 new UINotificationProgressMediumCreate(comMedium, m_pSizeCombo->currentData().toLongLong(), variants); 94 94 connect(pNotification, &UINotificationProgressMediumCreate::sigMediumCreated, 95 95 &uiCommon(), &UICommon::sltHandleMediumCreated); … … 105 105 else 106 106 setWindowTitle(QString("%1 - %2").arg(m_strMachineName).arg(tr("Floppy Disk Creator"))); 107 if (m_p LabelPath)108 m_p LabelPath->setText(tr("FilePath:"));107 if (m_pPathLabel) 108 m_pPathLabel->setText(tr("File &Path:")); 109 109 if (m_pSizeLabel) 110 m_pSizeLabel->setText(tr("Size:")); 110 { 111 m_pSizeLabel->setText(tr("&Size:")); 112 m_pSizeLabel->setToolTip(tr("Sets the size of the floppy disk.")); 113 } 111 114 if (m_pButtonBox) 112 115 m_pButtonBox->button(QDialogButtonBox::Ok)->setText("C&reate"); 113 if (m_pCheckBoxFormat) 114 m_pCheckBoxFormat->setText(tr("Format disk as FAT12")); 115 if (m_pComboSize) 116 { 117 //m_pComboSize->setItemText(FDSize_2_88M, tr("2.88M")); 118 m_pComboSize->setItemText(FDSize_1_44M, tr("1.44M")); 119 m_pComboSize->setItemText(FDSize_1_2M, tr("1.2M")); 120 m_pComboSize->setItemText(FDSize_720K, tr("720K")); 121 m_pComboSize->setItemText(FDSize_360K, tr("360K")); 116 if (m_pFormatCheckBox) 117 { 118 m_pFormatCheckBox->setText(tr("&Format disk as FAT12")); 119 m_pFormatCheckBox->setToolTip(tr("Formats the floppy disk as FAT12.")); 120 } 121 if (m_pSizeCombo) 122 { 123 //m_pSizeCombo->setItemText(FDSize_2_88M, tr("2.88M")); 124 m_pSizeCombo->setItemText(FDSize_1_44M, tr("1.44M")); 125 m_pSizeCombo->setItemText(FDSize_1_2M, tr("1.2M")); 126 m_pSizeCombo->setItemText(FDSize_720K, tr("720K")); 127 m_pSizeCombo->setItemText(FDSize_360K, tr("360K")); 122 128 } 123 129 } … … 160 166 { 161 167 /* Prepare path label: */ 162 m_p LabelPath= new QLabel(this);163 if (m_p LabelPath)164 { 165 m_p LabelPath->setAlignment(Qt::AlignRight | Qt::AlignVCenter);166 pLayoutMain->addWidget(m_p LabelPath, 0, 0);168 m_pPathLabel = new QLabel(this); 169 if (m_pPathLabel) 170 { 171 m_pPathLabel->setAlignment(Qt::AlignRight | Qt::AlignVCenter); 172 pLayoutMain->addWidget(m_pPathLabel, 0, 0); 167 173 } 168 174 /* Prepare file path selector: */ … … 178 184 connect(m_pFilePathSelector, &UIFilePathSelector::pathChanged, 179 185 this, &UIFDCreationDialog::sltPathChanged); 186 if (m_pPathLabel) 187 m_pPathLabel->setBuddy(m_pFilePathSelector); 180 188 } 181 189 … … 188 196 } 189 197 /* Prepare size combo: */ 190 m_pComboSize = new QComboBox(this); 191 if (m_pComboSize) 192 { 193 //m_pComboSize->insertItem(FDSize_2_88M, "2.88M", 2949120); 194 m_pComboSize->insertItem(FDSize_1_44M, "1.44M", 1474560); 195 m_pComboSize->insertItem(FDSize_1_2M, "1.2M", 1228800); 196 m_pComboSize->insertItem(FDSize_720K, "720K", 737280); 197 m_pComboSize->insertItem(FDSize_360K, "360K", 368640); 198 m_pComboSize->setCurrentIndex(FDSize_1_44M); 199 200 pLayoutMain->addWidget(m_pComboSize, 1, 1); 198 m_pSizeCombo = new QComboBox(this); 199 if (m_pSizeCombo) 200 { 201 //m_pSizeCombo->insertItem(FDSize_2_88M, "2.88M", 2949120); 202 m_pSizeCombo->insertItem(FDSize_1_44M, "1.44M", 1474560); 203 m_pSizeCombo->insertItem(FDSize_1_2M, "1.2M", 1228800); 204 m_pSizeCombo->insertItem(FDSize_720K, "720K", 737280); 205 m_pSizeCombo->insertItem(FDSize_360K, "360K", 368640); 206 m_pSizeCombo->setCurrentIndex(FDSize_1_44M); 207 208 pLayoutMain->addWidget(m_pSizeCombo, 1, 1); 209 210 if (m_pSizeLabel) 211 m_pSizeLabel->setBuddy(m_pSizeCombo); 201 212 } 202 213 203 214 /* Prepare format check-box: */ 204 m_p CheckBoxFormat= new QCheckBox;205 if (m_p CheckBoxFormat)206 { 207 m_p CheckBoxFormat->setCheckState(Qt::Checked);208 pLayoutMain->addWidget(m_p CheckBoxFormat, 2, 1, 1, 2);215 m_pFormatCheckBox = new QCheckBox; 216 if (m_pFormatCheckBox) 217 { 218 m_pFormatCheckBox->setCheckState(Qt::Checked); 219 pLayoutMain->addWidget(m_pFormatCheckBox, 2, 1, 1, 2); 209 220 } 210 221 -
trunk/src/VBox/Frontends/VirtualBox/src/medium/UIFDCreationDialog.h
r91349 r91350 96 96 97 97 /** Holds the path label instance. */ 98 QLabel *m_p LabelPath;98 QLabel *m_pPathLabel; 99 99 /** Holds the file path selector instance. */ 100 100 UIFilePathSelector *m_pFilePathSelector; … … 102 102 QLabel *m_pSizeLabel; 103 103 /** Holds the size combo instance. */ 104 QComboBox *m_p ComboSize;104 QComboBox *m_pSizeCombo; 105 105 /** Holds the format check-box instance. */ 106 QCheckBox *m_p CheckBoxFormat;106 QCheckBox *m_pFormatCheckBox; 107 107 /** holds the button-box instance. */ 108 108 QDialogButtonBox *m_pButtonBox;
Note:
See TracChangeset
for help on using the changeset viewer.