summaryrefslogtreecommitdiffstats
path: root/kworldwatch
diff options
context:
space:
mode:
Diffstat (limited to 'kworldwatch')
-rw-r--r--kworldwatch/about.ui30
-rw-r--r--kworldwatch/applet.cpp14
-rw-r--r--kworldwatch/applet.h3
-rw-r--r--kworldwatch/astro.c14
-rw-r--r--kworldwatch/astro.h2
-rw-r--r--kworldwatch/cities.cpp6
-rw-r--r--kworldwatch/clock.ui34
-rw-r--r--kworldwatch/flags.cpp16
-rw-r--r--kworldwatch/flow.cpp66
-rw-r--r--kworldwatch/flow.h24
-rw-r--r--kworldwatch/main.cpp4
-rw-r--r--kworldwatch/main.h4
-rw-r--r--kworldwatch/maploader.cpp12
-rw-r--r--kworldwatch/mapwidget.cpp32
-rw-r--r--kworldwatch/mapwidget.h5
-rw-r--r--kworldwatch/zoneclock.cpp28
-rw-r--r--kworldwatch/zoneclock.h10
17 files changed, 177 insertions, 127 deletions
diff --git a/kworldwatch/about.ui b/kworldwatch/about.ui
index 9d62a17..22c55dd 100644
--- a/kworldwatch/about.ui
+++ b/kworldwatch/about.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>AboutDialog</class>
-<widget class="QDialog">
+<widget class="TQDialog">
<property name="name">
<cstring>AboutDialog</cstring>
</property>
@@ -28,7 +28,7 @@
<property name="spacing">
<number>6</number>
</property>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
<cstring>Layout1</cstring>
</property>
@@ -42,7 +42,7 @@
<property name="spacing">
<number>6</number>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>PixmapLabel3</cstring>
</property>
@@ -61,7 +61,7 @@
<bool>true</bool>
</property>
</widget>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>TextLabel3</cstring>
</property>
@@ -79,7 +79,7 @@
</widget>
</hbox>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
<cstring>Layout4</cstring>
</property>
@@ -103,14 +103,14 @@
<property name="sizeType">
<enum>Fixed</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>41</width>
<height>31</height>
</size>
</property>
</spacer>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>TextLabel4</cstring>
</property>
@@ -119,7 +119,7 @@
Copyright: (c) 2000 Matthias Hoelzer-Kluepfel</string>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>WordBreak|AlignVCenter|AlignLeft</set>
</property>
<property name="wordwrap" stdset="0">
@@ -127,7 +127,7 @@ Copyright: (c) 2000 Matthias Hoelzer-Kluepfel</string>
</widget>
</hbox>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
<cstring>Layout3</cstring>
</property>
@@ -151,14 +151,14 @@ Copyright: (c) 2000 Matthias Hoelzer-Kluepfel</string>
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>PushButton2</cstring>
</property>
@@ -179,7 +179,7 @@ Copyright: (c) 2000 Matthias Hoelzer-Kluepfel</string>
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>20</height>
@@ -209,9 +209,9 @@ Copyright: (c) 2000 Matthias Hoelzer-Kluepfel</string>
<includes>
<include location="global" impldecl="in declaration">kseparator.h</include>
</includes>
-<slots>
+<Q_SLOTS>
<slot>PushButton2_clicked()</slot>
<slot>accept()</slot>
-</slots>
-<layoutdefaults spacing="6" margin="11"/>
+</Q_SLOTS>
+<tqlayoutdefaults spacing="6" margin="11"/>
</UI>
diff --git a/kworldwatch/applet.cpp b/kworldwatch/applet.cpp
index 09b67c0..6f9615d 100644
--- a/kworldwatch/applet.cpp
+++ b/kworldwatch/applet.cpp
@@ -1,6 +1,6 @@
/*
**
-** Copyright (C) 1998-2001 by Matthias H�lzer-Kl�pfel <[email protected]>
+** Copyright (C) 1998-2001 by Matthias H�lzer-Kl�pfel <[email protected]>
** Maintainence has ceased - send questions to [email protected].
**
*/
@@ -42,20 +42,20 @@
extern "C"
{
- KDE_EXPORT KPanelApplet *init(TQWidget *parent, const TQString& configFile)
+ KDE_EXPORT KPanelApplet *init(TQWidget *tqparent, const TQString& configFile)
{
KGlobal::locale()->insertCatalogue("kworldclock");
KGlobal::locale()->insertCatalogue("timezones"); // For time zone translation
return new KWWApplet(configFile, KPanelApplet::Normal,
0,
- parent, "kwwapplet");
+ tqparent, "kwwapplet");
}
}
KWWApplet::KWWApplet(const TQString& configFile, Type type, int actions,
- TQWidget *parent, const char *name)
- : KPanelApplet(configFile, type, actions, parent, name)
+ TQWidget *tqparent, const char *name)
+ : KPanelApplet(configFile, type, actions, tqparent, name)
{
// make use of the icons installed for ksaferppp
KGlobal::iconLoader()->addAppDir("kworldwatch");
@@ -94,7 +94,7 @@ bool KWWApplet::eventFilter( TQObject *o, TQEvent *e )
{
if ((e->type() == TQEvent::MouseButtonPress) || (e->type() == TQEvent::MouseButtonDblClick))
{
- mousePressEvent(static_cast<TQMouseEvent*>(e));
+ mousePressEvent(TQT_TQMOUSEEVENT(e));
return true;
}
@@ -115,7 +115,7 @@ void KWWApplet::mousePressEvent(TQMouseEvent *e)
clicked = e->type() == TQMouseEvent::MouseButtonDblClick;
}
- if (clicked && e->button() == TQMouseEvent::LeftButton)
+ if (clicked && e->button() == Qt::LeftButton)
{
KRun::run("kworldclock", KURL::List());
}
diff --git a/kworldwatch/applet.h b/kworldwatch/applet.h
index 8d8f90e..0142fc2 100644
--- a/kworldwatch/applet.h
+++ b/kworldwatch/applet.h
@@ -42,11 +42,12 @@ class MapWidget;
class KWWApplet : public KPanelApplet
{
Q_OBJECT
+ TQ_OBJECT
public:
KWWApplet(const TQString& configFile, Type t = Normal, int actions = 0,
- TQWidget *parent = 0, const char *name = 0);
+ TQWidget *tqparent = 0, const char *name = 0);
~KWWApplet();
int widthForHeight(int height) const;
diff --git a/kworldwatch/astro.c b/kworldwatch/astro.c
index 3423119..5d09dcd 100644
--- a/kworldwatch/astro.c
+++ b/kworldwatch/astro.c
@@ -7,7 +7,7 @@
long jdate(struct tm *);
double jtime(struct tm *);
double kepler(double m, double ecc);
-void sunpos(double jd, int apparent, double *ra, double *dec, double *rv, double *slong);
+void sunpos(double jd, int aptqparent, double *ra, double *dec, double *rv, double *slong);
double gmst(double jd);
/* JDATE -- Convert internal GMT date and time to Julian day
@@ -65,19 +65,19 @@ double m, ecc;
/* SUNPOS -- Calculate position of the Sun. JD is the Julian date
of the instant for which the position is desired and
- APPARENT should be nonzero if the apparent position
+ APPARENT should be nonzero if the aptqparent position
(corrected for nutation and aberration) is desired.
The Sun's co-ordinates are returned in RA and DEC,
both specified in degrees (divide RA by 15 to obtain
hours). The radius vector to the Sun in astronomical
units is returned in RV and the Sun's longitude (true
- or apparent, as desired) is returned as degrees in
+ or aptqparent, as desired) is returned as degrees in
SLONG. */
void
-sunpos(jd, apparent, ra, dec, rv, slong)
+sunpos(jd, aptqparent, ra, dec, rv, slong)
double jd;
-int apparent;
+int aptqparent;
double *ra, *dec, *rv, *slong;
{
double t, t2, t3, l, m, e, ea, v, theta, omega,
@@ -119,9 +119,9 @@ double *ra, *dec, *rv, *slong;
eps = 23.452294 - 0.0130125 * t - 0.00000164 * t2 + 0.000000503 * t3;
- /* Corrections for Sun's apparent longitude, if desired. */
+ /* Corrections for Sun's aptqparent longitude, if desired. */
- if (apparent) {
+ if (aptqparent) {
omega = fixangle(259.18 - 1934.142 * t);
theta = theta - 0.00569 - 0.00479 * sin(dtr(omega));
eps += 0.00256 * cos(dtr(omega));
diff --git a/kworldwatch/astro.h b/kworldwatch/astro.h
index 2c6a561..6f39458 100644
--- a/kworldwatch/astro.h
+++ b/kworldwatch/astro.h
@@ -34,7 +34,7 @@
extern "C" {
double jtime(struct tm *t);
double kepler(double m, double ecc);
-void sunpos(double jd, int apparent, double *ra, double *dec, double *rv, double *slong);
+void sunpos(double jd, int aptqparent, double *ra, double *dec, double *rv, double *slong);
void projillum(short *wtab, int xdots, int ydots, double dec);
}
diff --git a/kworldwatch/cities.cpp b/kworldwatch/cities.cpp
index f723e97..a938ab6 100644
--- a/kworldwatch/cities.cpp
+++ b/kworldwatch/cities.cpp
@@ -128,9 +128,9 @@ void CityList::readCityList(const TQString &fname)
if (!c.isEmpty() && !n.isEmpty())
{
double la, lo;
- pos = c.find("+", 1);
+ pos = c.tqfind("+", 1);
if (pos < 0)
- pos = c.find("-", 1);
+ pos = c.tqfind("-", 1);
if (pos > 0)
{
la = coordinate(c.left(pos));
@@ -157,7 +157,7 @@ TQPoint CityList::getPosition(double la, double lo, int w, int h, int offset)
void CityList::paint(TQPainter *p, int width, int height, int offset)
{
- p->setPen(Qt::black);
+ p->setPen(TQt::black);
TQPtrListIterator<City> it(_cities);
for ( ; it.current(); ++it)
diff --git a/kworldwatch/clock.ui b/kworldwatch/clock.ui
index faae5e7..5869fe7 100644
--- a/kworldwatch/clock.ui
+++ b/kworldwatch/clock.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.1" stdsetdef="1">
<class>ClockDialog</class>
-<widget class="QDialog">
+<widget class="TQDialog">
<property name="name">
<cstring>ClockDialog</cstring>
</property>
@@ -28,7 +28,7 @@
<property name="spacing">
<number>6</number>
</property>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
<cstring>Layout5</cstring>
</property>
@@ -42,7 +42,7 @@
<property name="spacing">
<number>6</number>
</property>
- <widget class="QLabel" row="0" column="0">
+ <widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>PixmapLabel1</cstring>
</property>
@@ -71,7 +71,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>20</height>
@@ -88,14 +88,14 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
- <widget class="QLayoutWidget" row="0" column="1" rowspan="2" colspan="1">
+ <widget class="TQLayoutWidget" row="0" column="1" rowspan="2" colspan="1">
<property name="name">
<cstring>Layout2</cstring>
</property>
@@ -109,12 +109,12 @@
<property name="spacing">
<number>6</number>
</property>
- <widget class="QComboBox" row="2" column="1">
+ <widget class="TQComboBox" row="2" column="1">
<property name="name">
<cstring>ClockZone</cstring>
</property>
</widget>
- <widget class="QLabel" row="0" column="0" rowspan="1" colspan="2">
+ <widget class="TQLabel" row="0" column="0" rowspan="1" colspan="2">
<property name="name">
<cstring>TextLabel2</cstring>
</property>
@@ -122,7 +122,7 @@
<string>Please enter the settings for the clock.</string>
</property>
</widget>
- <widget class="QLabel" row="1" column="0">
+ <widget class="TQLabel" row="1" column="0">
<property name="name">
<cstring>TextLabel3</cstring>
</property>
@@ -133,12 +133,12 @@
<cstring>ClockCaption</cstring>
</property>
</widget>
- <widget class="QLineEdit" row="1" column="1">
+ <widget class="TQLineEdit" row="1" column="1">
<property name="name">
<cstring>ClockCaption</cstring>
</property>
</widget>
- <widget class="QLabel" row="2" column="0">
+ <widget class="TQLabel" row="2" column="0">
<property name="name">
<cstring>TextLabel4</cstring>
</property>
@@ -153,7 +153,7 @@
</widget>
</grid>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
<cstring>Layout1</cstring>
</property>
@@ -177,14 +177,14 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>PushButton1</cstring>
</property>
@@ -195,7 +195,7 @@
<bool>true</bool>
</property>
</widget>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>PushButton2</cstring>
</property>
@@ -213,7 +213,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>20</height>
@@ -255,5 +255,5 @@
<includes>
<include location="global" impldecl="in declaration">kseparator.h</include>
</includes>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
</UI>
diff --git a/kworldwatch/flags.cpp b/kworldwatch/flags.cpp
index 273f8a0..7b9899c 100644
--- a/kworldwatch/flags.cpp
+++ b/kworldwatch/flags.cpp
@@ -39,7 +39,7 @@ FlagList::FlagList()
_flags.setAutoDelete(true);
_flagPixmap = TQPixmap(locate("data", "kworldclock/pics/flag.png"));
- _flagMask = TQPixmap(locate("data", "kworldclock/pics/flag-mask.xpm"), 0, TQPixmap::ThresholdDither);
+ _flagMask = TQPixmap(locate("data", "kworldclock/pics/flag-tqmask.xpm"), 0, TQPixmap::ThresholdDither);
_flagMask.setMask(_flagMask.createHeuristicMask());
}
@@ -62,7 +62,7 @@ TQPoint FlagList::getPosition(double la, double lo, int w, int h, int offset)
void FlagList::paint(TQPainter *p, int width, int height, int offset)
{
- p->setPen(Qt::black);
+ p->setPen(TQt::black);
TQPtrListIterator<Flag> it(_flags);
for ( ; it.current(); ++it)
@@ -121,9 +121,9 @@ void FlagList::save(KConfig *config)
int cnt=0;
for ( ; it.current(); ++it)
{
- config->writeEntry(TQString("Flag_%1_Color").arg(cnt), it.current()->color());
- config->writeEntry(TQString("Flag_%1_Latitude").arg(cnt), it.current()->latitude());
- config->writeEntry(TQString("Flag_%1_Longitude").arg(cnt), it.current()->longitude());
+ config->writeEntry(TQString("Flag_%1_Color").tqarg(cnt), it.current()->color());
+ config->writeEntry(TQString("Flag_%1_Latitude").tqarg(cnt), it.current()->latitude());
+ config->writeEntry(TQString("Flag_%1_Longitude").tqarg(cnt), it.current()->longitude());
cnt++;
}
}
@@ -136,9 +136,9 @@ void FlagList::load(KConfig *config)
for (int i=0; i<num; ++i)
{
- addFlag(new Flag(config->readDoubleNumEntry(TQString("Flag_%1_Longitude").arg(i)),
- config->readDoubleNumEntry(TQString("Flag_%1_Latitude").arg(i)),
- config->readColorEntry(TQString("Flag_%1_Color").arg(i))));
+ addFlag(new Flag(config->readDoubleNumEntry(TQString("Flag_%1_Longitude").tqarg(i)),
+ config->readDoubleNumEntry(TQString("Flag_%1_Latitude").tqarg(i)),
+ config->readColorEntry(TQString("Flag_%1_Color").tqarg(i))));
}
}
diff --git a/kworldwatch/flow.cpp b/kworldwatch/flow.cpp
index adce999..c511919 100644
--- a/kworldwatch/flow.cpp
+++ b/kworldwatch/flow.cpp
@@ -1,18 +1,18 @@
/****************************************************************************
** $Id$
**
-** Implementing your own layout: flow example
+** Implementing your own tqlayout: flow example
**
** Copyright (C) 1996 by Trolltech AS. All rights reserved.
**
-** This file is part of an example program for Qt. This example
+** This file is part of an example program for TQt. This example
** program may be used, distributed and modified without limitation.
**
*****************************************************************************/
#include "flow.h"
-class SimpleFlowIterator :public QGLayoutIterator
+class SimpleFlowIterator :public TQGLayoutIterator
{
public:
SimpleFlowIterator( TQPtrList<TQLayoutItem> *l ) :idx(0), list(l) {}
@@ -66,9 +66,9 @@ int SimpleFlow::heightForWidth( int w ) const
return cached_hfw;
}
-void SimpleFlow::addItem( TQLayoutItem *item)
+void SimpleFlow::addItem( QLayoutItem *item)
{
- list.append( item );
+ list.append( TQT_TQLAYOUTITEM(item) );
}
bool SimpleFlow::hasHeightForWidth() const
@@ -76,19 +76,29 @@ bool SimpleFlow::hasHeightForWidth() const
return TRUE;
}
-TQSize SimpleFlow::sizeHint() const
+TQSize SimpleFlow::tqsizeHint() const
{
- return minimumSize();
+ return tqminimumSize();
}
TQSizePolicy::ExpandData SimpleFlow::expanding() const
{
+#ifdef USE_QT4
+ return (Qt::Orientation)TQSizePolicy::NoDirection;
+#else // USE_QT4
return TQSizePolicy::NoDirection;
+#endif // USE_QT4
}
TQLayoutIterator SimpleFlow::iterator()
{
+ // [FIXME]
+#ifdef USE_QT4
+ #warning [FIXME] ContainerAreaLayout iterators may not function correctly under Qt4
+ return TQLayoutIterator(this); // [FIXME]
+#else // USE_QT4
return TQLayoutIterator( new SimpleFlowIterator( &list ) );
+#endif // USE_QT4
}
void SimpleFlow::setGeometry( const TQRect &r )
@@ -106,30 +116,60 @@ int SimpleFlow::doLayout( const TQRect &r, bool testonly )
TQLayoutItem *o;
while ( (o=it.current()) != 0 ) {
++it;
- int nextX = x + o->sizeHint().width() + spacing();
+ int nextX = x + o->tqsizeHint().width() + spacing();
if ( nextX - spacing() > r.right() && h > 0 ) {
x = r.x();
y = y + h + spacing();
- nextX = x + o->sizeHint().width() + spacing();
+ nextX = x + o->tqsizeHint().width() + spacing();
h = 0;
}
if ( !testonly )
- o->setGeometry( TQRect( TQPoint( x, y ), o->sizeHint() ) );
+ o->setGeometry( TQRect( TQPoint( x, y ), o->tqsizeHint() ) );
x = nextX;
- h = QMAX( h, o->sizeHint().height() );
+ h = TQMAX( h, o->tqsizeHint().height() );
}
return y + h - r.y();
}
-TQSize SimpleFlow::minimumSize() const
+TQSize SimpleFlow::tqminimumSize() const
{
TQSize s(0,0);
TQPtrListIterator<TQLayoutItem> it(list);
TQLayoutItem *o;
while ( (o=it.current()) != 0 ) {
++it;
- s = s.expandedTo( o->minimumSize() );
+ s = s.expandedTo( o->tqminimumSize() );
}
return s;
}
+#ifdef USE_QT4
+/*!
+ \reimp
+*/
+int SimpleFlow::count() const {
+ return list.count();
+}
+
+/*!
+ \reimp
+*/
+TQLayoutItem* SimpleFlow::itemAt(int index) const {
+ return index >= 0 && index < list.count() ? (const_cast<TQPtrList<TQLayoutItem>&>(list).tqat(index)) : 0;
+}
+
+/*!
+ \reimp
+*/
+TQLayoutItem* SimpleFlow::takeAt(int index) {
+ if (index < 0 || index >= list.count())
+ return 0;
+ TQLayoutItem *item = list.tqat(index);
+ list.remove(list.tqat(index));
+ delete item;
+
+ invalidate();
+ return item;
+}
+#endif // USE_QT4
+
diff --git a/kworldwatch/flow.h b/kworldwatch/flow.h
index dd0930e..df7f6b3 100644
--- a/kworldwatch/flow.h
+++ b/kworldwatch/flow.h
@@ -1,13 +1,13 @@
/****************************************************************************
** $Id$
**
-** Definition of simple flow layout for custom layout example
+** Definition of simple flow tqlayout for custom tqlayout example
**
** Created : 979899
**
** Copyright (C) 1997 by Trolltech AS. All rights reserved.
**
-** This file is part of an example program for Qt. This example
+** This file is part of an example program for TQt. This example
** program may be used, distributed and modified without limitation.
**
*****************************************************************************/
@@ -18,15 +18,15 @@
#include <tqlayout.h>
#include <tqptrlist.h>
-class SimpleFlow : public QLayout
+class SimpleFlow : public TQLayout
{
public:
- SimpleFlow( TQWidget *parent, int border=0, int space=-1,
+ SimpleFlow( TQWidget *tqparent, int border=0, int space=-1,
const char *name=0 )
- : TQLayout( parent, border, space, name ),
+ : TQLayout( tqparent, border, space, name ),
cached_width(0), cached_hfw(0) {}
- SimpleFlow( TQLayout* parent, int space=-1, const char *name=0 )
- : TQLayout( parent, space, name ),
+ SimpleFlow( TQLayout* tqparent, int space=-1, const char *name=0 )
+ : TQLayout( tqparent, space, name ),
cached_width(0), cached_hfw(0) {}
SimpleFlow( int space=-1, const char *name=0 )
: TQLayout( space, name ),
@@ -34,14 +34,18 @@ public:
~SimpleFlow();
- void addItem( TQLayoutItem *item);
+ void addItem( QLayoutItem *item);
bool hasHeightForWidth() const;
int heightForWidth( int ) const;
- TQSize sizeHint() const;
- TQSize minimumSize() const;
+ TQSize tqsizeHint() const;
+ TQSize tqminimumSize() const;
TQLayoutIterator iterator();
TQSizePolicy::ExpandData expanding() const;
+#ifdef USE_QT4
+ QLAYOUT_REQUIRED_METHOD_DECLARATIONS
+#endif // USE_QT4
+
protected:
void setGeometry( const TQRect& );
diff --git a/kworldwatch/main.cpp b/kworldwatch/main.cpp
index 346a97b..44a6656 100644
--- a/kworldwatch/main.cpp
+++ b/kworldwatch/main.cpp
@@ -48,8 +48,8 @@
#include "zoneclock.h"
-WorldWideWatch::WorldWideWatch(bool restore, TQWidget *parent, const char *name)
- : KMainWindow(parent, name)
+WorldWideWatch::WorldWideWatch(bool restore, TQWidget *tqparent, const char *name)
+ : KMainWindow(tqparent, name)
{
KGlobal::locale()->insertCatalogue("timezones"); // For time zone translation
diff --git a/kworldwatch/main.h b/kworldwatch/main.h
index 48b8860..1eb3d30 100644
--- a/kworldwatch/main.h
+++ b/kworldwatch/main.h
@@ -40,10 +40,11 @@ class ZoneClockPanel;
class WorldWideWatch : public KMainWindow
{
Q_OBJECT
+ TQ_OBJECT
public:
- WorldWideWatch(bool restore=false, TQWidget *parent=0, const char *name=0);
+ WorldWideWatch(bool restore=false, TQWidget *tqparent=0, const char *name=0);
void save(KConfig *config);
void load(KConfig *load);
@@ -71,6 +72,7 @@ private:
class WatchApplication : public KUniqueApplication
{
Q_OBJECT
+ TQ_OBJECT
public:
diff --git a/kworldwatch/maploader.cpp b/kworldwatch/maploader.cpp
index c1e3896..8e1e830 100644
--- a/kworldwatch/maploader.cpp
+++ b/kworldwatch/maploader.cpp
@@ -63,7 +63,7 @@ TQPtrList<MapTheme> MapLoader::themes()
TQStringList MapLoader::maps(const TQString &theme)
{
- return KGlobal::dirs()->findAllResources("data", TQString("kworldclock/maps/%1/*.jpg").arg(theme));
+ return KGlobal::dirs()->findAllResources("data", TQString("kworldclock/maps/%1/*.jpg").tqarg(theme));
}
@@ -75,10 +75,10 @@ void MapLoader::load(unsigned int width, const TQString &theme, unsigned int hei
for (uint i=0; i<files.count(); ++i)
{
TQString f = files[i];
- int pos = f.findRev("/");
+ int pos = f.tqfindRev("/");
if (pos >= 0)
f = f.mid(pos+1);
- pos = f.findRev(".");
+ pos = f.tqfindRev(".");
if (pos >= 0)
f = f.left(pos);
sizes.append(f.toInt());
@@ -101,7 +101,7 @@ void MapLoader::load(unsigned int width, const TQString &theme, unsigned int hei
size = 800;
}
else
- image = TQImage(locate("data", TQString("kworldclock/maps/%1/%2.jpg").arg(theme).arg(size)));
+ image = TQImage(locate("data", TQString("kworldclock/maps/%1/%2.jpg").tqarg(theme).tqarg(size)));
if (height == 0)
height = width/2;
@@ -113,7 +113,7 @@ void MapLoader::load(unsigned int width, const TQString &theme, unsigned int hei
_light.convertFromImage(image);
// calculate dark map
- _dark.convertFromImage(KImageEffect::blend(Qt::black, image, opacity));
+ _dark.convertFromImage(KImageEffect::blend(TQt::black, image, opacity));
}
@@ -140,7 +140,7 @@ TQBitmap MapLoader::darkMask(int width, int height)
projillum(wtab,width,height,sundec);
// draw illumination
- illuMask.fill(Qt::black);
+ illuMask.fill(TQt::black);
TQPainter p;
p.begin(&illuMask);
diff --git a/kworldwatch/mapwidget.cpp b/kworldwatch/mapwidget.cpp
index 73a8739..ef359aa 100644
--- a/kworldwatch/mapwidget.cpp
+++ b/kworldwatch/mapwidget.cpp
@@ -56,8 +56,8 @@
#include "mapwidget.moc"
-MapWidget::MapWidget(bool applet, bool restore, TQWidget *parent, const char *name)
- : TQWidget(parent, name), _loader(), _illumination(true), _cities(true), _flags(true), _cityList(0),
+MapWidget::MapWidget(bool applet, bool restore, TQWidget *tqparent, const char *name)
+ : TQWidget(tqparent, name), _loader(), _illumination(true), _cities(true), _flags(true), _cityList(0),
_applet(applet), _width(0), _height(0)
{
// this ugly construction is necessary so we don't load
@@ -143,7 +143,7 @@ MapWidget::MapWidget(bool applet, bool restore, TQWidget *parent, const char *na
_cityIndicator->setIndent(0);
_cityIndicator->setAutoMask(false);
_cityIndicator->setLineWidth(1);
- _cityIndicator->setAlignment(TQLabel::AlignAuto | TQLabel::AlignTop);
+ _cityIndicator->tqsetAlignment(TQLabel::AlignAuto | TQLabel::AlignTop);
_cityIndicator->setAutoResize(true);
_cityIndicator->setFrameStyle(TQFrame::Box | TQFrame::Plain);
_cityIndicator->setPalette(TQToolTip::palette());
@@ -223,18 +223,18 @@ void MapWidget::addClock()
void MapWidget::addFlag(int index)
{
- TQColor col = Qt::red;
+ TQColor col = TQt::red;
switch (index)
{
case 0:
- col = Qt::red;
+ col = TQt::red;
break;
case 1:
- col = Qt::green;
+ col = TQt::green;
break;
case 2:
- col = Qt::blue;
+ col = TQt::blue;
break;
case 3:
if (KColorDialog::getColor(col, this) != KColorDialog::Accepted)
@@ -262,7 +262,7 @@ void MapWidget::removeFlag()
void MapWidget::removeAllFlags()
{
- if ( KMessageBox::warningContinueCancel( this, i18n( "Do you really want to remove all flags?" ), TQString::null, KStdGuiItem::del() ) == KMessageBox::Continue )
+ if ( KMessageBox::warningContinueCancel( this, i18n( "Do you really want to remove all flags?" ), TQString(), KStdGuiItem::del() ) == KMessageBox::Continue )
_flagList->removeAllFlags();
update();
@@ -353,10 +353,10 @@ void MapWidget::timeout()
TQString MapWidget::cityTime(const TQString &city)
{
TQString result = i18n(city.latin1()); // Time zone translation
- int pos = result.find("/");
+ int pos = result.tqfind("/");
if (pos >= 0)
result = result.mid(pos+1);
- result.replace(TQRegExp("_"), " ");
+ result.tqreplace(TQRegExp("_"), " ");
result.append(": ");
char *initial_TZ = getenv("TZ");
@@ -366,7 +366,7 @@ TQString MapWidget::cityTime(const TQString &city)
time_t t = time(NULL);
TQDateTime dt;
dt.setTime_t(t);
- result.append(TQString("%1, %2").arg(KGlobal::locale()->formatTime(dt.time(), true)).arg(KGlobal::locale()->formatDate(dt.date(), true)));
+ result.append(TQString("%1, %2").tqarg(KGlobal::locale()->formatTime(dt.time(), true)).tqarg(KGlobal::locale()->formatDate(dt.date(), true)));
if (initial_TZ != 0)
setenv("TZ", initial_TZ, 1);
@@ -407,7 +407,7 @@ void MapWidget::themeSelected(int index)
void MapWidget::mousePressEvent(TQMouseEvent *ev)
{
- if (ev->button() == TQMouseEvent::RightButton)
+ if (ev->button() == Qt::RightButton)
{
_flagPos = ev->pos();
_popup->exec(ev->globalPos());
@@ -563,13 +563,13 @@ TQPixmap MapWidget::calculatePixmap()
if (gmt_position >= greenwich)
{
- p.drawPixmap(gmt_position-greenwich, 0, map, 0, 0, map.width()-gmt_position+greenwich);
- p.drawPixmap(0,0, map, map.width()-gmt_position+greenwich, 0, gmt_position-greenwich);
+ p.tqdrawPixmap(gmt_position-greenwich, 0, map, 0, 0, map.width()-gmt_position+greenwich);
+ p.tqdrawPixmap(0,0, map, map.width()-gmt_position+greenwich, 0, gmt_position-greenwich);
}
else
{
- p.drawPixmap(0,0, map, greenwich-gmt_position, 0, map.width()+gmt_position-greenwich);
- p.drawPixmap(map.width()+gmt_position-greenwich, 0, map, 0, 0, greenwich-gmt_position);
+ p.tqdrawPixmap(0,0, map, greenwich-gmt_position, 0, map.width()+gmt_position-greenwich);
+ p.tqdrawPixmap(map.width()+gmt_position-greenwich, 0, map, 0, 0, greenwich-gmt_position);
}
return pm;
diff --git a/kworldwatch/mapwidget.h b/kworldwatch/mapwidget.h
index 1bec4c9..b414c81 100644
--- a/kworldwatch/mapwidget.h
+++ b/kworldwatch/mapwidget.h
@@ -53,13 +53,14 @@ class FlagList;
#include "maploader.h"
-class MapWidget : public QWidget
+class MapWidget : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- MapWidget(bool applet=false, bool restore=false, TQWidget *parent=0, const char *name=0);
+ MapWidget(bool applet=false, bool restore=false, TQWidget *tqparent=0, const char *name=0);
~MapWidget();
void setTheme(const TQString &theme);
diff --git a/kworldwatch/zoneclock.cpp b/kworldwatch/zoneclock.cpp
index a09e6e4..01361cc 100644
--- a/kworldwatch/zoneclock.cpp
+++ b/kworldwatch/zoneclock.cpp
@@ -1,6 +1,6 @@
/*
**
-** Copyright (C) 1998-2001 by Matthias H�lzer-Kl�pfel <[email protected]>
+** Copyright (C) 1998-2001 by Matthias H�lzer-Kl�pfel <[email protected]>
** Maintainence has ceased - send questions to [email protected].
**
*/
@@ -51,8 +51,8 @@
#include "zoneclock.moc"
#include <kdebug.h>
-ZoneClock::ZoneClock(const TQString &zone, const TQString &name, TQWidget *parent, const char *n)
- : TQFrame(parent, n), _zone(zone), _name(name)
+ZoneClock::ZoneClock(const TQString &zone, const TQString &name, TQWidget *tqparent, const char *n)
+ : TQFrame(tqparent, n), _zone(zone), _name(name)
{
setFrameStyle(TQFrame::Panel | TQFrame::Raised);
TQHBoxLayout *hbox = new TQHBoxLayout(this, 2,2);
@@ -63,7 +63,7 @@ ZoneClock::ZoneClock(const TQString &zone, const TQString &name, TQWidget *paren
hbox->addSpacing(4);
_timeLabel = new TQLabel(this);
- hbox->addWidget(_timeLabel, 0, Qt::AlignRight);
+ hbox->addWidget(_timeLabel, 0, TQt::AlignRight);
_popup = new TQPopupMenu(this);
_popup->insertItem(i18n("&Edit..."), this, TQT_SLOT(editClock()));
@@ -122,7 +122,7 @@ void ZoneClock::editClock()
_name = _dlg->ClockCaption->text().append(":");
_nameLabel->setText(_dlg->ClockCaption->text().append(":"));
updateTime();
- layout()->invalidate();
+ tqlayout()->tqinvalidate();
emit changed();
}
@@ -135,7 +135,7 @@ bool ZoneClock::eventFilter(TQObject *obj, TQEvent *ev)
if (ev->type() == TQEvent::MouseButtonPress)
{
TQMouseEvent *e = (TQMouseEvent*)ev;
- if (e->button() == TQMouseEvent::RightButton)
+ if (e->button() == Qt::RightButton)
_popup->exec(e->globalPos());
}
@@ -152,7 +152,7 @@ void ZoneClock::updateTime()
time_t t = time(NULL);
TQDateTime dt;
dt.setTime_t(t);
- _timeLabel->setText(TQString("%1, %2").arg(KGlobal::locale()->formatTime(dt.time(), true)).arg(KGlobal::locale()->formatDate(dt.date(), true)));
+ _timeLabel->setText(TQString("%1, %2").tqarg(KGlobal::locale()->formatTime(dt.time(), true)).tqarg(KGlobal::locale()->formatDate(dt.date(), true)));
if (initial_TZ != 0)
setenv("TZ", initial_TZ, 1);
@@ -162,8 +162,8 @@ void ZoneClock::updateTime()
}
-ZoneClockPanel::ZoneClockPanel(TQWidget *parent, const char *name)
- : TQFrame(parent, name), _dlg(0)
+ZoneClockPanel::ZoneClockPanel(TQWidget *tqparent, const char *name)
+ : TQFrame(tqparent, name), _dlg(0)
{
_flow = new SimpleFlow(this,1,1);
@@ -218,8 +218,8 @@ void ZoneClockPanel::realign()
int w = 0;
TQPtrListIterator<ZoneClock> it(_clocks);
for ( ; it.current(); ++it)
- if (it.current()->sizeHint().width() > w)
- w = it.current()->sizeHint().width();
+ if (it.current()->tqsizeHint().width() > w)
+ w = it.current()->tqsizeHint().width();
it.toFirst();
for ( ; it.current(); ++it)
it.current()->setFixedWidth(w);
@@ -266,8 +266,8 @@ void ZoneClockPanel::save(KConfig *config)
{
TQString n = it.current()->name();
n = n.left(n.length()-1);
- config->writeEntry(TQString("Clock_%1_Name").arg(cnt), n);
- config->writeEntry(TQString("Clock_%1_Zone").arg(cnt), it.current()->zone());
+ config->writeEntry(TQString("Clock_%1_Name").tqarg(cnt), n);
+ config->writeEntry(TQString("Clock_%1_Zone").tqarg(cnt), it.current()->zone());
cnt++;
}
}
@@ -281,7 +281,7 @@ void ZoneClockPanel::load(KConfig *config)
for (int i=0; i<num; ++i)
{
- addClock(config->readEntry(TQString("Clock_%1_Zone").arg(i)), config->readEntry(TQString("Clock_%1_Name").arg(i)));
+ addClock(config->readEntry(TQString("Clock_%1_Zone").tqarg(i)), config->readEntry(TQString("Clock_%1_Name").tqarg(i)));
}
}
diff --git a/kworldwatch/zoneclock.h b/kworldwatch/zoneclock.h
index 0b735bb..92d688e 100644
--- a/kworldwatch/zoneclock.h
+++ b/kworldwatch/zoneclock.h
@@ -43,13 +43,14 @@ class KConfig;
class ClockDialog;
-class ZoneClock : public QFrame
+class ZoneClock : public TQFrame
{
Q_OBJECT
+ TQ_OBJECT
public:
- ZoneClock(const TQString &zone, const TQString &name, TQWidget *parent=0, const char *n=0);
+ ZoneClock(const TQString &zone, const TQString &name, TQWidget *tqparent=0, const char *n=0);
TQString zone() const { return _zone; };
@@ -94,13 +95,14 @@ private:
};
-class ZoneClockPanel : public QFrame
+class ZoneClockPanel : public TQFrame
{
Q_OBJECT
+ TQ_OBJECT
public:
- ZoneClockPanel(TQWidget *parent=0, const char *name=0);
+ ZoneClockPanel(TQWidget *tqparent=0, const char *name=0);
void addClock(const TQString &zone, const TQString &name);