diff options
author | Roberto C. Sanchez <roberto@connexer.com> | 2014-10-21 22:48:35 -0400 |
---|---|---|
committer | Roberto C. Sanchez <roberto@connexer.com> | 2014-10-21 22:48:35 -0400 |
commit | df8f1d512c60a96f9041f9663b3fdc2db51cba33 (patch) | |
tree | 3d2bdbd4732d417aca73be022ae9044eac96b7d3 /src/frontend/settingsdialogs/cdisplaysettings.cpp | |
parent | 4885bfcef4d89cf0cb391e00af617b9fd19c9cbb (diff) |
Imported Upstream version 2.8.1
Diffstat (limited to 'src/frontend/settingsdialogs/cdisplaysettings.cpp')
-rw-r--r-- | src/frontend/settingsdialogs/cdisplaysettings.cpp | 37 |
1 files changed, 18 insertions, 19 deletions
diff --git a/src/frontend/settingsdialogs/cdisplaysettings.cpp b/src/frontend/settingsdialogs/cdisplaysettings.cpp index 9341632..dd390a6 100644 --- a/src/frontend/settingsdialogs/cdisplaysettings.cpp +++ b/src/frontend/settingsdialogs/cdisplaysettings.cpp @@ -2,7 +2,7 @@ * * This file is part of BibleTime's source code, http://www.bibletime.info/. * -* Copyright 1999-2009 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. * **********/ @@ -17,8 +17,8 @@ #include "backend/config/cbtconfig.h" #include "backend/managers/cdisplaytemplatemgr.h" #include "backend/rendering/cdisplayrendering.h" -#include "util/cpointers.h" #include "util/cresmgr.h" +#include "util/directory.h" #include "util/tool.h" @@ -44,9 +44,11 @@ QSize CWebViewerWidget::sizeHint () const { // ************************ /** Initializes the startup section of the OD. */ -CDisplaySettingsPage::CDisplaySettingsPage(QWidget* /*parent*/) - : BtConfigPage() { - QVBoxLayout* layout = new QVBoxLayout(this); +CDisplaySettingsPage::CDisplaySettingsPage(QWidget *parent) + : BtConfigPage(parent) +{ + Q_ASSERT(qobject_cast<QVBoxLayout*>(layout()) != 0); + QVBoxLayout *mainLayout = static_cast<QVBoxLayout*>(layout()); { //startup logo m_showLogoCheck = new QCheckBox(this); @@ -54,11 +56,11 @@ CDisplaySettingsPage::CDisplaySettingsPage(QWidget* /*parent*/) m_showLogoCheck->setToolTip(tr("Show the BibleTime logo on startup")); m_showLogoCheck->setChecked(CBTConfig::get(CBTConfig::logo)); - layout->addWidget(m_showLogoCheck); + mainLayout->addWidget(m_showLogoCheck); } - layout->addSpacing(20); + mainLayout->addSpacing(20); - layout->addWidget( + mainLayout->addWidget( util::tool::explanationLabel( this, tr("Display templates"), @@ -77,7 +79,7 @@ CDisplaySettingsPage::CDisplaySettingsPage(QWidget* /*parent*/) hboxlayout->addWidget(availableLabel); hboxlayout->addWidget( m_styleChooserCombo ); hboxlayout->addStretch(); - layout->addLayout( hboxlayout ); + mainLayout->addLayout( hboxlayout ); QWidget* webViewWidget = new CWebViewerWidget(this); QLayout* webViewLayout = new QVBoxLayout(webViewWidget); @@ -87,10 +89,10 @@ CDisplaySettingsPage::CDisplaySettingsPage(QWidget* /*parent*/) webViewLayout->addWidget(previewLabel); webViewLayout->addWidget(m_stylePreviewViewer); webViewWidget->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Expanding); - layout->addWidget(webViewWidget); + mainLayout->addWidget(webViewWidget); m_styleChooserCombo->addItems( - CPointers::displayTemplateManager()->availableTemplates() + CDisplayTemplateMgr::instance()->availableTemplates() ); for (int i = 0; i < m_styleChooserCombo->count(); ++i) { @@ -137,7 +139,7 @@ void CDisplaySettingsPage::updateStylePreview() { tree.append( new CTextRendering::KeyTreeItem( QString("\n<span class=\"entryname\"><a name=\"John319\" href=\"sword://Bible/WEB/John 3:19\">19</a></span>%1") - .arg(tr("This is the judgment, that the light has come into the world, and men loved the darkness rather than the light; for their works were evil.")), + .arg(tr("This is the judgement, that the light has come into the world, and men loved the darkness rather than the light; for their works were evil.")), settings)); tree.append( new CTextRendering::KeyTreeItem( @@ -173,14 +175,11 @@ void CDisplaySettingsPage::save() { // implement the BtConfigPage methods -QString CDisplaySettingsPage::iconName() { - return CResMgr::settings::startup::icon; +const QIcon &CDisplaySettingsPage::icon() const { + return util::directory::getIcon(CResMgr::settings::startup::icon); } -QString CDisplaySettingsPage::label() { - //: Empty string, don't translate - return tr(""); -} -QString CDisplaySettingsPage::header() { + +QString CDisplaySettingsPage::header() const { return tr("Display"); } |