1 /* 2 * Copyright (C) 2008, Pino Toscano <pino@kde.org> 3 * 4 * This program is free software; you can redistribute it and/or modify 5 * it under the terms of the GNU General Public License as published by 6 * the Free Software Foundation; either version 2, or (at your option) 7 * any later version. 8 * 9 * This program is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * GNU General Public License for more details. 13 * 14 * You should have received a copy of the GNU General Public License 15 * along with this program; if not, write to the Free Software 16 * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. 17 */ 18 19 #include "documentobserver.h" 20 21 #include "viewer.h" 22 DocumentObserver()23DocumentObserver::DocumentObserver() 24 : m_viewer(0) 25 { 26 } 27 ~DocumentObserver()28DocumentObserver::~DocumentObserver() 29 { 30 } 31 document() const32Poppler::Document* DocumentObserver::document() const 33 { 34 return m_viewer->m_doc; 35 } 36 setPage(int page)37void DocumentObserver::setPage(int page) 38 { 39 m_viewer->setPage(page); 40 } 41 page() const42int DocumentObserver::page() const 43 { 44 return m_viewer->page(); 45 } 46 reloadPage()47void DocumentObserver::reloadPage() 48 { 49 m_viewer->setPage(m_viewer->page()); 50 } 51