From cfc42a28c327b96c6a2afee92af3bac1a479eb8a Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 31 Jul 2010 19:49:52 +0000 Subject: Trinity Qt initial conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdetoys@1157650 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kweather/reportview.cpp | 98 ++++++++++++++++++++++++------------------------- 1 file changed, 49 insertions(+), 49 deletions(-) (limited to 'kweather/reportview.cpp') diff --git a/kweather/reportview.cpp b/kweather/reportview.cpp index af37d9b..5cae65e 100644 --- a/kweather/reportview.cpp +++ b/kweather/reportview.cpp @@ -23,30 +23,30 @@ #include #include -#include -#include -#include +#include +#include +#include #include "reportview.h" #include "weatherservice_stub.h" -reportView::reportView(const QString &reportLocation) - : KDialogBase( (QWidget *)0, "report", false, QString::null, Close ), +reportView::reportView(const TQString &reportLocation) + : KDialogBase( (TQWidget *)0, "report", false, TQString::null, Close ), m_locationCode(reportLocation) { - QVBox *vbox = makeVBoxMainWidget(); + TQVBox *vbox = makeVBoxMainWidget(); m_reportView = new KHTMLPart(vbox, "m_reportView"); KConfig config( "weather_panelappletrc" ); config.setGroup( "General Options" ); - QSize defaultSize( 450, 325 ); + TQSize defaultSize( 450, 325 ); resize( config.readSizeEntry( "reportview_size", &defaultSize ) ); centerOnScreen( this ); m_weatherService = new WeatherService_stub( "KWeatherService", "WeatherService" ); - QPixmap icon = m_weatherService->icon( m_locationCode ); + TQPixmap icon = m_weatherService->icon( m_locationCode ); setIcon( icon ); render(); @@ -55,7 +55,7 @@ reportView::reportView(const QString &reportLocation) reportView::~reportView(){ delete m_weatherService; // we do not have to delete m_reportView because this class is - // the parent of the QVBox, and that is the parent of the KHTMLPart. + // the parent of the TQVBox, and that is the parent of the KHTMLPart. KConfig config( "weather_panelappletrc" ); config.setGroup( "General Options" ); @@ -64,76 +64,76 @@ reportView::~reportView(){ /** Render the document */ void reportView::render(){ - QFont generalFont = KGlobalSettings::generalFont(); - QString fntFamily = generalFont.family(); + TQFont generalFont = KGlobalSettings::generalFont(); + TQString fntFamily = generalFont.family(); int fntSize = generalFont.pointSize(); if (fntSize == -1) - fntSize = QFontInfo(generalFont).pointSize(); - - QString textColor = KGlobalSettings::textColor().name(); - QString baseColor = KGlobalSettings::baseColor().name(); - QColorGroup cg = palette().active(); - QString bgColor = cg.background().name(); - QString hlColor = cg.highlight().name(); - QString hlTextColor = cg.highlightedText().name(); - - QString locationName = m_weatherService->stationName(m_locationCode); - QString countryName = m_weatherService->stationCountry(m_locationCode); - QString temp = m_weatherService->temperature(m_locationCode); - QString dewPoint = m_weatherService->dewPoint( m_locationCode); - QString relHumidity = m_weatherService->relativeHumidity(m_locationCode ); - QString heatIndex = m_weatherService->heatIndex(m_locationCode ); - QString windChill = m_weatherService->windChill(m_locationCode ); - QString pressure = m_weatherService->pressure(m_locationCode ); - QString wind = m_weatherService->wind(m_locationCode ); - QString sunRiseTime = m_weatherService->sunRiseTime(m_locationCode ); - QString sunSetTime = m_weatherService->sunSetTime(m_locationCode ); - QString date = m_weatherService->date(m_locationCode ); - QString icon = m_weatherService->iconFileName(m_locationCode ); - QStringList cover = m_weatherService->cover(m_locationCode ); - QStringList weather = m_weatherService->weather(m_locationCode ); + fntSize = TQFontInfo(generalFont).pointSize(); + + TQString textColor = KGlobalSettings::textColor().name(); + TQString baseColor = KGlobalSettings::baseColor().name(); + TQColorGroup cg = palette().active(); + TQString bgColor = cg.background().name(); + TQString hlColor = cg.highlight().name(); + TQString hlTextColor = cg.highlightedText().name(); + + TQString locationName = m_weatherService->stationName(m_locationCode); + TQString countryName = m_weatherService->stationCountry(m_locationCode); + TQString temp = m_weatherService->temperature(m_locationCode); + TQString dewPoint = m_weatherService->dewPoint( m_locationCode); + TQString relHumidity = m_weatherService->relativeHumidity(m_locationCode ); + TQString heatIndex = m_weatherService->heatIndex(m_locationCode ); + TQString windChill = m_weatherService->windChill(m_locationCode ); + TQString pressure = m_weatherService->pressure(m_locationCode ); + TQString wind = m_weatherService->wind(m_locationCode ); + TQString sunRiseTime = m_weatherService->sunRiseTime(m_locationCode ); + TQString sunSetTime = m_weatherService->sunSetTime(m_locationCode ); + TQString date = m_weatherService->date(m_locationCode ); + TQString icon = m_weatherService->iconFileName(m_locationCode ); + TQStringList cover = m_weatherService->cover(m_locationCode ); + TQStringList weather = m_weatherService->weather(m_locationCode ); setCaption(i18n("Weather Report - %1").arg( locationName ) ); - QString weatherText = "
    \n"; + TQString weatherText = "
      \n"; if ( m_weatherService->stationNeedsMaintenance( m_locationCode ) ) { weatherText += "
    • " + i18n( "Station reports that it needs maintenance" ) + " \n"; } - for (QStringList::const_iterator it = cover.begin(); + for (TQStringList::const_iterator it = cover.begin(); it != cover.end(); ++it) weatherText += "
    • " + *it + "\n"; - for (QStringList::const_iterator it = weather.begin(); + for (TQStringList::const_iterator it = weather.begin(); it != weather.end(); ++it) weatherText += "
    • " + *it + "\n"; weatherText += "
    \n"; - QString contents = + TQString contents = "").arg( QApplication::reverseLayout()?"rtl":"ltr") + + TQString("").arg( TQApplication::reverseLayout()?"rtl":"ltr") + "
    " + i18n( "Weather Report - %1 - %2" ).arg( locationName ).arg( countryName ) + "
    \n"; if ( ! date.isEmpty() ) contents += "
    " + i18n( "Latest data from %1" ).arg(date) + "
    \n"; - contents += QString( + contents += TQString( "" "") .arg(bgColor).arg(KURL(icon).url()).arg(weatherText) + "
    " "%3
    " + - QString("" "" ""; if (!heatIndex.isEmpty()) - contents += QString("").arg(heatIndex); else if (!windChill.isEmpty()) - contents += QString("").arg(windChill); else contents += ""; contents += ""; - contents += QString("" + "") @@ -170,7 +170,7 @@ void reportView::render(){ m_reportView->write( contents ); m_reportView->end(); - QScrollView *view = m_reportView->view(); + TQScrollView *view = m_reportView->view(); kdDebug() << "Size " << view->size().height() << "," << view->size().width() << endl; kdDebug() << "Size " << view->visibleHeight() << "," << view->visibleWidth() << endl; -- cgit v1.2.1
    " + i18n( "Temperature:" ) + TQString("
    " + i18n( "Temperature:" ) + "%1 " + i18n( "Dew Point:" ) @@ -149,16 +149,16 @@ void reportView::render(){ .arg(wind) + " " + contents += TQString("" + i18n( "Heat Index:" ) + "%1" + contents += TQString("" + i18n( "Wind Chill:" ) + "%1  
    " + contents += TQString("
    " + i18n( "Sunrise:" ) + "%1 " + i18n( "Sunset:" ) + "%2