Okular

observer.h
1 /***************************************************************************
2  * Copyright (C) 2005 by Enrico Ros <[email protected]> *
3  * Copyright (C) 2005 by Albert Astals Cid <[email protected]> *
4  * Copyright (C) 2017 Klarälvdalens Datakonsult AB, a KDAB Group *
5  * company, [email protected] Work sponsored by the *
6  * LiMux project of the city of Munich *
7  * *
8  * This program is free software; you can redistribute it and/or modify *
9  * it under the terms of the GNU General Public License as published by *
10  * the Free Software Foundation; either version 2 of the License, or *
11  * (at your option) any later version. *
12  ***************************************************************************/
13 
14 #ifndef _OKULAR_DOCUMENTOBSERVER_H_
15 #define _OKULAR_DOCUMENTOBSERVER_H_
16 
17 #include <QVector>
18 
19 #include "okularcore_export.h"
20 
21 namespace Okular {
22 
23 class Page;
24 
31 class OKULARCORE_EXPORT DocumentObserver
32 {
33  public:
38  virtual ~DocumentObserver();
39 
40  DocumentObserver(const DocumentObserver &) = delete;
41  DocumentObserver &operator=(const DocumentObserver &) = delete;
42 
47  enum ChangedFlags {
48  Pixmap = 1,
49  Bookmark = 2,
50  Highlights = 4,
52  Annotations = 16,
53  BoundingBox = 32,
54  NeedSaveAs = 64
55  };
56 
60  enum SetupFlags {
61  DocumentChanged = 1,
62  NewLayoutForPages = 2,
63  UrlChanged = 4
64  };
65 
72  virtual void notifySetup( const QVector< Okular::Page * > &pages, int setupFlags );
73 
79  virtual void notifyViewportChanged( bool smoothMove );
80 
85  virtual void notifyPageChanged( int page, int flags );
86 
91  virtual void notifyContentsCleared( int flags );
92 
96  virtual void notifyVisibleRectsChanged();
97 
101  virtual void notifyZoom( int factor );
102 
109  virtual bool canUnloadPixmap( int page ) const;
110 
119  virtual void notifyCurrentPageChanged( int previous, int current );
120 
121  private:
122  class Private;
123  const Private* d;
124 };
125 
126 }
127 
128 #endif
global.h
Definition: action.h:19
ChangedFlags
Flags that can be sent from the document to all observers to inform them about the type of object tha...
Definition: observer.h:47
Base class for objects being notified when something changes.
Definition: observer.h:31
Wrapper around the information needed to generate the selection area There are two assumptions inside...
Definition: misc.h:36
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Tue Jul 7 2020 22:34:35 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.