BibleTime
|
#include <cexportmanager.h>
Public Types | |
enum | Format { HTML , Text } |
Public Member Functions | |
CExportManager (const bool showProgress=true, const QString &progressLabel=QString(), const FilterOptions &filterOptions=btConfig().getFilterOptions(), const DisplayOptions &displayOptions=btConfig().getDisplayOptions()) | |
bool | copyKey (CSwordKey const *const key, Format const format, bool const addText) |
bool | copyKeyList (CSwordModuleSearch::ModuleResultList const &list, CSwordModuleInfo const *const module, Format const format, bool const addText) |
bool | copyKeyList (QList< CSwordKey * > const &list, Format const format, bool const addText) |
bool | printByHyperlink (QString const &hyperlink, DisplayOptions const &displayOptions, FilterOptions const &filterOptions) |
Prints a key using the hyperlink created by CReferenceManager. More... | |
bool | printKey (CSwordKey const *const key, DisplayOptions const &displayOptions, FilterOptions const &filterOptions) |
bool | printKey (CSwordModuleInfo const *const module, QString const &startKey, QString const &stopKey, DisplayOptions const &displayOptions, FilterOptions const &filterOptions) |
bool | printKeyList (CSwordModuleSearch::ModuleResultList const &list, CSwordModuleInfo const *const module, DisplayOptions const &displayOptions, FilterOptions const &filterOptions) |
bool | printKeyList (QStringList const &list, CSwordModuleInfo const *const module, DisplayOptions const &displayOptions, FilterOptions const &filterOptions) |
bool | saveKey (CSwordKey const *const key, Format const format, bool const addText, const BtConstModuleList &modules) |
bool | saveKeyList (CSwordModuleSearch::ModuleResultList const &list, CSwordModuleInfo const *const module, Format const format, bool const addText) |
bool | saveKeyList (QList< CSwordKey * > const &list, Format const format, bool const addText) |
~CExportManager () | |
Protected Member Functions | |
const QString | getSaveFileName (Format const format) |
Private Member Functions | |
void | closeProgressDialog () |
Closes the progress dialog immediately. More... | |
void | incProgress () |
Increments the progress by one item. More... | |
std::unique_ptr< Rendering::CTextRendering > | newRenderer (Format const format, bool const addText) |
bool | progressWasCancelled () |
void | setProgressRange (int const items) |
Private Attributes | |
DisplayOptions const | m_displayOptions |
FilterOptions const | m_filterOptions |
std::unique_ptr< QProgressDialog > const | m_progressDialog |
Definition at line 31 of file cexportmanager.h.
The format the export actions should have.
Enumerator | |
---|---|
HTML | |
Text |
Definition at line 36 of file cexportmanager.h.
CExportManager::CExportManager | ( | const bool | showProgress = true , |
const QString & | progressLabel = QString() , |
||
const FilterOptions & | filterOptions = btConfig().getFilterOptions() , |
||
const DisplayOptions & | displayOptions = btConfig().getDisplayOptions() |
||
) |
Definition at line 40 of file cexportmanager.cpp.
|
default |
|
private |
Closes the progress dialog immediately.
Closes the progress dialog immediatly.
Definition at line 443 of file cexportmanager.cpp.
References m_progressDialog.
Referenced by copyKeyList(), printKeyList(), and saveKeyList().
bool CExportManager::copyKey | ( | CSwordKey const *const | key, |
Format const | format, | ||
bool const | addText | ||
) |
Definition at line 164 of file cexportmanager.cpp.
References anonymous_namespace{cexportmanager.cpp}::copyToClipboard(), CSwordVerseKey::isBoundSet(), CSwordKey::key(), CSwordVerseKey::lowerBound(), CSwordKey::module(), newRenderer(), and CSwordVerseKey::upperBound().
Referenced by CDisplayWindow::copyDisplayedText(), and CBibleReadWindow::copyDisplayedText().
bool CExportManager::copyKeyList | ( | CSwordModuleSearch::ModuleResultList const & | list, |
CSwordModuleInfo const *const | module, | ||
Format const | format, | ||
bool const | addText | ||
) |
Definition at line 192 of file cexportmanager.cpp.
References closeProgressDialog(), anonymous_namespace{cexportmanager.cpp}::copyToClipboard(), Rendering::CTextRendering::KeyTreeItem::Settings::highlight, newRenderer(), and progressWasCancelled().
bool CExportManager::copyKeyList | ( | QList< CSwordKey * > const & | list, |
Format const | format, | ||
bool const | addText | ||
) |
Definition at line 218 of file cexportmanager.cpp.
References closeProgressDialog(), anonymous_namespace{cexportmanager.cpp}::copyToClipboard(), Rendering::CTextRendering::KeyTreeItem::Settings::highlight, incProgress(), newRenderer(), progressWasCancelled(), and setProgressRange().
|
protected |
Returns a filename to save a file.
Definition at line 379 of file cexportmanager.cpp.
References anonymous_namespace{btbookshelfworkspage.cpp}::filter(), HTML, and Text.
Referenced by saveKey(), and saveKeyList().
|
private |
Increments the progress by one item.
Increments the progress by one item.
Definition at line 433 of file cexportmanager.cpp.
References m_progressDialog.
Referenced by copyKeyList(), printKeyList(), and saveKeyList().
|
private |
Definition at line 398 of file cexportmanager.cpp.
References BT_ASSERT, FilterOptions::footnotes, HTML, FilterOptions::lemmas, m_displayOptions, m_filterOptions, FilterOptions::morphTags, FilterOptions::scriptureReferences, FilterOptions::strongNumbers, Text, and FilterOptions::textualVariants.
Referenced by copyKey(), copyKeyList(), saveKey(), and saveKeyList().
bool CExportManager::printByHyperlink | ( | QString const & | hyperlink, |
DisplayOptions const & | displayOptions, | ||
FilterOptions const & | filterOptions | ||
) |
Prints a key using the hyperlink created by CReferenceManager.
Definition at line 284 of file cexportmanager.cpp.
References CSwordModuleInfo::Bible, CSwordModuleInfo::Commentary, and ReferenceManager::decodeHyperlink().
Referenced by BtModelViewReadDisplay::print().
bool CExportManager::printKey | ( | CSwordKey const *const | key, |
DisplayOptions const & | displayOptions, | ||
FilterOptions const & | filterOptions | ||
) |
Definition at line 256 of file cexportmanager.cpp.
References CSwordKey::key(), and CSwordKey::module().
Referenced by BtModelViewReadDisplay::print().
bool CExportManager::printKey | ( | CSwordModuleInfo const *const | module, |
QString const & | startKey, | ||
QString const & | stopKey, | ||
DisplayOptions const & | displayOptions, | ||
FilterOptions const & | filterOptions | ||
) |
Definition at line 267 of file cexportmanager.cpp.
bool CExportManager::printKeyList | ( | CSwordModuleSearch::ModuleResultList const & | list, |
CSwordModuleInfo const *const | module, | ||
DisplayOptions const & | displayOptions, | ||
FilterOptions const & | filterOptions | ||
) |
Definition at line 331 of file cexportmanager.cpp.
References closeProgressDialog(), incProgress(), progressWasCancelled(), and setProgressRange().
bool CExportManager::printKeyList | ( | QStringList const & | list, |
CSwordModuleInfo const *const | module, | ||
DisplayOptions const & | displayOptions, | ||
FilterOptions const & | filterOptions | ||
) |
Definition at line 355 of file cexportmanager.cpp.
References closeProgressDialog(), incProgress(), progressWasCancelled(), and setProgressRange().
|
private |
Definition at line 438 of file cexportmanager.cpp.
References m_progressDialog.
Referenced by copyKeyList(), printKeyList(), and saveKeyList().
bool CExportManager::saveKey | ( | CSwordKey const *const | key, |
Format const | format, | ||
bool const | addText, | ||
const BtConstModuleList & | modules | ||
) |
Definition at line 60 of file cexportmanager.cpp.
References CSwordVerseKey::bookName(), CSwordVerseKey::chapter(), getSaveFileName(), CSwordVerseKey::isBoundSet(), CSwordKey::key(), CSwordVerseKey::lowerBound(), CSwordKey::module(), newRenderer(), util::tool::savePlainFile(), and CSwordVerseKey::upperBound().
Referenced by CDisplayWindow::initActions(), and CBibleReadWindow::saveChapter().
bool CExportManager::saveKeyList | ( | CSwordModuleSearch::ModuleResultList const & | list, |
CSwordModuleInfo const *const | module, | ||
Format const | format, | ||
bool const | addText | ||
) |
Definition at line 94 of file cexportmanager.cpp.
References closeProgressDialog(), getSaveFileName(), Rendering::CTextRendering::KeyTreeItem::Settings::highlight, incProgress(), newRenderer(), progressWasCancelled(), util::tool::savePlainFile(), and setProgressRange().
bool CExportManager::saveKeyList | ( | QList< CSwordKey * > const & | list, |
Format const | format, | ||
bool const | addText | ||
) |
Definition at line 127 of file cexportmanager.cpp.
References closeProgressDialog(), getSaveFileName(), Rendering::CTextRendering::KeyTreeItem::Settings::highlight, incProgress(), newRenderer(), progressWasCancelled(), util::tool::savePlainFile(), and setProgressRange().
|
private |
Definition at line 420 of file cexportmanager.cpp.
References m_progressDialog.
Referenced by copyKeyList(), printKeyList(), and saveKeyList().
|
private |
Definition at line 127 of file cexportmanager.h.
Referenced by newRenderer().
|
private |
Definition at line 126 of file cexportmanager.h.
Referenced by newRenderer().
|
private |
Definition at line 129 of file cexportmanager.h.
Referenced by closeProgressDialog(), incProgress(), progressWasCancelled(), and setProgressRange().