# interfaces Library API Documentation

Overview | Class Hierarchy | Classes | Classes (annotated) | Members | Namespaces | Source Files

# editinterface.cpp

    00001 #include "editinterface.h"
    00002 #include "editdcopinterface.h"
    00003 #include "document.h"
    00004
    00005 using namespace KTextEditor;
    00006
    00007 namespace KTextEditor
    00008 {
    00009   class PrivateEditInterface
    00010   {
    00011   public:
    00012     PrivateEditInterface()
    00013     {
    00014     interface = 0;
    00015     }
    00016     ~PrivateEditInterface(){}
    00017   // Data Members
    00018   EditDCOPInterface *interface;
    00019   };
    00020
    00021 }
    00022
    00023 uint EditInterface::globalEditInterfaceNumber = 0;
    00024
    00025 EditInterface::EditInterface()
    00026 {
    00027   d = new PrivateEditInterface();
    00028   globalEditInterfaceNumber++;
    00029   myEditInterfaceNumber = globalEditInterfaceNumber;
    00030   QString name = "EditInterface#" + QString::number(myEditInterfaceNumber);
    00031   d->interface = new EditDCOPInterface(this, name.latin1());
    00032 }
    00033
    00034 EditInterface::~EditInterface()
    00035 {
    00036   delete d->interface;
    00037   delete d;
    00038 }
    00039
    00040 uint EditInterface::editInterfaceNumber () const
    00041 {
    00042   return myEditInterfaceNumber;
    00043 }
    00044
    00045 void EditInterface::setEditInterfaceDCOPSuffix (const QCString &suffix)
    00046 {
    00047   d->interface->setObjId ("EditInterface#"+suffix);
    00048 }
    00049
    00050 EditInterface *KTextEditor::editInterface (Document *doc)
    00051 {
    00052   if (!doc)
    00053     return 0;
    00054
    00055   return static_cast<EditInterface*>(doc->qt_cast("KTextEditor::EditInterface"));
    00056 }
    00057

This file is part of the documentation for interfaces Library Version 3.4.1.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Sat Jun 11 20:34:56 2005 by doxygen 1.4.1 written by Dimitri van Heesch, © 1997-2003