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

Kate

katecmds.h

Go to the documentation of this file.
00001 /* This file is part of the KDE libraries
00002    Copyright (C) 2003 Anders Lund <anders@alweb.dk>
00003    Copyright (C) 2001-2004 Christoph Cullmann <cullmann@kde.org>
00004    Copyright (C) 2001 Charles Samuels <charles@kde.org>
00005 
00006    This library is free software; you can redistribute it and/or
00007    modify it under the terms of the GNU Library General Public
00008    License version 2 as published by the Free Software Foundation.
00009 
00010    This library is distributed in the hope that it will be useful,
00011    but WITHOUT ANY WARRANTY; without even the implied warranty of
00012    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013    Library General Public License for more details.
00014 
00015    You should have received a copy of the GNU Library General Public License
00016    along with this library; see the file COPYING.LIB.  If not, write to
00017    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00018    Boston, MA 02110-1301, USA.
00019 */
00020 
00021 #ifndef __KATE_CMDS_H__
00022 #define __KATE_CMDS_H__
00023 
00024 #include <ktexteditor/commandinterface.h>
00025 
00026 #include <QtCore/QStringList>
00027 
00028 class KateDocument;
00029 class KCompletion;
00030 
00035 namespace KateCommands
00036 {
00037 
00044 class CoreCommands : public KTextEditor::Command, public KTextEditor::CommandExtension
00045 {
00046   public:
00054     bool exec( class KTextEditor::View *view, const QString &cmd, QString &errorMsg );
00055 
00057     bool help( class KTextEditor::View *, const QString &, QString & ) {return false;}
00058 
00063     const QStringList &cmds();
00064 
00068     KCompletion *completionObject( KTextEditor::View *, const QString & );
00069     
00070     virtual void flagCompletions( QStringList& ) {}
00071     virtual bool wantsToProcessText( const QString & ) { return false; }
00072     virtual void processText( KTextEditor::View *, const QString & ) {}
00073 };
00074 
00079 class SedReplace : public KTextEditor::Command
00080 {
00081   public:
00097     bool exec (class KTextEditor::View *view, const QString &cmd, QString &errorMsg);
00098 
00100     bool help (class KTextEditor::View *, const QString &, QString &) { return false; }
00101 
00106     const QStringList &cmds () { static QStringList l("s"); if (l.isEmpty()) l << "%s" << "$s"; return l; }
00107 
00108   private:
00128     static int sedMagic(KateDocument *doc, int &line,
00129                         const QString &find, const QString &replace, const QString &delim,
00130                         bool noCase, bool repeat,
00131                         uint startcol=0, int endcol=-1);
00132 };
00133 
00142 class Character : public KTextEditor::Command
00143 {
00144   public:
00152     bool exec (class KTextEditor::View *view, const QString &cmd, QString &errorMsg);
00153 
00155     bool help (class KTextEditor::View *, const QString &, QString &) { return false; }
00156 
00161     const QStringList &cmds () { static QStringList test("char"); return test; }
00162 };
00163 
00167 class Date : public KTextEditor::Command
00168 {
00169   public:
00177     bool exec (class KTextEditor::View *view, const QString &cmd, QString &errorMsg);
00178 
00180     bool help (class KTextEditor::View *, const QString &, QString &) { return false; }
00181 
00186     const QStringList &cmds () { static QStringList test("date"); return test; }
00187 };
00188 
00189 
00190 } // namespace KateCommands
00191 #endif
00192 
00193 // kate: space-indent on; indent-width 2; replace-tabs on;

Kate

Skip menu "Kate"
  • Main Page
  • 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
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.5.4
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