selectiondcopinterface_skel.cpp
00001
00002
00003
00004
00005
00006
00007
00008
00009 #include "./selectiondcopinterface.h"
00010
00011 #include <kdatastream.h>
00012
00013 namespace KTextEditor {
00014
00015 static const char* const SelectionDCOPInterface_ftable[7][3] = {
00016 { "bool", "setSelection(uint,uint,uint,uint)", "setSelection(uint startLine,uint startCol,uint endLine,uint endCol)" },
00017 { "bool", "clearSelection()", "clearSelection()" },
00018 { "bool", "hasSelection()", "hasSelection()" },
00019 { "QString", "selection()", "selection()" },
00020 { "bool", "removeSelectedText()", "removeSelectedText()" },
00021 { "bool", "selectAll()", "selectAll()" },
00022 { 0, 0, 0 }
00023 };
00024
00025 bool SelectionDCOPInterface::process(const QCString &fun, const QByteArray &data, QCString& replyType, QByteArray &replyData)
00026 {
00027 if ( fun == SelectionDCOPInterface_ftable[0][1] ) {
00028 uint arg0;
00029 uint arg1;
00030 uint arg2;
00031 uint arg3;
00032 QDataStream arg( data, IO_ReadOnly );
00033 arg >> arg0;
00034 arg >> arg1;
00035 arg >> arg2;
00036 arg >> arg3;
00037 replyType = SelectionDCOPInterface_ftable[0][0];
00038 QDataStream _replyStream( replyData, IO_WriteOnly );
00039 _replyStream << setSelection(arg0, arg1, arg2, arg3 );
00040 } else if ( fun == SelectionDCOPInterface_ftable[1][1] ) {
00041 replyType = SelectionDCOPInterface_ftable[1][0];
00042 QDataStream _replyStream( replyData, IO_WriteOnly );
00043 _replyStream << clearSelection( );
00044 } else if ( fun == SelectionDCOPInterface_ftable[2][1] ) {
00045 replyType = SelectionDCOPInterface_ftable[2][0];
00046 QDataStream _replyStream( replyData, IO_WriteOnly );
00047 _replyStream << hasSelection( );
00048 } else if ( fun == SelectionDCOPInterface_ftable[3][1] ) {
00049 replyType = SelectionDCOPInterface_ftable[3][0];
00050 QDataStream _replyStream( replyData, IO_WriteOnly );
00051 _replyStream << selection( );
00052 } else if ( fun == SelectionDCOPInterface_ftable[4][1] ) {
00053 replyType = SelectionDCOPInterface_ftable[4][0];
00054 QDataStream _replyStream( replyData, IO_WriteOnly );
00055 _replyStream << removeSelectedText( );
00056 } else if ( fun == SelectionDCOPInterface_ftable[5][1] ) {
00057 replyType = SelectionDCOPInterface_ftable[5][0];
00058 QDataStream _replyStream( replyData, IO_WriteOnly );
00059 _replyStream << selectAll( );
00060 } else {
00061 return DCOPObject::process( fun, data, replyType, replyData );
00062 }
00063 return TRUE;
00064 }
00065
00066 QCStringList SelectionDCOPInterface::interfaces()
00067 {
00068 QCStringList ifaces = DCOPObject::interfaces();
00069 ifaces += "KTextEditor::SelectionDCOPInterface";
00070 return ifaces;
00071 }
00072
00073 QCStringList SelectionDCOPInterface::functions()
00074 {
00075 QCStringList funcs = DCOPObject::functions();
00076 for ( int i = 0; SelectionDCOPInterface_ftable[i][2]; i++ ) {
00077 QCString func = SelectionDCOPInterface_ftable[i][0];
00078 func += ' ';
00079 func += SelectionDCOPInterface_ftable[i][2];
00080 funcs << func;
00081 }
00082 return funcs;
00083 }
00084
00085 }
00086
This file is part of the documentation for kdelibs Version 3.1.4.