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

Merge branch 'master' into feature/4ksupport

This commit is contained in:
Elias Steurer 2021-03-21 12:29:20 +01:00
commit cfa7d3931f
20 changed files with 130 additions and 292 deletions

View File

@ -35,6 +35,7 @@ Windows only, Linux and MacOS (soon™)
</div>
# Content Creation
[Learn the basics of QML for Wallpapers and Widgets in 5 minutes](https://screen-play.app/blog/guide_learn_the_basics_of_qml/)
<div>
<a href="https://kelteseth.gitlab.io/ScreenPlayDocs/wallpaper/wallpaper/"><img src=".gitlab/media/wallpaper_guide.png"></a>
</div>

View File

@ -137,5 +137,6 @@
<file>translations/ScreenPlay_pt_br.qm</file>
<file>assets/icons/icon_sort-up-solid.svg</file>
<file>assets/icons/icon_sort-down-solid.svg</file>
<file>assets/icons/brand_reddit.svg</file>
</qresource>
</RCC>

View File

@ -54,7 +54,7 @@ App::App()
QGuiApplication::setOrganizationName("ScreenPlay");
QGuiApplication::setOrganizationDomain("https://screen-play.app");
QGuiApplication::setApplicationName("ScreenPlay");
QGuiApplication::setApplicationVersion("0.13.0");
QGuiApplication::setApplicationVersion("0.13.1");
QGuiApplication::setQuitOnLastWindowClosed(false);
QFontDatabase::addApplicationFont(":/assets/fonts/LibreBaskerville-Italic.ttf");
@ -208,6 +208,11 @@ void App::init()
QObject::connect(m_monitorListModel.get(), &MonitorListModel::monitorConfigurationChanged, m_screenPlayManager.get(), &ScreenPlayManager::closeAllWallpapers);
}
QString App::version() const
{
return QGuiApplication::applicationVersion();
}
/*!
\brief Tries to send the telemetry quit event before we call quit ourself.
*/

View File

@ -92,60 +92,17 @@ public:
void init();
bool m_isAnotherScreenPlayInstanceRunning { false };
GlobalVariables* globalVariables() const
{
return m_globalVariables.get();
}
ScreenPlayManager* screenPlayManager() const
{
return m_screenPlayManager.get();
}
Create* create() const
{
return m_create.get();
}
Util* util() const
{
return m_util.get();
}
Settings* settings() const
{
return m_settings.get();
}
InstalledListModel* installedListModel() const
{
return m_installedListModel.get();
}
MonitorListModel* monitorListModel() const
{
return m_monitorListModel.get();
}
ProfileListModel* profileListModel() const
{
return m_profileListModel.get();
}
InstalledListFilter* installedListFilter() const
{
return m_installedListFilter.get();
}
QQmlApplicationEngine* mainWindowEngine() const
{
return m_mainWindowEngine.get();
}
Wizards* wizards() const
{
return m_wizards.get();
}
GlobalVariables* globalVariables() const { return m_globalVariables.get(); }
ScreenPlayManager* screenPlayManager() const { return m_screenPlayManager.get(); }
Create* create() const { return m_create.get(); }
Util* util() const { return m_util.get(); }
Settings* settings() const { return m_settings.get(); }
InstalledListModel* installedListModel() const { return m_installedListModel.get(); }
MonitorListModel* monitorListModel() const { return m_monitorListModel.get(); }
ProfileListModel* profileListModel() const { return m_profileListModel.get(); }
InstalledListFilter* installedListFilter() const { return m_installedListFilter.get(); }
QQmlApplicationEngine* mainWindowEngine() const { return m_mainWindowEngine.get(); }
Wizards* wizards() const { return m_wizards.get(); }
signals:
void globalVariablesChanged(GlobalVariables* globalVariables);
@ -161,7 +118,7 @@ signals:
void wizardsChanged(Wizards* wizards);
public slots:
QString version() const;
void exit();
bool loadSteamPlugin();
bool unloadSteamPlugin();

View File

@ -0,0 +1 @@
<svg aria-hidden="true" focusable="false" data-prefix="fab" data-icon="reddit" class="svg-inline--fa fa-reddit fa-w-16" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M201.5 305.5c-13.8 0-24.9-11.1-24.9-24.6 0-13.8 11.1-24.9 24.9-24.9 13.6 0 24.6 11.1 24.6 24.9 0 13.6-11.1 24.6-24.6 24.6zM504 256c0 137-111 248-248 248S8 393 8 256 119 8 256 8s248 111 248 248zm-132.3-41.2c-9.4 0-17.7 3.9-23.8 10-22.4-15.5-52.6-25.5-86.1-26.6l17.4-78.3 55.4 12.5c0 13.6 11.1 24.6 24.6 24.6 13.8 0 24.9-11.3 24.9-24.9s-11.1-24.9-24.9-24.9c-9.7 0-18 5.8-22.1 13.8l-61.2-13.6c-3-.8-6.1 1.4-6.9 4.4l-19.1 86.4c-33.2 1.4-63.1 11.3-85.5 26.8-6.1-6.4-14.7-10.2-24.1-10.2-34.9 0-46.3 46.9-14.4 62.8-1.1 5-1.7 10.2-1.7 15.5 0 52.6 59.2 95.2 132 95.2 73.1 0 132.3-42.6 132.3-95.2 0-5.3-.6-10.8-1.9-15.8 31.3-16 19.8-62.5-14.9-62.5zM302.8 331c-18.2 18.2-76.1 17.9-93.6 0-2.2-2.2-6.1-2.2-8.3 0-2.5 2.5-2.5 6.4 0 8.6 22.8 22.8 87.3 22.8 110.2 0 2.5-2.2 2.5-6.1 0-8.6-2.2-2.2-6.1-2.2-8.3 0zm7.7-75c-13.6 0-24.6 11.1-24.6 24.9 0 13.6 11.1 24.6 24.6 24.6 13.8 0 24.9-11.1 24.9-24.6 0-13.8-11-24.9-24.9-24.9z"></path></svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -24,7 +24,7 @@ ApplicationWindow {
visible: false
width: 1400
height: 788
title: "ScreenPlay Alpha - 0.13.0"
title: "ScreenPlay Alpha - " + ScreenPlay.version();
minimumHeight: 450
minimumWidth: 1050
onVisibilityChanged: {

View File

@ -105,9 +105,6 @@ Item {
id: repeater
model: ListModel {
id: webModel
ListElement {
url: "https://screen-play.app/blog/"
}
ListElement {
url: "https://kelteseth.gitlab.io/ScreenPlayDocs/"
}

View File

@ -30,7 +30,6 @@ Item {
XmlListModel {
id: feedModel
source: "https://screen-play.app/blog/index.xml"
onCountChanged: print(count)
query: "/rss/channel/item"
XmlRole {
name: "title"
@ -79,6 +78,7 @@ Item {
}
delegate: Item {
id: delegate
width: changelogFlickableWrapper.cellWidth - 20
height: changelogFlickableWrapper.cellHeight - 20
@ -86,8 +86,10 @@ Item {
anchors.fill: parent
anchors.margins: 5
color: Material.backgroundColor
clip: true
Image {
id: img
asynchronous: true
anchors.fill: parent
fillMode: Image.PreserveAspectCrop
@ -133,6 +135,7 @@ Item {
font.pointSize: 14
wrapMode: Text.WordWrap
}
Text {
id: txtPubDate
text: pubDate
@ -150,13 +153,40 @@ Item {
font.pointSize: 8
wrapMode: Text.WordWrap
}
MouseArea {
anchors.fill: parent
onClicked: Qt.openUrlExternally(link)
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
onEntered: delegate.state = "hover"
onExited: delegate.state = ""
}
}
transitions: [
Transition {
from: ""
to: "hover"
ScaleAnimator {
target: img
duration: 80
from: 1
to: 1.05
}
},
Transition {
from: "hover"
to: ""
ScaleAnimator {
target: img
duration: 80
from: 1.05
to: 1
}
}
]
}
ScrollBar.vertical: ScrollBar {

View File

@ -105,12 +105,9 @@ Item {
cursorShape: Qt.PointingHandCursor
hoverEnabled: true
onClicked: Qt.openUrlExternally(delegate.link)
onEntered: {
delegate.state = "hover"
}
onExited: {
delegate.state = ""
}
onEntered: delegate.state = "hover"
onExited: delegate.state = ""
}
}

View File

@ -133,7 +133,7 @@ Item {
text: root.customTitle
font.family: ScreenPlay.settings.font
font.pointSize: 16
visible: !screenPlayItemImage.visible && !showAnim.running
visible: !screenPlayItemImage.visible
color: Material.primaryTextColor
anchors.centerIn: parent
horizontalAlignment: Text.AlignHCenter
@ -183,7 +183,7 @@ Item {
MouseArea {
anchors.fill: parent
hoverEnabled: !root.isScrolling
hoverEnabled: !root.isScrolling && !showAnim.running
cursorShape: Qt.PointingHandCursor
acceptedButtons: Qt.LeftButton | Qt.RightButton
onEntered: {

View File

@ -376,6 +376,11 @@ Item {
url: "https://www.twitch.tv/kelteseth/"
color: "#6441A5"
}
GrowIconLink {
iconSource: "qrc:/assets/icons/brand_reddit.svg"
url: "https://www.reddit.com/r/ScreenPlayApp/"
color: "#FF4500"
}
}
Image {

View File

@ -288,26 +288,29 @@ Drawer {
}
}
Grid {
Flickable {
Layout.preferredHeight: 40
Layout.maximumHeight: 40
Layout.fillWidth: true
spacing: 5
padding: 2
clip: true
contentWidth: rowTagList.width + rpTagList.count * rowTagList.spacing
ListModel {
id: tagListModel
}
Row {
id: rowTagList
width: parent.width
spacing: 10
Repeater {
id: rpTagList
clip: true
anchors.fill: parent
delegate: Button {
id: txtTags
property string tags
text: name
font.pointSize: 8
font.family: ScreenPlay.settings.font
onClicked: {
root.tagClicked(txtTags.text)
onClicked: root.tagClicked(txtTags.text)
}
}
}

View File

@ -84,20 +84,11 @@ public:
};
Q_ENUM(VideoCodec)
float progress() const
{
return m_progress;
}
float progress() const { return m_progress; }
QString workingDir() const
{
return m_workingDir;
}
QString workingDir() const { return m_workingDir; }
QString ffmpegOutput() const
{
return m_ffmpegOutput;
}
QString ffmpegOutput() const { return m_ffmpegOutput; }
signals:
void createWallpaperStateChanged(CreateImportVideo::ImportVideoState state);

View File

@ -100,10 +100,7 @@ public:
};
Q_ENUM(ImportVideoState)
float progress() const
{
return m_progress;
}
float progress() const { return m_progress; }
bool m_skipAudio { false };

View File

@ -67,42 +67,27 @@ public:
\property GlobalVariables::localStoragePath
\brief Returns the localStoragePath.
*/
QUrl localStoragePath() const
{
return m_localStoragePath;
}
QUrl localStoragePath() const { return m_localStoragePath; }
/*!
\property GlobalVariables::localSettingsPath
\brief Returns the localSettingsPath.
*/
QUrl localSettingsPath() const
{
return m_localSettingsPath;
}
QUrl localSettingsPath() const { return m_localSettingsPath; }
/*!
\property GlobalVariables::wallpaperExecutablePath
\brief Returns the wallpaperExecutablePath. This only differes in development builds.
*/
QUrl wallpaperExecutablePath() const
{
return m_wallpaperExecutablePath;
}
QUrl wallpaperExecutablePath() const { return m_wallpaperExecutablePath; }
/*!
\property GlobalVariables::widgetExecutablePath
\brief Returns the widgetExecutablePath. This only differes in development builds.
*/
QUrl widgetExecutablePath() const
{
return m_widgetExecutablePath;
}
QUrl widgetExecutablePath() const { return m_widgetExecutablePath; }
/*!
\property GlobalVariables::m_version
\brief Returns the current app version. Not yet used.
*/
QVersionNumber version() const
{
return m_version;
}
QVersionNumber version() const { return m_version; }
signals:
void localStoragePathChanged(QUrl localStoragePath);

View File

@ -68,19 +68,10 @@ public:
QObject* parent = nullptr);
int activeWallpaperCounter() const
{
return m_activeWallpaperCounter;
}
int activeWallpaperCounter() const { return m_activeWallpaperCounter; }
int activeWidgetsCounter() const
{
return m_activeWidgetsCounter;
}
bool isAnotherScreenPlayInstanceRunning()
{
return m_isAnotherScreenPlayInstanceRunning;
}
int activeWidgetsCounter() const { return m_activeWidgetsCounter; }
bool isAnotherScreenPlayInstanceRunning() { return m_isAnotherScreenPlayInstanceRunning; }
void init(
const std::shared_ptr<GlobalVariables>& globalVariables,

View File

@ -95,60 +95,27 @@ public:
QJsonObject getActiveSettingsJson();
QVector<int> screenNumber() const
{
return m_screenNumber;
}
QVector<int> screenNumber() const { return m_screenNumber; }
QString previewImage() const
{
return m_previewImage;
}
QString previewImage() const { return m_previewImage; }
QString appID() const
{
return m_appID;
}
QString appID() const { return m_appID; }
InstalledType::InstalledType type() const
{
return m_type;
}
InstalledType::InstalledType type() const { return m_type; }
QString file() const
{
return m_file;
}
QString file() const { return m_file; }
FillMode::FillMode fillMode() const
{
return m_fillMode;
}
FillMode::FillMode fillMode() const { return m_fillMode; }
QString absolutePath() const
{
return m_absolutePath;
}
QString absolutePath() const { return m_absolutePath; }
float volume() const
{
return m_volume;
}
float volume() const { return m_volume; }
bool isLooping() const
{
return m_isLooping;
}
bool isLooping() const { return m_isLooping; }
ProjectSettingsListModel* getProjectSettingsListModel()
{
return &m_projectSettingsListModel;
}
ProjectSettingsListModel* getProjectSettingsListModel() { return &m_projectSettingsListModel; }
float playbackRate() const
{
return m_playbackRate;
}
float playbackRate() const { return m_playbackRate; }
signals:
void screenNumberChanged(QVector<int> screenNumber);

View File

@ -70,37 +70,19 @@ public:
ScreenPlayWidget() { }
QString previewImage() const
{
return m_previewImage;
}
QString previewImage() const { return m_previewImage; }
QPoint position() const
{
return m_position;
}
QPoint position() const { return m_position; }
QString absolutePath() const
{
return m_absolutePath;
}
QString absolutePath() const { return m_absolutePath; }
QString appID() const
{
return m_appID;
}
QString appID() const { return m_appID; }
InstalledType::InstalledType type() const
{
return m_type;
}
InstalledType::InstalledType type() const { return m_type; }
void setSDKConnection(const std::shared_ptr<SDKConnection>& connection);
ProjectSettingsListModel* getProjectSettingsListModel()
{
return &m_projectSettingsListModel;
}
ProjectSettingsListModel* getProjectSettingsListModel() { return &m_projectSettingsListModel; }
public slots:
QJsonObject getActiveSettingsJson();

View File

@ -72,25 +72,13 @@ public:
*/
explicit SDKConnection(QLocalSocket* socket, QObject* parent = nullptr);
QString appID() const
{
return m_appID;
}
QString appID() const { return m_appID; }
QLocalSocket* socket() const
{
return m_socket;
}
QLocalSocket* socket() const { return m_socket; }
QVector<int> monitor() const
{
return m_monitor;
}
QVector<int> monitor() const { return m_monitor; }
QString type() const
{
return m_type;
}
QString type() const { return m_type; }
signals:
void requestCloseAt(int at);

View File

@ -133,84 +133,24 @@ public:
};
Q_ENUM(Theme)
bool offlineMode() const
{
return m_offlineMode;
}
bool offlineMode() const { return m_offlineMode; }
bool getOfflineMode() const { return m_offlineMode; }
bool autostart() const { return m_autostart; }
bool highPriorityStart() const { return m_highPriorityStart; }
QString decoder() const { return m_decoder; }
QString gitBuildHash() const { return m_gitBuildHash; }
bool silentStart() const { return m_silentStart; }
bool anonymousTelemetry() const { return m_anonymousTelemetry; }
bool checkWallpaperVisible() const { return m_checkWallpaperVisible; }
ScreenPlay::FillMode::FillMode videoFillMode() const { return m_videoFillMode; }
Language language() const { return m_language; }
QString font() const { return m_font; }
Theme theme() const { return m_theme; }
bool steamVersion() const { return m_steamVersion; }
DesktopEnvironment desktopEnvironment() const { return m_desktopEnvironment; }
bool getOfflineMode() const
{
return m_offlineMode;
}
bool autostart() const
{
return m_autostart;
}
bool highPriorityStart() const
{
return m_highPriorityStart;
}
QString decoder() const
{
return m_decoder;
}
QString gitBuildHash() const
{
return m_gitBuildHash;
}
bool silentStart() const
{
return m_silentStart;
}
bool anonymousTelemetry() const
{
return m_anonymousTelemetry;
}
bool checkWallpaperVisible() const
{
return m_checkWallpaperVisible;
}
ScreenPlay::FillMode::FillMode videoFillMode() const
{
return m_videoFillMode;
}
Language language() const
{
return m_language;
}
public:
void setupLanguage();
QString font() const
{
return m_font;
}
Theme theme() const
{
return m_theme;
}
bool steamVersion() const
{
return m_steamVersion;
}
DesktopEnvironment desktopEnvironment() const
{
return m_desktopEnvironment;
}
signals:
void requestRetranslation();
void resetInstalledListmodel();