-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added EOY Menu and archiving of return files when emailing
- Loading branch information
Showing
5 changed files
with
227 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
import QtQuick | ||
import QtQuick.Window | ||
import QtQuick.Controls | ||
import QtQuick.Layouts | ||
|
||
Item { | ||
|
||
function verifyForm() { | ||
if (inputEmail.text.toString().length > 0) { | ||
btnSubmit.enabled = true | ||
} | ||
else { | ||
btnSubmit.enabled = false | ||
} | ||
} | ||
|
||
function setFocus() { | ||
inputEmail.focus = true | ||
inputEmail.forceActiveFocus() | ||
} | ||
|
||
property var chargerReturned: true | ||
|
||
|
||
|
||
ColumnLayout { | ||
anchors.fill: parent | ||
// spacing: 2 | ||
|
||
Text { | ||
id: txtHeader | ||
Layout.fillWidth: true | ||
Layout.fillHeight: true | ||
|
||
text: "Enter an email address to receive the return files.\nEmail will also be sent to Candace de Loureiro.\nFiles will be backed up this computer in the event something goes wrong." | ||
horizontalAlignment: Text.AlignHCenter | ||
verticalAlignment: Text.AlignVCenter | ||
wrapMode: Text.WordWrap | ||
font.pointSize: 30 | ||
|
||
} | ||
|
||
// AnimatedImage { | ||
// id: image | ||
// Layout.alignment: Qt.AlignHCenter | ||
// source: "../images/dropoff.gif" | ||
// fillMode: Image.Image.PreserveAspectCrop | ||
// } | ||
|
||
TextField { | ||
id: inputEmail | ||
placeholderText: qsTr("Email Address") | ||
font.pointSize: 20 | ||
Layout.fillWidth: true | ||
Layout.fillHeight: true | ||
horizontalAlignment: TextInput.AlignHCenter | ||
focus: true | ||
onTextChanged: { | ||
verifyForm() | ||
} | ||
|
||
Component.onCompleted: { | ||
this.focus = true | ||
this.forceActiveFocus() | ||
} | ||
} | ||
|
||
Button { | ||
id: btnSubmit | ||
text: "Submit Returns" | ||
enabled: false | ||
font.pointSize: 50 | ||
Layout.fillWidth: true | ||
Layout.fillHeight: true | ||
|
||
onClicked: { | ||
ui.submitEOYFinish(inputEmail.text) | ||
} | ||
} | ||
|
||
Button { | ||
id: btnMenu | ||
text: "Return to EOY Menu" | ||
enabled: true | ||
font.pointSize: 20 | ||
Layout.fillWidth: true | ||
Layout.fillHeight: true | ||
|
||
onClicked: { | ||
contentFrame.push(Qt.createComponent("EOYStart.qml")) | ||
} | ||
} | ||
|
||
} | ||
// Setting focus any other way doesn't seem to work. | ||
// Kind of kludge, but works | ||
Timer { | ||
interval: 100 | ||
running: true | ||
repeat: false | ||
onTriggered: setFocus() | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
import QtQuick | ||
import QtQuick.Window | ||
import QtQuick.Controls | ||
import QtQuick.Layouts | ||
|
||
Item { | ||
ColumnLayout { | ||
anchors.fill: parent | ||
// spacing: 2 | ||
|
||
Text { | ||
id: txtIntro | ||
Layout.fillWidth: true | ||
Layout.fillHeight: true | ||
|
||
text: "EOY Return" | ||
// anchors.fill: self | ||
horizontalAlignment: Text.AlignHCenter | ||
verticalAlignment: Text.AlignVCenter | ||
wrapMode: Text.WordWrap | ||
font.pointSize: 30 | ||
// fontSizeMode: Text.Fit | ||
// minimumPixelSize: 30 | ||
// font.pixelSize: 1000 | ||
|
||
// anchors.centerIn: self | ||
} | ||
|
||
// Image { | ||
// id: image | ||
// width: 100 | ||
// height: 100 | ||
// source: "../images/logo.png" | ||
// Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter | ||
// fillMode: Image.PreserveAspectFit | ||
// } | ||
|
||
Button { | ||
id: btnDropOff | ||
text: "Begin Returns" | ||
font.pointSize: 50 | ||
Layout.fillWidth: true | ||
Layout.fillHeight: true | ||
onClicked: { | ||
contentFrame.push(Qt.createComponent("EOYReturn.qml")) | ||
} | ||
} | ||
Button { | ||
id: btnPickUp | ||
text: "Submit Saved Returns" | ||
font.pointSize: 50 | ||
Layout.fillWidth: true | ||
Layout.fillHeight: true | ||
onClicked: { | ||
contentFrame.push(Qt.createComponent("EOYFinish.qml")) | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters