diff --git a/src/qml/homescreen/CoursePage.qml b/src/qml/homescreen/CoursePage.qml deleted file mode 100644 index 8a0c82a..0000000 --- a/src/qml/homescreen/CoursePage.qml +++ /dev/null @@ -1,144 +0,0 @@ -/* - * Copyright 2012 Sebastian Gottfried - * Copyright 2015 Sebastian Gottfried - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -import QtQuick 2.4 -import QtQuick.Controls 1.3 -import QtQuick.Layouts 1.1 -import ktouch 1.0 - -Item { - id: root - - property Profile profile - property DataIndexCourse dataIndexCourse - property KeyboardLayout keyboardLayout - property string keyboardLayoutName - signal lessonSelected(variant course, variant lesson) - - property Course course: lessonSelector.visible? lessonSelector.course: customLessonSelector.course - - function getCourse() { - return !!dataIndexCourse? lessonSelector.course: customLessonSelector.course - } - - width: parent.width - height: parent.height - visible: false - opacity: 0 - - function showImmediately() { - root.x = 0 - root.opacity = 1 - root.visible = 1 - } - - function show(direction) { - appearAnimation.stop() - disappearAnimation.stop() - appearAnimation.direction = direction - appearAnimation.start() - } - - function hide(direction) { - appearAnimation.stop() - disappearAnimation.stop() - disappearAnimation.direction = direction - disappearAnimation.start() - } - - - QtObject { - id: priv - property int duration: 250 - } - - LessonSelector { - id: lessonSelector - - anchors.fill: parent - visible: !!dataIndexCourse - - profile: root.profile - dataIndexCourse: root.dataIndexCourse - onLessonSelected: root.lessonSelected(course, lesson) - } - - CustomLessonSelector { - id: customLessonSelector - anchors.fill: parent - visible: !root.dataIndexCourse - profile: root.profile - keyboardLayout: root.keyboardLayout - keyboardLayoutName: root.keyboardLayoutName - onLessonSelected: root.lessonSelected(course, lesson) - } - - SequentialAnimation { - id: appearAnimation - property int direction: Item.Left - PropertyAction { - target: root - property: "visible" - value: true - } - ParallelAnimation { - NumberAnimation { - target: root - property: "x" - from: appearAnimation.direction === Item.Left? root.width: -root.width - to: 0 - easing.type: Easing.InQuad - duration: priv.duration - } - NumberAnimation { - target: root - property: "opacity" - from: 0 - to: 1 - easing.type: Easing.InQuad - duration: priv.duration - } - } - } - - SequentialAnimation { - id: disappearAnimation - property int direction: Item.Left - ParallelAnimation { - NumberAnimation { - target: root - property: "x" - to: disappearAnimation.direction === Item.Left? -root.width: root.width - easing.type: Easing.InQuad - duration: priv.duration - } - NumberAnimation { - target: root - property: "opacity" - to: 0 - easing.type: Easing.InQuad - duration: priv.duration - } - } - PropertyAction { - target: root - property: "visible" - value: false - } - } -} diff --git a/src/qml/qml.qrc b/src/qml/qml.qrc index 1de2311..62cd6c7 100644 --- a/src/qml/qml.qrc +++ b/src/qml/qml.qrc @@ -1,49 +1,48 @@ main.qml meters/AccuracyMeter.qml meters/CharactersPerMinuteMeter.qml meters/ElapsedTimeMeter.qml meters/Meter.qml meters/StatBox.qml common/DetailedRadioButton.qml common/InfoItem.qml common/InformationTable.qml common/InlineToolbar.qml common/LearningProgressChart.qml common/ListItem.qml common/MessageBox.qml common/SelectionGrip.qml common/SelectionRectangle.qml common/SheetDialog.qml common/Balloon.qml scorescreen/ScoreScreen.qml trainingscreen/KeyboardUnavailableNotice.qml trainingscreen/TrainingScreenMenuOverlay.qml trainingscreen/TrainingScreen.qml trainingscreen/TrainingScreenToolbar.qml trainingscreen/TrainingWidget.qml homescreen/CourseDescriptionItem.qml - homescreen/CoursePage.qml homescreen/CourseSelector.qml homescreen/InitialProfileForm.qml homescreen/LessonLockedNotice.qml homescreen/LessonPreview.qml homescreen/LessonSelectorBase.qml homescreen/HomeScreen.qml homescreen/CustomLessonSelector.qml homescreen/ProfileForm.qml homescreen/LessonSelector.qml homescreen/ProfileSelector.qml homescreen/ProfileDetailsItem.qml keyboard/Keyboard.qml keyboard/KeyItem.qml keyboard/KeyLabel.qml keyboard/KeyboardLayoutEditor.qml common/IconToolButton.qml homescreen/CourseSelectorKeyboardLayoutItem.qml common/IconLabel.qml common/MonochromeIcon.qml homescreen/CourseSelectorKeyboardLayoutList.qml