KTextEditor
templateinterface.cpp
Go to the documentation of this file.
66 KMessageBox::sorry(parentWindow,i18n("The template needs information about you, which is stored in your address book.\nHowever, the required plugin could not be loaded.\n\nPlease install the KDEPIM/Kontact package for your system."));
87 map[ placeholder ] = KGlobal::locale() ->calendar() ->formatDate(date, KLocale::Year, KLocale::LongNumber);
118 bool TemplateInterface::KTE_INTERNAL_setupIntialValues(const QString& templateString,QMap<QString,QString> *initialValues)
226 if ( (! enhancedInitValues.contains( placeholder )) || (enhancedInitValues[placeholder]==DUMMY_VALUE) ) {
238 for (QMap<QString,QString>::iterator it=enhancedInitValues.begin();it!=enhancedInitValues.end();++it) {
248 bool TemplateInterface::insertTemplateText ( const Cursor& insertPosition, const QString &templateString, const QMap<QString, QString> &initialValues) {
QString i18n(const char *text)
int indexOf(QChar ch, int from, Qt::CaseSensitivity cs) const
QString cap(int nth) const
static bool expandMacros(QMap< QString, QString > &initialValues, QWidget *parentWindow)
Parses templateString for macros in the form [$%]{NAME} and finds the value corresponding to NAME if ...
Definition: templateinterface.cpp:38
bool contains(const Key &key) const
void setMinimal(bool minimal)
bool contains(const QString &str, Qt::CaseSensitivity cs) const
QTime time() const
QString formatTime(const QTime &pTime, bool includeSecs=false, bool isDuration=false) const
static QDebug kDebug(bool cond, int area=KDE_DEFAULT_DEBUG_AREA)
int matchedLength() const
virtual bool insertTemplateTextImplementation(const Cursor &insertPosition, const QString &templateString, const QMap< QString, QString > &initialValues)=0
You must implement this, it is called by insertTemplateText, after all default values are inserted...
int indexIn(const QString &str, int offset, CaretMode caretMode) const
const KCalendarSystem * calendar() const
QString number(int n, int base)
QString fromLocal8Bit(const char *str, int size)
virtual QString formatDate(const QDate &fromDate, KLocale::DateFormat toFormat=KLocale::LongDate) const
static void sorry(QWidget *parent, const QString &text, const QString &caption=QString(), Options options=Notify)
iterator end()
iterator begin()
bool contains(QChar ch, Qt::CaseSensitivity cs) const
KGuiItem ok()
KLocale * locale()
const Key key(const T &value) const
void_function_ptr resolveFunction(const char *name)
QDateTime currentDateTime()
QString mid(int position, int n) const
QDate date() const
bool insertTemplateText(const Cursor &insertPosition, const QString &templateString, const QMap< QString, QString > &initialValues)
Inserts an interactive ediable template text at line "line", column "col".
Definition: templateinterface.cpp:248
int length() const
QString left(int n) const
QString formatDate(const QDate &date, DateFormat format=LongDate) const
const KShortcut & end()
bool KTE_INTERNAL_setupIntialValues(const QString &templateString, QMap< QString, QString > *initialValues)
DO NOT USE !!!! THIS IS USED INTERNALLY by the interface only !!!!!! Behaviour might change !!!!!!! ...
Definition: templateinterface.cpp:118
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:27:17 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:27:17 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.