DictTypeSelectDialog ported to qml. Remove empty qml files.
[mdictionary] / src / mdictionary / qml / DictTypeSelectDialog.qml
1 /*******************************************************************************
2
3     This file is part of mDictionary.
4
5     mDictionary is free software: you can redistribute it and/or modify
6     it under the terms of the GNU General Public License as published by
7     the Free Software Foundation, either version 3 of the License, or
8     (at your option) any later version.
9
10     mDictionary is distributed in the hope that it will be useful,
11     but WITHOUT ANY WARRANTY; without even the implied warranty of
12     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13     GNU General Public License for more details.
14
15     You should have received a copy of the GNU General Public License
16     along with mDictionary.  If not, see <http://www.gnu.org/licenses/>.
17
18     Copyright 2010 Comarch S.A.
19
20 *******************************************************************************/
21 /*!
22     author: Marcin Kaźmierczak <marcin.kazmierczak@comarch.pl>
23 */
24
25 import Qt 4.7
26
27 Rectangle {
28     SystemPalette { id: myPalette; colorGroup: SystemPalette.Active }
29     signal selectedRow(int nr)
30
31     id: rectangle1
32     color: myPalette.base
33     anchors.fill: parent
34
35     ElementsListView{
36         id: dictTypeList
37         width: rectangle1.width
38         height: rectangle1.height
39         highlightResizeSpeed: 1000
40         delegate: Component{
41             id: dictTypeListDelegate
42             Item {
43                 width: rectangle1.width
44                 height: typeText.height
45                 MouseArea{
46                     anchors.fill: parent
47                     onClicked: {
48                         dictTypeList.currentIndex = number
49                     }
50                     onDoubleClicked: {
51                         selectedRow(number)
52                     }
53                 }
54                 Row {
55                     Text {
56                         id: typeText
57                         text: type
58                         width: rectangle1.width
59                     }
60                 }
61             }
62
63         }
64         model: dictTypeModel
65     }
66
67 }