Okular

view.h
1 /***************************************************************************
2  * Copyright (C) 2008 by Pino Toscano <[email protected]> *
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 of the License, or *
7  * (at your option) any later version. *
8  ***************************************************************************/
9 
10 #ifndef OKULAR_VIEW_H
11 #define OKULAR_VIEW_H
12 
13 #include "okularcore_export.h"
14 #include <QObject>
15 class QString;
16 class QVariant;
17 
18 namespace Okular
19 {
20 class Document;
21 class DocumentPrivate;
22 class ViewPrivate;
23 
32 class OKULARCORE_EXPORT View
33 {
35  friend class Document;
36  friend class DocumentPrivate;
38 
39 public:
44  Zoom,
48  TrimMargins
49  };
50 
55  NoFlag = 0,
56  CapabilityRead = 0x01,
57  CapabilityWrite = 0x02,
58  CapabilitySerializable = 0x04
59  };
60  Q_DECLARE_FLAGS(CapabilityFlags, CapabilityFlag)
61 
62  virtual ~View();
63 
68  Document *viewDocument() const;
69 
73  QString name() const;
74 
78  virtual bool supportsCapability(ViewCapability capability) const;
79 
83  virtual CapabilityFlags capabilityFlags(ViewCapability capability) const;
84 
88  virtual QVariant capability(ViewCapability capability) const;
89 
93  virtual void setCapability(ViewCapability capability, const QVariant &option);
94 
95 protected:
99  View(const QString &name);
100 
102  Q_DECLARE_PRIVATE(View)
103  ViewPrivate *d_ptr;
105 
106 private:
107  Q_DISABLE_COPY(View)
108 };
109 
110 }
111 
112 Q_DECLARE_OPERATORS_FOR_FLAGS(Okular::View::CapabilityFlags)
113 
114 #endif
View on the document.
Definition: view.h:32
ViewCapability
The capabilities of a view.
Definition: view.h:43
Possibility to toggle continuous mode.
Definition: view.h:46
global.h
Definition: action.h:19
Possibility to get/set the zoom mode of the view.
Definition: view.h:45
The Document.
Definition: document.h:193
Possibility to get/set the view mode.
Definition: view.h:47
Possibility to get/set the zoom of the view.
Definition: view.h:44
CapabilityFlag
The access type of a capability.
Definition: view.h:54
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Sat Jan 23 2021 01:05:53 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.