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

Add description and tldr legal links

Change to custom LicenseSelector in every wizard
This commit is contained in:
Elias Steurer 2020-12-11 14:13:40 +01:00
parent f13b9b8709
commit 79af9688f8
6 changed files with 87 additions and 110 deletions

View File

@ -133,5 +133,11 @@
<file>assets/startinfo/sharex.png</file> <file>assets/startinfo/sharex.png</file>
<file>assets/startinfo/unsplash.png</file> <file>assets/startinfo/unsplash.png</file>
<file>assets/startinfo/vscode.png</file> <file>assets/startinfo/vscode.png</file>
<file>assets/wizards/License_Apache_2.0.txt</file>
<file>assets/wizards/License_CC_Attribution_4.0.txt</file>
<file>assets/wizards/License_CC_Attribution-NonCommercial-ShareAlike_4.0.txt</file>
<file>assets/wizards/License_CC_Attribution-ShareAlike_4.0.txt</file>
<file>assets/wizards/License_GPL_3.0.txt</file>
<file>assets/wizards/License_CC0_1.0.txt</file>
</qresource> </qresource>
</RCC> </RCC>

View File

@ -1,11 +1,13 @@
import QtQuick 2.14 import QtQuick 2.14
import QtQuick.Controls 2.14 import QtQuick.Controls 2.14
import QtQuick.Controls.Material 2.12
import QtQuick.Layouts 1.12 import QtQuick.Layouts 1.12
import ScreenPlay 1.0 import ScreenPlay 1.0
ColumnLayout { ColumnLayout {
id: root id: root
Layout.preferredWidth: 200
property alias comboBox: cb property alias comboBox: cb
@ -14,55 +16,77 @@ ColumnLayout {
text: qsTr("License") text: qsTr("License")
} }
ComboBox { RowLayout {
id: cb Layout.fillHeight: true
Layout.fillWidth: true Layout.fillWidth: true
font.family: ScreenPlay.settings.font spacing: 5
model: ListModel {
id: modelLicense
ListElement {
text: "Open Source - General Public License 3.0"
description: qstr("You grant other to remix your work but it must remain under the GPLv3. We recommend this license for all code wallpaper!")
tldrlegal: "https://tldrlegal.com/license/gnu-general-public-license-v3-(gpl-3)"
licenseFile: ":/assets/wizards/License_GPL_3.0.txt"
}
ListElement {
text: "Open Source - Apache License 2.0"
description: qstr("You grant other to remix your work and change the license to their linking.")
tldrlegal: "https://tldrlegal.com/license/apache-license-2.0-(apache-2.0)"
licenseFile: ":/assets/wizards/License_Apache_2.0.txt"
}
ListElement { ComboBox {
text: "Create Commons - Attribution 4.0" id: cb
description: qstr("You grant other to remix your work and change the license to their linking.") Layout.fillWidth: true
tldrlegal: "https://tldrlegal.com/license/creative-commons-attribution-4.0-international-(cc-by-4)" textRole: "text"
licenseFile: ":/assets/wizards/License_CC_Attribution_4.0.txt" model: ListModel {
} id: licenseModel
ListElement { ListElement {
text: "Create Commons - Attribution-ShareAlike 4.0" text: "Open Source - General Public License 3.0"
description: qstr("Share copy and redistribute the material in any medium or format. Adapt remix, transform, and build upon the material. description: qsTr("You grant other to remix your work but it must remain under the GPLv3. We recommend this license for all code wallpaper!")
for any purpose, even commercially.") tldrlegal: "https://tldrlegal.com/license/gnu-general-public-license-v3-(gpl-3)"
tldrlegal: "https://tldrlegal.com/license/creative-commons-attribution-sharealike-4.0-international-(cc-by-sa-4.0)" licenseFile: ":/assets/wizards/License_GPL_3.0.txt"
licenseFile: ":/assets/wizards/License_CC_Attribution-ShareAlike_4.0.txt" }
} ListElement {
ListElement { text: "Open Source - Apache License 2.0"
text: "Create Commons - Attribution-NonCommercial-ShareAlike 4.0" description: qsTr("You grant other to remix your work and change the license to their linking.")
description: qstr("Share — copy and redistribute the material in any medium or format. Adapt — remix, transform, and build upon the material. You are not allowed to use it commercially! ") tldrlegal: "https://tldrlegal.com/license/apache-license-2.0-(apache-2.0)"
tldrlegal: "https://tldrlegal.com/license/creative-commons-attribution-noncommercial-sharealike-4.0-international-(cc-by-nc-sa-4.0)" licenseFile: ":/assets/wizards/License_Apache_2.0.txt"
licenseFile: ":/assets/wizards/License_CC_Attribution-NonCommercial-ShareAlike_4.0.txt" }
} ListElement {
ListElement { text: "Create Commons - Attribution 4.0"
text: "Create Commons - CC0 1.0 Universal Public Domain" description: qsTr("You grant other to remix your work and change the license to their linking.")
description: "You allow everyone do do anything with your work." tldrlegal: "https://tldrlegal.com/license/creative-commons-attribution-4.0-international-(cc-by-4)"
tldrlegal: "https://tldrlegal.com/license/creative-commons-cc0-1.0-universal" licenseFile: ":/assets/wizards/License_CC_Attribution_4.0.txt"
licenseFile: ":/assets/wizards/License_CC0_1.0.txt" }
} ListElement {
ListElement { text: "Create Commons - Attribution-ShareAlike 4.0"
text: "Copyright by me" description: qsTr("Share — copy and redistribute the material in any medium or format. Adapt — remix, transform, and build upon the material for any purpose, even commercially.")
description: "You do not share any rights and nobody is allowed to use remix it (Not recommended)." tldrlegal: "https://tldrlegal.com/license/creative-commons-attribution-sharealike-4.0-international-(cc-by-sa-4.0)"
tldrlegal: "" licenseFile: ":/assets/wizards/License_CC_Attribution-ShareAlike_4.0.txt"
}
ListElement {
text: "Create Commons - Attribution-NonCommercial-ShareAlike 4.0"
description: qsTr("Share — copy and redistribute the material in any medium or format. Adapt — remix, transform, and build upon the material. You are not allowed to use it commercially! ")
tldrlegal: "https://tldrlegal.com/license/creative-commons-attribution-noncommercial-sharealike-4.0-international-(cc-by-nc-sa-4.0)"
licenseFile: ":/assets/wizards/License_CC_Attribution-NonCommercial-ShareAlike_4.0.txt"
}
ListElement {
text: "Create Commons - CC0 1.0 Universal Public Domain"
description: qsTr("You allow everyone do do anything with your work.")
tldrlegal: "https://tldrlegal.com/license/creative-commons-cc0-1.0-universal"
licenseFile: ":/assets/wizards/License_CC0_1.0.txt"
}
ListElement {
text: "All rights reserved"
description: qsTr("You do not share any rights and nobody is allowed to use remix it (Not recommended). Can also used to credit work others.")
tldrlegal: ""
}
} }
} }
ToolButton {
icon.source: "qrc:/assets/icons/icon_help_center.svg"
icon.color: Material.iconColor
onClicked: toolTip.open()
}
ToolButton {
icon.source: "qrc:/assets/icons/icon_open_in_new.svg"
icon.color: Material.iconColor
onClicked: Qt.openUrlExternally(licenseModel.get(
cb.currentIndex).tldrlegal)
}
ToolTip {
id: toolTip
text: licenseModel.get(cb.currentIndex).description
}
} }
} }

View File

@ -22,9 +22,10 @@ WizardPage {
} }
function create() { function create() {
ScreenPlay.wizards.createHTMLWallpaper( ScreenPlay.wizards.createHTMLWallpaper(tfTitle.text,
tfTitle.text, previewSelector.imageSource, previewSelector.imageSource,
cbLicense.currentText, tagSelector.getTags()) cbLicense.currentText,
tagSelector.getTags())
} }
Common.Headline { Common.Headline {
@ -67,22 +68,8 @@ WizardPage {
RowLayout { RowLayout {
spacing: 20 spacing: 20
ComboBox { Common.LicenseSelector {
id: cbLicense id: cbLicense
Layout.fillWidth: true
font.family: ScreenPlay.settings.font
model: ListModel {
id: modelLicense
ListElement {
text: "Copyright by me"
}
ListElement {
text: "Open Source - GPLv3"
}
ListElement {
text: "Open Source - MIT/Apache2"
}
}
} }
Common.TagSelector { Common.TagSelector {
@ -103,7 +90,6 @@ WizardPage {
id: previewSelector id: previewSelector
Layout.fillWidth: true Layout.fillWidth: true
} }
} }
} }

View File

@ -94,22 +94,9 @@ WizardPage {
Common.HeadlineSection { Common.HeadlineSection {
text: qsTr("License") text: qsTr("License")
} }
ComboBox {
Common.LicenseSelector {
id: cbLicense id: cbLicense
Layout.fillWidth: true
font.family: ScreenPlay.settings.font
model: ListModel {
id: modelLicense
ListElement {
text: "All rights "
}
ListElement {
text: "Open Source - GPLv3"
}
ListElement {
text: "Open Source - MIT/Apache2"
}
}
} }
Common.HeadlineSection { Common.HeadlineSection {
text: qsTr("Tags") text: qsTr("Tags")

View File

@ -67,22 +67,9 @@ WizardPage {
RowLayout { RowLayout {
spacing: 20 spacing: 20
ComboBox {
Common.LicenseSelector {
id: cbLicense id: cbLicense
Layout.fillWidth: true
font.family: ScreenPlay.settings.font
model: ListModel {
id: modelLicense
ListElement {
text: "Copyright by me"
}
ListElement {
text: "Open Source - GPLv3"
}
ListElement {
text: "Open Source - MIT/Apache2"
}
}
} }
Common.TagSelector { Common.TagSelector {

View File

@ -94,22 +94,9 @@ WizardPage {
Common.HeadlineSection { Common.HeadlineSection {
text: qsTr("License") text: qsTr("License")
} }
ComboBox {
Common.LicenseSelector {
id: cbLicense id: cbLicense
Layout.fillWidth: true
font.family: ScreenPlay.settings.font
model: ListModel {
id: modelLicense
ListElement {
text: "All rights "
}
ListElement {
text: "Open Source - GPLv3"
}
ListElement {
text: "Open Source - MIT/Apache2"
}
}
} }
Common.HeadlineSection { Common.HeadlineSection {
text: qsTr("Tags") text: qsTr("Tags")