KTextEditor
modificationinterface.h
Go to the documentation of this file.
00001 /* This file is part of the KDE project 00002 Copyright (C) 2005 Christoph Cullmann (cullmann@kde.org) 00003 Copyright (C) 2005 Dominik Haumann (dhdev@gmx.de) (documentation) 00004 00005 This library is free software; you can redistribute it and/or 00006 modify it under the terms of the GNU Library General Public 00007 License as published by the Free Software Foundation; either 00008 version 2 of the License, or (at your option) any later version. 00009 00010 This library is distributed in the hope that it will be useful, 00011 but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00013 Library General Public License for more details. 00014 00015 You should have received a copy of the GNU Library General Public License 00016 along with this library; see the file COPYING.LIB. If not, write to 00017 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 00018 Boston, MA 02110-1301, USA. 00019 */ 00020 00021 #ifndef KDELIBS_KTEXTEDITOR_MODIFICATIONINTERFACE_H 00022 #define KDELIBS_KTEXTEDITOR_MODIFICATIONINTERFACE_H 00023 00024 #include <ktexteditor/ktexteditor_export.h> 00025 00026 #include <QtCore/QObject> 00027 00028 namespace KTextEditor 00029 { 00030 00031 class Document; 00032 class View; 00033 00070 class KTEXTEDITOR_EXPORT ModificationInterface 00071 { 00072 public: 00073 ModificationInterface (); 00074 00078 virtual ~ModificationInterface (); 00079 00080 public: 00084 enum ModifiedOnDiskReason { 00085 OnDiskUnmodified = 0, 00086 OnDiskModified = 1, 00087 OnDiskCreated = 2, 00088 OnDiskDeleted = 3 00089 }; 00090 00091 public: 00101 virtual void setModifiedOnDisk( ModifiedOnDiskReason reason ) = 0; 00102 00110 virtual void setModifiedOnDiskWarning ( bool on ) = 0; 00111 00112 /* 00113 * These stuff is implemented as SLOTS in the real document 00114 */ 00115 public: 00123 virtual void slotModifiedOnDisk( View *view = 0 ) = 0; 00124 00125 /* 00126 * These stuff is implemented as SIGNALS in the real document 00127 */ 00128 public: 00138 virtual void modifiedOnDisk (KTextEditor::Document *document, 00139 bool isModified, 00140 KTextEditor::ModificationInterface::ModifiedOnDiskReason reason) = 0; 00141 00142 private: 00143 class ModificationInterfacePrivate* const d; 00144 }; 00145 00146 } 00147 00148 Q_DECLARE_INTERFACE(KTextEditor::ModificationInterface, "org.kde.KTextEditor.ModificationInterface") 00149 00150 #endif 00151 00152 // kate: space-indent on; indent-width 2; replace-tabs on; 00153
KDE 4.6 API Reference