Changeset 76961 in vbox
- Timestamp:
- Jan 24, 2019 8:28:35 AM (6 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
r76606 r76961 197 197 if (noLogsToShow) 198 198 { 199 for (QMap<UI VMLogViewerPanel*, QAction*>::iterator iterator = m_panelActionMap.begin();199 for (QMap<UIDialogPanel*, QAction*>::iterator iterator = m_panelActionMap.begin(); 200 200 iterator != m_panelActionMap.end(); ++iterator) 201 201 { … … 284 284 if (!pSenderAction) 285 285 return; 286 UI VMLogViewerPanel* pPanel = 0;286 UIDialogPanel* pPanel = 0; 287 287 /* Look for the sender() within the m_panelActionMap's values: */ 288 for (QMap<UI VMLogViewerPanel*, QAction*>::const_iterator iterator = m_panelActionMap.begin();288 for (QMap<UIDialogPanel*, QAction*>::const_iterator iterator = m_panelActionMap.begin(); 289 289 iterator != m_panelActionMap.end(); ++iterator) 290 290 { … … 338 338 if (m_pBookmarksPanel) 339 339 m_pBookmarksPanel->disableEnableBookmarking(!isFiltered); 340 } 341 342 void UIVMLogViewerWidget::sltHandleHidePanel(UIDialogPanel *pPanel) 343 { 344 hidePanel(pPanel); 340 345 } 341 346 … … 489 494 connect(m_pSearchPanel, &UIVMLogViewerSearchPanel::sigHighlightingUpdated, 490 495 this, &UIVMLogViewerWidget::sltSearchResultHighLigting); 496 connect(m_pSearchPanel, &UIVMLogViewerSearchPanel::sigHidePanel, 497 this, &UIVMLogViewerWidget::sltHandleHidePanel); 491 498 m_panelActionMap.insert(m_pSearchPanel, m_pActionPool->action(UIActionIndex_M_Log_T_Find)); 492 499 … … 504 511 connect(m_pFilterPanel, &UIVMLogViewerFilterPanel::sigFilterApplied, 505 512 this, &UIVMLogViewerWidget::sltFilterApplied); 513 connect(m_pFilterPanel, &UIVMLogViewerFilterPanel::sigHidePanel, 514 this, &UIVMLogViewerWidget::sltHandleHidePanel); 506 515 m_panelActionMap.insert(m_pFilterPanel, m_pActionPool->action(UIActionIndex_M_Log_T_Filter)); 507 516 … … 523 532 this, &UIVMLogViewerWidget::gotoBookmark); 524 533 m_panelActionMap.insert(m_pBookmarksPanel, m_pActionPool->action(UIActionIndex_M_Log_T_Bookmark)); 534 connect(m_pBookmarksPanel, &UIVMLogViewerBookmarksPanel::sigHidePanel, 535 this, &UIVMLogViewerWidget::sltHandleHidePanel); 525 536 526 537 /* Add into layout: */ … … 542 553 connect(m_pOptionsPanel, &UIVMLogViewerOptionsPanel::sigChangeFont, this, &UIVMLogViewerWidget::sltChangeFont); 543 554 connect(m_pOptionsPanel, &UIVMLogViewerOptionsPanel::sigResetToDefaults, this, &UIVMLogViewerWidget::sltResetOptionsToDefault); 555 connect(m_pOptionsPanel, &UIVMLogViewerOptionsPanel::sigHidePanel, this, &UIVMLogViewerWidget::sltHandleHidePanel); 556 544 557 m_panelActionMap.insert(m_pOptionsPanel, m_pActionPool->action(UIActionIndex_M_Log_T_Options)); 545 558 … … 805 818 } 806 819 807 void UIVMLogViewerWidget::hidePanel(UIVMLogViewerPanel* panel) 808 { 809 if (panel && panel->isVisible()) 820 void UIVMLogViewerWidget::hidePanel(UIDialogPanel* panel) 821 { 822 if (!panel) 823 return; 824 if (panel->isVisible()) 810 825 panel->setVisible(false); 811 QMap<UI VMLogViewerPanel*, QAction*>::iterator iterator = m_panelActionMap.find(panel);826 QMap<UIDialogPanel*, QAction*>::iterator iterator = m_panelActionMap.find(panel); 812 827 if (iterator != m_panelActionMap.end()) 813 828 { … … 819 834 } 820 835 821 void UIVMLogViewerWidget::showPanel(UI VMLogViewerPanel* panel)836 void UIVMLogViewerWidget::showPanel(UIDialogPanel* panel) 822 837 { 823 838 if (panel && panel->isHidden()) 824 839 panel->setVisible(true); 825 QMap<UI VMLogViewerPanel*, QAction*>::iterator iterator = m_panelActionMap.find(panel);840 QMap<UIDialogPanel*, QAction*>::iterator iterator = m_panelActionMap.find(panel); 826 841 if (iterator != m_panelActionMap.end()) 827 842 { -
trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerWidget.h
r76581 r76961 41 41 class QVBoxLayout; 42 42 class UIActionPool; 43 class UIDialogPanel; 43 44 class UIToolBar; 44 45 class UIVMLogPage; … … 121 122 of UIVMLogPage is changed. */ 122 123 void sltLogPageFilteredChanged(bool isFiltered); 124 void sltHandleHidePanel(UIDialogPanel *pPanel); 123 125 124 126 /** @name Slots to handle signals from settings panel … … 178 180 void resetHighlighthing(); 179 181 180 void hidePanel(UI VMLogViewerPanel* panel);181 void showPanel(UI VMLogViewerPanel* panel);182 void hidePanel(UIDialogPanel* panel); 183 void showPanel(UIDialogPanel* panel); 182 184 183 185 /** Make sure escape key is assigned to only a single widget. This is done by checking … … 211 213 UIVMLogViewerFilterPanel *m_pFilterPanel; 212 214 UIVMLogViewerBookmarksPanel *m_pBookmarksPanel; 213 UIVMLogViewerOptionsPanel *m_pOptionsPanel;214 QMap<UI VMLogViewerPanel*, QAction*> m_panelActionMap;215 QList<UI VMLogViewerPanel*> m_visiblePanelsList;215 UIVMLogViewerOptionsPanel *m_pOptionsPanel; 216 QMap<UIDialogPanel*, QAction*> m_panelActionMap; 217 QList<UIDialogPanel*> m_visiblePanelsList; 216 218 /** @} */ 217 219 QVBoxLayout *m_pMainLayout; … … 230 232 QFont m_font; 231 233 /** @} */ 232 friend class UIVMLogViewerBookmarksPanel;233 234 friend class UIVMLogViewerFilterPanel; 234 friend class UIVMLogViewerSearchPanel;235 friend class UIVMLogViewerOptionsPanel;236 235 friend class UIVMLogViewerPanel; 237 236 friend class UIVMLogViewerDialog;
Note:
See TracChangeset
for help on using the changeset viewer.