diff options
Diffstat (limited to 'kicker/applets')
27 files changed, 366 insertions, 352 deletions
diff --git a/kicker/applets/clock/clock.cpp b/kicker/applets/clock/clock.cpp index 408349250..f8ddf0d38 100644 --- a/kicker/applets/clock/clock.cpp +++ b/kicker/applets/clock/clock.cpp @@ -41,9 +41,9 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include <kdebug.h> #include <kcolorbutton.h> #include <kiconloader.h> -#include <kstandarddirs.h> +#include <tdestandarddirs.h> #include <tdeapplication.h> -#include <kprocess.h> +#include <tdeprocess.h> #include <tdelocale.h> #include <tdepopupmenu.h> #include <kstringhandler.h> @@ -84,7 +84,7 @@ TDEConfigDialogSingle::TDEConfigDialogSingle(Zone *zone, TQWidget *parent, setIcon(SmallIcon("date")); settings = new SettingsWidgetImp(prefs, zone, 0, "General"); - connect(settings->kcfg_Type, TQT_SIGNAL(activated(int)), TQT_SLOT(selectPage(int))); + connect(settings->kcfg_Type, TQ_SIGNAL(activated(int)), TQ_SLOT(selectPage(int))); settings->kcfg_PlainBackgroundColor->setDefaultColor(TDEApplication::palette().active().background()); settings->kcfg_DateBackgroundColor->setDefaultColor(TDEApplication::palette().active().background()); @@ -104,24 +104,24 @@ TDEConfigDialogSingle::TDEConfigDialogSingle(Zone *zone, TQWidget *parent, settings->widgetStack->addWidget(fuzzyPage, 3); fuzzyPage->kcfg_FuzzyBackgroundColor->setDefaultColor(TDEApplication::palette().active().background()); - 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())); + connect(settings->kcfg_PlainShowDate, TQ_SIGNAL(toggled(bool)), + TQ_SLOT(dateToggled())); + connect(settings->kcfg_PlainShowDayOfWeek, TQ_SIGNAL(toggled(bool)), + TQ_SLOT(dateToggled())); + connect(digitalPage->kcfg_DigitalShowDate, TQ_SIGNAL(toggled(bool)), + TQ_SLOT(dateToggled())); + connect(digitalPage->kcfg_DigitalShowDayOfWeek, TQ_SIGNAL(toggled(bool)), + TQ_SLOT(dateToggled())); + connect(digitalPage->kcfg_DigitalShowDate, TQ_SIGNAL(toggled(bool)), + TQ_SLOT(dateToggled())); + connect(analogPage->kcfg_AnalogShowDate, TQ_SIGNAL(toggled(bool)), + TQ_SLOT(dateToggled())); + connect(analogPage->kcfg_AnalogShowDayOfWeek, TQ_SIGNAL(toggled(bool)), + TQ_SLOT(dateToggled())); + connect(fuzzyPage->kcfg_FuzzyShowDate, TQ_SIGNAL(toggled(bool)), + TQ_SLOT(dateToggled())); + connect(fuzzyPage->kcfg_FuzzyShowDayOfWeek, TQ_SIGNAL(toggled(bool)), + TQ_SLOT(dateToggled())); addPage(settings, i18n("General"), TQString::fromLatin1("package_settings")); } @@ -144,7 +144,7 @@ void TDEConfigDialogSingle::updateWidgetsDefault() item->swapDefault(); // This is ugly, but kcfg_Type does not have its correct setting // at this point in time. - TQTimer::singleShot(0, this, TQT_SLOT(dateToggled())); + TQTimer::singleShot(0, this, TQ_SLOT(dateToggled())); } void TDEConfigDialogSingle::selectPage(int p) @@ -353,9 +353,9 @@ void DigitalClock::updateClock() if (_force || newStr != _timeStr) { _timeStr = newStr; - setUpdatesEnabled( FALSE ); + setUpdatesEnabled( false ); display(_timeStr); - setUpdatesEnabled( TRUE ); + setUpdatesEnabled( true ); update(); } @@ -415,7 +415,7 @@ void DigitalClock::paintEvent(TQPaintEvent*) // but other colors would break the lcd-lock anyway void DigitalClock::drawContents( TQPainter * p) { - setUpdatesEnabled( FALSE ); + setUpdatesEnabled( false ); TQPalette pal = palette(); if (_prefs->digitalLCDStyle()) pal.setColor( TQColorGroup::Foreground, TQColor(128,128,128)); @@ -430,7 +430,7 @@ void DigitalClock::drawContents( TQPainter * p) pal.setColor( TQColorGroup::Foreground, _prefs->digitalForegroundColor()); setPalette( pal ); p->translate( -2, -2 ); - setUpdatesEnabled( TRUE ); + setUpdatesEnabled( true ); TQLCDNumber::drawContents( p ); p->translate( +1, +1 ); } @@ -743,7 +743,7 @@ FuzzyClock::FuzzyClock(ClockApplet *applet, Prefs *prefs, TQWidget *parent, cons void FuzzyClock::deleteMyself() { if(alreadyDrawing) // try again later - TQTimer::singleShot(1000, this, TQT_SLOT(deleteMyself())); + TQTimer::singleShot(1000, this, TQ_SLOT(deleteMyself())); else delete this; } @@ -917,18 +917,18 @@ ClockApplet::ClockApplet(const TQString& configFile, Type t, int actions, _date->setBackgroundOrigin(AncestorOrigin); _date->installEventFilter(this); // catch mouse clicks - connect(m_layoutTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(fixupLayout())); - connect(_timer, TQT_SIGNAL(timeout()), TQT_SLOT(slotUpdate())); - connect(kapp, TQT_SIGNAL(tdedisplayPaletteChanged()), TQT_SLOT(globalPaletteChange())); + connect(m_layoutTimer, TQ_SIGNAL(timeout()), this, TQ_SLOT(fixupLayout())); + connect(_timer, TQ_SIGNAL(timeout()), TQ_SLOT(slotUpdate())); + connect(tdeApp, TQ_SIGNAL(tdedisplayPaletteChanged()), TQ_SLOT(globalPaletteChange())); reconfigure(); // initialize clock widget slotUpdate(); - if (kapp->authorizeTDEAction("kicker_rmb")) + if (tdeApp->authorizeTDEAction("kicker_rmb")) { menu = new TDEPopupMenu(); - connect(menu, TQT_SIGNAL(aboutToShow()), TQT_SLOT(aboutToShowContextMenu())); - connect(menu, TQT_SIGNAL(activated(int)), TQT_SLOT(contextMenuActivated(int))); + connect(menu, TQ_SIGNAL(aboutToShow()), TQ_SLOT(aboutToShowContextMenu())); + connect(menu, TQ_SIGNAL(activated(int)), TQ_SLOT(contextMenuActivated(int))); setCustomMenu(menu); } @@ -1156,7 +1156,7 @@ void ClockApplet::preferences(bool timezone) if (!dialog) { dialog = new TDEConfigDialogSingle(zone, this, configFileName, _prefs, KDialogBase::Swallow); - connect(dialog, TQT_SIGNAL(settingsChanged()), this, TQT_SLOT(slotReconfigure())); + connect(dialog, TQ_SIGNAL(settingsChanged()), this, TQ_SLOT(slotReconfigure())); } if (timezone) @@ -1242,7 +1242,7 @@ void ClockApplet::reconfigure() m_updateOnTheMinute = updateInterval != shortInterval; if (m_updateOnTheMinute) { - connect(_timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(setTimerTo60())); + connect(_timer, TQ_SIGNAL(timeout()), this, TQ_SLOT(setTimerTo60())); updateInterval = ((60 - clockGetTime().second()) * 1000) + 500; } else @@ -1250,7 +1250,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, TQT_SIGNAL(timeout()), this, TQT_SLOT(setTimerTo60())); + disconnect(_timer, TQ_SIGNAL(timeout()), this, TQ_SLOT(setTimerTo60())); } _timer->start(updateInterval); @@ -1300,7 +1300,7 @@ void ClockApplet::reconfigure() void ClockApplet::setTimerTo60() { // kdDebug() << "setTimerTo60" << endl; - disconnect(_timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(setTimerTo60())); + disconnect(_timer, TQ_SIGNAL(timeout()), this, TQ_SLOT(setTimerTo60())); _timer->changeInterval(60000); } @@ -1417,7 +1417,7 @@ void ClockApplet::slotUpdate() if (seconds > 2) { - connect(_timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(setTimerTo60())); + connect(_timer, TQ_SIGNAL(timeout()), this, TQ_SLOT(setTimerTo60())); _timer->changeInterval(((60 - seconds) * 1000) + 500); } } @@ -1430,7 +1430,7 @@ void ClockApplet::slotCalendarDeleted() _calendar = 0L; // don't reopen the calendar immediately ... _disableCalendar = true; - TQTimer::singleShot(100, this, TQT_SLOT(slotEnableCalendar())); + TQTimer::singleShot(100, this, TQ_SLOT(slotEnableCalendar())); // we are free to show a tip know :) installEventFilter(KickerTip::the()); @@ -1460,7 +1460,7 @@ void ClockApplet::toggleCalendar() removeEventFilter(KickerTip::the()); _calendar = new DatePicker(this, _lastDate, _prefs); - connect(_calendar, TQT_SIGNAL(destroyed()), TQT_SLOT(slotCalendarDeleted())); + connect(_calendar, TQ_SIGNAL(destroyed()), TQ_SLOT(slotCalendarDeleted())); TQSize size = _prefs->calendarSize(); @@ -1485,7 +1485,7 @@ void ClockApplet::toggleCalendar() void ClockApplet::openContextMenu() { - if (!menu || !kapp->authorizeTDEAction("kicker_rmb")) + if (!menu || !tdeApp->authorizeTDEAction("kicker_rmb")) return; menu->exec( TQCursor::pos() ); @@ -1554,12 +1554,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, TQT_SIGNAL( activated(int) ), this, TQT_SLOT( slotCopyMenuActivated(int) ) ); + connect( copyMenu, TQ_SIGNAL( activated(int) ), this, TQ_SLOT( slotCopyMenuActivated(int) ) ); if (!bImmutable) { TDEPopupMenu *zoneMenu = new TDEPopupMenu( menu ); - connect(zoneMenu, TQT_SIGNAL(activated(int)), TQT_SLOT(contextMenuActivated(int))); + connect(zoneMenu, TQ_SIGNAL(activated(int)), TQ_SLOT(contextMenuActivated(int))); for (int i = 0; i <= zone->remoteZoneCount(); i++) { if (i == 0) @@ -1576,7 +1576,7 @@ void ClockApplet::aboutToShowContextMenu() zoneMenu->insertItem(SmallIcon("configure"), i18n("&Configure Timezones..."), 110); TDEPopupMenu *type_menu = new TDEPopupMenu(menu); - connect(type_menu, TQT_SIGNAL(activated(int)), TQT_SLOT(contextMenuActivated(int))); + connect(type_menu, TQ_SIGNAL(activated(int)), TQ_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); @@ -1585,7 +1585,7 @@ void ClockApplet::aboutToShowContextMenu() menu->insertItem(i18n("&Type"), type_menu, 101, 1); menu->insertItem(i18n("Show Time&zone"), zoneMenu, 110, 2); - if (kapp->authorize("user/root")) + if (tdeApp->authorize("user/root")) { menu->insertItem(SmallIcon("date"), i18n("&Adjust Date && Time..."), 103, 4); } diff --git a/kicker/applets/clock/digital.ui b/kicker/applets/clock/digital.ui index e8ced7f2d..c63eb7d32 100644 --- a/kicker/applets/clock/digital.ui +++ b/kicker/applets/clock/digital.ui @@ -293,9 +293,9 @@ <include location="global" impldecl="in implementation">kdialog.h</include> <include location="global" impldecl="in implementation">tdefontrequester.h</include> </includes> -<Q_SLOTS> +<slots> <slot>kcfg_DigitalLCDStyle_stateChanged( int )</slot> -</Q_SLOTS> +</slots> <layoutdefaults spacing="3" margin="6"/> <layoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/> </UI> diff --git a/kicker/applets/clock/init.cpp b/kicker/applets/clock/init.cpp index 55ee382fd..253f8656c 100644 --- a/kicker/applets/clock/init.cpp +++ b/kicker/applets/clock/init.cpp @@ -41,9 +41,9 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include <kdebug.h> #include <kcolorbutton.h> #include <kiconloader.h> -#include <kstandarddirs.h> +#include <tdestandarddirs.h> #include <tdeapplication.h> -#include <kprocess.h> +#include <tdeprocess.h> #include <tdelocale.h> #include <tdepopupmenu.h> #include <kstringhandler.h> @@ -68,7 +68,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. extern "C" { - KDE_EXPORT KPanelApplet* init(TQWidget *parent, const TQString& configFile) + TDE_EXPORT KPanelApplet* init(TQWidget *parent, const TQString& configFile) { TDEGlobal::locale()->insertCatalogue("clockapplet"); TDEGlobal::locale()->insertCatalogue("timezones"); // For time zone translations diff --git a/kicker/applets/clock/settings.ui b/kicker/applets/clock/settings.ui index 81e126560..bd33473cd 100644 --- a/kicker/applets/clock/settings.ui +++ b/kicker/applets/clock/settings.ui @@ -509,9 +509,9 @@ <include location="global" impldecl="in implementation">tdefontrequester.h</include> <include location="global" impldecl="in implementation">tdelistview.h</include> </includes> -<Q_SLOTS> +<slots> <slot>configureType()</slot> -</Q_SLOTS> +</slots> <layoutdefaults spacing="3" margin="6"/> <layoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/> </UI> diff --git a/kicker/applets/clock/zone.cpp b/kicker/applets/clock/zone.cpp index 85a4f3f19..d33af74b3 100644 --- a/kicker/applets/clock/zone.cpp +++ b/kicker/applets/clock/zone.cpp @@ -30,7 +30,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include <kcolorbutton.h> #include <tdeconfig.h> #include <kdebug.h> -#include <kstandarddirs.h> +#include <tdestandarddirs.h> #include <kstringhandler.h> #include <tdelocale.h> diff --git a/kicker/applets/launcher/configdlg.cpp b/kicker/applets/launcher/configdlg.cpp index d542d2593..88301b7cf 100644 --- a/kicker/applets/launcher/configdlg.cpp +++ b/kicker/applets/launcher/configdlg.cpp @@ -47,8 +47,8 @@ ConfigDlg::ConfigDlg(TQWidget *parent, const char *name, Prefs *config, m_ui->iconDim->insertItem(TQString::number( m_settings->iconDimChoices()[n])); } - connect(m_ui->iconDim, TQT_SIGNAL(textChanged(const TQString&)), - this, TQT_SLOT(updateButtons())); + connect(m_ui->iconDim, TQ_SIGNAL(textChanged(const TQString&)), + this, TQ_SLOT(updateButtons())); updateWidgets(); m_oldIconDimText = m_ui->iconDim->currentText(); updateButtons(); diff --git a/kicker/applets/launcher/quickaddappsmenu.cpp b/kicker/applets/launcher/quickaddappsmenu.cpp index cdbc94dd5..40957c44f 100644 --- a/kicker/applets/launcher/quickaddappsmenu.cpp +++ b/kicker/applets/launcher/quickaddappsmenu.cpp @@ -23,8 +23,8 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ******************************************************************/ -#include <kstandarddirs.h> -#include <kdesktopfile.h> +#include <tdestandarddirs.h> +#include <tdedesktopfile.h> #include <tdeglobalsettings.h> #include <tdesycocaentry.h> #include <kservice.h> @@ -38,8 +38,8 @@ QuickAddAppsMenu::QuickAddAppsMenu(const TQString &label, const TQString &relPat { _targetObject = target; _sender = sender; - connect(this, TQT_SIGNAL(addAppBefore(TQString,TQString)), - target, TQT_SLOT(addAppBeforeManually(TQString,TQString))); + connect(this, TQ_SIGNAL(addAppBefore(TQString,TQString)), + target, TQ_SLOT(addAppBeforeManually(TQString,TQString))); } QuickAddAppsMenu::QuickAddAppsMenu(TQWidget *target, TQWidget *parent, const TQString &sender, const char *name) @@ -47,8 +47,8 @@ QuickAddAppsMenu::QuickAddAppsMenu(TQWidget *target, TQWidget *parent, const TQS { _targetObject = target; _sender = sender; - connect(this, TQT_SIGNAL(addAppBefore(TQString,TQString)), - target, TQT_SLOT(addAppBeforeManually(TQString,TQString))); + connect(this, TQ_SIGNAL(addAppBefore(TQString,TQString)), + target, TQ_SLOT(addAppBeforeManually(TQString,TQString))); } void QuickAddAppsMenu::slotExec(int id) diff --git a/kicker/applets/launcher/quickbutton.cpp b/kicker/applets/launcher/quickbutton.cpp index add317a3b..e7226c8a4 100644 --- a/kicker/applets/launcher/quickbutton.cpp +++ b/kicker/applets/launcher/quickbutton.cpp @@ -32,7 +32,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include <tdeactionclasses.h> #include <kickertip.h> #include <tdelocale.h> -#include <kdesktopfile.h> +#include <tdedesktopfile.h> #include <krun.h> #include <kiconeffect.h> #include <tdeglobalsettings.h> @@ -41,7 +41,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include <kipc.h> #include <kiconloader.h> #include <kurldrag.h> -#include <kstandarddirs.h> +#include <tdestandarddirs.h> #include <math.h> #include <algorithm> @@ -118,7 +118,7 @@ QuickURL::QuickURL(const TQString &u) } void QuickURL::run() const -{ kapp->propagateSessionManager(); // is this needed? +{ tdeApp->propagateSessionManager(); // is this needed? if (_service) KRun::run(*(_service), KURL::List()); else @@ -158,7 +158,7 @@ QuickButton::QuickButton(const TQString &u, TDEAction* configAction, if (_qurl->url() == "SPECIAL_BUTTON__SHOW_DESKTOP") { setToggleButton(true); setOn( ShowDesktop::the()->desktopShowing() ); - connect( ShowDesktop::the(), TQT_SIGNAL(desktopShown(bool)), this, TQT_SLOT(toggle(bool)) ); + connect( ShowDesktop::the(), TQ_SIGNAL(desktopShown(bool)), this, TQ_SLOT(toggle(bool)) ); } TQToolTip::add(this, _qurl->name()); @@ -172,18 +172,18 @@ QuickButton::QuickButton(const TQString &u, TDEAction* configAction, configAction->plug(_popup); _popup->insertSeparator(); _popup->insertItem(SmallIcon("remove"), i18n("Remove Application"), - this, TQT_SLOT(removeApp())); + this, TQ_SLOT(removeApp())); m_stickyAction = new TDEToggleAction(i18n("Never Remove Automatically"), TDEShortcut(), this); - connect(m_stickyAction, TQT_SIGNAL(toggled(bool)), - this, TQT_SLOT(slotStickyToggled(bool))); + connect(m_stickyAction, TQ_SIGNAL(toggled(bool)), + this, TQ_SLOT(slotStickyToggled(bool))); m_stickyAction->plug(_popup, 2); m_stickyId = _popup->idAt(2); - connect(this, TQT_SIGNAL(clicked()), TQT_SLOT(launch())); - connect(this, TQT_SIGNAL(removeApp(QuickButton *)), parent, - TQT_SLOT(removeAppManually(QuickButton *))); + connect(this, TQ_SIGNAL(clicked()), TQ_SLOT(launch())); + connect(this, TQ_SIGNAL(removeApp(QuickButton *)), parent, + TQ_SLOT(removeAppManually(QuickButton *))); } QuickButton::~QuickButton() @@ -266,10 +266,10 @@ void QuickButton::launch() } if (_qurl->kurl().url() == "SPECIAL_BUTTON__SHOW_DESKTOP") { if (isOn()) { - ShowDesktop::the()->showDesktop(TRUE); + ShowDesktop::the()->showDesktop(true); } else { - ShowDesktop::the()->showDesktop(FALSE); + ShowDesktop::the()->showDesktop(false); } } else { @@ -303,7 +303,7 @@ void QuickButton::removeApp() void QuickButton::flash() { m_flashCounter = 2000; - TQTimer::singleShot(0, this, TQT_SLOT(slotFlash())); + TQTimer::singleShot(0, this, TQ_SLOT(slotFlash())); } void QuickButton::slotFlash() @@ -314,7 +314,7 @@ void QuickButton::slotFlash() m_flashCounter -= timeout; if (m_flashCounter < 0) m_flashCounter = 0; update(); - TQTimer::singleShot(timeout, this, TQT_SLOT(slotFlash())); + TQTimer::singleShot(timeout, this, TQ_SLOT(slotFlash())); } } diff --git a/kicker/applets/launcher/quickbuttongroup.h b/kicker/applets/launcher/quickbuttongroup.h index 1c153d85c..d45480542 100644 --- a/kicker/applets/launcher/quickbuttongroup.h +++ b/kicker/applets/launcher/quickbuttongroup.h @@ -28,7 +28,7 @@ public: }; QuickButtonGroup::Index QuickButtonGroup::findDescriptor(const TQString &desc) -{ return findProperty(desc, std::mem_fun(&QuickButton::url));} +{ return findProperty(desc, std::mem_fn(&QuickButton::url));} inline void QuickButtonGroup::setUpdatesEnabled(bool enable) { for (QuickButtonGroup::iterator i=begin();i!=end();++i) { @@ -38,16 +38,16 @@ inline void QuickButtonGroup::setUpdatesEnabled(bool enable) } inline void QuickButtonGroup::show() -{ std::for_each(begin(),end(),std::mem_fun(&TQWidget::show));} +{ std::for_each(begin(),end(),std::mem_fn(&TQWidget::show));} inline void QuickButtonGroup::hide() -{ std::for_each(begin(),end(),std::mem_fun(&TQWidget::hide));} +{ std::for_each(begin(),end(),std::mem_fn(&TQWidget::hide));} inline void QuickButtonGroup::setDragging(bool drag) -{ std::for_each(begin(),end(),std::bind2nd(std::mem_fun(&QuickButton::setDragging),drag));} +{ std::for_each(begin(),end(),std::bind(std::mem_fn(&QuickButton::setDragging),std::placeholders::_1,drag));} inline void QuickButtonGroup::setEnableDrag(bool enable) -{ std::for_each(begin(),end(),std::bind2nd(std::mem_fun(&QuickButton::setEnableDrag),enable));} +{ std::for_each(begin(),end(),std::bind(std::mem_fn(&QuickButton::setEnableDrag),std::placeholders::_1,enable));} inline void QuickButtonGroup::deleteContents() { for (QuickButtonGroup::iterator i=begin();i!=end();++i) { diff --git a/kicker/applets/launcher/quicklauncher.cpp b/kicker/applets/launcher/quicklauncher.cpp index d0f5d25dd..3f703348f 100644 --- a/kicker/applets/launcher/quicklauncher.cpp +++ b/kicker/applets/launcher/quicklauncher.cpp @@ -39,7 +39,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include <tdemessagebox.h> #include <knuminput.h> #include <tdeconfig.h> -#include <kstandarddirs.h> +#include <tdestandarddirs.h> #include <kurldrag.h> #include <kdebug.h> @@ -69,7 +69,7 @@ const ButtonGroup::Index Append=ButtonGroup::Append; extern "C" { - KDE_EXPORT KPanelApplet* init(TQWidget *parent, const TQString& configFile) + TDE_EXPORT KPanelApplet* init(TQWidget *parent, const TQString& configFile) { TDEGlobal::locale()->insertCatalogue("quicklauncher"); return new QuickLauncher(configFile, KPanelApplet::Normal, @@ -108,10 +108,10 @@ QuickLauncher::QuickLauncher(const TQString& configFile, Type type, int actions, m_dragButtons = 0; m_configAction = new TDEAction(i18n("Configure Quicklauncher..."), "configure", TDEShortcut(), - this, TQT_SLOT(slotConfigure()), this); + this, TQ_SLOT(slotConfigure()), this); m_saveTimer = new TQTimer(this, "m_saveTimer"); - connect(m_saveTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(saveConfig())); + connect(m_saveTimer, TQ_SIGNAL(timeout()), this, TQ_SLOT(saveConfig())); m_popularity = new PopularityStatistics(); @@ -168,15 +168,15 @@ void QuickLauncher::buildPopupMenu() m_appletPopup = new TQPopupMenu(this); m_appletPopup->insertItem(i18n("Add Application"), addAppsMenu); m_removeAppsMenu = new TQPopupMenu(this); - connect(m_removeAppsMenu, TQT_SIGNAL(aboutToShow()), - TQT_SLOT(fillRemoveAppsMenu())); - connect(m_removeAppsMenu, TQT_SIGNAL(activated(int)), - TQT_SLOT(removeAppManually(int))); + connect(m_removeAppsMenu, TQ_SIGNAL(aboutToShow()), + TQ_SLOT(fillRemoveAppsMenu())); + connect(m_removeAppsMenu, TQ_SIGNAL(activated(int)), + TQ_SLOT(removeAppManually(int))); m_appletPopup->insertItem(i18n("Remove Application"), m_removeAppsMenu); m_appletPopup->insertSeparator(); m_appletPopup->setCheckable( true ); - m_appletPopup->insertItem(i18n("About"), this, TQT_SLOT(about())); + m_appletPopup->insertItem(i18n("About"), this, TQ_SLOT(about())); setCustomMenu(m_appletPopup); } @@ -235,8 +235,8 @@ void QuickLauncher::slotConfigure() m_configDialog = new ConfigDlg(this, "configdialog", m_settings, SIZE_AUTO, KDialogBase::Plain, KDialogBase::Ok | KDialogBase::Cancel | KDialogBase::Apply | KDialogBase::Default); - connect(m_configDialog, TQT_SIGNAL(settingsChanged()), - this, TQT_SLOT(slotSettingsDialogChanged())); + connect(m_configDialog, TQ_SIGNAL(settingsChanged()), + this, TQ_SLOT(slotSettingsDialogChanged())); } m_configDialog->show(); @@ -392,10 +392,10 @@ void QuickLauncher::addApp(TQString url, bool manuallyAdded) QuickButton* QuickLauncher::createButton(TQString url) { QuickButton* newButton=new QuickButton(url, m_configAction, this); - connect(newButton, TQT_SIGNAL(executed(TQString)), - this, TQT_SLOT(slotOwnServiceExecuted(TQString))); - connect(newButton, TQT_SIGNAL(stickyToggled(bool)), - this, TQT_SLOT(slotStickyToggled())); + connect(newButton, TQ_SIGNAL(executed(TQString)), + this, TQ_SLOT(slotOwnServiceExecuted(TQString))); + connect(newButton, TQ_SIGNAL(stickyToggled(bool)), + this, TQ_SLOT(slotStickyToggled())); newButton->setPopupDirection(popupDirection()); return newButton; } @@ -973,7 +973,7 @@ void QuickLauncher::serviceStartedByStorageId(TQString /*starter*/, TQString sto if (m_settings->autoAdjustEnabled()) { - TQTimer::singleShot(0, this, TQT_SLOT(slotAdjustToCurrentPopularity())); + TQTimer::singleShot(0, this, TQ_SLOT(slotAdjustToCurrentPopularity())); } } @@ -1047,7 +1047,7 @@ void QuickLauncher::slotOwnServiceExecuted(TQString serviceMenuId) m_popularity->useService(serviceMenuId); if (m_settings->autoAdjustEnabled()) { - TQTimer::singleShot(0, this, TQT_SLOT(slotAdjustToCurrentPopularity())); + TQTimer::singleShot(0, this, TQ_SLOT(slotAdjustToCurrentPopularity())); } } diff --git a/kicker/applets/lockout/lockout.cpp b/kicker/applets/lockout/lockout.cpp index 800c9f8a6..770a8431f 100644 --- a/kicker/applets/lockout/lockout.cpp +++ b/kicker/applets/lockout/lockout.cpp @@ -46,7 +46,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. extern "C" { - KDE_EXPORT KPanelApplet* init(TQWidget *parent, const TQString& configFile) + TDE_EXPORT KPanelApplet* init(TQWidget *parent, const TQString& configFile) { TDEGlobal::locale()->insertCatalogue("lockout"); return new Lockout(configFile, parent, "lockout"); @@ -82,25 +82,25 @@ Lockout::Lockout( const TQString& configFile, TQWidget *parent, const char *name bTransparent = conf->readBoolEntry( "Transparent", bTransparent ); - connect( lockButton, TQT_SIGNAL( clicked() ), TQT_SLOT( lock() )); - connect( logoutButton, TQT_SIGNAL( clicked() ), TQT_SLOT( logout() )); + connect( lockButton, TQ_SIGNAL( clicked() ), TQ_SLOT( lock() )); + connect( logoutButton, TQ_SIGNAL( clicked() ), TQ_SLOT( logout() )); lockButton->installEventFilter( this ); logoutButton->installEventFilter( this ); - if (!kapp->authorize("lock_screen")) + if (!tdeApp->authorize("lock_screen")) lockButton->hide(); - if (!kapp->authorize("logout")) + if (!tdeApp->authorize("logout")) logoutButton->hide(); lockButton->setSizePolicy(TQSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding)); logoutButton->setSizePolicy(TQSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding)); - if ( !kapp->dcopClient()->isAttached() ) - kapp->dcopClient()->attach(); + if ( !tdeApp->dcopClient()->isAttached() ) + tdeApp->dcopClient()->attach(); - connect( kapp, TQT_SIGNAL( iconChanged(int) ), TQT_SLOT( slotIconChanged() )); + connect( tdeApp, TQ_SIGNAL( iconChanged(int) ), TQ_SLOT( slotIconChanged() )); } Lockout::~Lockout() @@ -146,12 +146,12 @@ void Lockout::lock() int kicker_screen_number = tqt_xscreen(); if ( kicker_screen_number ) appname.sprintf("kdesktop-screen-%d", kicker_screen_number); - kapp->dcopClient()->send(appname, "KScreensaverIface", "lock()", TQString("")); + tdeApp->dcopClient()->send(appname, "KScreensaverIface", "lock()", TQString("")); } void Lockout::logout() { - kapp->requestShutDown(); + tdeApp->requestShutDown(); } void Lockout::mousePressEvent(TQMouseEvent* e) @@ -185,7 +185,7 @@ void Lockout::propagateMouseEvent(TQMouseEvent* e) bool Lockout::eventFilter( TQObject *o, TQEvent *e ) { - if (!kapp->authorizeTDEAction("kicker_rmb")) + if (!tdeApp->authorizeTDEAction("kicker_rmb")) return false; // Process event normally: if( e->type() == TQEvent::MouseButtonPress ) @@ -201,17 +201,17 @@ bool Lockout::eventFilter( TQObject *o, TQEvent *e ) TQPopupMenu *popup = new TQPopupMenu(); popup->insertItem( SmallIcon( "system-lock-screen" ), i18n("Lock Session"), - this, TQT_SLOT( lock() ) ); + this, TQ_SLOT( lock() ) ); popup->insertSeparator(); i18n("&Transparent"); //popup->insertItem( i18n( "&Transparent" ), 100 ); popup->insertItem( SmallIcon( "configure" ), i18n( "&Configure Screen Saver..." ), - this, TQT_SLOT( slotLockPrefs() ) ); + this, TQ_SLOT( slotLockPrefs() ) ); //popup->setItemChecked( 100, bTransparent ); - //popup->connectItem(100, this, TQT_SLOT( slotTransparent() ) ); + //popup->connectItem(100, this, TQ_SLOT( slotTransparent() ) ); //if (conf->entryIsImmutable( "Transparent" )) // popup->setItemEnabled( 100, false ); popup->exec( me->globalPos() ); @@ -224,15 +224,15 @@ bool Lockout::eventFilter( TQObject *o, TQEvent *e ) TQPopupMenu *popup = new TQPopupMenu(); popup->insertItem( SmallIcon( "system-log-out" ), i18n("&Log Out..."), - this, TQT_SLOT( logout() ) ); + this, TQ_SLOT( logout() ) ); popup->insertSeparator(); //popup->insertItem( i18n( "&Transparent" ), 100 ); popup->insertItem( SmallIcon( "configure" ), i18n( "&Configure Session Manager..." ), - this, TQT_SLOT( slotLogoutPrefs() ) ); + this, TQ_SLOT( slotLogoutPrefs() ) ); //popup->setItemChecked( 100, bTransparent ); - //popup->connectItem(100, this, TQT_SLOT( slotTransparent() ) ); + //popup->connectItem(100, this, TQ_SLOT( slotTransparent() ) ); //if (conf->entryIsImmutable( "Transparent" )) // popup->setItemEnabled( 100, false ); popup->exec( me->globalPos() ); diff --git a/kicker/applets/media/mediaapplet.cpp b/kicker/applets/media/mediaapplet.cpp index b50aea3d8..f1d6c6e2a 100644 --- a/kicker/applets/media/mediaapplet.cpp +++ b/kicker/applets/media/mediaapplet.cpp @@ -33,7 +33,7 @@ extern "C" { - KDE_EXPORT KPanelApplet* init( TQWidget *parent, const TQString configFile) + TDE_EXPORT KPanelApplet* init( TQWidget *parent, const TQString configFile) { TDEGlobal::locale()->insertCatalogue("mediaapplet"); return new MediaApplet(configFile, KPanelApplet::Normal, @@ -57,18 +57,18 @@ MediaApplet::MediaApplet(const TQString& configFile, Type type, int actions, TQW mpDirLister = new KDirLister(); - connect( mpDirLister, TQT_SIGNAL( clear() ), - this, TQT_SLOT( slotClear() ) ); - connect( mpDirLister, TQT_SIGNAL( started(const KURL&) ), - this, TQT_SLOT( slotStarted(const KURL&) ) ); - connect( mpDirLister, TQT_SIGNAL( completed() ), - this, TQT_SLOT( slotCompleted() ) ); - connect( mpDirLister, TQT_SIGNAL( newItems( const KFileItemList & ) ), - this, TQT_SLOT( slotNewItems( const KFileItemList & ) ) ); - connect( mpDirLister, TQT_SIGNAL( deleteItem( KFileItem * ) ), - this, TQT_SLOT( slotDeleteItem( KFileItem * ) ) ); - connect( mpDirLister, TQT_SIGNAL( refreshItems( const KFileItemList & ) ), - this, TQT_SLOT( slotRefreshItems( const KFileItemList & ) ) ); + connect( mpDirLister, TQ_SIGNAL( clear() ), + this, TQ_SLOT( slotClear() ) ); + connect( mpDirLister, TQ_SIGNAL( started(const KURL&) ), + this, TQ_SLOT( slotStarted(const KURL&) ) ); + connect( mpDirLister, TQ_SIGNAL( completed() ), + this, TQ_SLOT( slotCompleted() ) ); + connect( mpDirLister, TQ_SIGNAL( newItems( const KFileItemList & ) ), + this, TQ_SLOT( slotNewItems( const KFileItemList & ) ) ); + connect( mpDirLister, TQ_SIGNAL( deleteItem( KFileItem * ) ), + this, TQ_SLOT( slotDeleteItem( KFileItem * ) ) ); + connect( mpDirLister, TQ_SIGNAL( refreshItems( const KFileItemList & ) ), + this, TQ_SLOT( slotRefreshItems( const KFileItemList & ) ) ); reloadList(); } diff --git a/kicker/applets/media/mediumbutton.cpp b/kicker/applets/media/mediumbutton.cpp index 5977063d7..4cc27ffe8 100644 --- a/kicker/applets/media/mediumbutton.cpp +++ b/kicker/applets/media/mediumbutton.cpp @@ -30,7 +30,7 @@ #include <tdemessagebox.h> #include <kmimetype.h> #include <tdelocale.h> -#include <kdesktopfile.h> +#include <tdedesktopfile.h> #include <krun.h> #include <tdeglobalsettings.h> #include <kcursor.h> @@ -48,10 +48,10 @@ MediumButton::MediumButton(TQWidget *parent, const KFileItem &fileItem) : PanelPopupButton(parent), mActions(this, this), mFileItem(fileItem), mOpenTimer(0, "MediumButton::mOpenTimer") { - TDEAction *a = KStdAction::paste(this, TQT_SLOT(slotPaste()), + TDEAction *a = KStdAction::paste(this, TQ_SLOT(slotPaste()), &mActions, "pasteto"); a->setShortcut(0); - a = KStdAction::copy(this, TQT_SLOT(slotCopy()), &mActions, "copy"); + a = KStdAction::copy(this, TQ_SLOT(slotCopy()), &mActions, "copy"); a->setShortcut(0); setBackgroundOrigin(AncestorOrigin); @@ -64,11 +64,11 @@ MediumButton::MediumButton(TQWidget *parent, const KFileItem &fileItem) refreshType(); - connect(&mOpenTimer, TQT_SIGNAL(timeout()), TQT_SLOT(slotDragOpen())); + connect(&mOpenTimer, TQ_SIGNAL(timeout()), TQ_SLOT(slotDragOpen())); // Activate this code only if we find a way to have both an // action and a popup menu for the same kicker button - //connect(this, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotClicked())); + //connect(this, TQ_SIGNAL(clicked()), this, TQ_SLOT(slotClicked())); setPopup(new TQPopupMenu()); } diff --git a/kicker/applets/menu/menuapplet.cpp b/kicker/applets/menu/menuapplet.cpp index 37ac216a1..d1aae0268 100644 --- a/kicker/applets/menu/menuapplet.cpp +++ b/kicker/applets/menu/menuapplet.cpp @@ -59,7 +59,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. extern "C" { - KDE_EXPORT KPanelApplet* init( TQWidget* parent_P, const TQString& configFile_P ) + TDE_EXPORT KPanelApplet* init( TQWidget* parent_P, const TQString& configFile_P ) { TDEGlobal::locale()->insertCatalogue("kmenuapplet"); return new KickerMenuApplet::Applet( configFile_P, parent_P ); @@ -89,8 +89,8 @@ Applet::Applet( const TQString& configFile_P, TQWidget* parent_P ) setBackgroundOrigin(AncestorOrigin); dcopclient.registerAs( "menuapplet", false ); // toolbarAppearanceChanged(int) is sent when changing macstyle - connect( kapp, TQT_SIGNAL( toolbarAppearanceChanged( int )), - this, TQT_SLOT( readSettings())); + connect( tdeApp, TQ_SIGNAL( toolbarAppearanceChanged( int )), + this, TQ_SLOT( readSettings())); claimSelection(); readSettings(); updateTopEdgeOffset(); @@ -298,11 +298,11 @@ void Applet::claimSelection() { delete selection_watcher; selection_watcher = NULL; - connect( selection, TQT_SIGNAL( lostOwnership()), TQT_SLOT( lostSelection())); + connect( selection, TQ_SIGNAL( lostOwnership()), TQ_SLOT( lostSelection())); module = new KWinModule; - connect( module, TQT_SIGNAL( windowAdded( WId )), this, TQT_SLOT( windowAdded( WId ))); - connect( module, TQT_SIGNAL( activeWindowChanged( WId )), - this, TQT_SLOT( activeWindowChanged( WId ))); + connect( module, TQ_SIGNAL( windowAdded( WId )), this, TQ_SLOT( windowAdded( WId ))); + connect( module, TQ_SIGNAL( activeWindowChanged( WId )), + this, TQ_SLOT( activeWindowChanged( WId ))); TQValueList< WId > windows = module->windows(); for( TQValueList< WId >::ConstIterator it = windows.begin(); it != windows.end(); @@ -328,7 +328,7 @@ void Applet::lostSelection() if( selection_watcher == NULL ) { selection_watcher = new TDESelectionWatcher( makeSelectionAtom(), DefaultScreen( tqt_xdisplay())); - connect( selection_watcher, TQT_SIGNAL( lostOwner()), this, TQT_SLOT( claimSelection())); + connect( selection_watcher, TQ_SIGNAL( lostOwner()), this, TQ_SLOT( claimSelection())); } delete module; module = NULL; diff --git a/kicker/applets/minipager/pagerapplet.cpp b/kicker/applets/minipager/pagerapplet.cpp index be61ad451..0af954fcb 100644 --- a/kicker/applets/minipager/pagerapplet.cpp +++ b/kicker/applets/minipager/pagerapplet.cpp @@ -36,9 +36,9 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include <tdeglobal.h> #include <tdelocale.h> #include <kdebug.h> -#include <kprocess.h> +#include <tdeprocess.h> #include <tdepopupmenu.h> -#include <kstandarddirs.h> +#include <tdestandarddirs.h> #include <kiconloader.h> #include <dcopclient.h> #include <netwm.h> @@ -73,7 +73,7 @@ static const int bgOffset = 300; extern "C" { - KDE_EXPORT KPanelApplet* init(TQWidget *parent, const TQString& configFile) + TDE_EXPORT KPanelApplet* init(TQWidget *parent, const TQString& configFile) { TDEGlobal::locale()->insertCatalogue("kminipagerapplet"); return new KMiniPager(configFile, KPanelApplet::Normal, 0, parent, "kminipagerapplet"); @@ -132,22 +132,22 @@ KMiniPager::KMiniPager(const TQString& configFile, Type type, int actions, drawButtons(); - connect( m_twin, TQT_SIGNAL( currentDesktopChanged(int)), TQT_SLOT( slotSetDesktop(int) ) ); - connect( m_twin, TQT_SIGNAL( currentDesktopViewportChanged(int, const TQPoint&)), TQT_SLOT(slotSetDesktopViewport(int, const TQPoint&))); - connect( m_twin, TQT_SIGNAL( numberOfDesktopsChanged(int)), TQT_SLOT( slotSetDesktopCount(int) ) ); - connect( m_twin, TQT_SIGNAL( desktopGeometryChanged(int)), TQT_SLOT( slotRefreshViewportCount(int) ) ); - connect( m_twin, TQT_SIGNAL( activeWindowChanged(WId)), TQT_SLOT( slotActiveWindowChanged(WId) ) ); - connect( m_twin, TQT_SIGNAL( windowAdded(WId) ), this, TQT_SLOT( slotWindowAdded(WId) ) ); - connect( m_twin, TQT_SIGNAL( windowRemoved(WId) ), this, TQT_SLOT( slotWindowRemoved(WId) ) ); - connect( m_twin, TQT_SIGNAL( windowChanged(WId,unsigned int) ), this, TQT_SLOT( slotWindowChanged(WId,unsigned int) ) ); - connect( m_twin, TQT_SIGNAL( desktopNamesChanged() ), this, TQT_SLOT( slotDesktopNamesChanged() ) ); - connect( kapp, TQT_SIGNAL(backgroundChanged(int)), TQT_SLOT(slotBackgroundChanged(int)) ); + connect( m_twin, TQ_SIGNAL( currentDesktopChanged(int)), TQ_SLOT( slotSetDesktop(int) ) ); + connect( m_twin, TQ_SIGNAL( currentDesktopViewportChanged(int, const TQPoint&)), TQ_SLOT(slotSetDesktopViewport(int, const TQPoint&))); + connect( m_twin, TQ_SIGNAL( numberOfDesktopsChanged(int)), TQ_SLOT( slotSetDesktopCount(int) ) ); + connect( m_twin, TQ_SIGNAL( desktopGeometryChanged(int)), TQ_SLOT( slotRefreshViewportCount(int) ) ); + connect( m_twin, TQ_SIGNAL( activeWindowChanged(WId)), TQ_SLOT( slotActiveWindowChanged(WId) ) ); + connect( m_twin, TQ_SIGNAL( windowAdded(WId) ), this, TQ_SLOT( slotWindowAdded(WId) ) ); + connect( m_twin, TQ_SIGNAL( windowRemoved(WId) ), this, TQ_SLOT( slotWindowRemoved(WId) ) ); + connect( m_twin, TQ_SIGNAL( windowChanged(WId,unsigned int) ), this, TQ_SLOT( slotWindowChanged(WId,unsigned int) ) ); + connect( m_twin, TQ_SIGNAL( desktopNamesChanged() ), this, TQ_SLOT( slotDesktopNamesChanged() ) ); + connect( tdeApp, TQ_SIGNAL(backgroundChanged(int)), TQ_SLOT(slotBackgroundChanged(int)) ); - if (kapp->authorizeTDEAction("kicker_rmb") && kapp->authorizeControlModule("tde-kcmtaskbar.desktop")) + if (tdeApp->authorizeTDEAction("kicker_rmb") && tdeApp->authorizeControlModule("tde-kcmtaskbar.desktop")) { m_contextMenu = new TQPopupMenu(); - connect(m_contextMenu, TQT_SIGNAL(aboutToShow()), TQT_SLOT(aboutToShowContextMenu())); - connect(m_contextMenu, TQT_SIGNAL(activated(int)), TQT_SLOT(contextMenuActivated(int))); + connect(m_contextMenu, TQ_SIGNAL(aboutToShow()), TQ_SLOT(aboutToShowContextMenu())); + connect(m_contextMenu, TQ_SIGNAL(activated(int)), TQ_SLOT(contextMenuActivated(int))); setCustomMenu(m_contextMenu); } @@ -442,7 +442,7 @@ void KMiniPager::wheelEvent( TQWheelEvent* e ) { int newDesk; int desktops = KWin::numberOfDesktops(); - + if(cycleWindow()){ @@ -456,7 +456,7 @@ void KMiniPager::wheelEvent( TQWheelEvent* e ) { newDesk = (desktops + m_curDesk - 2) % desktops + 1; } - + slotButtonSelected(newDesk); } } @@ -484,10 +484,10 @@ void KMiniPager::drawButtons() m_desktops.append( desk ); m_group->insert( desk, count ); - connect(desk, TQT_SIGNAL(buttonSelected(int)), - TQT_SLOT(slotButtonSelected(int)) ); - connect(desk, TQT_SIGNAL(showMenu(const TQPoint&, int )), - TQT_SLOT(slotShowMenu(const TQPoint&, int )) ); + connect(desk, TQ_SIGNAL(buttonSelected(int)), + TQ_SLOT(slotButtonSelected(int)) ); + connect(desk, TQ_SIGNAL(showMenu(const TQPoint&, int )), + TQ_SLOT(slotShowMenu(const TQPoint&, int )) ); desk->show(); ++count; @@ -727,7 +727,7 @@ void KMiniPager::aboutToShowContextMenu() rowMenu->insertItem(i18n("one row or column", "&1"), 1 + rowOffset); rowMenu->insertItem(i18n("two rows or columns", "&2"), 2 + rowOffset); rowMenu->insertItem( i18n("three rows or columns", "&3"), 3 + rowOffset); - connect(rowMenu, TQT_SIGNAL(activated(int)), TQT_SLOT(contextMenuActivated(int))); + connect(rowMenu, TQ_SIGNAL(activated(int)), TQ_SLOT(contextMenuActivated(int))); showMenu->insertItem((orientation()==TQt::Horizontal) ? i18n("&Rows"): i18n("&Columns"), rowMenu); @@ -735,6 +735,7 @@ void KMiniPager::aboutToShowContextMenu() showMenu->insertItem(i18n("&Window Thumbnails"), WindowThumbnails); showMenu->insertItem(i18n("&Window Icons"), WindowIcons); showMenu->insertItem(i18n("&Cycle on Wheel"), Cycle); + showMenu->insertItem(i18n("3&D Desk Borders"), Border3D); showMenu->insertTitle(i18n("Text Label")); showMenu->insertItem(i18n("Desktop N&umber"), @@ -753,7 +754,7 @@ void KMiniPager::aboutToShowContextMenu() showMenu->insertItem(i18n("&Desktop Wallpaper"), PagerSettings::EnumBackgroundType::BgLive + bgOffset); } - connect(showMenu, TQT_SIGNAL(activated(int)), TQT_SLOT(contextMenuActivated(int))); + connect(showMenu, TQ_SIGNAL(activated(int)), TQ_SLOT(contextMenuActivated(int))); m_contextMenu->insertItem(i18n("&Pager Options"),showMenu); m_contextMenu->insertItem(SmallIcon("configure"), @@ -767,10 +768,8 @@ void KMiniPager::aboutToShowContextMenu() m_contextMenu->setItemChecked(WindowThumbnails, m_settings->preview()); m_contextMenu->setItemChecked(WindowIcons, m_settings->icons()); m_contextMenu->setItemChecked(Cycle, m_settings->cycle()); + m_contextMenu->setItemChecked(Border3D, m_settings->border3D()); m_contextMenu->setItemEnabled(WindowIcons, m_settings->preview()); - m_contextMenu->setItemEnabled(RenameDesktop, - m_settings->labelType() == - PagerSettings::EnumLabelType::LabelName); } void KMiniPager::slotShowMenu(const TQPoint& pos, int desktop) @@ -799,7 +798,7 @@ void KMiniPager::contextMenuActivated(int result) return; case ConfigureDesktops: - kapp->startServiceByDesktopName("desktop"); + tdeApp->startServiceByDesktopName("desktop"); return; case RenameDesktop: @@ -822,6 +821,9 @@ void KMiniPager::contextMenuActivated(int result) case Cycle: m_settings->setCycle(!m_settings->cycle()); break; + case Border3D: + m_settings->setBorder3D(!m_settings->border3D()); + break; case WindowIcons: m_settings->setIcons(!m_settings->icons()); break; @@ -883,7 +885,7 @@ void KMiniPager::slotDesktopNamesChanged() void KMiniPager::showPager() { - DCOPClient *dcop=kapp->dcopClient(); + DCOPClient *dcop=tdeApp->dcopClient(); if (dcop->isApplicationRegistered("kpager")) { @@ -892,7 +894,7 @@ void KMiniPager::showPager() else { // Let's run kpager if it isn't running - connect( dcop, TQT_SIGNAL( applicationRegistered(const TQCString &) ), this, TQT_SLOT(applicationRegistered(const TQCString &)) ); + connect( dcop, TQ_SIGNAL( applicationRegistered(const TQCString &) ), this, TQ_SLOT(applicationRegistered(const TQCString &)) ); dcop->setNotifications(true); TQString strAppPath(locate("exe", "kpager")); if (!strAppPath.isEmpty()) @@ -922,7 +924,7 @@ void KMiniPager::showKPager(bool toggleShow) pt=mapToGlobal( TQPoint(x(), y()) ); } - DCOPClient *dcop=kapp->dcopClient(); + DCOPClient *dcop=tdeApp->dcopClient(); TQByteArray data; TQDataStream arg(data, IO_WriteOnly); @@ -941,8 +943,8 @@ void KMiniPager::applicationRegistered( const TQCString & appName ) { if (appName == "kpager") { - disconnect( kapp->dcopClient(), TQT_SIGNAL( applicationRegistered(const TQCString &) ), - this, TQT_SLOT(applicationRegistered(const TQCString &)) ); + disconnect( tdeApp->dcopClient(), TQ_SIGNAL( applicationRegistered(const TQCString &) ), + this, TQ_SLOT(applicationRegistered(const TQCString &)) ); showKPager(false); } } diff --git a/kicker/applets/minipager/pagerapplet.h b/kicker/applets/minipager/pagerapplet.h index ceb5ec8f4..6433a6790 100644 --- a/kicker/applets/minipager/pagerapplet.h +++ b/kicker/applets/minipager/pagerapplet.h @@ -64,7 +64,7 @@ public: void setActive( WId active ) { m_activeWindow = active; } WId activeWindow() { return m_activeWindow; } - enum ConfigOptions { LaunchExtPager = 96, WindowThumbnails, Cycle, + enum ConfigOptions { LaunchExtPager = 96, WindowThumbnails, Cycle, Border3D, WindowIcons, ConfigureDesktops, RenameDesktop }; int labelType() const { return m_settings->labelType(); } @@ -73,6 +73,7 @@ public: bool desktopPreview() const { return m_settings->preview(); } bool cycleWindow() const { return m_settings->cycle(); } bool windowIcons() const { return m_settings->icons(); } + bool border3D() const { return m_settings->border3D(); } Orientation orientation() const { return KPanelApplet::orientation(); } diff --git a/kicker/applets/minipager/pagerbutton.cpp b/kicker/applets/minipager/pagerbutton.cpp index 71e3f465b..3274f406b 100644 --- a/kicker/applets/minipager/pagerbutton.cpp +++ b/kicker/applets/minipager/pagerbutton.cpp @@ -29,6 +29,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include <tqpainter.h> #include <tqpopupmenu.h> #include <tqstylesheet.h> +#include <tqinputdialog.h> #include <netwm.h> #include <dcopclient.h> @@ -83,10 +84,10 @@ KMiniPagerButton::KMiniPagerButton(int desk, bool useViewPorts, const TQPoint& v m_desktopName = m_pager->twin()->desktopName(m_desktop); - connect(this, TQT_SIGNAL(clicked()), TQT_SLOT(slotClicked())); - connect(this, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotToggled(bool))); - connect(&m_dragSwitchTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotDragSwitch())); - connect(&m_updateCompressor, TQT_SIGNAL(timeout()), this, TQT_SLOT(update())); + connect(this, TQ_SIGNAL(clicked()), TQ_SLOT(slotClicked())); + connect(this, TQ_SIGNAL(toggled(bool)), TQ_SLOT(slotToggled(bool))); + connect(&m_dragSwitchTimer, TQ_SIGNAL(timeout()), this, TQ_SLOT(slotDragSwitch())); + connect(&m_updateCompressor, TQ_SIGNAL(timeout()), this, TQ_SLOT(update())); if (m_pager->desktopPreview()) { @@ -213,7 +214,7 @@ void KMiniPagerButton::loadBgPixmap() if (m_pager->bgType() != PagerSettings::EnumBackgroundType::BgLive) return; // not needed - DCOPClient *client = kapp->dcopClient(); + DCOPClient *client = tdeApp->dcopClient(); if (!client->isAttached()) { client->attach(); @@ -247,8 +248,8 @@ void KMiniPagerButton::loadBgPixmap() } else if (s_commonSharedPixmap) { // other button is already fetching the pixmap - connect(s_commonSharedPixmap, TQT_SIGNAL(done(bool)), - TQT_SLOT(backgroundLoaded(bool))); + connect(s_commonSharedPixmap, TQ_SIGNAL(done(bool)), + TQ_SLOT(backgroundLoaded(bool))); return; } } @@ -258,8 +259,8 @@ void KMiniPagerButton::loadBgPixmap() if (!s_commonSharedPixmap) { s_commonSharedPixmap = new TDESharedPixmap; - connect(s_commonSharedPixmap, TQT_SIGNAL(done(bool)), - TQT_SLOT(backgroundLoaded(bool))); + connect(s_commonSharedPixmap, TQ_SIGNAL(done(bool)), + TQ_SLOT(backgroundLoaded(bool))); } retval = s_commonSharedPixmap->loadFromShared(TQString("DESKTOP1")); if (retval == false) { @@ -274,8 +275,8 @@ void KMiniPagerButton::loadBgPixmap() if (!m_sharedPixmap) { m_sharedPixmap = new TDESharedPixmap; - connect(m_sharedPixmap, TQT_SIGNAL(done(bool)), - TQT_SLOT(backgroundLoaded(bool))); + connect(m_sharedPixmap, TQ_SIGNAL(done(bool)), + TQ_SLOT(backgroundLoaded(bool))); } retval = m_sharedPixmap->loadFromShared(TQString("DESKTOP%1").arg(m_desktop)); if (retval == false) { @@ -397,47 +398,39 @@ void KMiniPagerButton::drawButton(TQPainter *bp) } } - if (!liveBkgnd) + // frame + if (liveBkgnd || transparent) { - if (transparent) + if (m_pager->border3D()) { - // transparent windows get an 1 pixel frame... - if (on) - { - bp->setPen(colorGroup().midlight()); - } - else if (down) - { - bp->setPen(KickerLib::blendColors(colorGroup().mid(), - colorGroup().midlight())); - } - else - { - bp->setPen(colorGroup().dark()); - } - - bp->drawRect(0, 0, w, h); + qDrawShadeRect(bp, 0, 0, w, h, on ? palette().active() : palette().inactive()); } else { - TQBrush background; - - if (on) - { - background = colorGroup().brush(TQColorGroup::Midlight); - } - else if (down) - { - background = TQBrush(KickerLib::blendColors(colorGroup().mid(), - colorGroup().midlight())); - } - else - { - background = colorGroup().brush(TQColorGroup::Mid); - } + bp->setPen(on ? colorGroup().midlight() + : KickerLib::blendColors(colorGroup().mid(), colorGroup().midlight())); + bp->drawRect(0, 0, w, h); + } + } + else + { + TQBrush background; - bp->fillRect(0, 0, w, h, background); + if (on) + { + background = colorGroup().brush(TQColorGroup::Midlight); + } + else if (down) + { + background = TQBrush(KickerLib::blendColors(colorGroup().mid(), + colorGroup().midlight())); } + else + { + background = colorGroup().brush(TQColorGroup::Mid); + } + + bp->fillRect(0, 0, w, h, background); } // window preview... @@ -492,22 +485,6 @@ void KMiniPagerButton::drawButton(TQPainter *bp) } } - if (liveBkgnd) - { - // draw a little border around the individual buttons - // makes it look a bit more finished. - if (on) - { - bp->setPen(colorGroup().midlight()); - } - else - { - bp->setPen(colorGroup().mid()); - } - - bp->drawRect(0, 0, w, h); - } - if (m_pager->labelType() != PagerSettings::EnumLabelType::LabelNone) { TQString label = (m_pager->labelType() == PagerSettings::EnumLabelType::LabelNumber) ? @@ -724,17 +701,30 @@ void KMiniPagerButton::slotClicked() void KMiniPagerButton::rename() { - if ( !m_lineEdit ) { - m_lineEdit = new TQLineEdit( this ); - connect( m_lineEdit, TQT_SIGNAL( returnPressed() ), m_lineEdit, TQT_SLOT( hide() ) ); - m_lineEdit->installEventFilter( this ); - } - m_lineEdit->setGeometry( rect() ); - m_lineEdit->setText(m_desktopName); - m_lineEdit->show(); - m_lineEdit->setFocus(); - m_lineEdit->selectAll(); - m_pager->emitRequestFocus(); + if (m_pager->labelType() == PagerSettings::EnumLabelType::LabelName) + { + if ( !m_lineEdit ) { + m_lineEdit = new TQLineEdit(this); + connect(m_lineEdit, TQ_SIGNAL(returnPressed()), m_lineEdit, TQ_SLOT(hide())); + m_lineEdit->installEventFilter(this); + } + m_lineEdit->setGeometry(rect()); + m_lineEdit->setText(m_desktopName); + m_lineEdit->show(); + m_lineEdit->setFocus(); + m_lineEdit->selectAll(); + m_pager->emitRequestFocus(); + } + else + { + m_pager->twin()->setDesktopName( + m_desktop, + TQInputDialog::getText( + i18n("Renaming desktop %1").arg(m_desktopName), + i18n("Enter a new name for desktop %1 (%2):").arg(m_desktop).arg(m_desktopName) + ) + ); + } } void KMiniPagerButton::slotToggled( bool b ) @@ -752,7 +742,7 @@ bool KMiniPagerButton::eventFilter( TQObject *o, TQEvent * e) { m_pager->twin()->setDesktopName( m_desktop, m_lineEdit->text() ); m_desktopName = m_lineEdit->text(); - TQTimer::singleShot( 0, m_lineEdit, TQT_SLOT( deleteLater() ) ); + TQTimer::singleShot( 0, m_lineEdit, TQ_SLOT( deleteLater() ) ); m_lineEdit = 0; return true; } diff --git a/kicker/applets/minipager/pagersettings.kcfg b/kicker/applets/minipager/pagersettings.kcfg index 3a821f20a..11b6aa09d 100644 --- a/kicker/applets/minipager/pagersettings.kcfg +++ b/kicker/applets/minipager/pagersettings.kcfg @@ -49,15 +49,20 @@ <label>Show desktop preview?</label> <default>true</default> </entry> - + <entry name="Icons" type="Bool"> <label>Show window icons in previews?</label> <default>true</default> </entry> - + <entry name="Cycle" type="Bool"> <label>Cycle through desktops with wheel?</label> <default>true</default> </entry> + + <entry name="Border3D" type="Bool"> + <label>3D Desk border</label> + <default>false</default> + </entry> </group> </kcfg> diff --git a/kicker/applets/naughty/NaughtyApplet.cpp b/kicker/applets/naughty/NaughtyApplet.cpp index 2e75890d6..71e08bbe1 100644 --- a/kicker/applets/naughty/NaughtyApplet.cpp +++ b/kicker/applets/naughty/NaughtyApplet.cpp @@ -38,7 +38,7 @@ extern "C" { - KDE_EXPORT KPanelApplet* init(TQWidget * parent, const TQString & configFile) + TDE_EXPORT KPanelApplet* init(TQWidget * parent, const TQString & configFile) { TDEGlobal::locale()->insertCatalogue("naughtyapplet"); @@ -75,20 +75,20 @@ NaughtyApplet::NaughtyApplet connect ( - button_, TQT_SIGNAL(clicked()), - this, TQT_SLOT(slotPreferences()) + button_, TQ_SIGNAL(clicked()), + this, TQ_SLOT(slotPreferences()) ); connect ( - monitor_, TQT_SIGNAL(runawayProcess(ulong, const TQString &)), - this, TQT_SLOT(slotWarn(ulong, const TQString &)) + monitor_, TQ_SIGNAL(runawayProcess(ulong, const TQString &)), + this, TQ_SLOT(slotWarn(ulong, const TQString &)) ); connect ( - monitor_, TQT_SIGNAL(load(uint)), - this, TQT_SLOT(slotLoad(uint)) + monitor_, TQ_SIGNAL(load(uint)), + this, TQ_SLOT(slotLoad(uint)) ); loadSettings(); diff --git a/kicker/applets/naughty/NaughtyProcessMonitor.cpp b/kicker/applets/naughty/NaughtyProcessMonitor.cpp index 0239720fe..63b634e59 100644 --- a/kicker/applets/naughty/NaughtyProcessMonitor.cpp +++ b/kicker/applets/naughty/NaughtyProcessMonitor.cpp @@ -111,7 +111,7 @@ NaughtyProcessMonitor::NaughtyProcessMonitor #ifdef __NetBSD__ d->kd = kvm_open(NULL, NULL, NULL, KVM_NO_FILES, "kvm_open"); #endif - connect(d->timer_, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotTimeout())); + connect(d->timer_, TQ_SIGNAL(timeout()), this, TQ_SLOT(slotTimeout())); } NaughtyProcessMonitor::~NaughtyProcessMonitor() diff --git a/kicker/applets/run/runapplet.cpp b/kicker/applets/run/runapplet.cpp index 1121cf45b..104cd5efe 100644 --- a/kicker/applets/run/runapplet.cpp +++ b/kicker/applets/run/runapplet.cpp @@ -42,7 +42,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. extern "C" { - KDE_EXPORT KPanelApplet* init(TQWidget *parent, const TQString& configFile) + TDE_EXPORT KPanelApplet* init(TQWidget *parent, const TQString& configFile) { TDEGlobal::locale()->insertCatalogue("krunapplet"); return new RunApplet(configFile, KPanelApplet::Stretch, 0, parent, "krunapplet"); @@ -69,15 +69,15 @@ RunApplet::RunApplet(const TQString& configFile, Type type, int actions, f = _btn->font(); f.setPixelSize(12); _btn->setFont(f); - connect(_btn, TQT_SIGNAL(clicked()), TQT_SLOT(popup_combo())); + connect(_btn, TQ_SIGNAL(clicked()), TQ_SLOT(popup_combo())); // setup history combo _input = new KHistoryCombo(this); _input->setFocus(); _input->clearEdit(); watchForFocus(_input->lineEdit()); - connect(_input, TQT_SIGNAL(activated(const TQString&)), - TQT_SLOT(run_command(const TQString&))); + connect(_input, TQ_SIGNAL(activated(const TQString&)), + TQ_SLOT(run_command(const TQString&))); TDEConfig *c = config(); c->setGroup("General"); @@ -209,7 +209,7 @@ void RunApplet::run_command(const TQString& command) TQString exec; bool focusNeeded = false; - kapp->propagateSessionManager(); + tdeApp->propagateSessionManager(); _filterData->setData( _input->currentText().stripWhiteSpace() ); TQStringList filters; @@ -230,7 +230,7 @@ void RunApplet::run_command(const TQString& command) } else if (cmd == "logout") { - bool shutdown = kapp->requestShutDown(); + bool shutdown = tdeApp->requestShutDown(); if( !shutdown ) { // This i18n string is in kdesktop/desktop.cpp as well. Maybe we should DCOP to kdesktop instead ? diff --git a/kicker/applets/swallow/swallow.cpp b/kicker/applets/swallow/swallow.cpp index 1ac34cfec..a9eea202e 100644 --- a/kicker/applets/swallow/swallow.cpp +++ b/kicker/applets/swallow/swallow.cpp @@ -29,7 +29,7 @@ #include <kdebug.h> #include <tdelocale.h> #include <tdemessagebox.h> -#include <kprocess.h> +#include <tdeprocess.h> #include <kshell.h> #include <twin.h> #include <twinmodule.h> @@ -53,7 +53,7 @@ SwallowApplet * SwallowApplet::self = 0L; extern "C" { - KDE_EXPORT KPanelApplet* init(TQWidget *parent, const TQString& configFile) { + TDE_EXPORT KPanelApplet* init(TQWidget *parent, const TQString& configFile) { return new SwallowApplet(configFile, parent, "kswallow applet"); } } @@ -157,11 +157,11 @@ void SwallowApplet::createApps( SwallowCommandList* list ) while ( (it.current()) ) { app = new SwallowApp( it.current(), this ); app->hide(); - connect( app, TQT_SIGNAL( embedded(SwallowApp *)), - TQT_SLOT( embedded(SwallowApp *))); + connect( app, TQ_SIGNAL( embedded(SwallowApp *)), + TQ_SLOT( embedded(SwallowApp *))); appList->append( app ); ++it; - kapp->processEvents(); + tdeApp->processEvents(); } m_layout->activate(); @@ -179,8 +179,8 @@ void SwallowApplet::embedded( SwallowApp *app ) kdDebug() << "--> ratio: " << app->sizeRatio() << endl; kdDebug() << "**** " << app << " is embedded now, with (" << app->width() << ", " << app->height() << ")" << endl; - disconnect( app, TQT_SIGNAL( embedded(SwallowApp *)), - this, TQT_SLOT( embedded(SwallowApp *))); + disconnect( app, TQ_SIGNAL( embedded(SwallowApp *)), + this, TQ_SLOT( embedded(SwallowApp *))); embeddedList->append( app ); @@ -278,8 +278,8 @@ SwallowApp::SwallowApp(const SwallowCommand *swc, TQWidget* parent, QXEmbed::initialize(); winTitle = swc->title; - connect(SwallowApplet::winModule(), TQT_SIGNAL(windowAdded(WId)), - this, TQT_SLOT(windowAdded(WId))); + connect(SwallowApplet::winModule(), TQ_SIGNAL(windowAdded(WId)), + this, TQ_SLOT(windowAdded(WId))); if (!swc->cmdline.isEmpty()) { TDEProcess *process = new TDEProcess; @@ -287,10 +287,10 @@ SwallowApp::SwallowApp(const SwallowCommand *swc, TQWidget* parent, // move window out of sight // *process << "-geometry"; - // *process << TQString("32x32+%1+%2").arg(kapp->desktop()->width()).arg(kapp->desktop()->height()); + // *process << TQString("32x32+%1+%2").arg(tdeApp->desktop()->width()).arg(tdeApp->desktop()->height()); - connect(process, TQT_SIGNAL(processExited(TDEProcess*)), - this, TQT_SLOT(processExited(TDEProcess*))); + connect(process, TQ_SIGNAL(processExited(TDEProcess*)), + this, TQ_SLOT(processExited(TDEProcess*))); process->start(); } @@ -330,8 +330,8 @@ void SwallowApp::windowAdded(WId win) embed(win); XReparentWindow(tqt_xdisplay(), win, winId(), 0, 0); - disconnect(SwallowApplet::winModule(), TQT_SIGNAL(windowAdded(WId)), - this, TQT_SLOT(windowAdded(WId))); + disconnect(SwallowApplet::winModule(), TQ_SIGNAL(windowAdded(WId)), + this, TQ_SLOT(windowAdded(WId))); emit embedded( this ); } diff --git a/kicker/applets/systemtray/systemtrayapplet.cpp b/kicker/applets/systemtray/systemtrayapplet.cpp index 917382d8b..175e037e5 100644 --- a/kicker/applets/systemtray/systemtrayapplet.cpp +++ b/kicker/applets/systemtray/systemtrayapplet.cpp @@ -28,6 +28,8 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include <tqcursor.h> #include <tqpopupmenu.h> +#include <tqspinbox.h> +#include <tqcheckbox.h> #include <tqtimer.h> #include <tqpixmap.h> #include <tqevent.h> @@ -35,6 +37,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include <tqgrid.h> #include <tqpainter.h> #include <tqimage.h> +#include <tqlayout.h> #include <dcopclient.h> #include <tdeapplication.h> @@ -58,12 +61,11 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include <X11/Xlib.h> -#define ICON_MARGIN 1 #define ICON_END_MARGIN KickerSettings::showDeepButtons()?4:0 extern "C" { - KDE_EXPORT KPanelApplet* init(TQWidget *parent, const TQString& configFile) + TDE_EXPORT KPanelApplet* init(TQWidget *parent, const TQString& configFile) { TDEGlobal::locale()->insertCatalogue("ksystemtrayapplet"); return new SystemTrayApplet(configFile, KPanelApplet::Normal, @@ -74,20 +76,22 @@ extern "C" SystemTrayApplet::SystemTrayApplet(const TQString& configFile, Type type, int actions, TQWidget *parent, const char *name) : KPanelApplet(configFile, type, actions, parent, name), - m_showFrame(KickerSettings::showDeepButtons()?true:false), + m_showFrame(KickerSettings::showDeepButtons()), m_showHidden(false), - m_expandButton(0), - m_leftSpacer(0), - m_rightSpacer(0), - m_clockApplet(0), - m_settingsDialog(0), + m_expandButton(nullptr), + m_leftSpacer(nullptr), + m_rightSpacer(nullptr), + m_clockApplet(nullptr), + m_settingsDialog(nullptr), m_iconSelector(0), - m_autoRetractTimer(0), + m_autoRetractTimer(nullptr), m_autoRetract(false), m_iconSize(24), m_showClockInTray(false), - m_showClockSettingCB(0), - m_layout(0) + m_showClockSettingCB(nullptr), + m_iconMargin(1), + m_iconMarginSB(nullptr), + m_layout(nullptr) { DCOPObject::setObjId("SystemTrayApplet"); loadSettings(); @@ -99,19 +103,19 @@ SystemTrayApplet::SystemTrayApplet(const TQString& configFile, Type type, int ac m_clockApplet = new ClockApplet(configFile, KPanelApplet::Normal, KPanelApplet::Preferences, this, "clockapplet"); updateClockGeometry(); - connect(m_clockApplet, TQT_SIGNAL(clockReconfigured()), this, TQT_SLOT(updateClockGeometry())); - connect(m_clockApplet, TQT_SIGNAL(updateLayout()), this, TQT_SLOT(updateClockGeometry())); + connect(m_clockApplet, TQ_SIGNAL(clockReconfigured()), this, TQ_SLOT(updateClockGeometry())); + connect(m_clockApplet, TQ_SIGNAL(updateLayout()), this, TQ_SLOT(updateClockGeometry())); setBackgroundOrigin(AncestorOrigin); twin_module = new KWinModule(this); - // kApplication notifies us of settings changes. added to support + // tdeApp notifies us of settings changes. added to support // disabling of frame effect on mouse hover - kapp->dcopClient()->setNotifications(true); + tdeApp->dcopClient()->setNotifications(true); connectDCOPSignal("kicker", "kicker", "configurationChanged()", "loadSettings()", false); - TQTimer::singleShot(0, this, TQT_SLOT(initialize())); + TQTimer::singleShot(0, this, TQ_SLOT(initialize())); } void SystemTrayApplet::updateClockGeometry() @@ -119,14 +123,14 @@ void SystemTrayApplet::updateClockGeometry() if (m_clockApplet) { m_clockApplet->setPosition(position()); - if (orientation() == TQt::Horizontal) - { - m_clockApplet->setFixedSize(m_clockApplet->widthForHeight(height()),height()); - } - else - { - m_clockApplet->setFixedSize(width(),m_clockApplet->heightForWidth(width())); - } + if (orientation() == TQt::Horizontal) + { + m_clockApplet->setFixedSize(m_clockApplet->widthForHeight(height()),height()); + } + else + { + m_clockApplet->setFixedSize(width(),m_clockApplet->heightForWidth(width())); + } } } @@ -151,10 +155,10 @@ void SystemTrayApplet::initialize() } // the KWinModule notifies us when tray windows are added or removed - connect( twin_module, TQT_SIGNAL( systemTrayWindowAdded(WId) ), - this, TQT_SLOT( systemTrayWindowAdded(WId) ) ); - connect( twin_module, TQT_SIGNAL( systemTrayWindowRemoved(WId) ), - this, TQT_SLOT( updateTrayWindows() ) ); + connect( twin_module, TQ_SIGNAL( systemTrayWindowAdded(WId) ), + this, TQ_SLOT( systemTrayWindowAdded(WId) ) ); + connect( twin_module, TQ_SIGNAL( systemTrayWindowRemoved(WId) ), + this, TQ_SLOT( updateTrayWindows() ) ); TQCString screenstr; screenstr.setNum(tqt_xscreen()); @@ -190,7 +194,7 @@ void SystemTrayApplet::initialize() XSendEvent (display, root, False, StructureNotifyMask, (XEvent *)&xev); } - + setBackground(); } @@ -249,11 +253,11 @@ void SystemTrayApplet::preferences() KDialogBase::Ok | KDialogBase::Apply | KDialogBase::Cancel, KDialogBase::Ok, true); m_settingsDialog->resize(450, 400); - connect(m_settingsDialog, TQT_SIGNAL(applyClicked()), this, TQT_SLOT(applySettings())); - connect(m_settingsDialog, TQT_SIGNAL(okClicked()), this, TQT_SLOT(applySettings())); - connect(m_settingsDialog, TQT_SIGNAL(finished()), this, TQT_SLOT(settingsDialogFinished())); + connect(m_settingsDialog, TQ_SIGNAL(applyClicked()), this, TQ_SLOT(applySettings())); + connect(m_settingsDialog, TQ_SIGNAL(okClicked()), this, TQ_SLOT(applySettings())); + connect(m_settingsDialog, TQ_SIGNAL(finished()), this, TQ_SLOT(settingsDialogFinished())); - TQGrid *settingsGrid = m_settingsDialog->makeGridMainWidget( 2, TQt::Vertical); + TQGrid *settingsGrid = m_settingsDialog->makeGridMainWidget( 3, TQt::Vertical); m_showClockSettingCB = new TQCheckBox(i18n("Show Clock in Tray"), settingsGrid); m_showClockSettingCB->setChecked(m_showClockInTray); @@ -289,6 +293,13 @@ void SystemTrayApplet::preferences() } } + TQHBox *hbox = new TQHBox(settingsGrid); + hbox->setSizePolicy(TQSizePolicy::Maximum, TQSizePolicy::Maximum); + TQLabel *iconMarginL = new TQLabel(i18n("Icon margin: "), hbox); + m_iconMarginSB = new TQSpinBox(0, 20, 1, hbox); + m_iconMarginSB->setSuffix(i18n(" px")); + m_iconMarginSB->setValue(m_iconMargin); + m_settingsDialog->show(); } @@ -307,6 +318,7 @@ void SystemTrayApplet::applySettings() } m_showClockInTray = m_showClockSettingCB->isChecked(); + m_iconMargin = m_iconMarginSB->value(); TDEConfig *conf = config(); @@ -356,6 +368,7 @@ void SystemTrayApplet::applySettings() conf->setGroup("System Tray"); conf->writeEntry("ShowClockInTray", m_showClockInTray); + conf->writeEntry("IconMargin", m_iconMargin); conf->sync(); @@ -448,12 +461,12 @@ void SystemTrayApplet::showExpandButton(bool show) .width(), height() - 4); } - connect(m_expandButton, TQT_SIGNAL(clicked()), - this, TQT_SLOT(toggleExpanded())); + connect(m_expandButton, TQ_SIGNAL(clicked()), + this, TQ_SLOT(toggleExpanded())); m_autoRetractTimer = new TQTimer(this, "m_autoRetractTimer"); - connect(m_autoRetractTimer, TQT_SIGNAL(timeout()), - this, TQT_SLOT(checkAutoRetract())); + connect(m_autoRetractTimer, TQ_SIGNAL(timeout()), + this, TQ_SLOT(checkAutoRetract())); } else { @@ -483,7 +496,7 @@ void SystemTrayApplet::iconSizeChanged() { (*emb)->setFixedSize(m_iconSize, m_iconSize); ++emb; } - + emb = m_hiddenWins.begin(); while (emb != m_hiddenWins.end()) { (*emb)->setFixedSize(m_iconSize, m_iconSize); @@ -516,6 +529,7 @@ void SystemTrayApplet::loadSettings() conf->setGroup("System Tray"); m_iconSize = conf->readNumEntry("systrayIconWidth", 22); m_showClockInTray = conf->readNumEntry("ShowClockInTray", false); + m_iconMargin = conf->readNumEntry("IconMargin", 1); } void SystemTrayApplet::systemTrayWindowAdded( WId w ) @@ -559,7 +573,7 @@ void SystemTrayApplet::embedWindow( WId w, bool kde_tray ) return; } - connect(emb, TQT_SIGNAL(embeddedWindowDestroyed()), TQT_SLOT(updateTrayWindows())); + connect(emb, TQ_SIGNAL(embeddedWindowDestroyed()), TQ_SLOT(updateTrayWindows())); emb->setFixedSize(m_iconSize, m_iconSize); if (shouldHide(w)) @@ -627,7 +641,7 @@ void SystemTrayApplet::updateVisibleWins() (*emb)->hide(); } } - + TQMap< QXEmbed*, TQString > names; // cache window names and classes TQMap< QXEmbed*, TQString > classes; for( TrayEmbedList::const_iterator it = m_shownWins.begin(); @@ -682,8 +696,8 @@ void SystemTrayApplet::refreshExpandButton() if (orientation() == TQt::Vertical) a = m_showHidden ? TQt::DownArrow : TQt::UpArrow; else - a = (m_showHidden ^ kapp->reverseLayout()) ? TQt::RightArrow : TQt::LeftArrow; - + a = (m_showHidden ^ tdeApp->reverseLayout()) ? TQt::RightArrow : TQt::LeftArrow; + m_expandButton->setArrowType(a); } @@ -853,7 +867,7 @@ bool SystemTrayApplet::eventFilter(TQObject* watched, TQEvent* e) { TQPopupMenu* contextMenu = new TQPopupMenu(this); contextMenu->insertItem(SmallIcon("configure"), i18n("Configure System Tray..."), - this, TQT_SLOT(configure())); + this, TQ_SLOT(configure())); contextMenu->exec(static_cast<TQContextMenuEvent*>(e)->globalPos()); @@ -881,7 +895,7 @@ int SystemTrayApplet::widthForHeight(int h) const me->setFixedHeight(h); } - return sizeHint().width(); + return sizeHint().width(); } int SystemTrayApplet::heightForWidth(int w) const @@ -900,7 +914,7 @@ int SystemTrayApplet::heightForWidth(int w) const me->setFixedWidth(w); } - return sizeHint().height(); + return sizeHint().height(); } void SystemTrayApplet::moveEvent( TQMoveEvent* ) @@ -913,7 +927,7 @@ void SystemTrayApplet::resizeEvent( TQResizeEvent* ) { layoutTray(); // we need to give ourselves a chance to adjust our size before calling this - TQTimer::singleShot(0, this, TQT_SIGNAL(updateLayout())); + TQTimer::singleShot(0, this, TQ_SIGNAL(updateLayout())); } void SystemTrayApplet::layoutTray() @@ -933,7 +947,7 @@ void SystemTrayApplet::layoutTray() int i = 0, line, nbrOfLines, heightWidth; bool showExpandButton = m_expandButton && m_expandButton->isVisibleTo(this); delete m_layout; - m_layout = new TQGridLayout(this, 1, 1, ICON_MARGIN, ICON_MARGIN); + m_layout = new TQGridLayout(this, 1, 1, 0, m_iconMargin); if (m_expandButton) { @@ -951,20 +965,20 @@ void SystemTrayApplet::layoutTray() // the opposite direction of line int col = 0; - // + // // The margin and spacing specified in the layout implies that: - // [-- ICON_MARGIN pixels --] [-- first icon --] [-- ICON_MARGIN pixels --] ... [-- ICON_MARGIN pixels --] [-- last icon --] [-- ICON_MARGIN pixels --] + // [-- m_iconMargin pixels --] [-- first icon --] [-- m_iconMargin pixels --] ... [-- m_iconMargin pixels --] [-- last icon --] [-- m_iconMargin pixels --] // - // So, if we say that iconWidth is the icon width plus the ICON_MARGIN pixels spacing, then the available width for the icons - // is the widget width minus ICON_MARGIN pixels margin. Forgetting these ICON_MARGIN pixels broke the layout algorithm in KDE <= 3.5.9. + // So, if we say that iconWidth is the icon width plus the m_iconMargin pixels spacing, then the available width for the icons + // is the widget width minus m_iconMargin pixels margin. Forgetting these m_iconMargin pixels broke the layout algorithm in KDE <= 3.5.9. // // This fix makes the workarounds in the heightForWidth() and widthForHeight() methods unneeded. // if (orientation() == TQt::Vertical) { - int iconWidth = maxIconWidth() + ICON_MARGIN; // +2 for the margins that implied by the layout - heightWidth = width() - ICON_MARGIN; + int iconWidth = maxIconWidth() + m_iconMargin * 2; // +2 for the margins that implied by the layout + heightWidth = width() - m_iconMargin * 2; // to avoid nbrOfLines=0 we ensure heightWidth >= iconWidth! heightWidth = heightWidth < iconWidth ? iconWidth : heightWidth; nbrOfLines = heightWidth / iconWidth; @@ -1040,8 +1054,8 @@ void SystemTrayApplet::layoutTray() } else // horizontal { - int iconHeight = maxIconHeight() + ICON_MARGIN; // +2 for the margins that implied by the layout - heightWidth = height() - ICON_MARGIN; + int iconHeight = maxIconHeight() + m_iconMargin * 2; // +2 for the margins that implied by the layout + heightWidth = height() - m_iconMargin * 2; heightWidth = heightWidth < iconHeight ? iconHeight : heightWidth; // to avoid nbrOfLines=0 nbrOfLines = heightWidth / iconHeight; @@ -1129,11 +1143,11 @@ void SystemTrayApplet::paletteChange(const TQPalette & /* oldPalette */) void SystemTrayApplet::setBackground() { TrayEmbedList::const_iterator lastEmb; - + lastEmb = m_shownWins.end(); for (TrayEmbedList::const_iterator emb = m_shownWins.begin(); emb != lastEmb; ++emb) (*emb)->setBackground(); - + lastEmb = m_hiddenWins.end(); for (TrayEmbedList::const_iterator emb = m_hiddenWins.begin(); emb != lastEmb; ++emb) (*emb)->setBackground(); @@ -1188,7 +1202,7 @@ void TrayEmbed::ensureBackgroundSet() // Get the RGB background image bg.fill(parentWidget(), pos()); TQImage bgImage = bg.convertToImage(); - + // Create the ARGB pixmap Pixmap argbpixmap = XCreatePixmap(x11Display(), embeddedWinId(), width(), height(), 32); GC gc; @@ -1207,7 +1221,7 @@ void TrayEmbed::ensureBackgroundSet() XDrawPoint(x11Display(), argbpixmap, gc, x, y); } } - XFlush(x11Display()); + XFlush(x11Display()); XSetWindowBackgroundPixmap(x11Display(), embeddedWinId(), argbpixmap); XFreePixmap(x11Display(), argbpixmap); XFreeGC(x11Display(), gc); diff --git a/kicker/applets/systemtray/systemtrayapplet.h b/kicker/applets/systemtray/systemtrayapplet.h index 2b49ce93e..d06d42b72 100644 --- a/kicker/applets/systemtray/systemtrayapplet.h +++ b/kicker/applets/systemtray/systemtrayapplet.h @@ -27,8 +27,6 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include <tqvaluevector.h> #include <tqstringlist.h> #include <tqevent.h> -#include <tqlayout.h> -#include <tqcheckbox.h> #include <qxembed.h> #include <dcopobject.h> @@ -40,6 +38,8 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include "simplebutton.h" class TQGridLayout; +class TQSpinBox; +class TQCheckBox; class TQTimer; class KWinModule; class TrayEmbed; @@ -120,6 +120,8 @@ private: int m_iconSize; bool m_showClockInTray; TQCheckBox *m_showClockSettingCB; + uint m_iconMargin; + TQSpinBox *m_iconMarginSB; TQGridLayout* m_layout; }; diff --git a/kicker/applets/taskbar/taskbarapplet.cpp b/kicker/applets/taskbar/taskbarapplet.cpp index 3e76d6a8d..a34db8b73 100644 --- a/kicker/applets/taskbar/taskbarapplet.cpp +++ b/kicker/applets/taskbar/taskbarapplet.cpp @@ -38,12 +38,12 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. extern "C" { - KDE_EXPORT KPanelApplet* init( TQWidget *parent, const TQString& configFile ) + TDE_EXPORT KPanelApplet* init( TQWidget *parent, const TQString& configFile ) { // FIXME: what about two taskbars? perhaps this should be inserted just once TDEGlobal::locale()->insertCatalogue( "ktaskbarapplet" ); int options = 0; - if (kapp->authorizeControlModule("tde-kcmtaskbar.desktop")) + if (tdeApp->authorizeControlModule("tde-kcmtaskbar.desktop")) options = KPanelApplet::Preferences; TaskbarApplet *taskbar = new TaskbarApplet( configFile, KPanelApplet::Stretch, options, parent, "ktaskbarapplet" ); @@ -59,7 +59,7 @@ TaskbarApplet::TaskbarApplet( const TQString& configFile, Type type, int actions TQHBoxLayout* layout = new TQHBoxLayout( this ); container = new TaskBarContainer( false, configFile, this ); container->setBackgroundOrigin( AncestorOrigin ); - connect(container, TQT_SIGNAL(containerCountChanged()), this, TQT_SIGNAL(updateLayout())); + connect(container, TQ_SIGNAL(containerCountChanged()), this, TQ_SIGNAL(updateLayout())); layout->addWidget( container, 1 ); container->popupDirectionChange(popupDirection()); } diff --git a/kicker/applets/trash/trashapplet.cpp b/kicker/applets/trash/trashapplet.cpp index 9665d21b9..b86b5ef9d 100644 --- a/kicker/applets/trash/trashapplet.cpp +++ b/kicker/applets/trash/trashapplet.cpp @@ -31,7 +31,7 @@ extern "C" { - KDE_EXPORT KPanelApplet* init( TQWidget *parent, const TQString& configFile) + TDE_EXPORT KPanelApplet* init( TQWidget *parent, const TQString& configFile) { TDEGlobal::locale()->insertCatalogue("trashapplet"); return new TrashApplet(configFile, KPanelApplet::Normal, @@ -53,12 +53,12 @@ TrashApplet::TrashApplet(const TQString& configFile, Type type, int actions, TQW mpDirLister = new KDirLister(); - connect( mpDirLister, TQT_SIGNAL( clear() ), - this, TQT_SLOT( slotClear() ) ); - connect( mpDirLister, TQT_SIGNAL( completed() ), - this, TQT_SLOT( slotCompleted() ) ); - connect( mpDirLister, TQT_SIGNAL( deleteItem( KFileItem * ) ), - this, TQT_SLOT( slotDeleteItem( KFileItem * ) ) ); + connect( mpDirLister, TQ_SIGNAL( clear() ), + this, TQ_SLOT( slotClear() ) ); + connect( mpDirLister, TQ_SIGNAL( completed() ), + this, TQ_SLOT( slotCompleted() ) ); + connect( mpDirLister, TQ_SIGNAL( deleteItem( KFileItem * ) ), + this, TQ_SLOT( slotDeleteItem( KFileItem * ) ) ); mpDirLister->openURL("trash:/"); } @@ -67,8 +67,8 @@ TrashApplet::~TrashApplet() { // disconnect the dir lister before quitting so as not to crash // on kicker exit - disconnect( mpDirLister, TQT_SIGNAL( clear() ), - this, TQT_SLOT( slotClear() ) ); + disconnect( mpDirLister, TQ_SIGNAL( clear() ), + this, TQ_SLOT( slotClear() ) ); delete mpDirLister; TDEGlobal::locale()->removeCatalogue("trashapplet"); } diff --git a/kicker/applets/trash/trashbutton.cpp b/kicker/applets/trash/trashbutton.cpp index 3205f6910..96efb7436 100644 --- a/kicker/applets/trash/trashbutton.cpp +++ b/kicker/applets/trash/trashbutton.cpp @@ -39,7 +39,7 @@ TrashButton::TrashButton(TQWidget *parent) TDEIO::NetAccess::stat("trash:/", entry, 0L); mFileItem.assign(KFileItem(entry, "trash:/")); - TDEAction *a = KStdAction::paste(this, TQT_SLOT(slotPaste()), + TDEAction *a = KStdAction::paste(this, TQ_SLOT(slotPaste()), &mActions, "paste"); a->setShortcut(0); @@ -53,7 +53,7 @@ TrashButton::TrashButton(TQWidget *parent) // Activate this code only if we find a way to have both an // action and a popup menu for the same kicker button - //connect(this, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotClicked())); + //connect(this, TQ_SIGNAL(clicked()), this, TQ_SLOT(slotClicked())); setPopup(new TQPopupMenu()); } |