- Timestamp:
- Aug 15, 2023 5:25:45 AM (20 months ago)
- svn:sync-xref-src-repo-rev:
- 158793
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/medium/viso/UIVisoCreator.cpp
r100816 r100876 94 94 QCheckBox *m_pShowHiddenObjectsCheckBox; 95 95 QILabel *m_pShowHiddenObjectsLabel; 96 QGridLayout *m_pVisoOptionsGridLayout; 96 97 }; 97 98 … … 110 111 , m_pShowHiddenObjectsCheckBox(0) 111 112 , m_pShowHiddenObjectsLabel(0) 113 , m_pVisoOptionsGridLayout(0) 112 114 { 113 115 prepareObjects(); … … 125 127 QWidget *pVisoOptionsContainerWidget = new QWidget; 126 128 AssertReturnVoid(pVisoOptionsContainerWidget); 127 QGridLayout *pVisoOptionsGridLayout = new QGridLayout(pVisoOptionsContainerWidget);128 AssertReturnVoid( pVisoOptionsGridLayout);129 m_pVisoOptionsGridLayout = new QGridLayout(pVisoOptionsContainerWidget); 130 AssertReturnVoid(m_pVisoOptionsGridLayout); 129 131 //pVisoOptionsGridLayout->setSpacing(0); 130 132 //pVisoOptionsGridLayout->setContentsMargins(0, 0, 0, 0); … … 136 138 m_pVisoNameLineEdit = new QILineEdit; 137 139 int iRow = 0; 138 if (m_pVisoNameLabel && m_pVisoNameLineEdit) 139 { 140 m_pVisoNameLabel->setBuddy(m_pVisoNameLineEdit); 141 pVisoOptionsGridLayout->addWidget(m_pVisoNameLabel, iRow, 0, 1, 1, Qt::AlignTop); 142 pVisoOptionsGridLayout->addWidget(m_pVisoNameLineEdit, iRow, 1, 1, 1, Qt::AlignTop); 143 } 140 AssertReturnVoid(m_pVisoNameLabel); 141 AssertReturnVoid(m_pVisoNameLineEdit); 142 m_pVisoNameLabel->setBuddy(m_pVisoNameLineEdit); 143 m_pVisoNameLabel->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum); 144 //m_pVisoNameLineEdit->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Minimum); 145 m_pVisoOptionsGridLayout->addWidget(m_pVisoNameLabel, iRow, 0, 1, 1, Qt::AlignTop); 146 m_pVisoOptionsGridLayout->addWidget(m_pVisoNameLineEdit, iRow, 1, 1, 1, Qt::AlignTop); 147 m_pVisoOptionsGridLayout->addItem(new QSpacerItem(0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum), iRow, 2, 1, 3); 144 148 145 149 /* Custom Viso options stuff: */ … … 150 154 AssertReturnVoid(m_pCustomOptionsLineEdit); 151 155 m_pCustomOptionsLabel->setBuddy(m_pCustomOptionsLineEdit); 152 pVisoOptionsGridLayout->addWidget(m_pCustomOptionsLabel, iRow, 0, 1, 1, Qt::AlignTop); 153 pVisoOptionsGridLayout->addWidget(m_pCustomOptionsLineEdit, iRow, 1, 1, 1, Qt::AlignTop); 156 //m_pCustomOptionsLineEdit->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Minimum); 157 m_pCustomOptionsLabel->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum); 158 m_pVisoOptionsGridLayout->addWidget(m_pCustomOptionsLabel, iRow, 0, 1, 1, Qt::AlignTop); 159 m_pVisoOptionsGridLayout->addWidget(m_pCustomOptionsLineEdit, iRow, 1, 1, 1, Qt::AlignTop); 160 m_pVisoOptionsGridLayout->addItem(new QSpacerItem(0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum), iRow, 2, 1, 3); 154 161 155 162 ++iRow; 156 pVisoOptionsGridLayout->addItem(new QSpacerItem(0, 0, QSizePolicy::Minimum, QSizePolicy::Expanding), iRow, 0, 1, 2); 157 163 m_pVisoOptionsGridLayout->addItem(new QSpacerItem(0, 0, QSizePolicy::Minimum, QSizePolicy::Expanding), iRow, 0, 1, 2); 158 164 QWidget *pDialogSettingsContainerWidget = new QWidget; 159 165 AssertReturnVoid(pDialogSettingsContainerWidget); … … 164 170 165 171 iRow = 0; 172 QHBoxLayout *pShowHiddenObjectsLayout = new QHBoxLayout; 166 173 m_pShowHiddenObjectsCheckBox = new QCheckBox; 167 174 m_pShowHiddenObjectsLabel = new QILabel(QApplication::translate("UIVisoCreatorWidget", "Show Hidden Objects:")); 168 175 m_pShowHiddenObjectsLabel->setBuddy(m_pShowHiddenObjectsCheckBox); 169 pDialogSettingsContainerLayout->addWidget(m_pShowHiddenObjectsLabel, iRow, 0, 1, 1, Qt::AlignTop); 170 pDialogSettingsContainerLayout ->addWidget(m_pShowHiddenObjectsCheckBox, iRow, 1, 1, 1, Qt::AlignTop); 176 pShowHiddenObjectsLayout->addWidget(m_pShowHiddenObjectsLabel); 177 pShowHiddenObjectsLayout->addWidget(m_pShowHiddenObjectsCheckBox); 178 pShowHiddenObjectsLayout->addStretch(1); 179 pDialogSettingsContainerLayout->addLayout(pShowHiddenObjectsLayout, iRow, 0, 1, 2, Qt::AlignTop); 171 180 172 181 ++iRow; … … 177 186 void UIVisoSettingWidget::retranslateUi() 178 187 { 188 int iLabelWidth = 0; 179 189 if (m_pVisoNameLabel) 190 { 180 191 m_pVisoNameLabel->setText(QApplication::translate("UIVisoCreatorWidget", "VISO Name:")); 192 iLabelWidth = m_pVisoNameLabel->width(); 193 } 181 194 if (m_pCustomOptionsLabel) 195 { 182 196 m_pCustomOptionsLabel->setText(QApplication::translate("UIVisoCreatorWidget", "Custom VISO options:")); 197 iLabelWidth = qMax(iLabelWidth, m_pCustomOptionsLabel->width()); 198 } 183 199 184 200 if (m_pVisoNameLineEdit) … … 191 207 m_pShowHiddenObjectsCheckBox->setToolTip(QApplication::translate("UIVisoCreatorWidget", "When checked, " 192 208 "multiple hidden objects are shown in the file browser")); 209 210 //m_pVisoOptionsGridLayout->setColumnMinimumWidth(0, iLabelWidth); 193 211 } 194 212
Note:
See TracChangeset
for help on using the changeset viewer.