24 #ifndef DIGIKAM_BOOKMARKS_MNGR_H
25 #define DIGIKAM_BOOKMARKS_MNGR_H
30 #include <QAbstractItemModel>
31 #include <QUndoCommand>
32 #include <QSortFilterProxyModel>
41 class BookmarksManager;
97 const QString& newValue,
101 void undo()
override;
102 void redo()
override;
135 QVariant
data(
const QModelIndex&
index,
int role = Qt::DisplayRole)
const override;
137 int rowCount(
const QModelIndex&
parent = QModelIndex())
const override;
138 QModelIndex
index(
int,
int,
const QModelIndex& = QModelIndex())
const override;
139 QModelIndex
parent(
const QModelIndex&
index= QModelIndex())
const override;
140 Qt::ItemFlags
flags(
const QModelIndex&
index)
const override;
142 QMimeData*
mimeData(
const QModelIndexList& indexes)
const override;
149 int column,
const QModelIndex&
parent)
override;
151 bool removeRows(
int row,
int count,
const QModelIndex&
parent = QModelIndex())
override;
152 bool setData(
const QModelIndex&
index,
const QVariant&
value,
int role = Qt::EditRole)
override;
178 int columnCount(
const QModelIndex& parent = QModelIndex())
const override;
195 int columnCount(
const QModelIndex&)
const override;
207 void emitResult(
bool v);
219 explicit BookmarksManager(
const QString& bookmarksFile, QObject*
const parent =
nullptr);
Definition: bookmarksmngr.h:171
bool filterAcceptsRow(int srow, const QModelIndex &sparent) const override
Definition: bookmarksmngr.cpp:712
int columnCount(const QModelIndex &parent=QModelIndex()) const override
Definition: bookmarksmngr.cpp:707
AddBookmarkProxyModel(QObject *const parent=nullptr)
Definition: bookmarksmngr.cpp:702
Definition: bookmarknode.h:41
Definition: bookmarksmngr.h:214
void setTitle(BookmarkNode *const node, const QString &newTitle)
Definition: bookmarksmngr.cpp:871
void entryChanged(BookmarkNode *item)
void setUrl(BookmarkNode *const node, const QString &newUrl)
Definition: bookmarksmngr.cpp:885
~BookmarksManager() override
Definition: bookmarksmngr.cpp:793
void save()
Definition: bookmarksmngr.cpp:826
void setComment(BookmarkNode *const node, const QString &newDesc)
Definition: bookmarksmngr.cpp:899
void importBookmarks()
Definition: bookmarksmngr.cpp:938
BookmarkNode * bookmarks()
Definition: bookmarksmngr.cpp:913
void entryRemoved(BookmarkNode *parent, int row, BookmarkNode *item)
void addBookmark(BookmarkNode *const parent, BookmarkNode *const node, int row=-1)
Definition: bookmarksmngr.cpp:843
void removeBookmark(BookmarkNode *const node)
Definition: bookmarksmngr.cpp:856
void entryAdded(BookmarkNode *item)
void exportBookmarks()
Definition: bookmarksmngr.cpp:965
BookmarksManager(const QString &bookmarksFile, QObject *const parent=nullptr)
Definition: bookmarksmngr.cpp:785
void load()
Definition: bookmarksmngr.cpp:803
BookmarksModel * bookmarksModel()
Definition: bookmarksmngr.cpp:923
QUndoStack * undoRedoStack() const
Definition: bookmarksmngr.cpp:933
void changeExpanded()
Definition: bookmarksmngr.cpp:799
Definition: bookmarksmngr.h:114
int columnCount(const QModelIndex &parent=QModelIndex()) const override
Definition: bookmarksmngr.cpp:442
QStringList mimeTypes() const override
Definition: bookmarksmngr.cpp:550
~BookmarksModel() override
Definition: bookmarksmngr.cpp:254
BookmarksManager * bookmarksManager() const
Definition: bookmarksmngr.cpp:259
BookmarkNode * node(const QModelIndex &index) const
Definition: bookmarksmngr.cpp:688
bool hasChildren(const QModelIndex &parent=QModelIndex()) const override
Definition: bookmarksmngr.cpp:503
bool dropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent) override
Definition: bookmarksmngr.cpp:585
void entryChanged(BookmarkNode *item)
Definition: bookmarksmngr.cpp:301
bool removeRows(int row, int count, const QModelIndex &parent=QModelIndex()) override
Definition: bookmarksmngr.cpp:307
Roles
Definition: bookmarksmngr.h:120
@ TypeRole
Definition: bookmarksmngr.h:121
@ UrlStringRole
Definition: bookmarksmngr.h:123
@ SeparatorRole
Definition: bookmarksmngr.h:124
@ DateAddedRole
Definition: bookmarksmngr.h:125
@ UrlRole
Definition: bookmarksmngr.h:122
QModelIndex parent(const QModelIndex &index=QModelIndex()) const override
Definition: bookmarksmngr.cpp:478
Qt::DropActions supportedDropActions() const override
Definition: bookmarksmngr.cpp:545
void entryRemoved(BookmarkNode *parent, int row, BookmarkNode *item)
Definition: bookmarksmngr.cpp:291
BookmarksModel(BookmarksManager *const mngr, QObject *const parent=nullptr)
Definition: bookmarksmngr.cpp:238
QMimeData * mimeData(const QModelIndexList &indexes) const override
Definition: bookmarksmngr.cpp:558
void entryAdded(BookmarkNode *item)
Definition: bookmarksmngr.cpp:276
QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const override
Definition: bookmarksmngr.cpp:352
QModelIndex index(int, int, const QModelIndex &=QModelIndex()) const override
Definition: bookmarksmngr.cpp:464
int rowCount(const QModelIndex &parent=QModelIndex()) const override
Definition: bookmarksmngr.cpp:447
bool setData(const QModelIndex &index, const QVariant &value, int role=Qt::EditRole) override
Definition: bookmarksmngr.cpp:638
Qt::ItemFlags flags(const QModelIndex &index) const override
Definition: bookmarksmngr.cpp:516
QVariant headerData(int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const override
Definition: bookmarksmngr.cpp:331
Definition: bookmarksmngr.h:83
void undo() override
Definition: bookmarksmngr.cpp:170
BookmarkData
Definition: bookmarksmngr.h:87
@ Desc
Definition: bookmarksmngr.h:90
@ Title
Definition: bookmarksmngr.h:89
@ Url
Definition: bookmarksmngr.h:88
~ChangeBookmarkCommand() override
Definition: bookmarksmngr.cpp:165
void redo() override
Definition: bookmarksmngr.cpp:196
ChangeBookmarkCommand(BookmarksManager *const mngr, BookmarkNode *const node, const QString &newValue, BookmarkData type)
Definition: bookmarksmngr.cpp:128
Definition: bookmarksmngr.h:68
InsertBookmarksCommand(BookmarksManager *const mngr, BookmarkNode *const parent, BookmarkNode *const node, int row)
Definition: bookmarksmngr.cpp:88
void redo() override
Definition: bookmarksmngr.cpp:103
void undo() override
Definition: bookmarksmngr.cpp:98
Definition: bookmarksmngr.h:45
void redo() override
Definition: bookmarksmngr.cpp:79
RemoveBookmarksCommand(BookmarksManager *const mngr, BookmarkNode *const parent, int row)
Definition: bookmarksmngr.cpp:52
int m_row
Definition: bookmarksmngr.h:58
~RemoveBookmarksCommand() override
Definition: bookmarksmngr.cpp:64
BookmarkNode * m_node
Definition: bookmarksmngr.h:60
void undo() override
Definition: bookmarksmngr.cpp:72
bool m_done
Definition: bookmarksmngr.h:62
BookmarksManager * m_bookmarkManager
Definition: bookmarksmngr.h:59
BookmarkNode * m_parent
Definition: bookmarksmngr.h:61
Definition: bookmarksmngr.h:188
bool filterAcceptsRow(int srow, const QModelIndex &sparent) const override
Definition: bookmarksmngr.cpp:735
void signalFilterAccepts(bool)
int columnCount(const QModelIndex &) const override
Definition: bookmarksmngr.cpp:727
TreeProxyModel(QObject *const parent=nullptr)
Definition: bookmarksmngr.cpp:721
qulonglong value
Definition: itemviewutilities.cpp:592
@ Orientation
Definition: coredbfields.h:86
Definition: datefolderview.cpp:43
DropAction
Definition: itemdragdrop.cpp:60