Okular

saveinterface.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_SAVEINTERFACE_H_
11 #define _OKULAR_SAVEINTERFACE_H_
12 
13 #include "../core/okularcore_export.h"
14 
15 #include <QObject>
16 
17 namespace Okular
18 {
19 class AnnotationProxy;
20 
39 class OKULARCORE_EXPORT SaveInterface
40 {
41 public:
45  enum SaveOption {
46  NoOption = 0,
47  SaveChanges = 1
48  };
49  Q_DECLARE_FLAGS(SaveOptions, SaveOption)
50 
52  {
53  }
54 
58  virtual ~SaveInterface()
59  {
60  }
61 
62  SaveInterface(const SaveInterface &) = delete;
63  SaveInterface &operator=(const SaveInterface &) = delete;
64 
70  virtual bool supportsOption(SaveOption option) const = 0;
71 
75  virtual bool save(const QString &fileName, SaveOptions options, QString *errorText) = 0;
76 
85  virtual AnnotationProxy *annotationProxy() const = 0;
86 };
87 
88 }
89 
90 Q_DECLARE_INTERFACE(Okular::SaveInterface, "org.kde.okular.SaveInterface/0.3")
91 Q_DECLARE_OPERATORS_FOR_FLAGS(Okular::SaveInterface::SaveOptions)
92 
93 #endif
SaveOption
The possible options for the saving.
Definition: saveinterface.h:45
Native annotation interface.
Definition: annotations.h:699
global.h
Definition: action.h:19
Abstract interface for saving.
Definition: saveinterface.h:39
virtual ~SaveInterface()
Destroys the save interface.
Definition: saveinterface.h:58
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Wed Aug 5 2020 22:34:25 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.