BibleTime
Public Types | Signals | 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
}
 

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)
 
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.
 
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
 
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

◆ activeAnchorChanged

void BtModelViewReadDisplay::activeAnchorChanged ( QString  newActiveAnchor)
signal

◆ contextMenuEvent()

void BtModelViewReadDisplay::contextMenuEvent ( QContextMenuEvent *  event)
finaloverrideprivate

Definition at line 149 of file btmodelviewreaddisplay.cpp.

References m_popup.

◆ copyAll()

void BtModelViewReadDisplay::copyAll ( )
inline

Definition at line 86 of file btmodelviewreaddisplay.h.

References copyAsPlainText(), and Document.

Referenced by CDisplayWindow::CDisplayWindow().

◆ copyAnchorOnly()

void BtModelViewReadDisplay::copyAnchorOnly ( )
inline

Definition at line 82 of file btmodelviewreaddisplay.h.

References AnchorOnly, and copyAsPlainText().

Referenced by CDisplayWindow::CDisplayWindow().

◆ 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 146 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 157 of file btmodelviewreaddisplay.cpp.

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

Referenced by CDisplayWindow::CDisplayWindow().

◆ copySelectedText()

void BtModelViewReadDisplay::copySelectedText ( )

Copies the currently selected text.

Definition at line 154 of file btmodelviewreaddisplay.cpp.

References qmlInterface().

Referenced by CDisplayWindow::CDisplayWindow().

◆ findText()

void BtModelViewReadDisplay::findText ( bool const  backward)

◆ 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 123 of file btmodelviewreaddisplay.h.

References m_popup.

Referenced by CDisplayWindow::init().

◆ nodeInfo()

QString BtModelViewReadDisplay::nodeInfo ( ) const
inline

Definition at line 143 of file btmodelviewreaddisplay.h.

References m_nodeInfo.

Referenced by CDisplayWindow::CDisplayWindow().

◆ nodeInfoChanged

void BtModelViewReadDisplay::nodeInfoChanged ( QString  newNodeInfo)
signal

◆ pageDown()

void BtModelViewReadDisplay::pageDown ( )

Definition at line 340 of file btmodelviewreaddisplay.cpp.

References m_quickWidget, and BtQuickWidget::pageDown().

Referenced by CDisplayWindow::CDisplayWindow().

◆ pageUp()

void BtModelViewReadDisplay::pageUp ( )

Definition at line 342 of file btmodelviewreaddisplay.cpp.

References m_quickWidget, and BtQuickWidget::pageUp().

Referenced by CDisplayWindow::CDisplayWindow().

◆ 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().

◆ printAnchorOnly()

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

Definition at line 111 of file btmodelviewreaddisplay.h.

References AnchorOnly, and print().

Referenced by CDisplayWindow::printAnchorOnly().

◆ printAnchorWithText()

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

Definition at line 115 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 161 of file btmodelviewreaddisplay.h.

References m_quickWidget.

Referenced by CDisplayWindow::getMouseClickedKey().

◆ reloadModules()

void BtModelViewReadDisplay::reloadModules ( )

Definition at line 251 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 178 of file btmodelviewreaddisplay.cpp.

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

Referenced by CBibleReadWindow::initActions(), and 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 330 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 316 of file btmodelviewreaddisplay.cpp.

References m_quickWidget.

Referenced by BibleTime::setDisplayFocus().

◆ setModules()

void BtModelViewReadDisplay::setModules ( QStringList const &  modules)

◆ setNodeInfo()

void BtModelViewReadDisplay::setNodeInfo ( QString const &  newNodeInfo)

Definition at line 352 of file btmodelviewreaddisplay.cpp.

References m_nodeInfo, and nodeInfoChanged().

Referenced by BtModelViewReadDisplay().

◆ setOptions()

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

◆ settingsChanged()

void BtModelViewReadDisplay::settingsChanged ( )

◆ slotSliderMoved

void BtModelViewReadDisplay::slotSliderMoved ( int  value)
privateslot

◆ slotSliderPressed

void BtModelViewReadDisplay::slotSliderPressed ( )
privateslot

Definition at line 137 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 186 of file btmodelviewreaddisplay.h.

Referenced by BtModelViewReadDisplay(), print(), and text().

◆ m_nodeInfo

QString BtModelViewReadDisplay::m_nodeInfo
private

Definition at line 188 of file btmodelviewreaddisplay.h.

Referenced by nodeInfo(), and setNodeInfo().

◆ m_parentWindow

CDisplayWindow* BtModelViewReadDisplay::m_parentWindow
private

◆ m_popup

QMenu* BtModelViewReadDisplay::m_popup = nullptr
private

Definition at line 185 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 193 of file btmodelviewreaddisplay.h.

Referenced by slotSliderMoved(), and slotSliderPressed().


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