15 #include <QPrintDialog>
18 #include "../backend/keys/cswordversekey.h"
19 #include "../backend/managers/cdisplaytemplatemgr.h"
20 #include "../util/btassert.h"
48 QPrintDialog printDialog(&printer);
49 if (printDialog.exec() == QDialog::Accepted)
50 htmlPage.print(&printer);
62 case KeyTreeItem::Settings::CompleteShort:
65 case KeyTreeItem::Settings::CompleteLong:
68 case KeyTreeItem::Settings::NoKey:
71 case KeyTreeItem::Settings::SimpleKey:
73 return QString::number(vk.
verse());
85 "<div class=\"entry\"><div class=\"rangeheading\">%1</div>")
89 ret.append(CDisplayRendering::renderEntry(item));
90 ret.append(QStringLiteral(
"</div>"));
93 return CDisplayRendering::renderEntry(i);
103 settings.
pageCSS_ID = QStringLiteral(
"printer");
104 if (modules.count() == 1)
105 settings.
langAbbrev = modules.first()->language()->abbrev();
107 if (modules.count() == 1)
QList< CSwordModuleInfo const * > BtConstModuleList
QString renderEntry(KeyTreeItem const &item, CSwordKey *const key=nullptr) const override
void printKeyTree(KeyTree const &)
BtPrinter(DisplayOptions const &displayOptions, FilterOptions const &filterOptions, QObject *const parent=nullptr)
QString entryLink(KeyTreeItem const &item, CSwordModuleInfo const &module) const override
QString finishText(QString const &text, KeyTree const &tree) const override
QString fillTemplate(const QString &name, const QString &content, const Settings &settings) const
Fills the template.
static QString activeTemplateName()
static CDisplayTemplateMgr * instance()
CSwordKey implementation for Sword's VerseKey.
QString key() const final override
bool setKey(const QString &key) final override
QString shortText() const
KeyTree & childList() const noexcept
QString const & getAlternativeContent() const
Settings const & settings() const
bool hasAlternativeContent() const
QString const & key() const
std::list< KeyTreeItem > KeyTree
QString renderKeyTree(KeyTree const &tree) const
static BtConstModuleList collectModules(KeyTree const &tree)
FilterOptions mangleFilterOptions(FilterOptions fo)
CSwordModuleInfo::TextDirection textDirection
KeyRenderingFace keyRenderingFace