mirror of
https://gitlab.com/kelteseth/ScreenPlay.git
synced 2024-11-25 12:13:00 +01:00
Remove aimber
This commit is contained in:
parent
5146a34a70
commit
90990b827f
@ -23,11 +23,8 @@ SOURCES += main.cpp \
|
||||
src/screenplaywidget.cpp \
|
||||
src/settings.cpp \
|
||||
src/profilelistmodel.cpp \
|
||||
src/profile.cpp \
|
||||
src/projectfile.cpp \
|
||||
src/installedlistfilter.cpp \
|
||||
src/sdkconnector.cpp \
|
||||
src/projectsettingslistitem.cpp \
|
||||
src/projectsettingslistmodel.cpp \
|
||||
src/screenplay.cpp \
|
||||
src/qmlutilities.cpp \
|
||||
|
@ -78,7 +78,7 @@ int main(int argc, char* argv[])
|
||||
// Instead of setting "renderType: Text.NativeRendering" every time
|
||||
// we can set it here once :)
|
||||
auto* window = static_cast<QQuickWindow*>(mainWindowEngine.rootObjects().first());
|
||||
if(!window)
|
||||
if (!window)
|
||||
qFatal("Could not receive window to set font rendering.");
|
||||
|
||||
window->setTextRenderType(QQuickWindow::TextRenderType::NativeTextRendering);
|
||||
|
@ -4,7 +4,7 @@ import QtQuick.Controls.Material 2.2
|
||||
import QtQuick.Particles 2.0
|
||||
import QtGraphicalEffects 1.0
|
||||
|
||||
import net.aimber.create 1.0
|
||||
import app.screenplay.create 1.0
|
||||
|
||||
import "Wizards/CreateWallpaper"
|
||||
|
||||
|
@ -4,7 +4,7 @@ import QtQuick.Controls 2.2
|
||||
import QtQuick.Controls.Material 2.3
|
||||
import Qt.labs.platform 1.0
|
||||
import QtQuick.Layouts 1.3
|
||||
import net.aimber.create 1.0
|
||||
import app.screenplay.create 1.0
|
||||
|
||||
Item {
|
||||
id: wrapperError
|
||||
|
@ -5,7 +5,7 @@ import QtQuick.Controls.Material 2.3
|
||||
import Qt.labs.platform 1.0
|
||||
import QtQuick.Layouts 1.12
|
||||
|
||||
import net.aimber.create 1.0
|
||||
import app.screenplay.create 1.0
|
||||
|
||||
import "../../../Common"
|
||||
|
||||
|
@ -5,7 +5,7 @@ import QtQuick.Controls.Material 2.3
|
||||
import Qt.labs.platform 1.0
|
||||
import QtQuick.Layouts 1.3
|
||||
|
||||
import net.aimber.create 1.0
|
||||
import app.screenplay.create 1.0
|
||||
|
||||
Item {
|
||||
id: createNew
|
||||
|
@ -394,7 +394,7 @@ Item {
|
||||
description: qsTr("ScreenPlay would not be possible without the work of others. A big thank you to: ")
|
||||
buttonText: qsTr("Licenses")
|
||||
onButtonPressed: {
|
||||
screenPlaySettings.requestAllLicenses()
|
||||
utility.requestAllLicenses()
|
||||
expanderCopyright.toggle()
|
||||
}
|
||||
}
|
||||
@ -407,7 +407,7 @@ Item {
|
||||
|
||||
|
||||
Connections {
|
||||
target: screenPlaySettings
|
||||
target: utility
|
||||
onAllLicenseLoaded: {
|
||||
expanderCopyright.text = licensesText
|
||||
}
|
||||
@ -420,7 +420,7 @@ Item {
|
||||
description: qsTr("We use you data very carefully to improve ScreenPlay. We do not sell or share this (anonymous) information with others!")
|
||||
buttonText: qsTr("Privacy")
|
||||
onButtonPressed: {
|
||||
screenPlaySettings.requestAllLDataProtection()
|
||||
utility.requestAllLDataProtection()
|
||||
expanderDataProtection.toggle()
|
||||
}
|
||||
}
|
||||
@ -433,7 +433,7 @@ Item {
|
||||
|
||||
|
||||
Connections {
|
||||
target: screenPlaySettings
|
||||
target: utility
|
||||
onAllDataProtectionLoaded: {
|
||||
expanderDataProtection.text = dataProtectionText
|
||||
}
|
||||
|
@ -2,7 +2,7 @@ import QtQuick 2.12
|
||||
import QtQuick.Controls 2.3
|
||||
import QtQuick.Controls.Material 2.2
|
||||
import QtGraphicalEffects 1.0
|
||||
import net.aimber.workshop 1.0
|
||||
import app.screenplay.workshop 1.0
|
||||
|
||||
Item {
|
||||
id: workshop
|
||||
|
@ -1,5 +1,5 @@
|
||||
import QtQuick 2.12
|
||||
import net.aimber.workshop 1.0
|
||||
import app.screenplay.workshop 1.0
|
||||
|
||||
Item {
|
||||
|
||||
|
@ -16,8 +16,8 @@ Create::Create(const shared_ptr<Settings>& settings, QObject* parent)
|
||||
|
||||
{
|
||||
qRegisterMetaType<CreateImportVideo::State>();
|
||||
qmlRegisterType<Create>("net.aimber.create", 1, 0, "Create");
|
||||
qmlRegisterType<CreateImportVideo>("net.aimber.create", 1, 0, "CreateImportVideo");
|
||||
qmlRegisterType<Create>("app.screenplay.create", 1, 0, "Create");
|
||||
qmlRegisterType<CreateImportVideo>("app.screenplay.create", 1, 0, "CreateImportVideo");
|
||||
}
|
||||
|
||||
// Constructor for the QMLEngine
|
||||
@ -26,8 +26,8 @@ Create::Create()
|
||||
, m_settings(nullptr)
|
||||
{
|
||||
qRegisterMetaType<CreateImportVideo::State>();
|
||||
qmlRegisterType<Create>("net.aimber.create", 1, 0, "Create");
|
||||
qmlRegisterType<CreateImportVideo>("net.aimber.create", 1, 0, "CreateImportVideo");
|
||||
qmlRegisterType<Create>("app.screenplay.create", 1, 0, "Create");
|
||||
qmlRegisterType<CreateImportVideo>("app.screenplay.create", 1, 0, "CreateImportVideo");
|
||||
}
|
||||
|
||||
void Create::createWallpaperStart(QString videoPath)
|
||||
|
@ -2,9 +2,10 @@
|
||||
|
||||
MonitorListModel::MonitorListModel(QObject* parent)
|
||||
: QAbstractListModel(parent)
|
||||
, m_qGuiApplication(static_cast<QGuiApplication*>(QGuiApplication::instance()))
|
||||
{
|
||||
loadMonitors();
|
||||
m_qGuiApplication = static_cast<QGuiApplication*>(QGuiApplication::instance());
|
||||
|
||||
connect(m_qGuiApplication, &QGuiApplication::screenAdded, this, &MonitorListModel::screenAdded);
|
||||
connect(m_qGuiApplication, &QGuiApplication::screenRemoved, this, &MonitorListModel::screenRemoved);
|
||||
}
|
||||
@ -128,26 +129,16 @@ void MonitorListModel::wallpaperRemoved()
|
||||
{
|
||||
}
|
||||
|
||||
bool MonitorListModel::getMonitorListItemAt(int position, Monitor* monitor)
|
||||
{
|
||||
//TODO Reimplement wallpaper replacement
|
||||
// if (position < 0 && position > m_monitorList.size()) {
|
||||
// return false;
|
||||
// } else {
|
||||
// *monitor = m_monitorList.at(position);
|
||||
// return true;
|
||||
// }
|
||||
return true;
|
||||
}
|
||||
|
||||
void MonitorListModel::screenAdded(QScreen* screen)
|
||||
{
|
||||
Q_UNUSED(screen)
|
||||
reset();
|
||||
loadMonitors();
|
||||
}
|
||||
|
||||
void MonitorListModel::screenRemoved(QScreen* screen)
|
||||
{
|
||||
Q_UNUSED(screen)
|
||||
reset();
|
||||
loadMonitors();
|
||||
}
|
||||
@ -186,10 +177,6 @@ void MonitorListModel::reloadMonitors()
|
||||
loadMonitors();
|
||||
}
|
||||
|
||||
Monitor::Monitor()
|
||||
{
|
||||
}
|
||||
|
||||
Monitor::Monitor(QString manufacturer, QString model, QString name, QSize size, QRect availableGeometry, int number, QRect availableVirtualGeometry, QRect geometry, QScreen* screen)
|
||||
{
|
||||
m_screen = screen;
|
||||
|
@ -32,7 +32,7 @@ public:
|
||||
QHash<int, QByteArray> roleNames() const override;
|
||||
|
||||
enum MonitorRole {
|
||||
IDRole,
|
||||
IDRole = Qt::UserRole,
|
||||
NameRole,
|
||||
SizeRole,
|
||||
AvailableGeometryRole,
|
||||
@ -49,7 +49,6 @@ public:
|
||||
int rowCount(const QModelIndex& parent = QModelIndex()) const override;
|
||||
QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const override;
|
||||
|
||||
bool getMonitorListItemAt(int position, Monitor* monitor);
|
||||
void loadMonitors();
|
||||
void screenAdded(QScreen* screen);
|
||||
void screenRemoved(QScreen* screen);
|
||||
@ -65,7 +64,7 @@ public slots:
|
||||
|
||||
private:
|
||||
QVector<Monitor> m_monitorList;
|
||||
QGuiApplication* m_qGuiApplication;
|
||||
const QGuiApplication* const m_qGuiApplication;
|
||||
QVector<QSharedPointer<ProjectSettingsListModel>> m_plm;
|
||||
|
||||
signals:
|
||||
@ -75,7 +74,7 @@ signals:
|
||||
|
||||
struct Monitor {
|
||||
|
||||
Monitor();
|
||||
Monitor() {}
|
||||
Monitor(QString manufacturer, QString model, QString name, QSize size, QRect availableGeometry, int number, QRect availableVirtualGeometry, QRect geometry, QScreen* screen);
|
||||
|
||||
QString m_id;
|
||||
|
@ -1,17 +0,0 @@
|
||||
#include "profile.h"
|
||||
|
||||
Profile::Profile()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
Profile::Profile(QUrl absolutePath, QString id, QString version, QString wallpaperId, QRect rect, bool isLooping)
|
||||
{
|
||||
m_absolutePath = absolutePath;
|
||||
m_id = id;
|
||||
m_version = version;
|
||||
m_wallpaperId = wallpaperId;
|
||||
m_rect = rect;
|
||||
m_isLooping = isLooping;
|
||||
}
|
||||
|
@ -12,8 +12,16 @@
|
||||
|
||||
struct Profile {
|
||||
|
||||
Profile();
|
||||
Profile(QUrl absolutePath, QString id, QString version, QString wallpaperId, QRect rect, bool isLooping);
|
||||
Profile() {}
|
||||
Profile(QUrl absolutePath, QString id, QString version, QString wallpaperId, QRect rect, bool isLooping)
|
||||
{
|
||||
m_absolutePath = absolutePath;
|
||||
m_id = id;
|
||||
m_version = version;
|
||||
m_wallpaperId = wallpaperId;
|
||||
m_rect = rect;
|
||||
m_isLooping = isLooping;
|
||||
}
|
||||
|
||||
QUrl m_absolutePath;
|
||||
QString m_id;
|
||||
|
@ -1,51 +0,0 @@
|
||||
#include "projectfile.h"
|
||||
|
||||
ProjectFile::ProjectFile(QJsonObject obj, QString folderName, QUrl absolutePath)
|
||||
{
|
||||
|
||||
if (obj.contains("description"))
|
||||
m_description = obj.value("description");
|
||||
|
||||
if (obj.contains("file"))
|
||||
m_file = obj.value("file");
|
||||
|
||||
if (obj.contains("preview"))
|
||||
m_preview = obj.value("preview");
|
||||
|
||||
if (obj.contains("previewGIF"))
|
||||
m_previewGIF = obj.value("previewGIF");
|
||||
|
||||
if (obj.contains("title"))
|
||||
m_title = obj.value("title");
|
||||
|
||||
if (obj.contains("type")) {
|
||||
QString tmp = obj.value("type").toString().toLower();
|
||||
if (tmp == "video") {
|
||||
m_type = "video";
|
||||
} else if (tmp == "qmlwidget" || tmp == "standalonewidget") {
|
||||
m_type = "widget";
|
||||
} else if (tmp == "qmlscene") {
|
||||
m_type = "qmlScene";
|
||||
} else if (tmp == "html") {
|
||||
m_type = "html";
|
||||
}
|
||||
}
|
||||
|
||||
if (obj.contains("workshopid")) {
|
||||
m_workshopID = obj.value("workshopid").toInt();
|
||||
} else {
|
||||
m_workshopID = 0;
|
||||
}
|
||||
|
||||
m_absoluteStoragePath = QUrl(absolutePath.toString() + "/" + folderName);
|
||||
|
||||
m_folderId = folderName;
|
||||
}
|
||||
|
||||
ProjectFile::ProjectFile()
|
||||
{
|
||||
}
|
||||
|
||||
ProjectFile::~ProjectFile()
|
||||
{
|
||||
}
|
@ -14,9 +14,50 @@
|
||||
|
||||
struct ProjectFile {
|
||||
|
||||
explicit ProjectFile(QJsonObject obj, QString folderName, QUrl absolutePath);
|
||||
ProjectFile();
|
||||
~ProjectFile();
|
||||
ProjectFile(QJsonObject obj, QString folderName, QUrl absolutePath)
|
||||
{
|
||||
|
||||
if (obj.contains("description"))
|
||||
m_description = obj.value("description");
|
||||
|
||||
if (obj.contains("file"))
|
||||
m_file = obj.value("file");
|
||||
|
||||
if (obj.contains("preview"))
|
||||
m_preview = obj.value("preview");
|
||||
|
||||
if (obj.contains("previewGIF"))
|
||||
m_previewGIF = obj.value("previewGIF");
|
||||
|
||||
if (obj.contains("title"))
|
||||
m_title = obj.value("title");
|
||||
|
||||
if (obj.contains("type")) {
|
||||
QString tmp = obj.value("type").toString().toLower();
|
||||
if (tmp == "video") {
|
||||
m_type = "video";
|
||||
} else if (tmp == "qmlwidget" || tmp == "standalonewidget") {
|
||||
m_type = "widget";
|
||||
} else if (tmp == "qmlscene") {
|
||||
m_type = "qmlScene";
|
||||
} else if (tmp == "html") {
|
||||
m_type = "html";
|
||||
}
|
||||
}
|
||||
|
||||
if (obj.contains("workshopid")) {
|
||||
m_workshopID = obj.value("workshopid").toInt();
|
||||
} else {
|
||||
m_workshopID = 0;
|
||||
}
|
||||
|
||||
m_absoluteStoragePath = QUrl(absolutePath.toString() + "/" + folderName);
|
||||
|
||||
m_folderId = folderName;
|
||||
}
|
||||
|
||||
ProjectFile() {}
|
||||
~ProjectFile() {}
|
||||
|
||||
QVariant m_description;
|
||||
QVariant m_file;
|
||||
|
@ -1,19 +0,0 @@
|
||||
#include "projectsettingslistitem.h"
|
||||
|
||||
ProjectSettingsListItem::ProjectSettingsListItem(QString name, bool isHeadline, QVariant value)
|
||||
{
|
||||
m_name = name;
|
||||
m_isHeadline = isHeadline;
|
||||
m_value = value;
|
||||
}
|
||||
|
||||
ProjectSettingsListItem::ProjectSettingsListItem()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
ProjectSettingsListItem::~ProjectSettingsListItem()
|
||||
{
|
||||
|
||||
}
|
||||
|
@ -12,9 +12,14 @@
|
||||
|
||||
struct ProjectSettingsListItem {
|
||||
|
||||
ProjectSettingsListItem(QString name, bool isHeadline, QVariant value);
|
||||
ProjectSettingsListItem();
|
||||
~ProjectSettingsListItem();
|
||||
ProjectSettingsListItem(QString name, bool isHeadline, QVariant value)
|
||||
{
|
||||
m_name = name;
|
||||
m_isHeadline = isHeadline;
|
||||
m_value = value;
|
||||
}
|
||||
ProjectSettingsListItem() {}
|
||||
~ProjectSettingsListItem() {}
|
||||
QString m_name;
|
||||
bool m_isHeadline;
|
||||
QVariant m_value;
|
||||
|
@ -29,7 +29,7 @@ public:
|
||||
QHash<int, QByteArray> roleNames() const override;
|
||||
|
||||
enum ProjectSettingsRole {
|
||||
NameRole,
|
||||
NameRole = Qt::UserRole,
|
||||
IsHeadlineRole,
|
||||
ValueRole,
|
||||
};
|
||||
|
@ -40,3 +40,61 @@ void QMLUtilities::openFolderInExplorer(QString url)
|
||||
explorer.startDetached();
|
||||
}
|
||||
|
||||
void QMLUtilities::QMLUtilities::requestAllLicenses()
|
||||
{
|
||||
|
||||
QtConcurrent::run([this]() {
|
||||
QString tmp;
|
||||
QFile file;
|
||||
QTextStream out(&file);
|
||||
|
||||
file.setFileName(":/legal/Font Awesome Free License.txt");
|
||||
file.open(QIODevice::ReadOnly | QIODevice::Text);
|
||||
tmp += out.readAll();
|
||||
file.close();
|
||||
|
||||
file.setFileName(":/legal/gpl-3.0.txt");
|
||||
file.open(QIODevice::ReadOnly | QIODevice::Text);
|
||||
tmp += out.readAll();
|
||||
file.close();
|
||||
|
||||
file.setFileName(":/legal/gpl-3.0.txt");
|
||||
file.open(QIODevice::ReadOnly | QIODevice::Text);
|
||||
tmp += out.readAll();
|
||||
file.close();
|
||||
|
||||
file.setFileName(":/legal/OFL.txt");
|
||||
file.open(QIODevice::ReadOnly | QIODevice::Text);
|
||||
tmp += out.readAll();
|
||||
file.close();
|
||||
|
||||
file.setFileName(":/legal/OpenSSL.txt");
|
||||
file.open(QIODevice::ReadOnly | QIODevice::Text);
|
||||
tmp += out.readAll();
|
||||
file.close();
|
||||
|
||||
file.setFileName(":/legal/Qt LGPLv3.txt");
|
||||
file.open(QIODevice::ReadOnly | QIODevice::Text);
|
||||
tmp += out.readAll();
|
||||
file.close();
|
||||
|
||||
emit this->allLicenseLoaded(tmp);
|
||||
});
|
||||
}
|
||||
|
||||
void QMLUtilities::QMLUtilities::requestAllLDataProtection()
|
||||
{
|
||||
QtConcurrent::run([this]() {
|
||||
QString tmp;
|
||||
QFile file;
|
||||
QTextStream out(&file);
|
||||
|
||||
file.setFileName(":/legal/DataProtection.txt");
|
||||
file.open(QIODevice::ReadOnly | QIODevice::Text);
|
||||
tmp += out.readAll();
|
||||
file.close();
|
||||
|
||||
emit this->allDataProtectionLoaded(tmp);
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -6,6 +6,7 @@
|
||||
#include <QObject>
|
||||
#include <QProcess>
|
||||
#include <QString>
|
||||
#include <QtConcurrent/QtConcurrent>
|
||||
|
||||
/*!
|
||||
\class Global QML Utilities
|
||||
@ -26,6 +27,8 @@ signals:
|
||||
void requestNavigationActive(bool isActive);
|
||||
void requestToggleWallpaperConfiguration();
|
||||
|
||||
void allLicenseLoaded(QString licensesText);
|
||||
void allDataProtectionLoaded(QString dataProtectionText);
|
||||
public slots:
|
||||
void setNavigation(QString nav);
|
||||
void setNavigationActive(bool isActive);
|
||||
@ -33,5 +36,8 @@ public slots:
|
||||
void setToggleWallpaperConfiguration();
|
||||
void openFolderInExplorer(QString url);
|
||||
|
||||
void requestAllLicenses();
|
||||
void requestAllLDataProtection();
|
||||
|
||||
QString fixWindowsPath(QString url);
|
||||
};
|
||||
|
@ -24,8 +24,6 @@ void ScreenPlay::createWallpaper(
|
||||
return;
|
||||
}
|
||||
|
||||
// Remove previous wallpaper, if any
|
||||
//this->removeWallpaperAt(0);
|
||||
m_settings->increaseActiveWallpaperCounter();
|
||||
|
||||
m_screenPlayWallpapers.emplace_back(
|
||||
@ -42,6 +40,8 @@ void ScreenPlay::createWallpaper(
|
||||
|
||||
m_monitorListModel->setWallpaperActiveMonitor(m_qGuiApplication->screens().at(monitorIndex),
|
||||
QString { absoluteStoragePath.toLocalFile() + "/" + previewImage });
|
||||
|
||||
m_settings->saveWallpaperToConfig(monitorIndex, absoluteStoragePath, type);
|
||||
}
|
||||
|
||||
void ScreenPlay::createWidget(QUrl absoluteStoragePath, const QString& previewImage)
|
||||
@ -62,9 +62,9 @@ void ScreenPlay::createWidget(QUrl absoluteStoragePath, const QString& previewIm
|
||||
this));
|
||||
}
|
||||
|
||||
void ScreenPlay::removeAllWallpaper() noexcept
|
||||
void ScreenPlay::removeAllWallpaper()
|
||||
{
|
||||
if (m_sdkconnector && m_settings && !m_screenPlayWallpapers.empty()) {
|
||||
if (m_settings && !m_screenPlayWallpapers.empty()) {
|
||||
m_sdkconnector->closeAllWallpapers();
|
||||
m_settings->setActiveWallpaperCounter(0);
|
||||
m_screenPlayWallpapers.clear();
|
||||
@ -73,7 +73,7 @@ void ScreenPlay::removeAllWallpaper() noexcept
|
||||
return;
|
||||
}
|
||||
|
||||
void ScreenPlay::requestProjectSettingsListModelAt(const int index) noexcept
|
||||
void ScreenPlay::requestProjectSettingsListModelAt(const int index)
|
||||
{
|
||||
for (const unique_ptr<ScreenPlayWallpaper>& uPtrWallpaper : m_screenPlayWallpapers) {
|
||||
if (!uPtrWallpaper->screenNumber().empty() && uPtrWallpaper->screenNumber()[0] == index) { // ??? only at index == 0
|
||||
@ -86,7 +86,7 @@ void ScreenPlay::requestProjectSettingsListModelAt(const int index) noexcept
|
||||
emit projectSettingsListModelNotFound();
|
||||
}
|
||||
|
||||
void ScreenPlay::setWallpaperValue(const int at, const QString& key, const QString& value) noexcept
|
||||
void ScreenPlay::setWallpaperValue(const int at, const QString& key, const QString& value)
|
||||
{
|
||||
Q_ASSERT(static_cast<size_t>(at) < m_screenPlayWallpapers.size() && m_sdkconnector);
|
||||
for (const unique_ptr<ScreenPlayWallpaper>& uPtrWallpaper : m_screenPlayWallpapers) {
|
||||
@ -97,12 +97,10 @@ void ScreenPlay::setWallpaperValue(const int at, const QString& key, const QStri
|
||||
}
|
||||
}
|
||||
|
||||
void ScreenPlay::setAllWallpaperValue(const QString& key, const QString& value) noexcept
|
||||
void ScreenPlay::setAllWallpaperValue(const QString& key, const QString& value)
|
||||
{
|
||||
Q_ASSERT(m_sdkconnector);
|
||||
for (const unique_ptr<ScreenPlayWallpaper>& uPtrWallpaper : m_screenPlayWallpapers) {
|
||||
if (m_sdkconnector)
|
||||
m_sdkconnector->setWallpaperValue(uPtrWallpaper->appID(), key, value);
|
||||
m_sdkconnector->setWallpaperValue(uPtrWallpaper->appID(), key, value);
|
||||
}
|
||||
}
|
||||
|
||||
@ -126,8 +124,6 @@ void ScreenPlay::removeWallpaperAt(const int at)
|
||||
m_screenPlayWallpapers.erase(wallsToRemove, m_screenPlayWallpapers.end());
|
||||
}
|
||||
|
||||
|
||||
|
||||
QString ScreenPlay::generateID() const
|
||||
{
|
||||
const QString possibleCharacters {
|
||||
|
@ -54,10 +54,10 @@ public slots:
|
||||
const QString& previewImage, const float volume,
|
||||
const QString& fillMode, const QString& type);
|
||||
void createWidget(QUrl absoluteStoragePath, const QString& previewImage);
|
||||
void removeAllWallpaper() noexcept;
|
||||
void requestProjectSettingsListModelAt(const int index) noexcept;
|
||||
void setWallpaperValue(const int at, const QString& key, const QString& value) noexcept;
|
||||
void setAllWallpaperValue(const QString& key, const QString& value) noexcept;
|
||||
void removeAllWallpaper();
|
||||
void requestProjectSettingsListModelAt(const int index);
|
||||
void setWallpaperValue(const int at, const QString& key, const QString& value);
|
||||
void setAllWallpaperValue(const QString& key, const QString& value);
|
||||
void removeWallpaperAt(const int at = 0);
|
||||
QString generateID() const;
|
||||
|
||||
|
@ -134,14 +134,6 @@ Settings::Settings(const shared_ptr<InstalledListModel>& ilm,
|
||||
setupWidgetAndWindowPaths();
|
||||
}
|
||||
|
||||
QString Settings::loadProject(QString file)
|
||||
{
|
||||
QFile configTmp;
|
||||
//file = file.replace("file:///", "");
|
||||
configTmp.setFileName(file);
|
||||
configTmp.open(QIODevice::ReadOnly | QIODevice::Text);
|
||||
return configTmp.readAll();
|
||||
}
|
||||
|
||||
void Settings::loadActiveProfiles()
|
||||
{
|
||||
@ -207,65 +199,11 @@ void Settings::writeSingleSettingConfig(QString name, QVariant value)
|
||||
configTmp.close();
|
||||
}
|
||||
|
||||
void Settings::requestAllLicenses()
|
||||
void Settings::saveWallpaperToConfig(const int monitorIndex, const QUrl& absoluteStoragePath, const QString& type)
|
||||
{
|
||||
|
||||
QtConcurrent::run([this]() {
|
||||
QString tmp;
|
||||
QFile file;
|
||||
QTextStream out(&file);
|
||||
|
||||
file.setFileName(":/legal/Font Awesome Free License.txt");
|
||||
file.open(QIODevice::ReadOnly | QIODevice::Text);
|
||||
tmp += out.readAll();
|
||||
file.close();
|
||||
|
||||
file.setFileName(":/legal/gpl-3.0.txt");
|
||||
file.open(QIODevice::ReadOnly | QIODevice::Text);
|
||||
tmp += out.readAll();
|
||||
file.close();
|
||||
|
||||
file.setFileName(":/legal/gpl-3.0.txt");
|
||||
file.open(QIODevice::ReadOnly | QIODevice::Text);
|
||||
tmp += out.readAll();
|
||||
file.close();
|
||||
|
||||
file.setFileName(":/legal/OFL.txt");
|
||||
file.open(QIODevice::ReadOnly | QIODevice::Text);
|
||||
tmp += out.readAll();
|
||||
file.close();
|
||||
|
||||
file.setFileName(":/legal/OpenSSL.txt");
|
||||
file.open(QIODevice::ReadOnly | QIODevice::Text);
|
||||
tmp += out.readAll();
|
||||
file.close();
|
||||
|
||||
file.setFileName(":/legal/Qt LGPLv3.txt");
|
||||
file.open(QIODevice::ReadOnly | QIODevice::Text);
|
||||
tmp += out.readAll();
|
||||
file.close();
|
||||
|
||||
emit this->allLicenseLoaded(tmp);
|
||||
});
|
||||
}
|
||||
|
||||
void Settings::requestAllLDataProtection()
|
||||
{
|
||||
QtConcurrent::run([this]() {
|
||||
QString tmp;
|
||||
QFile file;
|
||||
QTextStream out(&file);
|
||||
|
||||
file.setFileName(":/legal/DataProtection.txt");
|
||||
file.open(QIODevice::ReadOnly | QIODevice::Text);
|
||||
tmp += out.readAll();
|
||||
file.close();
|
||||
|
||||
emit this->allDataProtectionLoaded(tmp);
|
||||
});
|
||||
}
|
||||
|
||||
void Settings::saveWallpaper(int monitorIndex, QUrl absoluteStoragePath, QStringList properties, QString type)
|
||||
void Settings::removeWallpaperFromConfig(const int monitorIndex)
|
||||
{
|
||||
}
|
||||
|
||||
@ -349,38 +287,3 @@ void Settings::setupWidgetAndWindowPaths()
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
bool Settings::getOfflineMode() const
|
||||
{
|
||||
return m_offlineMode;
|
||||
}
|
||||
|
||||
QUrl Settings::getScreenPlayWidgetPath() const
|
||||
{
|
||||
return m_screenPlayWidgetPath;
|
||||
}
|
||||
|
||||
void Settings::setScreenPlayWidgetPath(const QUrl& screenPlayWidgetPath)
|
||||
{
|
||||
m_screenPlayWidgetPath = screenPlayWidgetPath;
|
||||
}
|
||||
|
||||
QUrl Settings::getScreenPlayBasePath() const
|
||||
{
|
||||
return m_screenPlayBasePath;
|
||||
}
|
||||
|
||||
void Settings::setScreenPlayBasePath(QUrl screenPlayBasePath)
|
||||
{
|
||||
m_screenPlayBasePath = screenPlayBasePath;
|
||||
}
|
||||
|
||||
QUrl Settings::getScreenPlayWindowPath() const
|
||||
{
|
||||
return m_screenPlayWindowPath;
|
||||
}
|
||||
|
||||
void Settings::setScreenPlayWindowPath(const QUrl& screenPlayWindowPath)
|
||||
{
|
||||
m_screenPlayWindowPath = screenPlayWindowPath;
|
||||
}
|
||||
|
@ -96,16 +96,40 @@ public:
|
||||
return m_offlineMode;
|
||||
}
|
||||
|
||||
QUrl getScreenPlayWindowPath() const;
|
||||
void setScreenPlayWindowPath(const QUrl& screenPlayWindowPath);
|
||||
QUrl getScreenPlayWindowPath() const
|
||||
{
|
||||
return m_screenPlayWindowPath;
|
||||
}
|
||||
|
||||
QUrl getScreenPlayBasePath() const;
|
||||
void setScreenPlayBasePath(QUrl screenPlayBasePath);
|
||||
void setScreenPlayWindowPath(const QUrl& screenPlayWindowPath)
|
||||
{
|
||||
m_screenPlayWindowPath = screenPlayWindowPath;
|
||||
}
|
||||
|
||||
QUrl getScreenPlayWidgetPath() const;
|
||||
void setScreenPlayWidgetPath(const QUrl& screenPlayWidgetPath);
|
||||
QUrl getScreenPlayBasePath() const
|
||||
{
|
||||
return m_screenPlayBasePath;
|
||||
}
|
||||
|
||||
bool getOfflineMode() const;
|
||||
void setScreenPlayBasePath(QUrl screenPlayBasePath)
|
||||
{
|
||||
m_screenPlayBasePath = screenPlayBasePath;
|
||||
}
|
||||
|
||||
QUrl getScreenPlayWidgetPath() const
|
||||
{
|
||||
return m_screenPlayWidgetPath;
|
||||
}
|
||||
|
||||
void setScreenPlayWidgetPath(const QUrl& screenPlayWidgetPath)
|
||||
{
|
||||
m_screenPlayWidgetPath = screenPlayWidgetPath;
|
||||
}
|
||||
|
||||
bool getOfflineMode() const
|
||||
{
|
||||
return m_offlineMode;
|
||||
}
|
||||
|
||||
signals:
|
||||
void autostartChanged(bool autostart);
|
||||
@ -118,14 +142,11 @@ signals:
|
||||
void activeWallpaperCounterChanged(int activeWallpaperCounter);
|
||||
void pauseWallpaperWhenIngameChanged(bool pauseWallpaperWhenIngame);
|
||||
void offlineModeChanged(bool offlineMode);
|
||||
void allLicenseLoaded(QString licensesText);
|
||||
void allDataProtectionLoaded(QString dataProtectionText);
|
||||
|
||||
public slots:
|
||||
void writeSingleSettingConfig(QString name, QVariant value);
|
||||
void requestAllLicenses();
|
||||
void requestAllLDataProtection();
|
||||
void saveWallpaper(int monitorIndex, QUrl absoluteStoragePath, QStringList properties, QString type);
|
||||
void saveWallpaperToConfig(const int monitorIndex, const QUrl& absoluteStoragePath, const QString& type);
|
||||
void removeWallpaperFromConfig(const int monitorIndex);
|
||||
void setqSetting(const QString& key, const QString& value);
|
||||
|
||||
bool autostart() const
|
||||
@ -193,8 +214,6 @@ public slots:
|
||||
emit sendStatisticsChanged(m_sendStatistics);
|
||||
}
|
||||
|
||||
QString loadProject(QString file);
|
||||
|
||||
void setLocalStoragePath(QUrl localStoragePath)
|
||||
{
|
||||
if (m_localStoragePath == localStoragePath)
|
||||
|
@ -5,7 +5,7 @@ TARGET = $$qtLibraryTarget($$TARGET)
|
||||
QT += qml quick
|
||||
CONFIG += plugin c++11
|
||||
|
||||
uri = net.aimber.screenplaysdk
|
||||
uri = app.screenplay.screenplaysdk
|
||||
|
||||
# Input
|
||||
SOURCES += \
|
||||
|
@ -1,2 +1,2 @@
|
||||
module net.aimber.screenplaysdk
|
||||
module app.screenplay.screenplaysdk
|
||||
plugin ScreenPlaySDK
|
||||
|
@ -5,7 +5,7 @@
|
||||
|
||||
void ScreenPlay_SDKPlugin::registerTypes(const char *uri)
|
||||
{
|
||||
// @uri net.aimber.screenplaysdk
|
||||
// @uri app.screenplay.screenplaysdk
|
||||
qmlRegisterType<ScreenPlaySDK>(uri, 1, 0, "ScreenPlaySDK");
|
||||
}
|
||||
|
||||
|
@ -4,7 +4,7 @@ QT += qml quick
|
||||
CONFIG += plugin c++11
|
||||
|
||||
TARGET = $$qtLibraryTarget($$TARGET)
|
||||
uri = net.aimber.sysinfo
|
||||
uri = app.screenplay.sysinfo
|
||||
|
||||
# Input
|
||||
SOURCES += \
|
||||
|
@ -1,2 +1,2 @@
|
||||
module net.aimber.sysinfo
|
||||
module app.screenplay.sysinfo
|
||||
plugin ScreenPlaySysInfo
|
||||
|
@ -13,7 +13,7 @@ QObject* ScreenPlaySysInfoSingleton(QQmlEngine* engine, QJSEngine* scriptEngine)
|
||||
|
||||
void ScreenPlaySysInfoPlugin::registerTypes(const char* uri)
|
||||
{
|
||||
// @uri net.aimber.sysinfo
|
||||
// @uri app.screenplay.sysinfo
|
||||
qmlRegisterSingletonType<SysInfo>(uri, 1, 0, "SysInfo", ScreenPlaySysInfoSingleton);
|
||||
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
import QtQuick 2.12
|
||||
import QtQuick.Controls 2.3
|
||||
|
||||
import net.aimber.screenplaysdk 1.0
|
||||
import app.screenplay.screenplaysdk 1.0
|
||||
|
||||
Item {
|
||||
id: mainWindow
|
||||
|
@ -1,6 +1,6 @@
|
||||
import QtQuick 2.12
|
||||
import QtWebEngine 1.8
|
||||
import net.aimber.wallpaper 1.0
|
||||
import app.screenplay.wallpaper 1.0
|
||||
|
||||
Rectangle {
|
||||
id: root
|
||||
|
@ -11,7 +11,7 @@ BaseWindow::BaseWindow(QString projectFilePath, QObject* parent)
|
||||
{
|
||||
QApplication::instance()->installEventFilter(this);
|
||||
qRegisterMetaType<BaseWindow::WallpaperType>();
|
||||
qmlRegisterType<BaseWindow>("net.aimber.wallpaper", 1, 0, "Wallpaper");
|
||||
qmlRegisterType<BaseWindow>("app.screenplay.wallpaper", 1, 0, "Wallpaper");
|
||||
|
||||
if (projectFilePath == "test") {
|
||||
setType(BaseWindow::WallpaperType::Qml);
|
||||
|
@ -118,7 +118,7 @@ WinWindow::WinWindow(QVector<int>& activeScreensList, QString projectPath, QStri
|
||||
// the window visible via set Visible.
|
||||
if (projectPath != "test") {
|
||||
// Let QML decide when were are read to show the window
|
||||
ShowWindow(m_windowHandle, SW_HIDE);
|
||||
// ShowWindow(m_windowHandle, SW_HIDE);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user