- Timestamp:
- Jun 15, 2023 10:54:10 AM (18 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/medium/viso/UIVisoCreator.cpp
r100169 r100177 93 93 void prepareConnections(); 94 94 95 QTabWidget *m_pTabWidget; 95 96 QILabel *m_pVisoNameLabel; 96 97 QILabel *m_pCustomOptionsLabel; … … 109 110 UIVisoSettingWidget::UIVisoSettingWidget(QWidget *pParent) 110 111 :QIWithRetranslateUI<QGroupBox>(pParent) 112 , m_pTabWidget(0) 111 113 , m_pVisoNameLabel(0) 112 114 , m_pCustomOptionsLabel(0) … … 124 126 { 125 127 QVBoxLayout *pMainLayout = new QVBoxLayout(this); 126 QGridLayout *pGridLayout = new QGridLayout; 127 128 //pGridLayout->setSpacing(0); 129 //pGridLayout->setContentsMargins(0, 0, 0, 0); 130 if (!pGridLayout) 131 return; 128 AssertReturnVoid(pMainLayout); 129 m_pTabWidget = new QTabWidget; 130 AssertReturnVoid(m_pTabWidget); 131 pMainLayout->addWidget(m_pTabWidget); 132 133 QWidget *pVisoOptionsContainerWidget = new QWidget; 134 AssertReturnVoid(pVisoOptionsContainerWidget); 135 QGridLayout *pVisoOptionsGridLayout = new QGridLayout(pVisoOptionsContainerWidget); 136 AssertReturnVoid(pVisoOptionsGridLayout); 137 //pVisoOptionsGridLayout->setSpacing(0); 138 //pVisoOptionsGridLayout->setContentsMargins(0, 0, 0, 0); 139 140 m_pTabWidget->addTab(pVisoOptionsContainerWidget, QApplication::translate("UIVisoCreatorWidget", "VISO options")); 132 141 133 142 /* Name edit and and label: */ … … 138 147 { 139 148 m_pVisoNameLabel->setBuddy(m_pVisoNameLineEdit); 140 p GridLayout->addWidget(m_pVisoNameLabel, iRow, 0, 1, 1, Qt::AlignTop);141 p GridLayout->addWidget(m_pVisoNameLineEdit, iRow, 1, 1, 1, Qt::AlignTop);142 } 143 144 /* Cu tom Viso options stuff: */149 pVisoOptionsGridLayout->addWidget(m_pVisoNameLabel, iRow, 0, 1, 1, Qt::AlignTop); 150 pVisoOptionsGridLayout->addWidget(m_pVisoNameLineEdit, iRow, 1, 1, 1, Qt::AlignTop); 151 } 152 153 /* Custom Viso options stuff: */ 145 154 m_pCustomOptionsLabel = new QILabel(QApplication::translate("UIVisoCreatorWidget", "Custom VISO options:")); 146 155 m_pCustomOptionsLineEdit = new QILineEdit; 147 156 ++iRow; 148 if (m_pCustomOptionsLabel && m_pCustomOptionsLineEdit)149 {150 151 pGridLayout->addWidget(m_pCustomOptionsLabel, iRow, 0, 1, 1, Qt::AlignTop);152 pGridLayout->addWidget(m_pCustomOptionsLineEdit, iRow, 1, 1, 1, Qt::AlignTop);153 } 157 AssertReturnVoid(m_pCustomOptionsLabel); 158 AssertReturnVoid(m_pCustomOptionsLineEdit); 159 m_pCustomOptionsLabel->setBuddy(m_pCustomOptionsLineEdit); 160 pVisoOptionsGridLayout->addWidget(m_pCustomOptionsLabel, iRow, 0, 1, 1, Qt::AlignTop); 161 pVisoOptionsGridLayout->addWidget(m_pCustomOptionsLineEdit, iRow, 1, 1, 1, Qt::AlignTop); 162 154 163 155 164 ++iRow; 165 pVisoOptionsGridLayout->addItem(new QSpacerItem(0, 0, QSizePolicy::Minimum, QSizePolicy::Expanding), iRow, 0, 1, 2); 166 167 QWidget *pDialogSettingsContainerWidget = new QWidget; 168 AssertReturnVoid(pDialogSettingsContainerWidget); 169 QGridLayout *pDialogSettingsContainerLayout = new QGridLayout(pDialogSettingsContainerWidget); 170 AssertReturnVoid(pDialogSettingsContainerLayout); 171 172 m_pTabWidget->addTab(pDialogSettingsContainerWidget, QApplication::translate("UIVisoCreatorWidget", "Dialog Settings")); 173 174 iRow = 0; 156 175 m_pShowHiddenObjectsCheckBox = new QCheckBox; 157 176 m_pShowHiddenObjectsLabel = new QILabel(QApplication::translate("UIVisoCreatorWidget", "Show Hidden Objects")); 158 177 m_pShowHiddenObjectsLabel->setBuddy(m_pShowHiddenObjectsCheckBox); 159 pGridLayout->addWidget(m_pShowHiddenObjectsLabel, iRow, 0, 1, 1, Qt::AlignTop); 160 pGridLayout->addWidget(m_pShowHiddenObjectsCheckBox, iRow, 1, 1, 1, Qt::AlignTop); 178 pDialogSettingsContainerLayout->addWidget(m_pShowHiddenObjectsLabel, iRow, 0, 1, 1, Qt::AlignTop); 179 pDialogSettingsContainerLayout ->addWidget(m_pShowHiddenObjectsCheckBox, iRow, 1, 1, 1, Qt::AlignTop); 180 161 181 ++iRow; 162 QSpacerItem *pSpacer = new QSpacerItem(0, 0, QSizePolicy::Minimum, QSizePolicy::Expanding); 163 pGridLayout->addItem(pSpacer, iRow, 0, 1, 2); 164 165 pMainLayout->addLayout(pGridLayout); 182 pDialogSettingsContainerLayout->addItem(new QSpacerItem(0, 0, QSizePolicy::Minimum, QSizePolicy::Expanding), iRow, 0, 1, 2); 166 183 167 184 m_pButtonBox = new QIDialogButtonBox; 168 if (m_pButtonBox) 169 { 170 m_pButtonBox->setDoNotPickDefaultButton(true); 171 m_pButtonBox->setStandardButtons(QDialogButtonBox::Cancel | QDialogButtonBox::Ok); 172 pMainLayout->addWidget(m_pButtonBox); 173 174 } 185 AssertReturnVoid(m_pButtonBox); 186 m_pButtonBox->setDoNotPickDefaultButton(true); 187 m_pButtonBox->setStandardButtons(QDialogButtonBox::Cancel | QDialogButtonBox::Ok); 188 pMainLayout->addWidget(m_pButtonBox); 189 175 190 retranslateUi(); 176 191 } … … 416 431 { 417 432 QString strFileName = QIFileDialog::getOpenFileName(uiCommon().defaultFolderPathForType(UIMediumDeviceType_DVD), 418 "V iso files (*.viso)", this, UIVisoCreatorWidget::tr("Select a visofile to load"));433 "VISO files (*.viso)", this, UIVisoCreatorWidget::tr("Select a VISO file to load")); 419 434 if (!strFileName.isEmpty() && m_pVISOContentBrowser) 420 435 m_pVISOContentBrowser->parseVisoFileContent(strFileName); … … 914 929 { 915 930 if (m_pStatusLabel) 916 m_pStatusLabel->setText(QString("%1: %2").arg(UIVisoCreatorWidget::tr("V isofile")).arg(visoFileFullPath()));931 m_pStatusLabel->setText(QString("%1: %2").arg(UIVisoCreatorWidget::tr("VISO file")).arg(visoFileFullPath())); 917 932 } 918 933
Note:
See TracChangeset
for help on using the changeset viewer.