opacity: 1
width: parent.width
height: wrappersc.height
- /* gradient: Gradient {
- GradientStop {
- position: 0 */
- color: "#7d7b97"
-/* }
-
- GradientStop {
- position: 1
- color: "#313f4d"
- }
- } */
-// border.color: "black"
-// border.width: 2
- /*
- MouseArea {
- anchors.fill: parent
- onClicked: { fond.state = '' }
- }
- /*
- Text {
- id: text2
- height: 20
- text: "Panneau gauche"
- anchors.right: parent.right
- anchors.rightMargin: 5
- font.pixelSize: 12
- anchors.top: parent.top
- anchors.topMargin: 5
- }
-
- TextInput {
- id: cfgType
- x: 151
- y: 76
- width: 80
- height: 20
- text: "new|edit"
- font.pixelSize: 12
- }
-*/
-
-
+ color: "#7d7b97"
Flow {
id: wrappersc
flow: Flow.TopToBottom
- //width: menu.width-10
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
spacing: 10
anchors.topMargin: 5
Text {
text: "Language:"
- //font.pixelSize: 16;
font.bold: true; color: "white"; style: Text.Raised; styleColor: "black"
horizontalAlignment: Qt.AlignRight
}
focus: true
text: schModel.from
}
- /*
- Text {
- text: "In reply to:"
- font.pixelSize: 16; font.bold: true; color: "white"; style: Text.Raised; styleColor: "black"
- horizontalAlignment: Qt.AlignRight
- }
- Input{
- id: toIn
- KeyNavigation.backtab: fromIn
- KeyNavigation.tab:phraseIn
- onAccepted:searchbutton.doSearch();
- } */
Text {
text: "Search:"
- //font.pixelSize: 16;
font.bold: true; color: "white"; style: Text.Raised; styleColor: "black"
horizontalAlignment: Qt.AlignRight
}
text: schModel.phrase
}
-
-
-
- Button {
- x: 2
- width: menu.width-4
- height: menu.height
- id: searchbutton
- keyUsing: true;
- opacity: 1
- text: "Go"
- KeyNavigation.tab: fromIn
- Keys.onReturnPressed: searchbutton.doSearch();
- Keys.onEnterPressed: searchbutton.doSearch();
- Keys.onSelectPressed: searchbutton.doSearch();
- Keys.onSpacePressed: searchbutton.doSearch();
- onClicked: searchbutton.doSearch();
-
- function doSearch() {
- // Search ! allowed
- if (wrappersc.state=="invalidinput")
- return;
-
+ Button {
+ x: 2
+ width: menu.width-4
+ height: menu.height
+ id: searchbutton
+ keyUsing: true;
+ opacity: 1
+ text: "Go"
+ KeyNavigation.tab: fromIn
+ Keys.onReturnPressed: searchbutton.doSearch();
+ Keys.onEnterPressed: searchbutton.doSearch();
+ Keys.onSelectPressed: searchbutton.doSearch();
+ Keys.onSpacePressed: searchbutton.doSearch();
+ onClicked: searchbutton.doSearch();
+
+ function doSearch() {
+ // Search ! allowed
+ if (wrappersc.state=="invalidinput")
+ return;
schModel.from=fromIn.text;
- //schModel.to= toIn.text;
schModel.phrase = phraseIn.text;
fond.focus = true;
fond.state = ""
-
+ }
}
}
- }
-/*
+
states:
State {
name: "invalidinput"
- when: fromIn.text=="" && toIn.text=="" && phraseIn.text==""
+ when: fromIn.text=="" // && phraseIn.text==""
PropertyChanges { target: searchbutton ; opacity: 0.6 ; }
- } */
+ }
+
transitions:
Transition {
NumberAnimation { target: searchbutton; property: "opacity"; duration: 200 }
}
}
-
-
-