Remove useless comments
The example is very simple
This commit is contained in:
parent
00d6e22bdb
commit
cba9d5138c
1 changed files with 0 additions and 13 deletions
|
@ -1,17 +1,11 @@
|
||||||
// Includes relevant modules used by the QML
|
|
||||||
import QtQuick
|
import QtQuick
|
||||||
import QtQuick.Controls as Controls
|
import QtQuick.Controls as Controls
|
||||||
import QtQuick.Layouts
|
import QtQuick.Layouts
|
||||||
import org.kde.kirigami as Kirigami
|
import org.kde.kirigami as Kirigami
|
||||||
|
|
||||||
// Provides basic features needed for all kirigami applications
|
|
||||||
Kirigami.ApplicationWindow {
|
Kirigami.ApplicationWindow {
|
||||||
// Unique identifier to reference this object
|
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
// Window title
|
|
||||||
// i18nc() makes a string translatable
|
|
||||||
// and provides additional context for the translators
|
|
||||||
title: i18nc("@title:window", "Hello World")
|
title: i18nc("@title:window", "Hello World")
|
||||||
|
|
||||||
globalDrawer: Kirigami.GlobalDrawer {
|
globalDrawer: Kirigami.GlobalDrawer {
|
||||||
|
@ -30,7 +24,6 @@ Kirigami.ApplicationWindow {
|
||||||
id: kountdownModel
|
id: kountdownModel
|
||||||
}
|
}
|
||||||
|
|
||||||
// Fetches item from addEditSheet.qml and does action on signal
|
|
||||||
AddEditSheet {
|
AddEditSheet {
|
||||||
id: addEditSheet
|
id: addEditSheet
|
||||||
onAdded: kountdownModel.append({
|
onAdded: kountdownModel.append({
|
||||||
|
@ -46,7 +39,6 @@ Kirigami.ApplicationWindow {
|
||||||
onRemoved: kountdownModel.remove(index, 1)
|
onRemoved: kountdownModel.remove(index, 1)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Function called by 'edit' button on card and by 'add'-Action
|
|
||||||
function openPopulatedSheet(mode, index = -1, listName = "", listDesc = "", listDate = "") {
|
function openPopulatedSheet(mode, index = -1, listName = "", listDesc = "", listDate = "") {
|
||||||
addEditSheet.mode = mode
|
addEditSheet.mode = mode
|
||||||
addEditSheet.index = index;
|
addEditSheet.index = index;
|
||||||
|
@ -57,8 +49,6 @@ Kirigami.ApplicationWindow {
|
||||||
addEditSheet.open()
|
addEditSheet.open()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set the first page that will be loaded when the app opens
|
|
||||||
// This can also be set to an id of a Kirigami.Page
|
|
||||||
pageStack.initialPage: Kirigami.ScrollablePage {
|
pageStack.initialPage: Kirigami.ScrollablePage {
|
||||||
title: i18nc("@title", "Kountdown")
|
title: i18nc("@title", "Kountdown")
|
||||||
|
|
||||||
|
@ -71,12 +61,9 @@ Kirigami.ApplicationWindow {
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
// List view for card elements
|
|
||||||
Kirigami.CardsListView {
|
Kirigami.CardsListView {
|
||||||
id: cardsView
|
id: cardsView
|
||||||
// Model contains info to be displayed
|
|
||||||
model: kountdownModel
|
model: kountdownModel
|
||||||
// Delegate is how the information will be presented in the ListView
|
|
||||||
delegate: KountdownDelegate {}
|
delegate: KountdownDelegate {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue