From 5f5ee2367157176ed223b86343eb0a9e4022e020 Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 31 Jul 2010 19:52:55 +0000 Subject: Trinity Qt initial conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeutils@1157653 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- superkaramba/src/datesensor.cpp | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) (limited to 'superkaramba/src/datesensor.cpp') diff --git a/superkaramba/src/datesensor.cpp b/superkaramba/src/datesensor.cpp index 186f552..6ca4e20 100644 --- a/superkaramba/src/datesensor.cpp +++ b/superkaramba/src/datesensor.cpp @@ -9,7 +9,7 @@ ***************************************************************************/ #include "datesensor.h" -#include +#include DateSensor::DateSensor( int interval ) : Sensor( interval ) { hidden = true; @@ -20,12 +20,12 @@ DateSensor::~DateSensor() void DateSensor::update() { - QDateTime qdt = QDateTime::currentDateTime(); - QString format; + TQDateTime qdt = TQDateTime::currentDateTime(); + TQString format; SensorParams *sp; Meter *meter; - QObjectListIt it( *objList ); + TQObjectListIt it( *objList ); while (it != 0) { sp = (SensorParams*)(*it); @@ -48,11 +48,11 @@ void DateSensor::slotCalendarDeleted() } -DatePicker::DatePicker(QWidget *parent) - : QVBox( parent, 0, WType_TopLevel | WDestructiveClose | +DatePicker::DatePicker(TQWidget *parent) + : TQVBox( parent, 0, WType_TopLevel | WDestructiveClose | WStyle_Customize | WStyle_StaysOnTop | WStyle_NoBorder ) { - setFrameStyle( QFrame::PopupPanel | QFrame::Raised ); + setFrameStyle( TQFrame::PopupPanel | TQFrame::Raised ); //KWin::setOnAllDesktops( handle(), true ); picker = new KDatePicker(this); picker->setCloseButton(true); @@ -62,24 +62,24 @@ DatePicker::DatePicker(QWidget *parent) //setIcon(SmallIcon("date")); } -void DatePicker::keyReleaseEvent(QKeyEvent *e) +void DatePicker::keyReleaseEvent(TQKeyEvent *e) { - QVBox::keyReleaseEvent(e); + TQVBox::keyReleaseEvent(e); if (e->key() == Qt::Key_Escape) close(); } -void DateSensor::toggleCalendar(QMouseEvent *ev) +void DateSensor::toggleCalendar(TQMouseEvent *ev) { - QObjectListIt it(*objList); + TQObjectListIt it(*objList); while (it != 0) { SensorParams *sp = (SensorParams*)(*it); Meter *meter = sp->getMeter(); - QString width = sp->getParam("CALWIDTH"); - QString height = sp->getParam("CALHEIGHT"); + TQString width = sp->getParam("CALWIDTH"); + TQString height = sp->getParam("CALHEIGHT"); - QRect rect(meter->getX(),meter->getY(),width.toInt(), height.toInt()); + TQRect rect(meter->getX(),meter->getY(),width.toInt(), height.toInt()); if (rect.contains( ev->x(), ev->y() )) { if (hidden) @@ -87,14 +87,14 @@ void DateSensor::toggleCalendar(QMouseEvent *ev) hidden = false; cal = new DatePicker(0); - connect(cal, SIGNAL(destroyed()), SLOT(slotCalendarDeleted())); - QPoint c = (QPoint(ev->x(), ev->y())); + connect(cal, TQT_SIGNAL(destroyed()), TQT_SLOT(slotCalendarDeleted())); + TQPoint c = (TQPoint(ev->x(), ev->y())); int w = cal->sizeHint().width(); int h = cal->sizeHint().height(); // make calendar fully visible - QRect deskR = QApplication::desktop()->screenGeometry(QApplication::desktop()->screenNumber(c)); + TQRect deskR = TQApplication::desktop()->screenGeometry(TQApplication::desktop()->screenNumber(c)); if (c.y()+h > deskR.bottom()) c.setY(deskR.bottom()-h-1); @@ -113,11 +113,11 @@ void DateSensor::toggleCalendar(QMouseEvent *ev) } } -void DateSensor::mousePressEvent(QMouseEvent *ev) +void DateSensor::mousePressEvent(TQMouseEvent *ev) { switch (ev->button()) { - case QMouseEvent::LeftButton: + case TQMouseEvent::LeftButton: toggleCalendar(ev); break; default: -- cgit v1.2.1