diff options
Diffstat (limited to 'src/likeback.cpp')
-rw-r--r-- | src/likeback.cpp | 76 |
1 files changed, 38 insertions, 38 deletions
diff --git a/src/likeback.cpp b/src/likeback.cpp index aade7ca..4ffb58e 100644 --- a/src/likeback.cpp +++ b/src/likeback.cpp @@ -18,15 +18,15 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * ***************************************************************************/ -#include <kapplication.h> -#include <kaboutdata.h> -#include <kconfig.h> -#include <kaction.h> +#include <tdeapplication.h> +#include <tdeaboutdata.h> +#include <tdeconfig.h> +#include <tdeaction.h> #include <kiconloader.h> -#include <kaboutdata.h> -#include <klocale.h> +#include <tdeaboutdata.h> +#include <tdelocale.h> #include <kdebug.h> -#include <kmessagebox.h> +#include <tdemessagebox.h> #include <ntqlayout.h> #include <ntqtoolbutton.h> #include <kpushbutton.h> @@ -65,10 +65,10 @@ LikeBackBar::LikeBackBar(LikeBack *likeBack) { TQHBoxLayout *layout = new TQHBoxLayout(this); - TQIconSet likeIconSet = kapp->iconLoader()->loadIconSet("likeback_like_tork", KIcon::Small); - TQIconSet dislikeIconSet = kapp->iconLoader()->loadIconSet("likeback_dislike_tork", KIcon::Small); - TQIconSet bugIconSet = kapp->iconLoader()->loadIconSet("likeback_bug_tork", KIcon::Small); - TQIconSet featureIconSet = kapp->iconLoader()->loadIconSet("likeback_feature_tork", KIcon::Small); + TQIconSet likeIconSet = kapp->iconLoader()->loadIconSet("likeback_like_tork", TDEIcon::Small); + TQIconSet dislikeIconSet = kapp->iconLoader()->loadIconSet("likeback_dislike_tork", TDEIcon::Small); + TQIconSet bugIconSet = kapp->iconLoader()->loadIconSet("likeback_bug_tork", TDEIcon::Small); + TQIconSet featureIconSet = kapp->iconLoader()->loadIconSet("likeback_feature_tork", TDEIcon::Small); m_likeButton = new TQToolButton(this, "likeback_like_tork"); m_likeButton->setIconSet(likeIconSet); @@ -208,7 +208,7 @@ LikeBackPrivate::~LikeBackPrivate() /********** class LikeBack: **********/ /*************************************/ -LikeBack::LikeBack(Button buttons, bool showBarByDefault, KConfig *config, const KAboutData *aboutData) +LikeBack::LikeBack(Button buttons, bool showBarByDefault, TDEConfig *config, const TDEAboutData *aboutData) : TQObject() { // Initialize properties (1/2): @@ -218,7 +218,7 @@ LikeBack::LikeBack(Button buttons, bool showBarByDefault, KConfig *config, const d->aboutData = aboutData; d->showBarByDefault = showBarByDefault; - // Use default KApplication config and aboutData if not provided: + // Use default TDEApplication config and aboutData if not provided: if (d->config == 0) d->config = kapp->config(); if (d->aboutData == 0) @@ -364,20 +364,20 @@ LikeBack::Button LikeBack::buttons() return d->buttons; } -const KAboutData* LikeBack::aboutData() +const TDEAboutData* LikeBack::aboutData() { return d->aboutData; } -KConfig* LikeBack::config() +TDEConfig* LikeBack::config() { return d->config; } -KAction* LikeBack::sendACommentAction(KActionCollection *parent) +TDEAction* LikeBack::sendACommentAction(TDEActionCollection *parent) { if (d->action == 0) - d->action = new KAction( + d->action = new TDEAction( i18n("&Send a Comment to Developers"), /*icon=*/"mail_new", /*shortcut=*/"", this, SLOT(execCommentDialog()), parent, "likeback_send_a_comment" @@ -412,10 +412,10 @@ void LikeBack::setUserWantsToShowBar(bool showBar) void LikeBack::showInformationMessage() { // Load and register the images needed by the message: - TQPixmap likeIcon = kapp->iconLoader()->loadIcon("likeback_like_tork", KIcon::Small); - TQPixmap dislikeIcon = kapp->iconLoader()->loadIcon("likeback_dislike_tork", KIcon::Small); - TQPixmap bugIcon = kapp->iconLoader()->loadIcon("likeback_bug_tork", KIcon::Small); - TQPixmap featureIcon = kapp->iconLoader()->loadIcon("likeback_feature_tork", KIcon::Small); + TQPixmap likeIcon = kapp->iconLoader()->loadIcon("likeback_like_tork", TDEIcon::Small); + TQPixmap dislikeIcon = kapp->iconLoader()->loadIcon("likeback_dislike_tork", TDEIcon::Small); + TQPixmap bugIcon = kapp->iconLoader()->loadIcon("likeback_bug_tork", TDEIcon::Small); + TQPixmap featureIcon = kapp->iconLoader()->loadIcon("likeback_feature_tork", TDEIcon::Small); TQMimeSourceFactory::defaultFactory()->setPixmap("likeback_icon_like", likeIcon); TQMimeSourceFactory::defaultFactory()->setPixmap("likeback_icon_dislike", dislikeIcon); TQMimeSourceFactory::defaultFactory()->setPixmap("likeback_icon_bug", bugIcon); @@ -566,7 +566,7 @@ void LikeBack::askEmailAddress() setEmailAddress(email); } -// FIXME: Should be moved to KAboutData? Cigogne will also need it. +// FIXME: Should be moved to TDEAboutData? Cigogne will also need it. bool LikeBack::isDevelopmentVersion(const TQString &version) { return version.find("alpha", /*index=*/0, /*caseSensitive=*/false) != -1 || @@ -577,17 +577,17 @@ bool LikeBack::isDevelopmentVersion(const TQString &version) } /** - * Code from KBugReport::slotConfigureEmail() in kdeui/kbugreport.cpp: + * Code from KBugReport::slotConfigureEmail() in tdeui/kbugreport.cpp: */ /*void LikeBack::beginFetchingEmail() { if (m_process) return; - m_process = new KProcess(); - *m_process << TQString::fromLatin1("kcmshell") << TQString::fromLatin1("kcm_useraccount"); - connect( m_process, SIGNAL(processExited(KProcess*)), SLOT(fetchUserEmail()) ); + m_process = new TDEProcess(); + *m_process << TQString::fromLatin1("tdecmshell") << TQString::fromLatin1("kcm_useraccount"); + connect( m_process, SIGNAL(processExited(TDEProcess*)), SLOT(fetchUserEmail()) ); if (!m_process->start()) { - kdDebug() << "Couldn't start kcmshell.." << endl; + kdDebug() << "Couldn't start tdecmshell.." << endl; delete m_process; m_process = 0; return; @@ -596,7 +596,7 @@ bool LikeBack::isDevelopmentVersion(const TQString &version) }*/ /** - * Code from KBugReport::slotSetFrom() in kdeui/kbugreport.cpp: + * Code from KBugReport::slotSetFrom() in tdeui/kbugreport.cpp: */ void LikeBack::fetchUserEmail() { @@ -604,8 +604,8 @@ void LikeBack::fetchUserEmail() // m_process = 0; // m_configureEmail->setEnabled(true); - // ### KDE4: why oh why is KEmailSettings in kio? - KConfig emailConf( TQString::fromLatin1("emaildefaults") ); + // ### KDE4: why oh why is KEmailSettings in tdeio? + TDEConfig emailConf( TQString::fromLatin1("emaildefaults") ); // find out the default profile emailConf.setGroup(TQString::fromLatin1("Defaults")); @@ -668,7 +668,7 @@ LikeBackDialog::LikeBackDialog(LikeBack::Button reason, const TQString &initialC TQWidget *buttons = new TQWidget(box); TQGridLayout *buttonsGrid = new TQGridLayout(buttons, /*nbRows=*/4, /*nbColumns=*/2, /*margin=*/0, spacingHint()); if (m_likeBack->buttons() & LikeBack::Like) { - TQPixmap likePixmap = kapp->iconLoader()->loadIcon("likeback_like_tork", KIcon::NoGroup, 16, KIcon::DefaultState, 0L, true); + TQPixmap likePixmap = kapp->iconLoader()->loadIcon("likeback_like_tork", TDEIcon::NoGroup, 16, TDEIcon::DefaultState, 0L, true); TQLabel *likeIcon = new TQLabel(buttons); likeIcon->setPixmap(likePixmap); likeIcon->setSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed); @@ -678,7 +678,7 @@ LikeBackDialog::LikeBackDialog(LikeBack::Button reason, const TQString &initialC m_group->insert(likeButton, LikeBack::Like); } if (m_likeBack->buttons() & LikeBack::Dislike) { - TQPixmap dislikePixmap = kapp->iconLoader()->loadIcon("likeback_dislike_tork", KIcon::NoGroup, 16, KIcon::DefaultState, 0L, true); + TQPixmap dislikePixmap = kapp->iconLoader()->loadIcon("likeback_dislike_tork", TDEIcon::NoGroup, 16, TDEIcon::DefaultState, 0L, true); TQLabel *dislikeIcon = new TQLabel(buttons); dislikeIcon->setPixmap(dislikePixmap); dislikeIcon->setSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed); @@ -688,7 +688,7 @@ LikeBackDialog::LikeBackDialog(LikeBack::Button reason, const TQString &initialC m_group->insert(dislikeButton, LikeBack::Dislike); } if (m_likeBack->buttons() & LikeBack::Bug) { - TQPixmap bugPixmap = kapp->iconLoader()->loadIcon("likeback_bug_tork", KIcon::NoGroup, 16, KIcon::DefaultState, 0L, true); + TQPixmap bugPixmap = kapp->iconLoader()->loadIcon("likeback_bug_tork", TDEIcon::NoGroup, 16, TDEIcon::DefaultState, 0L, true); TQLabel *bugIcon = new TQLabel(buttons); bugIcon->setPixmap(bugPixmap); bugIcon->setSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed); @@ -698,7 +698,7 @@ LikeBackDialog::LikeBackDialog(LikeBack::Button reason, const TQString &initialC m_group->insert(bugButton, LikeBack::Bug); } if (m_likeBack->buttons() & LikeBack::Feature) { - TQPixmap featurePixmap = kapp->iconLoader()->loadIcon("likeback_feature_tork", KIcon::NoGroup, 16, KIcon::DefaultState, 0L, true); + TQPixmap featurePixmap = kapp->iconLoader()->loadIcon("likeback_feature_tork", TDEIcon::NoGroup, 16, TDEIcon::DefaultState, 0L, true); TQLabel *featureIcon = new TQLabel(buttons); featureIcon->setPixmap(featurePixmap); featureIcon->setSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed); @@ -749,11 +749,11 @@ TQString LikeBackDialog::introductionText() TQStringList locales = m_likeBack->acceptedLocales(); for (TQStringList::Iterator it = locales.begin(); it != locales.end(); ++it) { TQString locale = *it; - if (KGlobal::locale()->language().startsWith(locale)) + if (TDEGlobal::locale()->language().startsWith(locale)) languagesMessage = ""; } } else { - if (!KGlobal::locale()->language().startsWith("en")) + if (!TDEGlobal::locale()->language().startsWith("en")) languagesMessage = i18n("Please write in English."); } @@ -761,7 +761,7 @@ TQString LikeBackDialog::introductionText() // TODO: Replace the URL with a localized one: text += languagesMessage + " " + i18n("You may be able to use an <a href=\"%1\">online translation tool</a>.") - .arg("http://www.google.com/language_tools?hl=" + KGlobal::locale()->language()) + .arg("http://www.google.com/language_tools?hl=" + TDEGlobal::locale()->language()) + " "; // If both "I Like" and "I Dislike" buttons are shown and one is clicked: @@ -811,7 +811,7 @@ void LikeBackDialog::send() "protocol=" + KURL::encode_string("1.0") + '&' + "type=" + KURL::encode_string(type) + '&' + "version=" + KURL::encode_string(m_likeBack->aboutData()->version()) + '&' + - "locale=" + KURL::encode_string(KGlobal::locale()->language()) + '&' + + "locale=" + KURL::encode_string(TDEGlobal::locale()->language()) + '&' + "window=" + KURL::encode_string(m_windowPath) + '&' + "context=" + KURL::encode_string(m_context) + '&' + "comment=" + KURL::encode_string(m_comment->text()) + '&' + |