0d4e8cfd1894d103ac7bb04bb5d59236a5f6582d
[qwp] / qml / qwp / content / Config.qml
1 import QtQuick 1.0
2
3 ShadowRectangle {
4     y: parent.height
5     anchors.horizontalCenter: parent.horizontalCenter
6     opacity: 1
7     width: parent.width
8     height: wrappersc.height
9 <<<<<<< HEAD
10     color: "#7d7b97"
11 =======
12  /*   gradient: Gradient {
13         GradientStop {
14             position: 0 */
15             color: "#7d7b97"
16 /*        }
17
18         GradientStop {
19             position: 1
20             color: "#313f4d"
21         }
22     } */
23 //    border.color: "black"
24 //    border.width: 2
25     /*
26     MouseArea {
27         anchors.fill: parent
28         onClicked: { fond.state = '' }
29     }
30     /*
31     Text {
32         id: text2
33         height: 20
34         text: "Panneau gauche"
35         anchors.right: parent.right
36         anchors.rightMargin: 5
37         font.pixelSize: 12
38         anchors.top: parent.top
39         anchors.topMargin: 5
40     }
41
42     TextInput {
43         id: cfgType
44         x: 151
45         y: 76
46         width: 80
47         height: 20
48         text: "new|edit"
49         font.pixelSize: 12
50     }
51 */
52
53
54 >>>>>>> 35062d3928ada7bfcb8f08201897545f91b7731b
55
56     Flow {
57         id: wrappersc
58         flow: Flow.TopToBottom
59 <<<<<<< HEAD
60 =======
61         //width: menu.width-10
62 >>>>>>> 35062d3928ada7bfcb8f08201897545f91b7731b
63         anchors.horizontalCenter: parent.horizontalCenter
64         anchors.verticalCenter: parent.verticalCenter
65         spacing:  10
66         anchors.bottomMargin: 5
67         anchors.topMargin: 5
68         Text {
69             text: "Language:"
70 <<<<<<< HEAD
71 =======
72             //font.pixelSize: 16;
73 >>>>>>> 35062d3928ada7bfcb8f08201897545f91b7731b
74             font.bold: true; color: "white"; style: Text.Raised; styleColor: "black"
75             horizontalAlignment: Qt.AlignRight
76         }
77         Input{
78             id: fromIn
79             KeyNavigation.backtab: searchbutton
80             KeyNavigation.tab:phraseIn
81             onAccepted:searchbutton.doSearch();
82             focus: true
83             text: schModel.from
84         }
85 <<<<<<< HEAD
86         Text {
87             text: "Search:"
88 =======
89         /*
90         Text {
91             text: "In reply to:"
92             font.pixelSize: 16; font.bold: true; color: "white"; style: Text.Raised; styleColor: "black"
93             horizontalAlignment: Qt.AlignRight
94         }
95         Input{
96             id: toIn
97             KeyNavigation.backtab: fromIn
98             KeyNavigation.tab:phraseIn
99             onAccepted:searchbutton.doSearch();
100         } */
101         Text {
102             text: "Search:"
103             //font.pixelSize: 16;
104 >>>>>>> 35062d3928ada7bfcb8f08201897545f91b7731b
105             font.bold: true; color: "white"; style: Text.Raised; styleColor: "black"
106             horizontalAlignment: Qt.AlignRight
107         }
108         Input{
109             id: phraseIn
110             KeyNavigation.backtab: fromIn
111             KeyNavigation.tab:searchbutton
112             onAccepted:searchbutton.doSearch();
113             text: schModel.phrase
114         }
115
116 <<<<<<< HEAD
117         Button {
118             x: 2
119             width: menu.width-4
120             height: menu.height
121             id: searchbutton
122             keyUsing: true;
123             opacity: 1
124             text: "Go"
125             KeyNavigation.tab: fromIn
126             Keys.onReturnPressed: searchbutton.doSearch();
127             Keys.onEnterPressed: searchbutton.doSearch();
128             Keys.onSelectPressed: searchbutton.doSearch();
129             Keys.onSpacePressed: searchbutton.doSearch();
130             onClicked: searchbutton.doSearch();
131
132             function doSearch() {
133                 // Search ! allowed
134                 if (wrappersc.state=="invalidinput")
135                     return;
136
137                 schModel.from=fromIn.text;
138                 schModel.phrase = phraseIn.text;
139                 fond.focus = true;
140                 fond.state = ""
141             }
142         }
143     }
144
145     states:
146         State {
147         name: "invalidinput"
148         when: fromIn.text=="" // && phraseIn.text==""
149         PropertyChanges { target: searchbutton ; opacity: 0.6 ; }
150     }
151
152 =======
153
154
155
156     Button {
157         x: 2
158         width: menu.width-4
159         height: menu.height
160         id: searchbutton
161         keyUsing: true;
162         opacity: 1
163         text: "Go"
164         KeyNavigation.tab: fromIn
165         Keys.onReturnPressed: searchbutton.doSearch();
166         Keys.onEnterPressed: searchbutton.doSearch();
167         Keys.onSelectPressed: searchbutton.doSearch();
168         Keys.onSpacePressed: searchbutton.doSearch();
169         onClicked: searchbutton.doSearch();
170
171         function doSearch() {
172             // Search ! allowed
173             if (wrappersc.state=="invalidinput")
174                 return;
175
176                 schModel.from=fromIn.text;
177                 //schModel.to= toIn.text;
178                 schModel.phrase = phraseIn.text;
179                 fond.focus = true;
180                 fond.state = ""
181
182         }
183     }
184     }
185 /*
186     states:
187         State {
188         name: "invalidinput"
189         when: fromIn.text=="" && toIn.text=="" && phraseIn.text==""
190         PropertyChanges { target: searchbutton ; opacity: 0.6 ; }
191     } */
192 >>>>>>> 35062d3928ada7bfcb8f08201897545f91b7731b
193     transitions:
194         Transition {
195         NumberAnimation { target: searchbutton; property: "opacity"; duration: 200 }
196     }
197 }
198 <<<<<<< HEAD
199 =======
200
201
202
203
204 >>>>>>> 35062d3928ada7bfcb8f08201897545f91b7731b