1
0
mirror of https://gitlab.com/kelteseth/ScreenPlay.git synced 2024-11-22 02:32:29 +01:00

Rename ScreenPlayWindow to the more fitting ScreenPlayWallpaper

This commit is contained in:
Elias 2019-07-26 13:08:27 +02:00
parent 4543b54378
commit 74e0f68622
30 changed files with 32 additions and 27 deletions

View File

@ -2,11 +2,11 @@ TEMPLATE = subdirs
SUBDIRS += \ SUBDIRS += \
ScreenPlay/ScreenPlay.pro \ ScreenPlay/ScreenPlay.pro \
ScreenPlaySDK/ScreenPlaySDK.pro \ ScreenPlaySDK/ScreenPlaySDK.pro \
ScreenPlayWindow/ScreenPlayWindow.pro \ ScreenPlayWallpaper/ScreenPlayWallpaper.pro \
ScreenPlayWidget/ScreenPlayWidget.pro \ ScreenPlayWidget/ScreenPlayWidget.pro \
ScreenPlay/ThirdParty/stomt-qt-sdk/sdk/stomt-qt-sdk.pro \ ScreenPlay/ThirdParty/stomt-qt-sdk/sdk/stomt-qt-sdk.pro \
ScreenPlayWindow.depends = ScreenPlaySDK ScreenPlayWallpaper.depends = ScreenPlaySDK
ScreenPlayWidget.depends = ScreenPlaySDK ScreenPlayWidget.depends = ScreenPlaySDK

View File

@ -241,14 +241,14 @@ void Settings::setupWidgetAndWindowPaths()
if (SPWorkingDir.cdUp()) { if (SPWorkingDir.cdUp()) {
#ifdef Q_OS_OSX #ifdef Q_OS_OSX
setScreenPlayWindowPath(QUrl::fromUserInput(SPWorkingDir.path() + "/../../../ScreenPlayWindow/ScreenPlayWindow.app/Contents/MacOS/ScreenPlayWindow").toLocalFile()); setScreenPlayWallpaperPath(QUrl::fromUserInput(SPWorkingDir.path() + "/../../../ScreenPlayWallpaper/ScreenPlayWallpaper.app/Contents/MacOS/ScreenPlayWallpaper").toLocalFile());
setScreenPlayWidgetPath(QUrl::fromUserInput(SPWorkingDir.path() + "/../../../ScreenPlayWidget/ScreenPlayWidget.app/Contents/MacOS/ScreenPlayWidget").toLocalFile()); setScreenPlayWidgetPath(QUrl::fromUserInput(SPWorkingDir.path() + "/../../../ScreenPlayWidget/ScreenPlayWidget.app/Contents/MacOS/ScreenPlayWidget").toLocalFile());
qDebug() << "Setting ScreenPlayWindow Path to " << settings.getScreenPlayWindowPath(); qDebug() << "Setting ScreenPlayWallpaper Path to " << settings.getScreenPlayWallpaperPath();
qDebug() << "Setting ScreenPlayWdiget Path to " << settings.getScreenPlayWidgetPath(); qDebug() << "Setting ScreenPlayWdiget Path to " << settings.getScreenPlayWidgetPath();
#endif #endif
#ifdef Q_OS_WIN #ifdef Q_OS_WIN
setScreenPlayWindowPath(QUrl(SPWorkingDir.path() + "/ScreenPlayWindow/debug/ScreenPlayWindow.exe")); setScreenPlayWallpaperPath(QUrl(SPWorkingDir.path() + "/ScreenPlayWallpaper/debug/ScreenPlayWallpaper.exe"));
setScreenPlayWidgetPath(QUrl(SPWorkingDir.path() + "/ScreenPlayWidget/debug/ScreenPlayWidget.exe")); setScreenPlayWidgetPath(QUrl(SPWorkingDir.path() + "/ScreenPlayWidget/debug/ScreenPlayWidget.exe"));
#endif #endif
} }
@ -269,12 +269,12 @@ void Settings::setupWidgetAndWindowPaths()
// In QtCreator is the dir above ScreenPlay.exe (!) // In QtCreator is the dir above ScreenPlay.exe (!)
SPWorkingDir.cdUp(); SPWorkingDir.cdUp();
SPWorkingDir.cd("ScreenPlayWindow"); SPWorkingDir.cd("ScreenPlayWallpaper");
if (QDir(SPWorkingDir.path() + "/release").exists()) { if (QDir(SPWorkingDir.path() + "/release").exists()) {
// If started by QtCreator // If started by QtCreator
SPWorkingDir.cd("release"); SPWorkingDir.cd("release");
setScreenPlayWindowPath(QUrl(SPWorkingDir.path() + "/ScreenPlayWindow.exe")); setScreenPlayWallpaperPath(QUrl(SPWorkingDir.path() + "/ScreenPlayWallpaper.exe"));
SPWorkingDir.cdUp(); SPWorkingDir.cdUp();
SPWorkingDir.cdUp(); SPWorkingDir.cdUp();
SPWorkingDir.cd("ScreenPlayWidget"); SPWorkingDir.cd("ScreenPlayWidget");
@ -282,7 +282,7 @@ void Settings::setupWidgetAndWindowPaths()
setScreenPlayWidgetPath(QUrl(SPWorkingDir.path() + "/ScreenPlayWidget.exe")); setScreenPlayWidgetPath(QUrl(SPWorkingDir.path() + "/ScreenPlayWidget.exe"));
} else { } else {
// If started by Steam // If started by Steam
setScreenPlayWindowPath(QUrl("ScreenPlayWindow.exe")); setScreenPlayWallpaperPath(QUrl("ScreenPlayWallpaper.exe"));
setScreenPlayWidgetPath(QUrl("ScreenPlayWidget.exe")); setScreenPlayWidgetPath(QUrl("ScreenPlayWidget.exe"));
} }
#endif #endif

View File

@ -72,9 +72,9 @@ public:
return m_version; return m_version;
} }
QUrl screenPlayWindowPath() const QUrl screenPlayWallpaperPath() const
{ {
return m_screenPlayWindowPath; return m_screenPlayWallpaperPath;
} }
QUrl localStoragePath() const QUrl localStoragePath() const
@ -97,14 +97,14 @@ public:
return m_offlineMode; return m_offlineMode;
} }
QUrl getScreenPlayWindowPath() const QUrl setScreenPlayWallpaperPath() const
{ {
return m_screenPlayWindowPath; return m_screenPlayWallpaperPath;
} }
void setScreenPlayWindowPath(const QUrl& screenPlayWindowPath) void setScreenPlayWallpaperPath(const QUrl& screenPlayWallpaperPath)
{ {
m_screenPlayWindowPath = screenPlayWindowPath; m_screenPlayWallpaperPath = screenPlayWallpaperPath;
} }
QUrl getScreenPlayBasePath() const QUrl getScreenPlayBasePath() const
@ -168,7 +168,6 @@ signals:
void activeWallpaperCounterChanged(int activeWallpaperCounter); void activeWallpaperCounterChanged(int activeWallpaperCounter);
void pauseWallpaperWhenIngameChanged(bool pauseWallpaperWhenIngame); void pauseWallpaperWhenIngameChanged(bool pauseWallpaperWhenIngame);
void offlineModeChanged(bool offlineMode); void offlineModeChanged(bool offlineMode);
void activeWidgetsCounterChanged(int activeWidgetsCounter); void activeWidgetsCounterChanged(int activeWidgetsCounter);
public slots: public slots:
@ -329,7 +328,7 @@ private:
QUrl m_localStoragePath; QUrl m_localStoragePath;
QUrl m_localSettingsPath; QUrl m_localSettingsPath;
QUrl m_screenPlayWindowPath; QUrl m_screenPlayWallpaperPath;
QUrl m_screenPlayWidgetPath; QUrl m_screenPlayWidgetPath;
QUrl m_screenPlayBasePath; QUrl m_screenPlayBasePath;

View File

@ -4,7 +4,7 @@ CONFIG += c++17
DEFINES += QT_DEPRECATED_WARNINGS DEFINES += QT_DEPRECATED_WARNINGS
TARGETPATH = ScreenPlayWindow TARGETPATH = ScreenPlayWallpaper
RESOURCES += \ RESOURCES += \

View File

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

View File

@ -38,8 +38,8 @@ int main(int argc, char* argv[])
QVector<int> list; QVector<int> list;
list.append(0); list.append(0);
#if defined(Q_OS_WIN) #if defined(Q_OS_WIN)
WinWindow window(list, "test", "appid", "1"); //WinWindow window(list, "test", "appid", "1");
// WinWindow window(list, "D:/672870/827874818", "appid", "1"); WinWindow window(list, "D:/672870/827874818", "appid", "1");
#endif #endif
#if defined(Q_OS_LINUX) #if defined(Q_OS_LINUX)
LinuxWindow window(list, "test", "appid", "1"); LinuxWindow window(list, "test", "appid", "1");

View File

@ -29,13 +29,13 @@ BaseWindow::BaseWindow(QString projectFilePath, QObject* parent)
/* project.json example: /* project.json example:
*{ *{
* "title": "example title",
* "description": "", * "description": "",
* "file": "example.webm", * "file": "example.webm",
* "preview": "preview.png", * "preview": "preview.png",
* "previewGIF": "preview.gif", * "previewGIF": "preview.gif",
* "previewMP4": "preview.mp4", * "previewWEBM": "preview.webm",
* "title": "example title", * "type": "videoWallpaper"
* "type": "video"
*} *}
*/ */
@ -57,22 +57,22 @@ BaseWindow::BaseWindow(QString projectFilePath, QObject* parent)
setFullContentPath("file:///" + projectFilePath + "/" + projectObject.value("file").toString()); setFullContentPath("file:///" + projectFilePath + "/" + projectObject.value("file").toString());
if (projectObject.value("type") == "video") { if (projectObject.value("type") == "videoWallpaper") {
setType(BaseWindow::WallpaperType::Video); setType(BaseWindow::WallpaperType::Video);
return; return;
} }
if (projectObject.value("type") == "scene") { if (projectObject.value("type") == "threeJSWallpaper") {
setType(BaseWindow::WallpaperType::ThreeJSScene); setType(BaseWindow::WallpaperType::ThreeJSScene);
return; return;
} }
if (projectObject.value("type") == "qml") { if (projectObject.value("type") == "qmlWallpaper") {
setType(BaseWindow::WallpaperType::Qml); setType(BaseWindow::WallpaperType::Qml);
return; return;
} }
if (projectObject.value("type") == "html") { if (projectObject.value("type") == "htmlWallpaper") {
setType(BaseWindow::WallpaperType::Html); setType(BaseWindow::WallpaperType::Html);
return; return;
} }

View File

@ -115,7 +115,7 @@ WinWindow::WinWindow(QVector<int>& activeScreensList, QString projectPath, QStri
} }
// FIXME WORKAROUND: // FIXME WORKAROUND:
// There is a strange bug when we open the ScreenPlayWindow project on its one // There is a strange bug when we open the ScreenPlayWallpaper project on its one
// that if we set ShowWindow(m_windowHandle, SW_HIDE); we can no longer set // that if we set ShowWindow(m_windowHandle, SW_HIDE); we can no longer set
// the window visible via set Visible. // the window visible via set Visible.
if (projectPath != "test") { if (projectPath != "test") {

View File

@ -3,5 +3,8 @@
<file>assets/image/noisy-texture-3.png</file> <file>assets/image/noisy-texture-3.png</file>
<file>test.qml</file> <file>test.qml</file>
<file>mainWidget.qml</file> <file>mainWidget.qml</file>
<file>assets/icons/baseline-close-24px.svg</file>
<file>assets/icons/baseline-opacity-24px.svg</file>
<file>assets/icons/baseline-settings-20px.svg</file>
</qresource> </qresource>
</RCC> </RCC>

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/><path d="M0 0h24v24H0z" fill="none"/></svg>

After

Width:  |  Height:  |  Size: 239 B

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="none" d="M24 0H0v24h24V0zm0 0H0v24h24V0zM0 24h24V0H0v24z"/><path d="M17.66 8L12 2.35 6.34 8C4.78 9.56 4 11.64 4 13.64s.78 4.11 2.34 5.67 3.61 2.35 5.66 2.35 4.1-.79 5.66-2.35S20 15.64 20 13.64 19.22 9.56 17.66 8zM6 14c.01-2 .62-3.27 1.76-4.4L12 5.27l4.24 4.38C17.38 10.77 17.99 12 18 14H6z"/></svg>

After

Width:  |  Height:  |  Size: 393 B

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><path fill="none" d="M0 0h20v20H0V0z"/><path d="M15.95 10.78c.03-.25.05-.51.05-.78s-.02-.53-.06-.78l1.69-1.32c.15-.12.19-.34.1-.51l-1.6-2.77c-.1-.18-.31-.24-.49-.18l-1.99.8c-.42-.32-.86-.58-1.35-.78L12 2.34c-.03-.2-.2-.34-.4-.34H8.4c-.2 0-.36.14-.39.34l-.3 2.12c-.49.2-.94.47-1.35.78l-1.99-.8c-.18-.07-.39 0-.49.18l-1.6 2.77c-.1.18-.06.39.1.51l1.69 1.32c-.04.25-.07.52-.07.78s.02.53.06.78L2.37 12.1c-.15.12-.19.34-.1.51l1.6 2.77c.1.18.31.24.49.18l1.99-.8c.42.32.86.58 1.35.78l.3 2.12c.04.2.2.34.4.34h3.2c.2 0 .37-.14.39-.34l.3-2.12c.49-.2.94-.47 1.35-.78l1.99.8c.18.07.39 0 .49-.18l1.6-2.77c.1-.18.06-.39-.1-.51l-1.67-1.32zM10 13c-1.65 0-3-1.35-3-3s1.35-3 3-3 3 1.35 3 3-1.35 3-3 3z"/></svg>

After

Width:  |  Height:  |  Size: 774 B