1/****************************************************************************
2**
3** Copyright (C) 2017 The Qt Company Ltd.
4** Contact: https://www.qt.io/licensing/
5**
6** This file is part of the examples of the Qt Toolkit.
7**
8** $QT_BEGIN_LICENSE:BSD$
9** Commercial License Usage
10** Licensees holding valid commercial Qt licenses may use this file in
11** accordance with the commercial license agreement provided with the
12** Software or, alternatively, in accordance with the terms contained in
13** a written agreement between you and The Qt Company. For licensing terms
14** and conditions see https://www.qt.io/terms-conditions. For further
15** information use the contact form at https://www.qt.io/contact-us.
16**
17** BSD License Usage
18** Alternatively, you may use this file under the terms of the BSD license
19** as follows:
20**
21** "Redistribution and use in source and binary forms, with or without
22** modification, are permitted provided that the following conditions are
23** met:
24**   * Redistributions of source code must retain the above copyright
25**     notice, this list of conditions and the following disclaimer.
26**   * Redistributions in binary form must reproduce the above copyright
27**     notice, this list of conditions and the following disclaimer in
28**     the documentation and/or other materials provided with the
29**     distribution.
30**   * Neither the name of The Qt Company Ltd nor the names of its
31**     contributors may be used to endorse or promote products derived
32**     from this software without specific prior written permission.
33**
34**
35** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
36** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
37** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
38** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
39** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
40** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
41** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
42** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
43** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
44** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
45** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
46**
47** $QT_END_LICENSE$
48**
49****************************************************************************/
50
51import QtQuick 2.5
52import QtQuick.Controls 1.4
53import QtQuick.Layouts 1.2
54
55Item {
56    property alias clearButton: clearButton
57    property alias setButton: setButton
58    property alias cancelButton: cancelButton
59    property alias tabTitle: tabTitle
60    property alias orderGroup: orderGroup
61    property alias distanceOrderButton: distanceOrderButton
62    property alias nameOrderButton: nameOrderButton
63    property alias favoritesButton: favoritesButton
64    property alias locales: locales
65
66    Rectangle {
67        id: tabRectangle
68        y: 20
69        height: tabTitle.height * 2
70        color: "#46a2da"
71        anchors.rightMargin: 0
72        anchors.leftMargin: 0
73        anchors.left: parent.left
74        anchors.right: parent.right
75
76        Label {
77            id: tabTitle
78            color: "#ffffff"
79            text: qsTr("Search Options")
80            anchors.verticalCenter: parent.verticalCenter
81            anchors.horizontalCenter: parent.horizontalCenter
82        }
83    }
84
85    Item {
86        id: item2
87        anchors.rightMargin: 20
88        anchors.leftMargin: 20
89        anchors.bottomMargin: 20
90        anchors.topMargin: 20
91        anchors.bottom: parent.bottom
92        anchors.left: parent.left
93        anchors.right: parent.right
94        anchors.top: tabRectangle.bottom
95
96        GridLayout {
97            id: gridLayout3
98            anchors.rightMargin: 0
99            anchors.bottomMargin: 0
100            anchors.leftMargin: 0
101            anchors.topMargin: 0
102            rowSpacing: 10
103            rows: 1
104            columns: 2
105            anchors.fill: parent
106
107            Label {
108                id: label
109                text: qsTr("Locale(s)")
110                visible: locales.visible
111            }
112
113            TextField {
114                id: locales
115                Layout.fillWidth: true
116                placeholderText: qsTr("")
117            }
118
119            RadioButton {
120                id: favoritesButton
121                text: qsTr("Enable favorites")
122                Layout.columnSpan: 2
123            }
124
125            ExclusiveGroup { id: orderGroup }
126            RadioButton {
127                id: distanceOrderButton
128                text: qsTr("Order by distance")
129                exclusiveGroup: orderGroup
130                Layout.columnSpan: 2
131            }
132
133            RadioButton {
134                id: nameOrderButton
135                text: qsTr("Order by name")
136                exclusiveGroup: orderGroup
137                Layout.columnSpan: 2
138            }
139
140            RowLayout {
141                id: rowLayout1
142                Layout.columnSpan: 2
143                Layout.alignment: Qt.AlignRight
144
145                Button {
146                    id: setButton
147                    text: qsTr("Set")
148                }
149
150                Button {
151                    id: clearButton
152                    text: qsTr("Clear")
153                }
154
155                Button {
156                    id: cancelButton
157                    text: qsTr("Cancel")
158                }
159            }
160
161            Item {
162                Layout.fillHeight: true
163                Layout.columnSpan: 2
164            }
165
166
167        }
168    }
169}
170