From ce4a32fe52ef09d8f5ff1dd22c001110902b60a2 Mon Sep 17 00:00:00 2001 From: toma Date: Wed, 25 Nov 2009 17:56:58 +0000 Subject: Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- interfaces/ktexteditor/selectiondcopinterface.h | 72 +++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 interfaces/ktexteditor/selectiondcopinterface.h (limited to 'interfaces/ktexteditor/selectiondcopinterface.h') diff --git a/interfaces/ktexteditor/selectiondcopinterface.h b/interfaces/ktexteditor/selectiondcopinterface.h new file mode 100644 index 000000000..87efc1918 --- /dev/null +++ b/interfaces/ktexteditor/selectiondcopinterface.h @@ -0,0 +1,72 @@ +#ifndef SELECTION_DCOP_INTERFACE_H +#define SELECTION_DCOP_INTERFACE_H + +#include +#include +#include +#include + +namespace KTextEditor +{ + class SelectionInterface; + /** + This is the main interface to the SelectionInterface of KTextEdit. + This will provide a consistant dcop interface to all KDE applications that use it. + @short DCOP interface to SelectionInterface. + @author Ian Reinhart Geiser + */ + class KTEXTEDITOR_EXPORT SelectionDCOPInterface : virtual public DCOPObject + { + K_DCOP + + public: + /** + Construct a new interface object for the text editor. + @param Parent the parent SelectionInterface object + that will provide us with the functions for the interface. + @param name the QObject's name + */ + SelectionDCOPInterface( SelectionInterface *Parent, const char *name ); + /** + Destructor + Cleans up the object. + **/ + virtual ~SelectionDCOPInterface(); + k_dcop: + /** + * @return set the selection from line_start,col_start to line_end,col_end + */ + bool setSelection ( uint startLine, uint startCol, uint endLine, uint endCol ); + + /** + * removes the current Selection (not Text) + */ + bool clearSelection (); + + /** + * @return true if there is a selection + */ + bool hasSelection (); + + /** + * @return a QString for the selected text + */ + QString selection (); + + /** + * removes the selected Text + */ + bool removeSelectedText (); + + /** + * select the whole text + */ + bool selectAll (); + + private: + SelectionInterface *m_parent; + }; +} +#endif + + -- cgit v1.2.3