VirtualBox

Changeset 88634 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Apr 21, 2021 1:14:44 PM (4 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:9930. Adding a corner widget to logviewer

Location:
trunk/src/VBox/Frontends/VirtualBox/src/logviewer
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerWidget.cpp

    r88018 r88634  
    4545#include "UIVMLogViewerOptionsPanel.h"
    4646#include "QIToolBar.h"
     47#include "QIToolButton.h"
    4748#include "UICommon.h"
    4849
     
    7374    , m_bWrapLines(false)
    7475    , m_font(QFontDatabase::systemFont(QFontDatabase::FixedFont))
     76    , m_pCornerButton(0)
     77    , m_pMachineSelectionMenu(0)
    7578{
    7679    /* Prepare VM Log-Viewer: */
     
    492495            /* Add into layout: */
    493496            m_pMainLayout->addWidget(m_pTabWidget);
     497            m_pCornerButton = new QIToolButton(m_pTabWidget);
     498            if (m_pCornerButton)
     499            {
     500                m_pTabWidget->setCornerWidget(m_pCornerButton, Qt::TopLeftCorner);
     501                m_pCornerButton->setIcon(UIIconPool::iconSet(":/machine_16px.png"));
     502                m_pMachineSelectionMenu = new QMenu(this);
     503                m_pCornerButton->setMenu(m_pMachineSelectionMenu);
     504            }
    494505        }
    495506
  • trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerWidget.h

    r88018 r88634  
    4343class UIDialogPanel;
    4444class QIToolBar;
     45class QIToolButton;
    4546class UIVMLogPage;
    4647class UIVMLogViewerBookmarksPanel;
     
    236237        QFont m_font;
    237238    /** @} */
     239    QIToolButton *m_pCornerButton;
     240    QMenu *m_pMachineSelectionMenu;
    238241    friend class UIVMLogViewerFilterPanel;
    239242    friend class UIVMLogViewerPanel;
Note: See TracChangeset for help on using the changeset viewer.

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