|
Rabbit Remote Control 0.1.0-bate14
|
The CBookmarkDatabase class. More...
#include <BookmarkDatabase.h>


Signals | |
| void | bookmarksChanged () |
| void | bookmarkAdded (const BookmarkItem &item) |
| void | bookmarkUpdated (const BookmarkItem &item) |
| void | bookmarkDeleted (int id) |
| void | folderAdded (const BookmarkItem &folder) |
| void | folderUpdated (const BookmarkItem &folder) |
| void | folderDeleted (int folderId) |
| Signals inherited from CDatabase | |
| void | sigChanged () |
Public Member Functions | |
| CBookmarkDatabase (QObject *parent=nullptr) | |
| int | addBookmark (const BookmarkItem &item) |
| bool | updateBookmark (const BookmarkItem &item) |
| bool | deleteBookmark (int id) |
| bool | deleteBookmark (const QList< BookmarkItem > &items) |
| bool | moveBookmark (int id, int newFolderId) |
| int | addFolder (const QString &name, int parentId=0) |
| bool | renameFolder (int folderId, const QString &newName) |
| bool | deleteFolder (int folderId) |
| bool | moveFolder (int folderId, int newParentId) |
| BookmarkItem | getBookmark (int id) |
| QList< BookmarkItem > | getBookmarkByUrl (const QString &url) |
| QList< BookmarkItem > | getAllBookmarks (int folderId=0) |
| QList< BookmarkItem > | searchBookmarks (const QString &keyword) |
| QList< BookmarkItem > | getAllFolders () |
| QList< BookmarkItem > | getSubFolders (int folderId) |
| TreeItem | BookmarkToTree (const BookmarkItem &tree, bool setKey=false) |
| BookmarkItem | TreeToBookmark (const TreeItem &tree) |
| BookmarkItem | TreeToBookmark (const TreeItem &item, const CDatabaseUrl::UrlItem &url) |
| Public Member Functions inherited from CDatabase | |
| CDatabase (QObject *parent=nullptr) | |
| QSqlDatabase | GetDatabase () const |
| virtual bool | IsOpen () const |
| void | CloseDatabase () |
| Close database. | |
| const CParameterDatabase * | GetParameter () const |
| const QString | GetError () const |
| bool | SetDatabase (const CDatabase *db) |
| Share an existing database. | |
| bool | SetDatabase (const QSqlDatabase db, const CParameterDatabase *pPara) |
| Share an existing database. | |
| bool | OpenDatabase (const CParameterDatabase *pPara=nullptr, const QString &szConnectName=QString()) |
| Open a new database. | |
| bool | OpenMySqlDatabase (const CParameterDatabase *pPara, const QString &szConnectName=QString()) |
| bool | OpenODBCDatabase (const CParameterDatabase *pPara, const QString &szConnectName=QString()) |
| bool | OpenSQLiteDatabase (const CParameterDatabase *pPara, const QString &szConnectionName=QString()) |
| bool | OpenSQLiteDatabase (const QString &szFile, const QString &szConnectionName=QString()) |
| virtual bool | ExportToJsonFile (const QString &szFile) |
| virtual bool | ImportFromJsonFile (const QString &szFile) |
Private Member Functions | |
| bool | OnInitializeDatabase () override |
| Initialize database. | |
| virtual bool | ExportToJson (QJsonObject &obj) override |
| virtual bool | ImportFromJson (const QJsonObject &obj) override |
| bool | ExportToJson (int parentId, QJsonArray &obj) |
| bool | ImportFromJson (int parentId, const QJsonArray &obj) |
Private Attributes | |
| CDatabaseTree | m_TreeDB |
| CDatabaseUrl | m_UrlDB |
Additional Inherited Members | |
| Protected Member Functions inherited from CDatabase | |
| void | SetError (const QString &szErr=QString()) |
| virtual bool | OnInitializeSqliteDatabase () |
| virtual bool | OnInitializeMySqlDatabase () |
| Protected Attributes inherited from CDatabase | |
| QString | m_szConnectName |
| QString | m_MinVersion |
| const CParameterDatabase * | m_pPara |
The CBookmarkDatabase class.
Definition at line 66 of file BookmarkDatabase.h.
| CBookmarkDatabase::~CBookmarkDatabase | ( | ) |
Definition at line 26 of file BookmarkDatabase.cpp.
| int CBookmarkDatabase::addBookmark | ( | const BookmarkItem & | item | ) |
Definition at line 48 of file BookmarkDatabase.cpp.
| int CBookmarkDatabase::addFolder | ( | const QString & | name, |
| int | parentId = 0 ) |
Definition at line 94 of file BookmarkDatabase.cpp.
|
nodiscard |
Definition at line 194 of file BookmarkDatabase.cpp.
| bool CBookmarkDatabase::deleteBookmark | ( | const QList< BookmarkItem > & | items | ) |
Definition at line 76 of file BookmarkDatabase.cpp.
| bool CBookmarkDatabase::deleteBookmark | ( | int | id | ) |
Definition at line 71 of file BookmarkDatabase.cpp.
| bool CBookmarkDatabase::deleteFolder | ( | int | folderId | ) |
Definition at line 104 of file BookmarkDatabase.cpp.
|
private |
Definition at line 295 of file BookmarkDatabase.cpp.
|
overrideprivatevirtual |
Reimplemented from CDatabase.
Definition at line 241 of file BookmarkDatabase.cpp.
|
nodiscard |
Definition at line 138 of file BookmarkDatabase.cpp.
|
nodiscard |
Definition at line 170 of file BookmarkDatabase.cpp.
|
nodiscard |
Definition at line 114 of file BookmarkDatabase.cpp.
|
nodiscard |
Definition at line 124 of file BookmarkDatabase.cpp.
|
nodiscard |
Definition at line 182 of file BookmarkDatabase.cpp.
|
overrideprivatevirtual |
Reimplemented from CDatabase.
Definition at line 251 of file BookmarkDatabase.cpp.
|
private |
Definition at line 265 of file BookmarkDatabase.cpp.
| bool CBookmarkDatabase::moveBookmark | ( | int | id, |
| int | newFolderId ) |
Definition at line 89 of file BookmarkDatabase.cpp.
| bool CBookmarkDatabase::moveFolder | ( | int | folderId, |
| int | newParentId ) |
Definition at line 109 of file BookmarkDatabase.cpp.
|
nodiscardoverrideprivatevirtual |
Initialize database.
Reimplemented from CDatabase.
Definition at line 31 of file BookmarkDatabase.cpp.
| bool CBookmarkDatabase::renameFolder | ( | int | folderId, |
| const QString & | newName ) |
Definition at line 99 of file BookmarkDatabase.cpp.
|
nodiscard |
Definition at line 150 of file BookmarkDatabase.cpp.
|
nodiscard |
Definition at line 219 of file BookmarkDatabase.cpp.
|
nodiscard |
Definition at line 211 of file BookmarkDatabase.cpp.
| bool CBookmarkDatabase::updateBookmark | ( | const BookmarkItem & | item | ) |
Definition at line 56 of file BookmarkDatabase.cpp.
|
private |
Definition at line 113 of file BookmarkDatabase.h.
|
private |
Definition at line 114 of file BookmarkDatabase.h.