KTextEditor

modificationinterface.h
1 /*
2  SPDX-FileCopyrightText: 2005 Christoph Cullmann <[email protected]>
3 
4  Documentation:
5  SPDX-FileCopyrightText: 2005 Dominik Haumann <[email protected]>
6 
7  SPDX-License-Identifier: LGPL-2.0-or-later
8 */
9 
10 #ifndef KTEXTEDITOR_MODIFICATIONINTERFACE_H
11 #define KTEXTEDITOR_MODIFICATIONINTERFACE_H
12 
13 #include <ktexteditor_export.h>
14 
15 #include <QObject>
16 
17 namespace KTextEditor
18 {
19 class Document;
20 class View;
21 
61 class KTEXTEDITOR_EXPORT ModificationInterface
62 {
63 public:
65 
69  virtual ~ModificationInterface();
70 
71 public:
80  };
81 
82 public:
92  virtual void setModifiedOnDisk(ModifiedOnDiskReason reason) = 0;
93 
101  virtual void setModifiedOnDiskWarning(bool on) = 0;
102 
103  /*
104  * These stuff is implemented as SIGNALS in the real document
105  */
106 public:
116  virtual void modifiedOnDisk(KTextEditor::Document *document, bool isModified, KTextEditor::ModificationInterface::ModifiedOnDiskReason reason) = 0;
117 
118 private:
119  class ModificationInterfacePrivate *const d = nullptr;
120 };
121 
122 }
123 
124 Q_DECLARE_INTERFACE(KTextEditor::ModificationInterface, "org.kde.KTextEditor.ModificationInterface")
125 
126 #endif
void modifiedOnDisk(KTextEditor::Document *doc, bool isModified, KTextEditor::ModificationInterface::ModifiedOnDiskReason reason) override
Indicate this file is modified on disk.
The file was created by another program.
External modification extension interface for the Document.
A KParts derived class representing a text document.
Definition: document.h:185
The KTextEditor namespace contains all the public API that is required to use the KTextEditor compone...
ModifiedOnDiskReason
Reasons why a document is modified on disk.
The file was modified by another program.
virtual ~ModificationInterface()
Virtual destructor.
void setModifiedOnDiskWarning(bool on) override
Control, whether the editor should show a warning dialog whenever a file was modified on disk...
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Wed Aug 12 2020 22:57:37 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.