diff options
Diffstat (limited to 'src/frontend/displaywindow/creadwindow.cpp')
-rw-r--r-- | src/frontend/displaywindow/creadwindow.cpp | 56 |
1 files changed, 1 insertions, 55 deletions
diff --git a/src/frontend/displaywindow/creadwindow.cpp b/src/frontend/displaywindow/creadwindow.cpp index 7f11dca..0d8f2d9 100644 --- a/src/frontend/displaywindow/creadwindow.cpp +++ b/src/frontend/displaywindow/creadwindow.cpp @@ -2,7 +2,7 @@ * * This file is part of BibleTime's source code, http://www.bibletime.info/. * -* Copyright 1999-2011 by the BibleTime developers. +* Copyright 1999-2014 by the BibleTime developers. * The BibleTime source code is licensed under the GNU General Public License version 2.0. * **********/ @@ -19,12 +19,9 @@ #include "frontend/cmdiarea.h" #include "frontend/display/bthtmlreaddisplay.h" #include "frontend/displaywindow/btactioncollection.h" -#include "frontend/profile/cprofilewindow.h" #include "frontend/searchdialog/csearchdialog.h" -using namespace Profile; - CReadWindow::CReadWindow(QList<CSwordModuleInfo*> modules, CMDIArea* parent) : CDisplayWindow(modules, parent), m_readDisplayWidget(0) { @@ -108,57 +105,6 @@ void CReadWindow::slotMoveToAnchor() { ((CReadDisplay*)displayWidget())->moveToAnchor( Rendering::CDisplayRendering::keyToHTMLAnchor(key()->key()) ); } -/** Store the settings of this window in the given CProfileWindow object. */ -void CReadWindow::storeProfileSettings(CProfileWindow * const settings) { - QRect rect; - rect.setX(parentWidget()->x()); - rect.setY(parentWidget()->y()); - rect.setWidth(parentWidget()->width()); - rect.setHeight(parentWidget()->height()); - settings->windowGeometry = rect; - - // settings->setScrollbarPositions( m_htmlWidget->view()->horizontalScrollBar()->value(), m_htmlWidget->view()->verticalScrollBar()->value() ); - settings->type = modules().first()->type(); - settings->maximized = (isMaximized() || parentWidget()->isMaximized()); - settings->hasFocus = (this == dynamic_cast<CReadWindow*>(mdi()->activeSubWindow()) ); //set property to true if this window is the active one. - - if (key()) { - sword::VerseKey* vk = dynamic_cast<sword::VerseKey*>(key()); - QString oldLang; - if (vk) { - oldLang = QString(vk->getLocale()); - vk->setLocale("en"); //save english locale names as default! - } - settings->key = key()->key(); - if (vk) { - vk->setLocale(oldLang.toLatin1()); - } - } - - QStringList mods; - Q_FOREACH (const CSwordModuleInfo *module, modules()) { - mods.append(module->name()); - } - settings->modules = mods; -} - -void CReadWindow::applyProfileSettings(CProfileWindow * const settings) { - // parentWidget()->setUpdatesEnabled(false); - setUpdatesEnabled(false); - - if (settings->maximized) { //maximize this window - // Use parentWidget() to call showMaximized. Otherwise we'd get lot's of X11 errors - parentWidget()->showMaximized(); - } - else { - const QRect &rect = settings->windowGeometry; - parentWidget()->resize(rect.width(), rect.height()); - parentWidget()->move(rect.x(), rect.y()); - } - - setUpdatesEnabled(true); -} - void CReadWindow::insertKeyboardActions( BtActionCollection* const ) {} /** No descriptions */ |