[UI+Backend] Hopefuly make disabling screensaver better and added per theme colours.
This commit is contained in:
parent
ea40440d72
commit
2b05c3184d
|
@ -109,7 +109,7 @@ DirectMpvPlayerBackend::DirectMpvPlayerBackend(QQuickItem* parent)
|
|||
mpv_observe_property(mpv, 0, "sub-text", MPV_FORMAT_STRING);
|
||||
mpv_observe_property(mpv, 0, "time-pos", MPV_FORMAT_DOUBLE);
|
||||
mpv_observe_property(mpv, 0, "demuxer-cache-duration", MPV_FORMAT_DOUBLE);
|
||||
mpv_observe_property(mpv, 0, "pause", MPV_FORMAT_NONE);
|
||||
mpv_observe_property(mpv, 0, "pause", MPV_FORMAT_NODE);
|
||||
mpv_observe_property(mpv, 0, "playlist", MPV_FORMAT_NODE);
|
||||
mpv_set_wakeup_callback(mpv, wakeup, this);
|
||||
|
||||
|
@ -541,7 +541,6 @@ DirectMpvPlayerBackend::handle_mpv_event(mpv_event* event)
|
|||
if (prop->format == MPV_FORMAT_DOUBLE) {
|
||||
double time = *(double*)prop->data;
|
||||
emit durationChanged(time);
|
||||
Utils::ResetScreensaver();
|
||||
}
|
||||
} else if (strcmp(prop->name, "mute") == 0 ||
|
||||
strcmp(prop->name, "volume") == 0) {
|
||||
|
@ -578,10 +577,14 @@ DirectMpvPlayerBackend::handle_mpv_event(mpv_event* event)
|
|||
emit playlistPositionChanged(pos);
|
||||
}
|
||||
} else if (strcmp(prop->name, "pause") == 0) {
|
||||
if (getProperty("pause").toBool()) {
|
||||
mpv_node* nod = (mpv_node*)prop->data;
|
||||
if (mpv::qt::node_to_variant(nod).toBool()) {
|
||||
emit playStatusChanged(Enums::PlayStatus::Paused);
|
||||
Utils::SetScreensaver(window()->winId(), true);
|
||||
|
||||
} else {
|
||||
emit playStatusChanged(Enums::PlayStatus::Playing);
|
||||
Utils::SetScreensaver(window()->winId(), true);
|
||||
}
|
||||
} else if (strcmp(prop->name, "track-list") == 0) {
|
||||
mpv_node* nod = (mpv_node*)prop->data;
|
||||
|
|
|
@ -159,7 +159,7 @@ MpvPlayerBackend::MpvPlayerBackend(QQuickItem* parent)
|
|||
mpv_observe_property(mpv, 0, "sub-text", MPV_FORMAT_STRING);
|
||||
mpv_observe_property(mpv, 0, "time-pos", MPV_FORMAT_DOUBLE);
|
||||
mpv_observe_property(mpv, 0, "demuxer-cache-duration", MPV_FORMAT_DOUBLE);
|
||||
mpv_observe_property(mpv, 0, "pause", MPV_FORMAT_DOUBLE);
|
||||
mpv_observe_property(mpv, 0, "pause", MPV_FORMAT_NODE);
|
||||
mpv_observe_property(mpv, 0, "playlist", MPV_FORMAT_NODE);
|
||||
mpv_set_wakeup_callback(mpv, wakeup, this);
|
||||
|
||||
|
@ -519,7 +519,6 @@ MpvPlayerBackend::handle_mpv_event(mpv_event* event)
|
|||
if (prop->format == MPV_FORMAT_DOUBLE) {
|
||||
double time = *(double*)prop->data;
|
||||
emit durationChanged(time);
|
||||
Utils::ResetScreensaver();
|
||||
}
|
||||
} else if (strcmp(prop->name, "mute") == 0 ||
|
||||
strcmp(prop->name, "volume") == 0) {
|
||||
|
@ -558,11 +557,12 @@ MpvPlayerBackend::handle_mpv_event(mpv_event* event)
|
|||
}
|
||||
} else if (strcmp(prop->name, "pause") == 0) {
|
||||
mpv_node* nod = (mpv_node*)prop->data;
|
||||
qDebug() << mpv::qt::node_to_variant(nod);
|
||||
if (getProperty("pause").toBool()) {
|
||||
if (mpv::qt::node_to_variant(nod).toBool()) {
|
||||
emit playStatusChanged(Enums::PlayStatus::Paused);
|
||||
Utils::SetScreensaver(window()->winId(), true);
|
||||
} else {
|
||||
emit playStatusChanged(Enums::PlayStatus::Playing);
|
||||
Utils::SetScreensaver(window()->winId(), false);
|
||||
}
|
||||
} else if (strcmp(prop->name, "track-list") == 0) {
|
||||
mpv_node* nod = (mpv_node*)prop->data;
|
||||
|
|
|
@ -81,7 +81,8 @@ Item {
|
|||
opacity: 1
|
||||
background: Rectangle {
|
||||
id: subsBackground
|
||||
color: appearance.mainBackground
|
||||
color: getAppearanceValueForTheme(appearance.themeName,
|
||||
"mainBackground")
|
||||
width: subsContainer.childrenRect.width
|
||||
height: subsContainer.childrenRect.height
|
||||
}
|
||||
|
@ -106,7 +107,8 @@ Item {
|
|||
anchors.right: parent.right
|
||||
Layout.fillWidth: true
|
||||
Layout.fillHeight: true
|
||||
color: appearance.mainBackground
|
||||
color: getAppearanceValueForTheme(appearance.themeName,
|
||||
"mainBackground")
|
||||
visible: controlsOverlay.controlsShowing
|
||||
}
|
||||
|
||||
|
|
|
@ -6,7 +6,8 @@ Menu {
|
|||
background: Rectangle {
|
||||
implicitWidth: parent.width
|
||||
implicitHeight: 10
|
||||
color: appearance.mainBackground
|
||||
color: getAppearanceValueForTheme(appearance.themeName,
|
||||
"mainBackground")
|
||||
}
|
||||
delegate: CustomMenuItem {
|
||||
}
|
||||
|
|
|
@ -6,7 +6,8 @@ import player 1.0
|
|||
Rectangle {
|
||||
id: chapterMarker
|
||||
property int time: 0
|
||||
color: appearance.chapterMarkerColor
|
||||
color: getAppearanceValueForTheme(appearance.themeName,
|
||||
"chapterMarkerColor")
|
||||
Connections {
|
||||
target: player
|
||||
enabled: true
|
||||
|
|
|
@ -166,7 +166,8 @@ MenuBar {
|
|||
background: Rectangle {
|
||||
width: parent.width
|
||||
implicitHeight: 10
|
||||
color: appearance.mainBackground
|
||||
color: getAppearanceValueForTheme(appearance.themeName,
|
||||
"mainBackground")
|
||||
}
|
||||
|
||||
CustomMenu {
|
||||
|
|
|
@ -40,7 +40,6 @@ Item {
|
|||
anchors.bottom: parent.bottom
|
||||
icon.height: parent.height / 2
|
||||
icon.width: parent.height / 2
|
||||
|
||||
}
|
||||
BackwardButton {
|
||||
id: backwardButton
|
||||
|
@ -63,7 +62,6 @@ Item {
|
|||
anchors.bottom: parent.bottom
|
||||
icon.height: parent.height / 2
|
||||
icon.width: parent.height / 2
|
||||
|
||||
}
|
||||
PlaylistNextButton {
|
||||
id: playlistNextButton
|
||||
|
@ -72,7 +70,6 @@ Item {
|
|||
anchors.bottom: parent.bottom
|
||||
icon.height: parent.height / 2
|
||||
icon.width: parent.height / 2
|
||||
|
||||
}
|
||||
|
||||
FullscreenButton {
|
||||
|
@ -82,7 +79,6 @@ Item {
|
|||
anchors.bottom: parent.bottom
|
||||
icon.height: parent.height / 2
|
||||
icon.width: parent.height / 2
|
||||
|
||||
}
|
||||
SettingsButton {
|
||||
id: settingsButton
|
||||
|
@ -91,6 +87,5 @@ Item {
|
|||
anchors.bottom: parent.bottom
|
||||
icon.height: parent.height / 2
|
||||
icon.width: parent.height / 2
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@ import player 1.0
|
|||
Button {
|
||||
id: backwardButton
|
||||
icon.source: "icons/" + appearance.themeName + "/backward.svg"
|
||||
icon.color: appearance.buttonColor
|
||||
icon.color: getAppearanceValueForTheme(appearance.themeName, "buttonColor")
|
||||
display: AbstractButton.IconOnly
|
||||
onClicked: {
|
||||
player.playerCommand(Enums.Commands.Seek, "-10")
|
||||
|
|
|
@ -10,7 +10,7 @@ import player 1.0
|
|||
Button {
|
||||
id: forwardButton
|
||||
icon.source: "icons/" + appearance.themeName + "/forward.svg"
|
||||
icon.color: appearance.buttonColor
|
||||
icon.color: getAppearanceValueForTheme(appearance.themeName, "buttonColor")
|
||||
display: AbstractButton.IconOnly
|
||||
onClicked: {
|
||||
player.playerCommand(Enums.Commands.Seek, "10")
|
||||
|
|
|
@ -9,9 +9,8 @@ import player 1.0
|
|||
|
||||
Button {
|
||||
id: fullscreenButton
|
||||
//icon.name: "fullscreen"
|
||||
icon.source: "icons/" + appearance.themeName + "/fullscreen.svg"
|
||||
icon.color: appearance.buttonColor
|
||||
icon.color: getAppearanceValueForTheme(appearance.themeName, "buttonColor")
|
||||
Layout.alignment: Qt.AlignVCenter | Qt.AlignRight
|
||||
|
||||
display: AbstractButton.IconOnly
|
||||
|
|
|
@ -10,7 +10,7 @@ import player 1.0
|
|||
Button {
|
||||
id: playPauseButton
|
||||
icon.source: "icons/" + appearance.themeName + "/pause.svg"
|
||||
icon.color: appearance.buttonColor
|
||||
icon.color: getAppearanceValueForTheme(appearance.themeName, "buttonColor")
|
||||
display: AbstractButton.IconOnly
|
||||
onClicked: {
|
||||
player.playerCommand(Enums.Commands.TogglePlayPause)
|
||||
|
|
|
@ -11,7 +11,7 @@ Button {
|
|||
id: playlistNextButton
|
||||
//icon.name: "next"
|
||||
icon.source: "icons/" + appearance.themeName + "/next.svg"
|
||||
icon.color: appearance.buttonColor
|
||||
icon.color: getAppearanceValueForTheme(appearance.themeName, "buttonColor")
|
||||
display: AbstractButton.IconOnly
|
||||
onClicked: {
|
||||
player.playerCommand(Enums.Commands.NextPlaylistItem)
|
||||
|
|
|
@ -11,7 +11,7 @@ Button {
|
|||
id: playlistPrevButton
|
||||
objectName: "playlistPrevButton"
|
||||
icon.source: "icons/" + appearance.themeName + "/prev.svg"
|
||||
icon.color: appearance.buttonColor
|
||||
icon.color: getAppearanceValueForTheme(appearance.themeName, "buttonColor")
|
||||
display: AbstractButton.IconOnly
|
||||
visible: appearance.themeName == "Youtube" ? false : true
|
||||
onClicked: {
|
||||
|
|
|
@ -11,7 +11,7 @@ Button {
|
|||
id: settingsButton
|
||||
//icon.name: "settings"
|
||||
icon.source: "icons/" + appearance.themeName + "/settings.svg"
|
||||
icon.color: appearance.buttonColor
|
||||
icon.color: getAppearanceValueForTheme(appearance.themeName, "buttonColor")
|
||||
Layout.alignment: Qt.AlignVCenter | Qt.AlignRight
|
||||
display: AbstractButton.IconOnly
|
||||
onClicked: {
|
||||
|
|
|
@ -75,13 +75,15 @@ Slider {
|
|||
width: progressBar.availableWidth
|
||||
height: progressBar.getProgressBarHeight(
|
||||
fun.nyanCat, mouseAreaProgressBar.containsMouse)
|
||||
color: appearance.progressBackgroundColor
|
||||
color: getAppearanceValueForTheme(appearance.themeName,
|
||||
"progressBackgroundColor")
|
||||
|
||||
Rectangle {
|
||||
x: (mouseAreaProgressBar.mouseX - hoverProgressLabel.width / 2)
|
||||
y: progressBackground.y - 20 - hoverProgressLabel.height
|
||||
visible: mouseAreaProgressBar.containsMouse
|
||||
color: appearance.mainBackground
|
||||
color: getAppearanceValueForTheme(appearance.themeName,
|
||||
"mainBackground")
|
||||
height: hoverProgressLabel.height
|
||||
width: hoverProgressLabel.width
|
||||
z: 80
|
||||
|
@ -105,7 +107,8 @@ Slider {
|
|||
Rectangle {
|
||||
width: cachedLength.visualPosition * parent.width
|
||||
height: parent.height
|
||||
color: appearance.progressCachedColor
|
||||
color: getAppearanceValueForTheme(appearance.themeName,
|
||||
"progressCachedColor")
|
||||
}
|
||||
}
|
||||
z: 40
|
||||
|
@ -124,7 +127,6 @@ Slider {
|
|||
onChaptersChanged: function (chapters) {
|
||||
for (var i = 0, len = chapters.length; i < len; i++) {
|
||||
var component = Qt.createComponent("ChapterMarker.qml")
|
||||
|
||||
var marker = component.createObject(chapterMarkers, {
|
||||
time: chapters[i]["time"]
|
||||
})
|
||||
|
@ -139,7 +141,8 @@ Slider {
|
|||
anchors.left: progressBackground.left
|
||||
width: progressBar.visualPosition * parent.width
|
||||
height: parent.height
|
||||
color: appearance.progressSliderColor
|
||||
color: getAppearanceValueForTheme(appearance.themeName,
|
||||
"progressSliderColor")
|
||||
Image {
|
||||
visible: fun.nyanCat
|
||||
id: rainbow
|
||||
|
@ -161,7 +164,8 @@ Slider {
|
|||
implicitHeight: radius
|
||||
implicitWidth: radius
|
||||
radius: 12 + (progressBackground.height / 2)
|
||||
color: fun.nyanCat ? "transparent" : appearance.progressSliderColor
|
||||
color: fun.nyanCat ? "transparent" : getAppearanceValueForTheme(
|
||||
appearance.themeName, "progressSliderColor")
|
||||
visible: getHandleVisibility(appearance.themeName,
|
||||
mouseAreaProgressBar.containsMouse)
|
||||
AnimatedImage {
|
||||
|
|
|
@ -11,7 +11,7 @@ Button {
|
|||
id: volumeButton
|
||||
objectName: "volumeButton"
|
||||
icon.source: "icons/" + appearance.themeName + "/volume-up.svg"
|
||||
icon.color: appearance.buttonColor
|
||||
icon.color: getAppearanceValueForTheme(appearance.themeName, "buttonColor")
|
||||
display: AbstractButton.IconOnly
|
||||
onClicked: {
|
||||
player.playerCommand(Enums.Commands.ToggleMute)
|
||||
|
|
|
@ -48,11 +48,13 @@ Slider {
|
|||
implicitHeight: appearance.themeName == "Niconico" ? layout.height / 8 : layout.height / 10
|
||||
width: volumeBar.availableWidth
|
||||
height: implicitHeight
|
||||
color: appearance.progressBackgroundColor
|
||||
color: getAppearanceValueForTheme(appearance.themeName,
|
||||
"progressBackgroundColor")
|
||||
Rectangle {
|
||||
width: volumeBar.visualPosition * parent.width
|
||||
height: parent.height
|
||||
color: appearance.volumeSliderBackground
|
||||
color: getAppearanceValueForTheme(appearance.themeName,
|
||||
"volumeSliderBackground")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -29,7 +29,6 @@ Item {
|
|||
anchors.bottom: parent.bottom
|
||||
icon.height: parent.height / 2
|
||||
icon.width: parent.height / 2
|
||||
|
||||
}
|
||||
PlaylistNextButton {
|
||||
id: playlistNextButton
|
||||
|
|
|
@ -20,6 +20,14 @@ Window {
|
|||
|
||||
property bool onTop: false
|
||||
|
||||
function getAppearanceValueForTheme(themeName, name) {
|
||||
if (themeName == "YouTube") {
|
||||
return youTubeAppearance[name]
|
||||
} else if (themeName == "Niconico") {
|
||||
return nicoNicoAppearance[name]
|
||||
}
|
||||
}
|
||||
|
||||
Translator {
|
||||
id: translate
|
||||
}
|
||||
|
@ -38,6 +46,12 @@ Window {
|
|||
property bool useMpvSubs: false
|
||||
property string themeName: "YouTube"
|
||||
property string fontName: "Roboto"
|
||||
property double scaleFactor: 1.0
|
||||
}
|
||||
|
||||
Settings {
|
||||
id: youTubeAppearance
|
||||
category: "Appearance"
|
||||
property string mainBackground: "#9C000000"
|
||||
property string progressBackgroundColor: "#3CFFFFFF"
|
||||
property string progressCachedColor: "white"
|
||||
|
@ -45,7 +59,18 @@ Window {
|
|||
property string progressSliderColor: "red"
|
||||
property string chapterMarkerColor: "#fc0"
|
||||
property string volumeSliderBackground: "white"
|
||||
property double scaleFactor: 1.0
|
||||
}
|
||||
|
||||
Settings {
|
||||
id: nicoNicoAppearance
|
||||
category: "Appearance"
|
||||
property string mainBackground: "#9C000000"
|
||||
property string progressBackgroundColor: "#444"
|
||||
property string progressCachedColor: "white"
|
||||
property string buttonColor: "white"
|
||||
property string progressSliderColor: "#007cff"
|
||||
property string chapterMarkerColor: "#fc0"
|
||||
property string volumeSliderBackground: "#0077cff"
|
||||
}
|
||||
|
||||
Settings {
|
||||
|
@ -93,6 +118,7 @@ Window {
|
|||
property string decreaseVolume: "/"
|
||||
property string mute: "m"
|
||||
property string increaseScale: "Ctrl+Shift+="
|
||||
property string resetScale: "Ctrl+Shift+0"
|
||||
property string decreaseScale: "Ctrl+Shift+-"
|
||||
property string customKeybind0: ""
|
||||
property string customKeybind0Command: ""
|
||||
|
@ -137,6 +163,26 @@ Window {
|
|||
width: parent.width
|
||||
height: parent.height
|
||||
z: 1
|
||||
|
||||
Action {
|
||||
onTriggered: {
|
||||
appearance.scaleFactor += 0.1
|
||||
}
|
||||
shortcut: keybinds.increaseScale
|
||||
}
|
||||
Action {
|
||||
onTriggered: {
|
||||
appearance.scaleFactor = 1
|
||||
}
|
||||
shortcut: keybinds.resetScale
|
||||
}
|
||||
Action {
|
||||
onTriggered: {
|
||||
appearance.scaleFactor -= 0.1
|
||||
}
|
||||
shortcut: keybinds.decreaseScale
|
||||
}
|
||||
|
||||
function startPlayer() {
|
||||
var args = Qt.application.arguments
|
||||
var len = Qt.application.arguments.length
|
||||
|
@ -240,19 +286,6 @@ Window {
|
|||
}
|
||||
}
|
||||
|
||||
Action {
|
||||
onTriggered: {
|
||||
appearance.scaleFactor += 0.1
|
||||
}
|
||||
shortcut: appearance.increaseScale
|
||||
}
|
||||
Action {
|
||||
onTriggered: {
|
||||
appearance.scaleFactor -= 0.1
|
||||
}
|
||||
shortcut: appearance.decreaseScale
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
id: mouseAreaPlayer
|
||||
z: 1000
|
||||
|
@ -268,7 +301,7 @@ Window {
|
|||
anchors.topMargin: 0
|
||||
hoverEnabled: true
|
||||
onDoubleClicked: {
|
||||
playTimer.stop()
|
||||
player.playerCommand(Enums.Commands.TogglePlayPause)
|
||||
toggleFullscreen()
|
||||
}
|
||||
Action {
|
||||
|
@ -279,18 +312,9 @@ Window {
|
|||
}
|
||||
shortcut: "Esc"
|
||||
}
|
||||
Timer {
|
||||
id: playTimer
|
||||
interval: 200
|
||||
running: false
|
||||
repeat: false
|
||||
onTriggered: {
|
||||
player.playerCommand(Enums.Commands.TogglePlayPause)
|
||||
}
|
||||
}
|
||||
onClicked: {
|
||||
if (appearance.clickToPause) {
|
||||
playTimer.start()
|
||||
player.playerCommand(Enums.Commands.TogglePlayPause)
|
||||
}
|
||||
}
|
||||
Timer {
|
||||
|
@ -321,7 +345,8 @@ Window {
|
|||
anchors.top: parent.top
|
||||
visible: controlsOverlay.controlsShowing
|
||||
|
||||
color: appearance.mainBackground
|
||||
color: getAppearanceValueForTheme(appearance.themeName,
|
||||
"mainBackground")
|
||||
|
||||
Text {
|
||||
id: titleLabel
|
||||
|
|
|
@ -14,9 +14,6 @@
|
|||
#include <QX11Info>
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/Xutil.h>
|
||||
#include <X11/extensions/Xrandr.h>
|
||||
#include <X11/extensions/dpms.h>
|
||||
#include <X11/keysym.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
@ -65,36 +62,53 @@ createTimestamp(int seconds)
|
|||
}
|
||||
}
|
||||
|
||||
#ifdef __linux__
|
||||
void
|
||||
SetScreensaver(WId wid, bool on)
|
||||
{
|
||||
QProcess xdgScreensaver;
|
||||
xdgScreensaver.setProcessChannelMode(QProcess::ForwardedChannels);
|
||||
if (on) {
|
||||
xdgScreensaver.start("xdg-screensaver",
|
||||
QStringList() << "resume" << QString::number(wid));
|
||||
} else {
|
||||
xdgScreensaver.start("xdg-screensaver",
|
||||
QStringList() << "suspend" << QString::number(wid));
|
||||
}
|
||||
xdgScreensaver.waitForFinished();
|
||||
}
|
||||
|
||||
void
|
||||
SetDPMS(bool on)
|
||||
{
|
||||
#ifdef __linux__
|
||||
if (getPlatformName() != "xcb") {
|
||||
return;
|
||||
}
|
||||
#ifdef ENABLE_X11
|
||||
Display* dpy = QX11Info::display();
|
||||
QProcess xsetProcess;
|
||||
xsetProcess.setProcessChannelMode(QProcess::ForwardedChannels);
|
||||
if (on) {
|
||||
DPMSEnable(dpy);
|
||||
qDebug() << "Enabled DPMS.";
|
||||
xsetProcess.start("xset",
|
||||
QStringList() << "s"
|
||||
<< "on"
|
||||
<< "+dpms");
|
||||
} else {
|
||||
DPMSDisable(dpy);
|
||||
qDebug() << "Disabled DPMS.";
|
||||
xsetProcess.start("xset",
|
||||
QStringList() << "s"
|
||||
<< "off"
|
||||
<< "-dpms");
|
||||
}
|
||||
#endif
|
||||
}
|
||||
void
|
||||
ResetScreensaver()
|
||||
{
|
||||
#ifdef ENABLE_X11
|
||||
Display* display = QX11Info::display();
|
||||
XResetScreenSaver(display);
|
||||
xsetProcess.waitForFinished();
|
||||
#else
|
||||
qDebug() << "Can't set DPMS for platform: " << getPlatformName();
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
AlwaysOnTop(WId wid, bool on)
|
||||
{
|
||||
#ifdef __linux__
|
||||
#ifdef ENABLE_X11
|
||||
Display* display = QX11Info::display();
|
||||
XEvent event;
|
||||
|
@ -118,27 +132,8 @@ AlwaysOnTop(WId wid, bool on)
|
|||
SubstructureRedirectMask | SubstructureNotifyMask,
|
||||
&event);
|
||||
#endif
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
void
|
||||
AlwaysOnTop(WId wid, bool on)
|
||||
{
|
||||
qDebug() << "Can't set on top for platform: " << getPlatformName();
|
||||
}
|
||||
|
||||
void
|
||||
SetDPMS(bool on)
|
||||
{
|
||||
qDebug() << "Can't set DPMS for platform: " << getPlatformName();
|
||||
}
|
||||
|
||||
void
|
||||
ResetScreensaver()
|
||||
{
|
||||
qDebug() << "Can't reset screensaver for: " << getPlatformName();
|
||||
}
|
||||
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,13 +10,13 @@ Q_NAMESPACE
|
|||
void
|
||||
SetDPMS(bool on);
|
||||
void
|
||||
SetScreensaver(WId wid, bool on);
|
||||
void
|
||||
AlwaysOnTop(WId wid, bool on);
|
||||
void
|
||||
updateAppImage();
|
||||
QString
|
||||
createTimestamp(int seconds);
|
||||
void
|
||||
ResetScreensaver();
|
||||
}
|
||||
|
||||
class UtilsClass : public QObject
|
||||
|
@ -30,7 +30,6 @@ public slots:
|
|||
{
|
||||
return Utils::createTimestamp(seconds);
|
||||
};
|
||||
void ResetScreensaver() { Utils::ResetScreensaver(); };
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue