Changeset View
Changeset View
Standalone View
Standalone View
src/app/qml/PeruseMain.qml
Show All 22 Lines | |||||
23 | import QtQuick.Layouts 1.1 | 23 | import QtQuick.Layouts 1.1 | ||
24 | import QtQuick.Controls 1.4 as QtControls | 24 | import QtQuick.Controls 1.4 as QtControls | ||
25 | import QtQuick.Window 2.2 | 25 | import QtQuick.Window 2.2 | ||
26 | 26 | | |||
27 | import org.kde.kirigami 2.1 as Kirigami | 27 | import org.kde.kirigami 2.1 as Kirigami | ||
28 | import org.kde.peruse 0.1 as Peruse | 28 | import org.kde.peruse 0.1 as Peruse | ||
29 | import org.kde.contentlist 0.1 | 29 | import org.kde.contentlist 0.1 | ||
30 | 30 | | |||
31 | /** | ||||
32 | * @brief main application window. | ||||
33 | * | ||||
34 | * This splits the window in two sections: | ||||
35 | * - A section where you can select comics. | ||||
36 | * - A "global drawer" which can be used to switch between categories | ||||
37 | * and access settings and the open book dialog. | ||||
38 | * | ||||
39 | * The global drawer controls which is the main component on the left. | ||||
40 | * It initializes on WelcomePage. The category filters are each handled | ||||
41 | * by a BookShelf. The store page by Store and the settings by Settings. | ||||
42 | * | ||||
43 | * This also controls the bookViewer, which is a Book object where the | ||||
44 | * main reading of comics is done. | ||||
45 | * | ||||
46 | * There is also the PeruseContextDrawer, which is only accesible on the book | ||||
47 | * page and requires flicking in from the right. | ||||
leinir: It only shows on when the current page is a book, and like in all Kirigami apps, that is on the… | |||||
48 | */ | ||||
31 | Kirigami.ApplicationWindow { | 49 | Kirigami.ApplicationWindow { | ||
32 | id: mainWindow; | 50 | id: mainWindow; | ||
33 | title: "Comic Book Reader"; | 51 | title: "Comic Book Reader"; | ||
34 | property int animationDuration: 200; | 52 | property int animationDuration: 200; | ||
35 | property bool isLoading: true; | 53 | property bool isLoading: true; | ||
36 | pageStack.initialPage: welcomePage; | 54 | pageStack.initialPage: welcomePage; | ||
37 | visible: true; | 55 | visible: true; | ||
38 | // If the controls are not visible, being able to drag the pagestack feels really weird, | 56 | // If the controls are not visible, being able to drag the pagestack feels really weird, | ||
▲ Show 20 Lines • Show All 249 Lines • Show Last 20 Lines |
It only shows on when the current page is a book, and like in all Kirigami apps, that is on the right hand side of the application :)