20 #include "document.moc"
30 bool Document::s_openErrorDialogsActivated =
true;
31 bool Document::s_fileChangedDialogsActivated =
false;
32 TQString Document::s_defaultEncoding;
34 Document::Document (TQObject* parent,
const char* name)
35 : KTextEditor::Document (parent,
name)
39 Document::Document () : KTextEditor::Document (0L,
"Kate::Document")
43 Document::~Document ()
47 void Document::setOpenErrorDialogsActivated (
bool on)
49 s_openErrorDialogsActivated = on;
52 void Document::setFileChangedDialogsActivated (
bool on)
54 s_fileChangedDialogsActivated = on;
57 const TQString &Document::defaultEncoding ()
59 return s_defaultEncoding;
62 bool Document::registerCommand (
Command *cmd)
64 return KateCmd::self()->registerCommand (cmd);
67 bool Document::unregisterCommand (
Command *cmd)
69 return KateCmd::self()->unregisterCommand (cmd);
72 Command *Document::queryCommand (
const TQString &cmd)
74 return KateCmd::self()->queryCommand (cmd);
77 View::View ( KTextEditor::Document *doc, TQWidget *parent,
const char *name ) : KTextEditor::
View (doc, parent, name)
85 void ConfigPage::slotChanged()
90 DocumentExt::DocumentExt ()
94 DocumentExt::~DocumentExt ()
103 return ::tqt_cast<Kate::Document*>(doc);
116 return (
Document* ) KTextEditor::createDocument (
"libkatepart", parent, name);
119 View *view (KTextEditor::View *view)
124 return ::tqt_cast<Kate::View*>(view);
Extensions to the Document Interface.
This interface provides access to the Kate Document class.
The Kate::View text editor interface.
virtual ~View()
Destructor, you need a destructor if Scott Meyers says so.
Kate namespace All classes in this namespace must stay BC during one major release series (e....
KATEPARTINTERFACES_EXPORT Document * createDocument(TQObject *parent=0, const char *name=0)
Creates a new Kate::Document object.
KATEPARTINTERFACES_EXPORT DocumentExt * documentExt(KTextEditor::Document *doc)
Check if given document is a Kate::DocumentExt.
KATEPARTINTERFACES_EXPORT Document * document(KTextEditor::Document *doc)
Check if given document is a Kate::Document.
TQString name(StdAccel id)