• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • applications API Reference
  • KDE Home
  • Contact Us
 

KTextEditor

  • KTextEditor
  • RangeCommand
Public Member Functions | List of all members
KTextEditor::RangeCommand Class Referenceabstract
Command Extension Interfaces

#include <commandinterface.h>

Public Member Functions

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

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 <ehamb.nosp@m.erg@.nosp@m.gmail.nosp@m..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 ( )
inlinevirtual

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
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Sat May 9 2020 03:56:48 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KTextEditor

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

applications API Reference

Skip menu "applications API Reference"
  •   kate
  •       kate
  •   KTextEditor
  •   Kate
  • Konsole

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal