| # interfaces Library API Documentation
Overview | Class Hierarchy | Classes | Classes (annotated) | Members | Namespaces | Source Files

# searchinterface.cpp

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

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:57 2005 by doxygen 1.4.1 written by Dimitri van Heesch, © 1997-2003