clipboardinterface.cpp Source File (interfaces Library)

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

# clipboardinterface.cpp

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

This file is part of the documentation for kdelibs Version 3.1.5.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Wed Jan 28 13:30:49 2004 by doxygen 1.3.4 written by Dimitri van Heesch, © 1997-2001