diff options
Diffstat (limited to 'src/backend/rendering/ctextrendering.h')
-rw-r--r-- | src/backend/rendering/ctextrendering.h | 49 |
1 files changed, 35 insertions, 14 deletions
diff --git a/src/backend/rendering/ctextrendering.h b/src/backend/rendering/ctextrendering.h index b6dd5e1..c6b187a 100644 --- a/src/backend/rendering/ctextrendering.h +++ b/src/backend/rendering/ctextrendering.h @@ -2,7 +2,7 @@ * * This file is part of BibleTime's source code, http://www.bibletime.info/. * -* Copyright 1999-2008 by the BibleTime developers. +* Copyright 1999-2011 by the BibleTime developers. * The BibleTime source code is licensed under the GNU General Public License version 2.0. * **********/ @@ -53,13 +53,26 @@ class CTextRendering { KeyRenderingFace keyRenderingFace; }; - KeyTreeItem(const QString& key, CSwordModuleInfo const * module, const Settings settings); - KeyTreeItem(const QString& key, const QList<CSwordModuleInfo*>& modules, const Settings settings); - KeyTreeItem(const QString& startKey, const QString& stopKey, CSwordModuleInfo* module, const Settings settings); - KeyTreeItem(const QString& content, const Settings settings); - KeyTreeItem(const KeyTreeItem& i); + KeyTreeItem(const QString &key, + const CSwordModuleInfo *module, + const Settings &settings); - virtual ~KeyTreeItem(); + KeyTreeItem(const QString &key, + const QList<const CSwordModuleInfo*> &modules, + const Settings &settings); + + KeyTreeItem(const QString &startKey, + const QString &stopKey, + const CSwordModuleInfo *module, + const Settings &settings); + + KeyTreeItem(const QString &content, const Settings &settings); + + KeyTreeItem(const KeyTreeItem &i); + + virtual inline ~KeyTreeItem() { + qDeleteAll(m_childList); + } const QString& getAlternativeContent() const; inline void setAlternativeContent(const QString& newContent) { @@ -70,7 +83,7 @@ class CTextRendering { return !m_alternativeContent.isNull(); }; - inline const QList<CSwordModuleInfo*>& modules() const { + inline const QList<const CSwordModuleInfo*>& modules() const { return m_moduleList; }; @@ -83,13 +96,13 @@ class CTextRendering { }; inline KeyTree* childList() const; -// inline const bool hasChildItems() const; +// inline const bool hasChildItems() const; protected: KeyTreeItem(); Settings m_settings; - QList<CSwordModuleInfo*> m_moduleList; + QList<const CSwordModuleInfo*> m_moduleList; QString m_key; mutable KeyTree m_childList; @@ -101,12 +114,20 @@ class CTextRendering { const QString renderKeyTree( KeyTree& ); - const QString renderKeyRange( const QString& start, const QString& stop, const QList<CSwordModuleInfo*>& modules, const QString& hightlightKey = QString::null, const KeyTreeItem::Settings& settings = KeyTreeItem::Settings() ); + const QString renderKeyRange( + const QString &start, + const QString &stop, + const QList<const CSwordModuleInfo*> &modules, + const QString &hightlightKey = QString::null, + const KeyTreeItem::Settings &settings = KeyTreeItem::Settings()); - const QString renderSingleKey( const QString& key, const QList<CSwordModuleInfo*>&, const KeyTreeItem::Settings& settings = KeyTreeItem::Settings() ); + const QString renderSingleKey( + const QString &key, + const QList<const CSwordModuleInfo*> &modules, + const KeyTreeItem::Settings &settings = KeyTreeItem::Settings()); protected: - const QList<CSwordModuleInfo*> collectModules(KeyTree* const tree) const; + const QList<const CSwordModuleInfo*> collectModules(KeyTree* const tree) const; virtual const QString renderEntry( const KeyTreeItem&, CSwordKey* = 0 ) = 0; virtual const QString finishText( const QString&, KeyTree& tree ) = 0; virtual void initRendering() = 0; @@ -117,7 +138,7 @@ inline CTextRendering::KeyTree* CTextRendering::KeyTreeItem::childList() const { } // //inline const bool CTextRendering::KeyTreeItem::hasChildItems() const { -// return !m_childList.isEmpty(); +// return !m_childList.isEmpty(); //} } |