kate Library API Documentation

interfaces.cpp

00001 /* This file is part of the KDE libraries 00002 Copyright (C) 2001 Christoph Cullmann <cullmann@kde.org> 00003 00004 This library is free software; you can redistribute it and/or 00005 modify it under the terms of the GNU Library General Public 00006 License version 2 as published by the Free Software Foundation. 00007 00008 This library is distributed in the hope that it will be useful, 00009 but WITHOUT ANY WARRANTY; without even the implied warranty of 00010 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00011 Library General Public License for more details. 00012 00013 You should have received a copy of the GNU Library General Public License 00014 along with this library; see the file COPYING.LIB. If not, write to 00015 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 00016 Boston, MA 02111-1307, USA. 00017 */ 00018 00019 #include "document.h" 00020 #include "document.moc" 00021 00022 #include "view.h" 00023 #include "view.moc" 00024 00025 #include "katecmd.h" 00026 00027 namespace Kate 00028 { 00029 00030 bool Document::s_openErrorDialogsActivated = true; 00031 bool Document::s_fileChangedDialogsActivated = false; 00032 QString Document::s_defaultEncoding; 00033 00034 Document::Document (QObject* parent, const char* name) 00035 : KTextEditor::Document (parent, name) 00036 { 00037 } 00038 00039 Document::Document () : KTextEditor::Document (0L, "Kate::Document") 00040 { 00041 } 00042 00043 Document::~Document () 00044 { 00045 } 00046 00047 void Document::setOpenErrorDialogsActivated (bool on) 00048 { 00049 s_openErrorDialogsActivated = on; 00050 } 00051 00052 void Document::setFileChangedDialogsActivated (bool on) 00053 { 00054 s_fileChangedDialogsActivated = on; 00055 } 00056 00057 const QString &Document::defaultEncoding () 00058 { 00059 return s_defaultEncoding; 00060 } 00061 00062 bool Document::registerCommand (Command *cmd) 00063 { 00064 return KateCmd::self()->registerCommand (cmd); 00065 } 00066 00067 bool Document::unregisterCommand (Command *cmd) 00068 { 00069 return KateCmd::self()->registerCommand (cmd); 00070 } 00071 00072 Command *Document::queryCommand (const QString &cmd) 00073 { 00074 return KateCmd::self()->queryCommand (cmd); 00075 } 00076 00077 View::View ( KTextEditor::Document *doc, QWidget *parent, const char *name ) : KTextEditor::View (doc, parent, name) 00078 { 00079 } 00080 00081 View::~View () 00082 { 00083 } 00084 00085 void ConfigPage::slotChanged() 00086 { 00087 emit changed(); 00088 } 00089 00090 Document *document (KTextEditor::Document *doc) 00091 { 00092 if (!doc) 00093 return 0; 00094 00095 return static_cast<Document*>(doc->qt_cast("Kate::Document")); 00096 } 00097 00098 Document *createDocument ( QObject *parent, const char *name ) 00099 { 00100 return (Document* ) KTextEditor::createDocument ("libkatepart", parent, name); 00101 } 00102 00103 View *view (KTextEditor::View *view) 00104 { 00105 if (!view) 00106 return 0; 00107 00108 return static_cast<View*>(view->qt_cast("Kate::View")); 00109 } 00110 00111 }
KDE Logo
This file is part of the documentation for kate Library Version 3.2.3.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Sun Oct 10 18:56:22 2004 by doxygen 1.3.7 written by Dimitri van Heesch, © 1997-2003