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)
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
QString formatTime(const QTime &pTime, bool includeSecs=false, bool isDuration=false) const
static QDebug kDebug(bool cond, int area=KDE_DEFAULT_DEBUG_AREA)
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...
const KCalendarSystem * calendar() const
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)
KGuiItem ok()
KLocale * locale()
void_function_ptr resolveFunction(const char *name)
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
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-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:31:41 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:31:41 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.