@@ -1,3 +1,19 @@
1+/*
2+ * Copyright (C) 2013 Canonical, Ltd.
3+ *
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
7+ *
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
12+ *
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
15+ */
16+
117import QtQuick 2.0
218import ListViewWithPageHeader 0.1
319
@@ -6,26 +22,6 @@ Rectangle {
622 height: 542
723 color: "lightblue"
824
9− focus: true
10− Keys.onPressed: {
11− if (event.key == Qt.Key_B) {
12− listView.positionAtBeginning()
13− } else if (event.key == Qt.Key_1) {
14− animalsModel.setProperty(0, "size", 400);
15− } else if (event.key == Qt.Key_2) {
16− animalsModel.setProperty(1, "size", 400);
17− } else if (event.key == Qt.Key_3) {
18− animalsModel.setProperty(1, "size", 10);
19− } else if (event.key == Qt.Key_H) {
20− listView.headerItem.height = 100
21− } else if (event.key == Qt.Key_D) {
22− listView.delegate = otherRect
23− } else if (event.key == Qt.Key_F) {
24− listView.header = null
25− }
26− }
27−
28−
2925 ListModel {
3026 id: model
3127