KDE 5.0 PyKDE API Reference
  • KDE's Python API
  • Overview
  • PyKDE Home
  • Sitemap
  • Contact Us
 

KCharMacroExpander Class Reference

from PyKDE5.kcoreaddons import *

Inherits: KMacroExpanderBase

Detailed Description

\class KCharMacroExpander kmacroexpander.h <KMacroExpanderBase>

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@kde.org>


Methods

 __init__ (self, QChar c=QLatin1Char('%'))
int expandEscapedMacro (self, QString str, int pos, QStringList ret)
bool expandMacro (self, QChar chr, QStringList ret)
int expandPlainMacro (self, QString str, int pos, QStringList ret)

Method Documentation

__init__ (  self,
QChar  c=QLatin1Char('%')
)

Constructor.

Parameters:
c  escape char indicating start of macros, or QChar.null for none

int expandEscapedMacro (  self,
QString  str,
int  pos,
QStringList  ret
)

Internal:
Not to be called or reimplemented.

bool expandMacro (  self,
QChar  chr,
QStringList  ret
)
Abstract method:
This method is abstract and can be overridden but not called directly.

Return substitution list ret for single-character macro chr.

Parameters:
chr  the macro to expand
ret  return variable reference. It is guaranteed to be empty when expandMacro is entered.

Returns:
true iff chr was a recognized macro name

int expandPlainMacro (  self,
QString  str,
int  pos,
QStringList  ret
)

Internal:
Not to be called or reimplemented.

  • Full Index

Modules

  • karchive
  • kcoreaddons
  • kguiaddons
  • kitemmodels
  • kitemviews
  • kplotting
  • kwidgetsaddons
  • solid
  • sonnet
This documentation is maintained by Simon Edwards.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal