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