mirror of
https://gitlab.com/kelteseth/ScreenPlay.git
synced 2024-09-03 09:09:48 +02:00
Cleanup comments and OS specific defines
This commit is contained in:
parent
dd5f7248c6
commit
36c6f627cf
@ -9,13 +9,9 @@
|
||||
|
||||
#if defined(Q_OS_WIN)
|
||||
#include "src/winwindow.h"
|
||||
#endif
|
||||
|
||||
#if defined(Q_OS_LINUX)
|
||||
#elif defined(Q_OS_LINUX)
|
||||
#include "src/linuxwindow.h"
|
||||
#endif
|
||||
|
||||
#if defined(Q_OS_OSX)
|
||||
#elif defined(Q_OS_OSX)
|
||||
#include "src/macwindow.h"
|
||||
#endif
|
||||
|
||||
@ -31,21 +27,17 @@ int main(int argc, char* argv[])
|
||||
|
||||
// If we start with only one argument (app path)
|
||||
// It means we want to test a single wallpaper
|
||||
QStringList argumentList = app.arguments();
|
||||
const QStringList argumentList = app.arguments();
|
||||
|
||||
// For testing purposes when starting the ScreenPlayWallpaper directly.
|
||||
if (argumentList.length() == 1) {
|
||||
#if defined(Q_OS_WIN)
|
||||
WinWindow window1({ 0 }, "test", "appID=test", "1", "fill", "videoWallpaper", true, true);
|
||||
//WinWindow window2({ 1 }, "test", "appID=xyz", "1", "fill", true, true);
|
||||
//WinWindow window3({ 2 }, "test", "appID=123", "1", "fill", true,true);
|
||||
#endif
|
||||
#if defined(Q_OS_LINUX)
|
||||
#elif defined(Q_OS_LINUX)
|
||||
LinuxWindow window({ 0 }, "/home/graphicscore/Desktop/wallpapers/MechaGirl", "appid", "1", "fill", false);
|
||||
#endif
|
||||
#if defined(Q_OS_OSX)
|
||||
#elif defined(Q_OS_OSX)
|
||||
MacWindow window({ 0 }, "test", "appid", "1", "fill");
|
||||
#endif
|
||||
|
||||
return app.exec();
|
||||
}
|
||||
|
||||
@ -85,9 +77,7 @@ int main(int argc, char* argv[])
|
||||
type,
|
||||
checkWallpaperVisible,
|
||||
debugMode);
|
||||
#endif
|
||||
|
||||
#if defined(Q_OS_LINUX)
|
||||
#elif defined(Q_OS_LINUX)
|
||||
LinuxWindow window(
|
||||
activeScreensList.value(),
|
||||
projectPath,
|
||||
@ -95,11 +85,7 @@ int main(int argc, char* argv[])
|
||||
fillmode,
|
||||
volume,
|
||||
checkWallpaperVisible);
|
||||
QObject::connect(&sdk, &ScreenPlaySDK::sdkDisconnected, &window, &LinuxWindow::destroyThis);
|
||||
QObject::connect(&sdk, &ScreenPlaySDK::incommingMessage, &window, &LinuxWindow::messageReceived);
|
||||
#endif
|
||||
|
||||
#if defined(Q_OS_OSX)
|
||||
#elif defined(Q_OS_OSX)
|
||||
MacWindow window(
|
||||
activeScreensList.value(),
|
||||
projectPath,
|
||||
@ -107,8 +93,6 @@ int main(int argc, char* argv[])
|
||||
fillmode,
|
||||
volume,
|
||||
checkWallpaperVisible);
|
||||
QObject::connect(&sdk, &ScreenPlaySDK::sdkDisconnected, &window, &MacWindow::destroyThis);
|
||||
QObject::connect(&sdk, &ScreenPlaySDK::incommingMessage, &window, &MacWindow::messageReceived);
|
||||
#endif
|
||||
|
||||
return app.exec();
|
||||
|
@ -85,6 +85,9 @@ BaseWindow::BaseWindow(
|
||||
setupLiveReloading();
|
||||
}
|
||||
|
||||
/*!
|
||||
\brief messageReceived.
|
||||
*/
|
||||
void BaseWindow::messageReceived(QString key, QString value)
|
||||
{
|
||||
if (key == "volume") {
|
||||
@ -145,6 +148,9 @@ void BaseWindow::messageReceived(QString key, QString value)
|
||||
emit qmlSceneValueReceived(key, value);
|
||||
}
|
||||
|
||||
/*!
|
||||
\brief replaceWallpaper.
|
||||
*/
|
||||
void BaseWindow::replaceWallpaper(
|
||||
const QString absolutePath,
|
||||
const QString file,
|
||||
@ -178,8 +184,9 @@ void BaseWindow::replaceWallpaper(
|
||||
emit reloadGIF(oldType);
|
||||
}
|
||||
|
||||
// Used for loading shader
|
||||
// Loading shader relative to the qml file will be available in Qt 6
|
||||
/*!
|
||||
\brief Used for loading shader. Loading shader relative to the qml file will be available in Qt 6
|
||||
*/
|
||||
QString BaseWindow::loadFromFile(const QString& filename)
|
||||
{
|
||||
QFile file(basePath() + "/" + filename);
|
||||
@ -201,6 +208,9 @@ QString BaseWindow::getApplicationPath()
|
||||
return QApplication::applicationDirPath();
|
||||
}
|
||||
|
||||
/*!
|
||||
\brief This public slot is for QML usage.
|
||||
*/
|
||||
void BaseWindow::setupLiveReloading()
|
||||
{
|
||||
auto reloadQMLLambda = [this]() { emit reloadQML(type()); };
|
||||
|
Loading…
Reference in New Issue
Block a user