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

KDECore

Public Member Functions | Protected Member Functions | List of all members
KCharMacroExpander Class Referenceabstract

#include <KMacroExpanderBase>

Inheritance diagram for KCharMacroExpander:
Inheritance graph
[legend]

Public Member Functions

 KCharMacroExpander (QChar c=QLatin1Char('%'))
 
- Public Member Functions inherited from KMacroExpanderBase
 KMacroExpanderBase (QChar c=QLatin1Char('%'))
 
virtual ~KMacroExpanderBase ()
 
QChar escapeChar () const
 
void expandMacros (QString &str)
 
bool expandMacrosShellQuote (QString &str, int &pos)
 
bool expandMacrosShellQuote (QString &str)
 
void setEscapeChar (QChar c)
 

Protected Member Functions

virtual int expandEscapedMacro (const QString &str, int pos, QStringList &ret)
 
virtual bool expandMacro (QChar chr, QStringList &ret)=0
 
virtual int expandPlainMacro (const QString &str, int pos, QStringList &ret)
 

Detailed Description

Abstract base class for single char macro substitutors.

Use this instead of the functions in the KMacroExpander namespace if speculatively pre-filling the substitution map would be too expensive.

See KWordMacroExpander for a sample application.

Author
Oswald Buddenhagen ossi@.nosp@m.kde..nosp@m.org

Definition at line 253 of file kmacroexpander.h.

Constructor & Destructor Documentation

KCharMacroExpander::KCharMacroExpander ( QChar  c = QLatin1Char('%'))
inlineexplicit

Constructor.

Parameters
cescape char indicating start of macros, or QChar::null for none

Definition at line 260 of file kmacroexpander.h.

Member Function Documentation

int KCharMacroExpander::expandEscapedMacro ( const QString &  str,
int  pos,
QStringList &  ret 
)
protectedvirtual

Not to be called or reimplemented.

Reimplemented from KMacroExpanderBase.

Definition at line 255 of file kmacroexpander.cpp.

virtual bool KCharMacroExpander::expandMacro ( QChar  chr,
QStringList &  ret 
)
protectedpure virtual

Return substitution list ret for single-character macro chr.

Parameters
chrthe macro to expand
retreturn variable reference. It is guaranteed to be empty when expandMacro is entered.
Returns
true iff chr was a recognized macro name
int KCharMacroExpander::expandPlainMacro ( const QString &  str,
int  pos,
QStringList &  ret 
)
protectedvirtual

Not to be called or reimplemented.

Reimplemented from KMacroExpanderBase.

Definition at line 247 of file kmacroexpander.cpp.


The documentation for this class was generated from the following files:
  • kmacroexpander.h
  • kmacroexpander.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:22:12 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KDECore

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

kdelibs API Reference

Skip menu "kdelibs API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

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