VirtualBox

Changeset 57547 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Aug 26, 2015 11:04:28 AM (9 years ago)
Author:
vboxsync
Message:

FE/Qt: 7958: Adding yet another host-screen related wrapper to VBoxGlobal. Will be reused in other places.

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

Legend:

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

    r57540 r57547  
    340340#endif /* Q_WS_MAC */
    341341
     342int VBoxGlobal::screenCount() const
     343{
     344    /* Redirect call to QDesktopWidget: */
     345    return QApplication::desktop()->screenCount();
     346}
     347
    342348const QRect VBoxGlobal::screenGeometry(int iHostScreenIndex /* = -1 */) const
    343349{
     
    366372}
    367373
    368 const QRect     VBoxGlobal::screenGeometry(QWidget *pWidget /* = 0 */) const
    369 {
    370     /* Redirect to existing wrapper: */
     374const QRect VBoxGlobal::screenGeometry(QWidget *pWidget /* = 0 */) const
     375{
     376    /* Redirect call to existing wrapper: */
    371377    return screenGeometry(QApplication::desktop()->screenNumber(pWidget));
    372378}
    373379
    374 const QRect     VBoxGlobal::availableGeometry(QWidget *pWidget /* = 0 */) const
    375 {
    376     /* Redirect to existing wrapper: */
     380const QRect VBoxGlobal::availableGeometry(QWidget *pWidget /* = 0 */) const
     381{
     382    /* Redirect call to existing wrapper: */
    377383    return availableGeometry(QApplication::desktop()->screenNumber(pWidget));
    378384}
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.h

    r57540 r57547  
    142142    /** @name Host-screen geometry stuff
    143143      * @{ */
     144        /** Returns the number of host-screens currently available on the system. */
     145        int screenCount() const;
     146
    144147        /** Returns the geometry of the host-screen with @a iHostScreenIndex.
    145148          * @note The default screen is used if @a iHostScreenIndex is -1. */
    146         const QRect     screenGeometry(int iHostScreenIndex = -1) const;
     149        const QRect screenGeometry(int iHostScreenIndex = -1) const;
    147150        /** Returns the available-geometry of the host-screen with @a iHostScreenIndex.
    148151          * @note The default screen is used if @a iHostScreenIndex is -1. */
    149         const QRect     availableGeometry(int iHostScreenIndex = -1) const;
     152        const QRect availableGeometry(int iHostScreenIndex = -1) const;
    150153
    151154        /** Returns the geometry of the host-screen which contains @a pWidget.
    152155          * @note The default screen is used if @a pWidget is 0. */
    153         const QRect     screenGeometry(QWidget *pWidget = 0) const;
     156        const QRect screenGeometry(QWidget *pWidget = 0) const;
    154157        /** Returns the available-geometry of the host-screen which contains @a pWidget.
    155158          * @note The default screen is used if @a pWidget is 0. */
    156         const QRect     availableGeometry(QWidget *pWidget = 0) const;
     159        const QRect availableGeometry(QWidget *pWidget = 0) const;
    157160    /** @} */
    158161
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