diff options
Diffstat (limited to 'kicker-applets/kbinaryclock/kbinaryclock.cpp')
-rw-r--r-- | kicker-applets/kbinaryclock/kbinaryclock.cpp | 56 |
1 files changed, 28 insertions, 28 deletions
diff --git a/kicker-applets/kbinaryclock/kbinaryclock.cpp b/kicker-applets/kbinaryclock/kbinaryclock.cpp index 30682e4..2e46273 100644 --- a/kicker-applets/kbinaryclock/kbinaryclock.cpp +++ b/kicker-applets/kbinaryclock/kbinaryclock.cpp @@ -41,15 +41,15 @@ extern "C" { - KDE_EXPORT KPanelApplet* init( TQWidget *parent, const TQString& configFile ) { + KDE_EXPORT KPanelApplet* init( TQWidget *tqparent, const TQString& configFile ) { KGlobal::locale()->insertCatalogue( "kbinaryclock"); return new KBinaryClock( configFile, KPanelApplet::Normal, - KPanelApplet::Preferences, parent, "kbinaryclock"); + KPanelApplet::Preferences, tqparent, "kbinaryclock"); } } -KConfigDialogImp::KConfigDialogImp( TQWidget *parent, const char *name, KConfigSkeleton *prefs, KDialogBase::DialogType dialogType, KDialogBase::ButtonCode defaultButton, bool modal) : - KConfigDialog(parent, name, prefs, dialogType,(KDialogBase::ButtonCode) (KDialogBase::Default | KDialogBase::Ok | KDialogBase::Apply | KDialogBase::Cancel ), defaultButton, modal) +KConfigDialogImp::KConfigDialogImp( TQWidget *tqparent, const char *name, KConfigSkeleton *prefs, KDialogBase::DialogType dialogType, KDialogBase::ButtonCode defaultButton, bool modal) : + KConfigDialog(tqparent, name, prefs, dialogType,(KDialogBase::ButtonCode) (KDialogBase::Default | KDialogBase::Ok | KDialogBase::Apply | KDialogBase::Cancel ), defaultButton, modal) { // As a temporary mesure until the kicker applet's app name is set to the // applets name so KDialogBase gets the right info. @@ -61,14 +61,14 @@ KConfigDialogImp::KConfigDialogImp( TQWidget *parent, const char *name, KConfigS connect(this, TQT_SIGNAL(widgetModified()), settings, TQT_SLOT(updatePreview())); } -SettingsImp::SettingsImp(TQWidget* parent, const char* name, WFlags fl): Settings(parent, name, fl){ +SettingsImp::SettingsImp(TQWidget* tqparent, const char* name, WFlags fl): Settings(tqparent, name, fl){ } /** * Update the preview */ void SettingsImp::updatePreview(){ - int shape = Shape_Circular->isChecked() ? Prefs::EnumShape::Circular : Prefs::EnumShape::Rectangular; + int tqshape = Shape_Circular->isChecked() ? Prefs::EnumShape::Circular : Prefs::EnumShape::Rectangular; int look = KLed::Raised; look = Look_Flat->isChecked() ? Prefs::EnumLook::Flat : look; look = Look_Sunken->isChecked() ? Prefs::EnumLook::Sunken : look; @@ -84,12 +84,12 @@ void SettingsImp::updatePreview(){ kLed5->setBackgroundColor(backgroundColor); kLed6->setBackgroundColor(backgroundColor); - kLed1->setShape((KLed::Shape)shape); - kLed2->setShape((KLed::Shape)shape); - kLed3->setShape((KLed::Shape)shape); - kLed4->setShape((KLed::Shape)shape); - kLed5->setShape((KLed::Shape)shape); - kLed6->setShape((KLed::Shape)shape); + kLed1->setShape((KLed::Shape)tqshape); + kLed2->setShape((KLed::Shape)tqshape); + kLed3->setShape((KLed::Shape)tqshape); + kLed4->setShape((KLed::Shape)tqshape); + kLed5->setShape((KLed::Shape)tqshape); + kLed6->setShape((KLed::Shape)tqshape); kLed1->setColor(color); kLed2->setColor(color); @@ -116,8 +116,8 @@ void SettingsImp::updatePreview(){ /** * Constructor, create LED's */ -KBinaryClock::KBinaryClock(const TQString& configFile, Type type, int actions, TQWidget *parent, const char *name) - : KPanelApplet(configFile, type, actions, parent, name), ledWidth(6), +KBinaryClock::KBinaryClock(const TQString& configFile, Type type, int actions, TQWidget *tqparent, const char *name) + : KPanelApplet(configFile, type, actions, tqparent, name), ledWidth(6), _calendar(NULL), _disableCalendar(false), prefs( new Prefs(sharedConfig())), m_tooltip(this) { @@ -173,14 +173,14 @@ void KBinaryClock::resizeEvent( TQResizeEvent *e ) { * Load the settings for the clock. */ void KBinaryClock::loadSettings(){ - int shape = prefs->shape(); + int tqshape = prefs->shape(); int look = prefs->look(); TQColor color = prefs->color(); int darkFactor = prefs->darkFactor(); TQColor backgroundColor = prefs->background(); bool modifyBackground = false; - if(backgroundColor != KApplication::palette().active().background()){ + if(backgroundColor != KApplication::tqpalette().active().background()){ setPaletteBackgroundColor(backgroundColor); modifyBackground = true; } @@ -197,7 +197,7 @@ void KBinaryClock::loadSettings(){ } for(int i=0; i < 4; i++){ for(int j=0; j < ledWidth;j++){ - ledMatrix[j][i]->setShape((KLed::Shape)shape); + ledMatrix[j][i]->setShape((KLed::Shape)tqshape); ledMatrix[j][i]->setColor(color); ledMatrix[j][i]->setLook((KLed::Look)look); ledMatrix[j][i]->setDarkFactor(darkFactor); @@ -264,15 +264,15 @@ void KBinaryClock::updateClock(){ */ void KBinaryClock::mousePressEvent(TQMouseEvent *event) { switch (event->button()) { - case TQMouseEvent::RightButton: + case Qt::RightButton: TQToolTip::remove(this); openContextMenu(); break; - case TQMouseEvent::LeftButton: + case Qt::LeftButton: toggleCalendar(); TQToolTip::remove(this); break; - case TQMouseEvent::MidButton: + case Qt::MidButton: TQToolTip::remove(this); break; default: @@ -290,7 +290,7 @@ void KBinaryClock::openContextMenu() { menu->insertTitle( SmallIcon( "clock" ), i18n( "KBinaryClock" ) ); KLocale *loc = KGlobal::locale(); - TQDateTime dt = TQDateTime::currentDateTime(); + TQDateTime dt = TQDateTime::tqcurrentDateTime(); KPopupMenu *copyMenu = new KPopupMenu( menu ); copyMenu->insertItem(loc->formatDateTime(dt), 201); @@ -329,8 +329,8 @@ void KBinaryClock::openContextMenu() { proc << locate("exe", "kdesu"); proc << "--nonewdcop"; proc << TQString("%1 clock --lang %2") - .arg(locate("exe", "kcmshell")) - .arg(KGlobal::locale()->language()); + .tqarg(locate("exe", "kcmshell")) + .tqarg(KGlobal::locale()->language()); proc.start(KProcess::DontCare); break; case 104: @@ -348,7 +348,7 @@ void KBinaryClock::openContextMenu() { void KBinaryClock::slotCopyMenuActivated( int id ) { TQPopupMenu *m = (TQPopupMenu *) sender(); TQString s = m->text(id); - TQApplication::clipboard()->setText(s); + TQApplication::tqclipboard()->setText(s); } void KBinaryClock::toggleCalendar() @@ -361,15 +361,15 @@ void KBinaryClock::toggleCalendar() if (_calendar || _disableCalendar){ return; } - _calendar = new DatePicker(this, TQDateTime::currentDateTime().date()); + _calendar = new DatePicker(this, TQDateTime::tqcurrentDateTime().date()); connect( _calendar, TQT_SIGNAL( destroyed() ), TQT_SLOT( slotCalendarDeleted() )); // some extra spacing is included if aligned on a desktop edge TQPoint c = mapToGlobal(TQPoint(0,0)); - int w = _calendar->sizeHint().width() + 28; + int w = _calendar->tqsizeHint().width() + 28; // Added 28 px. to size poperly as said in API - int h = _calendar->sizeHint().height(); + int h = _calendar->tqsizeHint().height(); switch (position()) { case KPanelApplet::pLeft: c.setX(c.x()+width()+2); break; @@ -405,7 +405,7 @@ ClockAppletToolTip::ClockAppletToolTip( KBinaryClock *clock ) : TQToolTip( clock void ClockAppletToolTip::maybeTip( const TQPoint & /*point*/ ) { - tip(m_clock->geometry(), KGlobal::locale()->formatDate(TQDateTime::currentDateTime().date(), false)); + tip(m_clock->tqgeometry(), KGlobal::locale()->formatDate(TQDateTime::tqcurrentDateTime().date(), false)); } #include "kbinaryclock.moc" |