BibleTime
|
#include <btmodelviewreaddisplay.h>
Public Types | |
enum | TextPart { Document , SelectedText , AnchorOnly , AnchorTextOnly , AnchorWithText } |
Signals | |
void | activeAnchorChanged (QString newActiveAnchor) |
void | nodeInfoChanged (QString newNodeInfo) |
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. | |
void | copySelectedText () |
Copies the currently selected text. | |
void | findText (bool const backward) |
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. | |
QString | nodeInfo () const |
void | pageDown () |
void | pageUp () |
void | print (TextPart const, DisplayOptions const &displayOptions, FilterOptions const &filterOptions) |
void | printAll (DisplayOptions const &displayOptions, FilterOptions const &filterOptions) |
void | printAnchorOnly (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. | |
void | saveAnchorWithText () |
void | scroll (int pixels) |
void | scrollToKey (CSwordKey *key) |
void | setDisplayFocus () |
void | setModules (QStringList const &modules) |
void | setNodeInfo (QString const &newNodeInfo) |
void | setOptions (DisplayOptions const &displayOptions, FilterOptions const &filterOptions) |
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 46 of file btmodelviewreaddisplay.cpp.
References activeAnchorChanged(), BtQmlInterface::activeLinkChanged(), BT_CONNECT, BtQmlInterface::changeColorTheme(), BibleTime::colorThemeChanged(), BtQmlInterface::dragOccuring(), BtQmlInterface::getBibleUrlFromLink(), BtQmlInterface::getLemmaFromLink(), CSwordBackend::instance(), BibleTime::instance(), CDisplayWindow::keyChooser(), CDisplayWindow::lookupKey(), m_activeAnchor, m_parentWindow, m_qmlInterface, m_quickWidget, m_scrollBar, CDisplayWindow::mainToolBar(), BtQuickWidget::referenceDropped(), setBibleReference(), BtQmlInterface::setBibleReference(), CSwordKey::setKey(), setNodeInfo(), slotSliderMoved(), slotSliderPressed(), slotSliderReleased(), CDisplayWindow::swordKey(), BtQmlInterface::updateReference(), and CDisplayWindow::updateWindowTitle().
|
overridedefault |
|
signal |
Referenced by BtModelViewReadDisplay(), CDisplayWindow::CDisplayWindow(), and CBibleReadWindow::initActions().
|
finaloverrideprivate |
Definition at line 149 of file btmodelviewreaddisplay.cpp.
References m_popup.
|
inline |
Definition at line 86 of file btmodelviewreaddisplay.h.
References copyAsPlainText(), and Document.
Referenced by CDisplayWindow::CDisplayWindow().
|
inline |
Definition at line 82 of file btmodelviewreaddisplay.h.
References AnchorOnly, and copyAsPlainText().
Referenced by CDisplayWindow::CDisplayWindow().
|
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 146 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 157 of file btmodelviewreaddisplay.cpp.
References CSwordModuleInfo::Bible, BT_ASSERT, CSwordModuleInfo::Commentary, m_parentWindow, qmlInterface(), and BtCopyByReferencesDialog::result().
Referenced by CDisplayWindow::CDisplayWindow().
void BtModelViewReadDisplay::copySelectedText | ( | ) |
Copies the currently selected text.
Definition at line 154 of file btmodelviewreaddisplay.cpp.
References qmlInterface().
Referenced by CDisplayWindow::CDisplayWindow().
void BtModelViewReadDisplay::findText | ( | bool const | backward | ) |
Definition at line 348 of file btmodelviewreaddisplay.cpp.
References BtQmlInterface::findText(), and m_qmlInterface.
Referenced by CMDIArea::findTextInActiveWindow().
void BtModelViewReadDisplay::highlightText | ( | const QString & | text, |
bool | caseSensitive | ||
) |
Definition at line 344 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 123 of file btmodelviewreaddisplay.h.
References m_popup.
Referenced by CDisplayWindow::init().
|
inline |
Definition at line 143 of file btmodelviewreaddisplay.h.
References m_nodeInfo.
Referenced by CDisplayWindow::CDisplayWindow().
|
signal |
Referenced by CDisplayWindow::CDisplayWindow(), and setNodeInfo().
void BtModelViewReadDisplay::pageDown | ( | ) |
Definition at line 340 of file btmodelviewreaddisplay.cpp.
References m_quickWidget, and BtQuickWidget::pageDown().
Referenced by CDisplayWindow::CDisplayWindow().
void BtModelViewReadDisplay::pageUp | ( | ) |
Definition at line 342 of file btmodelviewreaddisplay.cpp.
References m_quickWidget, and BtQuickWidget::pageUp().
Referenced by CDisplayWindow::CDisplayWindow().
void BtModelViewReadDisplay::print | ( | TextPart const | type, |
DisplayOptions const & | displayOptions, | ||
FilterOptions const & | filterOptions | ||
) |
Definition at line 190 of file btmodelviewreaddisplay.cpp.
References AnchorWithText, CSwordModuleInfo::Bible, CSwordVerseKey::bookName(), CSwordVerseKey::chapter(), CDisplayWindow::displayOptions(), Document, CDisplayWindow::filterOptions(), CSwordModuleInfo::GenericBook, CSwordTreeKey::key(), CSwordVerseKey::key(), CSwordModuleInfo::Lexicon, m_activeAnchor, m_parentWindow, CSwordVerseKey::setVerse(), and CDisplayWindow::swordKey().
Referenced by printAll(), printAnchorOnly(), 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 AnchorOnly, and print().
Referenced by CDisplayWindow::printAnchorOnly().
|
inline |
Definition at line 115 of file btmodelviewreaddisplay.h.
References AnchorWithText, and print().
Referenced by CDisplayWindow::printAnchorWithText().
|
inlinenoexcept |
Definition at line 163 of file btmodelviewreaddisplay.h.
References m_qmlInterface.
Referenced by CDisplayWindow::CDisplayWindow(), copyByReferences(), copySelectedText(), and reloadModules().
|
inlinenoexcept |
Definition at line 161 of file btmodelviewreaddisplay.h.
References m_quickWidget.
Referenced by CDisplayWindow::getMouseClickedKey().
void BtModelViewReadDisplay::reloadModules | ( | ) |
Definition at line 251 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 178 of file btmodelviewreaddisplay.cpp.
References util::tool::savePlainFile(), and text().
Referenced by CBibleReadWindow::initActions(), and 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 330 of file btmodelviewreaddisplay.cpp.
References m_quickWidget, and BtQuickWidget::scroll().
void BtModelViewReadDisplay::scrollToKey | ( | CSwordKey * | key | ) |
Definition at line 326 of file btmodelviewreaddisplay.cpp.
References m_qmlInterface, and BtQmlInterface::scrollToSwordKey().
Referenced by CDisplayWindow::lookupSwordKey().
|
privateslot |
Definition at line 125 of file btmodelviewreaddisplay.cpp.
References m_parentWindow, and CDisplayWindow::setBibleReference().
Referenced by BtModelViewReadDisplay().
void BtModelViewReadDisplay::setDisplayFocus | ( | ) |
Definition at line 316 of file btmodelviewreaddisplay.cpp.
References m_quickWidget.
Referenced by BibleTime::setDisplayFocus().
void BtModelViewReadDisplay::setModules | ( | QStringList const & | modules | ) |
Definition at line 322 of file btmodelviewreaddisplay.cpp.
References m_qmlInterface, and BtQmlInterface::setModules().
Referenced by CDisplayWindow::CDisplayWindow(), CDisplayWindow::slotAddModule(), CDisplayWindow::slotRemoveModule(), and CDisplayWindow::slotReplaceModule().
void BtModelViewReadDisplay::setNodeInfo | ( | QString const & | newNodeInfo | ) |
Definition at line 352 of file btmodelviewreaddisplay.cpp.
References m_nodeInfo, and nodeInfoChanged().
Referenced by BtModelViewReadDisplay().
void BtModelViewReadDisplay::setOptions | ( | DisplayOptions const & | displayOptions, |
FilterOptions const & | filterOptions | ||
) |
Definition at line 318 of file btmodelviewreaddisplay.cpp.
References m_qmlInterface, and BtQmlInterface::textModel.
Referenced by CDisplayWindow::lookupSwordKey().
void BtModelViewReadDisplay::settingsChanged | ( | ) |
Definition at line 332 of file btmodelviewreaddisplay.cpp.
References m_qmlInterface, and BtQmlInterface::settingsChanged().
Referenced by CDisplayWindow::reload().
|
privateslot |
Definition at line 129 of file btmodelviewreaddisplay.cpp.
References BibleTime::autoScrollStop(), BibleTime::instance(), m_quickWidget, m_scrollBarPosition, and BtQuickWidget::scroll().
Referenced by BtModelViewReadDisplay().
|
privateslot |
Definition at line 137 of file btmodelviewreaddisplay.cpp.
References m_scrollBar, and m_scrollBarPosition.
Referenced by BtModelViewReadDisplay().
|
privateslot |
Definition at line 141 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 256 of file btmodelviewreaddisplay.cpp.
References AnchorOnly, AnchorTextOnly, AnchorWithText, BT_ASSERT, CSwordModuleInfo::Commentary, ReferenceManager::decodeHyperlink(), Document, CSwordModuleInfo::GenericBook, CSwordBackend::instance(), CSwordKey::key(), CSwordModuleInfo::Lexicon, m_activeAnchor, m_parentWindow, CSwordKey::module(), CSwordModuleInfo::name(), CSwordBackend::setFilterOptions(), CSwordKey::strippedText(), CDisplayWindow::swordKey(), and text().
Referenced by copyAsPlainText(), highlightText(), save(), and text().
void BtModelViewReadDisplay::updateReferenceText | ( | ) |
Definition at line 336 of file btmodelviewreaddisplay.cpp.
References m_quickWidget, and BtQuickWidget::updateReferenceText().
|
private |
Definition at line 186 of file btmodelviewreaddisplay.h.
Referenced by BtModelViewReadDisplay(), print(), and text().
|
private |
Definition at line 188 of file btmodelviewreaddisplay.h.
Referenced by nodeInfo(), and setNodeInfo().
|
private |
Definition at line 184 of file btmodelviewreaddisplay.h.
Referenced by BtModelViewReadDisplay(), copyByReferences(), print(), setBibleReference(), and text().
|
private |
Definition at line 185 of file btmodelviewreaddisplay.h.
Referenced by contextMenuEvent(), and installPopup().
|
private |
Definition at line 191 of file btmodelviewreaddisplay.h.
Referenced by BtModelViewReadDisplay(), findText(), highlightText(), qmlInterface(), scrollToKey(), setModules(), setOptions(), and settingsChanged().
|
private |
Definition at line 190 of file btmodelviewreaddisplay.h.
Referenced by BtModelViewReadDisplay(), pageDown(), pageUp(), quickWidget(), scroll(), setDisplayFocus(), slotSliderMoved(), slotSliderReleased(), and updateReferenceText().
|
private |
Definition at line 192 of file btmodelviewreaddisplay.h.
Referenced by BtModelViewReadDisplay(), slotSliderPressed(), and slotSliderReleased().
|
private |
Definition at line 193 of file btmodelviewreaddisplay.h.
Referenced by slotSliderMoved(), and slotSliderPressed().