- Timestamp:
- Aug 21, 2023 5:17:31 AM (20 months ago)
- svn:sync-xref-src-repo-rev:
- 158852
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/logviewer
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerBookmarksPanel.cpp
r98844 r100915 51 51 , m_pPreviousButton(0) 52 52 { 53 prepare(); 53 prepareWidgets(); 54 prepareConnections(); 54 55 } 55 56 … … 91 92 } 92 93 93 QString UIVMLogViewerBookmarksPanel::panelName() const94 {95 return "BookmarksPanel";96 }97 98 94 void UIVMLogViewerBookmarksPanel::setBookmarkIndex(int index) 99 95 { … … 112 108 void UIVMLogViewerBookmarksPanel::prepareWidgets() 113 109 { 114 if (!mainLayout()) 115 return; 110 QHBoxLayout *pMainLayout = new QHBoxLayout(this); 116 111 117 112 /* Create bookmark combo/button layout: */ … … 196 191 } 197 192 198 mainLayout()->addLayout(pComboButtonLayout);193 pMainLayout->addLayout(pComboButtonLayout); 199 194 } 200 195 } -
trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerBookmarksPanel.h
r98103 r100915 60 60 /** Disable/enable all the widget except the close button */ 61 61 void disableEnableBookmarking(bool flag); 62 virtual QString panelName() const RT_OVERRIDE;63 62 64 63 signals: -
trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerFilterPanel.cpp
r100108 r100915 272 272 , m_iUnfilteredLineCount(0) 273 273 , m_iFilteredLineCount(0) 274 { 275 prepare(); 276 } 277 278 QString UIVMLogViewerFilterPanel::panelName() const 279 { 280 return "FilterPanel"; 274 , m_pMainLayout(0) 275 { 276 prepareWidgets(); 277 prepareConnections(); 281 278 } 282 279 … … 434 431 void UIVMLogViewerFilterPanel::prepareWidgets() 435 432 { 436 if (!mainLayout())437 return;433 m_pMainLayout = new QHBoxLayout; 434 AssertReturnVoid(m_pMainLayout); 438 435 439 436 prepareRadioButtonGroup(); … … 472 469 } 473 470 474 m ainLayout()->addLayout(pComboButtonLayout, 1);471 m_pMainLayout->addLayout(pComboButtonLayout, 1); 475 472 } 476 473 … … 480 477 { 481 478 m_pFilterTermsLineEdit->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed); 482 m ainLayout()->addWidget(m_pFilterTermsLineEdit, 3);479 m_pMainLayout->addWidget(m_pFilterTermsLineEdit, 3); 483 480 } 484 481 … … 488 485 { 489 486 m_pResultLabel->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum); 490 m ainLayout()->addWidget(m_pResultLabel, 0);487 m_pMainLayout->addWidget(m_pResultLabel, 0); 491 488 } 492 489 } … … 548 545 549 546 /* Add into layout: */ 550 m ainLayout()->addWidget(m_pRadioButtonContainer);547 m_pMainLayout->addWidget(m_pRadioButtonContainer); 551 548 } 552 549 -
trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerFilterPanel.h
r98103 r100915 65 65 * @param pViewer Specifies reference to the VM Log-Viewer this filter-panel belongs to. */ 66 66 UIVMLogViewerFilterPanel(QWidget *pParent, UIVMLogViewerWidget *pViewer); 67 virtual QString panelName() const RT_OVERRIDE;68 67 69 68 public slots: … … 121 120 int m_iUnfilteredLineCount; 122 121 int m_iFilteredLineCount; 122 QHBoxLayout *m_pMainLayout; 123 123 }; 124 124 -
trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerOptionsPanel.cpp
r98844 r100915 51 51 , m_iDefaultFontSize(9) 52 52 { 53 prepare(); 53 prepareWidgets(); 54 prepareConnections(); 54 55 } 55 56 … … 81 82 } 82 83 83 QString UIVMLogViewerOptionsPanel::panelName() const84 {85 return "OptionsPanel";86 }87 88 84 void UIVMLogViewerOptionsPanel::prepareWidgets() 89 85 { 90 if (!mainLayout()) 91 return; 86 QHBoxLayout *pMainLayout = new QHBoxLayout(this); 92 87 93 88 /* Create line-number check-box: */ … … 96 91 { 97 92 m_pLineNumberCheckBox->setChecked(true); 98 mainLayout()->addWidget(m_pLineNumberCheckBox, 0, Qt::AlignLeft);93 pMainLayout->addWidget(m_pLineNumberCheckBox, 0, Qt::AlignLeft); 99 94 } 100 95 … … 104 99 { 105 100 m_pWrapLinesCheckBox->setChecked(false); 106 mainLayout()->addWidget(m_pWrapLinesCheckBox, 0, Qt::AlignLeft);101 pMainLayout->addWidget(m_pWrapLinesCheckBox, 0, Qt::AlignLeft); 107 102 } 108 103 … … 111 106 if (m_pFontSizeSpinBox) 112 107 { 113 mainLayout()->addWidget(m_pFontSizeSpinBox, 0, Qt::AlignLeft);108 pMainLayout->addWidget(m_pFontSizeSpinBox, 0, Qt::AlignLeft); 114 109 m_pFontSizeSpinBox->setValue(m_iDefaultFontSize); 115 110 m_pFontSizeSpinBox->setMaximum(44); … … 121 116 if (m_pFontSizeLabel) 122 117 { 123 mainLayout()->addWidget(m_pFontSizeLabel, 0, Qt::AlignLeft);118 pMainLayout->addWidget(m_pFontSizeLabel, 0, Qt::AlignLeft); 124 119 if (m_pFontSizeSpinBox) 125 120 m_pFontSizeLabel->setBuddy(m_pFontSizeSpinBox); … … 149 144 } 150 145 151 mainLayout()->addLayout(pButtonLayout);146 pMainLayout->addLayout(pButtonLayout); 152 147 } 153 148 154 mainLayout()->addStretch(2);149 pMainLayout->addStretch(2); 155 150 } 156 151 -
trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerOptionsPanel.h
r98103 r100915 62 62 void setWrapLines(bool bWrapLines); 63 63 void setFontSizeInPoints(int fontSizeInPoints); 64 virtual QString panelName() const RT_OVERRIDE;65 64 66 65 public slots: … … 69 68 protected: 70 69 71 virtual void prepareWidgets() RT_OVERRIDE;72 virtual void prepareConnections() RT_OVERRIDE;70 virtual void prepareWidgets(); 71 virtual void prepareConnections(); 73 72 74 73 /** Handles the translation event. */ -
trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerPanel.cpp
r98844 r100915 29 29 #include <QHBoxLayout> 30 30 #include <QPlainTextEdit> 31 #include <QPushButton> 31 32 32 33 /* GUI includes: */ … … 35 36 #include "UIVMLogViewerPanel.h" 36 37 #include "UIVMLogViewerWidget.h" 38 #include "UIVMLogViewerSearchPanel.h" 37 39 #ifdef VBOX_WS_MAC 38 40 # include "VBoxUtils-darwin.h" 39 41 #endif 40 42 43 UIVMLogViewerPanelNew::UIVMLogViewerPanelNew(QWidget *pParent, UIVMLogViewerWidget *pViewer) 44 : QIWithRetranslateUI<UIDialogPanelBase>(pParent) 45 , m_pSearchWidget(0) 46 , m_pViewer(pViewer) 47 { 48 prepare(); 49 } 50 51 void UIVMLogViewerPanelNew::prepare() 52 { 53 prepareSearchTab(); 54 retranslateUi(); 55 } 56 57 void UIVMLogViewerPanelNew::prepareSearchTab() 58 { 59 //insertTab(0, new QPushButton("asdasda")); 60 m_pSearchWidget = new UIVMLogViewerSearchPanel(0, m_pViewer); 61 insertTab(0, m_pSearchWidget); 62 } 63 64 void UIVMLogViewerPanelNew::retranslateUi() 65 { 66 setTabText(0, "Find"); 67 } 68 69 70 /********************************************************************************************************************************* 71 * UIVMLogViewerPanel implementation. * 72 *********************************************************************************************************************************/ 41 73 42 74 UIVMLogViewerPanel::UIVMLogViewerPanel(QWidget *pParent, UIVMLogViewerWidget *pViewer) 43 : UIDialogPanel(pParent)75 : QIWithRetranslateUI<QWidget>(pParent) 44 76 , m_pViewer(pViewer) 45 77 { -
trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerPanel.h
r98844 r100915 39 39 class QTextDocument; 40 40 class UIVMLogViewerWidget; 41 class UIVMLogViewerSearchPanel; 41 42 43 class UIVMLogViewerPanelNew : public QIWithRetranslateUI<UIDialogPanelBase> 44 { 45 Q_OBJECT; 46 47 public: 48 49 UIVMLogViewerPanelNew(QWidget *pParent, UIVMLogViewerWidget *pViewer); 50 51 private: 52 53 void retranslateUi() override; 54 void prepare(); 55 void prepareSearchTab(); 56 57 UIVMLogViewerSearchPanel *m_pSearchWidget; 58 UIVMLogViewerWidget *m_pViewer; 59 60 }; 42 61 43 62 /** UIDialonPanel extension acting as the base class for UIVMLogViewerXXXPanel widgets. */ 44 class UIVMLogViewerPanel : public UIDialogPanel63 class UIVMLogViewerPanel : public QIWithRetranslateUI<QWidget> 45 64 { 46 65 Q_OBJECT; … … 53 72 54 73 virtual void retranslateUi() RT_OVERRIDE; 74 75 virtual void prepareWidgets() = 0; 76 virtual void prepareConnections() = 0; 55 77 56 78 /* Access functions for children classes. */ -
trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerSearchPanel.cpp
r98844 r100915 33 33 #endif 34 34 #include <QHBoxLayout> 35 #include <QVBoxLayout> 35 36 #include <QLabel> 36 37 #include <QLineEdit> … … 49 50 #endif 50 51 52 /* Other VBox includes: */ 53 #include <iprt/assert.h> 51 54 52 55 UIVMLogViewerSearchPanel::UIVMLogViewerSearchPanel(QWidget *pParent, UIVMLogViewerWidget *pViewer) … … 60 63 { 61 64 /* Prepare: */ 62 prepare(); 65 prepareWidgets(); 66 prepareConnections(); 67 retranslateUi(); 63 68 } 64 69 … … 87 92 { 88 93 return m_matchLocationVector; 89 }90 91 QString UIVMLogViewerSearchPanel::panelName() const92 {93 return "SearchPanel";94 94 } 95 95 … … 187 187 void UIVMLogViewerSearchPanel::prepareWidgets() 188 188 { 189 if (!mainLayout())190 return;189 QVBoxLayout *pMainLayout = new QVBoxLayout(this); 190 AssertReturnVoid(pMainLayout); 191 191 192 192 /* Create search field layout: */ 193 193 QHBoxLayout *pSearchFieldLayout = new QHBoxLayout; 194 if (pSearchFieldLayout) 195 { 196 pSearchFieldLayout->setContentsMargins(0, 0, 0, 0); 194 AssertReturnVoid(pSearchFieldLayout); 195 pSearchFieldLayout->setContentsMargins(0, 0, 0, 0); 197 196 #ifdef VBOX_WS_MAC 198 197 pSearchFieldLayout->setSpacing(5); 199 198 #else 200 199 pSearchFieldLayout->setSpacing(qApp->style()->pixelMetric(QStyle::PM_LayoutHorizontalSpacing) / 2); 201 200 #endif 202 201 203 /* Create search-editor: */ 204 m_pSearchEditor = new UISearchLineEdit(0 /* parent */); 205 if (m_pSearchEditor) 206 { 207 m_pSearchEditor->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed); 208 pSearchFieldLayout->addWidget(m_pSearchEditor); 209 } 210 211 /* Create search button layout: */ 212 QHBoxLayout *pSearchButtonsLayout = new QHBoxLayout; 213 if (pSearchButtonsLayout) 214 { 215 pSearchButtonsLayout->setContentsMargins(0, 0, 0, 0); 216 pSearchButtonsLayout->setSpacing(0); 217 218 /* Create Previous button: */ 219 m_pPreviousButton = new QIToolButton; 220 if (m_pPreviousButton) 221 { 222 m_pPreviousButton->setIcon(UIIconPool::iconSet(":/log_viewer_search_backward_16px.png")); 223 pSearchButtonsLayout->addWidget(m_pPreviousButton); 224 } 225 226 /* Create Next button: */ 227 m_pNextButton = new QIToolButton; 228 if (m_pNextButton) 229 { 230 m_pNextButton->setIcon(UIIconPool::iconSet(":/log_viewer_search_forward_16px.png")); 231 pSearchButtonsLayout->addWidget(m_pNextButton); 232 } 233 234 pSearchFieldLayout->addLayout(pSearchButtonsLayout); 235 } 236 237 mainLayout()->addLayout(pSearchFieldLayout); 238 } 202 /* Create search-editor: */ 203 m_pSearchEditor = new UISearchLineEdit(0 /* parent */); 204 AssertReturnVoid(m_pSearchEditor); 205 m_pSearchEditor->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed); 206 pSearchFieldLayout->addWidget(m_pSearchEditor); 207 208 /* Create search button layout: */ 209 QHBoxLayout *pSearchButtonsLayout = new QHBoxLayout; 210 AssertReturnVoid(pSearchButtonsLayout); 211 212 pSearchButtonsLayout->setContentsMargins(0, 0, 0, 0); 213 pSearchButtonsLayout->setSpacing(0); 214 215 /* Create Previous button: */ 216 m_pPreviousButton = new QIToolButton; 217 AssertReturnVoid(m_pPreviousButton); 218 m_pPreviousButton->setIcon(UIIconPool::iconSet(":/log_viewer_search_backward_16px.png")); 219 pSearchButtonsLayout->addWidget(m_pPreviousButton); 220 221 /* Create Next button: */ 222 m_pNextButton = new QIToolButton; 223 AssertReturnVoid(m_pNextButton); 224 m_pNextButton->setIcon(UIIconPool::iconSet(":/log_viewer_search_forward_16px.png")); 225 pSearchButtonsLayout->addWidget(m_pNextButton); 226 227 pSearchFieldLayout->addLayout(pSearchButtonsLayout); 228 229 pMainLayout->addLayout(pSearchFieldLayout); 239 230 240 231 /* Create case-sensitive check-box: */ 241 232 m_pCaseSensitiveCheckBox = new QCheckBox; 242 if (m_pCaseSensitiveCheckBox) 243 { 244 mainLayout()->addWidget(m_pCaseSensitiveCheckBox); 245 } 233 AssertReturnVoid(m_pCaseSensitiveCheckBox); 234 pMainLayout->addWidget(m_pCaseSensitiveCheckBox); 246 235 247 236 /* Create whole-word check-box: */ 248 237 m_pMatchWholeWordCheckBox = new QCheckBox; 249 if (m_pMatchWholeWordCheckBox) 250 { 251 setFocusProxy(m_pMatchWholeWordCheckBox); 252 mainLayout()->addWidget(m_pMatchWholeWordCheckBox); 253 } 238 AssertReturnVoid(m_pMatchWholeWordCheckBox); 239 setFocusProxy(m_pMatchWholeWordCheckBox); 240 pMainLayout->addWidget(m_pMatchWholeWordCheckBox); 254 241 255 242 /* Create highlight-all check-box: */ 256 243 m_pHighlightAllCheckBox = new QCheckBox; 257 if (m_pHighlightAllCheckBox)258 {259 mainLayout()->addWidget(m_pHighlightAllCheckBox); 260 }244 AssertReturnVoid(m_pHighlightAllCheckBox); 245 pMainLayout->addWidget(m_pHighlightAllCheckBox); 246 247 pMainLayout->addStretch(1); 261 248 } 262 249 … … 356 343 { 357 344 /* Make sure current log-page is visible: */ 358 emit sigShowPanel(this);345 //emit sigShowPanel(this); 359 346 /* Set focus on search-editor: */ 360 347 m_pSearchEditor->setFocus(); … … 366 353 { 367 354 /* Make sure current log-page is visible: */ 368 emit sigShowPanel(this);355 //emit sigShowPanel(this); 369 356 /* Set focus on search-editor: */ 370 357 m_pSearchEditor->setFocus(); -
trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerSearchPanel.h
r98103 r100915 66 66 void refresh(); 67 67 const QVector<float> &matchLocationVector() const; 68 virtual QString panelName() const RT_OVERRIDE;69 68 /** Returns the number of the matches to the current search. */ 70 69 int matchCount() const; -
trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerWidget.cpp
r98854 r100915 61 61 #include "UIVMLogViewerBookmarksPanel.h" 62 62 #include "UIVMLogViewerFilterPanel.h" 63 #include "UIVMLogViewerSearchPanel.h"64 63 #include "UIVMLogViewerOptionsPanel.h" 65 64 … … 68 67 #include "CMachine.h" 69 68 #include "CSystemProperties.h" 69 70 /* Other VBox includes: */ 71 #include <iprt/assert.h> 70 72 71 73 /** Limit the read string size to avoid bloated log viewer pages. */ … … 211 213 , m_fIsPolished(false) 212 214 , m_pTabWidget(0) 213 , m_pSearchPanel(0)214 215 , m_pFilterPanel(0) 215 216 , m_pBookmarksPanel(0) … … 224 225 , m_fCommitDataSignalReceived(false) 225 226 , m_pPreviousLogPage(0) 227 , m_pPanel(0) 226 228 { 227 229 /* Prepare VM Log-Viewer: */ … … 397 399 void UIVMLogViewerWidget::savePanelVisibility() 398 400 { 399 if (m_fCommitDataSignalReceived)400 return;401 / * Save a list of currently visible panels: */402 QStringList strNameList;403 foreach(UIDialogPanel* pPanel, m_visiblePanelsList)404 strNameList.append(pPanel->panelName());405 gEDataManager->setLogViewerVisiblePanels(strNameList);401 // if (m_fCommitDataSignalReceived) 402 // return; 403 // /* Save a list of currently visible panels: */ 404 // QStringList strNameList; 405 // foreach(UIDialogPanel* pPanel, m_visiblePanelsList) 406 // strNameList.append(pPanel->panelName()); 407 // gEDataManager->setLogViewerVisiblePanels(strNameList); 406 408 } 407 409 … … 422 424 pCurrentPage->setLogContent(strLogContent, false); 423 425 424 if (m_pSearchPanel && m_pSearchPanel->isVisible())425 m_pSearchPanel->refresh();426 // if (m_pSearchPanel && m_pSearchPanel->isVisible()) 427 // m_pSearchPanel->refresh(); 426 428 427 429 /* Re-Apply the filter settings: */ … … 546 548 void UIVMLogViewerWidget::sltSearchResultHighLigting() 547 549 { 548 if (!m_pSearchPanel || !currentLogPage())549 return;550 currentLogPage()->setScrollBarMarkingsVector(m_pSearchPanel->matchLocationVector());550 // if (!m_pSearchPanel || !currentLogPage()) 551 // return; 552 // currentLogPage()->setScrollBarMarkingsVector(m_pSearchPanel->matchLocationVector()); 551 553 } 552 554 553 555 void UIVMLogViewerWidget::sltHandleSearchUpdated() 554 556 { 555 if (!m_pSearchPanel || !currentLogPage())556 return;557 // if (!m_pSearchPanel || !currentLogPage()) 558 // return; 557 559 } 558 560 … … 583 585 { 584 586 /* Reapply the search to get highlighting etc. correctly */ 585 if (m_pSearchPanel)586 m_pSearchPanel->refresh();587 // if (m_pSearchPanel) 588 // m_pSearchPanel->refresh(); 587 589 } 588 590 … … 759 761 /* Create main layout: */ 760 762 m_pMainLayout = new QVBoxLayout(this); 761 if (m_pMainLayout)762 { 763 764 763 AssertReturnVoid(m_pMainLayout); 764 765 /* Configure layout: */ 766 m_pMainLayout->setContentsMargins(0, 0, 0, 0); 765 767 #ifdef VBOX_WS_MAC 766 768 m_pMainLayout->setSpacing(10); 767 769 #else 768 770 m_pMainLayout->setSpacing(qApp->style()->pixelMetric(QStyle::PM_LayoutVerticalSpacing) / 2); 769 771 #endif 770 772 771 /* Prepare toolbar, if requested: */ 772 if (m_fShowToolbar) 773 prepareToolBar(); 774 775 /* Create VM Log-Viewer container: */ 776 m_pTabWidget = new UITabWidget; 777 if (m_pTabWidget) 778 { 779 /* Add into layout: */ 780 m_pMainLayout->addWidget(m_pTabWidget); 781 connect(m_pTabWidget, &QITabWidget::currentChanged, this, &UIVMLogViewerWidget::sltCurrentTabChanged); 782 } 783 784 /* Create VM Log-Viewer search-panel: */ 785 m_pSearchPanel = new UIVMLogViewerSearchPanel(0, this); 786 if (m_pSearchPanel) 787 { 788 /* Configure panel: */ 789 installEventFilter(m_pSearchPanel); 790 m_pSearchPanel->hide(); 791 connect(m_pSearchPanel, &UIVMLogViewerSearchPanel::sigHighlightingUpdated, 792 this, &UIVMLogViewerWidget::sltSearchResultHighLigting); 793 connect(m_pSearchPanel, &UIVMLogViewerSearchPanel::sigSearchUpdated, 794 this, &UIVMLogViewerWidget::sltHandleSearchUpdated); 795 connect(m_pSearchPanel, &UIVMLogViewerSearchPanel::sigHidePanel, 796 this, &UIVMLogViewerWidget::sltHandleHidePanel); 797 connect(m_pSearchPanel, &UIVMLogViewerSearchPanel::sigShowPanel, 798 this, &UIVMLogViewerWidget::sltHandleShowPanel); 799 m_panelActionMap.insert(m_pSearchPanel, m_pActionPool->action(UIActionIndex_M_Log_T_Find)); 800 801 /* Add into layout: */ 802 m_pMainLayout->addWidget(m_pSearchPanel); 803 } 804 805 /* Create VM Log-Viewer filter-panel: */ 806 m_pFilterPanel = new UIVMLogViewerFilterPanel(0, this); 807 if (m_pFilterPanel) 808 { 809 /* Configure panel: */ 810 installEventFilter(m_pFilterPanel); 811 m_pFilterPanel->hide(); 812 connect(m_pFilterPanel, &UIVMLogViewerFilterPanel::sigFilterApplied, 813 this, &UIVMLogViewerWidget::sltFilterApplied); 814 connect(m_pFilterPanel, &UIVMLogViewerFilterPanel::sigHidePanel, 815 this, &UIVMLogViewerWidget::sltHandleHidePanel); 816 connect(m_pFilterPanel, &UIVMLogViewerFilterPanel::sigShowPanel, 817 this, &UIVMLogViewerWidget::sltHandleShowPanel); 818 m_panelActionMap.insert(m_pFilterPanel, m_pActionPool->action(UIActionIndex_M_Log_T_Filter)); 819 820 /* Add into layout: */ 821 m_pMainLayout->addWidget(m_pFilterPanel); 822 } 823 824 /* Create VM Log-Viewer bookmarks-panel: */ 825 m_pBookmarksPanel = new UIVMLogViewerBookmarksPanel(0, this); 826 if (m_pBookmarksPanel) 827 { 828 /* Configure panel: */ 829 m_pBookmarksPanel->hide(); 830 connect(m_pBookmarksPanel, &UIVMLogViewerBookmarksPanel::sigDeleteBookmarkByIndex, 831 this, &UIVMLogViewerWidget::sltDeleteBookmarkByIndex); 832 connect(m_pBookmarksPanel, &UIVMLogViewerBookmarksPanel::sigDeleteAllBookmarks, 833 this, &UIVMLogViewerWidget::sltDeleteAllBookmarks); 834 connect(m_pBookmarksPanel, &UIVMLogViewerBookmarksPanel::sigBookmarkSelected, 835 this, &UIVMLogViewerWidget::gotoBookmark); 836 m_panelActionMap.insert(m_pBookmarksPanel, m_pActionPool->action(UIActionIndex_M_Log_T_Bookmark)); 837 connect(m_pBookmarksPanel, &UIVMLogViewerBookmarksPanel::sigHidePanel, 838 this, &UIVMLogViewerWidget::sltHandleHidePanel); 839 connect(m_pBookmarksPanel, &UIVMLogViewerBookmarksPanel::sigShowPanel, 840 this, &UIVMLogViewerWidget::sltHandleShowPanel); 841 /* Add into layout: */ 842 m_pMainLayout->addWidget(m_pBookmarksPanel); 843 } 844 845 /* Create VM Log-Viewer options-panel: */ 846 m_pOptionsPanel = new UIVMLogViewerOptionsPanel(0, this); 847 if (m_pOptionsPanel) 848 { 849 /* Configure panel: */ 850 m_pOptionsPanel->hide(); 851 m_pOptionsPanel->setShowLineNumbers(m_bShowLineNumbers); 852 m_pOptionsPanel->setWrapLines(m_bWrapLines); 853 m_pOptionsPanel->setFontSizeInPoints(m_font.pointSize()); 854 connect(m_pOptionsPanel, &UIVMLogViewerOptionsPanel::sigShowLineNumbers, this, &UIVMLogViewerWidget::sltShowLineNumbers); 855 connect(m_pOptionsPanel, &UIVMLogViewerOptionsPanel::sigWrapLines, this, &UIVMLogViewerWidget::sltWrapLines); 856 connect(m_pOptionsPanel, &UIVMLogViewerOptionsPanel::sigChangeFontSizeInPoints, this, &UIVMLogViewerWidget::sltFontSizeChanged); 857 connect(m_pOptionsPanel, &UIVMLogViewerOptionsPanel::sigChangeFont, this, &UIVMLogViewerWidget::sltChangeFont); 858 connect(m_pOptionsPanel, &UIVMLogViewerOptionsPanel::sigResetToDefaults, this, &UIVMLogViewerWidget::sltResetOptionsToDefault); 859 connect(m_pOptionsPanel, &UIVMLogViewerOptionsPanel::sigHidePanel, this, &UIVMLogViewerWidget::sltHandleHidePanel); 860 connect(m_pOptionsPanel, &UIVMLogViewerOptionsPanel::sigShowPanel, this, &UIVMLogViewerWidget::sltHandleShowPanel); 861 862 m_panelActionMap.insert(m_pOptionsPanel, m_pActionPool->action(UIActionIndex_M_Log_T_Options)); 863 864 /* Add into layout: */ 865 m_pMainLayout->addWidget(m_pOptionsPanel); 866 } 867 } 773 /* Prepare toolbar, if requested: */ 774 if (m_fShowToolbar) 775 prepareToolBar(); 776 777 /* Create VM Log-Viewer container: */ 778 m_pTabWidget = new UITabWidget; 779 if (m_pTabWidget) 780 { 781 /* Add into layout: */ 782 m_pMainLayout->addWidget(m_pTabWidget); 783 connect(m_pTabWidget, &QITabWidget::currentChanged, this, &UIVMLogViewerWidget::sltCurrentTabChanged); 784 } 785 786 /* Create VM Log-Viewer search-panel: */ 787 // m_pSearchPanel = new UIVMLogViewerSearchPanel(0, this); 788 // if (m_pSearchPanel) 789 // { 790 // /* Configure panel: */ 791 // installEventFilter(m_pSearchPanel); 792 // m_pSearchPanel->hide(); 793 // connect(m_pSearchPanel, &UIVMLogViewerSearchPanel::sigHighlightingUpdated, 794 // this, &UIVMLogViewerWidget::sltSearchResultHighLigting); 795 // connect(m_pSearchPanel, &UIVMLogViewerSearchPanel::sigSearchUpdated, 796 // this, &UIVMLogViewerWidget::sltHandleSearchUpdated); 797 // // connect(m_pSearchPanel, &UIVMLogViewerSearchPanel::sigHidePanel, 798 // // this, &UIVMLogViewerWidget::sltHandleHidePanel); 799 // // connect(m_pSearchPanel, &UIVMLogViewerSearchPanel::sigShowPanel, 800 // // this, &UIVMLogViewerWidget::sltHandleShowPanel); 801 // //m_panelActionMap.insert(m_pSearchPanel, m_pActionPool->action(UIActionIndex_M_Log_T_Find)); 802 803 // /* Add into layout: */ 804 // m_pMainLayout->addWidget(m_pSearchPanel); 805 // } 806 807 /* Create VM Log-Viewer filter-panel: */ 808 m_pFilterPanel = new UIVMLogViewerFilterPanel(0, this); 809 if (m_pFilterPanel) 810 { 811 /* Configure panel: */ 812 installEventFilter(m_pFilterPanel); 813 m_pFilterPanel->hide(); 814 connect(m_pFilterPanel, &UIVMLogViewerFilterPanel::sigFilterApplied, 815 this, &UIVMLogViewerWidget::sltFilterApplied); 816 // connect(m_pFilterPanel, &UIVMLogViewerFilterPanel::sigHidePanel, 817 // this, &UIVMLogViewerWidget::sltHandleHidePanel); 818 // connect(m_pFilterPanel, &UIVMLogViewerFilterPanel::sigShowPanel, 819 // this, &UIVMLogViewerWidget::sltHandleShowPanel); 820 // m_panelActionMap.insert(m_pFilterPanel, m_pActionPool->action(UIActionIndex_M_Log_T_Filter)); 821 822 /* Add into layout: */ 823 m_pMainLayout->addWidget(m_pFilterPanel); 824 } 825 826 /* Create VM Log-Viewer bookmarks-panel: */ 827 m_pBookmarksPanel = new UIVMLogViewerBookmarksPanel(0, this); 828 if (m_pBookmarksPanel) 829 { 830 /* Configure panel: */ 831 m_pBookmarksPanel->hide(); 832 connect(m_pBookmarksPanel, &UIVMLogViewerBookmarksPanel::sigDeleteBookmarkByIndex, 833 this, &UIVMLogViewerWidget::sltDeleteBookmarkByIndex); 834 connect(m_pBookmarksPanel, &UIVMLogViewerBookmarksPanel::sigDeleteAllBookmarks, 835 this, &UIVMLogViewerWidget::sltDeleteAllBookmarks); 836 connect(m_pBookmarksPanel, &UIVMLogViewerBookmarksPanel::sigBookmarkSelected, 837 this, &UIVMLogViewerWidget::gotoBookmark); 838 //m_panelActionMap.insert(m_pBookmarksPanel, m_pActionPool->action(UIActionIndex_M_Log_T_Bookmark)); 839 // connect(m_pBookmarksPanel, &UIVMLogViewerBookmarksPanel::sigHidePanel, 840 // this, &UIVMLogViewerWidget::sltHandleHidePanel); 841 // connect(m_pBookmarksPanel, &UIVMLogViewerBookmarksPanel::sigShowPanel, 842 // this, &UIVMLogViewerWidget::sltHandleShowPanel); 843 /* Add into layout: */ 844 m_pMainLayout->addWidget(m_pBookmarksPanel); 845 } 846 847 /* Create VM Log-Viewer options-panel: */ 848 m_pOptionsPanel = new UIVMLogViewerOptionsPanel(0, this); 849 if (m_pOptionsPanel) 850 { 851 /* Configure panel: */ 852 m_pOptionsPanel->hide(); 853 m_pOptionsPanel->setShowLineNumbers(m_bShowLineNumbers); 854 m_pOptionsPanel->setWrapLines(m_bWrapLines); 855 m_pOptionsPanel->setFontSizeInPoints(m_font.pointSize()); 856 connect(m_pOptionsPanel, &UIVMLogViewerOptionsPanel::sigShowLineNumbers, this, &UIVMLogViewerWidget::sltShowLineNumbers); 857 connect(m_pOptionsPanel, &UIVMLogViewerOptionsPanel::sigWrapLines, this, &UIVMLogViewerWidget::sltWrapLines); 858 connect(m_pOptionsPanel, &UIVMLogViewerOptionsPanel::sigChangeFontSizeInPoints, this, &UIVMLogViewerWidget::sltFontSizeChanged); 859 connect(m_pOptionsPanel, &UIVMLogViewerOptionsPanel::sigChangeFont, this, &UIVMLogViewerWidget::sltChangeFont); 860 connect(m_pOptionsPanel, &UIVMLogViewerOptionsPanel::sigResetToDefaults, this, &UIVMLogViewerWidget::sltResetOptionsToDefault); 861 // connect(m_pOptionsPanel, &UIVMLogViewerOptionsPanel::sigHidePanel, this, &UIVMLogViewerWidget::sltHandleHidePanel); 862 // connect(m_pOptionsPanel, &UIVMLogViewerOptionsPanel::sigShowPanel, this, &UIVMLogViewerWidget::sltHandleShowPanel); 863 864 //m_panelActionMap.insert(m_pOptionsPanel, m_pActionPool->action(UIActionIndex_M_Log_T_Options)); 865 866 /* Add into layout: */ 867 m_pMainLayout->addWidget(m_pOptionsPanel); 868 } 869 870 m_pPanel = new UIVMLogViewerPanelNew(0, this); 871 AssertReturnVoid(m_pPanel); 872 m_pMainLayout->addWidget(m_pPanel); 873 868 874 } 869 875 … … 1044 1050 1045 1051 pLogPage->setLogContent(strLogContent, noLogsToShow); 1046 pLogPage->setScrollBarMarkingsVector(m_pSearchPanel->matchLocationVector());1052 //pLogPage->setScrollBarMarkingsVector(m_pSearchPanel->matchLocationVector()); 1047 1053 } 1048 1054 } -
trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerWidget.h
r98856 r100915 55 55 class UIVMLogTab; 56 56 class UIVMLogViewerBookmarksPanel; 57 class UIVMLogViewerPanelNew; 57 58 class UIVMLogViewerFilterPanel; 58 59 class UIVMLogViewerOptionsPanel; 59 60 class UIVMLogViewerPanel; 60 class UIVMLogViewerSearchPanel;61 61 class CMachine; 62 62 … … 231 231 /** @name Panel instances and a QMap for mapping panel instances to related actions. 232 232 * @{ */ 233 UIVMLogViewerSearchPanel *m_pSearchPanel;234 233 UIVMLogViewerFilterPanel *m_pFilterPanel; 235 234 UIVMLogViewerBookmarksPanel *m_pBookmarksPanel; … … 259 258 bool m_fCommitDataSignalReceived; 260 259 QPointer<UIVMLogPage> m_pPreviousLogPage; 260 UIVMLogViewerPanelNew *m_pPanel; 261 261 262 262 friend class UIVMLogViewerFilterPanel;
Note:
See TracChangeset
for help on using the changeset viewer.