2016-12-10 22:39:53 +00:00
|
|
|
import QtQuick 2.7
|
|
|
|
import QtQuick.Controls 2.0
|
|
|
|
import QtQuick.Controls 1.4
|
|
|
|
import QtQuick.Layouts 1.0
|
|
|
|
|
|
|
|
Item {
|
2016-12-11 16:09:39 +00:00
|
|
|
id: root
|
2016-12-10 22:39:53 +00:00
|
|
|
width: 800
|
|
|
|
height: 600
|
2016-12-11 16:09:39 +00:00
|
|
|
signal currentFolderChanged()
|
2016-12-14 21:50:26 +00:00
|
|
|
signal currentNoteChanged()
|
2016-12-29 20:19:00 +01:00
|
|
|
signal addNoteButtonClicked()
|
|
|
|
signal addFolderButtonClicked()
|
2016-12-11 16:09:39 +00:00
|
|
|
property alias currentFolderIndex: folderList.currentIndex
|
2016-12-14 21:50:26 +00:00
|
|
|
property alias currentNoteIndex: noteList.currentIndex
|
2016-12-10 22:39:53 +00:00
|
|
|
|
|
|
|
RowLayout {
|
|
|
|
id: layout
|
|
|
|
anchors.fill: parent
|
|
|
|
spacing: 0
|
|
|
|
|
2016-12-11 16:09:39 +00:00
|
|
|
FolderList {
|
|
|
|
id: folderList
|
|
|
|
model: folderListModel
|
2016-12-10 22:39:53 +00:00
|
|
|
Layout.fillWidth: true
|
|
|
|
Layout.fillHeight: true
|
|
|
|
Layout.minimumWidth: 50
|
|
|
|
Layout.preferredWidth: 100
|
2016-12-14 21:50:26 +00:00
|
|
|
Layout.maximumWidth: 200
|
2016-12-10 22:39:53 +00:00
|
|
|
Layout.minimumHeight: 150
|
|
|
|
|
|
|
|
onCurrentItemChanged: {
|
2016-12-11 16:09:39 +00:00
|
|
|
root.currentFolderChanged()
|
2016-12-10 22:39:53 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-12-11 16:09:39 +00:00
|
|
|
NoteList {
|
|
|
|
id: noteList
|
2016-12-12 22:33:33 +00:00
|
|
|
model: noteListModel
|
2016-12-10 22:39:53 +00:00
|
|
|
Layout.fillWidth: true
|
2016-12-11 16:09:39 +00:00
|
|
|
Layout.fillHeight: true
|
2016-12-10 22:39:53 +00:00
|
|
|
Layout.minimumWidth: 100
|
2016-12-14 21:50:26 +00:00
|
|
|
Layout.maximumWidth: 200
|
2016-12-10 22:39:53 +00:00
|
|
|
Layout.preferredWidth: 200
|
|
|
|
Layout.preferredHeight: 100
|
2016-12-14 21:50:26 +00:00
|
|
|
|
|
|
|
onCurrentItemChanged: {
|
|
|
|
root.currentNoteChanged()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
NoteEditor {
|
|
|
|
id: noteEditor
|
|
|
|
model: noteModel
|
|
|
|
Layout.fillWidth: true
|
|
|
|
Layout.fillHeight: true
|
|
|
|
Layout.minimumWidth: 100
|
|
|
|
Layout.preferredHeight: 100
|
2016-12-10 22:39:53 +00:00
|
|
|
}
|
|
|
|
|
2016-12-11 16:09:39 +00:00
|
|
|
}
|
2016-12-10 22:39:53 +00:00
|
|
|
|
2016-12-29 20:19:00 +01:00
|
|
|
AddButton {
|
|
|
|
id: addButton
|
|
|
|
anchors.right: parent.right
|
|
|
|
anchors.bottom: parent.bottom
|
|
|
|
onAddFolderButtonClicked: root.addFolderButtonClicked()
|
|
|
|
onAddNoteButtonClicked: root.addNoteButtonClicked()
|
|
|
|
}
|
|
|
|
|
2016-12-10 22:39:53 +00:00
|
|
|
}
|