mirror of
https://gitlab.com/kelteseth/ScreenPlay.git
synced 2024-09-18 16:32:33 +02:00
Add LICENSE inside of the settings
This commit is contained in:
parent
05ecc78534
commit
d32047557c
@ -108,5 +108,12 @@
|
||||
<file>assets/icons/icon_open_in_new.svg</file>
|
||||
<file>translations/ScreenPlay_de.qm</file>
|
||||
<file>translations/ScreenPlay_en.qm</file>
|
||||
<file>qml/Settings/SettingsExpander.qml</file>
|
||||
<file>legal/Font Awesome Free License.txt</file>
|
||||
<file>legal/gpl-3.0.txt</file>
|
||||
<file>legal/lgpl-2.1.txt</file>
|
||||
<file>legal/OFL.txt</file>
|
||||
<file>legal/OpenSSL.txt</file>
|
||||
<file>legal/Qt LGPLv3.txt</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
@ -245,7 +245,7 @@ Item {
|
||||
|
||||
Item {
|
||||
id: settingsAboutrapper
|
||||
height: 350
|
||||
height: settingsAboutrapperWrapper.childrenRect.height + 100
|
||||
width: parent.width
|
||||
|
||||
RectangularGlow {
|
||||
@ -265,6 +265,7 @@ Item {
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
|
||||
anchors.fill: parent
|
||||
radius: 4
|
||||
clip: true
|
||||
@ -281,6 +282,7 @@ Item {
|
||||
}
|
||||
|
||||
Column {
|
||||
id:settingsAboutrapperWrapper
|
||||
width: parent.width
|
||||
spacing: 10
|
||||
anchors {
|
||||
@ -350,7 +352,14 @@ Item {
|
||||
description: qsTr("ScreenPlay would not be possible without the work of others. A big thank you to: ")
|
||||
buttonText: qsTr("Licenses")
|
||||
onButtonPressed: {
|
||||
utility.openLicenceFolder()
|
||||
expander.toggle()
|
||||
}
|
||||
}
|
||||
SettingsExpander {
|
||||
id:expander
|
||||
anchors {
|
||||
left: parent.left
|
||||
right: parent.right
|
||||
}
|
||||
}
|
||||
}
|
||||
|
70
ScreenPlay/qml/Settings/SettingsExpander.qml
Normal file
70
ScreenPlay/qml/Settings/SettingsExpander.qml
Normal file
@ -0,0 +1,70 @@
|
||||
import QtQuick 2.9
|
||||
import QtQuick.Controls 2.3
|
||||
import QtQuick.Dialogs 1.2
|
||||
import QtQuick.Layouts 1.3
|
||||
|
||||
Rectangle {
|
||||
id: root
|
||||
state: "off"
|
||||
clip: true
|
||||
|
||||
Flickable {
|
||||
anchors.fill: parent
|
||||
contentHeight: txtLegal.paintedHeight
|
||||
z: 999
|
||||
focus: true
|
||||
contentWidth: parent.width
|
||||
ScrollBar.vertical: ScrollBar {
|
||||
snapMode: ScrollBar.SnapOnRelease
|
||||
policy: ScrollBar.AlwaysOn
|
||||
}
|
||||
Text {
|
||||
id: txtLegal
|
||||
anchors {
|
||||
top: parent.top
|
||||
right: parent.right
|
||||
left: parent.left
|
||||
margins: 20
|
||||
}
|
||||
color: "#626262"
|
||||
renderType: Text.NativeRendering
|
||||
height: txtLegal.paintedHeight
|
||||
onHeightChanged: print(height)
|
||||
text: screenPlaySettings.getAllLicenes()
|
||||
}
|
||||
}
|
||||
|
||||
function toggle() {
|
||||
root.state = root.state == "on" ? "off" : "on"
|
||||
}
|
||||
|
||||
states: [
|
||||
State {
|
||||
name: "on"
|
||||
|
||||
PropertyChanges {
|
||||
target: root
|
||||
height: 500
|
||||
}
|
||||
},
|
||||
State {
|
||||
name: "off"
|
||||
PropertyChanges {
|
||||
target: root
|
||||
height: 0
|
||||
}
|
||||
}
|
||||
]
|
||||
transitions: [
|
||||
Transition {
|
||||
from: "off"
|
||||
to: "on"
|
||||
reversible: true
|
||||
PropertyAnimation {
|
||||
target: root
|
||||
property: "height"
|
||||
duration: 250
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
@ -175,6 +175,46 @@ void Settings::writeSingleSettingConfig(QString name, QVariant value)
|
||||
configTmp.close();
|
||||
}
|
||||
|
||||
QString Settings::getAllLicenes()
|
||||
{
|
||||
|
||||
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();
|
||||
|
||||
return tmp;
|
||||
}
|
||||
|
||||
void Settings::setMuteAll(bool isMuted)
|
||||
{
|
||||
|
||||
|
@ -144,6 +144,7 @@ public slots:
|
||||
void setGlobalVolume(float volume);
|
||||
void setGlobalFillMode(QString fillMode);
|
||||
void writeSingleSettingConfig(QString name, QVariant value);
|
||||
QString getAllLicenes();
|
||||
|
||||
bool autostart() const
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user