summaryrefslogtreecommitdiffstats
path: root/src/likeback.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/likeback.cpp')
-rw-r--r--src/likeback.cpp242
1 files changed, 121 insertions, 121 deletions
diff --git a/src/likeback.cpp b/src/likeback.cpp
index e8cadf4..aade7ca 100644
--- a/src/likeback.cpp
+++ b/src/likeback.cpp
@@ -27,24 +27,24 @@
#include <klocale.h>
#include <kdebug.h>
#include <kmessagebox.h>
-#include <qlayout.h>
-#include <qtoolbutton.h>
+#include <ntqlayout.h>
+#include <ntqtoolbutton.h>
#include <kpushbutton.h>
-#include <qcheckbox.h>
-#include <qradiobutton.h>
-#include <qbuttongroup.h>
-#include <qvgroupbox.h>
+#include <ntqcheckbox.h>
+#include <ntqradiobutton.h>
+#include <ntqbuttongroup.h>
+#include <ntqvgroupbox.h>
#include <kguiitem.h>
-#include <qpopupmenu.h>
-#include <qtextedit.h>
-#include <qlayout.h>
-#include <qlabel.h>
+#include <ntqpopupmenu.h>
+#include <ntqtextedit.h>
+#include <ntqlayout.h>
+#include <ntqlabel.h>
#include <kdialogbase.h>
-#include <qhttp.h>
+#include <ntqhttp.h>
#include <kurl.h>
#include <kinputdialog.h>
-#include <qvalidator.h>
-#include <qaction.h>
+#include <ntqvalidator.h>
+#include <ntqaction.h>
#include <kdebug.h>
#include <pwd.h>
@@ -60,38 +60,38 @@
/****************************************/
LikeBackBar::LikeBackBar(LikeBack *likeBack)
- : QWidget(0, "LikeBackBar", Qt::WX11BypassWM | Qt::WStyle_NoBorder | Qt::WNoAutoErase | Qt::WStyle_StaysOnTop | Qt::WStyle_NoBorder | Qt::Qt::WGroupLeader)
+ : TQWidget(0, "LikeBackBar", TQt::WX11BypassWM | TQt::WStyle_NoBorder | TQt::WNoAutoErase | TQt::WStyle_StaysOnTop | TQt::WStyle_NoBorder | TQt::TQt::WGroupLeader)
, m_likeBack(likeBack)
{
- QHBoxLayout *layout = new QHBoxLayout(this);
+ TQHBoxLayout *layout = new TQHBoxLayout(this);
- QIconSet likeIconSet = kapp->iconLoader()->loadIconSet("likeback_like_tork", KIcon::Small);
- QIconSet dislikeIconSet = kapp->iconLoader()->loadIconSet("likeback_dislike_tork", KIcon::Small);
- QIconSet bugIconSet = kapp->iconLoader()->loadIconSet("likeback_bug_tork", KIcon::Small);
- QIconSet featureIconSet = kapp->iconLoader()->loadIconSet("likeback_feature_tork", KIcon::Small);
+ 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);
- m_likeButton = new QToolButton(this, "likeback_like_tork");
+ m_likeButton = new TQToolButton(this, "likeback_like_tork");
m_likeButton->setIconSet(likeIconSet);
m_likeButton->setTextLabel("<p>" + i18n("Send application developers a comment about something you like"));
m_likeButton->setAutoRaise(true);
connect( m_likeButton, SIGNAL(clicked()), this, SLOT(clickedLike()) );
layout->add(m_likeButton);
- m_dislikeButton = new QToolButton(this, "likeback_dislike_tork");
+ m_dislikeButton = new TQToolButton(this, "likeback_dislike_tork");
m_dislikeButton->setIconSet(dislikeIconSet);
m_dislikeButton->setTextLabel("<p>" + i18n("Send application developers a comment about something you dislike"));
m_dislikeButton->setAutoRaise(true);
connect( m_dislikeButton, SIGNAL(clicked()), this, SLOT(clickedDislike()) );
layout->add(m_dislikeButton);
- m_bugButton = new QToolButton(this, "likeback_bug_tork");
+ m_bugButton = new TQToolButton(this, "likeback_bug_tork");
m_bugButton->setIconSet(bugIconSet);
m_bugButton->setTextLabel("<p>" + i18n("Send application developers a comment about an improper behavior of the application"));
m_bugButton->setAutoRaise(true);
connect( m_bugButton, SIGNAL(clicked()), this, SLOT(clickedBug()) );
layout->add(m_bugButton);
- m_featureButton = new QToolButton(this, "likeback_feature_tork");
+ m_featureButton = new TQToolButton(this, "likeback_feature_tork");
m_featureButton->setIconSet(featureIconSet);
m_featureButton->setTextLabel("<p>" + i18n("Send application developers a comment about a new feature you desire"));
m_featureButton->setAutoRaise(true);
@@ -123,20 +123,20 @@ void LikeBackBar::stopTimer()
void LikeBackBar::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 = 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 = (m_likeBack->userWantsToShowBar() && m_likeBack->enabledBar() && window && !window->inherits("KSystemTray"));
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 && m_likeBack->windowNamesListing() != LikeBack::NoListing) {
- if (qstricmp(window->name(), "") == 0 || qstricmp(window->name(), "unnamed") == 0) {
+ if (tqstricmp(window->name(), "") == 0 || tqstricmp(window->name(), "unnamed") == 0) {
std::cout << "===== LikeBack ===== UNNAMED ACTIVE WINDOW OF TYPE " << window->className() << " ======" << LikeBack::activeWindowPath() << std::endl;
} else if (m_likeBack->windowNamesListing() == LikeBack::AllWindows) {
std::cout << "LikeBack: Active Window: " << LikeBack::activeWindowPath() << std::endl;
@@ -209,7 +209,7 @@ LikeBackPrivate::~LikeBackPrivate()
/*************************************/
LikeBack::LikeBack(Button buttons, bool showBarByDefault, KConfig *config, const KAboutData *aboutData)
- : QObject()
+ : TQObject()
{
// Initialize properties (1/2):
d = new LikeBackPrivate();
@@ -244,7 +244,7 @@ LikeBack::LikeBack(Button buttons, bool showBarByDefault, KConfig *config, const
// Show the bar if that's wanted by the developer or the user:
if (d->showBar)
- QTimer::singleShot( 0, d->bar, SLOT(startTimer()) );
+ TQTimer::singleShot( 0, d->bar, SLOT(startTimer()) );
#if 0
disableBar();
@@ -284,40 +284,40 @@ LikeBack::WindowListing LikeBack::windowNamesListing()
return d->windowListing;
}
-void LikeBack::setAcceptedLanguages(const QStringList &locales, const QString &message)
+void LikeBack::setAcceptedLanguages(const TQStringList &locales, const TQString &message)
{
d->acceptedLocales = locales;
d->acceptedLanguagesMessage = message;
}
-QStringList LikeBack::acceptedLocales()
+TQStringList LikeBack::acceptedLocales()
{
return d->acceptedLocales;
}
-QString LikeBack::acceptedLanguagesMessage()
+TQString LikeBack::acceptedLanguagesMessage()
{
return d->acceptedLanguagesMessage;
}
-void LikeBack::setServer(const QString &hostName, const QString &remotePath, Q_UINT16 hostPort)
+void LikeBack::setServer(const TQString &hostName, const TQString &remotePath, TQ_UINT16 hostPort)
{
d->hostName = hostName;
d->remotePath = remotePath;
d->hostPort = hostPort;
}
-QString LikeBack::hostName()
+TQString LikeBack::hostName()
{
return d->hostName;
}
-QString LikeBack::remotePath()
+TQString LikeBack::remotePath()
{
return d->remotePath;
}
-Q_UINT16 LikeBack::hostPort()
+TQ_UINT16 LikeBack::hostPort()
{
return d->hostPort;
}
@@ -346,7 +346,7 @@ bool LikeBack::enabledBar()
return d->disabledCount <= 0;
}
-void LikeBack::execCommentDialog(Button type, const QString &initialComment, const QString &windowPath, const QString &context)
+void LikeBack::execCommentDialog(Button type, const TQString &initialComment, const TQString &windowPath, const TQString &context)
{
disableBar();
LikeBackDialog dialog(type, initialComment, windowPath, context, this);
@@ -412,14 +412,14 @@ void LikeBack::setUserWantsToShowBar(bool showBar)
void LikeBack::showInformationMessage()
{
// Load and register the images needed by the message:
- QPixmap likeIcon = kapp->iconLoader()->loadIcon("likeback_like_tork", KIcon::Small);
- QPixmap dislikeIcon = kapp->iconLoader()->loadIcon("likeback_dislike_tork", KIcon::Small);
- QPixmap bugIcon = kapp->iconLoader()->loadIcon("likeback_bug_tork", KIcon::Small);
- QPixmap featureIcon = kapp->iconLoader()->loadIcon("likeback_feature_tork", KIcon::Small);
- QMimeSourceFactory::defaultFactory()->setPixmap("likeback_icon_like", likeIcon);
- QMimeSourceFactory::defaultFactory()->setPixmap("likeback_icon_dislike", dislikeIcon);
- QMimeSourceFactory::defaultFactory()->setPixmap("likeback_icon_bug", bugIcon);
- QMimeSourceFactory::defaultFactory()->setPixmap("likeback_icon_feature", featureIcon);
+ 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);
+ TQMimeSourceFactory::defaultFactory()->setPixmap("likeback_icon_like", likeIcon);
+ TQMimeSourceFactory::defaultFactory()->setPixmap("likeback_icon_dislike", dislikeIcon);
+ TQMimeSourceFactory::defaultFactory()->setPixmap("likeback_icon_bug", bugIcon);
+ TQMimeSourceFactory::defaultFactory()->setPixmap("likeback_icon_feature", featureIcon);
// Show a message reflecting the allowed types of comment:
Button buttons = d->buttons;
@@ -447,7 +447,7 @@ void LikeBack::showInformationMessage()
"please click the frowning face below the window title-bar, "
"briefly describe what you dislike and click Send.")
:
- QString()
+ TQString()
))) + "</p>" +
(buttons & LikeBack::Bug ?
"<p>" +
@@ -481,33 +481,33 @@ void LikeBack::showInformationMessage()
i18n("Help Improve the Application"));
// Reset the images from the factory:
- QMimeSourceFactory::defaultFactory()->setData("likeback_icon_like", 0L);
- QMimeSourceFactory::defaultFactory()->setData("likeback_icon_dislike", 0L);
- QMimeSourceFactory::defaultFactory()->setData("likeback_icon_bug", 0L);
- QMimeSourceFactory::defaultFactory()->setData("likeback_icon_feature", 0L);
+ TQMimeSourceFactory::defaultFactory()->setData("likeback_icon_like", 0L);
+ TQMimeSourceFactory::defaultFactory()->setData("likeback_icon_dislike", 0L);
+ TQMimeSourceFactory::defaultFactory()->setData("likeback_icon_bug", 0L);
+ TQMimeSourceFactory::defaultFactory()->setData("likeback_icon_feature", 0L);
}
-QString LikeBack::activeWindowPath()
+TQString LikeBack::activeWindowPath()
{
// Compute the window hierarchy (from the latest to the oldest):
- QStringList windowNames;
- QWidget *window = kapp->activeWindow();
+ TQStringList windowNames;
+ TQWidget *window = kapp->activeWindow();
while (window) {
- QString name = window->name();
+ TQString name = window->name();
// Append the class name to the window name if it is unnamed:
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->parent());
}
// Create the string of windows starting by the end (from the oldest to the latest):
- QString windowPath;
+ TQString windowPath;
for (int i = ((int)windowNames.count()) - 1; i >= 0; i--) {
if (windowPath.isEmpty())
windowPath = windowNames[i];
else
- windowPath += QString("~~") + windowNames[i];
+ windowPath += TQString("~~") + windowNames[i];
}
// Finally return the computed path:
@@ -520,7 +520,7 @@ bool LikeBack::emailAddressAlreadyProvided()
return d->config->readBoolEntry("emailAlreadyAsked", false);
}
-QString LikeBack::emailAddress()
+TQString LikeBack::emailAddress()
{
if (!emailAddressAlreadyProvided())
askEmailAddress();
@@ -529,7 +529,7 @@ QString LikeBack::emailAddress()
return d->config->readEntry("emailAddress", "");
}
-void LikeBack::setEmailAddress(const QString &address, bool userProvided)
+void LikeBack::setEmailAddress(const TQString &address, bool userProvided)
{
d->config->setGroup("LikeBack");
d->config->writeEntry("emailAddress", address);
@@ -541,20 +541,20 @@ void LikeBack::askEmailAddress()
{
d->config->setGroup("LikeBack");
- QString currentEmailAddress = d->config->readEntry("emailAddress", "");
+ TQString currentEmailAddress = d->config->readEntry("emailAddress", "");
if (!emailAddressAlreadyProvided() && !d->fetchedEmail.isEmpty())
currentEmailAddress = d->fetchedEmail;
bool ok;
- QString emailExpString = "[\\w-\\.]+@[\\w-\\.]+\\.[\\w]+";
- //QString namedEmailExpString = "[.]*[ \\t]+<" + emailExpString + '>';
- //QRegExp emailExp("^(|" + emailExpString + '|' + namedEmailExpString + ")$");
- QRegExp emailExp("^(|" + emailExpString + ")$");
- QRegExpValidator emailValidator(emailExp, this);
+ TQString emailExpString = "[\\w-\\.]+@[\\w-\\.]+\\.[\\w]+";
+ //TQString namedEmailExpString = "[.]*[ \\t]+<" + emailExpString + '>';
+ //TQRegExp emailExp("^(|" + emailExpString + '|' + namedEmailExpString + ")$");
+ TQRegExp emailExp("^(|" + emailExpString + ")$");
+ TQRegExpValidator emailValidator(emailExp, this);
disableBar();
- QString email = KInputDialog::getText(
+ TQString email = KInputDialog::getText(
i18n("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, ask you how to reproduce the bugs you report, send bug corrections for you to test, etc.") + "</p>" +
@@ -567,7 +567,7 @@ void LikeBack::askEmailAddress()
}
// FIXME: Should be moved to KAboutData? Cigogne will also need it.
-bool LikeBack::isDevelopmentVersion(const QString &version)
+bool LikeBack::isDevelopmentVersion(const TQString &version)
{
return version.find("alpha", /*index=*/0, /*caseSensitive=*/false) != -1 ||
version.find("beta", /*index=*/0, /*caseSensitive=*/false) != -1 ||
@@ -584,7 +584,7 @@ bool LikeBack::isDevelopmentVersion(const QString &version)
if (m_process)
return;
m_process = new KProcess();
- *m_process << QString::fromLatin1("kcmshell") << QString::fromLatin1("kcm_useraccount");
+ *m_process << TQString::fromLatin1("kcmshell") << TQString::fromLatin1("kcm_useraccount");
connect( m_process, SIGNAL(processExited(KProcess*)), SLOT(fetchUserEmail()) );
if (!m_process->start()) {
kdDebug() << "Couldn't start kcmshell.." << endl;
@@ -605,23 +605,23 @@ void LikeBack::fetchUserEmail()
// m_configureEmail->setEnabled(true);
// ### KDE4: why oh why is KEmailSettings in kio?
- KConfig emailConf( QString::fromLatin1("emaildefaults") );
+ KConfig emailConf( TQString::fromLatin1("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::fromLatin1("Defaults"));
+ TQString profile = TQString::fromLatin1("PROFILE_");
+ profile += emailConf.readEntry(TQString::fromLatin1("Profile"), TQString::fromLatin1("Default"));
emailConf.setGroup(profile);
- QString fromaddr = emailConf.readEntry(QString::fromLatin1("EmailAddress"));
+ TQString fromaddr = emailConf.readEntry(TQString::fromLatin1("EmailAddress"));
if (fromaddr.isEmpty()) {
struct passwd *p;
p = getpwuid(getuid());
- d->fetchedEmail = QString::fromLatin1(p->pw_name);
+ d->fetchedEmail = TQString::fromLatin1(p->pw_name);
} else {
- QString name = emailConf.readEntry(QString::fromLatin1("FullName"));
+ TQString name = emailConf.readEntry(TQString::fromLatin1("FullName"));
if (!name.isEmpty())
- d->fetchedEmail = /*name + QString::fromLatin1(" <") +*/ fromaddr /*+ QString::fromLatin1(">")*/;
+ d->fetchedEmail = /*name + TQString::fromLatin1(" <") +*/ fromaddr /*+ TQString::fromLatin1(">")*/;
}
// m_from->setText( fromaddr );
}
@@ -630,7 +630,7 @@ void LikeBack::fetchUserEmail()
/********** class LikeBackDialog: **********/
/*******************************************/
-LikeBackDialog::LikeBackDialog(LikeBack::Button reason, const QString &initialComment, const QString &windowPath, const QString &context, LikeBack *likeBack)
+LikeBackDialog::LikeBackDialog(LikeBack::Button reason, const TQString &initialComment, const TQString &windowPath, const TQString &context, LikeBack *likeBack)
: KDialogBase(KDialogBase::Swallow, i18n("Send a Comment to Developers"), KDialogBase::Ok | KDialogBase::Cancel | KDialogBase::Default,
KDialogBase::Ok, kapp->activeWindow(), /*name=*/"_likeback_feedback_window_", /*modal=*/true, /*separator=*/true)
, m_likeBack(likeBack)
@@ -652,57 +652,57 @@ LikeBackDialog::LikeBackDialog(LikeBack::Button reason, const QString &initialCo
if (m_windowPath.isEmpty())
m_windowPath = LikeBack::activeWindowPath();
- QWidget *page = new QWidget(this);
- QVBoxLayout *pageLayout = new QVBoxLayout(page, /*margin=*/0, spacingHint());
+ TQWidget *page = new TQWidget(this);
+ TQVBoxLayout *pageLayout = new TQVBoxLayout(page, /*margin=*/0, spacingHint());
// The introduction message:
- QLabel *introduction = new QLabel(introductionText(), page);
+ TQLabel *introduction = new TQLabel(introductionText(), page);
pageLayout->addWidget(introduction);
// The comment group:
- m_group = new QButtonGroup(0);//i18n("Send Application Developers a Comment About:"), page);
- QVGroupBox *box = new QVGroupBox(i18n("Send Application Developers a Comment About:"), page);
+ m_group = new TQButtonGroup(0);//i18n("Send Application Developers a Comment About:"), page);
+ TQVGroupBox *box = new TQVGroupBox(i18n("Send Application Developers a Comment About:"), page);
pageLayout->addWidget(box);
// The radio buttons:
- QWidget *buttons = new QWidget(box);
- QGridLayout *buttonsGrid = new QGridLayout(buttons, /*nbRows=*/4, /*nbColumns=*/2, /*margin=*/0, spacingHint());
+ TQWidget *buttons = new TQWidget(box);
+ TQGridLayout *buttonsGrid = new TQGridLayout(buttons, /*nbRows=*/4, /*nbColumns=*/2, /*margin=*/0, spacingHint());
if (m_likeBack->buttons() & LikeBack::Like) {
- QPixmap likePixmap = kapp->iconLoader()->loadIcon("likeback_like_tork", KIcon::NoGroup, 16, KIcon::DefaultState, 0L, true);
- QLabel *likeIcon = new QLabel(buttons);
+ TQPixmap likePixmap = kapp->iconLoader()->loadIcon("likeback_like_tork", KIcon::NoGroup, 16, KIcon::DefaultState, 0L, true);
+ TQLabel *likeIcon = new TQLabel(buttons);
likeIcon->setPixmap(likePixmap);
- likeIcon->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
- QRadioButton *likeButton = new QRadioButton(i18n("Something you &like"), buttons);
+ likeIcon->setSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed);
+ TQRadioButton *likeButton = new TQRadioButton(i18n("Something you &like"), buttons);
buttonsGrid->addWidget(likeIcon, /*row=*/0, /*column=*/0);
buttonsGrid->addWidget(likeButton, /*row=*/0, /*column=*/1);
m_group->insert(likeButton, LikeBack::Like);
}
if (m_likeBack->buttons() & LikeBack::Dislike) {
- QPixmap dislikePixmap = kapp->iconLoader()->loadIcon("likeback_dislike_tork", KIcon::NoGroup, 16, KIcon::DefaultState, 0L, true);
- QLabel *dislikeIcon = new QLabel(buttons);
+ TQPixmap dislikePixmap = kapp->iconLoader()->loadIcon("likeback_dislike_tork", KIcon::NoGroup, 16, KIcon::DefaultState, 0L, true);
+ TQLabel *dislikeIcon = new TQLabel(buttons);
dislikeIcon->setPixmap(dislikePixmap);
- dislikeIcon->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
- QRadioButton *dislikeButton = new QRadioButton(i18n("Something you &dislike"), buttons);
+ dislikeIcon->setSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed);
+ TQRadioButton *dislikeButton = new TQRadioButton(i18n("Something you &dislike"), buttons);
buttonsGrid->addWidget(dislikeIcon, /*row=*/1, /*column=*/0);
buttonsGrid->addWidget(dislikeButton, /*row=*/1, /*column=*/1);
m_group->insert(dislikeButton, LikeBack::Dislike);
}
if (m_likeBack->buttons() & LikeBack::Bug) {
- QPixmap bugPixmap = kapp->iconLoader()->loadIcon("likeback_bug_tork", KIcon::NoGroup, 16, KIcon::DefaultState, 0L, true);
- QLabel *bugIcon = new QLabel(buttons);
+ TQPixmap bugPixmap = kapp->iconLoader()->loadIcon("likeback_bug_tork", KIcon::NoGroup, 16, KIcon::DefaultState, 0L, true);
+ TQLabel *bugIcon = new TQLabel(buttons);
bugIcon->setPixmap(bugPixmap);
- bugIcon->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
- QRadioButton *bugButton = new QRadioButton(i18n("An improper &behavior of this application"), buttons);
+ bugIcon->setSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed);
+ TQRadioButton *bugButton = new TQRadioButton(i18n("An improper &behavior of this application"), buttons);
buttonsGrid->addWidget(bugIcon, /*row=*/2, /*column=*/0);
buttonsGrid->addWidget(bugButton, /*row=*/2, /*column=*/1);
m_group->insert(bugButton, LikeBack::Bug);
}
if (m_likeBack->buttons() & LikeBack::Feature) {
- QPixmap featurePixmap = kapp->iconLoader()->loadIcon("likeback_feature_tork", KIcon::NoGroup, 16, KIcon::DefaultState, 0L, true);
- QLabel *featureIcon = new QLabel(buttons);
+ TQPixmap featurePixmap = kapp->iconLoader()->loadIcon("likeback_feature_tork", KIcon::NoGroup, 16, KIcon::DefaultState, 0L, true);
+ TQLabel *featureIcon = new TQLabel(buttons);
featureIcon->setPixmap(featurePixmap);
- featureIcon->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
- QRadioButton *featureButton = new QRadioButton(i18n("A new &feature you desire"), buttons);
+ featureIcon->setSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed);
+ TQRadioButton *featureButton = new TQRadioButton(i18n("A new &feature you desire"), buttons);
buttonsGrid->addWidget(featureIcon, /*row=*/3, /*column=*/0);
buttonsGrid->addWidget(featureButton, /*row=*/3, /*column=*/1);
m_group->insert(featureButton, LikeBack::Feature);
@@ -710,12 +710,12 @@ LikeBackDialog::LikeBackDialog(LikeBack::Button reason, const QString &initialCo
m_group->setButton(reason);
// The comment text box:
- m_comment = new QTextEdit(box);
+ m_comment = new TQTextEdit(box);
m_comment->setTabChangesFocus(true);
- m_comment->setTextFormat(QTextEdit::PlainText);
+ m_comment->setTextFormat(TQTextEdit::PlainText);
m_comment->setText(initialComment);
- m_showButtons = new QCheckBox(i18n("Show comment buttons below &window titlebars"), page);
+ m_showButtons = new TQCheckBox(i18n("Show comment buttons below &window titlebars"), page);
m_showButtons->setChecked(m_likeBack->userWantsToShowBar());
pageLayout->addWidget(m_showButtons);
connect( m_showButtons, SIGNAL(stateChanged(int)), this, SLOT(changeButtonBarVisible()) );
@@ -726,10 +726,10 @@ LikeBackDialog::LikeBackDialog(LikeBack::Button reason, const QString &initialCo
setButtonGuiItem(Default, KGuiItem(i18n("&Email Address..."), "mail_generic"));
- resize(QSize(kapp->desktop()->width() * 1 / 2, kapp->desktop()->height() * 3 / 5).expandedTo(sizeHint()));
+ resize(TQSize(kapp->desktop()->width() * 1 / 2, kapp->desktop()->height() * 3 / 5).expandedTo(sizeHint()));
- QAction *sendShortcut = new QAction(this);
- sendShortcut->setAccel(QString("Ctrl+Return"));
+ TQAction *sendShortcut = new TQAction(this);
+ sendShortcut->setAccel(TQString("Ctrl+Return"));
connect( sendShortcut, SIGNAL(activated()), actionButton(Ok), SLOT(animateClick()) );
setMainWidget(page);
@@ -739,16 +739,16 @@ LikeBackDialog::~LikeBackDialog()
{
}
-QString LikeBackDialog::introductionText()
+TQString LikeBackDialog::introductionText()
{
- QString text = "<p>" + i18n("Please provide a brief description of your opinion of %1.").arg(m_likeBack->aboutData()->programName()) + " ";
+ TQString text = "<p>" + i18n("Please provide a brief description of your opinion of %1.").arg(m_likeBack->aboutData()->programName()) + " ";
- QString languagesMessage = "";
+ TQString languagesMessage = "";
if (!m_likeBack->acceptedLocales().isEmpty() && !m_likeBack->acceptedLanguagesMessage().isEmpty()) {
languagesMessage = m_likeBack->acceptedLanguagesMessage();
- QStringList locales = m_likeBack->acceptedLocales();
- for (QStringList::Iterator it = locales.begin(); it != locales.end(); ++it) {
- QString locale = *it;
+ TQStringList locales = m_likeBack->acceptedLocales();
+ for (TQStringList::Iterator it = locales.begin(); it != locales.end(); ++it) {
+ TQString locale = *it;
if (KGlobal::locale()->language().startsWith(locale))
languagesMessage = "";
}
@@ -797,17 +797,17 @@ void LikeBackDialog::changeButtonBarVisible()
void LikeBackDialog::commentChanged()
{
- QPushButton *sendButton = actionButton(Ok);
+ TQPushButton *sendButton = actionButton(Ok);
sendButton->setEnabled(!m_comment->text().isEmpty());
}
void LikeBackDialog::send()
{
- QString emailAddress = m_likeBack->emailAddress();
+ TQString emailAddress = m_likeBack->emailAddress();
int reason = m_group->selectedId();
- QString type = (reason == LikeBack::Like ? "Like" : (reason == LikeBack::Dislike ? "Dislike" : (reason == LikeBack::Bug ? "Bug" : "Feature")));
- QString data =
+ TQString type = (reason == LikeBack::Like ? "Like" : (reason == LikeBack::Dislike ? "Dislike" : (reason == LikeBack::Bug ? "Bug" : "Feature")));
+ TQString data =
"protocol=" + KURL::encode_string("1.0") + '&' +
"type=" + KURL::encode_string(type) + '&' +
"version=" + KURL::encode_string(m_likeBack->aboutData()->version()) + '&' +
@@ -816,13 +816,13 @@ void LikeBackDialog::send()
"context=" + KURL::encode_string(m_context) + '&' +
"comment=" + KURL::encode_string(m_comment->text()) + '&' +
"email=" + KURL::encode_string(emailAddress);
- QHttp *http = new QHttp(m_likeBack->hostName(), m_likeBack->hostPort());
+ TQHttp *http = new TQHttp(m_likeBack->hostName(), m_likeBack->hostPort());
std::cout << "http://" << m_likeBack->hostName() << ":" << m_likeBack->hostPort() << m_likeBack->remotePath() << std::endl;
std::cout << data << std::endl;
connect( http, SIGNAL(requestFinished(int, bool)), this, SLOT(requestFinished(int, bool)) );
- QHttpRequestHeader header("POST", m_likeBack->remotePath());
+ TQHttpRequestHeader header("POST", m_likeBack->remotePath());
header.setValue("Host", m_likeBack->hostName());
header.setValue("Content-Type", "application/x-www-form-urlencoded");
http->setHost(m_likeBack->hostName());