From f008adb5a77e094eaf6abf3fc0f36958e66896a5 Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 25 Jun 2011 05:28:35 +0000 Subject: 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 --- lib/kotext/TimeFormatWidget.cpp | 52 ++++++++++++++++++++--------------------- 1 file changed, 26 insertions(+), 26 deletions(-) (limited to 'lib/kotext/TimeFormatWidget.cpp') diff --git a/lib/kotext/TimeFormatWidget.cpp b/lib/kotext/TimeFormatWidget.cpp index 7479131d6..187b29296 100644 --- a/lib/kotext/TimeFormatWidget.cpp +++ b/lib/kotext/TimeFormatWidget.cpp @@ -1,29 +1,29 @@ #include "timedateformatwidget.h" #include "TimeFormatWidget.h" #include "TimeFormatWidget.moc" -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include #include #include -#include +#include #include #include /* - * Constructs a TimeFormatWidget which is a child of 'parent', with the + * Constructs a TimeFormatWidget which is a child of 'tqparent', with the * name 'name' and widget flags set to 'f' */ -TimeFormatWidget::TimeFormatWidget( QWidget* parent, const char* name, WFlags fl ) - : TimeDateFormatWidgetPrototype( parent, name, fl ) +TimeFormatWidget::TimeFormatWidget( TQWidget* tqparent, const char* name, WFlags fl ) + : TimeDateFormatWidgetPrototype( tqparent, name, fl ) { setCaption( i18n( "TimeFormat", "This Dialog Allows You to Set the Format of the Time Variable" ) ); - QStringList listTimeFormat = KoVariableTimeFormat::staticTranslatedFormatPropsList(); + TQStringList listTimeFormat = KoVariableTimeFormat::staticTranslatedFormatPropsList(); combo1->insertStringList(listTimeFormat); combo2->insertItem( i18n( "Hour" ) ); @@ -38,10 +38,10 @@ TimeFormatWidget::TimeFormatWidget( QWidget* parent, const char* name, WFlags f combo2->setCurrentItem( 0 ); label_correction->setText(i18n("Correct in Minutes")); - 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); } @@ -50,13 +50,13 @@ TimeFormatWidget::TimeFormatWidget( QWidget* parent, const char* name, WFlags f */ TimeFormatWidget::~TimeFormatWidget() { - // 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 TimeFormatWidget::slotDefaultValueChanged(const QString & ) +void TimeFormatWidget::slotDefaultValueChanged(const TQString & ) { updateLabel(); } @@ -77,7 +77,7 @@ void TimeFormatWidget::slotPersonalizeChanged(bool b) void TimeFormatWidget::comboActivated() { - QString string=combo2->currentText(); + TQString string=combo2->currentText(); if(string==i18n("Hour")) combo1->lineEdit()->insert("h"); else if(string==i18n("Hour (2 digits)")) @@ -108,29 +108,29 @@ void TimeFormatWidget::updateLabel() KoVariableTimeFormat format; format.setFormatProperties( resultString() ); - QTime ct = QTime::currentTime().addSecs(correctValue()); // ### TODO: dialog says correct in *minutes* + TQTime ct = TQTime::currentTime().addSecs(correctValue()); // ### TODO: dialog says correct in *minutes* label->setText( format.convert( ct ) ); } -QString TimeFormatWidget::resultString() +TQString TimeFormatWidget::resultString() { - const QString lookup(combo1->currentText()); - const QStringList listTranslated( KoVariableTimeFormat::staticTranslatedFormatPropsList() ); - const int index = listTranslated.findIndex(lookup); + const TQString lookup(combo1->currentText()); + const TQStringList listTranslated( KoVariableTimeFormat::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( KoVariableTimeFormat::staticFormatPropsList() ); + const TQStringList listRaw( KoVariableTimeFormat::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 time format: " << lookup << endl; - return QString::null; // Something is wrong, give back a default + return TQString(); // Something is wrong, give back a default } int TimeFormatWidget::correctValue() -- cgit v1.2.3