interfaces.cpp
00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
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 }
 
This file is part of the documentation for kate Library Version 3.2.0.