Add power state to QPlatformScreen
Allows platform plugins to set the power state for each screen. Change-Id: I4164ca63cbae9fa2ab186dc84c8f704c33fd7c69 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
This commit is contained in:
parent
2d981e7e9f
commit
d71f3e0882
@ -420,4 +420,22 @@ QPlatformScreen::SubpixelAntialiasingType QPlatformScreen::subpixelAntialiasingT
|
|||||||
return static_cast<QPlatformScreen::SubpixelAntialiasingType>(type);
|
return static_cast<QPlatformScreen::SubpixelAntialiasingType>(type);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
Returns the current power state.
|
||||||
|
|
||||||
|
The default implementation always returns PowerStateOn.
|
||||||
|
*/
|
||||||
|
QPlatformScreen::PowerState QPlatformScreen::powerState() const
|
||||||
|
{
|
||||||
|
return PowerStateOn;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
Sets the power state for this screen.
|
||||||
|
*/
|
||||||
|
void QPlatformScreen::setPowerState(PowerState state)
|
||||||
|
{
|
||||||
|
Q_UNUSED(state);
|
||||||
|
}
|
||||||
|
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
@ -82,6 +82,13 @@ public:
|
|||||||
Subpixel_VBGR
|
Subpixel_VBGR
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum PowerState {
|
||||||
|
PowerStateOn,
|
||||||
|
PowerStateStandby,
|
||||||
|
PowerStateSuspend,
|
||||||
|
PowerStateOff
|
||||||
|
};
|
||||||
|
|
||||||
QPlatformScreen();
|
QPlatformScreen();
|
||||||
virtual ~QPlatformScreen();
|
virtual ~QPlatformScreen();
|
||||||
|
|
||||||
@ -117,6 +124,9 @@ public:
|
|||||||
virtual QPlatformCursor *cursor() const;
|
virtual QPlatformCursor *cursor() const;
|
||||||
virtual SubpixelAntialiasingType subpixelAntialiasingTypeHint() const;
|
virtual SubpixelAntialiasingType subpixelAntialiasingTypeHint() const;
|
||||||
|
|
||||||
|
virtual PowerState powerState() const;
|
||||||
|
virtual void setPowerState(PowerState state);
|
||||||
|
|
||||||
static int angleBetween(Qt::ScreenOrientation a, Qt::ScreenOrientation b);
|
static int angleBetween(Qt::ScreenOrientation a, Qt::ScreenOrientation b);
|
||||||
static QTransform transformBetween(Qt::ScreenOrientation a, Qt::ScreenOrientation b, const QRect &target);
|
static QTransform transformBetween(Qt::ScreenOrientation a, Qt::ScreenOrientation b, const QRect &target);
|
||||||
static QRect mapBetween(Qt::ScreenOrientation a, Qt::ScreenOrientation b, const QRect &rect);
|
static QRect mapBetween(Qt::ScreenOrientation a, Qt::ScreenOrientation b, const QRect &rect);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user