summaryrefslogtreecommitdiffstats
path: root/superkaramba/src/datesensor.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:52:55 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:52:55 +0000
commit5f5ee2367157176ed223b86343eb0a9e4022e020 (patch)
tree6a9c87f14ee38e90eff3c77c784f14e4f38fd5a1 /superkaramba/src/datesensor.cpp
parent4facf42feec57b22dcf46badc115ad6c5b5cc512 (diff)
downloadtdeutils-5f5ee2367157176ed223b86343eb0a9e4022e020.tar.gz
tdeutils-5f5ee2367157176ed223b86343eb0a9e4022e020.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeutils@1157653 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'superkaramba/src/datesensor.cpp')
-rw-r--r--superkaramba/src/datesensor.cpp38
1 files changed, 19 insertions, 19 deletions
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 <qapplication.h>
+#include <tqapplication.h>
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: