VirtualBox

Changeset 50492 in vbox


Ignore:
Timestamp:
Feb 18, 2014 1:25:22 PM (11 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
92333
Message:

FE/Qt: Mac OS X: 7016: Runtime UI: Integration part for native notification framework (r92332).

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineWindow.cpp

    r50060 r50492  
    528528}
    529529
     530void UIMachineWindow::handleNativeNotification(const QString &strNativeNotificationName, QWidget *pWidget)
     531{
     532    /* Redirect arrived notification: */
     533    LogRel(("UIMachineWindow::handleNativeNotification: Notification '%s' received.\n",
     534            strNativeNotificationName.toAscii().constData()));
     535    if (UIMachineWindow *pMachineWindow = qobject_cast<UIMachineWindow*>(pWidget))
     536    {
     537        LogRel(("UIMachineWindow::handleNativeNotification: Redirecting '%s' notification to corresponding machine-window...\n",
     538                strNativeNotificationName.toAscii().constData()));
     539        pMachineWindow->handleNativeNotification(strNativeNotificationName);
     540    }
     541}
     542
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineWindow.h

    r49177 r50492  
    9494    void closeEvent(QCloseEvent *pEvent);
    9595
     96#ifdef Q_WS_MAC
     97    /** Mac OS X: Handles native notifications.
     98      * @param  strNativeNotificationName  Native notification name. */
     99    virtual void handleNativeNotification(const QString & /* strNativeNotificationName */) {}
     100#endif /* Q_WS_MAC */
     101
    96102    /* Prepare helpers: */
    97103    virtual void prepareSessionConnections();
     
    129135    static Qt::Alignment viewAlignment(UIVisualStateType visualStateType);
    130136
     137#ifdef Q_WS_MAC
     138    /** Mac OS X: Handles native notifications.
     139      * @param  strNativeNotificationName  Native notification name.
     140      * @param  pWidget                    Widget, notification related to. */
     141    static void handleNativeNotification(const QString &strNativeNotificationName, QWidget *pWidget);
     142#endif /* Q_WS_MAC */
     143
    131144    /* Variables: */
    132145    UIMachineLogic *m_pMachineLogic;
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