VirtualBox

Changeset 63040 in vbox for trunk/src


Ignore:
Timestamp:
Aug 5, 2016 12:31:29 PM (9 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:8422: Desktop-widget watchdog rework (part 09): Extend interface with corresponding signals.

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIDesktopWidgetWatchdog.cpp

    r63003 r63040  
    166166    updateHostScreenConfiguration(cHostScreenCount);
    167167# endif /* VBOX_WS_X11 */
     168
     169    /* Notify listeners: */
     170    emit sigHostScreenCountChanged(cHostScreenCount);
    168171#endif /* QT_VERSION < 0x050000 */
    169172}
     
    180183    updateHostScreenConfiguration();
    181184# endif /* VBOX_WS_X11 */
     185
     186    /* Notify listeners: */
     187    emit sigHostScreenCountChanged(screenCount());
    182188#endif /* QT_VERSION >= 0x050000 */
    183189}
     
    194200    updateHostScreenConfiguration();
    195201# endif /* VBOX_WS_X11 */
     202
     203    /* Notify listeners: */
     204    emit sigHostScreenCountChanged(screenCount());
    196205#endif /* QT_VERSION >= 0x050000 */
    197206}
     
    200209{
    201210//    printf("UIDesktopWidgetWatchdog::sltHandleHostScreenResized(%d)\n", iHostScreenIndex);
    202 
    203     Q_UNUSED(iHostScreenIndex);
    204211
    205212#ifdef VBOX_WS_X11
     
    207214    updateHostScreenAvailableGeometry(iHostScreenIndex);
    208215#endif /* VBOX_WS_X11 */
     216
     217    /* Notify listeners: */
     218    emit sigHostScreenResized(iHostScreenIndex);
     219}
     220
     221void UIDesktopWidgetWatchdog::sltHandleHostScreenWorkAreaResized(int iHostScreenIndex)
     222{
     223//    printf("UIDesktopWidgetWatchdog::sltHandleHostScreenWorkAreaResized(%d)\n", iHostScreenIndex);
     224
     225    /* Notify listeners: */
     226    emit sigHostScreenWorkAreaResized(iHostScreenIndex);
    209227}
    210228
     
    222240    m_availableGeometryWorkers.value(iHostScreenIndex)->deleteLater();
    223241    m_availableGeometryWorkers[iHostScreenIndex] = 0;
     242
     243    /* Notify listeners: */
     244    emit sigHostScreenWorkAreaResized(iHostScreenIndex);
    224245}
    225246#endif /* VBOX_WS_X11 */
     
    232253    connect(qApp, SIGNAL(screenRemoved(QScreen *)), this, SLOT(sltHostScreenRemoved(QScreen *)));
    233254    connect(QApplication::desktop(), SIGNAL(resized(int)), this, SLOT(sltHandleHostScreenResized(int)));
     255    connect(QApplication::desktop(), SIGNAL(workAreaResized(int)), this, SLOT(sltHandleHostScreenWorkAreaResized(int)));
    234256
    235257#ifdef VBOX_WS_X11
     
    246268    disconnect(qApp, SIGNAL(screenRemoved(QScreen *)), this, SLOT(sltHostScreenRemoved(QScreen *)));
    247269    disconnect(QApplication::desktop(), SIGNAL(resized(int)), this, SLOT(sltHandleHostScreenResized(int)));
     270    disconnect(QApplication::desktop(), SIGNAL(workAreaResized(int)), this, SLOT(sltHandleHostScreenWorkAreaResized(int)));
    248271
    249272#ifdef VBOX_WS_X11
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIDesktopWidgetWatchdog.h

    r63003 r63040  
    3838    Q_OBJECT;
    3939
     40signals:
     41
     42    /** Notifies about host-screen count change to @a cHostScreenCount. */
     43    void sigHostScreenCountChanged(int cHostScreenCount);
     44
     45    /** Notifies about resize for the host-screen with @a iHostScreenIndex. */
     46    void sigHostScreenResized(int iHostScreenIndex);
     47
     48    /** Notifies about work-area resize for the host-screen with @a iHostScreenIndex. */
     49    void sigHostScreenWorkAreaResized(int iHostScreenIndex);
     50
    4051public:
    4152
     
    6677    /** Handles resize for the host-screen with @a iHostScreenIndex. */
    6778    void sltHandleHostScreenResized(int iHostScreenIndex);
     79
     80    /** Handles work-area resize for the host-screen with @a iHostScreenIndex. */
     81    void sltHandleHostScreenWorkAreaResized(int iHostScreenIndex);
    6882
    6983#ifdef VBOX_WS_X11
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