Changeset 102732 in vbox for trunk/src/VBox
- Timestamp:
- Dec 29, 2023 4:35:15 PM (14 months ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerDialog.cpp
r102574 r102732 30 30 # include <QFontDatabase> 31 31 #endif 32 #include <QAbstractButton> 32 33 #include <QPushButton> 33 34 #include <QVBoxLayout> 34 35 35 36 /* GUI includes: */ 37 #include "QIDialogButtonBox.h" 36 38 #include "UIDesktopWidgetWatchdog.h" 37 39 #include "UIExtraDataManager.h" … … 102 104 button(ButtonType_Close)->setText(UIVMLogViewerWidget::tr("Close")); 103 105 button(ButtonType_Help)->setText(UIVMLogViewerWidget::tr("Help")); 106 button(ButtonType_Embed)->setText(UIVMLogViewerWidget::tr("Embed")); 104 107 button(ButtonType_Close)->setStatusTip(UIVMLogViewerWidget::tr("Close dialog")); 105 108 button(ButtonType_Help)->setStatusTip(UIVMLogViewerWidget::tr("Show dialog help")); 109 button(ButtonType_Embed)->setStatusTip(UIVMLogViewerWidget::tr("Embed to manager window")); 106 110 button(ButtonType_Close)->setShortcut(Qt::Key_Escape); 107 111 button(ButtonType_Help)->setShortcut(QKeySequence::HelpContents); 108 112 button(ButtonType_Close)->setToolTip(UIVMLogViewerWidget::tr("Close Window (%1)").arg(button(ButtonType_Close)->shortcut().toString())); 109 113 button(ButtonType_Help)->setToolTip(UIVMLogViewerWidget::tr("Show Help (%1)").arg(button(ButtonType_Help)->shortcut().toString())); 114 button(ButtonType_Embed)->setToolTip(UIVMLogViewerWidget::tr("Embed to Manager Window")); 110 115 } 111 116 … … 167 172 } 168 173 174 void UIVMLogViewerDialog::configureButtonBox() 175 { 176 /* General handler for the button being clicked: */ 177 connect(buttonBox(), &QIDialogButtonBox::clicked, 178 this, &UIVMLogViewerDialog::sltHandleButtonBoxClick); 179 180 /* Show/Enable Embed button depending for Manager, not for Runtime: */ 181 button(ButtonType_Embed)->setVisible(m_strMachineName.isEmpty()); 182 button(ButtonType_Embed)->setEnabled(m_strMachineName.isEmpty()); 183 } 184 169 185 void UIVMLogViewerDialog::finalize() 170 186 { … … 216 232 button(ButtonType_Close)->setShortcut(shortcut); 217 233 } 234 235 void UIVMLogViewerDialog::sltHandleButtonBoxClick(QAbstractButton *pButton) 236 { 237 /* Disable all buttons first of all: */ 238 button(ButtonType_Embed)->setEnabled(false); 239 240 /* Compare with known buttons: */ 241 if (pButton == button(ButtonType_Embed)) 242 emit sigEmbed(); 243 } -
trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerDialog.h
r102574 r102732 41 41 42 42 /* Forward declarations: */ 43 class QAbstractButton; 43 44 class UIActionPool; 44 45 class UIVirtualMachineItem; … … 103 104 /** Configures central-widget. */ 104 105 virtual void configureCentralWidget() RT_OVERRIDE; 106 /** Configures button-box. */ 107 virtual void configureButtonBox() RT_OVERRIDE; 105 108 /** Perform final preparations. */ 106 109 virtual void finalize() RT_OVERRIDE; … … 123 126 void sltSetCloseButtonShortCut(QKeySequence shortcut); 124 127 128 /** Handles button-box button click. */ 129 void sltHandleButtonBoxClick(QAbstractButton *pButton); 130 125 131 private: 126 132 -
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManager.cpp
r102731 r102732 1081 1081 sltCloseManagerWindow(enmType); 1082 1082 1083 /// @todo add tools which can be embedded .. 1083 /* Open known tool finally: */ 1084 switch (enmType) 1085 { 1086 case UIToolType_Logs: m_pWidget->setToolsTypeMachine(enmType); break; 1087 default: break; 1088 } 1084 1089 } 1085 1090
Note:
See TracChangeset
for help on using the changeset viewer.