summaryrefslogtreecommitdiffstats
path: root/src/libgui/likeback.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/libgui/likeback.cpp')
-rw-r--r--src/libgui/likeback.cpp280
1 files changed, 140 insertions, 140 deletions
diff --git a/src/libgui/likeback.cpp b/src/libgui/likeback.cpp
index eac86ff..c174bbc 100644
--- a/src/libgui/likeback.cpp
+++ b/src/libgui/likeback.cpp
@@ -26,18 +26,18 @@
#include <klocale.h>
#include <kdebug.h>
#include <kmessagebox.h>
-#include <qlayout.h>
-#include <qtoolbutton.h>
-#include <qpushbutton.h>
-#include <qpopupmenu.h>
-#include <qtextedit.h>
-#include <qlayout.h>
-#include <qlabel.h>
+#include <tqlayout.h>
+#include <tqtoolbutton.h>
+#include <tqpushbutton.h>
+#include <tqpopupmenu.h>
+#include <tqtextedit.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
#include <kdialogbase.h>
-#include <qhttp.h>
+#include <tqhttp.h>
#include <kurl.h>
#include <kinputdialog.h>
-#include <qvalidator.h>
+#include <tqvalidator.h>
#include <kdebug.h>
#include <kprocess.h>
#include "netwm.h"
@@ -52,53 +52,53 @@
#include "common/global/about.h"
LikeBack::LikeBack(Button buttons)
- : QWidget( 0, "LikeBack", Qt::WX11BypassWM | Qt::WStyle_NoBorder | Qt::WNoAutoErase | Qt::WStyle_StaysOnTop | Qt::WStyle_NoBorder | Qt::Qt::WGroupLeader)
+ : TQWidget( 0, "LikeBack", TQt::WX11BypassWM | TQt::WStyle_NoBorder | TQt::WNoAutoErase | TQt::WStyle_StaysOnTop | TQt::WStyle_NoBorder | TQt::TQt::WGroupLeader)
, m_buttons(buttons)
{
- QHBoxLayout *layout = new QHBoxLayout(this);
+ TQHBoxLayout *tqlayout = new TQHBoxLayout(this);
- QIconSet likeIconSet = kapp->iconLoader()->loadIconSet("likeback_like", KIcon::Small);
- QIconSet dislikeIconSet = kapp->iconLoader()->loadIconSet("likeback_dislike", KIcon::Small);
- QIconSet bugIconSet = kapp->iconLoader()->loadIconSet("likeback_bug", KIcon::Small);
-// QIconSet configureIconSet = kapp->iconLoader()->loadIconSet("configure", KIcon::Small);
+ TQIconSet likeIconSet = kapp->iconLoader()->loadIconSet("likeback_like", KIcon::Small);
+ TQIconSet dislikeIconSet = kapp->iconLoader()->loadIconSet("likeback_dislike", KIcon::Small);
+ TQIconSet bugIconSet = kapp->iconLoader()->loadIconSet("likeback_bug", KIcon::Small);
+// TQIconSet configureIconSet = kapp->iconLoader()->loadIconSet("configure", KIcon::Small);
- QToolButton *m_likeButton = new QToolButton(this, "ilike");
+ TQToolButton *m_likeButton = new TQToolButton(this, "ilike");
m_likeButton->setIconSet(likeIconSet);
m_likeButton->setTextLabel(i18n("I Like..."));
m_likeButton->setAutoRaise(true);
- connect( m_likeButton, SIGNAL(clicked()), this, SLOT(iLike()) );
- layout->add(m_likeButton);
+ connect( m_likeButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(iLike()) );
+ tqlayout->add(m_likeButton);
- QToolButton *m_dislikeButton = new QToolButton(this, "idonotlike");
+ TQToolButton *m_dislikeButton = new TQToolButton(this, "idonotlike");
m_dislikeButton->setIconSet(dislikeIconSet);
m_dislikeButton->setTextLabel(i18n("I Do not Like..."));
m_dislikeButton->setAutoRaise(true);
- connect( m_dislikeButton, SIGNAL(clicked()), this, SLOT(iDoNotLike()) );
- layout->add(m_dislikeButton);
+ connect( m_dislikeButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(iDoNotLike()) );
+ tqlayout->add(m_dislikeButton);
- QToolButton *m_bugButton = new QToolButton(this, "ifoundabug");
+ TQToolButton *m_bugButton = new TQToolButton(this, "ifoundabug");
m_bugButton->setIconSet(bugIconSet);
m_bugButton->setTextLabel(i18n("I Found a Bug..."));
m_bugButton->setAutoRaise(true);
- connect( m_bugButton, SIGNAL(clicked()), this, SLOT(iFoundABug()) );
- layout->add(m_bugButton);
+ connect( m_bugButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(iFoundABug()) );
+ tqlayout->add(m_bugButton);
- m_configureButton = new QToolButton(this, "configure");
- QIconSet helpIconSet = kapp->iconLoader()->loadIconSet("help", KIcon::Small);
+ m_configureButton = new TQToolButton(this, "configure");
+ TQIconSet helpIconSet = kapp->iconLoader()->loadIconSet("help", KIcon::Small);
m_configureButton->setIconSet(helpIconSet);
m_configureButton->setTextLabel(i18n("Configure..."));
m_configureButton->setAutoRaise(true);
- connect( m_likeButton, SIGNAL(clicked()), this, SLOT(configure()) );
- layout->add(m_configureButton);
-
- QPopupMenu *configureMenu = new QPopupMenu(this);
- configureMenu->insertItem(helpIconSet, i18n("What's &This?"), this , SLOT(showWhatsThisMessage()) );
- QIconSet changeEmailIconSet = kapp->iconLoader()->loadIconSet("mail_generic", KIcon::Small);
- configureMenu->insertItem(changeEmailIconSet, i18n("&Configure Email Address..."), this , SLOT(askEMail()) );
-// QIconSet dontHelpIconSet = kapp->iconLoader()->loadIconSet("stop", KIcon::Small);
-// configureMenu->insertItem( dontHelpIconSet, i18n("&Do not Help Anymore"), this , SLOT(doNotHelpAnymore()) );
+ connect( m_likeButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(configure()) );
+ tqlayout->add(m_configureButton);
+
+ TQPopupMenu *configureMenu = new TQPopupMenu(this);
+ configureMenu->insertItem(helpIconSet, i18n("What's &This?"), this , TQT_SLOT(showWhatsThisMessage()) );
+ TQIconSet changeEmailIconSet = kapp->iconLoader()->loadIconSet("mail_generic", KIcon::Small);
+ configureMenu->insertItem(changeEmailIconSet, i18n("&Configure Email Address..."), this , TQT_SLOT(askEMail()) );
+// TQIconSet dontHelpIconSet = kapp->iconLoader()->loadIconSet("stop", KIcon::Small);
+// configureMenu->insertItem( dontHelpIconSet, i18n("&Do not Help Anymore"), this , TQT_SLOT(doNotHelpAnymore()) );
m_configureButton->setPopup(configureMenu);
- connect( m_configureButton, SIGNAL(pressed()), this, SLOT(openConfigurePopup()) );
+ connect( m_configureButton, TQT_SIGNAL(pressed()), this, TQT_SLOT(openConfigurePopup()) );
if (!emailAddressAlreadyProvided())
//beginFetchingEmail(); // Begin before showing the message, so we have time!
@@ -110,9 +110,9 @@ LikeBack::LikeBack(Button buttons)
// KMessageBox::saveDontShowAgainContinue(messageShown);
// }
- resize(sizeHint());
+ resize(tqsizeHint());
- connect( &m_timer, SIGNAL(timeout()), this, SLOT(autoMove()) );
+ connect( &m_timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(autoMove()) );
m_timer.start(10);
s_instance = this;
@@ -131,7 +131,7 @@ void LikeBack::doNotHelpAnymore()
{
disable();
int result = KMessageBox::questionYesNo(
- kapp->activeWindow(),
+ TQT_TQWIDGET(kapp->activeWindow()),
i18n("Are you sure you do not want to participate anymore in the application enhancing program?"),
i18n("Do not Help Anymore"));
if (result == KMessageBox::No) {
@@ -164,14 +164,14 @@ bool LikeBack::userWantToParticipate()
void LikeBack::showInformationMessage()
{
- QPixmap likeIcon = kapp->iconLoader()->loadIcon("likeback_like", KIcon::Small);
- QPixmap dislikeIcon = kapp->iconLoader()->loadIcon("likeback_dislike", KIcon::Small);
- QPixmap bugIcon = kapp->iconLoader()->loadIcon("likeback_bug", KIcon::Small);
- QMimeSourceFactory::defaultFactory()->setPixmap("likeback_icon_like", likeIcon);
- QMimeSourceFactory::defaultFactory()->setPixmap("likeback_icon_dislike", dislikeIcon);
- QMimeSourceFactory::defaultFactory()->setPixmap("likeback_icon_bug", bugIcon);
+ TQPixmap likeIcon = kapp->iconLoader()->loadIcon("likeback_like", KIcon::Small);
+ TQPixmap dislikeIcon = kapp->iconLoader()->loadIcon("likeback_dislike", KIcon::Small);
+ TQPixmap bugIcon = kapp->iconLoader()->loadIcon("likeback_bug", KIcon::Small);
+ TQMimeSourceFactory::defaultFactory()->setPixmap("likeback_icon_like", likeIcon);
+ TQMimeSourceFactory::defaultFactory()->setPixmap("likeback_icon_dislike", dislikeIcon);
+ TQMimeSourceFactory::defaultFactory()->setPixmap("likeback_icon_bug", bugIcon);
KMessageBox::information(0,
- "<p><b>" + i18n("This is a quick feedback system for %1.").arg(s_about->programName()) + "</b></p>"
+ "<p><b>" + i18n("This is a quick feedback system for %1.").tqarg(s_about->programName()) + "</b></p>"
"<p>" + i18n("To help us improve it, your comments are important.") + "</p>"
"<p>" + i18n("Each time you have a great or frustrating experience, "
"please click the appropriate hand below the window title-bar, "
@@ -182,17 +182,17 @@ void LikeBack::showInformationMessage()
"<tr><td><nobr><img source=\"likeback_icon_bug\">: " + i18n("Report a bug.") + "</nobr></td></tr>"
"</table></p>",
i18n("Help Improve the Application"));
- QMimeSourceFactory::defaultFactory()->setData("likeback_icon_like", 0L);
- QMimeSourceFactory::defaultFactory()->setData("likeback_icon_dislike", 0L);
- QMimeSourceFactory::defaultFactory()->setData("likeback_icon_bug", 0L);
+ TQMimeSourceFactory::defaultFactory()->setData("likeback_icon_like", 0L);
+ TQMimeSourceFactory::defaultFactory()->setData("likeback_icon_dislike", 0L);
+ TQMimeSourceFactory::defaultFactory()->setData("likeback_icon_bug", 0L);
}
-QString LikeBack::s_customLanguageMessage = QString();
+TQString LikeBack::s_customLanguageMessage = TQString();
bool LikeBack::s_allowFeatureWishes = false;
LikeBack::WindowListing LikeBack::s_windowListing = LikeBack::NoListing;
-QString LikeBack::s_hostName = QString();
-QString LikeBack::s_remotePath = QString();
-Q_UINT16 LikeBack::s_hostPort = 16;
+TQString LikeBack::s_hostName = TQString();
+TQString LikeBack::s_remotePath = TQString();
+TQ_UINT16 LikeBack::s_hostPort = 16;
int LikeBack::s_disabledCount = 0;
LikeBack* LikeBack::s_instance = 0;
KConfig* LikeBack::s_config = 0;
@@ -203,22 +203,22 @@ LikeBack* LikeBack::instance()
return s_instance;
}
-QString LikeBack::customLanguageMessage()
+TQString LikeBack::customLanguageMessage()
{
return s_customLanguageMessage;
}
-QString LikeBack::hostName()
+TQString LikeBack::hostName()
{
return s_hostName;
}
-QString LikeBack::remotePath()
+TQString LikeBack::remotePath()
{
return s_remotePath;
}
-Q_UINT16 LikeBack::hostPort()
+TQ_UINT16 LikeBack::hostPort()
{
return s_hostPort;
}
@@ -245,7 +245,7 @@ bool LikeBack::enabled()
return s_disabledCount == 0;
}
-void LikeBack::setServer(QString hostName, QString remotePath, Q_UINT16 hostPort)
+void LikeBack::setServer(TQString hostName, TQString remotePath, TQ_UINT16 hostPort)
{
s_hostName = hostName;
s_remotePath = remotePath;
@@ -257,7 +257,7 @@ void LikeBack::setWindowNamesListing(WindowListing windowListing)
s_windowListing = windowListing;
}
-void LikeBack::setCustomLanguageMessage(const QString &message)
+void LikeBack::setCustomLanguageMessage(const TQString &message)
{
s_customLanguageMessage = message;
}
@@ -274,17 +274,17 @@ bool LikeBack::allowFeatureWishes()
void LikeBack::autoMove()
{
- static QWidget *lastWindow = 0;
+ static TQWidget *lastWindow = 0;
- QWidget *window = kapp->activeWindow();
- // When a Kicker applet has the focus, like the Commandline QLineEdit,
+ TQWidget *window = TQT_TQWIDGET(kapp->activeWindow());
+ // When a Kicker applet has the focus, like the Commandline TQLineEdit,
// the systemtray icon indicates to be the current window and the LikeBack is shown next to the system tray icon.
// It's obviously bad ;-) :
bool shouldShow = false;//(enabled() && window && window->inherits("KMainWindow") );
if (shouldShow) {
//move(window->x() + window->width() - 100 - width(), window->y());
- //move(window->x() + window->width() - 100 - width(), window->mapToGlobal(QPoint(0, 0)).y() - height());
- move(window->mapToGlobal(QPoint(0, 0)).x() + window->width() - width(), window->mapToGlobal(QPoint(0, 0)).y() + 1);
+ //move(window->x() + window->width() - 100 - width(), window->mapToGlobal(TQPoint(0, 0)).y() - height());
+ move(window->mapToGlobal(TQPoint(0, 0)).x() + window->width() - width(), window->mapToGlobal(TQPoint(0, 0)).y() + 1);
if (window != lastWindow && s_windowListing != NoListing)
// if (qstricmp(window->name(), "") == 0 || qstricmp(window->name(), "unnamed") == 0) ;
@@ -319,24 +319,24 @@ void LikeBack::configure()
{
}
-QString LikeBack::activeWindowPath()
+TQString LikeBack::activeWindowPath()
{
- QStringList windowNames;
- QWidget *window = kapp->activeWindow();
+ TQStringList windowNames;
+ TQWidget *window = TQT_TQWIDGET(kapp->activeWindow());
while (window) {
- QString name = window->name();
+ TQString name = window->name();
if (name == "unnamed")
- name += QString(":") + window->className();
+ name += TQString(":") + window->className();
windowNames.append(name);
- window = dynamic_cast<QWidget*>(window->parent());
+ window = dynamic_cast<TQWidget*>(window->tqparent());
}
- QString windowName;
+ TQString windowName;
for (int i = ((int)windowNames.count()) - 1; i >= 0; i--) {
if (windowName.isEmpty())
windowName = windowNames[i];
else
- windowName += QString("~~") + windowNames[i];
+ windowName += TQString("~~") + windowNames[i];
}
return windowName;
@@ -357,7 +357,7 @@ bool LikeBack::emailAddressAlreadyProvided()
return s_config->readBoolEntry("emailAlreadyAsked", false);
}
-QString LikeBack::emailAddress()
+TQString LikeBack::emailAddress()
{
if (!emailAddressAlreadyProvided())
instance()->askEMail();
@@ -365,7 +365,7 @@ QString LikeBack::emailAddress()
return s_config->readEntry("emailAddress", "");
}
-void LikeBack::setEmailAddress(const QString &address)
+void LikeBack::setEmailAddress(const TQString &address)
{
s_config->setGroup("LikeBack");
s_config->writeEntry("emailAddress", address);
@@ -376,27 +376,27 @@ void LikeBack::askEMail()
{
s_config->setGroup("LikeBack");
- QString currentEMailAddress = s_config->readEntry("emailAddress", "");
+ TQString currentEMailAddress = s_config->readEntry("emailAddress", "");
if (!emailAddressAlreadyProvided() && !instance()->m_fetchedEmail.isEmpty())
currentEMailAddress = instance()->m_fetchedEmail;
bool ok;
- QString mailExpString = "[\\w-\\.]+@[\\w-\\.]+\\.[\\w]+";
- //QString namedMailExpString = "[.]*[ \\t]+<" + mailExpString + ">";
- //QRegExp mailExp("^(|" + mailExpString + "|" + namedMailExpString + ")$");
- QRegExp mailExp("^(|" + mailExpString + ")$");
- QRegExpValidator emailValidator(mailExp, this);
+ TQString mailExpString = "[\\w-\\.]+@[\\w-\\.]+\\.[\\w]+";
+ //TQString namedMailExpString = "[.]*[ \\t]+<" + mailExpString + ">";
+ //TQRegExp mailExp("^(|" + mailExpString + "|" + namedMailExpString + ")$");
+ TQRegExp mailExp("^(|" + mailExpString + ")$");
+ TQRegExpValidator emailValidator(mailExp, TQT_TQOBJECT(this));
disable();
- QString email = KInputDialog::getText(
+ TQString email = KInputDialog::getText(
i18n("Set Email Address"),
"<p><b>" + i18n("Please provide your email address.") + "</b></p>" +
"<p>" + i18n("It will only be used to contact you back if more information is needed about your comments, how to reproduce the bugs you report, send bug corrections for you to test...") + "</p>" +
"<p>" + i18n("The email address is optional. If you do not provide any, your comments will be sent anonymously. Just click OK in that case.") + "</p>" +
"<p>" + i18n("You can change or remove your email address whenever you want. For that, use the little arrow icon at the top-right corner of a window.") + "</p>" +
"<p>" + i18n("Your email address (keep empty to post comments anonymously):"),
- currentEMailAddress, &ok, kapp->activeWindow(), /*name=*/(const char*)0, &emailValidator);
+ currentEMailAddress, &ok, TQT_TQWIDGET(kapp->activeWindow()), /*name=*/(const char*)0, &emailValidator);
enable();
if (ok)
@@ -404,15 +404,15 @@ void LikeBack::askEMail()
}
// FIXME: Should be moved to KAboutData? Cigogne will also need it.
-bool LikeBack::isDevelopmentVersion(const QString &version)
+bool LikeBack::isDevelopmentVersion(const TQString &version)
{
- QString theVersion = (version.isEmpty() ? s_about->version() : version);
+ TQString theVersion = (version.isEmpty() ? s_about->version() : version);
- return theVersion.find("alpha", /*index=*/0, /*caseSensitive=*/false) != -1 ||
- theVersion.find("beta", /*index=*/0, /*caseSensitive=*/false) != -1 ||
- theVersion.find("rc", /*index=*/0, /*caseSensitive=*/false) != -1 ||
- theVersion.find("svn", /*index=*/0, /*caseSensitive=*/false) != -1 ||
- theVersion.find("cvs", /*index=*/0, /*caseSensitive=*/false) != -1;
+ return theVersion.tqfind("alpha", /*index=*/0, /*caseSensitive=*/false) != -1 ||
+ theVersion.tqfind("beta", /*index=*/0, /*caseSensitive=*/false) != -1 ||
+ theVersion.tqfind("rc", /*index=*/0, /*caseSensitive=*/false) != -1 ||
+ theVersion.tqfind("svn", /*index=*/0, /*caseSensitive=*/false) != -1 ||
+ theVersion.tqfind("cvs", /*index=*/0, /*caseSensitive=*/false) != -1;
}
void LikeBack::init(KConfig* config, KAboutData* about, Button buttons)
@@ -452,8 +452,8 @@ void LikeBack::init(bool isDevelopmentVersion, Button buttons)
if (m_process)
return;
m_process = new KProcess();
- *m_process << QString::fromLatin1("kcmshell") << QString::fromLatin1("kcm_useraccount");
- connect( m_process, SIGNAL(processExited(KProcess*)), SLOT(endFetchingEmailFrom()) );
+ *m_process << TQString::tqfromLatin1("kcmshell") << TQString::tqfromLatin1("kcm_useraccount");
+ connect( m_process, TQT_SIGNAL(processExited(KProcess*)), TQT_SLOT(endFetchingEmailFrom()) );
if (!m_process->start()) {
kdDebug() << "Couldn't start kcmshell.." << endl;
delete m_process;
@@ -473,23 +473,23 @@ void LikeBack::endFetchingEmailFrom()
// m_configureEmail->setEnabled(true);
// ### KDE4: why oh why is KEmailSettings in kio?
- KConfig emailConf( QString::fromLatin1("emaildefaults") );
+ KConfig emailConf( TQString::tqfromLatin1("emaildefaults") );
// find out the default profile
- emailConf.setGroup(QString::fromLatin1("Defaults"));
- QString profile = QString::fromLatin1("PROFILE_");
- profile += emailConf.readEntry(QString::fromLatin1("Profile"), QString::fromLatin1("Default"));
+ emailConf.setGroup(TQString::tqfromLatin1("Defaults"));
+ TQString profile = TQString::tqfromLatin1("PROFILE_");
+ profile += emailConf.readEntry(TQString::tqfromLatin1("Profile"), TQString::tqfromLatin1("Default"));
emailConf.setGroup(profile);
- QString fromaddr = emailConf.readEntry(QString::fromLatin1("EmailAddress"));
+ TQString fromaddr = emailConf.readEntry(TQString::tqfromLatin1("EmailAddress"));
if (fromaddr.isEmpty()) {
struct passwd *p;
p = getpwuid(getuid());
- m_fetchedEmail = QString::fromLatin1(p->pw_name);
+ m_fetchedEmail = TQString::tqfromLatin1(p->pw_name);
} else {
- QString name = emailConf.readEntry(QString::fromLatin1("FullName"));
+ TQString name = emailConf.readEntry(TQString::tqfromLatin1("FullName"));
if (!name.isEmpty())
- m_fetchedEmail = /*name + QString::fromLatin1(" <") +*/ fromaddr /*+ QString::fromLatin1(">")*/;
+ m_fetchedEmail = /*name + TQString::tqfromLatin1(" <") +*/ fromaddr /*+ TQString::tqfromLatin1(">")*/;
}
// m_from->setText( fromaddr );
}
@@ -502,44 +502,44 @@ void LikeBack::endFetchingEmailFrom()
/** class LikeBackDialog: */
-LikeBackDialog::LikeBackDialog(LikeBack::Button reason, QString windowName, QString context)
- : KDialog(kapp->activeWindow(), "_likeback_feedback_window_")
+LikeBackDialog::LikeBackDialog(LikeBack::Button reason, TQString windowName, TQString context)
+ : KDialog(TQT_TQWIDGET(kapp->activeWindow()), "_likeback_feedback_window_")
, m_reason(reason)
, m_windowName(windowName)
, m_context(context)
{
setModal(true);
- QVBoxLayout *mainLayout = new QVBoxLayout(this);
+ TQVBoxLayout *mainLayout = new TQVBoxLayout(this);
- QWidget *coloredWidget = new QWidget(this);
- QLabel *explainings = new QLabel(this);
- QHBoxLayout *explainingLayout = new QHBoxLayout((QWidget*)0, KDialogBase::marginHint());
+ TQWidget *coloredWidget = new TQWidget(this);
+ TQLabel *explainings = new TQLabel(this);
+ TQHBoxLayout *explainingLayout = new TQHBoxLayout((TQWidget*)0, KDialogBase::marginHint());
explainingLayout->addWidget(explainings);
mainLayout->addWidget(coloredWidget);
- QColor color;
- QColor lineColor;
- QPixmap icon;
- QString title;
- QString please;
+ TQColor color;
+ TQColor lineColor;
+ TQPixmap icon;
+ TQString title;
+ TQString please;
switch (reason) {
case LikeBack::ILike:
- color = QColor("#DFFFDF");
- lineColor = Qt::green;
+ color = TQColor("#DFFFDF");
+ lineColor = TQt::green;
icon = kapp->iconLoader()->loadIcon("likeback_like", KIcon::Small);
title = i18n("I like...");
please = i18n("Please briefly describe what you like.");
break;
case LikeBack::IDoNotLike:
- color = QColor("#FFDFDF");
- lineColor = Qt::red;
+ color = TQColor("#FFDFDF");
+ lineColor = TQt::red;
icon = kapp->iconLoader()->loadIcon("likeback_dislike", KIcon::Small);
title = i18n("I do not like...");
please = i18n("Please briefly describe what you do not like.");
break;
case LikeBack::IFoundABug:
- color = QColor("#C0C0C0");
- lineColor = Qt::black;
+ color = TQColor("#C0C0C0");
+ lineColor = TQt::black;
icon = kapp->iconLoader()->loadIcon("bug", KIcon::Small);
title = i18n("I found a bug...");
please = i18n("Please briefly describe the bug you encountered.");
@@ -549,41 +549,41 @@ LikeBackDialog::LikeBackDialog(LikeBack::Button reason, QString windowName, QStr
return;
}
- QWidget *line = new QWidget(this);
+ TQWidget *line = new TQWidget(this);
line->setPaletteBackgroundColor(lineColor);
line->setFixedHeight(1);
mainLayout->addWidget(line);
mainLayout->addLayout(explainingLayout);
- QHBoxLayout *titleLayout = new QHBoxLayout(0);
+ TQHBoxLayout *titleLayout = new TQHBoxLayout(0);
coloredWidget->setPaletteBackgroundColor(color);
- QLabel *iconLabel = new QLabel(coloredWidget);
+ TQLabel *iconLabel = new TQLabel(coloredWidget);
iconLabel->setPixmap(icon);
- QLabel *titleLabel = new QLabel(title, coloredWidget);
- QFont font = titleLabel->font();
+ TQLabel *titleLabel = new TQLabel(title, coloredWidget);
+ TQFont font = titleLabel->font();
font.setBold(true);
titleLabel->setFont(font);
- titleLabel->setPaletteForegroundColor(Qt::black);
+ titleLabel->setPaletteForegroundColor(TQt::black);
titleLayout->addWidget(iconLabel);
titleLayout->addSpacing(4);
titleLayout->addWidget(titleLabel);
titleLayout->addStretch();
- QVBoxLayout *coloredWidgetLayout = new QVBoxLayout(coloredWidget);
+ TQVBoxLayout *coloredWidgetLayout = new TQVBoxLayout(coloredWidget);
coloredWidgetLayout->setMargin(KDialogBase::marginHint());
coloredWidgetLayout->setSpacing(KDialogBase::spacingHint());
coloredWidgetLayout->addLayout(titleLayout);
- QHBoxLayout *commentLayout = new QHBoxLayout((QWidget*)0);
+ TQHBoxLayout *commentLayout = new TQHBoxLayout((TQWidget*)0);
commentLayout->setMargin(0);
commentLayout->setSpacing(KDialogBase::spacingHint());
- m_comment = new QTextEdit(coloredWidget);
- QIconSet sendIconSet = kapp->iconLoader()->loadIconSet("mail_send", KIcon::Toolbar);
- m_sendButton = new QPushButton(sendIconSet, i18n("Send"), coloredWidget);
- m_sendButton->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Expanding);
+ m_comment = new TQTextEdit(coloredWidget);
+ TQIconSet sendIconSet = kapp->iconLoader()->loadIconSet("mail_send", KIcon::Toolbar);
+ m_sendButton = new TQPushButton(sendIconSet, i18n("Send"), coloredWidget);
+ m_sendButton->tqsetSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Expanding);
m_sendButton->setEnabled(false);
- connect( m_sendButton, SIGNAL(clicked()), this, SLOT(send()) );
- connect( m_comment, SIGNAL(textChanged()), this, SLOT(commentChanged()) );
+ connect( m_sendButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(send()) );
+ connect( m_comment, TQT_SIGNAL(textChanged()), this, TQT_SLOT(commentChanged()) );
commentLayout->addWidget(m_comment);
commentLayout->addWidget(m_sendButton);
coloredWidgetLayout->addLayout(commentLayout);
@@ -607,21 +607,21 @@ LikeBackDialog::LikeBackDialog(LikeBack::Button reason, QString windowName, QStr
resize(kapp->desktop()->width() / 2, kapp->desktop()->height() / 3);
setCaption(kapp->makeStdCaption(i18n("Send a Comment")));
- // setMinimumSize(mainLayout->sizeHint()); // FIXME: Doesn't work!
+ // setMinimumSize(mainLayout->tqsizeHint()); // FIXME: Doesn't work!
}
LikeBackDialog::~LikeBackDialog()
{
}
-QHttp *http ;
+TQHttp *http ;
void LikeBackDialog::send()
{
- QString emailAddress = LikeBack::instance()->emailAddress();
+ TQString emailAddress = LikeBack::instance()->emailAddress();
- QString type = (m_reason == LikeBack::ILike ? "Like" : (m_reason == LikeBack::IDoNotLike ? "Dislike" : "Bug"));
- QString data =
+ TQString type = (m_reason == LikeBack::ILike ? "Like" : (m_reason == LikeBack::IDoNotLike ? "Dislike" : "Bug"));
+ TQString data =
"protocol=" + KURL::encode_string("1.0") + "&" +
"type=" + KURL::encode_string(type) + "&" +
"version=" + KURL::encode_string(LikeBack::about()->version()) + "&" +
@@ -630,15 +630,15 @@ void LikeBackDialog::send()
"context=" + KURL::encode_string(m_context) + "&" +
"comment=" + KURL::encode_string(m_comment->text()) + "&" +
"email=" + KURL::encode_string(emailAddress);
- //QByteArray *data = new QByteArray();
- /*QHttp **/http = new QHttp(LikeBack::hostName(), LikeBack::hostPort());
+ //TQByteArray *data = new TQByteArray();
+ /*TQHttp **/http = new TQHttp(LikeBack::hostName(), LikeBack::hostPort());
// std::cout << "http://" << LikeBack::hostName() << ":" << LikeBack::hostPort() << LikeBack::remotePath() << std::endl;
// std::cout << data << std::endl;
- connect( http, SIGNAL(requestFinished(int, bool)), this, SLOT(requestFinished(int, bool)) );
+ connect( http, TQT_SIGNAL(requestFinished(int, bool)), this, TQT_SLOT(requestFinished(int, bool)) );
// http->post(LikeBack::remotePath(), data.utf8());
- QHttpRequestHeader header("POST", LikeBack::remotePath());
+ TQHttpRequestHeader header("POST", LikeBack::remotePath());
header.setValue("Host", LikeBack::hostName());
header.setValue("Content-Type", "application/x-www-form-urlencoded");
http->setHost(LikeBack::hostName());
@@ -656,7 +656,7 @@ void LikeBackDialog::requestFinished(int /*id*/, bool error)
if (error) {
KMessageBox::error(this, i18n("<p>Error while trying to send the report.</p><p>Please retry later.</p>"), i18n("Transfer Error"));
} else {
- KMessageBox::information(this, i18n("<p>Your comment has been sent successfully. It will help improve the application.</p><p>Thanks for your time.</p>") /*+ QString(http->readAll())*/, i18n("Comment Sent"));
+ KMessageBox::information(this, i18n("<p>Your comment has been sent successfully. It will help improve the application.</p><p>Thanks for your time.</p>") /*+ TQString(http->readAll())*/, i18n("Comment Sent"));
close();
}
LikeBack::enable();