19 #include "katedocmanageriface.h"
21 #include "katedocmanager.h"
25 KateDocManagerDCOPIface::KateDocManagerDCOPIface (KateDocManager *dm) : DCOPObject (
"KateDocumentManager"), m_dm (dm)
31 DCOPRef KateDocManagerDCOPIface::document (uint n)
33 Kate::Document *doc = m_dm->document(n);
38 DCOPObject *obj =
static_cast<DCOPObject*
>(doc->tqt_cast(
"DCOPObject"));
46 DCOPRef KateDocManagerDCOPIface::activeDocument ()
48 Kate::Document *doc = m_dm->activeDocument();
53 DCOPObject *obj =
static_cast<DCOPObject*
>(doc->tqt_cast(
"DCOPObject"));
61 uint KateDocManagerDCOPIface::activeDocumentNumber ()
63 Kate::Document *doc = m_dm->activeDocument();
66 return doc->documentNumber ();
71 DCOPRef KateDocManagerDCOPIface::documentWithID (uint
id)
73 Kate::Document *doc = m_dm->documentWithID (
id);
78 DCOPObject *obj =
static_cast<DCOPObject*
>(doc->tqt_cast(
"DCOPObject"));
86 DCOPRef KateDocManagerDCOPIface::openURL (KURL url, TQString encoding)
88 Kate::Document *doc = m_dm->openURL (url, encoding);
93 DCOPObject *obj =
static_cast<DCOPObject*
>(doc->tqt_cast(
"DCOPObject"));
101 bool KateDocManagerDCOPIface::closeDocument(uint n)
103 return m_dm->closeDocument(n);
106 bool KateDocManagerDCOPIface::closeDocumentWithID(uint
id)
108 return m_dm->closeDocumentWithID (
id);
111 bool KateDocManagerDCOPIface::closeAllDocuments()
113 return m_dm->closeAllDocuments();
116 bool KateDocManagerDCOPIface::isOpen(KURL url)
118 return m_dm->isOpen (url);
121 uint KateDocManagerDCOPIface::documents ()
123 return m_dm->documents();
126 int KateDocManagerDCOPIface::findDocument (KURL url)
128 return m_dm->findDocument (url);