2f7c1a00a605dd16b232f1934b8090a074dc45d4
[mdictionary] / src / mdictionary / qml / DictManagerWidget.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: dictList
37         width: rectangle1.width
38 //        height: rectangle1.height
39         anchors.top: parent.top
40         highlightResizeSpeed: 1000
41         delegate: Component{
42             id: dictListDelegate
43             Item {
44                 width: rectangle1.width
45                 height: typeText.height
46                 MouseArea{
47                     anchors.fill: parent
48                     onClicked: {
49                         dictTypeList.currentIndex = number
50                     }
51                     onDoubleClicked: {
52                         selectedRow(number)
53                     }
54                 }
55                 Row {
56                     //image zaznacz/odznacz
57                     //image logo
58                     Image {
59                         id: logo
60                         source: iconPath
61                     }
62                     Text {
63                         id: nameText
64                         text: name
65 //                        width: rectangle1.width
66                     }
67                 }
68             }
69
70         }
71         model: dictModel
72     }
73
74     //buttonki
75
76 }