summaryrefslogtreecommitdiffstats
path: root/kfind/kdatecombo.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:33:34 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:33:34 +0000
commitc663b6440964f6ac48027143ac9e63298991f9d0 (patch)
tree6d8b0c5a5f9db1ee16acf98b1397cea9126b281d /kfind/kdatecombo.cpp
parenta061f7191beebb0e4a3b0c0a7c534ec5f22f2dc7 (diff)
downloadtdebase-c663b6440964f6ac48027143ac9e63298991f9d0.tar.gz
tdebase-c663b6440964f6ac48027143ac9e63298991f9d0.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1157639 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kfind/kdatecombo.cpp')
-rw-r--r--kfind/kdatecombo.cpp44
1 files changed, 22 insertions, 22 deletions
diff --git a/kfind/kdatecombo.cpp b/kfind/kdatecombo.cpp
index c5f9e4553..95e4045ac 100644
--- a/kfind/kdatecombo.cpp
+++ b/kfind/kdatecombo.cpp
@@ -4,7 +4,7 @@
*
***********************************************************************/
-#include <qtimer.h>
+#include <tqtimer.h>
#include <kglobal.h>
#include <klocale.h>
@@ -16,18 +16,18 @@
#include "kdatecombo.moc"
-KDateCombo::KDateCombo(QWidget *parent, const char *name ) : QComboBox(FALSE, parent,name)
+KDateCombo::KDateCombo(TQWidget *parent, const char *name ) : TQComboBox(FALSE, parent,name)
{
- QDate date = QDate::currentDate();
+ TQDate date = TQDate::currentDate();
initObject(date, parent, name);
}
-KDateCombo::KDateCombo(const QDate & date, QWidget *parent, const char *name) : QComboBox(FALSE, parent,name)
+KDateCombo::KDateCombo(const TQDate & date, TQWidget *parent, const char *name) : TQComboBox(FALSE, parent,name)
{
initObject(date, parent, name);
}
-void KDateCombo::initObject(const QDate & date, QWidget *, const char *)
+void KDateCombo::initObject(const TQDate & date, TQWidget *, const char *)
{
clearValidator();
popupFrame = new KPopupFrame(this, "popupFrame");
@@ -38,7 +38,7 @@ void KDateCombo::initObject(const QDate & date, QWidget *, const char *)
popupFrame->setMainWidget(datePicker);
setDate(date);
- connect(datePicker, SIGNAL(dateSelected(QDate)), this, SLOT(dateEnteredEvent(QDate)));
+ connect(datePicker, TQT_SIGNAL(dateSelected(TQDate)), this, TQT_SLOT(dateEnteredEvent(TQDate)));
}
KDateCombo::~KDateCombo()
@@ -47,22 +47,22 @@ KDateCombo::~KDateCombo()
delete popupFrame;
}
-QString KDateCombo::date2String(const QDate & date)
+TQString KDateCombo::date2String(const TQDate & date)
{
return(KGlobal::locale()->formatDate(date, true));
}
-QDate & KDateCombo::string2Date(const QString & str, QDate *qd)
+TQDate & KDateCombo::string2Date(const TQString & str, TQDate *qd)
{
return *qd = KGlobal::locale()->readDate(str);
}
-QDate & KDateCombo::getDate(QDate *currentDate)
+TQDate & KDateCombo::getDate(TQDate *currentDate)
{
return string2Date(currentText(), currentDate);
}
-bool KDateCombo::setDate(const QDate & newDate)
+bool KDateCombo::setDate(const TQDate & newDate)
{
if (newDate.isValid())
{
@@ -74,7 +74,7 @@ bool KDateCombo::setDate(const QDate & newDate)
return FALSE;
}
-void KDateCombo::dateEnteredEvent(QDate newDate)
+void KDateCombo::dateEnteredEvent(TQDate newDate)
{
if (!newDate.isValid())
newDate = datePicker->date();
@@ -82,36 +82,36 @@ void KDateCombo::dateEnteredEvent(QDate newDate)
setDate(newDate);
}
-void KDateCombo::mousePressEvent (QMouseEvent * e)
+void KDateCombo::mousePressEvent (TQMouseEvent * e)
{
- if (e->button() & QMouseEvent::LeftButton)
+ if (e->button() & TQMouseEvent::LeftButton)
{
if (rect().contains( e->pos()))
{
- QDate tempDate;
+ TQDate tempDate;
getDate(& tempDate);
datePicker->setDate(tempDate);
- popupFrame->popup(mapToGlobal(QPoint(0, height())));
+ popupFrame->popup(mapToGlobal(TQPoint(0, height())));
//datePicker->setFocus();
}
}
}
-bool KDateCombo::eventFilter (QObject*, QEvent* e)
+bool KDateCombo::eventFilter (TQObject*, TQEvent* e)
{
- if ( e->type() == QEvent::MouseButtonPress )
+ if ( e->type() == TQEvent::MouseButtonPress )
{
- QMouseEvent *me = (QMouseEvent *)e;
- QPoint p = mapFromGlobal( me->globalPos() );
+ TQMouseEvent *me = (TQMouseEvent *)e;
+ TQPoint p = mapFromGlobal( me->globalPos() );
if (rect().contains( p ) )
{
- QTimer::singleShot(10, this, SLOT(dateEnteredEvent()));
+ TQTimer::singleShot(10, this, TQT_SLOT(dateEnteredEvent()));
return true;
}
}
- else if ( e->type() == QEvent::KeyRelease )
+ else if ( e->type() == TQEvent::KeyRelease )
{
- QKeyEvent *k = (QKeyEvent *)e;
+ TQKeyEvent *k = (TQKeyEvent *)e;
//Press return == pick selected date and close the combo
if((k->key()==Qt::Key_Return)||(k->key()==Qt::Key_Enter))
{