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

Update qdoc and formatting

turns out we need the Q_PROPERTY setter
in the cpp file for qdoc to recognize it
This commit is contained in:
Elias Steurer 2023-01-28 11:02:10 +01:00
parent 37db908db1
commit 64cde196eb
16 changed files with 309 additions and 182 deletions

View File

@ -2,70 +2,125 @@
# C:\Qt\6.1.0\msvc2019_64\bin\qdoc.exe config.qdocconf
# in this directory. You can shift + right click in this explorer
# window and select "Open PowerShell Window here" for this.
include(C:\Qt\6.1.0\msvc2019_64\doc\global\qt-cpp-defines.qdocconf)
include(C:\Qt\6.1.0\msvc2019_64\doc\global\compat.qdocconf)
include(C:\Qt\6.1.0\msvc2019_64\doc\global\fileextensions.qdocconf)
QT_VER = 6.4.1
QT_VERSION = 6.4.1
include(C:\Qt\6.4.1\msvc2019_64\doc\global\qt-cpp-defines.qdocconf)
include(C:\Qt\6.4.1\msvc2019_64\doc\global\compat.qdocconf)
include(C:\Qt\6.4.1\msvc2019_64\doc\global\fileextensions.qdocconf)
include(C:\Qt\6.4.1\msvc2019_64\doc\global\macros.qdocconf)
descripton = ScreenPlay is an open source cross plattform app for displaying Wallpaper, Widgets and AppDrawer.
language = Cpp
project = ScreenPlay
# Source
sourcedirs += ../ScreenPlay/src/
sourcedirs += ../ScreenPlay/
sourcedirs += ../ScreenPlaySDK/
sourcedirs += ../ScreenPlaySysInfo/
sourcedirs += ../ScreenPlayWallpaper/src/
sourcedirs += ../ScreenPlayWallpaper/
sourcedirs += ../ScreenPlayWidget/src/
sourcedirs += ../ScreenPlayWidget/
sourcedirs += ../ScreenPlayShader/
sourcedirs += ../ScreenPlayUtil/
sourcedirs += ../ScreenPlayUtil/src/
sourcedirs += ../ScreenPlay/
sourcedirs += ../ScreenPlay/inc/public/ScreenPlay/
sourcedirs += ../ScreenPlay/src/
sourcedirs += ../ScreenPlaySDK/
sourcedirs += ../ScreenPlaySDK/inc/public/ScreenPlaySDK/
sourcedirs += ../ScreenPlaySDK/src/
sourcedirs += ../ScreenPlayShader/
sourcedirs += ../ScreenPlayShader/src/
sourcedirs += ../ScreenPlaySysInfo/
sourcedirs += ../ScreenPlaySysInfo/src/
sourcedirs += ../ScreenPlayUtil/
sourcedirs += ../ScreenPlayUtil/inc/public/ScreenPlayUtil/
sourcedirs += ../ScreenPlayUtil/src/
sourcedirs += ../ScreenPlayWallpaper/
sourcedirs += ../ScreenPlayWallpaper/src/
sourcedirs += ../ScreenPlayWeather/
sourcedirs += ../ScreenPlayWeather/src/
sourcedirs += ../ScreenPlayWidget/
sourcedirs += ../ScreenPlayWidget/src/
sourcedirs += ../ScreenPlayWorkshop/
sourcedirs += ../ScreenPlayWorkshop/src/
# Header
headerdirs += ../ScreenPlay/src/
headerdirs += ../ScreenPlay/
headerdirs += ../ScreenPlaySDK/
headerdirs += ../ScreenPlaySDK/inc/
headerdirs += ../ScreenPlaySysInfo/
headerdirs += ../ScreenPlayWallpaper/src/
headerdirs += ../ScreenPlayWallpaper/
headerdirs += ../ScreenPlayWidget/src/
headerdirs += ../ScreenPlayWidget/
headerdirs += ../ScreenPlayShader/
headerdirs += ../ScreenPlayUtil/inc/
headerdirs += ../ScreenPlay/
headerdirs += ../ScreenPlay/inc/public/ScreenPlay/
headerdirs += ../ScreenPlay/src/
headerdirs += ../ScreenPlaySDK/
headerdirs += ../ScreenPlaySDK/inc/public/ScreenPlaySDK/
headerdirs += ../ScreenPlaySDK/src/
headerdirs += ../ScreenPlayShader/
headerdirs += ../ScreenPlayShader/src/
headerdirs += ../ScreenPlaySysInfo/
headerdirs += ../ScreenPlaySysInfo/src/
headerdirs += ../ScreenPlayUtil/
headerdirs += ../ScreenPlayUtil/inc/public/ScreenPlayUtil/
headerdirs += ../ScreenPlayUtil/src/
headerdirs += ../ScreenPlayWallpaper/
headerdirs += ../ScreenPlayWallpaper/src/
headerdirs += ../ScreenPlayWeather/
headerdirs += ../ScreenPlayWeather/src/
headerdirs += ../ScreenPlayWidget/
headerdirs += ../ScreenPlayWidget/src/
headerdirs += ../ScreenPlayWorkshop/
headerdirs += ../ScreenPlayWorkshop/src/
# Include
includepaths += ../ScreenPlay/src/
includepaths += ../ScreenPlay/
includepaths += ../ScreenPlay/inc/public/ScreenPlay/
includepaths += ../ScreenPlay/src/
includepaths += ../ScreenPlaySDK/
includepaths += ../ScreenPlaySDK/inc/public/ScreenPlaySDK/
includepaths += ../ScreenPlaySDK/src/
includepaths += ../ScreenPlaySysInfo/
includepaths += ../ScreenPlayWallpaper/src/
includepaths += ../ScreenPlayWallpaper/
includepaths += ../ScreenPlayWidget/src/
includepaths += ../ScreenPlayWidget/
includepaths += ../ScreenPlayShader/
includepaths += ../ScreenPlayShader/src/
includepaths += ../ScreenPlaySysInfo/
includepaths += ../ScreenPlaySysInfo/src/
includepaths += ../ScreenPlayUtil/
includepaths += ../ScreenPlayUtil/inc/public/ScreenPlayUtil/
includepaths += ../ScreenPlayUtil/src/
includepaths += ../ScreenPlayWallpaper/
includepaths += ../ScreenPlayWallpaper/src/
includepaths += ../ScreenPlayWeather/
includepaths += ../ScreenPlayWeather/src/
includepaths += ../ScreenPlayWidget/
includepaths += ../ScreenPlayWidget/src/
includepaths += ../ScreenPlayWorkshop/
includepaths += ../ScreenPlayWorkshop/src/
# qt
includepaths += C:/Qt/6.1.0/msvc2019_64/include/
includepaths += C:/Qt/6.1.0/msvc2019_64/include/QtCore/
includepaths += C:/Qt/6.1.0/msvc2019_64/include/QtGui/
includepaths += C:/Qt/6.1.0/msvc2019_64/include/QtQml/
includepaths += C:/Qt/6.1.0/msvc2019_64/include/QtWebEngine/
includepaths += C:/Qt/6.1.0/msvc2019_64/include/QtNetwork/
includepaths += C:/Qt/6.1.0/msvc2019_64/include/QtQuick/
includepaths += C:/Qt/6.1.0/msvc2019_64/include/QtQuickControls2/
QT_INSTALL_HEADERS = C:/Qt/6.4.1/msvc2019_64/include/
includepaths += C:/Qt/6.4.1/msvc2019_64/include/
includepaths += C:/Qt/6.4.1/msvc2019_64/include/QtCore/
includepaths += C:/Qt/6.4.1/msvc2019_64/include/QtGui/
includepaths += C:/Qt/6.4.1/msvc2019_64/include/QtQml/
includepaths += C:/Qt/6.4.1/msvc2019_64/include/QtWebEngine/
includepaths += C:/Qt/6.4.1/msvc2019_64/include/QtNetwork/
includepaths += C:/Qt/6.4.1/msvc2019_64/include/QtQuick/
includepaths += C:/Qt/6.4.1/msvc2019_64/include/QtQuickControls2/
# Images
imagedirs = ./images
# what kind of sources should be processed
sources.fileextensions += "*.qdoc *.cpp *.qml"

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -87,105 +87,19 @@ public slots:
QString version() const;
void showDockIcon(const bool show);
void exit();
QPointF cursorPos() { return QCursor::pos(); }
void setGlobalVariables(GlobalVariables* globalVariables)
{
if (m_globalVariables.get() == globalVariables)
return;
m_globalVariables.reset(globalVariables);
emit globalVariablesChanged(m_globalVariables.get());
}
void setScreenPlayManager(ScreenPlayManager* screenPlayManager)
{
if (m_screenPlayManager.get() == screenPlayManager)
return;
m_screenPlayManager.reset(screenPlayManager);
emit screenPlayManagerChanged(m_screenPlayManager.get());
}
void setCreate(Create* create)
{
if (m_create.get() == create)
return;
m_create.reset(create);
emit createChanged(m_create.get());
}
void setUtil(Util* util)
{
if (m_util.get() == util)
return;
m_util.reset(util);
emit utilChanged(m_util.get());
}
void setSettings(Settings* settings)
{
if (m_settings.get() == settings)
return;
m_settings.reset(settings);
emit settingsChanged(m_settings.get());
}
void setInstalledListModel(InstalledListModel* installedListModel)
{
if (m_installedListModel.get() == installedListModel)
return;
m_installedListModel.reset(installedListModel);
emit installedListModelChanged(m_installedListModel.get());
}
void setMonitorListModel(MonitorListModel* monitorListModel)
{
if (m_monitorListModel.get() == monitorListModel)
return;
m_monitorListModel.reset(monitorListModel);
emit monitorListModelChanged(m_monitorListModel.get());
}
void setProfileListModel(ProfileListModel* profileListModel)
{
if (m_profileListModel.get() == profileListModel)
return;
m_profileListModel.reset(profileListModel);
emit profileListModelChanged(m_profileListModel.get());
}
void setInstalledListFilter(InstalledListFilter* installedListFilter)
{
if (m_installedListFilter.get() == installedListFilter)
return;
m_installedListFilter.reset(installedListFilter);
emit installedListFilterChanged(m_installedListFilter.get());
}
void setMainWindowEngine(QQmlApplicationEngine* mainWindowEngine)
{
if (m_mainWindowEngine.get() == mainWindowEngine)
return;
m_mainWindowEngine.reset(mainWindowEngine);
emit mainWindowEngineChanged(m_mainWindowEngine.get());
}
void setWizards(Wizards* wizards)
{
if (m_wizards.get() == wizards)
return;
m_wizards.reset(wizards);
emit wizardsChanged(m_wizards.get());
}
void setGlobalVariables(GlobalVariables* globalVariables);
void setScreenPlayManager(ScreenPlayManager* screenPlayManager);
void setCreate(Create* create);
void setUtil(Util* util);
void setSettings(Settings* settings);
void setInstalledListModel(InstalledListModel* installedListModel);
void setMonitorListModel(MonitorListModel* monitorListModel);
void setProfileListModel(ProfileListModel* profileListModel);
void setInstalledListFilter(InstalledListFilter* installedListFilter);
void setMainWindowEngine(QQmlApplicationEngine* mainWindowEngine);
void setWizards(Wizards* wizards);
private:
bool setupKDE();

View File

@ -19,7 +19,7 @@ int main(int argc, char* argv[])
{
#if !defined(Q_OS_LINUX)
qputenv("QT_MEDIA_BACKEND","ffmpeg");
qputenv("QT_MEDIA_BACKEND", "ffmpeg");
#endif
#if defined(Q_OS_WIN)

View File

@ -5,15 +5,19 @@
#include "ScreenPlayUtil/macutils.h"
#endif
#include "app.h"
#include "steam/steam_qt_enums_generated.h"
#include <QProcessEnvironment>
#include <QQuickStyle>
#include <QVersionNumber>
namespace ScreenPlay {
/*!
\module ScreenPlay
\title ScreenPlay
\brief Module for ScreenPlay.
*/
/*!
@ -344,4 +348,158 @@ void App::showDockIcon(const bool show)
#endif
}
/*!
\property App::globalVariables
\brief .
.
*/
void App::setGlobalVariables(GlobalVariables* globalVariables)
{
if (m_globalVariables.get() == globalVariables)
return;
m_globalVariables.reset(globalVariables);
emit globalVariablesChanged(m_globalVariables.get());
}
/*!
\property App::screenPlayManager
\brief .
.
*/
void App::setScreenPlayManager(ScreenPlayManager* screenPlayManager)
{
if (m_screenPlayManager.get() == screenPlayManager)
return;
m_screenPlayManager.reset(screenPlayManager);
emit screenPlayManagerChanged(m_screenPlayManager.get());
}
/*!
\property App::create
\brief .
.
*/
void App::setCreate(Create* create)
{
if (m_create.get() == create)
return;
m_create.reset(create);
emit createChanged(m_create.get());
}
/*!
\property App::util
\brief .
.
*/
void App::setUtil(Util* util)
{
if (m_util.get() == util)
return;
m_util.reset(util);
emit utilChanged(m_util.get());
}
/*!
\property App::settings
\brief .
.
*/
void App::setSettings(Settings* settings)
{
if (m_settings.get() == settings)
return;
m_settings.reset(settings);
emit settingsChanged(m_settings.get());
}
/*!
\property App::installedListModel
\brief .
.
*/
void App::setInstalledListModel(InstalledListModel* installedListModel)
{
if (m_installedListModel.get() == installedListModel)
return;
m_installedListModel.reset(installedListModel);
emit installedListModelChanged(m_installedListModel.get());
}
/*!
\property App::monitorListModel
\brief .
.
*/
void App::setMonitorListModel(MonitorListModel* monitorListModel)
{
if (m_monitorListModel.get() == monitorListModel)
return;
m_monitorListModel.reset(monitorListModel);
emit monitorListModelChanged(m_monitorListModel.get());
}
/*!
\property App::profileListModel
\brief .
.
*/
void App::setProfileListModel(ProfileListModel* profileListModel)
{
if (m_profileListModel.get() == profileListModel)
return;
m_profileListModel.reset(profileListModel);
emit profileListModelChanged(m_profileListModel.get());
}
/*!
\property App::installedListFilter
\brief .
.
*/
void App::setInstalledListFilter(InstalledListFilter* installedListFilter)
{
if (m_installedListFilter.get() == installedListFilter)
return;
m_installedListFilter.reset(installedListFilter);
emit installedListFilterChanged(m_installedListFilter.get());
}
/*!
\property App::mainWindowEngine
\brief .
.
*/
void App::setMainWindowEngine(QQmlApplicationEngine* mainWindowEngine)
{
if (m_mainWindowEngine.get() == mainWindowEngine)
return;
m_mainWindowEngine.reset(mainWindowEngine);
emit mainWindowEngineChanged(m_mainWindowEngine.get());
}
/*!
\property App::wizards
\brief .
.
*/
void App::setWizards(Wizards* wizards)
{
if (m_wizards.get() == wizards)
return;
m_wizards.reset(wizards);
emit wizardsChanged(m_wizards.get());
}
}

View File

@ -32,15 +32,14 @@ void ScreenPlaySDK::start()
connect(&m_socket, &QLocalSocket::connected, this, &ScreenPlaySDK::connected);
connect(&m_socket, &QLocalSocket::disconnected, this, &ScreenPlaySDK::disconnected);
connect(&m_socket, &QLocalSocket::readyRead, this, &ScreenPlaySDK::readyRead);
connect(&m_socket, &QLocalSocket::errorOccurred, this, [this](){
connect(&m_socket, &QLocalSocket::errorOccurred, this, [this]() {
emit disconnected();
});
m_socket.connectToServer("ScreenPlay");
if (!m_socket.waitForConnected(1000)){
if (!m_socket.waitForConnected(1000)) {
emit disconnected();
}
}
ScreenPlaySDK::~ScreenPlaySDK()
@ -57,14 +56,14 @@ void ScreenPlaySDK::sendMessage(const QJsonObject& obj)
void ScreenPlaySDK::connected()
{
if (m_appID.isEmpty() || m_type.isEmpty()) {
qCritical() << "Unable to connect with empyt: " << m_appID << m_type;
emit disconnected();
return;
}
QByteArray welcomeMessage = QString("appID="+m_appID + "," + m_type).toUtf8();
QByteArray welcomeMessage = QString("appID=" + m_appID + "," + m_type).toUtf8();
m_socket.write(welcomeMessage);
if (!m_socket.waitForBytesWritten()) {
disconnected();

View File

@ -2,19 +2,19 @@
namespace ScreenPlay {
Q_NAMESPACE
Q_NAMESPACE
enum class WallpaperExitCode {
Ok = 0,
Invalid_ArgumentSize,
Invalid_ActiveScreensList,
Invalid_InstalledType ,
Invalid_CheckWallpaperVisible ,
Invalid_Volume ,
Invalid_AppID ,
Invalid_Setup_ProjectParsingError ,
Invalid_Setup_Error ,
Invalid_Start_Windows_HandleError ,
Invalid_InstalledType,
Invalid_CheckWallpaperVisible,
Invalid_Volume,
Invalid_AppID,
Invalid_Setup_ProjectParsingError,
Invalid_Setup_Error,
Invalid_Start_Windows_HandleError,
};
Q_ENUM_NS(WallpaperExitCode)
}

View File

@ -57,7 +57,7 @@ bool ProjectFile::init()
if (obj.contains("previewThumbnail")) {
preview = obj.value("previewThumbnail").toString();
} else {
if (obj.contains("preview"))
if (obj.contains("preview"))
preview = obj.value("preview").toString();
}
@ -72,7 +72,6 @@ bool ProjectFile::init()
}
}
if (type == InstalledType::InstalledType::GifWallpaper) {
preview = previewGIF;
}

View File

@ -5,8 +5,8 @@
#include <QtGlobal>
#include <QtWebEngineQuick>
#include "ScreenPlayUtil/util.h"
#include "ScreenPlayUtil/exitcodes.h"
#include "ScreenPlayUtil/util.h"
#if defined(Q_OS_WIN)
#include "src/winwindow.h"
@ -20,10 +20,10 @@ Q_IMPORT_QML_PLUGIN(ScreenPlaySysInfoPlugin)
Q_IMPORT_QML_PLUGIN(ScreenPlayWeatherPlugin)
int main(int argc, char* argv[])
{
{
#if !defined(Q_OS_LINUX)
qputenv("QT_MEDIA_BACKEND","ffmpeg");
qputenv("QT_MEDIA_BACKEND", "ffmpeg");
#endif
QApplication::setAttribute(Qt::AA_ShareOpenGLContexts);
@ -47,7 +47,7 @@ int main(int argc, char* argv[])
if (argumentList.length() == 1) {
window.setActiveScreensList({ 0 });
window.setProjectPath("test");
//window.setProjectPath("C:/Program Files (x86)/Steam/steamapps/workshop/content/672870/19112022140605-Horde 1980");
// window.setProjectPath("C:/Program Files (x86)/Steam/steamapps/workshop/content/672870/19112022140605-Horde 1980");
window.setAppID("test");
window.setVolume(1);
window.setFillMode("fill");

View File

@ -14,9 +14,9 @@
#include <QSysInfo>
#include <QtQml>
#include "ScreenPlayUtil/util.h"
#include "ScreenPlayUtil/exitcodes.h"
#include "ScreenPlaySDK/screenplaysdk.h"
#include "ScreenPlayUtil/exitcodes.h"
#include "ScreenPlayUtil/util.h"
#include <memory>

View File

@ -17,7 +17,7 @@
class LinuxX11Window : public BaseWindow {
Q_OBJECT
public:
ScreenPlay::WallpaperExitCode start() override;

View File

@ -1,15 +1,14 @@
// SPDX-License-Identifier: LicenseRef-EliasSteurerTachiom OR AGPL-3.0-only
#include "macwindow.h"
ScreenPlay::WallpaperExitCode MacWindow::start()
{
auto* screen = QGuiApplication::screens().at(activeScreensList().at(0));
m_window.setGeometry(screen->geometry());
qmlRegisterSingletonInstance<MacWindow>("ScreenPlayWallpaper", 1, 0, "Wallpaper", this);
if(!debugMode()){
if (!debugMode()) {
connect(m_sdk.get(), &ScreenPlaySDK::sdkDisconnected, this, &MacWindow::destroyThis);
}

View File

@ -121,7 +121,7 @@ ScreenPlay::WallpaperExitCode WinWindow::start()
},
Qt::QueuedConnection);
auto* guiAppInst = dynamic_cast<QApplication*>(QApplication::instance());
if(!debugMode()){
if (!debugMode()) {
connect(m_sdk.get(), &ScreenPlaySDK::sdkDisconnected, this, &WinWindow::destroyThis);
}
connect(guiAppInst, &QApplication::screenAdded, this, &WinWindow::configureWindowGeometry);

View File

@ -16,7 +16,7 @@ int main(int argc, char* argv[])
{
#if !defined(Q_OS_LINUX)
qputenv("QT_MEDIA_BACKEND","ffmpeg");
qputenv("QT_MEDIA_BACKEND", "ffmpeg");
#endif
QtWebEngineQuick::initialize();

View File

@ -4,18 +4,22 @@ import subprocess
import os
import shutil
from sys import stdout
import defines
stdout.reconfigure(encoding='utf-8')
def main():
print("\nRuns qdoc with the settings from Docs/config.qdocconf. For this you need to have Qt 6.1 installed!")
shutil.rmtree('../Docs/html/')
os.mkdir('../Docs/html/')
if os.name == "nt":
process = subprocess.Popen("C:\\Qt\\6.1.0\\msvc2019_64\\bin\\qdoc.exe ../Docs/config.qdocconf", stdout=subprocess.PIPE)
else:
process = subprocess.Popen("qdoc ../Docs/configCI.qdocconf", stdout=subprocess.PIPE)
qt_bin_path = defines.QT_BIN_PATH
executable = "qdoc"
if os.name == 'nt':
executable = "qdoc.exe"
executable = qt_bin_path.joinpath(executable)
process = subprocess.Popen(f"{executable} ../Docs/config.qdocconf", stdout=subprocess.PIPE)
if __name__ == "__main__":
main()