Changeset 106084 in vbox
- Timestamp:
- Sep 18, 2024 6:20:15 PM (7 months ago)
- svn:sync-xref-src-repo-rev:
- 164856
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/wizards/editors
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/wizards/editors/UIHostnameDomainNameEditor.cpp
r106079 r106084 27 27 28 28 /* Qt includes: */ 29 #include <QCheckBox> 29 30 #include <QGridLayout> 30 31 #include <QLabel> … … 56 57 , m_pProductKeyLabel(0) 57 58 , m_pMainLayout(0) 59 , m_pStartHeadlessCheckBox(0) 58 60 { 59 61 prepare(); … … 127 129 if (m_pProductKeyLineEdit) 128 130 m_pProductKeyLineEdit->setToolTip(UIWizardNewVM::tr("Holds the product key.")); 131 132 if (m_pStartHeadlessCheckBox) 133 { 134 m_pStartHeadlessCheckBox->setText(UIWizardNewVM::tr("&Install in Background")); 135 m_pStartHeadlessCheckBox->setToolTip(UIWizardNewVM::tr("When checked, headless boot (with no GUI) will be enabled for " 136 "unattended guest OS installation of newly created virtual machine.")); 137 } 129 138 } 130 139 … … 152 161 { 153 162 m_pMainLayout = new QGridLayout; 154 m_pMainLayout->setColumnStretch(0, 0);155 m_pMainLayout->setColumnStretch(1, 1);156 163 if (!m_pMainLayout) 157 164 return; … … 159 166 int iRow = 0; 160 167 161 162 163 168 addLineEdit(iRow, m_pProductKeyLabel, m_pProductKeyLineEdit, m_pMainLayout); 164 169 addLineEdit(iRow, m_pHostnameLabel, m_pHostnameLineEdit, m_pMainLayout); … … 168 173 { 169 174 m_pProductKeyLineEdit->setInputMask(">NNNNN-NNNNN-NNNNN-NNNNN-NNNNN;#"); 170 m_pProductKeyLineEdit->setMinimumWidth (fontMetrics().horizontalAdvance("NNNNN-NNNNN-NNNNN-NNNNN-NNNNN"));175 m_pProductKeyLineEdit->setMinimumWidthByText("NNNNN-NNNNN-NNNNN-NNNNN-NNNNN"); 171 176 } 172 177 … … 186 191 connect(&translationEventListener(), &UITranslationEventListener::sigRetranslateUI, 187 192 this, &UIHostnameDomainNameEditor::sltRetranslateUI); 193 194 m_pStartHeadlessCheckBox = new QCheckBox; 195 if (m_pStartHeadlessCheckBox) 196 m_pMainLayout->addWidget(m_pStartHeadlessCheckBox, iRow, 1, 1, 3); 197 198 if (m_pStartHeadlessCheckBox) 199 connect(m_pStartHeadlessCheckBox, &QCheckBox::toggled, 200 this, &UIHostnameDomainNameEditor::sigStartHeadlessChanged); 201 202 sltRetranslateUI(); 188 203 } 189 204 -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/editors/UIHostnameDomainNameEditor.h
r106079 r106084 37 37 38 38 /* Forward declarations: */ 39 class QCheckBox; 39 40 class QGridLayout; 40 41 class QLabel; … … 51 52 void sigHostnameDomainNameChanged(const QString &strHostNameDomain, bool fIsComplete); 52 53 void sigProductKeyChanged(const QString &strProductKey); 54 void sigStartHeadlessChanged(bool fChecked); 53 55 54 56 public: … … 88 90 QLabel *m_pProductKeyLabel; 89 91 QGridLayout *m_pMainLayout; 92 QCheckBox *m_pStartHeadlessCheckBox; 90 93 }; 91 94 -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/editors/UIWizardNewVMEditors.cpp
r106083 r106084 225 225 : QGroupBox(pParent) 226 226 , m_pHostnameDomainNameEditor(0) 227 , m_pStartHeadlessCheckBox(0)228 227 { 229 228 prepare(); … … 232 231 void UIAdditionalUnattendedOptions::prepare() 233 232 { 234 m_pMainLayout = new QGridLayout(this); 235 m_pMainLayout->setColumnStretch(0, 0); 236 m_pMainLayout->setColumnStretch(1, 1); 237 233 m_pMainLayout = new QHBoxLayout(this); 238 234 m_pHostnameDomainNameEditor = new UIHostnameDomainNameEditor; 239 235 if (m_pHostnameDomainNameEditor) 240 m_pMainLayout->addWidget(m_pHostnameDomainNameEditor, 1, 0, 2, 3); 241 242 m_pStartHeadlessCheckBox = new QCheckBox; 243 if (m_pStartHeadlessCheckBox) 244 m_pMainLayout->addWidget(m_pStartHeadlessCheckBox, 3, 1); 236 m_pMainLayout->addWidget(m_pHostnameDomainNameEditor); 245 237 246 238 if (m_pHostnameDomainNameEditor) … … 250 242 connect(m_pHostnameDomainNameEditor, &UIHostnameDomainNameEditor::sigProductKeyChanged, 251 243 this, &UIAdditionalUnattendedOptions::sigProductKeyChanged); 244 connect(m_pHostnameDomainNameEditor, &UIHostnameDomainNameEditor::sigStartHeadlessChanged, 245 this, &UIAdditionalUnattendedOptions::sigStartHeadlessChanged); 252 246 } 253 if (m_pStartHeadlessCheckBox)254 connect(m_pStartHeadlessCheckBox, &QCheckBox::toggled,255 this, &UIAdditionalUnattendedOptions::sigStartHeadlessChanged);256 247 257 248 sltRetranslateUI(); … … 263 254 { 264 255 setTitle(UIWizardNewVM::tr("Additional Options")); 265 266 if (m_pStartHeadlessCheckBox)267 {268 m_pStartHeadlessCheckBox->setText(UIWizardNewVM::tr("&Install in Background"));269 m_pStartHeadlessCheckBox->setToolTip(UIWizardNewVM::tr("When checked, headless boot (with no GUI) will be enabled for "270 "unattended guest OS installation of newly created virtual machine."));271 }272 256 } 273 257 -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/editors/UIWizardNewVMEditors.h
r106079 r106084 38 38 /* Forward declarations: */ 39 39 class QCheckBox; 40 class Q GridLayout;40 class QHBoxLayout; 41 41 class QLabel; 42 42 class QILineEdit; … … 152 152 void prepare(); 153 153 154 155 156 154 UIHostnameDomainNameEditor *m_pHostnameDomainNameEditor; 157 QCheckBox *m_pStartHeadlessCheckBox; 158 QGridLayout *m_pMainLayout; 155 QHBoxLayout *m_pMainLayout; 159 156 }; 160 157
Note:
See TracChangeset
for help on using the changeset viewer.