VirtualBox

Changeset 100921 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Aug 21, 2023 12:59:21 PM (19 months ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
158858
Message:

FE/Qt: bugref:10496, bugref:9072. Refactoring filter panel. not complete.

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  
    3737#include "UIVMLogViewerWidget.h"
    3838#include "UIVMLogViewerSearchPanel.h"
     39#include "UIVMLogViewerFilterPanel.h"
    3940#ifdef VBOX_WS_MAC
    4041# include "VBoxUtils-darwin.h"
     
    4344UIVMLogViewerPanelNew::UIVMLogViewerPanelNew(QWidget *pParent, UIVMLogViewerWidget *pViewer)
    4445    : QIWithRetranslateUI<UIDialogPanelBase>(pParent)
     46    , m_pViewer(pViewer)
    4547    , m_pSearchWidget(0)
    46     , m_pViewer(pViewer)
     48    , m_pFilterWidget(0)
    4749{
    4850    prepare();
     
    5153void UIVMLogViewerPanelNew::prepare()
    5254{
     55    /* Search tab: */
    5356    m_pSearchWidget = new UIVMLogViewerSearchPanel(0, m_pViewer);
    54     insertTab(0, m_pSearchWidget);
     57    insertTab(Page_Search, m_pSearchWidget);
    5558
    5659    connect(m_pSearchWidget, &UIVMLogViewerSearchPanel::sigHighlightingUpdated,
     
    5861    connect(m_pSearchWidget, &UIVMLogViewerSearchPanel::sigSearchUpdated,
    5962            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);
    6070
    6171    retranslateUi();
     
    8292}
    8393
     94void UIVMLogViewerPanelNew::applyFilter()
     95{
     96    if (m_pFilterWidget)
     97        m_pFilterWidget->applyFilter();
     98}
     99
    84100void UIVMLogViewerPanelNew::retranslateUi()
    85101{
    86     setTabText(0, "Find");
     102    setTabText(Page_Search, "Find");
     103    setTabText(Page_Filter, "Filter");
    87104}
    88105
  • trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerPanel.h

    r100920 r100921  
    4040class UIVMLogViewerWidget;
    4141class UIVMLogViewerSearchPanel;
     42class UIVMLogViewerFilterPanel;
    4243
    4344class UIVMLogViewerPanelNew : public QIWithRetranslateUI<UIDialogPanelBase>
     
    4950    void sigHighlightingUpdated();
    5051    void sigSearchUpdated();
     52    void sigFilterApplied();
    5153
    5254public:
     
    6264    /** @} */
    6365
     66    /** @name Filter page pass through functions
     67      * @{ */
     68        void applyFilter();
     69    /** @} */
     70
     71
    6472    enum Page
    6573    {
     
    6977        Page_Preferences,
    7078        Page_Max
    71     }
    72         ;
     79    };
     80
    7381protected:
    7482
     
    8088    void prepare() override;
    8189
     90    UIVMLogViewerWidget *m_pViewer;
     91
    8292    UIVMLogViewerSearchPanel *m_pSearchWidget;
    83     UIVMLogViewerWidget *m_pViewer;
     93    UIVMLogViewerFilterPanel *m_pFilterWidget;
    8494};
    8595
  • trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerWidget.cpp

    r100919 r100921  
    6060#include "UIVMLogViewerWidget.h"
    6161#include "UIVMLogViewerBookmarksPanel.h"
    62 #include "UIVMLogViewerFilterPanel.h"
    6362#include "UIVMLogViewerOptionsPanel.h"
    6463
     
    213212    , m_fIsPolished(false)
    214213    , m_pTabWidget(0)
    215     , m_pFilterPanel(0)
    216214    , m_pBookmarksPanel(0)
    217215    , m_pOptionsPanel(0)
     
    429427
    430428    /* Re-Apply the filter settings: */
    431     if (m_pFilterPanel)
    432         m_pFilterPanel->applyFilter();
     429    if (m_pPanel)
     430        m_pPanel->applyFilter();
    433431}
    434432
     
    445443
    446444    /* re-Apply the filter settings: */
    447     if (m_pFilterPanel)
    448         m_pFilterPanel->applyFilter();
     445    if (m_pPanel)
     446        m_pPanel->applyFilter();
    449447
    450448    m_pTabWidget->blockSignals(false);
     
    553551    /* Dont refresh the search here as it is refreshed by the filtering mechanism
    554552       which is updated as tab current index changes (see sltFilterApplied): */
    555     if (m_pFilterPanel)
    556         m_pFilterPanel->applyFilter();
     553    if (m_pPanel)
     554        m_pPanel->applyFilter();
    557555
    558556    /* We keep a separate QVector<LogBookmark> for each log page: */
     
    758756
    759757    /* 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    // }
    772768
    773769    /* Create VM Log-Viewer bookmarks-panel: */
     
    813809    connect(m_pPanel, &UIVMLogViewerPanelNew::sigSearchUpdated,
    814810            this, &UIVMLogViewerWidget::sltHandleSearchUpdated);
     811    connect(m_pPanel, &UIVMLogViewerPanelNew::sigFilterApplied,
     812            this, &UIVMLogViewerWidget::sltFilterApplied);
    815813
    816814    m_pMainLayout->addWidget(m_pPanel);
  • trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerWidget.h

    r100918 r100921  
    227227    /** @name Panel instances and a QMap for mapping panel instances to related actions.
    228228      * @{ */
    229         UIVMLogViewerFilterPanel    *m_pFilterPanel;
    230229        UIVMLogViewerBookmarksPanel *m_pBookmarksPanel;
    231230        UIVMLogViewerOptionsPanel   *m_pOptionsPanel;
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette