• Skip to content
  • Skip to link menu
KDE 3.5 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

Kate

interfaces.cpp

Go to the documentation of this file.
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., 51 Franklin Street, Fifth Floor,
00016    Boston, MA 02110-1301, 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()->unregisterCommand (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 DocumentExt::DocumentExt ()
00091 {
00092 }
00093 
00094 DocumentExt::~DocumentExt ()
00095 {
00096 }
00097 
00098 Document *document (KTextEditor::Document *doc)
00099 {
00100   if (!doc)
00101     return 0;
00102 
00103   return static_cast<Document*>(doc->qt_cast("Kate::Document"));
00104 }
00105 
00106 DocumentExt *documentExt (KTextEditor::Document *doc)
00107 {
00108   if (!doc)
00109     return 0;
00110 
00111   return static_cast<DocumentExt*>(doc->qt_cast("Kate::DocumentExt"));
00112 }
00113 
00114 Document *createDocument ( QObject *parent, const char *name )
00115 {
00116   return (Document* ) KTextEditor::createDocument ("libkatepart", parent, name);
00117 }
00118 
00119 View *view (KTextEditor::View *view)
00120 {
00121   if (!view)
00122     return 0;
00123 
00124   return static_cast<View*>(view->qt_cast("Kate::View"));
00125 }
00126 
00127 }

Kate

Skip menu "Kate"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

API Reference

Skip menu "API Reference"
  • dcop
  • DNSSD
  • interfaces
  • Kate
  • kconf_update
  • KDECore
  • KDED
  • kdefx
  • KDEsu
  • kdeui
  • KDocTools
  • KHTML
  • KImgIO
  • KInit
  • kio
  • kioslave
  • KJS
  • KNewStuff
  • KParts
  • KUtils
Generated for API Reference by doxygen 1.5.9
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal