/**************************************************************************** ** ** Copyright (C) 2011 Nokia Institute of Technology. ** All rights reserved. ** Contact: Manager (renato.chencarek@openbossa.org) ** ** This file is part of the Incredible Circus project. ** ** GNU Lesser General Public License Usage ** ** This file may be used under the terms of the GNU Lesser General Public ** License version 2.1 as published by the Free Software Foundation and ** appearing in the file LICENSE.LGPL included in the packaging of this ** file. Please review the following information to ensure the GNU Lesser ** General Public License version 2.1 requirements will be met: ** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** ****************************************************************************/ import QtQuick 1.0 import Circus 1.0 import "widgets" Item { id: root property bool prev: achievementsList.currentPage != 1 property bool next: achievementsList.currentPage != achievementsList.totalPages signal backClicked() signal nextClicked() signal prevClicked() function restartIndex() { achievementsList.currentIndex = 0; } Image { anchors { top: parent.top topMargin: 26 * scaleFactor horizontalCenter: parent.horizontalCenter } source: "image://cache/common/frame_achievements.png" AchievementsList { id: achievementsList anchors { fill: parent topMargin: 57 * scaleFactor leftMargin: 22 * scaleFactor rightMargin: 22 * scaleFactor } model: achievements pageCount: 4 } } onNextClicked: achievementsList.next(); onPrevClicked: achievementsList.prev(); Ribbon { id: ribbon text: qsTr("Achievements") anchors { top: parent.top topMargin: 16 * scaleFactor horizontalCenter: parent.horizontalCenter } } BottomBar { id: bottomBar anchors { left: parent.left leftMargin: 22 * scaleFactor } Button { text: qsTr("Back") onClicked: root.backClicked(); } Item { width: 44 * scaleFactor height: prevButton.height } ImageButton { id: prevButton enabled: !achievementsList.moving onClicked: root.prevClicked() source: root.prev ? "image://cache/buttons/bt_prevpagination.png" : "image://cache/buttons/bt_prevpagination_off.png" } ImageButton { onClicked: root.nextClicked() enabled: !achievementsList.moving source: root.next ? "image://cache/buttons/bt_nextpagination.png" : "image://cache/buttons/bt_nextpagination_off.png" } } }