summaryrefslogtreecommitdiffstats
path: root/kontact/plugins/weather
diff options
context:
space:
mode:
Diffstat (limited to 'kontact/plugins/weather')
-rw-r--r--kontact/plugins/weather/summarywidget.cpp98
-rw-r--r--kontact/plugins/weather/summarywidget.h86
-rw-r--r--kontact/plugins/weather/weather_plugin.cpp4
-rw-r--r--kontact/plugins/weather/weather_plugin.h4
4 files changed, 96 insertions, 96 deletions
diff --git a/kontact/plugins/weather/summarywidget.cpp b/kontact/plugins/weather/summarywidget.cpp
index 04a559ae4..8c1064094 100644
--- a/kontact/plugins/weather/summarywidget.cpp
+++ b/kontact/plugins/weather/summarywidget.cpp
@@ -20,10 +20,10 @@
with any edition of Qt, and distribute the resulting executable,
without including the source code for Qt in the source distribution.
*/
-#include <qimage.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qtooltip.h>
+#include <tqimage.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqtooltip.h>
#include <dcopclient.h>
#include <dcopref.h>
@@ -38,38 +38,38 @@
#include "summarywidget.h"
-SummaryWidget::SummaryWidget( QWidget *parent, const char *name )
+SummaryWidget::SummaryWidget( TQWidget *parent, const char *name )
: Kontact::Summary( parent, name ),
DCOPObject( "WeatherSummaryWidget" ), mProc( 0 )
{
- mLayout = new QVBoxLayout( this, 3, 3 );
+ mLayout = new TQVBoxLayout( this, 3, 3 );
mLayout->setAlignment( Qt::AlignTop );
- QPixmap icon = KGlobal::iconLoader()->loadIcon( "kweather", KIcon::Desktop, KIcon::SizeMedium );
- QWidget *header = createHeader( this, icon, i18n( "Weather Service" ) );
+ TQPixmap icon = KGlobal::iconLoader()->loadIcon( "kweather", KIcon::Desktop, KIcon::SizeMedium );
+ TQWidget *header = createHeader( this, icon, i18n( "Weather Service" ) );
mLayout->addWidget( header );
- QString error;
- QCString appID;
+ TQString error;
+ TQCString appID;
bool serviceAvailable = true;
if ( !kapp->dcopClient()->isApplicationRegistered( "KWeatherService" ) ) {
- if ( KApplication::startServiceByDesktopName( "kweatherservice", QStringList(), &error, &appID ) ) {
- QLabel *label = new QLabel( i18n( "No weather dcop service available;\nyou need KWeather to use this plugin." ), this );
+ if ( KApplication::startServiceByDesktopName( "kweatherservice", TQStringList(), &error, &appID ) ) {
+ TQLabel *label = new TQLabel( i18n( "No weather dcop service available;\nyou need KWeather to use this plugin." ), this );
mLayout->addWidget( label, Qt::AlignHCenter | AlignVCenter );
serviceAvailable = false;
}
}
if ( serviceAvailable ) {
- connectDCOPSignal( 0, 0, "fileUpdate(QString)", "refresh(QString)", false );
- connectDCOPSignal( 0, 0, "stationRemoved(QString)", "stationRemoved(QString)", false );
+ connectDCOPSignal( 0, 0, "fileUpdate(TQString)", "refresh(TQString)", false );
+ connectDCOPSignal( 0, 0, "stationRemoved(TQString)", "stationRemoved(TQString)", false );
DCOPRef dcopCall( "KWeatherService", "WeatherService" );
DCOPReply reply = dcopCall.call( "listStations()", true );
if ( reply.isValid() ) {
mStations = reply;
- connect( &mTimer, SIGNAL( timeout() ), this, SLOT( timeout() ) );
+ connect( &mTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( timeout() ) );
mTimer.start( 0 );
} else {
kdDebug(5602) << "ERROR: dcop reply not valid..." << endl;
@@ -94,19 +94,19 @@ void SummaryWidget::updateView()
}
- QValueList<WeatherData> dataList = mWeatherMap.values();
+ TQValueList<WeatherData> dataList = mWeatherMap.values();
qHeapSort( dataList );
- QValueList<WeatherData>::Iterator it;
+ TQValueList<WeatherData>::Iterator it;
for ( it = dataList.begin(); it != dataList.end(); ++it ) {
- QString cover;
+ TQString cover;
for ( uint i = 0; i < (*it).cover().count(); ++i )
- cover += QString( "- %1\n" ).arg( (*it).cover()[ i ] );
+ cover += TQString( "- %1\n" ).arg( (*it).cover()[ i ] );
- QImage img;
+ TQImage img;
img = (*it).icon();
- QGridLayout *layout = new QGridLayout( mLayout, 3, 3, 3 );
+ TQGridLayout *layout = new TQGridLayout( mLayout, 3, 3, 3 );
mLayouts.append( layout );
KURLLabel* urlLabel = new KURLLabel( this );
@@ -117,20 +117,20 @@ void SummaryWidget::updateView()
urlLabel->setAlignment( AlignTop );
layout->addMultiCellWidget( urlLabel, 0, 1, 0, 0 );
mLabels.append( urlLabel );
- connect ( urlLabel, SIGNAL( leftClickedURL( const QString& ) ),
- this, SLOT( showReport( const QString& ) ) );
+ connect ( urlLabel, TQT_SIGNAL( leftClickedURL( const TQString& ) ),
+ this, TQT_SLOT( showReport( const TQString& ) ) );
- QLabel* label = new QLabel( this );
- label->setText( QString( "%1 (%2)" ).arg( (*it).name() ).arg( (*it).temperature() ) );
- QFont font = label->font();
+ TQLabel* label = new TQLabel( this );
+ label->setText( TQString( "%1 (%2)" ).arg( (*it).name() ).arg( (*it).temperature() ) );
+ TQFont font = label->font();
font.setBold( true );
label->setFont( font );
label->setAlignment( AlignLeft );
layout->addMultiCellWidget( label, 0, 0, 1, 2 );
mLabels.append( label );
- QString labelText;
- labelText = QString( "<b>%1:</b> %2<br>"
+ TQString labelText;
+ labelText = TQString( "<b>%1:</b> %2<br>"
"<b>%3:</b> %4<br>"
"<b>%5:</b> %6" )
.arg( i18n( "Last updated on" ) )
@@ -140,15 +140,15 @@ void SummaryWidget::updateView()
.arg( i18n( "Rel. Humidity" ) )
.arg( (*it).relativeHumidity() );
- QToolTip::add( label, labelText.replace( " ", "&nbsp;" ) );
+ TQToolTip::add( label, labelText.replace( " ", "&nbsp;" ) );
- label = new QLabel( cover, this );
+ label = new TQLabel( cover, this );
label->setAlignment( AlignLeft );
layout->addMultiCellWidget( label, 1, 1, 1, 2 );
mLabels.append( label );
}
- for ( QLabel *label = mLabels.first(); label; label = mLabels.next() )
+ for ( TQLabel *label = mLabels.first(); label; label = mLabels.next() )
label->show();
}
@@ -162,44 +162,44 @@ void SummaryWidget::timeout()
mTimer.start( 15 * 60000 );
}
-void SummaryWidget::refresh( QString station )
+void SummaryWidget::refresh( TQString station )
{
DCOPRef dcopCall( "KWeatherService", "WeatherService" );
- mWeatherMap[ station ].setIcon( dcopCall.call( "currentIcon(QString)", station, true ) );
- mWeatherMap[ station ].setName( dcopCall.call( "stationName(QString)", station, true ) );
- mWeatherMap[ station ].setCover( dcopCall.call( "cover(QString)", station, true ) );
- mWeatherMap[ station ].setDate( dcopCall.call( "date(QString)", station, true ) );
- mWeatherMap[ station ].setTemperature( dcopCall.call( "temperature(QString)", station, true ) );
- mWeatherMap[ station ].setWindSpeed( dcopCall.call( "wind(QString)", station, true ) );
- mWeatherMap[ station ].setRelativeHumidity( dcopCall.call( "relativeHumidity(QString)", station, true ) );
+ mWeatherMap[ station ].setIcon( dcopCall.call( "currentIcon(TQString)", station, true ) );
+ mWeatherMap[ station ].setName( dcopCall.call( "stationName(TQString)", station, true ) );
+ mWeatherMap[ station ].setCover( dcopCall.call( "cover(TQString)", station, true ) );
+ mWeatherMap[ station ].setDate( dcopCall.call( "date(TQString)", station, true ) );
+ mWeatherMap[ station ].setTemperature( dcopCall.call( "temperature(TQString)", station, true ) );
+ mWeatherMap[ station ].setWindSpeed( dcopCall.call( "wind(TQString)", station, true ) );
+ mWeatherMap[ station ].setRelativeHumidity( dcopCall.call( "relativeHumidity(TQString)", station, true ) );
mWeatherMap[ station ].setStationID(station);
updateView();
}
-void SummaryWidget::stationRemoved( QString station )
+void SummaryWidget::stationRemoved( TQString station )
{
mWeatherMap.remove( station );
updateView();
}
-bool SummaryWidget::eventFilter( QObject *obj, QEvent* e )
+bool SummaryWidget::eventFilter( TQObject *obj, TQEvent* e )
{
if ( obj->inherits( "KURLLabel" ) ) {
- if ( e->type() == QEvent::Enter )
+ if ( e->type() == TQEvent::Enter )
emit message(
i18n( "View Weather Report for Station" ) );
- if ( e->type() == QEvent::Leave )
- emit message( QString::null );
+ if ( e->type() == TQEvent::Leave )
+ emit message( TQString::null );
}
return Kontact::Summary::eventFilter( obj, e );
}
-QStringList SummaryWidget::configModules() const
+TQStringList SummaryWidget::configModules() const
{
- return QStringList( "kcmweatherservice.desktop" );
+ return TQStringList( "kcmweatherservice.desktop" );
}
void SummaryWidget::updateSummary( bool )
@@ -207,11 +207,11 @@ void SummaryWidget::updateSummary( bool )
timeout();
}
-void SummaryWidget::showReport( const QString &stationID )
+void SummaryWidget::showReport( const TQString &stationID )
{
mProc = new KProcess;
- QApplication::connect( mProc, SIGNAL( processExited( KProcess* ) ),
- this, SLOT( reportFinished( KProcess* ) ) );
+ TQApplication::connect( mProc, TQT_SIGNAL( processExited( KProcess* ) ),
+ this, TQT_SLOT( reportFinished( KProcess* ) ) );
*mProc << "kweatherreport";
*mProc << stationID;
diff --git a/kontact/plugins/weather/summarywidget.h b/kontact/plugins/weather/summarywidget.h
index 40e0bb705..9af476903 100644
--- a/kontact/plugins/weather/summarywidget.h
+++ b/kontact/plugins/weather/summarywidget.h
@@ -28,12 +28,12 @@
#include <dcopobject.h>
-#include <qmap.h>
-#include <qpixmap.h>
-#include <qptrlist.h>
-#include <qstringlist.h>
-#include <qtimer.h>
-#include <qwidget.h>
+#include <tqmap.h>
+#include <tqpixmap.h>
+#include <tqptrlist.h>
+#include <tqstringlist.h>
+#include <tqtimer.h>
+#include <tqwidget.h>
class KProcess;
@@ -44,44 +44,44 @@ class QVBoxLayout;
class WeatherData
{
public:
- void setIcon( const QPixmap &icon ) { mIcon = icon; }
- QPixmap icon() const { return mIcon; }
+ void setIcon( const TQPixmap &icon ) { mIcon = icon; }
+ TQPixmap icon() const { return mIcon; }
- void setName( const QString &name ) { mName = name; }
- QString name() const { return mName; }
+ void setName( const TQString &name ) { mName = name; }
+ TQString name() const { return mName; }
- void setCover( const QStringList& cover ) { mCover = cover; }
- QStringList cover() const { return mCover; }
+ void setCover( const TQStringList& cover ) { mCover = cover; }
+ TQStringList cover() const { return mCover; }
- void setDate( const QString &date ) { mDate = date; }
- QString date() const { return mDate; }
+ void setDate( const TQString &date ) { mDate = date; }
+ TQString date() const { return mDate; }
- void setTemperature( const QString &temperature ) { mTemperature = temperature; }
- QString temperature() const { return mTemperature; }
+ void setTemperature( const TQString &temperature ) { mTemperature = temperature; }
+ TQString temperature() const { return mTemperature; }
- void setWindSpeed( const QString &windSpeed ) { mWindSpeed = windSpeed; }
- QString windSpeed() const { return mWindSpeed; }
+ void setWindSpeed( const TQString &windSpeed ) { mWindSpeed = windSpeed; }
+ TQString windSpeed() const { return mWindSpeed; }
- void setRelativeHumidity( const QString &relativeHumidity ) { mRelativeHumidity = relativeHumidity; }
- QString relativeHumidity() const { return mRelativeHumidity; }
+ void setRelativeHumidity( const TQString &relativeHumidity ) { mRelativeHumidity = relativeHumidity; }
+ TQString relativeHumidity() const { return mRelativeHumidity; }
- void setStationID( const QString &station ) { mStationID = station;}
- QString stationID() { return mStationID; }
+ void setStationID( const TQString &station ) { mStationID = station;}
+ TQString stationID() { return mStationID; }
bool operator< ( const WeatherData &data )
{
- return ( QString::localeAwareCompare( mName, data.mName ) < 0 );
+ return ( TQString::localeAwareCompare( mName, data.mName ) < 0 );
}
private:
- QPixmap mIcon;
- QString mName;
- QStringList mCover;
- QString mDate;
- QString mTemperature;
- QString mWindSpeed;
- QString mRelativeHumidity;
- QString mStationID;
+ TQPixmap mIcon;
+ TQString mName;
+ TQStringList mCover;
+ TQString mDate;
+ TQString mTemperature;
+ TQString mWindSpeed;
+ TQString mRelativeHumidity;
+ TQString mStationID;
};
class SummaryWidget : public Kontact::Summary, public DCOPObject
@@ -89,33 +89,33 @@ class SummaryWidget : public Kontact::Summary, public DCOPObject
Q_OBJECT
K_DCOP
public:
- SummaryWidget( QWidget *parent, const char *name = 0 );
+ SummaryWidget( TQWidget *parent, const char *name = 0 );
- QStringList configModules() const;
+ TQStringList configModules() const;
void updateSummary( bool force = false );
k_dcop:
- virtual void refresh( QString );
- virtual void stationRemoved( QString );
+ virtual void refresh( TQString );
+ virtual void stationRemoved( TQString );
protected:
- virtual bool eventFilter( QObject *obj, QEvent *e );
+ virtual bool eventFilter( TQObject *obj, TQEvent *e );
private slots:
void updateView();
void timeout();
- void showReport( const QString& );
+ void showReport( const TQString& );
void reportFinished( KProcess* );
private:
- QStringList mStations;
- QMap<QString, WeatherData> mWeatherMap;
- QTimer mTimer;
+ TQStringList mStations;
+ TQMap<TQString, WeatherData> mWeatherMap;
+ TQTimer mTimer;
- QPtrList<QLabel> mLabels;
- QPtrList<QGridLayout> mLayouts;
- QVBoxLayout *mLayout;
+ TQPtrList<TQLabel> mLabels;
+ TQPtrList<TQGridLayout> mLayouts;
+ TQVBoxLayout *mLayout;
KProcess* mProc;
};
diff --git a/kontact/plugins/weather/weather_plugin.cpp b/kontact/plugins/weather/weather_plugin.cpp
index 4c1a91e6e..a3ea74d1e 100644
--- a/kontact/plugins/weather/weather_plugin.cpp
+++ b/kontact/plugins/weather/weather_plugin.cpp
@@ -31,13 +31,13 @@ typedef KGenericFactory< WeatherPlugin, Kontact::Core > WeatherPluginFactory;
K_EXPORT_COMPONENT_FACTORY( libkontact_weatherplugin,
WeatherPluginFactory( "kontact_weatherplugin" ) )
-WeatherPlugin::WeatherPlugin( Kontact::Core *core, const char *name, const QStringList& )
+WeatherPlugin::WeatherPlugin( Kontact::Core *core, const char *name, const TQStringList& )
: Kontact::Plugin( core, core, name ), mAboutData( 0 )
{
setInstance( WeatherPluginFactory::instance() );
}
-Kontact::Summary *WeatherPlugin::createSummaryWidget( QWidget *parentWidget )
+Kontact::Summary *WeatherPlugin::createSummaryWidget( TQWidget *parentWidget )
{
return new SummaryWidget( parentWidget );
}
diff --git a/kontact/plugins/weather/weather_plugin.h b/kontact/plugins/weather/weather_plugin.h
index 637ebea9c..4ab019645 100644
--- a/kontact/plugins/weather/weather_plugin.h
+++ b/kontact/plugins/weather/weather_plugin.h
@@ -28,10 +28,10 @@ class SummaryWidget;
class WeatherPlugin : public Kontact::Plugin
{
public:
- WeatherPlugin( Kontact::Core *core, const char *name, const QStringList& );
+ WeatherPlugin( Kontact::Core *core, const char *name, const TQStringList& );
WeatherPlugin();
- virtual Kontact::Summary *createSummaryWidget( QWidget *parentWidget );
+ virtual Kontact::Summary *createSummaryWidget( TQWidget *parentWidget );
const KAboutData *aboutData();