Changeset 100135 in vbox
- Timestamp:
- Jun 8, 2023 7:48:21 PM (18 months ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/medium/viso
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/medium/viso/UIVisoCreator.cpp
r100134 r100135 97 97 , m_fShowToolBar(fShowToolBar) 98 98 , m_pSettingsWidget(0) 99 , m_pBrowserContainerWidget(0) 99 100 { 100 101 m_visoOptions.m_strVisoName = !strMachineName.isEmpty() ? strMachineName : "ad-hoc"; … … 158 159 void UIVisoCreatorWidget::sltPanelActionToggled(bool fChecked) 159 160 { 161 Q_UNUSED(fChecked); 160 162 if (m_pSettingsWidget) 161 163 m_pSettingsWidget->setVisible(!m_pSettingsWidget->isVisible()); 162 return; 164 #if 0 163 165 QAction *pSenderAction = qobject_cast<QAction*>(sender()); 164 166 if (!pSenderAction) … … 178 180 else 179 181 hidePanel(pPanel); 182 #endif 180 183 } 181 184 … … 261 264 void UIVisoCreatorWidget::prepareWidgets() 262 265 { 263 m_pMainLayout = new Q GridLayout(this);266 m_pMainLayout = new QVBoxLayout(this); 264 267 if (!m_pMainLayout) 265 268 return; … … 279 282 if (m_pActionPool && m_pActionPool->action(UIActionIndex_M_VISOCreator)) 280 283 m_pMainMenu = m_pActionPool->action(UIActionIndex_M_VISOCreator)->menu(); 281 int iLayoutRow = 0;284 // int iLayoutRow = 0; 282 285 if (m_fShowToolBar) 283 286 { … … 289 292 m_pToolBar->setIconSize(QSize(iIconMetric, iIconMetric)); 290 293 m_pToolBar->setToolButtonStyle(Qt::ToolButtonTextUnderIcon); 291 m_pMainLayout->addWidget(m_pToolBar , iLayoutRow++, 0, 1, 5);294 m_pMainLayout->addWidget(m_pToolBar); 292 295 } 293 296 } 294 297 298 m_pBrowserContainerWidget = new QWidget; 299 if (!m_pBrowserContainerWidget) 300 return; 301 m_pMainLayout->addWidget(m_pBrowserContainerWidget); 302 QGridLayout *pContainerLayout = new QGridLayout(m_pBrowserContainerWidget); 303 pContainerLayout->setContentsMargins(0, 0, 0, 0); 295 304 m_pHostBrowser = new UIVisoHostBrowser; 296 305 if (m_pHostBrowser) 297 306 { 298 m_pMainLayout->addWidget(m_pHostBrowser, iLayoutRow, 0, 1, 4);307 pContainerLayout->addWidget(m_pHostBrowser, 0, 0, 1, 4); 299 308 //m_pMainLayout->setColumnStretch(m_pMainLayout->indexOf(m_pHostBrowser), 2); 300 309 } … … 303 312 if (m_pVerticalToolBar) 304 313 { 305 m_pMainLayout->addWidget(m_pVerticalToolBar, iLayoutRow, 4, 1, 1);314 pContainerLayout->addWidget(m_pVerticalToolBar, 0, 4, 1, 1); 306 315 //m_pMainLayout->setColumnStretch(m_pMainLayout->indexOf(m_pVerticalToolBar), 1); 307 316 } … … 310 319 if (m_pVISOContentBrowser) 311 320 { 312 m_pMainLayout->addWidget(m_pVISOContentBrowser, iLayoutRow, 5, 1, 4);321 pContainerLayout->addWidget(m_pVISOContentBrowser, 0, 5, 1, 4); 313 322 m_pVISOContentBrowser->setVisoName(m_visoOptions.m_strVisoName); 314 323 //m_pMainLayout->setColumnStretch(m_pMainLayout->indexOf(m_pVISOContentBrowser), 2); 315 324 } 316 ++iLayoutRow;317 m_pConfigurationPanel = new UIVisoConfigurationPanel(this);318 if (m_pConfigurationPanel)319 {320 m_pMainLayout->addWidget(m_pConfigurationPanel, iLayoutRow++, 0, 1, 9);321 m_pConfigurationPanel->hide();322 m_pConfigurationPanel->setVisoName(m_visoOptions.m_strVisoName);323 m_pConfigurationPanel->setVisoCustomOptions(m_visoOptions.m_customOptions);324 }325 326 m_pCreatorOptionsPanel = new UIVisoConfigurationPanel;327 if (m_pCreatorOptionsPanel)328 {329 m_pCreatorOptionsPanel->setShowHiddenbjects(m_browserOptions.m_fShowHiddenObjects);330 m_pMainLayout->addWidget(m_pCreatorOptionsPanel, iLayoutRow++, 0, 1, 9);331 m_pCreatorOptionsPanel->hide();332 }333 334 m_pSettingsWidget = new UIVisoSettingWidget(this);335 if (m_pSettingsWidget)336 {337 QVBoxLayout *pMainLayout = new QVBoxLayout(m_pSettingsWidget);338 QPushButton *pB = new QPushButton;339 pB->setText("ssssasas");340 pMainLayout->addWidget(pB);341 m_pSettingsWidget->setVisible(false);342 }325 // ++iLayoutRow; 326 // m_pConfigurationPanel = new UIVisoConfigurationPanel(this); 327 // if (m_pConfigurationPanel) 328 // { 329 // m_pMainLayout->addWidget(m_pConfigurationPanel, iLayoutRow++, 0, 1, 9); 330 // m_pConfigurationPanel->hide(); 331 // m_pConfigurationPanel->setVisoName(m_visoOptions.m_strVisoName); 332 // m_pConfigurationPanel->setVisoCustomOptions(m_visoOptions.m_customOptions); 333 // } 334 335 // m_pCreatorOptionsPanel = new UIVisoConfigurationPanel; 336 // if (m_pCreatorOptionsPanel) 337 // { 338 // m_pCreatorOptionsPanel->setShowHiddenbjects(m_browserOptions.m_fShowHiddenObjects); 339 // m_pMainLayout->addWidget(m_pCreatorOptionsPanel, iLayoutRow++, 0, 1, 9); 340 // m_pCreatorOptionsPanel->hide(); 341 // } 342 343 // m_pSettingsWidget = new UIVisoSettingWidget(this); 344 // if (m_pSettingsWidget) 345 // { 346 // QVBoxLayout *pMainLayout = new QVBoxLayout(m_pSettingsWidget); 347 // QPushButton *pB = new QPushButton; 348 // pB->setText("ssssasas"); 349 // pMainLayout->addWidget(pB); 350 // m_pSettingsWidget->setVisible(false); 351 // } 343 352 } 344 353 … … 665 674 666 675 m_pVisoCreatorWidget = new UIVisoCreatorWidget(m_pActionPool, this, true /* show toolbar */, strMachineName); 667 if (m_pVisoCreatorWidget )676 if (m_pVisoCreatorWidget && m_pVisoCreatorWidget->menu()) 668 677 { 669 678 menuBar()->addMenu(m_pVisoCreatorWidget->menu()); -
trunk/src/VBox/Frontends/VirtualBox/src/medium/viso/UIVisoCreator.h
r100134 r100135 44 44 /* Forward declarations: */ 45 45 class QGridLayout; 46 class QVBoxLayout; 46 47 class QLabel; 47 48 class QMenu; … … 160 161 /** @} */ 161 162 162 Q GridLayout *m_pMainLayout;163 QVBoxLayout *m_pMainLayout; 163 164 UIVisoHostBrowser *m_pHostBrowser; 164 165 UIVisoContentBrowser *m_pVISOContentBrowser; … … 176 177 bool m_fShowToolBar; 177 178 UIVisoSettingWidget *m_pSettingsWidget; 179 QWidget *m_pBrowserContainerWidget; 178 180 }; 179 181
Note:
See TracChangeset
for help on using the changeset viewer.