You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
57 lines
1.2 KiB
57 lines
1.2 KiB
15 years ago
|
#include "clipboardinterface.h"
|
||
|
#include "clipboarddcopinterface.h"
|
||
|
|
||
|
#include "view.h"
|
||
|
|
||
|
using namespace KTextEditor;
|
||
|
|
||
|
namespace KTextEditor
|
||
|
{
|
||
|
class PrivateClipboardInterface
|
||
|
{
|
||
|
public:
|
||
|
PrivateClipboardInterface()
|
||
|
{
|
||
|
interface = 0;
|
||
|
}
|
||
|
~PrivateClipboardInterface(){}
|
||
|
// Data Members
|
||
|
ClipboardDCOPInterface *interface;
|
||
|
};
|
||
|
|
||
|
}
|
||
|
|
||
|
unsigned int ClipboardInterface::globalClipboardInterfaceNumber = 0;
|
||
|
|
||
|
ClipboardInterface::ClipboardInterface()
|
||
|
{
|
||
|
d = new PrivateClipboardInterface();
|
||
|
globalClipboardInterfaceNumber++;
|
||
|
myClipboardInterfaceNumber = globalClipboardInterfaceNumber++;
|
||
15 years ago
|
TQString name = "ClipboardInterface#" + TQString::number(myClipboardInterfaceNumber);
|
||
15 years ago
|
d->interface = new ClipboardDCOPInterface(this, name.latin1());
|
||
|
}
|
||
|
ClipboardInterface::~ClipboardInterface()
|
||
|
{
|
||
|
delete d->interface;
|
||
|
delete d;
|
||
|
}
|
||
|
|
||
|
unsigned int ClipboardInterface::clipboardInterfaceNumber () const
|
||
|
{
|
||
|
return myClipboardInterfaceNumber;
|
||
|
}
|
||
|
|
||
15 years ago
|
void ClipboardInterface::setClipboardInterfaceDCOPSuffix (const TQCString &suffix)
|
||
15 years ago
|
{
|
||
|
d->interface->setObjId ("ClipboardInterface#"+suffix);
|
||
|
}
|
||
|
|
||
|
ClipboardInterface *KTextEditor::clipboardInterface (View *view)
|
||
|
{
|
||
|
if (!view)
|
||
|
return 0;
|
||
|
|
||
14 years ago
|
return dynamic_cast<KTextEditor::ClipboardInterface*>(view);
|
||
15 years ago
|
}
|