diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:46:43 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:46:43 +0000 |
commit | ffe8a83e053396df448e9413828527613ca3bd46 (patch) | |
tree | a73d4169e02df4a50f9a12cb165fcd0ab5bac7c6 /interfaces/ktexteditor/templateinterface.cpp | |
parent | 682bf3bfdcbcbb1fca85e8a36ed03e062e0555d5 (diff) | |
download | tdelibs-ffe8a83e053396df448e9413828527613ca3bd46.tar.gz tdelibs-ffe8a83e053396df448e9413828527613ca3bd46.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1157647 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'interfaces/ktexteditor/templateinterface.cpp')
-rw-r--r-- | interfaces/ktexteditor/templateinterface.cpp | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/interfaces/ktexteditor/templateinterface.cpp b/interfaces/ktexteditor/templateinterface.cpp index 3a96a8d5a..4f9f83706 100644 --- a/interfaces/ktexteditor/templateinterface.cpp +++ b/interfaces/ktexteditor/templateinterface.cpp @@ -21,11 +21,11 @@ #include <stdaddressbook.h> #include <addressee.h> #include <addresseedialog.h> -#include <qstring.h> +#include <tqstring.h> #include <klocale.h> #include <kglobal.h> -#include <qdatetime.h> -#include <qregexp.h> +#include <tqdatetime.h> +#include <tqregexp.h> #include <kmessagebox.h> #include <kcalendarsystem.h> #include <unistd.h> @@ -49,7 +49,7 @@ uint TemplateInterface::templateInterfaceNumber () const return myTemplateInterfaceNumber; } -void TemplateInterface::setTemplateInterfaceDCOPSuffix ( const QCString &suffix ) +void TemplateInterface::setTemplateInterfaceDCOPSuffix ( const TQCString &suffix ) {} #define INITKABC do { \ @@ -70,18 +70,18 @@ void TemplateInterface::setTemplateInterfaceDCOPSuffix ( const QCString &suffix } \ } while(false) -bool TemplateInterface::expandMacros( QMap<QString, QString> &map, QWidget *parentWindow ) +bool TemplateInterface::expandMacros( TQMap<TQString, TQString> &map, TQWidget *parentWindow ) { KABC::StdAddressBook *addrBook = 0; KABC::Addressee userAddress; - QDateTime datetime = QDateTime::currentDateTime(); - QDate date = datetime.date(); - QTime time = datetime.time(); + TQDateTime datetime = TQDateTime::currentDateTime(); + TQDate date = datetime.date(); + TQTime time = datetime.time(); - QMap<QString,QString>::Iterator it; + TQMap<TQString,TQString>::Iterator it; for ( it = map.begin(); it != map.end(); ++it ) { - QString placeholder = it.key(); + TQString placeholder = it.key(); if ( map[ placeholder ].isEmpty() ) { if ( placeholder == "index" ) map[ placeholder ] = "i"; @@ -125,11 +125,11 @@ bool TemplateInterface::expandMacros( QMap<QString, QString> &map, QWidget *pare } else if ( placeholder == "month" ) { - map[ placeholder ] = QString::number( KGlobal::locale() ->calendar() ->month( date ) ); + map[ placeholder ] = TQString::number( KGlobal::locale() ->calendar() ->month( date ) ); } else if ( placeholder == "day" ) { - map[ placeholder ] = QString::number( KGlobal::locale() ->calendar() ->day( date ) ); + map[ placeholder ] = TQString::number( KGlobal::locale() ->calendar() ->day( date ) ); } else if ( placeholder == "hostname" ) { @@ -137,7 +137,7 @@ bool TemplateInterface::expandMacros( QMap<QString, QString> &map, QWidget *pare hostname[ 0 ] = 0; gethostname( hostname, 255 ); hostname[ 255 ] = 0; - map[ placeholder ] = QString::fromLocal8Bit( hostname ); + map[ placeholder ] = TQString::fromLocal8Bit( hostname ); } else if ( placeholder == "cursor" ) { @@ -149,11 +149,11 @@ bool TemplateInterface::expandMacros( QMap<QString, QString> &map, QWidget *pare return true; } -bool TemplateInterface::insertTemplateText ( uint line, uint column, const QString &templateString, const QMap<QString, QString> &initialValues, QWidget *parentWindow ) +bool TemplateInterface::insertTemplateText ( uint line, uint column, const TQString &templateString, const TQMap<TQString, TQString> &initialValues, TQWidget *parentWindow ) { - QMap<QString, QString> enhancedInitValues( initialValues ); + TQMap<TQString, TQString> enhancedInitValues( initialValues ); - QRegExp rx( "[$%]\\{([^}\\s]+)\\}" ); + TQRegExp rx( "[$%]\\{([^}\\s]+)\\}" ); rx.setMinimal( true ); int pos = 0; int opos = 0; @@ -172,7 +172,7 @@ bool TemplateInterface::insertTemplateText ( uint line, uint column, const QStri continue; } } - QString placeholder = rx.cap( 1 ); + TQString placeholder = rx.cap( 1 ); if ( ! enhancedInitValues.contains( placeholder ) ) enhancedInitValues[ placeholder ] = ""; |