• Skip to content
  • Skip to link menu
KDE 4.2 API Reference
  • KDE API Reference
  • kdelibs
  • Sitemap
  • Contact Us
 

KTextEditor

KTextEditor::RangeCommand

KTextEditor::RangeCommand Class Reference
[Command Extension Interfaces]

Extension interface for a Command making the exec method take a line range. More...

#include <commandinterface.h>

List of all members.


Public Member Functions

virtual bool exec (KTextEditor::View *view, const QString &cmd, QString &msg, const KTextEditor::Range &range)=0
virtual bool supportsRange (const QString &cmd)=0
virtual ~RangeCommand ()

Detailed Description

Extension interface for a Command making the exec method take a line range.

Introduction

The RangeCommand extension extends the Command interface by making it possible to send a range to a command indicating that it should only do its work on those lines.

The method supportsRange() takes a QString reference and should return true if the given command name supports a range and false if not.

See also:
KTextEditor::CommandInterface, KTextEditor::Command, KTextEditor::Range
Author:
Erlend Hamberg <ehamberg@gmail.com>
Since:
4.2
Note:
KDE5: merge with KTextEditor::Command?

Definition at line 306 of file commandinterface.h.


Constructor & Destructor Documentation

virtual KTextEditor::RangeCommand::~RangeCommand (  )  [inline, virtual]

Virtual destructor.

Definition at line 312 of file commandinterface.h.


Member Function Documentation

virtual bool KTextEditor::RangeCommand::exec ( KTextEditor::View *  view,
const QString &  cmd,
QString &  msg,
const KTextEditor::Range &  range 
) [pure virtual]

Execute the command for the given range on the given view and cmd string.

Return the success value and a msg for status.

Returns:
true on success, otherwise false

virtual bool KTextEditor::RangeCommand::supportsRange ( const QString &  cmd  )  [pure virtual]

Find out if a given command can act on a range.

This is used for checking if a command should be called when the user also gave a range or if an error should be raised.

Returns:
true if command supports acting on a range of lines, false if not


The documentation for this class was generated from the following file:
  • commandinterface.h

KTextEditor

Skip menu "KTextEditor"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • Kross
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.5.7
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal