RowLayout {
id: row1
y: 545
anchors.horizontalCenter: parent.horizontalCenter
anchors.bottom: parent.bottom
anchors.left: parent.left
anchors.leftMargin: 10
anchors.rightMargin: 5
anchors.bottomMargin: 5
spacing: 10
width: 1032
height: 50;
Label {
id: userNameLabel
width: 35
height: 25
color: "white";
text: qsTr("User Name")
font.pointSize: 12
}
TextField {
id: userNameTextField
style: TextFieldUserLogStyle {}
placeholderText: qsTr("User Name")
KeyNavigation.tab: beginDateTextField
Keys.onReturnPressed: {
beginDateTextField.focus = true;
beginDateTextField.selectAll();
}
}
Label {
id: beginDateTextLabel
width: 35
height: 25
color: "white";
text: qsTr("Begin Date")
font.pointSize: 12
}
TextField {
id: beginDateTextField
style: TextFieldUserLogStyle {}
placeholderText: qsTr("yyyy-mm-dd")
KeyNavigation.tab: endDateTextField
Keys.onReturnPressed: {
endDateTextField.forceActiveFocus();
endDateTextField.selectAll();
}
onFocusChanged: {
if(calendarRect1.visible == false){
calendarRect1.visible = true
beginDateTextField.focus = true;
beginDateTextField.selectAll();
}
}
Image{
id: beginDateImage
width: 30
height: 40
anchors.right: parent.right
anchors.verticalCenter: parent.verticalCenter
anchors.rightMargin: 3
source:"Calendar3.png"
MouseArea {
anchors.fill:parent
onClicked: {
if(calendarRect1.visible == false){
calendarRect1.visible = true
}
else if(calendarRect1.visible == true){
calendarRect1.visible = false
}
}
}
}
}
Label {
id: endDateTextLabel
width: 35
height: 25
color: "white";
text: qsTr("End Date")
font.pointSize: 12
}
TextField {
id: endDateTextField
style: TextFieldUserLogStyle {}
placeholderText: qsTr("yyyy-mm-dd")
KeyNavigation.tab: searchBtn
Keys.onReturnPressed: {
action_search.trigger();
endDateTextField.focus = false;
}
onFocusChanged: {
if(calendarRect2.visible == false){
calendarRect2.visible = true
endDateTextField.focus = true;
endDateTextField.selectAll();
}
}
Image{
id: endDateImage
width: 30
height: 40
anchors.right: parent.right
anchors.verticalCenter: parent.verticalCenter
anchors.rightMargin: 3
source:"Calendar3.png"
MouseArea {
anchors.fill:parent
onClicked: {
if(calendarRect2.visible == false){
calendarRect2.visible = true
}
else if(calendarRect2.visible == true){
calendarRect2.visible = false
}
}
}
}
}
Button {
id: searchBtn
text: qsTr("Search")
action: action_search
opacity: !action.enabled ? .3 : 1.0
KeyNavigation.tab: resetBtn
//---Sets button Formatting---//
style: ButtonStyle {
background: Rectangle {
implicitWidth: 90
implicitHeight: 45
anchors.fill:parent
radius: 8
color: "#f9f9f9"
border.color: control.activeFocus ? "yellow" : "#242424"
border.width: control.activeFocus ? 4 : 1
//---Changes butotn color when pressed--//
gradient: Gradient {
GradientStop { position: 0 ; color: control.pressed ? "#ccc" : "#eee" }
GradientStop { position: 1 ; color: control.pressed ? "#aaa" : "#ccc" }
}
//---Sets button Image---//
Image{
width: 24
height: 24
anchors.verticalCenter: parent.verticalCenter
anchors.left: parent.left
anchors.leftMargin: 5
source:"button_ok.png"
}
}
}
}
Button {
id: resetBtn
text: qsTr("Reset")
action: action_reset
opacity: !action.enabled ? .3 : 1.0
KeyNavigation.tab: exitBtn
//---Sets button Formatting---//
style: ButtonStyle {
background: Rectangle {
implicitWidth: 90
implicitHeight: 45
anchors.fill:parent
radius: 8
color: "#f9f9f9"
border.color: control.activeFocus ? "yellow" : "#242424"
border.width: control.activeFocus ? 4 : 1
//---Changes butotn color when pressed--//
gradient: Gradient {
GradientStop { position: 0 ; color: control.pressed ? "#ccc" : "#eee" }
GradientStop { position: 1 ; color: control.pressed ? "#aaa" : "#ccc" }
}
//---Sets button Image---//
Image{
width: 24
height: 24
anchors.verticalCenter: parent.verticalCenter
anchors.left: parent.left
anchors.leftMargin: 5
source:"return.png"
}
}
}
}
Button {
id: exitBtn
text: qsTr("Exit")
action: action_exit
//---Opacity Greys out button---//
opacity: !action.enabled ? .3 : 1.0
KeyNavigation.tab: userNameTextField
//---Sets button Formatting---//
style: ButtonStyle {
background: Rectangle {
implicitWidth: 90
implicitHeight: 45
anchors.fill:parent
radius: 8
color: "#f9f9f9"
border.color: control.activeFocus ? "yellow" : "#242424"
border.width: control.activeFocus ? 4 : 1
//---Changes butotn color when pressed--//
gradient: Gradient {
GradientStop { position: 0 ; color: control.pressed ? "#ccc" : "#eee" }
GradientStop { position: 1 ; color: control.pressed ? "#aaa" : "#ccc" }
}
//---Sets button Image---//
Image{
width: 24
height: 24
anchors.verticalCenter: parent.verticalCenter
anchors.left: parent.left
anchors.leftMargin: 5
source:"button_cancel.png"
}
}
}
}
}
}