diff --git a/assets/Astronaut.png b/assets/Astronaut.png
new file mode 100644
index 0000000..5940afb
Binary files /dev/null and b/assets/Astronaut.png differ
diff --git a/assets/Bomb.png b/assets/Bomb.png
new file mode 100644
index 0000000..131a8c0
Binary files /dev/null and b/assets/Bomb.png differ
diff --git a/assets/BugSearch.png b/assets/BugSearch.png
new file mode 100644
index 0000000..76d9946
Binary files /dev/null and b/assets/BugSearch.png differ
diff --git a/assets/E-reading.png b/assets/E-reading.png
new file mode 100644
index 0000000..47ba832
Binary files /dev/null and b/assets/E-reading.png differ
diff --git a/assets/Faq.png b/assets/Faq.png
new file mode 100644
index 0000000..6dbcec8
Binary files /dev/null and b/assets/Faq.png differ
diff --git a/assets/Get started.png b/assets/Get started.png
new file mode 100644
index 0000000..8be85d9
Binary files /dev/null and b/assets/Get started.png differ
diff --git a/assets/Grow.png b/assets/Grow.png
new file mode 100644
index 0000000..afb6c90
Binary files /dev/null and b/assets/Grow.png differ
diff --git a/assets/Knowledge base.png b/assets/Knowledge base.png
new file mode 100644
index 0000000..bb38ccd
Binary files /dev/null and b/assets/Knowledge base.png differ
diff --git a/assets/Spaceship.png b/assets/Spaceship.png
new file mode 100644
index 0000000..a649fdc
Binary files /dev/null and b/assets/Spaceship.png differ
diff --git a/assets/Type.png b/assets/Type.png
new file mode 100644
index 0000000..2b02d8b
Binary files /dev/null and b/assets/Type.png differ
diff --git a/assets/assets.qrc b/assets/assets.qrc
new file mode 100644
index 0000000..ebd3df5
--- /dev/null
+++ b/assets/assets.qrc
@@ -0,0 +1,11 @@
+
+
+ Type.png
+ Spaceship.png
+ Grow.png
+ BugSearch.png
+ Bomb.png
+ E-reading.png
+ Astronaut.png
+
+
diff --git a/buho.pro b/buho.pro
index 8ac4c63..ab449fe 100644
--- a/buho.pro
+++ b/buho.pro
@@ -1,78 +1,79 @@
QT += qml
QT += quick
QT += sql
QT += widgets
QT += quickcontrols2
CONFIG += c++11
CONFIG += ordered
TARGET = buho
TEMPLATE = app
DESTDIR = $$OUT_PWD/
linux:unix:!android {
message(Building for Linux KDE)
QT += webengine
} else:android {
message(Building helpers for Android)
include($$PWD/3rdparty/kirigami/kirigami.pri)
include($$PWD/android/android.pri)
include($$PWD/android/openssl/openssl.pri)
DEFINES += STATIC_KIRIGAMI
} else {
message("Unknown configuration")
}
include($$PWD/mauikit/mauikit.pri)
include($$PWD/QGumboParser/QGumboParser.pri)
DEFINES += QT_DEPRECATED_WARNINGS
SOURCES += \
main.cpp \
src/db/db.cpp \
src/db/dbactions.cpp \
src/buho.cpp \
src/documenthandler.cpp \
src/linker.cpp \
src/utils/htmlparser.cpp
RESOURCES += \
- qml.qrc
+ qml.qrc \
+ assets/assets.qrc
# Additional import path used to resolve QML modules in Qt Creator's code model
QML_IMPORT_PATH =
# Additional import path used to resolve QML modules just for Qt Quick Designer
QML_DESIGNER_IMPORT_PATH =
# Default rules for deployment.
qnx: target.path = /tmp/$${TARGET}/bin
else: unix:!android: target.path = /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += target
DISTFILES += \
src/db/script.sql \
src/utils/owl.js \
HEADERS += \
src/db/db.h \
src/db/dbactions.h \
src/buho.h \
src/utils/owl.h \
src/documenthandler.h \
src/linker.h \
src/utils/htmlparser.h
INCLUDEPATH += \
src/utils/ \
src/
diff --git a/src/views/books/BooksView.qml b/src/views/books/BooksView.qml
index 30cd52a..6101c3a 100644
--- a/src/views/books/BooksView.qml
+++ b/src/views/books/BooksView.qml
@@ -1,24 +1,27 @@
import QtQuick 2.9
import "../../widgets"
import org.kde.maui 1.0 as Maui
Maui.Page
{
id: control
property alias cardsView : cardsView
headBarVisible: false
margins: isMobile ? space.big : space.enormus
CardsView
{
id: cardsView
anchors.fill: parent
// onItemClicked: linkClicked(cardsView.model.get(index))
- holder.message: "
No Books!
You can create new notes
links and books
"
-
+ holder.emoji: "qrc:/E-reading.png"
+ holder.isMask: false
+ holder.title : "No Books!"
+ holder.body: "Click here to save a new link"
+ holder.emojiSize: iconSizes.huge
}
}
diff --git a/src/views/links/LinksView.qml b/src/views/links/LinksView.qml
index bf67d3c..cceff2d 100644
--- a/src/views/links/LinksView.qml
+++ b/src/views/links/LinksView.qml
@@ -1,89 +1,98 @@
import QtQuick 2.9
import "../../widgets"
import org.kde.maui 1.0 as Maui
Maui.Page
{
id: control
property alias cardsView : cardsView
property alias previewer : previewer
property var currentLink : ({})
signal linkClicked(var link)
+ headBarVisible: !cardsView.holder.visible
margins: isMobile ? space.big : space.enormus
headBarExit: false
headBar.leftContent: [
Maui.ToolButton
{
iconName: cardsView.gridView ? "view-list-icons" : "view-list-details"
onClicked:
{
cardsView.gridView = !cardsView.gridView
cardsView.refresh()
}
},
Maui.ToolButton
{
iconName: "view-sort-ascending"
},
Maui.ToolButton
{
iconName: "view-sort-descending"
}
]
headBar.rightContent: [
Maui.ToolButton
{
iconName: "tag-recents"
},
Maui.ToolButton
{
iconName: "window-pin"
},
Maui.ToolButton
{
iconName: "view-calendar-day"
}
]
Previewer
{
id: previewer
}
CardsView
{
id: cardsView
anchors.fill: parent
onItemClicked: linkClicked(cardsView.model.get(index))
- holder.message: "No Links!
You can create new notes
links and books
"
-
+ holder.emoji: "qrc:/Astronaut.png"
+ holder.isMask: false
+ holder.title : "No Links!"
+ holder.body: "Click here to save a new link"
+ holder.emojiSize: iconSizes.huge
+ Connections
+ {
+ target: cardsView.holder
+ onActionTriggered: newLink()
+ }
}
function populate()
{
var data = owl.getLinks()
for(var i in data)
{
console.log("PREVIEW", data[i].preview)
append(data[i])
}
}
function append(link)
{
cardsView.model.append(link)
}
}
diff --git a/src/views/notes/NotesView.qml b/src/views/notes/NotesView.qml
index db76405..c7594d8 100644
--- a/src/views/notes/NotesView.qml
+++ b/src/views/notes/NotesView.qml
@@ -1,116 +1,121 @@
import QtQuick 2.9
import QtQuick.Layouts 1.3
import "../../widgets"
import org.kde.maui 1.0 as Maui
import org.kde.kirigami 2.2 as Kirigami
Maui.Page
{
property alias cardsView : cardsView
property var currentNote : ({})
signal noteClicked(var note)
margins: 0
headBarExit : false
+ headBarVisible: !cardsView.holder.visible
headBar.leftContent: [
Maui.ToolButton
{
iconName: cardsView.gridView ? "view-list-icons" : "view-list-details"
onClicked:
{
cardsView.gridView = !cardsView.gridView
cardsView.refresh()
}
},
Maui.ToolButton
{
iconName: "view-sort-ascending"
},
Maui.ToolButton
{
iconName: "view-sort-descending"
}
]
headBar.rightContent: [
Maui.ToolButton
{
iconName: "tag-recents"
},
Maui.ToolButton
{
id: pinButton
iconName: "window-pin"
checkable: true
iconColor: checked ? highlightColor : textColor
},
Maui.ToolButton
{
iconName: "view-calendar-day"
}
]
ColumnLayout
{
anchors.fill: parent
spacing: 0
CardsList
{
id: pinnedList
visible: pinButton.checked
Layout.margins: isMobile ? space.big : space.enormus
Layout.alignment: Qt.AlignVCenter
Layout.fillWidth: true
height: cardsView.itemHeight
itemHeight: cardsView.itemHeight * 0.9
itemWidth: itemHeight
onItemClicked: noteClicked(cardsView.model.get(index))
}
Kirigami.Separator
{
visible: pinnedList.visible
Layout.fillWidth: true
height: unit
}
CardsView
{
id: cardsView
Layout.fillHeight: true
Layout.fillWidth: true
Layout.margins: isMobile ? space.big : space.enormus
onItemClicked: noteClicked(cardsView.model.get(index))
- holder.message : "No notes!
Click here to create a new note
"
+ holder.emoji: "qrc:/Type.png"
+ holder.emojiSize: iconSizes.huge
+ holder.isMask: false
+ holder.title : "No notes!"
+ holder.body: "Click here to create a new note"
Connections
{
target: cardsView.holder
onActionTriggered: newNote()
}
}
}
function populate()
{
var data = owl.getNotes()
for(var i in data)
append(data[i])
}
function append(note)
{
cardsView.model.append(note)
}
}
diff --git a/src/widgets/CardsView.qml b/src/widgets/CardsView.qml
index 63486b9..5551b6c 100644
--- a/src/widgets/CardsView.qml
+++ b/src/widgets/CardsView.qml
@@ -1,64 +1,64 @@
import QtQuick 2.9
import QtQuick.Controls 2.2
import org.kde.kirigami 2.2 as Kirigami
import org.kde.maui 1.0 as Maui
GridView
{
property bool gridView : true
property alias holder : holder
readonly property int defaultSize : unit * 200
property int itemWidth : !gridView ? parent.width * 0.9 :
isMobile? (width-itemSpacing) * 0.42 : unit * 200
property int itemHeight: unit * 120
property int itemSpacing: space.huge
signal itemClicked(int index)
boundsBehavior: !isMobile? Flickable.StopAtBounds : Flickable.DragAndOvershootBounds
cellWidth: itemWidth + itemSpacing
cellHeight: itemHeight + itemSpacing
clip : true
+
Maui.Holder
{
id: holder
- visible: count < 1
- message: "Nohing here!
You can create new notes
links and books
"
+ visible: count < 1
}
model: ListModel { id: cardsModel}
delegate: CardDelegate
{
id: delegate
cardWidth: itemWidth
cardHeight: itemHeight
onClicked:
{
currentIndex = index
itemClicked(index)
}
}
// onWidthChanged: if(!isMobile && gridView) adaptGrid()
function adaptGrid()
{
var amount = parseInt(width/(itemWidth + itemSpacing),10)
var leftSpace = parseInt(width-(amount*(itemWidth + itemSpacing)), 10)
var size = parseInt((itemWidth + itemSpacing)+(parseInt(leftSpace/amount, 10)), 10)
size = size > itemWidth + itemSpacing ? size : itemWidth + itemSpacing
cellWidth = size
}
function refresh()
{
model = cardsModel
}
}