• Skip to content
  • Skip to link menu
KDE 3.5 API Reference
  • KDE API Reference
  • API Reference
  • 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 "../interfaces/document.h"
00025 #include "../interfaces/view.h"
00026 
00027 class KateDocument;
00028 class KCompletion;
00029 
00030 namespace KateCommands
00031 {
00032 
00039 class CoreCommands : public Kate::Command, public Kate::CommandExtension
00040 {
00041   public:
00049     bool exec( class Kate::View *view, const QString &cmd, QString &errorMsg );
00050 
00051     bool help( class Kate::View *, const QString &, QString & ) {return false;};
00052 
00057     QStringList cmds();
00058 
00062     KCompletion *completionObject( const QString &cmd, Kate::View *view );
00063 };
00064 
00075 class SedReplace : public Kate::Command
00076 {
00077   public:
00085     bool exec (class Kate::View *view, const QString &cmd, QString &errorMsg);
00086 
00087     bool help (class Kate::View *, const QString &, QString &) { return false; };
00088 
00093     QStringList cmds () { QStringList l("s"); l << "%s" << "$s"; return l; };
00094 
00095   private:
00115     static int sedMagic(KateDocument *doc, int &line,
00116                         const QString &find, const QString &replace, const QString &delim,
00117                         bool noCase, bool repeat,
00118                         uint startcol=0, int endcol=-1);
00119 };
00120 
00129 class Character : public Kate::Command
00130 {
00131   public:
00139     bool exec (class Kate::View *view, const QString &cmd, QString &errorMsg);
00140 
00141     bool help (class Kate::View *, const QString &, QString &) { return false; };
00142 
00147     QStringList cmds () { return QStringList("char"); };
00148 };
00149 
00153 class Date : public Kate::Command
00154 {
00155   public:
00163     bool exec (class Kate::View *view, const QString &cmd, QString &errorMsg);
00164 
00165     bool help (class Kate::View *, const QString &, QString &) { return false; };
00166 
00171     QStringList cmds () { return QStringList("date"); };
00172 };
00173 
00174 
00175 } // namespace KateCommands
00176 #endif
00177 
00178 // 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

API Reference

Skip menu "API Reference"
  • dcop
  • DNSSD
  • interfaces
  • Kate
  • kconf_update
  • KDECore
  • KDED
  • kdefx
  • KDEsu
  • kdeui
  • KDocTools
  • KHTML
  • KImgIO
  • KInit
  • kio
  • kioslave
  • KJS
  • KNewStuff
  • KParts
  • KUtils
Generated for API Reference by doxygen 1.5.9
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