Changeset 100921 in vbox for trunk/src/VBox
- Timestamp:
- Aug 21, 2023 12:59:21 PM (19 months ago)
- svn:sync-xref-src-repo-rev:
- 158858
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/logviewer
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerPanel.cpp
r100919 r100921 37 37 #include "UIVMLogViewerWidget.h" 38 38 #include "UIVMLogViewerSearchPanel.h" 39 #include "UIVMLogViewerFilterPanel.h" 39 40 #ifdef VBOX_WS_MAC 40 41 # include "VBoxUtils-darwin.h" … … 43 44 UIVMLogViewerPanelNew::UIVMLogViewerPanelNew(QWidget *pParent, UIVMLogViewerWidget *pViewer) 44 45 : QIWithRetranslateUI<UIDialogPanelBase>(pParent) 46 , m_pViewer(pViewer) 45 47 , m_pSearchWidget(0) 46 , m_p Viewer(pViewer)48 , m_pFilterWidget(0) 47 49 { 48 50 prepare(); … … 51 53 void UIVMLogViewerPanelNew::prepare() 52 54 { 55 /* Search tab: */ 53 56 m_pSearchWidget = new UIVMLogViewerSearchPanel(0, m_pViewer); 54 insertTab( 0, m_pSearchWidget);57 insertTab(Page_Search, m_pSearchWidget); 55 58 56 59 connect(m_pSearchWidget, &UIVMLogViewerSearchPanel::sigHighlightingUpdated, … … 58 61 connect(m_pSearchWidget, &UIVMLogViewerSearchPanel::sigSearchUpdated, 59 62 this, &UIVMLogViewerPanelNew::sigSearchUpdated); 63 64 /* Filter tab: */ 65 m_pSearchWidget = new UIVMLogViewerSearchPanel(0, m_pViewer); 66 insertTab(Page_Filter, m_pSearchWidget); 67 68 connect(m_pFilterWidget, &UIVMLogViewerFilterPanel::sigFilterApplied, 69 this, &UIVMLogViewerPanelNew::sigFilterApplied); 60 70 61 71 retranslateUi(); … … 82 92 } 83 93 94 void UIVMLogViewerPanelNew::applyFilter() 95 { 96 if (m_pFilterWidget) 97 m_pFilterWidget->applyFilter(); 98 } 99 84 100 void UIVMLogViewerPanelNew::retranslateUi() 85 101 { 86 setTabText(0, "Find"); 102 setTabText(Page_Search, "Find"); 103 setTabText(Page_Filter, "Filter"); 87 104 } 88 105 -
trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerPanel.h
r100920 r100921 40 40 class UIVMLogViewerWidget; 41 41 class UIVMLogViewerSearchPanel; 42 class UIVMLogViewerFilterPanel; 42 43 43 44 class UIVMLogViewerPanelNew : public QIWithRetranslateUI<UIDialogPanelBase> … … 49 50 void sigHighlightingUpdated(); 50 51 void sigSearchUpdated(); 52 void sigFilterApplied(); 51 53 52 54 public: … … 62 64 /** @} */ 63 65 66 /** @name Filter page pass through functions 67 * @{ */ 68 void applyFilter(); 69 /** @} */ 70 71 64 72 enum Page 65 73 { … … 69 77 Page_Preferences, 70 78 Page_Max 71 } 72 ; 79 }; 80 73 81 protected: 74 82 … … 80 88 void prepare() override; 81 89 90 UIVMLogViewerWidget *m_pViewer; 91 82 92 UIVMLogViewerSearchPanel *m_pSearchWidget; 83 UIVMLogViewer Widget *m_pViewer;93 UIVMLogViewerFilterPanel *m_pFilterWidget; 84 94 }; 85 95 -
trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerWidget.cpp
r100919 r100921 60 60 #include "UIVMLogViewerWidget.h" 61 61 #include "UIVMLogViewerBookmarksPanel.h" 62 #include "UIVMLogViewerFilterPanel.h"63 62 #include "UIVMLogViewerOptionsPanel.h" 64 63 … … 213 212 , m_fIsPolished(false) 214 213 , m_pTabWidget(0) 215 , m_pFilterPanel(0)216 214 , m_pBookmarksPanel(0) 217 215 , m_pOptionsPanel(0) … … 429 427 430 428 /* Re-Apply the filter settings: */ 431 if (m_p FilterPanel)432 m_p FilterPanel->applyFilter();429 if (m_pPanel) 430 m_pPanel->applyFilter(); 433 431 } 434 432 … … 445 443 446 444 /* re-Apply the filter settings: */ 447 if (m_p FilterPanel)448 m_p FilterPanel->applyFilter();445 if (m_pPanel) 446 m_pPanel->applyFilter(); 449 447 450 448 m_pTabWidget->blockSignals(false); … … 553 551 /* Dont refresh the search here as it is refreshed by the filtering mechanism 554 552 which is updated as tab current index changes (see sltFilterApplied): */ 555 if (m_p FilterPanel)556 m_p FilterPanel->applyFilter();553 if (m_pPanel) 554 m_pPanel->applyFilter(); 557 555 558 556 /* We keep a separate QVector<LogBookmark> for each log page: */ … … 758 756 759 757 /* Create VM Log-Viewer filter-panel: */ 760 m_pFilterPanel = new UIVMLogViewerFilterPanel(0, this); 761 if (m_pFilterPanel) 762 { 763 /* Configure panel: */ 764 //installEventFilter(m_pFilterPanel); 765 m_pFilterPanel->hide(); 766 connect(m_pFilterPanel, &UIVMLogViewerFilterPanel::sigFilterApplied, 767 this, &UIVMLogViewerWidget::sltFilterApplied); 768 769 /* Add into layout: */ 770 m_pMainLayout->addWidget(m_pFilterPanel); 771 } 758 // m_pFilterPanel = new UIVMLogViewerFilterPanel(0, this); 759 // if (m_pFilterPanel) 760 // { 761 // /* Configure panel: */ 762 // //installEventFilter(m_pFilterPanel); 763 // m_pFilterPanel->hide(); 764 765 // /* Add into layout: */ 766 // m_pMainLayout->addWidget(m_pFilterPanel); 767 // } 772 768 773 769 /* Create VM Log-Viewer bookmarks-panel: */ … … 813 809 connect(m_pPanel, &UIVMLogViewerPanelNew::sigSearchUpdated, 814 810 this, &UIVMLogViewerWidget::sltHandleSearchUpdated); 811 connect(m_pPanel, &UIVMLogViewerPanelNew::sigFilterApplied, 812 this, &UIVMLogViewerWidget::sltFilterApplied); 815 813 816 814 m_pMainLayout->addWidget(m_pPanel); -
trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerWidget.h
r100918 r100921 227 227 /** @name Panel instances and a QMap for mapping panel instances to related actions. 228 228 * @{ */ 229 UIVMLogViewerFilterPanel *m_pFilterPanel;230 229 UIVMLogViewerBookmarksPanel *m_pBookmarksPanel; 231 230 UIVMLogViewerOptionsPanel *m_pOptionsPanel;
Note:
See TracChangeset
for help on using the changeset viewer.