Improve QML syntax and update license headers.
This commit is contained in:
@@ -1,9 +1,28 @@
|
||||
/*******************************************************************************
|
||||
* Copyright (c) 2013-2021 "Filippo Scognamiglio"
|
||||
* https://github.com/Swordfish90/cool-retro-term
|
||||
*
|
||||
* This file is part of cool-retro-term.
|
||||
*
|
||||
* cool-retro-term is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*******************************************************************************/
|
||||
import QtQuick 2.2
|
||||
import QtQuick.Controls 2.2
|
||||
import QtQuick.Layouts 1.1
|
||||
import QtQuick.Window 2.0
|
||||
|
||||
Window{
|
||||
Window {
|
||||
id: dialogwindow
|
||||
title: qsTr("About")
|
||||
width: 600
|
||||
@@ -11,16 +30,19 @@ Window{
|
||||
|
||||
modality: Qt.ApplicationModal
|
||||
|
||||
ColumnLayout{
|
||||
ColumnLayout {
|
||||
anchors.fill: parent
|
||||
anchors.margins: 15
|
||||
spacing: 15
|
||||
Text {
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
text: "cool-retro-term"
|
||||
font {bold: true; pointSize: 18}
|
||||
font {
|
||||
bold: true
|
||||
pointSize: 18
|
||||
}
|
||||
}
|
||||
Loader{
|
||||
Loader {
|
||||
id: mainContent
|
||||
Layout.fillHeight: true
|
||||
Layout.fillWidth: true
|
||||
@@ -41,32 +63,33 @@ Window{
|
||||
}
|
||||
}
|
||||
]
|
||||
Component.onCompleted: mainContent.state = "Default";
|
||||
Component.onCompleted: mainContent.state = "Default"
|
||||
}
|
||||
Item{
|
||||
Item {
|
||||
Layout.fillWidth: true
|
||||
height: childrenRect.height
|
||||
Button{
|
||||
Button {
|
||||
anchors.left: parent.left
|
||||
text: qsTr("License")
|
||||
onClicked: {
|
||||
mainContent.state == "Default" ? mainContent.state = "License" : mainContent.state = "Default"
|
||||
mainContent.state == "Default" ? mainContent.state
|
||||
= "License" : mainContent.state = "Default"
|
||||
}
|
||||
}
|
||||
Button{
|
||||
Button {
|
||||
anchors.right: parent.right
|
||||
text: qsTr("Close")
|
||||
onClicked: dialogwindow.close();
|
||||
onClicked: dialogwindow.close()
|
||||
}
|
||||
}
|
||||
}
|
||||
// MAIN COMPONENTS ////////////////////////////////////////////////////////
|
||||
Component{
|
||||
Component {
|
||||
id: defaultComponent
|
||||
ColumnLayout{
|
||||
ColumnLayout {
|
||||
anchors.fill: parent
|
||||
spacing: 10
|
||||
Image{
|
||||
Image {
|
||||
Layout.fillWidth: true
|
||||
Layout.fillHeight: true
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
@@ -74,39 +97,36 @@ Window{
|
||||
source: "images/crt256.png"
|
||||
smooth: true
|
||||
}
|
||||
Text{
|
||||
Text {
|
||||
Layout.alignment: Qt.AlignCenter
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
text: appSettings.version + "\n" +
|
||||
qsTr("Author: ") + "Filippo Scognamiglio\n" +
|
||||
qsTr("Email: ") + "flscogna@gmail.com\n" +
|
||||
qsTr("Source: ") + "https://github.com/Swordfish90/cool-retro-term\n"
|
||||
text: appSettings.version + "\n" + qsTr(
|
||||
"Author: ") + "Filippo Scognamiglio\n" + qsTr(
|
||||
"Email: ") + "flscogna@gmail.com\n" + qsTr(
|
||||
"Source: ") + "https://github.com/Swordfish90/cool-retro-term\n"
|
||||
}
|
||||
}
|
||||
}
|
||||
Component{
|
||||
Component {
|
||||
id: licenseComponent
|
||||
ScrollView {
|
||||
anchors.fill: parent
|
||||
clip: true
|
||||
TextArea{
|
||||
TextArea {
|
||||
readOnly: true
|
||||
wrapMode: TextEdit.Wrap
|
||||
text: "Copyright (c) 2013 Filippo Scognamiglio <flscogna@gmail.com>\n\n" +
|
||||
"https://github.com/Swordfish90/cool-retro-term\n\n" +
|
||||
|
||||
"cool-retro-term is free software: you can redistribute it and/or modify " +
|
||||
"it under the terms of the GNU General Public License as published by " +
|
||||
"the Free Software Foundation, either version 3 of the License, or " +
|
||||
"(at your option) any later version.\n\n" +
|
||||
|
||||
"This program is distributed in the hope that it will be useful, " +
|
||||
"but WITHOUT ANY WARRANTY; without even the implied warranty of " +
|
||||
"MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the " +
|
||||
"GNU General Public License for more details.\n\n" +
|
||||
|
||||
"You should have received a copy of the GNU General Public License " +
|
||||
"along with this program. If not, see <http://www.gnu.org/licenses/>."
|
||||
text: "Copyright (c) 2013-2021 Filippo Scognamiglio <flscogna@gmail.com>\n\n"
|
||||
+ "https://github.com/Swordfish90/cool-retro-term\n\n" +
|
||||
"cool-retro-term is free software: you can redistribute it and/or modify "
|
||||
+ "it under the terms of the GNU General Public License as published by "
|
||||
+ "the Free Software Foundation, either version 3 of the License, or "
|
||||
+ "(at your option) any later version.\n\n" +
|
||||
"This program is distributed in the hope that it will be useful, "
|
||||
+ "but WITHOUT ANY WARRANTY; without even the implied warranty of "
|
||||
+ "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the "
|
||||
+ "GNU General Public License for more details.\n\n" +
|
||||
"You should have received a copy of the GNU General Public License "
|
||||
+ "along with this program. If not, see <http://www.gnu.org/licenses/>."
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user