summaryrefslogtreecommitdiffstats
path: root/karm/ktimewidget.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:53:50 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:53:50 +0000
commit7be55ffa061c026e35e2d6a0effe1161ddb0d41f (patch)
tree8474f9b444b2756228600050f07a7ff25de532b2 /karm/ktimewidget.cpp
parentf587f20a6d09f1729dd0a8c1cd8ee0110aec7451 (diff)
downloadtdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.tar.gz
tdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1157655 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'karm/ktimewidget.cpp')
-rw-r--r--karm/ktimewidget.cpp42
1 files changed, 21 insertions, 21 deletions
diff --git a/karm/ktimewidget.cpp b/karm/ktimewidget.cpp
index e7040f4f7..9de79d9dd 100644
--- a/karm/ktimewidget.cpp
+++ b/karm/ktimewidget.cpp
@@ -1,11 +1,11 @@
#include <stdlib.h> // abs()
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qlineedit.h>
-#include <qstring.h>
-#include <qvalidator.h>
-#include <qwidget.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqlineedit.h>
+#include <tqstring.h>
+#include <tqvalidator.h>
+#include <tqwidget.h>
#include <klocale.h> // i18n
#include <kglobal.h>
@@ -16,12 +16,12 @@ enum ValidatorType { HOUR, MINUTE };
class TimeValidator : public QValidator
{
public:
- TimeValidator( ValidatorType tp, QWidget *parent=0, const char *name=0)
- : QValidator(parent, name)
+ TimeValidator( ValidatorType tp, TQWidget *parent=0, const char *name=0)
+ : TQValidator(parent, name)
{
_tp = tp;
}
- State validate(QString &str, int &) const
+ State validate(TQString &str, int &) const
{
if (str.isEmpty())
return Acceptable;
@@ -46,26 +46,26 @@ class KarmLineEdit : public QLineEdit
{
public:
- KarmLineEdit( QWidget* parent, const char* name = 0 )
- : QLineEdit( parent, name ) {}
+ KarmLineEdit( TQWidget* parent, const char* name = 0 )
+ : TQLineEdit( parent, name ) {}
protected:
- virtual void keyPressEvent( QKeyEvent *event )
+ virtual void keyPressEvent( TQKeyEvent *event )
{
- QLineEdit::keyPressEvent( event );
+ TQLineEdit::keyPressEvent( event );
if ( text().length() == 2 && !event->text().isEmpty() )
focusNextPrevChild(true);
}
};
-KArmTimeWidget::KArmTimeWidget( QWidget* parent, const char* name )
- : QWidget(parent, name)
+KArmTimeWidget::KArmTimeWidget( TQWidget* parent, const char* name )
+ : TQWidget(parent, name)
{
- QHBoxLayout *layout = new QHBoxLayout(this);
+ TQHBoxLayout *layout = new TQHBoxLayout(this);
- _hourLE = new QLineEdit( this);
+ _hourLE = new TQLineEdit( this);
// 9999 hours > 1 year!
// 999 hours = 41 days (That should be enough ...)
_hourLE->setFixedWidth( fontMetrics().maxWidth() * 3
@@ -77,7 +77,7 @@ KArmTimeWidget::KArmTimeWidget( QWidget* parent, const char* name )
_hourLE->setAlignment( Qt::AlignRight );
- QLabel *hr = new QLabel( i18n( "abbreviation for hours", " hr. " ), this );
+ TQLabel *hr = new TQLabel( i18n( "abbreviation for hours", " hr. " ), this );
layout->addWidget( hr );
_minuteLE = new KarmLineEdit(this);
@@ -91,7 +91,7 @@ KArmTimeWidget::KArmTimeWidget( QWidget* parent, const char* name )
_minuteLE->setMaxLength(2);
_minuteLE->setAlignment( Qt::AlignRight );
- QLabel *min = new QLabel( i18n( "abbreviation for minutes", " min. " ), this );
+ TQLabel *min = new TQLabel( i18n( "abbreviation for minutes", " min. " ), this );
layout->addWidget( min );
layout->addStretch(1);
@@ -100,7 +100,7 @@ KArmTimeWidget::KArmTimeWidget( QWidget* parent, const char* name )
void KArmTimeWidget::setTime( long minutes )
{
- QString dummy;
+ TQString dummy;
long hourpart = labs(minutes) / 60;
long minutepart = labs(minutes) % 60;
@@ -111,7 +111,7 @@ void KArmTimeWidget::setTime( long minutes )
dummy.setNum( minutepart );
if (minutepart < 10 ) {
- dummy = QString::fromLatin1( "0" ) + dummy;
+ dummy = TQString::fromLatin1( "0" ) + dummy;
}
_minuteLE->setText( dummy );
}