diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-25 05:28:35 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-25 05:28:35 +0000 |
commit | f008adb5a77e094eaf6abf3fc0f36958e66896a5 (patch) | |
tree | 8e9244c4d4957c36be81e15b566b4aa5ea26c982 /lib/kotext/DateFormatWidget.cpp | |
parent | 1210f27b660efb7b37ff43ec68763e85a403471f (diff) | |
download | koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.tar.gz koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.zip |
TQt4 port koffice
This should enable compilation under both Qt3 and Qt4; fixes for any missed components will be forthcoming
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1238284 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'lib/kotext/DateFormatWidget.cpp')
-rw-r--r-- | lib/kotext/DateFormatWidget.cpp | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/lib/kotext/DateFormatWidget.cpp b/lib/kotext/DateFormatWidget.cpp index 444dc583..bff1f86c 100644 --- a/lib/kotext/DateFormatWidget.cpp +++ b/lib/kotext/DateFormatWidget.cpp @@ -1,28 +1,28 @@ #include "timedateformatwidget.h" #include "DateFormatWidget.h" #include "DateFormatWidget.moc" -#include <qdatetime.h> -#include <qcombobox.h> -#include <qcheckbox.h> -#include <qlabel.h> -#include <qbuttongroup.h> -#include <qradiobutton.h> +#include <tqdatetime.h> +#include <tqcombobox.h> +#include <tqcheckbox.h> +#include <tqlabel.h> +#include <tqbuttongroup.h> +#include <tqradiobutton.h> #include <kglobal.h> #include <klocale.h> -#include <qlineedit.h> +#include <tqlineedit.h> #include <kdebug.h> #include <knuminput.h> #include <KoVariable.h> /* - * Constructs a DateFormatWidget which is a child of 'parent', with the + * Constructs a DateFormatWidget which is a child of 'tqparent', with the * name 'name' and widget flags set to 'fl' */ -DateFormatWidget::DateFormatWidget( QWidget* parent, const char* name, WFlags fl ) - : TimeDateFormatWidgetPrototype( parent, name, fl ) +DateFormatWidget::DateFormatWidget( TQWidget* tqparent, const char* name, WFlags fl ) + : TimeDateFormatWidgetPrototype( tqparent, name, fl ) { setCaption( i18n( "DateFormat", "Format of Date Variable" ) ); - QStringList listDateFormat = KoVariableDateFormat::staticTranslatedFormatPropsList(); + TQStringList listDateFormat = KoVariableDateFormat::staticTranslatedFormatPropsList(); combo1->insertStringList(listDateFormat); combo2->insertItem( i18n( "Day")); @@ -52,10 +52,10 @@ DateFormatWidget::DateFormatWidget( QWidget* parent, const char* name, WFlags f label_correction->setText(i18n("Correct in Days")); - connect( CheckBox1, SIGNAL(toggled ( bool )),this,SLOT(slotPersonalizeChanged(bool))); - connect( combo1, SIGNAL(activated ( const QString & )), this, SLOT(slotDefaultValueChanged(const QString &))); - connect( combo1, SIGNAL(textChanged ( const QString & )), this, SLOT(slotDefaultValueChanged(const QString &))); - connect( KIntNumInput1, SIGNAL(valueChanged(int)), this, SLOT( slotOffsetChanged(int))); + connect( CheckBox1, TQT_SIGNAL(toggled ( bool )),this,TQT_SLOT(slotPersonalizeChanged(bool))); + connect( combo1, TQT_SIGNAL(activated ( const TQString & )), this, TQT_SLOT(slotDefaultValueChanged(const TQString &))); + connect( combo1, TQT_SIGNAL(textChanged ( const TQString & )), this, TQT_SLOT(slotDefaultValueChanged(const TQString &))); + connect( KIntNumInput1, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT( slotOffsetChanged(int))); slotPersonalizeChanged(false); } @@ -64,13 +64,13 @@ DateFormatWidget::DateFormatWidget( QWidget* parent, const char* name, WFlags f */ DateFormatWidget::~DateFormatWidget() { - // no need to delete child widgets, Qt does it all for us + // no need to delete child widgets, TQt does it all for us } /* * public slot */ -void DateFormatWidget::slotDefaultValueChanged(const QString & ) +void DateFormatWidget::slotDefaultValueChanged(const TQString & ) { updateLabel(); } @@ -91,7 +91,7 @@ void DateFormatWidget::slotPersonalizeChanged(bool b) void DateFormatWidget::comboActivated() { - QString string=combo2->currentText(); + TQString string=combo2->currentText(); if(string==i18n( "Day")) combo1->lineEdit()->insert("d"); else if(string==i18n( "Day (2 digits)")) @@ -147,29 +147,29 @@ void DateFormatWidget::updateLabel() { KoVariableDateFormat format; format.setFormatProperties( resultString() ); - QDateTime ct = QDateTime::currentDateTime().addDays( correctValue() ); + TQDateTime ct = TQDateTime::tqcurrentDateTime().addDays( correctValue() ); label->setText( format.convert( ct ) ); } -QString DateFormatWidget::resultString() +TQString DateFormatWidget::resultString() { - const QString lookup(combo1->currentText()); - const QStringList listTranslated( KoVariableDateFormat::staticTranslatedFormatPropsList() ); - const int index = listTranslated.findIndex(lookup); + const TQString lookup(combo1->currentText()); + const TQStringList listTranslated( KoVariableDateFormat::staticTranslatedFormatPropsList() ); + const int index = listTranslated.tqfindIndex(lookup); if (index==-1) return (lookup); // Either costum or non-locale // We have now a locale format, so we must "translate" it back; // Lookup untranslated format - const QStringList listRaw( KoVariableDateFormat::staticFormatPropsList() ); + const TQStringList listRaw( KoVariableDateFormat::staticFormatPropsList() ); - QStringList::ConstIterator it( listRaw.at(index) ); + TQStringList::ConstIterator it( listRaw.at(index) ); Q_ASSERT( it != listRaw.end() ); if ( it != listRaw.end() ) return *it; kdError(32500) << "Internal error: could not find correcponding date format: " << lookup << endl; - return QString::null; // Something is wrong, give back a default + return TQString(); // Something is wrong, give back a default } int DateFormatWidget::correctValue() |