BibleTime
|
#include <btmodelviewreaddisplay.h>
Public Types | |
enum | TextPart { Document , SelectedText , AnchorOnly , AnchorTextOnly , AnchorWithText } |
Public Member Functions | |
BtModelViewReadDisplay (CDisplayWindow *displayWindow, QWidget *parent=nullptr) | |
void | copyAll () |
void | copyAnchorOnly () |
void | copyAnchorTextOnly () |
void | copyAnchorWithText () |
void | copyByReferences () |
Copies the given text specified by asking user for first and last references. More... | |
void | copySelectedText () |
Copies the currently selected text. More... | |
void | findText (bool const backward) |
QString | getCurrentNodeInfo () const |
bool | hasActiveAnchor () const |
void | highlightText (const QString &text, bool caseSensitive) |
void | installPopup (QMenu *const popup) |
Installs the popup which should be opened when the right mouse button was pressed. More... | |
void | pageDown () |
void | pageUp () |
void | print (TextPart const, DisplayOptions const &displayOptions, FilterOptions const &filterOptions) |
void | printAll (DisplayOptions const &displayOptions, FilterOptions const &filterOptions) |
void | printAnchorWithText (DisplayOptions const &displayOptions, FilterOptions const &filterOptions) |
BtQmlInterface * | qmlInterface () const noexcept |
BtQuickWidget * | quickWidget () const noexcept |
void | reloadModules () |
void | save (TextPart const part) |
Saves the given text with the specified format into the applications clipboard. More... | |
void | saveAnchorWithText () |
void | scroll (int pixels) |
void | scrollToKey (CSwordKey *key) |
void | setDisplayFocus () |
void | setDisplayOptions (const DisplayOptions &displayOptions) |
void | setFilterOptions (FilterOptions filterOptions) |
void | setLemma (const QString &lemma) |
void | setModules (QStringList const &modules) |
void | settingsChanged () |
QString | text (TextPart const part=Document) |
void | updateReferenceText () |
~BtModelViewReadDisplay () override | |
Private Slots | |
void | setBibleReference (const QString &reference) |
void | slotSliderMoved (int value) |
void | slotSliderPressed () |
void | slotSliderReleased () |
Private Member Functions | |
void | contextMenuEvent (QContextMenuEvent *event) final override |
void | copyAsPlainText (TextPart const part) |
Private Attributes | |
QString | m_activeAnchor |
QString | m_nodeInfo |
CDisplayWindow * | m_parentWindow |
QMenu * | m_popup = nullptr |
BtQmlInterface *const | m_qmlInterface |
BtQuickWidget *const | m_quickWidget |
QScrollBar *const | m_scrollBar |
int | m_scrollBarPosition = 0 |
The view implementation for the Model/View read display.
Definition at line 62 of file btmodelviewreaddisplay.h.
Enumerator | |
---|---|
Document | |
SelectedText | |
AnchorOnly | |
AnchorTextOnly | |
AnchorWithText |
Definition at line 67 of file btmodelviewreaddisplay.h.
BtModelViewReadDisplay::BtModelViewReadDisplay | ( | CDisplayWindow * | displayWindow, |
QWidget * | parent = nullptr |
||
) |
Definition at line 45 of file btmodelviewreaddisplay.cpp.
References BT_CONNECT, BtQmlInterface::changeColorTheme(), BibleTime::colorThemeChanged(), BtQmlInterface::dragOccuring(), CSwordBackend::instance(), BibleTime::instance(), CDisplayWindow::key(), CDisplayWindow::keyChooser(), CDisplayWindow::lookupKey(), m_parentWindow, m_qmlInterface, m_quickWidget, m_scrollBar, CDisplayWindow::mainToolBar(), BtQuickWidget::referenceDropped(), setBibleReference(), BtQmlInterface::setBibleReference(), CSwordKey::setKey(), slotSliderMoved(), slotSliderPressed(), slotSliderReleased(), BtQmlInterface::updateReference(), and CDisplayWindow::updateWindowTitle().
|
overridedefault |
|
finaloverrideprivate |
Definition at line 139 of file btmodelviewreaddisplay.cpp.
References BtQmlInterface::activeLink(), BtQmlInterface::getBibleUrlFromLink(), BtQmlInterface::getLemmaFromLink(), m_activeAnchor, m_popup, m_qmlInterface, and setLemma().
|
inline |
Definition at line 86 of file btmodelviewreaddisplay.h.
References copyAsPlainText(), and Document.
Referenced by CDisplayWindow::initActions().
|
inline |
Definition at line 82 of file btmodelviewreaddisplay.h.
References AnchorOnly, and copyAsPlainText().
Referenced by CDisplayWindow::initActions().
|
inline |
Definition at line 83 of file btmodelviewreaddisplay.h.
References AnchorTextOnly, and copyAsPlainText().
Referenced by CBibleReadWindow::initActions().
|
inline |
Definition at line 84 of file btmodelviewreaddisplay.h.
References AnchorWithText, and copyAsPlainText().
Referenced by CBibleReadWindow::initActions().
|
private |
Definition at line 136 of file btmodelviewreaddisplay.cpp.
References text().
Referenced by copyAll(), copyAnchorOnly(), copyAnchorTextOnly(), and copyAnchorWithText().
void BtModelViewReadDisplay::copyByReferences | ( | ) |
Copies the given text specified by asking user for first and last references.
Definition at line 151 of file btmodelviewreaddisplay.cpp.
References CSwordModuleInfo::Bible, BT_ASSERT, CSwordModuleInfo::Commentary, m_parentWindow, qmlInterface(), and BtCopyByReferencesDialog::result().
Referenced by CDisplayWindow::initActions().
void BtModelViewReadDisplay::copySelectedText | ( | ) |
Copies the currently selected text.
Definition at line 148 of file btmodelviewreaddisplay.cpp.
References qmlInterface().
Referenced by CDisplayWindow::initActions().
void BtModelViewReadDisplay::findText | ( | bool const | backward | ) |
Definition at line 347 of file btmodelviewreaddisplay.cpp.
References BtQmlInterface::findText(), and m_qmlInterface.
Referenced by CMDIArea::findTextInActiveWindow().
|
inline |
Definition at line 138 of file btmodelviewreaddisplay.h.
References m_nodeInfo.
Referenced by CDisplayWindow::initActions(), and CDisplayWindow::newDisplayWidgetPopupMenu().
|
inline |
Definition at line 163 of file btmodelviewreaddisplay.h.
References m_activeAnchor.
Referenced by CDisplayWindow::newDisplayWidgetPopupMenu(), and print().
void BtModelViewReadDisplay::highlightText | ( | const QString & | text, |
bool | caseSensitive | ||
) |
Definition at line 343 of file btmodelviewreaddisplay.cpp.
References m_qmlInterface, BtQmlInterface::setHighlightWords(), and text().
Referenced by CMDIArea::highlightTextInActiveWindow().
|
inline |
Installs the popup which should be opened when the right mouse button was pressed.
Definition at line 119 of file btmodelviewreaddisplay.h.
References m_popup.
Referenced by CDisplayWindow::init().
void BtModelViewReadDisplay::pageDown | ( | ) |
Definition at line 339 of file btmodelviewreaddisplay.cpp.
References m_quickWidget, and BtQuickWidget::pageDown().
Referenced by CDisplayWindow::initActions().
void BtModelViewReadDisplay::pageUp | ( | ) |
Definition at line 341 of file btmodelviewreaddisplay.cpp.
References m_quickWidget, and BtQuickWidget::pageUp().
Referenced by CDisplayWindow::initActions().
void BtModelViewReadDisplay::print | ( | TextPart const | type, |
DisplayOptions const & | displayOptions, | ||
FilterOptions const & | filterOptions | ||
) |
Definition at line 184 of file btmodelviewreaddisplay.cpp.
References AnchorWithText, CSwordModuleInfo::Bible, CSwordVerseKey::bookName(), CSwordVerseKey::chapter(), CSwordModuleInfo::Commentary, CDisplayWindow::displayOptions(), Document, CDisplayWindow::filterOptions(), CSwordModuleInfo::GenericBook, hasActiveAnchor(), CDisplayWindow::key(), CSwordKey::key(), CSwordTreeKey::key(), CSwordVerseKey::key(), CSwordModuleInfo::Lexicon, m_activeAnchor, m_parentWindow, CSwordKey::module(), CExportManager::printByHyperlink(), CExportManager::printKey(), CSwordVerseKey::setVerse(), and CSwordModuleInfo::type().
Referenced by printAll(), and printAnchorWithText().
|
inline |
Definition at line 107 of file btmodelviewreaddisplay.h.
References Document, and print().
Referenced by CDisplayWindow::printAll().
|
inline |
Definition at line 111 of file btmodelviewreaddisplay.h.
References AnchorWithText, and print().
Referenced by CDisplayWindow::printAnchorWithText().
|
inlinenoexcept |
Definition at line 160 of file btmodelviewreaddisplay.h.
References m_qmlInterface.
Referenced by copyByReferences(), copySelectedText(), CDisplayWindow::hasSelectedText(), and reloadModules().
|
inlinenoexcept |
Definition at line 158 of file btmodelviewreaddisplay.h.
References m_quickWidget.
Referenced by CDisplayWindow::getMouseClickedKey().
void BtModelViewReadDisplay::reloadModules | ( | ) |
Definition at line 246 of file btmodelviewreaddisplay.cpp.
References qmlInterface(), and BtQmlInterface::textModel.
Referenced by CDisplayWindow::reload().
void BtModelViewReadDisplay::save | ( | TextPart const | part | ) |
Saves the given text with the specified format into the applications clipboard.
Definition at line 172 of file btmodelviewreaddisplay.cpp.
References util::tool::savePlainFile(), and text().
Referenced by saveAnchorWithText().
|
inline |
Definition at line 85 of file btmodelviewreaddisplay.h.
References AnchorWithText, and save().
Referenced by CBibleReadWindow::initActions().
void BtModelViewReadDisplay::scroll | ( | int | pixels | ) |
Definition at line 325 of file btmodelviewreaddisplay.cpp.
References m_quickWidget, and BtQuickWidget::scroll().
void BtModelViewReadDisplay::scrollToKey | ( | CSwordKey * | key | ) |
Definition at line 321 of file btmodelviewreaddisplay.cpp.
References m_qmlInterface, and BtQmlInterface::scrollToSwordKey().
Referenced by CDisplayWindow::lookupSwordKey().
|
privateslot |
Definition at line 115 of file btmodelviewreaddisplay.cpp.
References m_parentWindow, and CDisplayWindow::setBibleReference().
Referenced by BtModelViewReadDisplay().
void BtModelViewReadDisplay::setDisplayFocus | ( | ) |
Definition at line 311 of file btmodelviewreaddisplay.cpp.
References m_quickWidget.
void BtModelViewReadDisplay::setDisplayOptions | ( | const DisplayOptions & | displayOptions | ) |
Definition at line 313 of file btmodelviewreaddisplay.cpp.
References m_qmlInterface, and BtQmlInterface::textModel.
Referenced by CDisplayWindow::lookupSwordKey(), and CDisplayWindow::setDisplaySettingsButton().
void BtModelViewReadDisplay::setFilterOptions | ( | FilterOptions | filterOptions | ) |
Definition at line 327 of file btmodelviewreaddisplay.cpp.
References m_qmlInterface, and BtQmlInterface::setFilterOptions().
Referenced by CDisplayWindow::lookupSwordKey().
void BtModelViewReadDisplay::setLemma | ( | const QString & | lemma | ) |
Definition at line 351 of file btmodelviewreaddisplay.cpp.
References m_nodeInfo.
Referenced by contextMenuEvent().
void BtModelViewReadDisplay::setModules | ( | QStringList const & | modules | ) |
Definition at line 317 of file btmodelviewreaddisplay.cpp.
References m_qmlInterface, and BtQmlInterface::setModules().
Referenced by CDisplayWindow::CDisplayWindow(), CDisplayWindow::slotAddModule(), CDisplayWindow::slotRemoveModule(), and CDisplayWindow::slotReplaceModule().
void BtModelViewReadDisplay::settingsChanged | ( | ) |
Definition at line 331 of file btmodelviewreaddisplay.cpp.
References m_qmlInterface, and BtQmlInterface::settingsChanged().
Referenced by CDisplayWindow::reload().
|
privateslot |
Definition at line 119 of file btmodelviewreaddisplay.cpp.
References BibleTime::autoScrollStop(), BibleTime::instance(), m_quickWidget, m_scrollBarPosition, and BtQuickWidget::scroll().
Referenced by BtModelViewReadDisplay().
|
privateslot |
Definition at line 127 of file btmodelviewreaddisplay.cpp.
References m_scrollBar, and m_scrollBarPosition.
Referenced by BtModelViewReadDisplay().
|
privateslot |
Definition at line 131 of file btmodelviewreaddisplay.cpp.
References m_quickWidget, m_scrollBar, and BtQuickWidget::updateReferenceText().
Referenced by BtModelViewReadDisplay().
[in] | format | The format to use for the text. |
[in] | part | The part of the text to return. |
Definition at line 251 of file btmodelviewreaddisplay.cpp.
References AnchorOnly, AnchorTextOnly, AnchorWithText, BT_ASSERT, CSwordModuleInfo::Commentary, ReferenceManager::decodeHyperlink(), Document, CSwordModuleInfo::GenericBook, CSwordBackend::instance(), CDisplayWindow::key(), CSwordKey::key(), CSwordModuleInfo::Lexicon, m_activeAnchor, m_parentWindow, CSwordKey::module(), CSwordModuleInfo::name(), CSwordBackend::setFilterOptions(), CSwordKey::strippedText(), and CSwordModuleInfo::type().
Referenced by copyAsPlainText(), highlightText(), and save().
void BtModelViewReadDisplay::updateReferenceText | ( | ) |
Definition at line 335 of file btmodelviewreaddisplay.cpp.
References m_quickWidget, and BtQuickWidget::updateReferenceText().
|
private |
Definition at line 181 of file btmodelviewreaddisplay.h.
Referenced by contextMenuEvent(), hasActiveAnchor(), print(), and text().
|
private |
Definition at line 183 of file btmodelviewreaddisplay.h.
Referenced by getCurrentNodeInfo(), and setLemma().
|
private |
Definition at line 179 of file btmodelviewreaddisplay.h.
Referenced by BtModelViewReadDisplay(), copyByReferences(), print(), setBibleReference(), and text().
|
private |
Definition at line 180 of file btmodelviewreaddisplay.h.
Referenced by contextMenuEvent(), and installPopup().
|
private |
Definition at line 186 of file btmodelviewreaddisplay.h.
Referenced by BtModelViewReadDisplay(), contextMenuEvent(), findText(), highlightText(), qmlInterface(), scrollToKey(), setDisplayOptions(), setFilterOptions(), setModules(), and settingsChanged().
|
private |
Definition at line 185 of file btmodelviewreaddisplay.h.
Referenced by BtModelViewReadDisplay(), pageDown(), pageUp(), quickWidget(), scroll(), setDisplayFocus(), slotSliderMoved(), slotSliderReleased(), and updateReferenceText().
|
private |
Definition at line 187 of file btmodelviewreaddisplay.h.
Referenced by BtModelViewReadDisplay(), slotSliderPressed(), and slotSliderReleased().
|
private |
Definition at line 188 of file btmodelviewreaddisplay.h.
Referenced by slotSliderMoved(), and slotSliderPressed().