aboutsummaryrefslogtreecommitdiff
path: root/lib/bookmarks/bookmarksmodel.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/bookmarks/bookmarksmodel.h')
-rw-r--r--lib/bookmarks/bookmarksmodel.h10
1 files changed, 9 insertions, 1 deletions
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 <QAbstractItemModel>
#include <QIcon>
+#include <QTreeView>
#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;
};