BibleTime
|
#include <cbookmarkindex.h>
Public Types | |
enum | MenuAction { NewFolder = 0 , ChangeFolder , EditBookmark , SortFolderBookmarks , SortAllBookmarks , ImportBookmarks , ExportBookmarks , PrintBookmarks , DeleteEntries , ActionCount , ActionBegin = NewFolder , ActionEnd = ActionCount } |
Signals | |
void | createReadDisplayWindow (QList< CSwordModuleInfo * >, QString const &) |
Emitted when a module should be opened. More... | |
void | magInfoProvided (Rendering::InfoType const, QString const &data) |
Public Member Functions | |
CBookmarkIndex (QWidget *const parent=nullptr) | |
Protected Member Functions | |
void | dragEnterEvent (QDragEnterEvent *event) override |
void | dragLeaveEvent (QDragLeaveEvent *event) override |
void | dragMoveEvent (QDragMoveEvent *event) override |
QMimeData * | dragObject () |
void | dropEvent (QDropEvent *event) override |
void | leaveEvent (QEvent *event) override |
void | mouseMoveEvent (QMouseEvent *event) override |
void | mouseReleaseEvent (QMouseEvent *event) override |
void | paintEvent (QPaintEvent *event) override |
void | startDrag (Qt::DropActions supportedActions) override |
Private Member Functions | |
void | deleteEntries () |
bool | enableAction (QModelIndex const &index, MenuAction const type) const |
bool | hasBookmarksRecursively (QModelIndexList selected) const |
void | hideExtraItem () |
void | showExtraItem () |
Private Attributes | |
QAction * | m_actions [ActionCount] |
BtBookmarksModel * | m_bookmarksModel |
QPoint | m_dragMovementPosition |
QPoint | m_dragStartPosition |
QPersistentModelIndex | m_extraItem |
QTimer | m_magTimer |
int | m_mouseReleaseEventModifiers |
QMenu * | m_popup |
QModelIndex | m_previousEventItem |
The widget which manages all bookmarks.
Definition at line 37 of file cbookmarkindex.h.
Enumerator | |
---|---|
NewFolder | |
ChangeFolder | |
EditBookmark | |
SortFolderBookmarks | |
SortAllBookmarks | |
ImportBookmarks | |
ExportBookmarks | |
PrintBookmarks | |
DeleteEntries | |
ActionCount | |
ActionBegin | |
ActionEnd |
Definition at line 43 of file cbookmarkindex.h.
CBookmarkIndex::CBookmarkIndex | ( | QWidget *const | parent = nullptr | ) |
Definition at line 55 of file cbookmarkindex.cpp.
References ActionBegin, ActionEnd, BtBookmarksModel::addFolder(), BT_ASSERT, BT_CONNECT, btConfig(), ChangeFolder, createReadDisplayWindow(), Rendering::CrossReference, DeleteEntries, deleteEntries(), BtBookmarksModel::description(), BtEditBookmarkDialog::descriptionText(), EditBookmark, enableAction(), ExportBookmarks, anonymous_namespace{cbookmarkindex.cpp}::fileDialogFilter(), BtConfig::getDisplayOptions(), BtConfig::getFilterOptions(), hasBookmarksRecursively(), if(), ImportBookmarks, BtBookmarksModel::index(), BtBookmarksModel::insertRows(), BtBookmarksModel::isBookmark(), BtBookmarksModel::isFolder(), BtBookmarksModel::key(), BtBookmarksModel::load(), m_actions, m_bookmarksModel, m_extraItem, m_magTimer, m_mouseReleaseEventModifiers, m_popup, m_previousEventItem, magInfoProvided(), BtBookmarksModel::module(), NewFolder, PrintBookmarks, BtBookmarksModel::rowCount(), BtBookmarksModel::save(), BtBookmarksModel::setData(), BtBookmarksModel::setDescription(), showExtraItem(), message::showQuestion(), SortAllBookmarks, SortFolderBookmarks, BtBookmarksModel::sortItems(), Rendering::Text, and BtEditBookmarkDialog::titleText().
|
signal |
Emitted when a module should be opened.
Referenced by CBookmarkIndex(), and BibleTime::initConnections().
|
private |
Definition at line 628 of file cbookmarkindex.cpp.
Referenced by CBookmarkIndex(), and dropEvent().
|
overrideprotected |
Definition at line 360 of file cbookmarkindex.cpp.
|
overrideprotected |
Definition at line 385 of file cbookmarkindex.cpp.
|
overrideprotected |
Definition at line 369 of file cbookmarkindex.cpp.
References m_dragMovementPosition.
|
protected |
Creates a drag mime data object for the current selection.
Definition at line 341 of file cbookmarkindex.cpp.
References BtBookmarksModel::description(), BtBookmarksModel::isBookmark(), BtBookmarksModel::key(), m_bookmarksModel, BtBookmarksModel::module(), and CSwordModuleInfo::name().
Referenced by startDrag().
|
overrideprotected |
Definition at line 452 of file cbookmarkindex.cpp.
References BtBookmarksModel::addBookmark(), BT_ASSERT, BT_CONNECT, BtBookmarksModel::copyItems(), deleteEntries(), CSwordBackend::findModuleByName(), BtBookmarksModel::hasDescendant(), CSwordBackend::instance(), BtBookmarksModel::isBookmark(), BtBookmarksModel::isFolder(), m_bookmarksModel, and BtBookmarksModel::rowCount().
|
private |
Definition at line 579 of file cbookmarkindex.cpp.
References ChangeFolder, DeleteEntries, EditBookmark, ExportBookmarks, hasBookmarksRecursively(), ImportBookmarks, BtBookmarksModel::isBookmark(), BtBookmarksModel::isFolder(), m_bookmarksModel, NewFolder, PrintBookmarks, and SortFolderBookmarks.
Referenced by CBookmarkIndex().
|
private |
Definition at line 600 of file cbookmarkindex.cpp.
References BtBookmarksModel::isBookmark(), BtBookmarksModel::isFolder(), m_bookmarksModel, and BtBookmarksModel::rowCount().
Referenced by CBookmarkIndex(), and enableAction().
|
private |
Definition at line 619 of file cbookmarkindex.cpp.
References m_extraItem.
Referenced by mouseMoveEvent().
|
overrideprotected |
Definition at line 622 of file cbookmarkindex.cpp.
References showExtraItem().
|
signal |
Referenced by CBookmarkIndex(), and BibleTime::initView().
|
overrideprotected |
Definition at line 658 of file cbookmarkindex.cpp.
References hideExtraItem(), m_extraItem, m_magTimer, m_previousEventItem, and showExtraItem().
|
overrideprotected |
Definition at line 335 of file cbookmarkindex.cpp.
References m_mouseReleaseEventModifiers.
|
overrideprotected |
Definition at line 390 of file cbookmarkindex.cpp.
References BtIcons::icon_pointing_arrow, BtIcons::instance(), BtBookmarksModel::isBookmark(), BtBookmarksModel::isFolder(), m_bookmarksModel, m_dragMovementPosition, m_extraItem, and util::tool::mWidth().
|
private |
Definition at line 614 of file cbookmarkindex.cpp.
References m_extraItem.
Referenced by CBookmarkIndex(), leaveEvent(), and mouseMoveEvent().
|
overrideprotected |
Definition at line 648 of file cbookmarkindex.cpp.
References dragObject().
|
private |
Definition at line 98 of file cbookmarkindex.h.
Referenced by CBookmarkIndex().
|
private |
Pointer to bookmarks model, added for convenience.
Definition at line 109 of file cbookmarkindex.h.
Referenced by CBookmarkIndex(), dragObject(), dropEvent(), enableAction(), hasBookmarksRecursively(), and paintEvent().
|
private |
Definition at line 104 of file cbookmarkindex.h.
Referenced by dragMoveEvent(), and paintEvent().
|
private |
Definition at line 105 of file cbookmarkindex.h.
|
private |
Definition at line 106 of file cbookmarkindex.h.
Referenced by CBookmarkIndex(), hideExtraItem(), mouseMoveEvent(), paintEvent(), and showExtraItem().
|
private |
Definition at line 101 of file cbookmarkindex.h.
Referenced by CBookmarkIndex(), and mouseMoveEvent().
|
private |
Definition at line 102 of file cbookmarkindex.h.
Referenced by CBookmarkIndex(), and mouseReleaseEvent().
|
private |
Definition at line 100 of file cbookmarkindex.h.
Referenced by CBookmarkIndex().
|
private |
Definition at line 103 of file cbookmarkindex.h.
Referenced by CBookmarkIndex(), and mouseMoveEvent().