Changeset 92471 in vbox
- Timestamp:
- Nov 17, 2021 9:47:12 AM (3 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/medium/viso
- Files:
-
- 4 edited
-
UIVisoBrowserBase.cpp (modified) (5 diffs)
-
UIVisoBrowserBase.h (modified) (2 diffs)
-
UIVisoCreator.cpp (modified) (11 diffs)
-
UIVisoCreator.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/medium/viso/UIVisoBrowserBase.cpp
r91242 r92471 150 150 151 151 UIVisoBrowserBase::UIVisoBrowserBase(QWidget *pParent /* = 0 */) 152 : QIWithRetranslateUI<Q Widget>(pParent)152 : QIWithRetranslateUI<QGroupBox>(pParent) 153 153 , m_pTreeView(0) 154 154 , m_pMainLayout(0) … … 225 225 void UIVisoBrowserBase::resizeEvent(QResizeEvent *pEvent) 226 226 { 227 QIWithRetranslateUI<Q Widget>::resizeEvent(pEvent);227 QIWithRetranslateUI<QGroupBox>::resizeEvent(pEvent); 228 228 if (m_pTreeView) 229 229 updateTreeViewGeometry(m_pTreeView->isVisible()); … … 235 235 /* Handle only events sent to m_pTreeView only: */ 236 236 if (pObj != m_pTreeView) 237 return QIWithRetranslateUI<Q Widget>::eventFilter(pObj, pEvent);237 return QIWithRetranslateUI<QGroupBox>::eventFilter(pObj, pEvent); 238 238 239 239 if (pEvent->type() == QEvent::KeyPress) … … 253 253 254 254 /* Call to base-class: */ 255 return QIWithRetranslateUI<Q Widget>::eventFilter(pObj, pEvent);255 return QIWithRetranslateUI<QGroupBox>::eventFilter(pObj, pEvent); 256 256 } 257 257 … … 264 264 265 265 } 266 QIWithRetranslateUI<Q Widget>::keyPressEvent(pEvent);266 QIWithRetranslateUI<QGroupBox>::keyPressEvent(pEvent); 267 267 } 268 268 -
trunk/src/VBox/Frontends/VirtualBox/src/medium/viso/UIVisoBrowserBase.h
r82968 r92471 24 24 /* Qt includes: */ 25 25 #include <QModelIndex> 26 #include <Q Widget>26 #include <QGroupBox> 27 27 28 28 /* GUI includes: */ … … 36 36 37 37 /** An abstract QWidget extension hosting a tree and table view. */ 38 class UIVisoBrowserBase : public QIWithRetranslateUI<Q Widget>38 class UIVisoBrowserBase : public QIWithRetranslateUI<QGroupBox> 39 39 { 40 40 Q_OBJECT; -
trunk/src/VBox/Frontends/VirtualBox/src/medium/viso/UIVisoCreator.cpp
r92415 r92471 58 58 , m_pMainLayout(0) 59 59 , m_pHostBrowser(0) 60 , m_pV isoBrowser(0)60 , m_pVISOContentBrowser(0) 61 61 , m_pToolBar(0) 62 62 , m_pVerticalToolBar(0) … … 77 77 QStringList UIVisoCreatorWidget::entryList() const 78 78 { 79 if (!m_pV isoBrowser)79 if (!m_pVISOContentBrowser) 80 80 return QStringList(); 81 return m_pV isoBrowser->entryList();81 return m_pVISOContentBrowser->entryList(); 82 82 } 83 83 … … 113 113 void UIVisoCreatorWidget::retranslateUi() 114 114 { 115 if (m_pHostBrowser) 116 m_pHostBrowser->setTitle(UIVisoCreatorWidget::tr("Host File System")); 117 if (m_pVISOContentBrowser) 118 m_pVISOContentBrowser->setTitle(UIVisoCreatorWidget::tr("VISO Content")); 115 119 } 116 120 117 121 void UIVisoCreatorWidget::sltHandleAddObjectsToViso(QStringList pathList) 118 122 { 119 if (m_pV isoBrowser)120 m_pV isoBrowser->addObjectsToViso(pathList);123 if (m_pVISOContentBrowser) 124 m_pVISOContentBrowser->addObjectsToViso(pathList); 121 125 } 122 126 … … 147 151 return; 148 152 m_visoOptions.m_strVisoName = strVisoName; 149 if(m_pV isoBrowser)150 m_pV isoBrowser->setVisoName(m_visoOptions.m_strVisoName);153 if(m_pVISOContentBrowser) 154 m_pVISOContentBrowser->setVisoName(m_visoOptions.m_strVisoName); 151 155 } 152 156 … … 200 204 menu.addAction(m_pAddAction); 201 205 } 202 else if (sender() == m_pV isoBrowser)206 else if (sender() == m_pVISOContentBrowser) 203 207 { 204 208 menu.addAction(m_pRemoveAction); … … 245 249 { 246 250 m_pMainLayout->addWidget(m_pHostBrowser, 1, 0, 1, 2); 251 m_pHostBrowser->setAlignment(Qt::AlignLeft); 252 247 253 m_pMainLayout->setColumnStretch(m_pMainLayout->indexOf(m_pHostBrowser), 2); 248 254 } … … 255 261 } 256 262 257 m_pV isoBrowser = new UIVisoContentBrowser;258 if (m_pV isoBrowser)259 { 260 m_pMainLayout->addWidget(m_pV isoBrowser, 1, 3, 1, 2);261 m_pV isoBrowser->setVisoName(m_visoOptions.m_strVisoName);262 m_pMainLayout->setColumnStretch(m_pMainLayout->indexOf(m_pV isoBrowser), 2);263 m_pVISOContentBrowser = new UIVisoContentBrowser; 264 if (m_pVISOContentBrowser) 265 { 266 m_pMainLayout->addWidget(m_pVISOContentBrowser, 1, 3, 1, 2); 267 m_pVISOContentBrowser->setVisoName(m_visoOptions.m_strVisoName); 268 m_pMainLayout->setColumnStretch(m_pMainLayout->indexOf(m_pVISOContentBrowser), 2); 263 269 } 264 270 … … 295 301 } 296 302 297 if (m_pV isoBrowser)298 { 299 connect(m_pV isoBrowser, &UIVisoContentBrowser::sigTableSelectionChanged,303 if (m_pVISOContentBrowser) 304 { 305 connect(m_pVISOContentBrowser, &UIVisoContentBrowser::sigTableSelectionChanged, 300 306 this, &UIVisoCreatorWidget::sltHandleContentBrowserTableSelectionChanged); 301 connect(m_pV isoBrowser, &UIVisoContentBrowser::sigCreateFileTableViewContextMenu,307 connect(m_pVISOContentBrowser, &UIVisoContentBrowser::sigCreateFileTableViewContextMenu, 302 308 this, &UIVisoCreatorWidget::sltHandleShowContextMenu); 303 309 } … … 334 340 if (m_pCreateNewDirectoryAction) 335 341 connect(m_pCreateNewDirectoryAction, &QAction::triggered, 336 m_pV isoBrowser, &UIVisoContentBrowser::sltHandleCreateNewDirectory);342 m_pVISOContentBrowser, &UIVisoContentBrowser::sltHandleCreateNewDirectory); 337 343 if (m_pRemoveAction) 338 344 connect(m_pRemoveAction, &QAction::triggered, 339 m_pV isoBrowser, &UIVisoContentBrowser::sltHandleRemoveItems);345 m_pVISOContentBrowser, &UIVisoContentBrowser::sltHandleRemoveItems); 340 346 if (m_pResetAction) 341 347 connect(m_pResetAction, &QAction::triggered, 342 m_pV isoBrowser, &UIVisoContentBrowser::sltHandleResetAction);348 m_pVISOContentBrowser, &UIVisoContentBrowser::sltHandleResetAction); 343 349 if (m_pRenameAction) 344 350 connect(m_pRenameAction, &QAction::triggered, 345 m_pV isoBrowser,&UIVisoContentBrowser::sltHandleItemRenameAction);351 m_pVISOContentBrowser,&UIVisoContentBrowser::sltHandleItemRenameAction); 346 352 } 347 353 … … 440 446 // host and/or content browser is open. We use the escape key to close those first: */ 441 447 // if ((m_pHostBrowser && m_pHostBrowser->isTreeViewVisible()) || 442 // (m_pV isoBrowser && m_pVisoBrowser->isTreeViewVisible()))448 // (m_pVISOContentBrowser && m_pVISOContentBrowser->isTreeViewVisible())) 443 449 // { 444 450 // if (m_pButtonBox && m_pButtonBox->button(QDialogButtonBox::Cancel)) … … 590 596 { 591 597 if (!m_strMachineName.isEmpty()) 592 setWindowTitle(QString("%1 - %2").arg(m_strMachineName).arg( tr("VISO Creator")));598 setWindowTitle(QString("%1 - %2").arg(m_strMachineName).arg(UIVisoCreatorWidget::tr("VISO Creator"))); 593 599 else 594 setWindowTitle(QString("%1").arg( tr("VISO Creator")));600 setWindowTitle(QString("%1").arg(UIVisoCreatorWidget::tr("VISO Creator"))); 595 601 if (m_pButtonBox && m_pButtonBox->button(QDialogButtonBox::Ok)) 596 602 { 597 m_pButtonBox->button(QDialogButtonBox::Ok)->setText( QApplication::translate("UIVisoCreator","C&reate"));598 m_pButtonBox->button(QDialogButtonBox::Ok)->setToolTip( QApplication::translate("UIVisoCreator","Creates VISO file with the selected content"));603 m_pButtonBox->button(QDialogButtonBox::Ok)->setText(UIVisoCreatorWidget::tr("C&reate")); 604 m_pButtonBox->button(QDialogButtonBox::Ok)->setToolTip(UIVisoCreatorWidget::tr("Creates VISO file with the selected content")); 599 605 } 600 606 if (m_pButtonBox && m_pButtonBox->button(QDialogButtonBox::Help)) 601 m_pButtonBox->button(QDialogButtonBox::Help)->setToolTip( QApplication::translate("UIVisoCreator","Opens the help browser and navigates to the related section"));602 } 607 m_pButtonBox->button(QDialogButtonBox::Help)->setToolTip(UIVisoCreatorWidget::tr("Opens the help browser and navigates to the related section")); 608 } -
trunk/src/VBox/Frontends/VirtualBox/src/medium/viso/UIVisoCreator.h
r92467 r92471 152 152 QGridLayout *m_pMainLayout; 153 153 UIVisoHostBrowser *m_pHostBrowser; 154 UIVisoContentBrowser *m_pV isoBrowser;154 UIVisoContentBrowser *m_pVISOContentBrowser; 155 155 156 156 QIToolBar *m_pToolBar;
Note:
See TracChangeset
for help on using the changeset viewer.

