summaryrefslogtreecommitdiffstats
path: root/lib/kotext/TimeFormatWidget.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-25 05:28:35 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-25 05:28:35 +0000
commitf008adb5a77e094eaf6abf3fc0f36958e66896a5 (patch)
tree8e9244c4d4957c36be81e15b566b4aa5ea26c982 /lib/kotext/TimeFormatWidget.cpp
parent1210f27b660efb7b37ff43ec68763e85a403471f (diff)
downloadkoffice-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/TimeFormatWidget.cpp')
-rw-r--r--lib/kotext/TimeFormatWidget.cpp52
1 files changed, 26 insertions, 26 deletions
diff --git a/lib/kotext/TimeFormatWidget.cpp b/lib/kotext/TimeFormatWidget.cpp
index 7479131d..187b2929 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 <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 <kdebug.h>
-#include <qlineedit.h>
+#include <tqlineedit.h>
#include <knuminput.h>
#include <KoVariable.h>
/*
- * 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()