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);
118bool 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) {
248bool TemplateInterface::insertTemplateText ( const Cursor& insertPosition, const QString &templateString, const QMap<QString, QString> &initialValues) {
QString formatDate(const QDate &date, KLocale::DateTimeComponent component, KLocale::DateTimeComponentFormat format=KLocale::DefaultComponentFormat, KLocale::WeekNumberSystem weekNumberSystem=KLocale::DefaultWeekNumber) const
void_function_ptr resolveFunction(const char *name)
QString formatDate(const QDate &date, DateFormat format=LongDate) const
Year
QString formatTime(const QTime &pTime, bool includeSecs=false, bool isDuration=false) const
ShortDate
const KCalendarSystem * calendar() const
LongNumber
static void sorry(QWidget *parent, const QString &text, const QString &caption=QString(), Options options=Notify)
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
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.
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 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
#define kDebug
QString i18n(const char *text)
KLocale * locale()
KGuiItem ok()
const KShortcut & end()
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.