Changeset 57590 in vbox for trunk/src/VBox
- Timestamp:
- Sep 1, 2015 2:06:35 PM (10 years ago)
- svn:sync-xref-src-repo-rev:
- 102438
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/globals
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.cpp
r57547 r57590 346 346 } 347 347 348 int VBoxGlobal::screenNumber(const QWidget *pWidget) const 349 { 350 /* Redirect call to QDesktopWidget: */ 351 return QApplication::desktop()->screenNumber(pWidget); 352 } 353 354 int VBoxGlobal::screenNumber(const QPoint &point) const 355 { 356 /* Redirect call to QDesktopWidget: */ 357 return QApplication::desktop()->screenNumber(point); 358 } 359 348 360 const QRect VBoxGlobal::screenGeometry(int iHostScreenIndex /* = -1 */) const 349 361 { … … 372 384 } 373 385 374 const QRect VBoxGlobal::screenGeometry( QWidget *pWidget /* = 0 */) const386 const QRect VBoxGlobal::screenGeometry(const QWidget *pWidget) const 375 387 { 376 388 /* Redirect call to existing wrapper: */ 377 return screenGeometry( QApplication::desktop()->screenNumber(pWidget));378 } 379 380 const QRect VBoxGlobal::availableGeometry( QWidget *pWidget /* = 0 */) const389 return screenGeometry(screenNumber(pWidget)); 390 } 391 392 const QRect VBoxGlobal::availableGeometry(const QWidget *pWidget) const 381 393 { 382 394 /* Redirect call to existing wrapper: */ 383 return availableGeometry(QApplication::desktop()->screenNumber(pWidget)); 395 return availableGeometry(screenNumber(pWidget)); 396 } 397 398 const QRect VBoxGlobal::screenGeometry(const QPoint &point) const 399 { 400 /* Redirect call to existing wrapper: */ 401 return screenGeometry(screenNumber(point)); 402 } 403 404 const QRect VBoxGlobal::availableGeometry(const QPoint &point) const 405 { 406 /* Redirect call to existing wrapper: */ 407 return availableGeometry(screenNumber(point)); 384 408 } 385 409 -
trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.h
r57547 r57590 145 145 int screenCount() const; 146 146 147 /** Returns the index of the screen which contains contains @a pWidget. */ 148 int screenNumber(const QWidget *pWidget) const; 149 /** Returns the index of the screen which contains contains @a point. */ 150 int screenNumber(const QPoint &point) const; 151 147 152 /** Returns the geometry of the host-screen with @a iHostScreenIndex. 148 153 * @note The default screen is used if @a iHostScreenIndex is -1. */ … … 152 157 const QRect availableGeometry(int iHostScreenIndex = -1) const; 153 158 154 /** Returns the geometry of the host-screen which contains @a pWidget. 155 * @note The default screen is used if @a pWidget is 0. */ 156 const QRect screenGeometry(QWidget *pWidget = 0) const; 157 /** Returns the available-geometry of the host-screen which contains @a pWidget. 158 * @note The default screen is used if @a pWidget is 0. */ 159 const QRect availableGeometry(QWidget *pWidget = 0) const; 159 /** Returns the geometry of the host-screen which contains @a pWidget. */ 160 const QRect screenGeometry(const QWidget *pWidget) const; 161 /** Returns the available-geometry of the host-screen which contains @a pWidget. */ 162 const QRect availableGeometry(const QWidget *pWidget) const; 163 164 /** Returns the geometry of the host-screen which contains @a point. */ 165 const QRect screenGeometry(const QPoint &point) const; 166 /** Returns the available-geometry of the host-screen which contains @a point. */ 167 const QRect availableGeometry(const QPoint &point) const; 160 168 /** @} */ 161 169
Note:
See TracChangeset
for help on using the changeset viewer.