1
0
mirror of https://gitlab.com/kelteseth/ScreenPlay.git synced 2024-07-19 02:54:47 +02:00

Change wallpaper and widget names to include type

This commit is contained in:
Elias Steurer 2023-07-29 11:18:21 +02:00
parent aefb4e683d
commit 5a7f6e85d3
16 changed files with 25 additions and 19 deletions

View File

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 36 KiB

View File

Before

Width:  |  Height:  |  Size: 484 KiB

After

Width:  |  Height:  |  Size: 484 KiB

View File

Before

Width:  |  Height:  |  Size: 115 KiB

After

Width:  |  Height:  |  Size: 115 KiB

View File

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

View File

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 27 KiB

View File

@ -48,13 +48,15 @@ int main(int argc, char* argv[])
if (argumentList.length() == 1) { if (argumentList.length() == 1) {
QString exampleContentPath = QString(SCREENPLAY_SOURCE_DIR) + "/Content"; QString exampleContentPath = QString(SCREENPLAY_SOURCE_DIR) + "/Content";
QStringList contentFolder = { QStringList contentFolder = {
"/wallpaper_video_astronaut_vp9", "/wallpaper_html", // 0
"/wallpaper_video_nebula_h264", "/wallpaper_qml", // 1
"/wallpaper_interactive", "/wallpaper_qml_landscape", // 2
"/wallpaper_landscape", "/wallpaper_qml_particles", // 3
"/wallpaper_particles" "/wallpaper_video_astronaut_vp9", // 4
"/wallpaper_video_nebula_h264" // 5
}; };
QString projectPath = exampleContentPath + contentFolder.at(0); const int index = 5;
QString projectPath = exampleContentPath + contentFolder.at(index);
window.setActiveScreensList({ 0 }); window.setActiveScreensList({ 0 });
window.setProjectPath(projectPath); window.setProjectPath(projectPath);

View File

@ -32,26 +32,30 @@ int main(int argc, char* argv[])
// If we start with only one argument (path, appID, type), // If we start with only one argument (path, appID, type),
// it means we want to test a single widget // it means we want to test a single widget
if (argumentList.length() == 1) { if (argumentList.length() == 1) {
// WidgetWindow spwmw("test", "appid", "qmlWidget", { 100, 100 }, true);
QString exampleContentPath = QString(SCREENPLAY_SOURCE_DIR) + "/Content"; QString exampleContentPath = QString(SCREENPLAY_SOURCE_DIR) + "/Content";
QStringList contentFolder = { QStringList contentFolder = {
"/widget_weather", "/widget_weather", // 0
"/widget_system_stats", // Note: Windows only "/widget_system_stats", // 1 (Note: Windows only)
"/widget_hello_world", "/widget_hello_world", // 2
"/widget_countDown", "/widget_year_count_down", // 3
"/widget_analogClock", "/widget_analog_clock", // 4
"/widget_digitalClock", "/widget_digital_clock", // 5
"/widget_rss_reddit", "/widget_rss_hackernews", // 6
"/widget_rss_dw_news", "/widget_rss_guardian_news", // 7
"/widget_xkcd" "/widget_xkcd" // 8
}; };
QString projectPath = exampleContentPath + contentFolder.at(0); const int index = 5;
QString projectPath = exampleContentPath + contentFolder.at(index);
// Lets center the widget
const auto* screen = QGuiApplication::screens().at(0);
const int offset = - 200;
QPoint center((screen->size().width() / 2) + offset, (screen->size().height() / 2)+offset);
WidgetWindow spwmw(projectPath, WidgetWindow spwmw(projectPath,
"appid", "appid",
"qmlWidget", "qmlWidget",
{ 0, 0 }, center,
true); true);
return app.exec(); return app.exec();