Changeset 89605 in vbox
- Timestamp:
- Jun 10, 2021 2:39:35 PM (3 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/logviewer
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerWidget.cpp
r89599 r89605 60 60 const ULONG uAllowedLogSize = _256M; 61 61 62 class UILogTabCloseButton : public QIToolButton 63 { 64 Q_OBJECT; 65 66 public: 67 68 //UILogTabCloseButton(QWidget *pParent, const QUuid &uMachineId, const QString &strMachineName); 69 UILogTabCloseButton(QWidget *pParent = 0) 70 : QIToolButton(pParent) 71 { 72 setAutoRaise(true); 73 setIcon(UIIconPool::iconSet(":/close_16px.png")); 74 } 75 76 protected: 77 78 }; 79 /********************************************************************************************************************************* 80 * UILabelTab definition. * 81 *********************************************************************************************************************************/ 82 62 83 class UILabelTab : public UIVMLogTab 63 84 { … … 67 88 public: 68 89 69 UILabelTab(QWidget *pParent, const QUuid &uMachineId, const QString &strMachineName) 70 : UIVMLogTab(pParent, uMachineId, strMachineName) 71 { 72 } 90 UILabelTab(QWidget *pParent, const QUuid &uMachineId, const QString &strMachineName); 73 91 74 92 protected: 75 void retranslateUi(){} 93 94 void retranslateUi(); 76 95 }; 77 96 … … 108 127 UITabWidget(QWidget *pParent = 0); 109 128 }; 129 130 /********************************************************************************************************************************* 131 * UILabelTab implementation. * 132 *********************************************************************************************************************************/ 133 134 UILabelTab::UILabelTab(QWidget *pParent, const QUuid &uMachineId, const QString &strMachineName) 135 : UIVMLogTab(pParent, uMachineId, strMachineName) 136 { 137 } 138 139 void UILabelTab::retranslateUi() 140 { 141 } 110 142 111 143 /********************************************************************************************************************************* … … 271 303 { 272 304 if (qobject_cast<UILabelTab*>(m_pTabWidget->widget(i))) 305 { 273 306 pTabBar->setTabData(i, true); 307 UILogTabCloseButton *pCloseButton = new UILogTabCloseButton; 308 pCloseButton->setIcon(UIIconPool::iconSet(":/close_16px.png")); 309 310 pTabBar->setTabButton(i, QTabBar::RightSide, pCloseButton); 311 connect(pCloseButton, &UILogTabCloseButton::clicked, this, &UIVMLogViewerWidget::sltTabCloseButtonClick); 312 } 274 313 else 314 { 275 315 pTabBar->setTabData(i, false); 316 } 317 276 318 } 277 319 } … … 630 672 machineList << machineId; 631 673 removeLogViewerPages(machineList); 674 } 675 676 void UIVMLogViewerWidget::sltTabCloseButtonClick() 677 { 678 printf("UIVMLogViewerWidget::sltTabCloseButtonClick\n"); 632 679 } 633 680 -
trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerWidget.h
r89599 r89605 144 144 void sltShowTabBarContextMenu(const QPoint &pos); 145 145 void sltCloseMachineLogs(); 146 void sltTabCloseButtonClick(); 146 147 147 148 private:
Note:
See TracChangeset
for help on using the changeset viewer.