diff options
author | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
---|---|---|
committer | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
commit | ce4a32fe52ef09d8f5ff1dd22c001110902b60a2 (patch) | |
tree | 5ac38a06f3dde268dc7927dc155896926aaf7012 /interfaces/ktexteditor/selectiondcopinterface.cpp | |
download | tdelibs-ce4a32fe52ef09d8f5ff1dd22c001110902b60a2.tar.gz tdelibs-ce4a32fe52ef09d8f5ff1dd22c001110902b60a2.zip |
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
Diffstat (limited to 'interfaces/ktexteditor/selectiondcopinterface.cpp')
-rw-r--r-- | interfaces/ktexteditor/selectiondcopinterface.cpp | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/interfaces/ktexteditor/selectiondcopinterface.cpp b/interfaces/ktexteditor/selectiondcopinterface.cpp new file mode 100644 index 000000000..c1405ae16 --- /dev/null +++ b/interfaces/ktexteditor/selectiondcopinterface.cpp @@ -0,0 +1,64 @@ +#include "selectiondcopinterface.h" +#include "selectioninterface.h" + +#include <dcopclient.h> +using namespace KTextEditor; + +SelectionDCOPInterface::SelectionDCOPInterface( SelectionInterface *Parent, const char *name) + : DCOPObject(name) +{ + m_parent = Parent; +} + +SelectionDCOPInterface::~SelectionDCOPInterface() +{ + +} + + /** + * @return set the selection from line_start,col_start to line_end,col_end + */ + bool SelectionDCOPInterface::setSelection ( uint startLine, uint startCol, uint endLine, uint endCol ) + { + return m_parent->setSelection ( startLine, startCol, endLine, endCol ); + } + + /** + * removes the current Selection (not Text) + */ + bool SelectionDCOPInterface::clearSelection () + { + return m_parent->clearSelection(); + } + + /** + * @return true if there is a selection + */ + bool SelectionDCOPInterface::hasSelection () + { + return m_parent->hasSelection(); + } + + /** + * @return a QString for the selected text + */ + QString SelectionDCOPInterface::selection () + { + return m_parent->selection(); + } + + /** + * removes the selected Text + */ + bool SelectionDCOPInterface::removeSelectedText () + { + return m_parent->removeSelectedText(); + } + + /** + * select the whole text + */ + bool SelectionDCOPInterface::selectAll () + { + return m_parent->selectAll(); + } |