VirtualBox

Changeset 54096 in vbox


Ignore:
Timestamp:
Feb 6, 2015 2:31:11 PM (10 years ago)
Author:
vboxsync
Message:

VBoxDbg: Sync statistics dialog title with the parent VM dialog title.

Location:
trunk/src/VBox/Debugger
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Debugger/VBoxDbgStatsQt4.cpp

    r48564 r54096  
    30323032    : VBoxDbgBaseWindow(a_pDbgGui, pParent), m_PatStr(pszPat), m_pPatCB(NULL), m_uRefreshRate(0), m_pTimer(NULL), m_pView(NULL)
    30333033{
    3034     setWindowTitle("VBoxDbg - Statistics");
     3034    /* Assign window-title: */
     3035    if (parent())
     3036    {
     3037        setWindowTitle(QString("%1 - Statistics").arg(parentWidget()->windowTitle()));
     3038        parent()->installEventFilter(this);
     3039    }
     3040    else
     3041        setWindowTitle("VBoxDbg - Statistics");
    30353042
    30363043    /*
     
    31443151
    31453152
     3153bool VBoxDbgStats::eventFilter(QObject *pWatched, QEvent *pEvent)
     3154{
     3155    /* Skip events which are not related to our parent: */
     3156    if (pWatched != parent())
     3157        return VBoxDbgBaseWindow::eventFilter(pWatched, pEvent);
     3158
     3159    /* Depending on event-type: */
     3160    switch (pEvent->type())
     3161    {
     3162        case QEvent::WindowTitleChange: setWindowTitle(QString("%1 - Statistics").arg(parentWidget()->windowTitle())); break;
     3163        default: break;
     3164    }
     3165
     3166    /* Call to base-class: */
     3167    return VBoxDbgBaseWindow::eventFilter(pWatched, pEvent);
     3168}
     3169
     3170
    31463171void
    31473172VBoxDbgStats::apply(const QString &Str)
  • trunk/src/VBox/Debugger/VBoxDbgStatsQt4.h

    r33540 r54096  
    201201    virtual void closeEvent(QCloseEvent *a_pCloseEvt);
    202202
     203    /**
     204     * Event filter for various purposes.
     205     *
     206     * @param  pWatched         The object event came to.
     207     * @param  pEvent           The event being handled.
     208     */
     209    virtual bool eventFilter(QObject *pWatched, QEvent *pEvent);
     210
    203211protected slots:
    204212    /** Apply the activated combobox pattern. */
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