From 5d0adf426a33440542eb88eca83c804dcec58475 Mon Sep 17 00:00:00 2001 From: Aqua-sama Date: Thu, 11 Jan 2018 17:30:38 +0100 Subject: Writing BookmarksModel to xbel --- lib/bookmarks/bookmarksmodel.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'lib/bookmarks/bookmarksmodel.h') diff --git a/lib/bookmarks/bookmarksmodel.h b/lib/bookmarks/bookmarksmodel.h index 986a195..79bd9ce 100644 --- a/lib/bookmarks/bookmarksmodel.h +++ b/lib/bookmarks/bookmarksmodel.h @@ -7,8 +7,10 @@ */ #include "bookmarkitem.h" +#include "xbel.h" #include #include +#include #ifndef BOOKMARKSMODEL_H #define BOOKMARKSMODEL_H @@ -26,7 +28,10 @@ public: explicit BookmarksModel(QStyle *style, QObject *parent = nullptr); ~BookmarksModel() override; - void setRoot(BookmarkItem *root); + bool isModified() const; + + bool read(Xbel *xbel); + bool write(Xbel *xbel); QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override; @@ -47,9 +52,12 @@ public: QModelIndexList match(const QModelIndex &start, int role, const QVariant &value, int hits, Qt::MatchFlags flags) const override; + void expandItems(QTreeView *view, BookmarkItem *root = nullptr); + private: QIcon folderIcon; QIcon bookmarkIcon; + bool modified = false; BookmarkItem *m_rootItem; }; -- cgit v1.2.1