From c663b6440964f6ac48027143ac9e63298991f9d0 Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 31 Jul 2010 19:33:34 +0000 Subject: Trinity Qt initial conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1157639 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kicker/applets/clock/clock.cpp | 332 ++++++++++++++++++------------------ kicker/applets/clock/clock.h | 120 ++++++------- kicker/applets/clock/datepicker.cpp | 20 +-- kicker/applets/clock/datepicker.h | 14 +- kicker/applets/clock/zone.cpp | 38 ++--- kicker/applets/clock/zone.h | 14 +- 6 files changed, 269 insertions(+), 269 deletions(-) (limited to 'kicker/applets/clock') diff --git a/kicker/applets/clock/clock.cpp b/kicker/applets/clock/clock.cpp index 19e91be5c..7bc46afa4 100644 --- a/kicker/applets/clock/clock.cpp +++ b/kicker/applets/clock/clock.cpp @@ -25,17 +25,17 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -68,7 +68,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. extern "C" { - KDE_EXPORT KPanelApplet* init(QWidget *parent, const QString& configFile) + KDE_EXPORT KPanelApplet* init(TQWidget *parent, const TQString& configFile) { KGlobal::locale()->insertCatalogue("clockapplet"); KGlobal::locale()->insertCatalogue("timezones"); // For time zone translations @@ -79,7 +79,7 @@ extern "C" // Settings -KConfigDialogSingle::KConfigDialogSingle(Zone *zone, QWidget *parent, +KConfigDialogSingle::KConfigDialogSingle(Zone *zone, TQWidget *parent, const char *name, Prefs * prefs, KDialogBase::DialogType dialogType, bool modal) : @@ -95,7 +95,7 @@ KConfigDialogSingle::KConfigDialogSingle(Zone *zone, QWidget *parent, setIcon(SmallIcon("date")); settings = new SettingsWidgetImp(prefs, zone, 0, "General"); - connect(settings->kcfg_Type, SIGNAL(activated(int)), SLOT(selectPage(int))); + connect(settings->kcfg_Type, TQT_SIGNAL(activated(int)), TQT_SLOT(selectPage(int))); settings->kcfg_PlainBackgroundColor->setDefaultColor(KApplication::palette().active().background()); settings->kcfg_DateBackgroundColor->setDefaultColor(KApplication::palette().active().background()); @@ -115,26 +115,26 @@ KConfigDialogSingle::KConfigDialogSingle(Zone *zone, QWidget *parent, settings->widgetStack->addWidget(fuzzyPage, 3); fuzzyPage->kcfg_FuzzyBackgroundColor->setDefaultColor(KApplication::palette().active().background()); - connect(settings->kcfg_PlainShowDate, SIGNAL(toggled(bool)), - SLOT(dateToggled())); - connect(settings->kcfg_PlainShowDayOfWeek, SIGNAL(toggled(bool)), - SLOT(dateToggled())); - connect(digitalPage->kcfg_DigitalShowDate, SIGNAL(toggled(bool)), - SLOT(dateToggled())); - connect(digitalPage->kcfg_DigitalShowDayOfWeek, SIGNAL(toggled(bool)), - SLOT(dateToggled())); - connect(digitalPage->kcfg_DigitalShowDate, SIGNAL(toggled(bool)), - SLOT(dateToggled())); - connect(analogPage->kcfg_AnalogShowDate, SIGNAL(toggled(bool)), - SLOT(dateToggled())); - connect(analogPage->kcfg_AnalogShowDayOfWeek, SIGNAL(toggled(bool)), - SLOT(dateToggled())); - connect(fuzzyPage->kcfg_FuzzyShowDate, SIGNAL(toggled(bool)), - SLOT(dateToggled())); - connect(fuzzyPage->kcfg_FuzzyShowDayOfWeek, SIGNAL(toggled(bool)), - SLOT(dateToggled())); - - addPage(settings, i18n("General"), QString::fromLatin1("package_settings")); + connect(settings->kcfg_PlainShowDate, TQT_SIGNAL(toggled(bool)), + TQT_SLOT(dateToggled())); + connect(settings->kcfg_PlainShowDayOfWeek, TQT_SIGNAL(toggled(bool)), + TQT_SLOT(dateToggled())); + connect(digitalPage->kcfg_DigitalShowDate, TQT_SIGNAL(toggled(bool)), + TQT_SLOT(dateToggled())); + connect(digitalPage->kcfg_DigitalShowDayOfWeek, TQT_SIGNAL(toggled(bool)), + TQT_SLOT(dateToggled())); + connect(digitalPage->kcfg_DigitalShowDate, TQT_SIGNAL(toggled(bool)), + TQT_SLOT(dateToggled())); + connect(analogPage->kcfg_AnalogShowDate, TQT_SIGNAL(toggled(bool)), + TQT_SLOT(dateToggled())); + connect(analogPage->kcfg_AnalogShowDayOfWeek, TQT_SIGNAL(toggled(bool)), + TQT_SLOT(dateToggled())); + connect(fuzzyPage->kcfg_FuzzyShowDate, TQT_SIGNAL(toggled(bool)), + TQT_SLOT(dateToggled())); + connect(fuzzyPage->kcfg_FuzzyShowDayOfWeek, TQT_SIGNAL(toggled(bool)), + TQT_SLOT(dateToggled())); + + addPage(settings, i18n("General"), TQString::fromLatin1("package_settings")); } void KConfigDialogSingle::updateSettings() @@ -155,7 +155,7 @@ void KConfigDialogSingle::updateWidgetsDefault() item->swapDefault(); // This is ugly, but kcfg_Type does not have its correct setting // at this point in time. - QTimer::singleShot(0, this, SLOT(dateToggled())); + TQTimer::singleShot(0, this, TQT_SLOT(dateToggled())); } void KConfigDialogSingle::selectPage(int p) @@ -190,7 +190,7 @@ void KConfigDialogSingle::dateToggled() settings->dateBox->setEnabled(showDate); } -SettingsWidgetImp::SettingsWidgetImp(Prefs *p, Zone *z, QWidget* parent, const char* name, WFlags fl) : +SettingsWidgetImp::SettingsWidgetImp(Prefs *p, Zone *z, TQWidget* parent, const char* name, WFlags fl) : SettingsWidget(parent, name, fl), prefs(p), zone(z) { zone->readZoneList(tzListView); @@ -217,8 +217,8 @@ ClockWidget::~ClockWidget() //************************************************************ -PlainClock::PlainClock(ClockApplet *applet, Prefs *prefs, QWidget *parent, const char *name) - : QLabel(parent, name), ClockWidget(applet, prefs) +PlainClock::PlainClock(ClockApplet *applet, Prefs *prefs, TQWidget *parent, const char *name) + : TQLabel(parent, name), ClockWidget(applet, prefs) { setWFlags(WNoAutoErase); setBackgroundOrigin(AncestorOrigin); @@ -229,7 +229,7 @@ PlainClock::PlainClock(ClockApplet *applet, Prefs *prefs, QWidget *parent, const int PlainClock::preferedWidthForHeight(int ) const { - QString maxLengthTime = KGlobal::locale()->formatTime( QTime( 23, 59 ), _prefs->plainShowSeconds()); + TQString maxLengthTime = KGlobal::locale()->formatTime( TQTime( 23, 59 ), _prefs->plainShowSeconds()); return fontMetrics().width( maxLengthTime ) + 8; } @@ -242,7 +242,7 @@ int PlainClock::preferedHeightForWidth(int /*w*/) const void PlainClock::updateClock() { - QString newStr = KGlobal::locale()->formatTime(_applet->clockGetTime(), _prefs->plainShowSeconds()); + TQString newStr = KGlobal::locale()->formatTime(_applet->clockGetTime(), _prefs->plainShowSeconds()); if (_force || newStr != _timeStr) { _timeStr = newStr; @@ -268,10 +268,10 @@ bool PlainClock::showDayOfWeek() return _prefs->plainShowDayOfWeek(); } -void PlainClock::paintEvent(QPaintEvent *) +void PlainClock::paintEvent(TQPaintEvent *) { - QPainter p; - QPixmap buf(size()); + TQPainter p; + TQPixmap buf(size()); buf.fill(this, 0, 0); p.begin(&buf); p.setFont(font()); @@ -284,9 +284,9 @@ void PlainClock::paintEvent(QPaintEvent *) p.end(); } -void PlainClock::drawContents(QPainter *p) +void PlainClock::drawContents(TQPainter *p) { - QRect tr(0, 0, width(), height()); + TQRect tr(0, 0, width(), height()); if (!KickerSettings::transparent()) p->drawText(tr, AlignCenter, _timeStr); @@ -297,8 +297,8 @@ void PlainClock::drawContents(QPainter *p) //************************************************************ -DigitalClock::DigitalClock(ClockApplet *applet, Prefs *prefs, QWidget *parent, const char *name) - : QLCDNumber(parent, name), ClockWidget(applet, prefs) +DigitalClock::DigitalClock(ClockApplet *applet, Prefs *prefs, TQWidget *parent, const char *name) + : TQLCDNumber(parent, name), ClockWidget(applet, prefs) { setWFlags(WNoAutoErase); setBackgroundOrigin(AncestorOrigin); @@ -331,16 +331,16 @@ int DigitalClock::preferedHeightForWidth(int w) const void DigitalClock::updateClock() { static bool colon = true; - QString newStr; - QTime t(_applet->clockGetTime()); + TQString newStr; + TQTime t(_applet->clockGetTime()); int h = t.hour(); int m = t.minute(); int s = t.second(); - QString format("%02d"); + TQString format("%02d"); - QString sep(!colon && _prefs->digitalBlink() ? " " : ":"); + TQString sep(!colon && _prefs->digitalBlink() ? " " : ":"); if (_prefs->digitalShowSeconds()) format += sep + "%02d"; @@ -378,19 +378,19 @@ void DigitalClock::loadSettings() { setFrameStyle(_prefs->digitalShowFrame() ? Panel | Sunken : NoFrame); setMargin( 4 ); - setSegmentStyle(QLCDNumber::Flat); + setSegmentStyle(TQLCDNumber::Flat); if (_prefs->digitalLCDStyle()) lcdPattern = KIconLoader("clockapplet").loadIcon("lcd", KIcon::User); setNumDigits(_prefs->digitalShowSeconds() ? 8:5); - _buffer = new QPixmap(width(), height()); + _buffer = new TQPixmap(width(), height()); } -void DigitalClock::paintEvent(QPaintEvent*) +void DigitalClock::paintEvent(TQPaintEvent*) { - QPainter p(_buffer); + TQPainter p(_buffer); if (_prefs->digitalLCDStyle()) { @@ -403,7 +403,7 @@ void DigitalClock::paintEvent(QPaintEvent*) } else if (paletteBackgroundPixmap()) { - QPoint offset = backgroundOffset(); + TQPoint offset = backgroundOffset(); p.drawTiledPixmap(0, 0, width(), height(), *paletteBackgroundPixmap(), offset.x(), offset.y()); } else @@ -424,34 +424,34 @@ void DigitalClock::paintEvent(QPaintEvent*) // yes, the colors for the lcd-lock are hardcoded, // but other colors would break the lcd-lock anyway -void DigitalClock::drawContents( QPainter * p) +void DigitalClock::drawContents( TQPainter * p) { setUpdatesEnabled( FALSE ); - QPalette pal = palette(); + TQPalette pal = palette(); if (_prefs->digitalLCDStyle()) - pal.setColor( QColorGroup::Foreground, QColor(128,128,128)); + pal.setColor( TQColorGroup::Foreground, TQColor(128,128,128)); else - pal.setColor( QColorGroup::Foreground, _prefs->digitalShadowColor()); + pal.setColor( TQColorGroup::Foreground, _prefs->digitalShadowColor()); setPalette( pal ); p->translate( +1, +1 ); - QLCDNumber::drawContents( p ); + TQLCDNumber::drawContents( p ); if (_prefs->digitalLCDStyle()) - pal.setColor( QColorGroup::Foreground, Qt::black); + pal.setColor( TQColorGroup::Foreground, Qt::black); else - pal.setColor( QColorGroup::Foreground, _prefs->digitalForegroundColor()); + pal.setColor( TQColorGroup::Foreground, _prefs->digitalForegroundColor()); setPalette( pal ); p->translate( -2, -2 ); setUpdatesEnabled( TRUE ); - QLCDNumber::drawContents( p ); + TQLCDNumber::drawContents( p ); p->translate( +1, +1 ); } // reallocate buffer pixmap -void DigitalClock::resizeEvent ( QResizeEvent *) +void DigitalClock::resizeEvent ( TQResizeEvent *) { delete _buffer; - _buffer = new QPixmap( width(), height() ); + _buffer = new TQPixmap( width(), height() ); } @@ -469,8 +469,8 @@ bool DigitalClock::showDayOfWeek() //************************************************************ -AnalogClock::AnalogClock(ClockApplet *applet, Prefs *prefs, QWidget *parent, const char *name) - : QFrame(parent, name), ClockWidget(applet, prefs), _spPx(NULL) +AnalogClock::AnalogClock(ClockApplet *applet, Prefs *prefs, TQWidget *parent, const char *name) + : TQFrame(parent, name), ClockWidget(applet, prefs), _spPx(NULL) { setWFlags(WNoAutoErase); setBackgroundOrigin(AncestorOrigin); @@ -495,8 +495,8 @@ void AnalogClock::initBackgroundPixmap() { //make a scaled pixmap -- so when image is reduced it'll look "OK". _bgScale = _prefs->analogAntialias()+1; - QImage bgImage = KIconLoader("clockapplet").loadIcon("lcd", KIcon::User).convertToImage(); - lcdPattern = QPixmap(bgImage.scale(bgImage.width() * _bgScale, + TQImage bgImage = KIconLoader("clockapplet").loadIcon("lcd", KIcon::User).convertToImage(); + lcdPattern = TQPixmap(bgImage.scale(bgImage.width() * _bgScale, bgImage.height() * _bgScale)); } @@ -528,13 +528,13 @@ void AnalogClock::loadSettings() setFrameStyle(_prefs->analogShowFrame() ? Panel | Sunken : NoFrame); _time = _applet->clockGetTime(); - _spPx = new QPixmap(size().width() * _prefs->analogAntialias()+1, + _spPx = new TQPixmap(size().width() * _prefs->analogAntialias()+1, size().height() * _prefs->analogAntialias()+1); update(); } -void AnalogClock::paintEvent( QPaintEvent * ) +void AnalogClock::paintEvent( TQPaintEvent * ) { if ( !isVisible() ) return; @@ -547,10 +547,10 @@ void AnalogClock::paintEvent( QPaintEvent * ) (spHeight != _spPx->size().height())) { delete _spPx; - _spPx = new QPixmap(spWidth, spHeight); + _spPx = new TQPixmap(spWidth, spHeight); } - QPainter paint; + TQPainter paint; paint.begin(_spPx); if (_prefs->analogLCDStyle()) @@ -570,12 +570,12 @@ void AnalogClock::paintEvent( QPaintEvent * ) } else if (paletteBackgroundPixmap()) { - QPixmap bg(width(), height()); - QPainter p(&bg); - QPoint offset = backgroundOffset(); + TQPixmap bg(width(), height()); + TQPainter p(&bg); + TQPoint offset = backgroundOffset(); p.drawTiledPixmap(0, 0, width(), height(), *paletteBackgroundPixmap(), offset.x(), offset.y()); p.end(); - QImage bgImage = bg.convertToImage().scale(spWidth, spHeight); + TQImage bgImage = bg.convertToImage().scale(spWidth, spHeight); paint.drawImage(0, 0, bgImage); } else @@ -583,26 +583,26 @@ void AnalogClock::paintEvent( QPaintEvent * ) _spPx->fill(_prefs->analogBackgroundColor()); } - QPointArray pts; - QPoint cp(spWidth / 2, spHeight / 2); + TQPointArray pts; + TQPoint cp(spWidth / 2, spHeight / 2); int d = KMIN(spWidth,spHeight) - (10 * aaFactor); if (_prefs->analogLCDStyle()) { - paint.setPen( QPen(QColor(100,100,100), aaFactor) ); - paint.setBrush( QColor(100,100,100) ); + paint.setPen( TQPen(TQColor(100,100,100), aaFactor) ); + paint.setBrush( TQColor(100,100,100) ); } else { - paint.setPen( QPen(_prefs->analogShadowColor(), aaFactor) ); + paint.setPen( TQPen(_prefs->analogShadowColor(), aaFactor) ); paint.setBrush( _prefs->analogShadowColor() ); } paint.setViewport(2,2,spWidth,spHeight); for ( int c=0 ; c < 2 ; c++ ) { - QWMatrix matrix; + TQWMatrix matrix; matrix.translate( cp.x(), cp.y()); matrix.scale( d/1000.0F, d/1000.0F ); @@ -631,7 +631,7 @@ void AnalogClock::paintEvent( QPaintEvent * ) matrix.rotate( -s_angle ); } - QWMatrix matrix2; + TQWMatrix matrix2; matrix2.translate( cp.x(), cp.y()); matrix2.scale( d/1000.0F, d/1000.0F ); @@ -644,10 +644,10 @@ void AnalogClock::paintEvent( QPaintEvent * ) } if (_prefs->analogLCDStyle()) { - paint.setPen( QPen(Qt::black, aaFactor) ); + paint.setPen( TQPen(Qt::black, aaFactor) ); paint.setBrush( Qt::black ); } else { - paint.setPen( QPen(_prefs->analogForegroundColor(), aaFactor) ); + paint.setPen( TQPen(_prefs->analogForegroundColor(), aaFactor) ); paint.setBrush( _prefs->analogForegroundColor() ); } @@ -655,13 +655,13 @@ void AnalogClock::paintEvent( QPaintEvent * ) } paint.end(); - QPainter paintFinal; + TQPainter paintFinal; paintFinal.begin(this); if (aaFactor != 1) { - QImage spImage = _spPx->convertToImage(); - QImage displayImage = spImage.smoothScale(size()); + TQImage spImage = _spPx->convertToImage(); + TQImage displayImage = spImage.smoothScale(size()); paintFinal.drawImage(0, 0, displayImage); } @@ -678,7 +678,7 @@ void AnalogClock::paintEvent( QPaintEvent * ) // the background pixmap disappears during a style change -void AnalogClock::styleChange(QStyle &) +void AnalogClock::styleChange(TQStyle &) { if (_prefs->analogLCDStyle()) { @@ -700,8 +700,8 @@ bool AnalogClock::showDayOfWeek() //************************************************************ -FuzzyClock::FuzzyClock(ClockApplet *applet, Prefs *prefs, QWidget *parent, const char *name) - : QFrame(parent, name), ClockWidget(applet, prefs) +FuzzyClock::FuzzyClock(ClockApplet *applet, Prefs *prefs, TQWidget *parent, const char *name) + : TQFrame(parent, name), ClockWidget(applet, prefs) { setBackgroundOrigin(AncestorOrigin); loadSettings(); @@ -754,7 +754,7 @@ FuzzyClock::FuzzyClock(ClockApplet *applet, Prefs *prefs, QWidget *parent, const void FuzzyClock::deleteMyself() { if(alreadyDrawing) // try again later - QTimer::singleShot(1000, this, SLOT(deleteMyself())); + TQTimer::singleShot(1000, this, TQT_SLOT(deleteMyself())); else delete this; } @@ -762,14 +762,14 @@ void FuzzyClock::deleteMyself() int FuzzyClock::preferedWidthForHeight(int ) const { - QFontMetrics fm(_prefs->fuzzyFont()); + TQFontMetrics fm(_prefs->fuzzyFont()); return fm.width(_timeStr) + 8; } int FuzzyClock::preferedHeightForWidth(int ) const { - QFontMetrics fm(_prefs->fuzzyFont()); + TQFontMetrics fm(_prefs->fuzzyFont()); return fm.width(_timeStr) + 8; } @@ -792,7 +792,7 @@ void FuzzyClock::loadSettings() setFrameStyle(_prefs->fuzzyShowFrame() ? Panel | Sunken : 0); } -void FuzzyClock::drawContents(QPainter *p) +void FuzzyClock::drawContents(TQPainter *p) { if (!isVisible()) return; @@ -801,7 +801,7 @@ void FuzzyClock::drawContents(QPainter *p) return; alreadyDrawing = true; - QString newTimeStr; + TQString newTimeStr; if (_prefs->fuzzyness() == 1 || _prefs->fuzzyness() == 2) { int minute = _time.minute(); @@ -838,7 +838,7 @@ void FuzzyClock::drawContents(QPainter *p) } if (phStart >= 0) newTimeStr.replace(phStart, phLength, hourNames[realHour]); - newTimeStr.replace(0, 1, QString(newTimeStr.at(0).upper())); + newTimeStr.replace(0, 1, TQString(newTimeStr.at(0).upper())); } } else if (_prefs->fuzzyness() == 3) { newTimeStr = dayTime[_time.hour() / 3]; @@ -863,15 +863,15 @@ void FuzzyClock::drawContents(QPainter *p) p->setFont(_prefs->fuzzyFont()); p->setPen(_prefs->fuzzyForegroundColor()); - QRect tr; + TQRect tr; if (_applet->getOrientation() == Vertical) { p->rotate(90); - tr = QRect(4, -2, height() - 8, -(width()) + 2); + tr = TQRect(4, -2, height() - 8, -(width()) + 2); } else - tr = QRect(4, 2, width() - 8, height() - 4); + tr = TQRect(4, 2, width() - 8, height() - 4); if (!KickerSettings::transparent()) p->drawText(tr, AlignCenter, _timeStr); @@ -895,14 +895,14 @@ bool FuzzyClock::showDayOfWeek() //************************************************************ -ClockApplet::ClockApplet(const QString& configFile, Type t, int actions, - QWidget *parent, const char *name) +ClockApplet::ClockApplet(const TQString& configFile, Type t, int actions, + TQWidget *parent, const char *name) : KPanelApplet(configFile, t, actions, parent, name), _calendar(0), _disableCalendar(false), _clock(0), - _timer(new QTimer(this)), - m_layoutTimer(new QTimer(this)), + _timer(new TQTimer(this)), + m_layoutTimer(new TQTimer(this)), m_layoutDelay(0), m_followBackgroundSetting(true), m_dateFollowBackgroundSetting(true), @@ -918,19 +918,19 @@ ClockApplet::ClockApplet(const QString& configFile, Type t, int actions, configFileName = configFile.latin1(); setBackgroundOrigin(AncestorOrigin); - _dayOfWeek = new QLabel(this); + _dayOfWeek = new TQLabel(this); _dayOfWeek->setAlignment(AlignVCenter | AlignHCenter | WordBreak); _dayOfWeek->setBackgroundOrigin(AncestorOrigin); _dayOfWeek->installEventFilter(this); // catch mouse clicks - _date = new QLabel(this); + _date = new TQLabel(this); _date->setAlignment(AlignVCenter | AlignHCenter | WordBreak); _date->setBackgroundOrigin(AncestorOrigin); _date->installEventFilter(this); // catch mouse clicks - connect(m_layoutTimer, SIGNAL(timeout()), this, SLOT(fixupLayout())); - connect(_timer, SIGNAL(timeout()), SLOT(slotUpdate())); - connect(kapp, SIGNAL(kdisplayPaletteChanged()), SLOT(globalPaletteChange())); + connect(m_layoutTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(fixupLayout())); + connect(_timer, TQT_SIGNAL(timeout()), TQT_SLOT(slotUpdate())); + connect(kapp, TQT_SIGNAL(kdisplayPaletteChanged()), TQT_SLOT(globalPaletteChange())); reconfigure(); // initialize clock widget slotUpdate(); @@ -938,8 +938,8 @@ ClockApplet::ClockApplet(const QString& configFile, Type t, int actions, if (kapp->authorizeKAction("kicker_rmb")) { menu = new KPopupMenu(); - connect(menu, SIGNAL(aboutToShow()), SLOT(aboutToShowContextMenu())); - connect(menu, SIGNAL(activated(int)), SLOT(contextMenuActivated(int))); + connect(menu, TQT_SIGNAL(aboutToShow()), TQT_SLOT(aboutToShowContextMenu())); + connect(menu, TQT_SIGNAL(activated(int)), TQT_SLOT(contextMenuActivated(int))); setCustomMenu(menu); } @@ -1030,7 +1030,7 @@ int ClockApplet::widthForHeight(int h) const { // if the date format STARTS with a year, assume it's in descending // order and should therefore PRECEED the date. - QString dateFormat = KGlobal::locale()->dateFormatShort(); + TQString dateFormat = KGlobal::locale()->dateFormatShort(); dateFirst = dateFormat.at(1) == 'y' || dateFormat.at(1) == 'Y'; } @@ -1129,9 +1129,9 @@ int ClockApplet::heightForWidth(int w) const if (_date->minimumSizeHint().width() > w) { - QString dateStr = _date->text(); + TQString dateStr = _date->text(); // if we're too wide to fit, replace the first non-digit from the end with a space - int p = dateStr.findRev(QRegExp("[^0-9]")); + int p = dateStr.findRev(TQRegExp("[^0-9]")); if (p > 0) { _date->setText(dateStr.insert(p, '\n')); @@ -1167,7 +1167,7 @@ void ClockApplet::preferences(bool timezone) if (!dialog) { dialog = new KConfigDialogSingle(zone, this, configFileName, _prefs, KDialogBase::Swallow); - connect(dialog, SIGNAL(settingsChanged()), this, SLOT(slotReconfigure())); + connect(dialog, TQT_SIGNAL(settingsChanged()), this, TQT_SLOT(slotReconfigure())); } if (timezone) @@ -1180,8 +1180,8 @@ void ClockApplet::preferences(bool timezone) void ClockApplet::updateFollowBackground() { - QColor globalBgroundColor = KApplication::palette().active().background(); - QColor bgColor; + TQColor globalBgroundColor = KApplication::palette().active().background(); + TQColor bgColor; switch (_prefs->type()) { @@ -1253,7 +1253,7 @@ void ClockApplet::reconfigure() m_updateOnTheMinute = updateInterval != shortInterval; if (m_updateOnTheMinute) { - connect(_timer, SIGNAL(timeout()), this, SLOT(setTimerTo60())); + connect(_timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(setTimerTo60())); updateInterval = ((60 - clockGetTime().second()) * 1000) + 500; } else @@ -1261,7 +1261,7 @@ void ClockApplet::reconfigure() // in case we reconfigure to show seconds but setTimerTo60 is going to be called // we need to make sure to disconnect this so we don't end up updating only once // a minute ;) - disconnect(_timer, SIGNAL(timeout()), this, SLOT(setTimerTo60())); + disconnect(_timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(setTimerTo60())); } _timer->start(updateInterval); @@ -1311,14 +1311,14 @@ void ClockApplet::reconfigure() void ClockApplet::setTimerTo60() { // kdDebug() << "setTimerTo60" << endl; - disconnect(_timer, SIGNAL(timeout()), this, SLOT(setTimerTo60())); + disconnect(_timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(setTimerTo60())); _timer->changeInterval(60000); } void ClockApplet::setBackground() { - QColor globalBgroundColor = KApplication::palette().active().background(); - QColor fgColor, bgColor; + TQColor globalBgroundColor = KApplication::palette().active().background(); + TQColor fgColor, bgColor; if (!_clock) return; @@ -1382,7 +1382,7 @@ void ClockApplet::globalPaletteChange() if (!m_dateFollowBackgroundSetting && !m_followBackgroundSetting) return; - QColor globalBgroundColor = KApplication::palette().active().background(); + TQColor globalBgroundColor = KApplication::palette().active().background(); if (m_dateFollowBackgroundSetting) _prefs->setDateBackgroundColor(globalBgroundColor); @@ -1428,7 +1428,7 @@ void ClockApplet::slotUpdate() if (seconds > 2) { - connect(_timer, SIGNAL(timeout()), this, SLOT(setTimerTo60())); + connect(_timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(setTimerTo60())); _timer->changeInterval(((60 - seconds) * 1000) + 500); } } @@ -1441,7 +1441,7 @@ void ClockApplet::slotCalendarDeleted() _calendar = 0L; // don't reopen the calendar immediately ... _disableCalendar = true; - QTimer::singleShot(100, this, SLOT(slotEnableCalendar())); + TQTimer::singleShot(100, this, TQT_SLOT(slotEnableCalendar())); // we are free to show a tip know :) installEventFilter(KickerTip::the()); @@ -1471,11 +1471,11 @@ void ClockApplet::toggleCalendar() removeEventFilter(KickerTip::the()); _calendar = new DatePicker(this, _lastDate, _prefs); - connect(_calendar, SIGNAL(destroyed()), SLOT(slotCalendarDeleted())); + connect(_calendar, TQT_SIGNAL(destroyed()), TQT_SLOT(slotCalendarDeleted())); - QSize size = _prefs->calendarSize(); + TQSize size = _prefs->calendarSize(); - if (size != QSize()) + if (size != TQSize()) { _calendar->resize(size); } @@ -1485,7 +1485,7 @@ void ClockApplet::toggleCalendar() } // make calendar fully visible - QPoint popupAt = KickerLib::popupPosition(popupDirection(), + TQPoint popupAt = KickerLib::popupPosition(popupDirection(), _calendar, this); _calendar->move(popupAt); @@ -1499,7 +1499,7 @@ void ClockApplet::openContextMenu() if (!menu || !kapp->authorizeKAction("kicker_rmb")) return; - menu->exec( QCursor::pos() ); + menu->exec( TQCursor::pos() ); } void ClockApplet::contextMenuActivated(int result) @@ -1528,7 +1528,7 @@ void ClockApplet::contextMenuActivated(int result) case 103: proc << locate("exe", "kdesu"); proc << "--nonewdcop"; - proc << QString("%1 kde-clock.desktop --lang %2") + proc << TQString("%1 kde-clock.desktop --lang %2") .arg(locate("exe", "kcmshell")) .arg(KGlobal::locale()->language()); proc.start(KProcess::DontCare); @@ -1552,7 +1552,7 @@ void ClockApplet::aboutToShowContextMenu() menu->insertTitle( SmallIcon( "clock" ), i18n( "Clock" ) ); KLocale *loc = KGlobal::locale(); - QDateTime dt = QDateTime::currentDateTime(); + TQDateTime dt = TQDateTime::currentDateTime(); dt = dt.addSecs(TZoffset); KPopupMenu *copyMenu = new KPopupMenu( menu ); @@ -1565,12 +1565,12 @@ void ClockApplet::aboutToShowContextMenu() copyMenu->insertItem(dt.time().toString(), 207); copyMenu->insertItem(dt.toString(), 208); copyMenu->insertItem(dt.toString("yyyy-MM-dd hh:mm:ss"), 209); - connect( copyMenu, SIGNAL( activated(int) ), this, SLOT( slotCopyMenuActivated(int) ) ); + connect( copyMenu, TQT_SIGNAL( activated(int) ), this, TQT_SLOT( slotCopyMenuActivated(int) ) ); if (!bImmutable) { KPopupMenu *zoneMenu = new KPopupMenu( menu ); - connect(zoneMenu, SIGNAL(activated(int)), SLOT(contextMenuActivated(int))); + connect(zoneMenu, TQT_SIGNAL(activated(int)), TQT_SLOT(contextMenuActivated(int))); for (int i = 0; i <= zone->remoteZoneCount(); i++) { if (i == 0) @@ -1587,7 +1587,7 @@ void ClockApplet::aboutToShowContextMenu() zoneMenu->insertItem(SmallIcon("configure"), i18n("&Configure Timezones..."), 110); KPopupMenu *type_menu = new KPopupMenu(menu); - connect(type_menu, SIGNAL(activated(int)), SLOT(contextMenuActivated(int))); + connect(type_menu, TQT_SIGNAL(activated(int)), TQT_SLOT(contextMenuActivated(int))); type_menu->insertItem(i18n("&Plain"), Prefs::EnumType::Plain, 1); type_menu->insertItem(i18n("&Digital"), Prefs::EnumType::Digital, 2); type_menu->insertItem(i18n("&Analog"), Prefs::EnumType::Analog, 3); @@ -1614,19 +1614,19 @@ void ClockApplet::aboutToShowContextMenu() void ClockApplet::slotCopyMenuActivated( int id ) { - QPopupMenu *m = (QPopupMenu *) sender(); - QString s = m->text(id); - QApplication::clipboard()->setText(s); + TQPopupMenu *m = (TQPopupMenu *) sender(); + TQString s = m->text(id); + TQApplication::clipboard()->setText(s); } -QTime ClockApplet::clockGetTime() +TQTime ClockApplet::clockGetTime() { - return QTime::currentTime().addSecs(TZoffset); + return TQTime::currentTime().addSecs(TZoffset); } -QDate ClockApplet::clockGetDate() +TQDate ClockApplet::clockGetDate() { - return QDateTime::currentDateTime().addSecs(TZoffset).date(); + return TQDateTime::currentDateTime().addSecs(TZoffset).date(); } void ClockApplet::showZone(int z) @@ -1649,26 +1649,26 @@ void ClockApplet::prevZone() showZone(zone->zoneIndex()); } -void ClockApplet::mousePressEvent(QMouseEvent *ev) +void ClockApplet::mousePressEvent(TQMouseEvent *ev) { switch (ev->button()) { - case QMouseEvent::LeftButton: + case TQMouseEvent::LeftButton: toggleCalendar(); break; - case QMouseEvent::RightButton: + case TQMouseEvent::RightButton: openContextMenu(); break; - case QMouseEvent::MidButton: + case TQMouseEvent::MidButton: nextZone(); - QToolTip::remove(_clock->widget()); + TQToolTip::remove(_clock->widget()); break; default: break; } } -void ClockApplet::wheelEvent(QWheelEvent* e) +void ClockApplet::wheelEvent(TQWheelEvent* e) { if (e->delta() < 0) { @@ -1679,17 +1679,17 @@ void ClockApplet::wheelEvent(QWheelEvent* e) nextZone(); } - QToolTip::remove(_clock->widget()); + TQToolTip::remove(_clock->widget()); KickerTip::Client::updateKickerTip(); } // catch the mouse clicks of our child widgets -bool ClockApplet::eventFilter( QObject *o, QEvent *e ) +bool ClockApplet::eventFilter( TQObject *o, TQEvent *e ) { if (( o == _clock->widget() || o == _date || o == _dayOfWeek) && - e->type() == QEvent::MouseButtonPress ) + e->type() == TQEvent::MouseButtonPress ) { - mousePressEvent(static_cast(e) ); + mousePressEvent(static_cast(e) ); return true; } @@ -1709,13 +1709,13 @@ void ClockApplet::updateDateLabel(bool reLayout) if (zone->zoneIndex() != 0) { - QString zone_s = i18n(zone->zone().utf8()); + TQString zone_s = i18n(zone->zone().utf8()); _date->setText(zone_s.mid(zone_s.find('/') + 1).replace("_", " ")); _date->setShown(true); } else { - QString dateStr = KGlobal::locale()->formatDate(_lastDate, true); + TQString dateStr = KGlobal::locale()->formatDate(_lastDate, true); _date->setText(dateStr); _date->setShown(showDate); } @@ -1736,12 +1736,12 @@ void ClockApplet::updateKickerTip(KickerTip::Data& data) { int zoneCount = zone->remoteZoneCount(); - QString activeZone = zone->zone(); + TQString activeZone = zone->zone(); if (zoneCount == 0) { - QString _time = KGlobal::locale()->formatTime(clockGetTime(), + TQString _time = KGlobal::locale()->formatTime(clockGetTime(), _prefs->plainShowSeconds()); - QString _date = KGlobal::locale()->formatDate(clockGetDate(), false); + TQString _date = KGlobal::locale()->formatDate(clockGetDate(), false); data.message = _time; data.subtext = _date; @@ -1757,7 +1757,7 @@ void ClockApplet::updateKickerTip(KickerTip::Data& data) for (int i = 0; i <= zone->remoteZoneCount(); i++) { - QString m_zone = zone->zone(i); + TQString m_zone = zone->zone(i); TZoffset = zone->calc_TZ_offset(m_zone); if (!m_zone.isEmpty()) @@ -1765,9 +1765,9 @@ void ClockApplet::updateKickerTip(KickerTip::Data& data) m_zone = i18n(m_zone.utf8()); // ensure it gets translated } - QString _time = KGlobal::locale()->formatTime(clockGetTime(), + TQString _time = KGlobal::locale()->formatTime(clockGetTime(), _prefs->plainShowSeconds()); - QString _date = KGlobal::locale()->formatDate(clockGetDate(), false); + TQString _date = KGlobal::locale()->formatDate(clockGetDate(), false); if (activeIndex == i) { @@ -1839,19 +1839,19 @@ int ClockApplet::type() } ClockAppletToolTip::ClockAppletToolTip( ClockApplet* clock ) - : QToolTip( clock ), + : TQToolTip( clock ), m_clock( clock ) { } -void ClockAppletToolTip::maybeTip( const QPoint & /*point*/ ) +void ClockAppletToolTip::maybeTip( const TQPoint & /*point*/ ) { - QString tipText; + TQString tipText; if ( (m_clock->type() == Prefs::EnumType::Fuzzy) || (m_clock->type() == Prefs::EnumType::Analog) ) { // show full time (incl. hour) as tooltip for Fuzzy clock - tipText = KGlobal::locale()->formatDateTime(QDateTime::currentDateTime().addSecs(m_clock->TZoffset)); + tipText = KGlobal::locale()->formatDateTime(TQDateTime::currentDateTime().addSecs(m_clock->TZoffset)); } else { diff --git a/kicker/applets/clock/clock.h b/kicker/applets/clock/clock.h index efa67be46..e1bc980e8 100644 --- a/kicker/applets/clock/clock.h +++ b/kicker/applets/clock/clock.h @@ -24,15 +24,15 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #ifndef __CLOCK_H #define __CLOCK_H -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -71,7 +71,7 @@ class SettingsWidgetImp : public SettingsWidget public: SettingsWidgetImp(Prefs *p=0, Zone *z=0, - QWidget* parent=0, + TQWidget* parent=0, const char* name=0, WFlags fl=0); public slots: @@ -88,7 +88,7 @@ class KConfigDialogSingle : public KConfigDialog public: KConfigDialogSingle(Zone *zone, - QWidget *parent=0, + TQWidget *parent=0, const char *name=0, Prefs *prefs=0, KDialogBase::DialogType dialogType = KDialogBase::IconList, @@ -120,7 +120,7 @@ class ClockWidget ClockWidget(ClockApplet *applet, Prefs *prefs); virtual ~ClockWidget(); - virtual QWidget* widget()=0; + virtual TQWidget* widget()=0; virtual int preferedWidthForHeight(int h) const =0; virtual int preferedHeightForWidth(int w) const =0; virtual void updateClock()=0; @@ -132,19 +132,19 @@ class ClockWidget protected: ClockApplet *_applet; Prefs *_prefs; - QTime _time; + TQTime _time; bool _force; }; -class PlainClock : public QLabel, public ClockWidget +class PlainClock : public TQLabel, public ClockWidget { Q_OBJECT public: - PlainClock(ClockApplet *applet, Prefs *prefs, QWidget *parent=0, const char *name=0); + PlainClock(ClockApplet *applet, Prefs *prefs, TQWidget *parent=0, const char *name=0); - QWidget* widget() { return this; } + TQWidget* widget() { return this; } int preferedWidthForHeight(int h) const; int preferedHeightForWidth(int w) const; void updateClock(); @@ -153,22 +153,22 @@ class PlainClock : public QLabel, public ClockWidget bool showDayOfWeek(); protected: - void paintEvent(QPaintEvent *e); - void drawContents(QPainter *p); + void paintEvent(TQPaintEvent *e); + void drawContents(TQPainter *p); - QString _timeStr; + TQString _timeStr; }; -class DigitalClock : public QLCDNumber, public ClockWidget +class DigitalClock : public TQLCDNumber, public ClockWidget { Q_OBJECT public: - DigitalClock(ClockApplet *applet, Prefs *prefs, QWidget *parent=0, const char *name=0); + DigitalClock(ClockApplet *applet, Prefs *prefs, TQWidget *parent=0, const char *name=0); ~DigitalClock(); - QWidget* widget() { return this; } + TQWidget* widget() { return this; } int preferedWidthForHeight(int h) const; int preferedHeightForWidth(int w) const; void updateClock(); @@ -177,25 +177,25 @@ class DigitalClock : public QLCDNumber, public ClockWidget bool showDayOfWeek(); protected: - void paintEvent( QPaintEvent*); - void drawContents( QPainter * p); - void resizeEvent ( QResizeEvent *ev); + void paintEvent( TQPaintEvent*); + void drawContents( TQPainter * p); + void resizeEvent ( TQResizeEvent *ev); - QPixmap *_buffer; - QString _timeStr; - QPixmap lcdPattern; + TQPixmap *_buffer; + TQString _timeStr; + TQPixmap lcdPattern; }; -class AnalogClock : public QFrame, public ClockWidget +class AnalogClock : public TQFrame, public ClockWidget { Q_OBJECT public: - AnalogClock(ClockApplet *applet, Prefs *prefs, QWidget *parent=0, const char *name=0); + AnalogClock(ClockApplet *applet, Prefs *prefs, TQWidget *parent=0, const char *name=0); ~AnalogClock(); - QWidget* widget() { return this; } + TQWidget* widget() { return this; } int preferedWidthForHeight(int h) const { return h; } int preferedHeightForWidth(int w) const { return w; } void updateClock(); @@ -204,24 +204,24 @@ class AnalogClock : public QFrame, public ClockWidget bool showDayOfWeek(); protected: - virtual void paintEvent(QPaintEvent *); - void styleChange(QStyle&); + virtual void paintEvent(TQPaintEvent *); + void styleChange(TQStyle&); void initBackgroundPixmap(); - QPixmap *_spPx; - QPixmap lcdPattern; + TQPixmap *_spPx; + TQPixmap lcdPattern; int _bgScale; }; -class FuzzyClock : public QFrame, public ClockWidget +class FuzzyClock : public TQFrame, public ClockWidget { Q_OBJECT public: - FuzzyClock(ClockApplet *applet, Prefs* prefs, QWidget *parent=0, const char *name=0); + FuzzyClock(ClockApplet *applet, Prefs* prefs, TQWidget *parent=0, const char *name=0); - QWidget* widget() { return this; } + TQWidget* widget() { return this; } int preferedWidthForHeight(int h) const; int preferedHeightForWidth(int w) const; void updateClock(); @@ -233,14 +233,14 @@ class FuzzyClock : public QFrame, public ClockWidget void deleteMyself(); protected: - virtual void drawContents(QPainter *p); + virtual void drawContents(TQPainter *p); - QStringList hourNames; - QStringList normalFuzzy; - QStringList normalFuzzyOne; - QStringList dayTime; + TQStringList hourNames; + TQStringList normalFuzzy; + TQStringList normalFuzzyOne; + TQStringList dayTime; - QString _timeStr; + TQString _timeStr; private: bool alreadyDrawing; @@ -252,7 +252,7 @@ class ClockAppletToolTip : public QToolTip ClockAppletToolTip( ClockApplet* clock ); protected: - virtual void maybeTip( const QPoint & ); + virtual void maybeTip( const TQPoint & ); private: ClockApplet *m_clock; @@ -266,8 +266,8 @@ class ClockApplet : public KPanelApplet, public KickerTip::Client, public DCOPOb friend class ClockAppletToolTip; public: - ClockApplet(const QString& configFile, Type t = Normal, int actions = 0, - QWidget *parent = 0, const char *name = 0); + ClockApplet(const TQString& configFile, Type t = Normal, int actions = 0, + TQWidget *parent = 0, const char *name = 0); ~ClockApplet(); int widthForHeight(int h) const; @@ -279,8 +279,8 @@ class ClockApplet : public KPanelApplet, public KickerTip::Client, public DCOPOb void resizeRequest() { emit(updateLayout()); } const Zone* timezones() { return zone; } - QTime clockGetTime(); - QDate clockGetDate(); + TQTime clockGetTime(); + TQDate clockGetDate(); virtual void updateKickerTip(KickerTip::Data&); @@ -310,23 +310,23 @@ class ClockApplet : public KPanelApplet, public KickerTip::Client, public DCOPOb void prevZone(); void updateFollowBackground(); - void paletteChange(const QPalette &) { setBackground(); } + void paletteChange(const TQPalette &) { setBackground(); } void setBackground(); - void mousePressEvent(QMouseEvent *ev); - void wheelEvent(QWheelEvent* e); - bool eventFilter(QObject *, QEvent *); + void mousePressEvent(TQMouseEvent *ev); + void wheelEvent(TQWheelEvent* e); + bool eventFilter(TQObject *, TQEvent *); virtual void positionChange(Position p); - QCString configFileName; + TQCString configFileName; DatePicker *_calendar; bool _disableCalendar; ClockWidget *_clock; - QLabel *_date; - QLabel *_dayOfWeek; - QDate _lastDate; - QTimer *_timer; - QTimer *m_layoutTimer; + TQLabel *_date; + TQLabel *_dayOfWeek; + TQDate _lastDate; + TQTimer *_timer; + TQTimer *m_layoutTimer; int m_layoutDelay; bool m_followBackgroundSetting; bool m_dateFollowBackgroundSetting; @@ -338,7 +338,7 @@ class ClockApplet : public KPanelApplet, public KickerTip::Client, public DCOPOb bool showDate; bool showDayOfWeek; bool m_updateOnTheMinute; - QStringList _remotezonelist; + TQStringList _remotezonelist; KPopupMenu* menu; ClockAppletToolTip m_tooltip; KTextShadowEngine *m_shadowEngine; diff --git a/kicker/applets/clock/datepicker.cpp b/kicker/applets/clock/datepicker.cpp index 0ea677e8a..3864db556 100644 --- a/kicker/applets/clock/datepicker.cpp +++ b/kicker/applets/clock/datepicker.cpp @@ -30,8 +30,8 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include #include -DatePicker::DatePicker(QWidget *parent, const QDate& date, Prefs* _prefs) - : QVBox( parent, 0, +DatePicker::DatePicker(TQWidget *parent, const TQDate& date, Prefs* _prefs) + : TQVBox( parent, 0, _prefs->calendarFullWindow() ? (WType_TopLevel | WDestructiveClose | WStyle_StaysOnTop) @@ -43,11 +43,11 @@ DatePicker::DatePicker(QWidget *parent, const QDate& date, Prefs* _prefs) if (prefs->calendarFullWindow()) { KWin::setType(winId(), NET::Utility); - setFrameStyle(QFrame::NoFrame); + setFrameStyle(TQFrame::NoFrame); } else { - setFrameStyle(QFrame::PopupPanel | QFrame::Raised); + setFrameStyle(TQFrame::PopupPanel | TQFrame::Raised); } KWin::setOnAllDesktops(handle(), true); @@ -59,15 +59,15 @@ DatePicker::DatePicker(QWidget *parent, const QDate& date, Prefs* _prefs) setIcon(SmallIcon("date")); } -void DatePicker::closeEvent(QCloseEvent* e) +void DatePicker::closeEvent(TQCloseEvent* e) { prefs->setCalendarSize(size()); - QVBox::closeEvent(e); + TQVBox::closeEvent(e); } -void DatePicker::keyPressEvent(QKeyEvent *e) +void DatePicker::keyPressEvent(TQKeyEvent *e) { - QVBox::keyPressEvent(e); + TQVBox::keyPressEvent(e); if (e->key() == Qt::Key_Escape) { @@ -75,12 +75,12 @@ void DatePicker::keyPressEvent(QKeyEvent *e) } } -bool DatePicker::setDate(const QDate& date) +bool DatePicker::setDate(const TQDate& date) { return picker->setDate(date); } -QDate DatePicker::date() +TQDate DatePicker::date() { return picker->date(); } diff --git a/kicker/applets/clock/datepicker.h b/kicker/applets/clock/datepicker.h index ee39261e0..f2e8a3397 100644 --- a/kicker/applets/clock/datepicker.h +++ b/kicker/applets/clock/datepicker.h @@ -24,8 +24,8 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #ifndef __DATEPICKER_H #define __DATEPICKER_H -#include -#include +#include +#include class KDatePicker; class Prefs; @@ -33,13 +33,13 @@ class Prefs; class DatePicker : public QVBox { public: - DatePicker(QWidget*, const QDate&, Prefs* _prefs); - bool setDate(const QDate& date); - QDate date(); + DatePicker(TQWidget*, const TQDate&, Prefs* _prefs); + bool setDate(const TQDate& date); + TQDate date(); protected: - void closeEvent(QCloseEvent* e); - void keyPressEvent(QKeyEvent *e); + void closeEvent(TQCloseEvent* e); + void keyPressEvent(TQKeyEvent *e); private: KDatePicker *picker; diff --git a/kicker/applets/clock/zone.cpp b/kicker/applets/clock/zone.cpp index 1d952a765..320d84b4c 100644 --- a/kicker/applets/clock/zone.cpp +++ b/kicker/applets/clock/zone.cpp @@ -34,8 +34,8 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include #include -#include -#include +#include +#include #include #include @@ -51,8 +51,8 @@ Zone::Zone(KConfig* conf): config->setGroup("General"); /* default displayable timezones */ - QString tzList = config->readEntry("RemoteZones"); - _remotezonelist = QStringList::split(",", tzList); + TQString tzList = config->readEntry("RemoteZones"); + _remotezonelist = TQStringList::split(",", tzList); setZone(config->readNumEntry("Initial_TZ", 0)); } @@ -69,12 +69,12 @@ void Zone::setZone(int z) _zoneIndex = z; } -QString Zone::zone(int z) const +TQString Zone::zone(int z) const { return (z == 0 ? _defaultTZ : _remotezonelist[z-1]); } -int Zone::calc_TZ_offset(const QString& zone, bool /* reset */) +int Zone::calc_TZ_offset(const TQString& zone, bool /* reset */) { const KTimezone *z = zone.isEmpty() ? m_zoneDb.local() : m_zoneDb.zone(zone); @@ -94,26 +94,26 @@ int Zone::calc_TZ_offset(const QString& zone, bool /* reset */) void Zone::readZoneList(KListView *listView ) { const KTimezones::ZoneMap zones = m_zoneDb.allZones(); - QMap KontinentMap; + TQMap KontinentMap; listView->setRootIsDecorated(true); for (KTimezones::ZoneMap::ConstIterator it = zones.begin(); it != zones.end(); ++it) { const KTimezone *zone = it.data(); - QString tzName = zone->name(); - QString comment = zone->comment(); + TQString tzName = zone->name(); + TQString comment = zone->comment(); if (!comment.isEmpty()) comment = i18n(comment.utf8()); - const QStringList KontCity = QStringList::split("/", i18n(tzName.utf8()).replace("_", " ")); - QListViewItem* Kontinent = KontinentMap[KontCity[0]]; + const TQStringList KontCity = TQStringList::split("/", i18n(tzName.utf8()).replace("_", " ")); + TQListViewItem* Kontinent = KontinentMap[KontCity[0]]; if (!Kontinent) { - KontinentMap[KontCity[0]] = new QListViewItem(listView, KontCity[0]); + KontinentMap[KontCity[0]] = new TQListViewItem(listView, KontCity[0]); Kontinent = KontinentMap[KontCity[0]]; Kontinent->setExpandable(true); } - QCheckListItem *li = new QCheckListItem(Kontinent, KontCity[1], QCheckListItem::CheckBox); + TQCheckListItem *li = new TQCheckListItem(Kontinent, KontCity[1], TQCheckListItem::CheckBox); li->setText(1, comment); li->setText(2, tzName); /* store complete path in ListView */ @@ -122,11 +122,11 @@ void Zone::readZoneList(KListView *listView ) // locate the flag from /l10n/%1/flag.png // if not available select default "C" flag - QString flag = locate( "locale", QString("l10n/%1/flag.png").arg(zone->countryCode().lower()) ); - if (!QFile::exists(flag)) + TQString flag = locate( "locale", TQString("l10n/%1/flag.png").arg(zone->countryCode().lower()) ); + if (!TQFile::exists(flag)) flag = locate( "locale", "l10n/C/flag.png" ); - if (QFile::exists(flag)) - li->setPixmap(0, QPixmap(flag)); + if (TQFile::exists(flag)) + li->setPixmap(0, TQPixmap(flag)); } } @@ -135,14 +135,14 @@ void Zone::getSelectedZonelist(KListView *listView) _remotezonelist.clear(); /* loop through all entries */ - QListViewItem *root = listView->firstChild(); + TQListViewItem *root = listView->firstChild(); while (root) { if (root->firstChild()) { root = root->firstChild(); continue; } - QCheckListItem *cl = (QCheckListItem*) root; + TQCheckListItem *cl = (TQCheckListItem*) root; if (cl->isOn()) { _remotezonelist.append(cl->text(2)); } diff --git a/kicker/applets/clock/zone.h b/kicker/applets/clock/zone.h index 34371c6ae..db34188bd 100644 --- a/kicker/applets/clock/zone.h +++ b/kicker/applets/clock/zone.h @@ -25,7 +25,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #define __ZONE_H #include -#include +#include class KConfig; class KListView; @@ -38,24 +38,24 @@ public: void writeSettings(); - QString zone() const { return zone(_zoneIndex); }; - QString zone(int z) const; - QStringList remoteZoneList() const { return _remotezonelist; }; + TQString zone() const { return zone(_zoneIndex); }; + TQString zone(int z) const; + TQStringList remoteZoneList() const { return _remotezonelist; }; int remoteZoneCount() { return _remotezonelist.count(); }; unsigned int zoneIndex() const { return _zoneIndex; } void setZone(int z = 0); void nextZone(); void prevZone(); - int calc_TZ_offset(const QString& zone, bool reset=false); + int calc_TZ_offset(const TQString& zone, bool reset=false); void readZoneList(KListView *listView); void getSelectedZonelist(KListView *listView); protected: KTimezones m_zoneDb; - QStringList _remotezonelist; + TQStringList _remotezonelist; KConfig *config; - QString _defaultTZ; + TQString _defaultTZ; unsigned int _zoneIndex; }; -- cgit v1.2.1