BibleTime
Public Types | Public Member Functions | Private Slots | Private Member Functions | Private Attributes | List of all members
BtModelViewReadDisplay Class Reference

#include <btmodelviewreaddisplay.h>

Inheritance diagram for BtModelViewReadDisplay:

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)
 
BtQmlInterfaceqmlInterface () const noexcept
 
BtQuickWidgetquickWidget () 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
 
CDisplayWindowm_parentWindow
 
QMenum_popup = nullptr
 
BtQmlInterface *const m_qmlInterface
 
BtQuickWidget *const m_quickWidget
 
QScrollBar *const m_scrollBar
 
int m_scrollBarPosition = 0
 

Detailed Description

The view implementation for the Model/View read display.

Definition at line 62 of file btmodelviewreaddisplay.h.

Member Enumeration Documentation

◆ TextPart

Enumerator
Document 
SelectedText 
AnchorOnly 
AnchorTextOnly 
AnchorWithText 

Definition at line 67 of file btmodelviewreaddisplay.h.

Constructor & Destructor Documentation

◆ BtModelViewReadDisplay()

BtModelViewReadDisplay::BtModelViewReadDisplay ( CDisplayWindow displayWindow,
QWidget parent = nullptr 
)

◆ ~BtModelViewReadDisplay()

BtModelViewReadDisplay::~BtModelViewReadDisplay ( )
overridedefault

Member Function Documentation

◆ contextMenuEvent()

void BtModelViewReadDisplay::contextMenuEvent ( QContextMenuEvent *  event)
finaloverrideprivate

◆ copyAll()

void BtModelViewReadDisplay::copyAll ( )
inline

Definition at line 86 of file btmodelviewreaddisplay.h.

References copyAsPlainText(), and Document.

Referenced by CDisplayWindow::initActions().

◆ copyAnchorOnly()

void BtModelViewReadDisplay::copyAnchorOnly ( )
inline

Definition at line 82 of file btmodelviewreaddisplay.h.

References AnchorOnly, and copyAsPlainText().

Referenced by CDisplayWindow::initActions().

◆ copyAnchorTextOnly()

void BtModelViewReadDisplay::copyAnchorTextOnly ( )
inline

Definition at line 83 of file btmodelviewreaddisplay.h.

References AnchorTextOnly, and copyAsPlainText().

Referenced by CBibleReadWindow::initActions().

◆ copyAnchorWithText()

void BtModelViewReadDisplay::copyAnchorWithText ( )
inline

Definition at line 84 of file btmodelviewreaddisplay.h.

References AnchorWithText, and copyAsPlainText().

Referenced by CBibleReadWindow::initActions().

◆ copyAsPlainText()

void BtModelViewReadDisplay::copyAsPlainText ( TextPart const  part)
private

Definition at line 134 of file btmodelviewreaddisplay.cpp.

References text().

Referenced by copyAll(), copyAnchorOnly(), copyAnchorTextOnly(), and copyAnchorWithText().

◆ copyByReferences()

void BtModelViewReadDisplay::copyByReferences ( )

Copies the given text specified by asking user for first and last references.

Definition at line 149 of file btmodelviewreaddisplay.cpp.

References CSwordModuleInfo::Bible, BT_ASSERT, CSwordModuleInfo::Commentary, m_parentWindow, qmlInterface(), and BtCopyByReferencesDialog::result().

Referenced by CDisplayWindow::initActions().

◆ copySelectedText()

void BtModelViewReadDisplay::copySelectedText ( )

Copies the currently selected text.

Definition at line 146 of file btmodelviewreaddisplay.cpp.

References qmlInterface().

Referenced by CDisplayWindow::initActions().

◆ findText()

void BtModelViewReadDisplay::findText ( bool const  backward)

◆ getCurrentNodeInfo()

QString BtModelViewReadDisplay::getCurrentNodeInfo ( ) const
inline

◆ hasActiveAnchor()

bool BtModelViewReadDisplay::hasActiveAnchor ( ) const
inline
Returns
whether the display has an active anchor.

Definition at line 163 of file btmodelviewreaddisplay.h.

References m_activeAnchor.

Referenced by CDisplayWindow::newDisplayWidgetPopupMenu(), and print().

◆ highlightText()

void BtModelViewReadDisplay::highlightText ( const QString &  text,
bool  caseSensitive 
)

◆ installPopup()

void BtModelViewReadDisplay::installPopup ( QMenu *const  popup)
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().

◆ pageDown()

void BtModelViewReadDisplay::pageDown ( )

Definition at line 337 of file btmodelviewreaddisplay.cpp.

References m_quickWidget, and BtQuickWidget::pageDown().

Referenced by CDisplayWindow::initActions().

◆ pageUp()

void BtModelViewReadDisplay::pageUp ( )

Definition at line 339 of file btmodelviewreaddisplay.cpp.

References m_quickWidget, and BtQuickWidget::pageUp().

Referenced by CDisplayWindow::initActions().

◆ print()

void BtModelViewReadDisplay::print ( TextPart const  type,
DisplayOptions const &  displayOptions,
FilterOptions const &  filterOptions 
)

◆ printAll()

void BtModelViewReadDisplay::printAll ( DisplayOptions const &  displayOptions,
FilterOptions const &  filterOptions 
)
inline

Definition at line 107 of file btmodelviewreaddisplay.h.

References Document, and print().

Referenced by CDisplayWindow::printAll().

◆ printAnchorWithText()

void BtModelViewReadDisplay::printAnchorWithText ( DisplayOptions const &  displayOptions,
FilterOptions const &  filterOptions 
)
inline

Definition at line 111 of file btmodelviewreaddisplay.h.

References AnchorWithText, and print().

Referenced by CDisplayWindow::printAnchorWithText().

◆ qmlInterface()

BtQmlInterface* BtModelViewReadDisplay::qmlInterface ( ) const
inlinenoexcept

◆ quickWidget()

BtQuickWidget* BtModelViewReadDisplay::quickWidget ( ) const
inlinenoexcept

Definition at line 158 of file btmodelviewreaddisplay.h.

References m_quickWidget.

Referenced by CDisplayWindow::getMouseClickedKey().

◆ reloadModules()

void BtModelViewReadDisplay::reloadModules ( )

Definition at line 244 of file btmodelviewreaddisplay.cpp.

References qmlInterface(), and BtQmlInterface::textModel.

Referenced by CDisplayWindow::reload().

◆ save()

void BtModelViewReadDisplay::save ( TextPart const  part)

Saves the given text with the specified format into the applications clipboard.

Definition at line 170 of file btmodelviewreaddisplay.cpp.

References util::tool::savePlainFile(), and text().

Referenced by saveAnchorWithText().

◆ saveAnchorWithText()

void BtModelViewReadDisplay::saveAnchorWithText ( )
inline

Definition at line 85 of file btmodelviewreaddisplay.h.

References AnchorWithText, and save().

Referenced by CBibleReadWindow::initActions().

◆ scroll()

void BtModelViewReadDisplay::scroll ( int  pixels)

Definition at line 323 of file btmodelviewreaddisplay.cpp.

References m_quickWidget, and BtQuickWidget::scroll().

◆ scrollToKey()

void BtModelViewReadDisplay::scrollToKey ( CSwordKey key)

◆ setBibleReference

void BtModelViewReadDisplay::setBibleReference ( const QString &  reference)
privateslot

◆ setDisplayFocus()

void BtModelViewReadDisplay::setDisplayFocus ( )

Definition at line 309 of file btmodelviewreaddisplay.cpp.

References m_quickWidget.

◆ setDisplayOptions()

void BtModelViewReadDisplay::setDisplayOptions ( const DisplayOptions displayOptions)

◆ setFilterOptions()

void BtModelViewReadDisplay::setFilterOptions ( FilterOptions  filterOptions)

◆ setLemma()

void BtModelViewReadDisplay::setLemma ( const QString &  lemma)

Definition at line 349 of file btmodelviewreaddisplay.cpp.

References m_nodeInfo.

Referenced by contextMenuEvent().

◆ setModules()

void BtModelViewReadDisplay::setModules ( QStringList const &  modules)

◆ settingsChanged()

void BtModelViewReadDisplay::settingsChanged ( )

◆ slotSliderMoved

void BtModelViewReadDisplay::slotSliderMoved ( int  value)
privateslot

◆ slotSliderPressed

void BtModelViewReadDisplay::slotSliderPressed ( )
privateslot

Definition at line 125 of file btmodelviewreaddisplay.cpp.

References m_scrollBar, and m_scrollBarPosition.

Referenced by BtModelViewReadDisplay().

◆ slotSliderReleased

void BtModelViewReadDisplay::slotSliderReleased ( )
privateslot

◆ text()

QString BtModelViewReadDisplay::text ( TextPart const  part = Document)

◆ updateReferenceText()

void BtModelViewReadDisplay::updateReferenceText ( )

Member Data Documentation

◆ m_activeAnchor

QString BtModelViewReadDisplay::m_activeAnchor
private

Definition at line 181 of file btmodelviewreaddisplay.h.

Referenced by contextMenuEvent(), hasActiveAnchor(), print(), and text().

◆ m_nodeInfo

QString BtModelViewReadDisplay::m_nodeInfo
private

Definition at line 183 of file btmodelviewreaddisplay.h.

Referenced by getCurrentNodeInfo(), and setLemma().

◆ m_parentWindow

CDisplayWindow* BtModelViewReadDisplay::m_parentWindow
private

◆ m_popup

QMenu* BtModelViewReadDisplay::m_popup = nullptr
private

Definition at line 180 of file btmodelviewreaddisplay.h.

Referenced by contextMenuEvent(), and installPopup().

◆ m_qmlInterface

BtQmlInterface* const BtModelViewReadDisplay::m_qmlInterface
private

◆ m_quickWidget

BtQuickWidget* const BtModelViewReadDisplay::m_quickWidget
private

◆ m_scrollBar

QScrollBar* const BtModelViewReadDisplay::m_scrollBar
private

◆ m_scrollBarPosition

int BtModelViewReadDisplay::m_scrollBarPosition = 0
private

Definition at line 188 of file btmodelviewreaddisplay.h.

Referenced by slotSliderMoved(), and slotSliderPressed().


The documentation for this class was generated from the following files: