summaryrefslogtreecommitdiffstats
path: root/kbiff/setupdlg.cpp
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2013-07-02 19:34:37 +0200
committerSlávek Banko <slavek.banko@axis.cz>2013-07-02 19:34:37 +0200
commit979e7a713aabb63ffbe53b6a42a90e87bf4d1969 (patch)
treed81fe703502efa28fdcb3a10a9310af33ddf581b /kbiff/setupdlg.cpp
parent9be78eabfff24f317148c216f609e4d4778e3d58 (diff)
downloadkbiff-979e7a713aabb63ffbe53b6a42a90e87bf4d1969.tar.gz
kbiff-979e7a713aabb63ffbe53b6a42a90e87bf4d1969.zip
Initial TQt conversion
Diffstat (limited to 'kbiff/setupdlg.cpp')
-rw-r--r--kbiff/setupdlg.cpp536
1 files changed, 268 insertions, 268 deletions
diff --git a/kbiff/setupdlg.cpp b/kbiff/setupdlg.cpp
index ba2c1a3..ff7300d 100644
--- a/kbiff/setupdlg.cpp
+++ b/kbiff/setupdlg.cpp
@@ -8,25 +8,25 @@
#include "setupdlg.h"
#include "setupdlg.moc"
-#include <qgroupbox.h>
-#include <qfileinfo.h>
-#include <qlineedit.h>
-#include <qcheckbox.h>
-#include <qpushbutton.h>
-#include <qcombobox.h>
-#include <qheader.h>
-#include <qtabwidget.h>
-
-#include <qpixmap.h>
-#include <qfont.h>
-#include <qlabel.h>
-#include <qstrlist.h>
-#include <qlayout.h>
-#include <qtooltip.h>
-#include <qdict.h>
-#include <qlist.h>
-#include <qwhatsthis.h>
-#include <qstylesheet.h>
+#include <ntqgroupbox.h>
+#include <ntqfileinfo.h>
+#include <ntqlineedit.h>
+#include <ntqcheckbox.h>
+#include <ntqpushbutton.h>
+#include <ntqcombobox.h>
+#include <ntqheader.h>
+#include <ntqtabwidget.h>
+
+#include <ntqpixmap.h>
+#include <ntqfont.h>
+#include <ntqlabel.h>
+#include <ntqstrlist.h>
+#include <ntqlayout.h>
+#include <ntqtooltip.h>
+#include <ntqdict.h>
+#include <ntqlist.h>
+#include <ntqwhatsthis.h>
+#include <ntqstylesheet.h>
#include <kaudioplayer.h>
#include <kmessagebox.h>
@@ -64,14 +64,14 @@
///////////////////////////////////////////////////////////////////////////
// KBiffSetup
///////////////////////////////////////////////////////////////////////////
-KBiffSetup::KBiffSetup(const QString& profile_, bool secure_)
+KBiffSetup::KBiffSetup(const TQString& profile_, bool secure_)
: KDialog(0, 0, true)
{
// set the icon just to be cute
KWin::setIcons(winId(), kapp->icon(), kapp->miniIcon());
// make sure the profile is *something*
- QString the_profile;
+ TQString the_profile;
if (profile_.isEmpty() || profile_.isNull())
the_profile = getSomeProfile();
else
@@ -80,53 +80,53 @@ KBiffSetup::KBiffSetup(const QString& profile_, bool secure_)
setCaption(i18n("KBiff Setup"));
// The profile combo box and buttons all go in this groupbox
- QGroupBox* profile_groupbox = new QGroupBox(i18n("Profile"), this);
+ TQGroupBox* profile_groupbox = new TQGroupBox(i18n("Profile"), this);
// combo box to hold the profile names
- comboProfile = new QComboBox(false, profile_groupbox);
+ comboProfile = new TQComboBox(false, profile_groupbox);
comboProfile->setSizeLimit(10);
- QString whatsthis = i18n(
+ TQString whatsthis = i18n(
"This is a list of all of the KBiff <b>profiles</b><p>"
"A profile is a logical grouping of settings for either one "
"mailbox or several mailboxes. Each profile gets one icon "
"and one new mail sound and one... well, everything");
- QWhatsThis::add(comboProfile, whatsthis);
+ TQWhatsThis::add(comboProfile, whatsthis);
// Add New Profile button
- QPushButton *new_profile_button = new QPushButton(i18n("&New..."),
+ TQPushButton *new_profile_button = new TQPushButton(i18n("&New..."),
profile_groupbox);
whatsthis = i18n("Create a new profile");
- QWhatsThis::add(new_profile_button, whatsthis);
+ TQWhatsThis::add(new_profile_button, whatsthis);
connect(new_profile_button, SIGNAL(clicked()), SLOT(slotAddNewProfile()));
// Rename Profile button
- QPushButton *rename_profile_button = new QPushButton(i18n("&Rename..."),
+ TQPushButton *rename_profile_button = new TQPushButton(i18n("&Rename..."),
profile_groupbox);
whatsthis = i18n("Rename the current profile");
- QWhatsThis::add(rename_profile_button, whatsthis);
+ TQWhatsThis::add(rename_profile_button, whatsthis);
connect(rename_profile_button, SIGNAL(clicked()), SLOT(slotRenameProfile()));
// Delete Profile button
- QPushButton *delete_profile_button = new QPushButton(i18n("&Delete"),
+ TQPushButton *delete_profile_button = new TQPushButton(i18n("&Delete"),
profile_groupbox);
whatsthis = i18n("Delete the current profile");
- QWhatsThis::add(delete_profile_button, whatsthis);
+ TQWhatsThis::add(delete_profile_button, whatsthis);
connect(delete_profile_button, SIGNAL(clicked()), SLOT(slotDeleteProfile()));
// setup the tabs
- QTabWidget *tabctl = new QTabWidget(this);
+ TQTabWidget *tabctl = new TQTabWidget(this);
generalTab = new KBiffGeneralTab(the_profile, tabctl);
newmailTab = new KBiffNewMailTab(the_profile, tabctl);
mailboxTab = new KBiffMailboxTab(the_profile, tabctl);
aboutTab = new KBiffAboutTab(tabctl);
- connect(comboProfile, SIGNAL(highlighted(const QString&)),
- generalTab, SLOT(readConfig(const QString&)));
- connect(comboProfile, SIGNAL(highlighted(const QString&)),
- newmailTab, SLOT(readConfig(const QString&)));
- connect(comboProfile, SIGNAL(highlighted(const QString&)),
- mailboxTab, SLOT(readConfig(const QString&)));
+ connect(comboProfile, SIGNAL(highlighted(const TQString&)),
+ generalTab, SLOT(readConfig(const TQString&)));
+ connect(comboProfile, SIGNAL(highlighted(const TQString&)),
+ newmailTab, SLOT(readConfig(const TQString&)));
+ connect(comboProfile, SIGNAL(highlighted(const TQString&)),
+ mailboxTab, SLOT(readConfig(const TQString&)));
// add the tabs
tabctl->addTab(generalTab, i18n("General"));
@@ -135,16 +135,16 @@ KBiffSetup::KBiffSetup(const QString& profile_, bool secure_)
tabctl->addTab(aboutTab, i18n("About"));
// help button
- QPushButton *help_button = new QPushButton(i18n("&Help"), this);
+ TQPushButton *help_button = new TQPushButton(i18n("&Help"), this);
connect(help_button, SIGNAL(clicked()), SLOT(invokeHelp()));
// ok button
- QPushButton *ok_button = new QPushButton(i18n("&OK"), this);
+ TQPushButton *ok_button = new TQPushButton(i18n("&OK"), this);
ok_button->setDefault(true);
connect(ok_button, SIGNAL(clicked()), SLOT(slotDone()));
// cancel button
- QPushButton *cancel_button = new QPushButton(i18n("&Cancel"), this);
+ TQPushButton *cancel_button = new TQPushButton(i18n("&Cancel"), this);
connect(cancel_button, SIGNAL(clicked()), SLOT(reject()));
// are we secure?
@@ -152,20 +152,20 @@ KBiffSetup::KBiffSetup(const QString& profile_, bool secure_)
// NOW, SETUP ALL THE LAYOUTS!
// This layout handles the buttons for the profile combobox
- QBoxLayout *pro_button_layout = new QBoxLayout(QBoxLayout::LeftToRight, 12);
+ TQBoxLayout *pro_button_layout = new TQBoxLayout(TQBoxLayout::LeftToRight, 12);
pro_button_layout->addWidget(new_profile_button);
pro_button_layout->addWidget(rename_profile_button);
pro_button_layout->addWidget(delete_profile_button);
// This layout handles the upper profile groupbox
- QBoxLayout *profile_layout = new QBoxLayout(profile_groupbox,
- QBoxLayout::Down, 12);
+ TQBoxLayout *profile_layout = new TQBoxLayout(profile_groupbox,
+ TQBoxLayout::Down, 12);
profile_layout->addSpacing(8);
profile_layout->addWidget(comboProfile);
profile_layout->addLayout(pro_button_layout);
// This layout handles the dialog buttons
- QBoxLayout *dialog_button_layout = new QBoxLayout(QBoxLayout::LeftToRight,
+ TQBoxLayout *dialog_button_layout = new TQBoxLayout(TQBoxLayout::LeftToRight,
12);
dialog_button_layout->addWidget(help_button);
dialog_button_layout->addStretch(1);
@@ -173,7 +173,7 @@ KBiffSetup::KBiffSetup(const QString& profile_, bool secure_)
dialog_button_layout->addWidget(cancel_button);
// This is the outermost layout
- QBoxLayout *top_layout = new QBoxLayout(this, QBoxLayout::Down, 12);
+ TQBoxLayout *top_layout = new TQBoxLayout(this, TQBoxLayout::Down, 12);
top_layout->addWidget(profile_groupbox);
top_layout->addWidget(tabctl, 1);
top_layout->addLayout(dialog_button_layout);
@@ -191,7 +191,7 @@ bool KBiffSetup::getSecure() const
return isSecure;
}
-const QString KBiffSetup::getProfile() const
+const TQString KBiffSetup::getProfile() const
{
return comboProfile->currentText();
}
@@ -201,37 +201,37 @@ const KBiffURL KBiffSetup::getCurrentMailbox() const
return mailboxTab->getMailbox();
}
-const QList<KBiffMailbox> KBiffSetup::getMailboxList() const
+const TQList<KBiffMailbox> KBiffSetup::getMailboxList() const
{
return mailboxTab->getMailboxList();
}
-const QString KBiffSetup::getMailClient() const
+const TQString KBiffSetup::getMailClient() const
{
return generalTab->getMailClient();
}
-const QString KBiffSetup::getNoMailIcon() const
+const TQString KBiffSetup::getNoMailIcon() const
{
return generalTab->getButtonNoMail();
}
-const QString KBiffSetup::getNewMailIcon() const
+const TQString KBiffSetup::getNewMailIcon() const
{
return generalTab->getButtonNewMail();
}
-const QString KBiffSetup::getOldMailIcon() const
+const TQString KBiffSetup::getOldMailIcon() const
{
return generalTab->getButtonOldMail();
}
-const QString KBiffSetup::getNoConnIcon() const
+const TQString KBiffSetup::getNoConnIcon() const
{
return generalTab->getButtonNoConn();
}
-const QString KBiffSetup::getStoppedIcon() const
+const TQString KBiffSetup::getStoppedIcon() const
{
return generalTab->getButtonStopped();
}
@@ -256,17 +256,17 @@ unsigned int KBiffSetup::getPoll() const
return generalTab->getPoll();
}
-const QString KBiffSetup::getRunCommandPath() const
+const TQString KBiffSetup::getRunCommandPath() const
{
return newmailTab->getRunCommandPath();
}
-const QString KBiffSetup::getRunResetCommandPath() const
+const TQString KBiffSetup::getRunResetCommandPath() const
{
return newmailTab->getRunResetCommandPath();
}
-const QString KBiffSetup::getPlaySoundPath() const
+const TQString KBiffSetup::getPlaySoundPath() const
{
return newmailTab->getPlaySoundPath();
}
@@ -306,9 +306,9 @@ void KBiffSetup::invokeHelp()
kapp->invokeHelp();
}
-void KBiffSetup::readConfig(const QString& profile_)
+void KBiffSetup::readConfig(const TQString& profile_)
{
- QStringList profile_list;
+ TQStringList profile_list;
// open the config file
KSimpleConfig *config = new KSimpleConfig(CONFIG_FILE, true);
@@ -332,7 +332,7 @@ void KBiffSetup::readConfig(const QString& profile_)
// read in the data from the first mailbox if we don't have a name
for (int i = 0; i < comboProfile->count(); i++)
{
- if (QString(profile_) == comboProfile->text(i))
+ if (TQString(profile_) == comboProfile->text(i))
{
comboProfile->setCurrentItem(i);
break;
@@ -343,9 +343,9 @@ void KBiffSetup::readConfig(const QString& profile_)
comboProfile->insertItem(profile_);
}
-QString KBiffSetup::getSomeProfile() const
+TQString KBiffSetup::getSomeProfile() const
{
- QStringList profile_list;
+ TQStringList profile_list;
// open the config file
KSimpleConfig *config = new KSimpleConfig(CONFIG_FILE, true);
@@ -360,7 +360,7 @@ QString KBiffSetup::getSomeProfile() const
if (number_of_mailboxes > 0)
return profile_list.last();
else
- return QString("Inbox");
+ return TQString("Inbox");
}
void KBiffSetup::saveConfig()
@@ -371,7 +371,7 @@ void KBiffSetup::saveConfig()
config->setGroup("General");
// get the list of profiles
- QStringList profile_list;
+ TQStringList profile_list;
for (int i = 0; i < comboProfile->count(); i++)
profile_list.append(comboProfile->text(i));
@@ -386,7 +386,7 @@ void KBiffSetup::saveConfig()
///////////////////////////////////////////////////////////////////////
void KBiffSetup::slotDone()
{
- QString profile = comboProfile->currentText();
+ TQString profile = comboProfile->currentText();
saveConfig();
generalTab->saveConfig(profile);
newmailTab->saveConfig(profile);
@@ -402,7 +402,7 @@ void KBiffSetup::slotAddNewProfile()
dlg.setCaption(i18n("New Profile"));
if (dlg.exec())
{
- QString profile_name = dlg.getName();
+ TQString profile_name = dlg.getName();
// bail out if we already have this name
for (int i = 0; i < comboProfile->count(); i++)
@@ -428,15 +428,15 @@ void KBiffSetup::slotAddNewProfile()
void KBiffSetup::slotRenameProfile()
{
KBiffNewDlg dlg;
- QString title;
- QString old_profile = comboProfile->currentText();
+ TQString title;
+ TQString old_profile = comboProfile->currentText();
title = i18n("Rename Profile: %1").arg(old_profile);
dlg.setCaption(title);
// popup the name chooser
if (dlg.exec())
{
- QString profile_name = dlg.getName();
+ TQString profile_name = dlg.getName();
// bail out if we already have this name
for (int i = 0; i < comboProfile->count(); i++)
@@ -468,8 +468,8 @@ void KBiffSetup::slotRenameProfile()
void KBiffSetup::slotDeleteProfile()
{
- QString title, msg;
- QString profile = comboProfile->currentText();
+ TQString title, msg;
+ TQString profile = comboProfile->currentText();
title = i18n("Delete Profile: %1").arg(profile);
msg = i18n("Are you sure you wish to delete this profile?\n");
@@ -514,23 +514,23 @@ void KBiffSetup::slotDeleteProfile()
///////////////////////////////////////////////////////////////////////
// KBiffGeneralTab
///////////////////////////////////////////////////////////////////////
-KBiffGeneralTab::KBiffGeneralTab(const QString& profile_, QWidget *parent_)
- : QWidget(parent_)
+KBiffGeneralTab::KBiffGeneralTab(const TQString& profile_, TQWidget *parent_)
+ : TQWidget(parent_)
{
// the poll time (in seconds)
- QLabel* poll_label = new QLabel(i18n("P&oll (sec):"), this);
- editPoll = new QLineEdit(this);
+ TQLabel* poll_label = new TQLabel(i18n("P&oll (sec):"), this);
+ editPoll = new TQLineEdit(this);
poll_label->setBuddy(editPoll);
- QString whatsthis = i18n(
+ TQString whatsthis = i18n(
"This is the interval (in seconds) that KBiff will check "
"for new mail. Typically, this can be quite small (under "
"60 seconds) for local mailboxes but should be around 5 "
"minutes (300 seconds) for remote mailboxes");
- QWhatsThis::add(editPoll, whatsthis);
+ TQWhatsThis::add(editPoll, whatsthis);
// the command to run when clicked
- QLabel *mail_label = new QLabel(i18n("&Mail client:"), this);
- editCommand = new QLineEdit(this);
+ TQLabel *mail_label = new TQLabel(i18n("&Mail client:"), this);
+ editCommand = new TQLineEdit(this);
mail_label->setBuddy(editCommand);
whatsthis = i18n(
"This is the mail client that KBiff was use when you click "
@@ -539,16 +539,16 @@ KBiffGeneralTab::KBiffGeneralTab(const QString& profile_, QWidget *parent_)
"This recognizes the <b>%m</b> and <b>%u</b> arguments. The "
"first is replaced with the first mailbox containing new mail "
"and the latter is replaced with the mailbox's URL.");
- QWhatsThis::add(editCommand, whatsthis);
+ TQWhatsThis::add(editCommand, whatsthis);
// do we dock automatically?
- checkDock = new QCheckBox(i18n("Doc&k in panel"), this);
+ checkDock = new TQCheckBox(i18n("Doc&k in panel"), this);
// should we support session management?
- checkNoSession = new QCheckBox(i18n("Use &session management"), this);
+ checkNoSession = new TQCheckBox(i18n("Use &session management"), this);
// should we check at startup?
- checkNoStartup = new QCheckBox(i18n("Don't &check at startup"), this);
+ checkNoStartup = new TQCheckBox(i18n("Don't &check at startup"), this);
whatsthis = i18n(
"This option is for those people using KBiff to check their "
"IMAP4 or POP3 account over a dial-up connection. If KBiff "
@@ -556,48 +556,48 @@ KBiffGeneralTab::KBiffGeneralTab(const QString& profile_, QWidget *parent_)
"DNS lookup will hang for a long time. If this is checked, "
"then KBiff will not check for new mail on startup. You will "
"need to manually start it every time you connect");
- QWhatsThis::add(checkNoStartup, whatsthis);
+ TQWhatsThis::add(checkNoStartup, whatsthis);
// group box to hold the icons together
- QGroupBox* icons_groupbox = new QGroupBox(i18n("Icons:"), this);
+ TQGroupBox* icons_groupbox = new TQGroupBox(i18n("Icons:"), this);
// "stopped" pixmap button
- QLabel* stopped_label = new QLabel(i18n("&Stopped:"), icons_groupbox);
+ TQLabel* stopped_label = new TQLabel(i18n("&Stopped:"), icons_groupbox);
buttonStopped = new KIconButton(icons_groupbox);
buttonStopped->setFixedSize(50, 50);
buttonStopped->setIconType(KIcon::User, KIcon::Any, true);
stopped_label->setBuddy(buttonStopped);
// "no mailbox" pixmap button
- QLabel* noconn_label = new QLabel(i18n("No Mail&box:"), icons_groupbox);
+ TQLabel* noconn_label = new TQLabel(i18n("No Mail&box:"), icons_groupbox);
buttonNoConn = new KIconButton(icons_groupbox);
buttonNoConn->setFixedSize(50, 50);
buttonNoConn->setIconType(KIcon::User, KIcon::Any, true);
noconn_label->setBuddy(buttonNoConn);
// "no mail" pixmap button
- QLabel* nomail_label = new QLabel(i18n("No M&ail:"), icons_groupbox);
+ TQLabel* nomail_label = new TQLabel(i18n("No M&ail:"), icons_groupbox);
buttonNoMail = new KIconButton(icons_groupbox);
buttonNoMail->setIconType(KIcon::User, KIcon::Any, true);
buttonNoMail->setFixedSize(50, 50);
nomail_label->setBuddy(buttonNoMail);
// "old mail" pixmap button
- QLabel* oldmail_label = new QLabel(i18n("O&ld Mail:"), icons_groupbox);
+ TQLabel* oldmail_label = new TQLabel(i18n("O&ld Mail:"), icons_groupbox);
buttonOldMail = new KIconButton(icons_groupbox);
buttonOldMail->setIconType(KIcon::User, KIcon::Any, true);
buttonOldMail->setFixedSize(50, 50);
oldmail_label->setBuddy(buttonOldMail);
// "new mail" pixmap button
- QLabel* newmail_label = new QLabel(i18n("N&ew Mail:"), icons_groupbox);
+ TQLabel* newmail_label = new TQLabel(i18n("N&ew Mail:"), icons_groupbox);
buttonNewMail = new KIconButton(icons_groupbox);
buttonNewMail->setIconType(KIcon::User, KIcon::Any, true);
buttonNewMail->setFixedSize(50, 50);
newmail_label->setBuddy(buttonNewMail);
// poll time layout
- QGridLayout *info_layout = new QGridLayout(5, 3, 8);
+ TQGridLayout *info_layout = new TQGridLayout(5, 3, 8);
info_layout->addWidget(poll_label, 0, 0);
info_layout->addWidget(editPoll, 0, 1);
info_layout->setColStretch(2, 1);
@@ -609,27 +609,27 @@ KBiffGeneralTab::KBiffGeneralTab(const QString& profile_, QWidget *parent_)
info_layout->addMultiCellWidget(checkNoStartup, 4, 4, 1, 2);
// icons layout
- QVBoxLayout *stopped_layout = new QVBoxLayout;
+ TQVBoxLayout *stopped_layout = new TQVBoxLayout;
stopped_layout->addWidget(stopped_label);
stopped_layout->addWidget(buttonStopped);
- QVBoxLayout *no_conn_layout = new QVBoxLayout;
+ TQVBoxLayout *no_conn_layout = new TQVBoxLayout;
no_conn_layout->addWidget(noconn_label);
no_conn_layout->addWidget(buttonNoConn);
- QVBoxLayout *no_mail_layout = new QVBoxLayout;
+ TQVBoxLayout *no_mail_layout = new TQVBoxLayout;
no_mail_layout->addWidget(nomail_label);
no_mail_layout->addWidget(buttonNoMail);
- QVBoxLayout *old_mail_layout = new QVBoxLayout;
+ TQVBoxLayout *old_mail_layout = new TQVBoxLayout;
old_mail_layout->addWidget(oldmail_label);
old_mail_layout->addWidget(buttonOldMail);
- QVBoxLayout *new_mail_layout = new QVBoxLayout;
+ TQVBoxLayout *new_mail_layout = new TQVBoxLayout;
new_mail_layout->addWidget(newmail_label);
new_mail_layout->addWidget(buttonNewMail);
- QHBoxLayout *inner_icon_layout = new QHBoxLayout;
+ TQHBoxLayout *inner_icon_layout = new TQHBoxLayout;
inner_icon_layout->addStretch(1);
inner_icon_layout->addLayout(stopped_layout);
inner_icon_layout->addStretch(1);
@@ -642,14 +642,14 @@ KBiffGeneralTab::KBiffGeneralTab(const QString& profile_, QWidget *parent_)
inner_icon_layout->addLayout(new_mail_layout);
inner_icon_layout->addStretch(1);
- QBoxLayout *outer_icon_layout = new QBoxLayout(icons_groupbox,
- QBoxLayout::Down, 5);
+ TQBoxLayout *outer_icon_layout = new TQBoxLayout(icons_groupbox,
+ TQBoxLayout::Down, 5);
outer_icon_layout->addSpacing(8);
outer_icon_layout->addLayout(inner_icon_layout);
outer_icon_layout->addStretch(1);
// main "outer" layout for this tab
- QVBoxLayout *top_layout = new QVBoxLayout(this, 12);
+ TQVBoxLayout *top_layout = new TQVBoxLayout(this, 12);
top_layout->addLayout(info_layout);
top_layout->addWidget(icons_groupbox);
top_layout->addStretch(1);
@@ -677,42 +677,42 @@ bool KBiffGeneralTab::getDock() const
return checkDock->isChecked();
}
-const QString KBiffGeneralTab::getButtonOldMail() const
+const TQString KBiffGeneralTab::getButtonOldMail() const
{
return buttonOldMail->icon();
}
-const QString KBiffGeneralTab::getButtonNewMail() const
+const TQString KBiffGeneralTab::getButtonNewMail() const
{
return buttonNewMail->icon();
}
-const QString KBiffGeneralTab::getButtonNoMail() const
+const TQString KBiffGeneralTab::getButtonNoMail() const
{
return buttonNoMail->icon();
}
-const QString KBiffGeneralTab::getButtonNoConn() const
+const TQString KBiffGeneralTab::getButtonNoConn() const
{
return buttonNoConn->icon();
}
-const QString KBiffGeneralTab::getButtonStopped() const
+const TQString KBiffGeneralTab::getButtonStopped() const
{
return buttonStopped->icon();
}
-const QString KBiffGeneralTab::getMailClient() const
+const TQString KBiffGeneralTab::getMailClient() const
{
return editCommand->text();
}
int KBiffGeneralTab::getPoll() const
{
- return QString(editPoll->text()).toInt();
+ return TQString(editPoll->text()).toInt();
}
-void KBiffGeneralTab::readConfig(const QString& profile_)
+void KBiffGeneralTab::readConfig(const TQString& profile_)
{
// open the config file
KSimpleConfig *config = new KSimpleConfig(CONFIG_FILE, true);
@@ -726,7 +726,7 @@ void KBiffGeneralTab::readConfig(const QString& profile_)
checkNoSession->setChecked(config->readBoolEntry("Sessions", true));
checkNoStartup->setChecked(config->readBoolEntry("DontCheck", false));
- QString stopped, no_mail, old_mail, new_mail, no_conn;
+ TQString stopped, no_mail, old_mail, new_mail, no_conn;
stopped = config->readEntry("StoppedPixmap", "stopped");
no_mail = config->readEntry("NoMailPixmap", "nomail");
old_mail = config->readEntry("OldMailPixmap", "oldmail");
@@ -742,13 +742,13 @@ void KBiffGeneralTab::readConfig(const QString& profile_)
delete config;
}
-static QString justIconName(const QString& icon_name)
+static TQString justIconName(const TQString& icon_name)
{
// the following code is a bit of a hack, but there is a rationale
// to it. if possible, we want to just save the name of the icons
// (without extension), and not the whole path due to name munging
// later on.
- QFileInfo info( icon_name );
+ TQFileInfo info( icon_name );
// we first test if the basename (filename without extensions) is
// the same as the filename. if it is, then we are perfect. no
@@ -757,7 +757,7 @@ static QString justIconName(const QString& icon_name)
return icon_name;
// now we see if we can load based just on the basename
- QPixmap icon = KGlobal::iconLoader()->loadIcon( info.baseName(), KIcon::User );
+ TQPixmap icon = KGlobal::iconLoader()->loadIcon( info.baseName(), KIcon::User );
// if it's null, then it's in a non-standard path so we must use an
// absolute path. no need to go further
@@ -776,7 +776,7 @@ static QString justIconName(const QString& icon_name)
return info.baseName();
}
-void KBiffGeneralTab::saveConfig(const QString& profile_)
+void KBiffGeneralTab::saveConfig(const TQString& profile_)
{
// open the config file for writing
KSimpleConfig *config = new KSimpleConfig(CONFIG_FILE);
@@ -799,31 +799,31 @@ void KBiffGeneralTab::saveConfig(const QString& profile_)
///////////////////////////////////////////////////////////////////////
// KBiffNewMailTab
///////////////////////////////////////////////////////////////////////
-KBiffNewMailTab::KBiffNewMailTab(const QString& profile_, QWidget *parent_)
- : QWidget(parent_)
+KBiffNewMailTab::KBiffNewMailTab(const TQString& profile_, TQWidget *parent_)
+ : TQWidget(parent_)
{
// setup the Run Command stuff
- checkRunCommand = new QCheckBox(i18n("R&un Command"), this);
- editRunCommand = new QLineEdit(this);
- buttonBrowseRunCommand = new QPushButton(i18n("Browse"), this);
+ checkRunCommand = new TQCheckBox(i18n("R&un Command"), this);
+ editRunCommand = new TQLineEdit(this);
+ buttonBrowseRunCommand = new TQPushButton(i18n("Browse"), this);
// setup the Run Reset Command stuff
- checkRunResetCommand = new QCheckBox(i18n("R&un Reset-Command"), this);
- editRunResetCommand = new QLineEdit(this);
- buttonBrowseRunResetCommand = new QPushButton(i18n("Browse"), this);
+ checkRunResetCommand = new TQCheckBox(i18n("R&un Reset-Command"), this);
+ editRunResetCommand = new TQLineEdit(this);
+ buttonBrowseRunResetCommand = new TQPushButton(i18n("Browse"), this);
// setup the Play Sound stuff
- checkPlaySound = new QCheckBox(i18n("&Play Sound"), this);
- editPlaySound = new QLineEdit(this);
- buttonBrowsePlaySound = new QPushButton(i18n("Browse"), this);
+ checkPlaySound = new TQCheckBox(i18n("&Play Sound"), this);
+ editPlaySound = new TQLineEdit(this);
+ buttonBrowsePlaySound = new TQPushButton(i18n("Browse"), this);
- buttonTestPlaySound = new QPushButton(this);
+ buttonTestPlaySound = new TQPushButton(this);
buttonTestPlaySound->setPixmap(UserIcon("playsound"));
// setup the System stuff
- checkBeep = new QCheckBox(i18n("System &Beep"), this);
- checkNotify = new QCheckBox(i18n("N&otify"), this);
- checkStatus = new QCheckBox(i18n("&Floating Status"), this);
+ checkBeep = new TQCheckBox(i18n("System &Beep"), this);
+ checkNotify = new TQCheckBox(i18n("N&otify"), this);
+ checkStatus = new TQCheckBox(i18n("&Floating Status"), this);
// connect some slots and signals
connect(buttonBrowsePlaySound, SIGNAL(clicked()), SLOT(browsePlaySound()));
@@ -835,20 +835,20 @@ KBiffNewMailTab::KBiffNewMailTab(const QString& profile_, QWidget *parent_)
connect(checkRunResetCommand, SIGNAL(toggled(bool)), SLOT(enableRunResetCommand(bool)));
// NOW DO THE LAYOUT
- QHBoxLayout *run_command_layout = new QHBoxLayout(5);
+ TQHBoxLayout *run_command_layout = new TQHBoxLayout(5);
run_command_layout->addWidget(editRunCommand);
run_command_layout->addWidget(buttonBrowseRunCommand);
- QHBoxLayout *run_reset_command_layout = new QHBoxLayout(5);
+ TQHBoxLayout *run_reset_command_layout = new TQHBoxLayout(5);
run_reset_command_layout->addWidget(editRunResetCommand);
run_reset_command_layout->addWidget(buttonBrowseRunResetCommand);
- QHBoxLayout *play_sound_layout = new QHBoxLayout(5);
+ TQHBoxLayout *play_sound_layout = new TQHBoxLayout(5);
play_sound_layout->addWidget(buttonTestPlaySound, 0);
play_sound_layout->addWidget(editPlaySound, 1);
play_sound_layout->addWidget(buttonBrowsePlaySound);
- QVBoxLayout *top_layout = new QVBoxLayout(this, 5);
+ TQVBoxLayout *top_layout = new TQVBoxLayout(this, 5);
top_layout->addWidget(checkRunCommand);
top_layout->addLayout(run_command_layout);
@@ -875,7 +875,7 @@ void KBiffNewMailTab::testPlaySound()
KAudioPlayer::play(getPlaySoundPath());
}
-void KBiffNewMailTab::readConfig(const QString& profile_)
+void KBiffNewMailTab::readConfig(const TQString& profile_)
{
// open the config file
KSimpleConfig *config = new KSimpleConfig(CONFIG_FILE, true);
@@ -899,7 +899,7 @@ void KBiffNewMailTab::readConfig(const QString& profile_)
delete config;
}
-void KBiffNewMailTab::saveConfig(const QString& profile_)
+void KBiffNewMailTab::saveConfig(const TQString& profile_)
{
KSimpleConfig *config = new KSimpleConfig(CONFIG_FILE);
@@ -923,7 +923,7 @@ bool KBiffNewMailTab::getRunCommand() const
return checkRunCommand->isChecked();
}
-const QString KBiffNewMailTab::getRunCommandPath() const
+const TQString KBiffNewMailTab::getRunCommandPath() const
{
return editRunCommand->text();
}
@@ -933,7 +933,7 @@ bool KBiffNewMailTab::getRunResetCommand() const
return checkRunResetCommand->isChecked();
}
-const QString KBiffNewMailTab::getRunResetCommandPath() const
+const TQString KBiffNewMailTab::getRunResetCommandPath() const
{
return editRunResetCommand->text();
}
@@ -943,7 +943,7 @@ bool KBiffNewMailTab::getPlaySound() const
return checkPlaySound->isChecked();
}
-const QString KBiffNewMailTab::getPlaySoundPath() const
+const TQString KBiffNewMailTab::getPlaySoundPath() const
{
return editPlaySound->text();
}
@@ -1041,84 +1041,84 @@ KBiffMailboxAdvanced::KBiffMailboxAdvanced()
{
setCaption(i18n("Advanced Options"));
- QLabel *mailbox_label = new QLabel(i18n("Mailbox &URL:"), this);
+ TQLabel *mailbox_label = new TQLabel(i18n("Mailbox &URL:"), this);
mailbox_label->setAlignment(AlignVCenter | AlignRight);
- mailbox = new QLineEdit(this);
+ mailbox = new TQLineEdit(this);
mailbox_label->setBuddy(mailbox);
- QString whatsthis = i18n(
+ TQString whatsthis = i18n(
"KBiff uses URLs to specify a mailbox and the parameters "
"to the mailbox. This allows you to modify the URL directly. "
"Do so <i>only</i> if you really really know what you're doing!");
- QWhatsThis::add(mailbox, whatsthis);
+ TQWhatsThis::add(mailbox, whatsthis);
- QLabel *port_label = new QLabel(i18n("P&ort:"), this);
+ TQLabel *port_label = new TQLabel(i18n("P&ort:"), this);
port_label->setAlignment(AlignVCenter | AlignRight);
- port = new QLineEdit(this);
+ port = new TQLineEdit(this);
port_label->setBuddy(port);
whatsthis = i18n(
"This allows you to specify the port of your socket protocol. "
"It usually is correct, so the only time you would change it is "
"if you are accessing a non-standard server or going through "
"a proxy (or something similar");
- QWhatsThis::add(port, whatsthis);
+ TQWhatsThis::add(port, whatsthis);
whatsthis = i18n(
"IMAP4, POP3, and NNTP sockets each have their own timeout "
"before they give up. If you have a slow connection, you might "
"want to set this to some random high value");
- QLabel *timeout_label = new QLabel(i18n("&Timeout:"), this);
+ TQLabel *timeout_label = new TQLabel(i18n("&Timeout:"), this);
timeout_label->setAlignment(AlignVCenter | AlignRight);
- timeout = new QLineEdit(this);
- QWhatsThis::add(timeout, whatsthis);
+ timeout = new TQLineEdit(this);
+ TQWhatsThis::add(timeout, whatsthis);
timeout_label->setBuddy(timeout);
- preauth = new QCheckBox(i18n("&PREAUTH"), this);
+ preauth = new TQCheckBox(i18n("&PREAUTH"), this);
preauth->setEnabled(false);
whatsthis = i18n(
"Check this if you login to your IMAP4 or POP3 server before "
"kbiff accesses it.");
- QWhatsThis::add(preauth, whatsthis);
+ TQWhatsThis::add(preauth, whatsthis);
- keepalive = new QCheckBox(i18n("&Keep Alive"), this);
+ keepalive = new TQCheckBox(i18n("&Keep Alive"), this);
keepalive->setEnabled(false);
whatsthis = i18n(
"If this is checked, then the IMAP4, POP3, or NNTP client "
"will not log off each time");
- QWhatsThis::add(keepalive, whatsthis);
+ TQWhatsThis::add(keepalive, whatsthis);
- async = new QCheckBox(i18n("&Asynchronous"), this);
+ async = new TQCheckBox(i18n("&Asynchronous"), this);
async->setEnabled(false);
whatsthis = i18n(
"If this is checked, then the socket protocols will access "
"the server asynchronously");
- QWhatsThis::add(async, whatsthis);
+ TQWhatsThis::add(async, whatsthis);
- apop = new QCheckBox(i18n("&Disable APOP"), this);
+ apop = new TQCheckBox(i18n("&Disable APOP"), this);
apop->setEnabled(false);
whatsthis = i18n(
"If this is checked, then POP mailboxes will not use Authenticated POP where available, "
"and send passwords in plaintext over the network, which is a security risk");
- QWhatsThis::add(apop, whatsthis);
+ TQWhatsThis::add(apop, whatsthis);
- QPushButton *ok = new QPushButton(i18n("&OK"), this);
+ TQPushButton *ok = new TQPushButton(i18n("&OK"), this);
ok->setDefault(true);
- QPushButton *cancel = new QPushButton(i18n("&Cancel"), this);
+ TQPushButton *cancel = new TQPushButton(i18n("&Cancel"), this);
// connect all the slots to signals
connect(preauth, SIGNAL(toggled(bool)), SLOT(preauthModified(bool)));
connect(keepalive, SIGNAL(toggled(bool)), SLOT(keepaliveModified(bool)));
connect(async, SIGNAL(toggled(bool)), SLOT(asyncModified(bool)));
connect(apop, SIGNAL(toggled(bool)), SLOT(apopModified(bool)));
- connect(port, SIGNAL(textChanged(const QString&)),
- SLOT(portModified(const QString&)));
+ connect(port, SIGNAL(textChanged(const TQString&)),
+ SLOT(portModified(const TQString&)));
connect(ok, SIGNAL(clicked()), SLOT(accept()));
connect(cancel, SIGNAL(clicked()), SLOT(reject()));
- connect(timeout, SIGNAL(textChanged(const QString&)),
- SLOT(timeoutModified(const QString&)));
+ connect(timeout, SIGNAL(textChanged(const TQString&)),
+ SLOT(timeoutModified(const TQString&)));
// NOW DO THE LAYOUT
- QGridLayout *top_layout = new QGridLayout(this, 7, 4, 12);
+ TQGridLayout *top_layout = new TQGridLayout(this, 7, 4, 12);
top_layout->addWidget(mailbox_label, 0, 0);
top_layout->addMultiCellWidget(mailbox, 0, 0, 1, 3);
top_layout->addWidget(port_label, 1, 0);
@@ -1146,7 +1146,7 @@ const KBiffURL KBiffMailboxAdvanced::getMailbox() const
unsigned int KBiffMailboxAdvanced::getPort() const
{
- return QString(port->text()).toInt();
+ return TQString(port->text()).toInt();
}
void KBiffMailboxAdvanced::setMailbox(const KBiffURL& url)
@@ -1160,23 +1160,23 @@ void KBiffMailboxAdvanced::setMailbox(const KBiffURL& url)
void KBiffMailboxAdvanced::setPort(unsigned int the_port, bool enable)
{
port->setEnabled(enable);
- port->setText(QString().setNum(the_port));
+ port->setText(TQString().setNum(the_port));
}
-void KBiffMailboxAdvanced::portModified(const QString& text)
+void KBiffMailboxAdvanced::portModified(const TQString& text)
{
KBiffURL url = getMailbox();
- url.setPort(QString(text).toInt());
+ url.setPort(TQString(text).toInt());
setMailbox(url);
}
void KBiffMailboxAdvanced::setTimeout(unsigned int the_to, bool enable)
{
timeout->setEnabled(enable);
- timeout->setText(QString().setNum(the_to));
+ timeout->setText(TQString().setNum(the_to));
}
-void KBiffMailboxAdvanced::timeoutModified(const QString& text)
+void KBiffMailboxAdvanced::timeoutModified(const TQString& text)
{
KBiffURL url = getMailbox();
url.setSearchPar("timeout", text.local8Bit());
@@ -1255,27 +1255,27 @@ bool KBiffMailboxAdvanced::getPreauth() const
return preauth->isChecked();
}
-KBiffMailboxTab::KBiffMailboxTab(const QString& profile_, QWidget *parent_)
- : QWidget(parent_), mailboxHash(new QDict<KBiffMailbox>)
+KBiffMailboxTab::KBiffMailboxTab(const TQString& profile_, TQWidget *parent_)
+ : TQWidget(parent_), mailboxHash(new TQDict<KBiffMailbox>)
{
if (mailboxHash)
mailboxHash->setAutoDelete(true);
- mailboxes = new QListView(this);
- mailboxes->setFrameStyle(QFrame::WinPanel | QFrame::Sunken);
+ mailboxes = new TQListView(this);
+ mailboxes->setFrameStyle(TQFrame::WinPanel | TQFrame::Sunken);
mailboxes->addColumn(i18n("Mailbox:"));
mailboxes->header()->hide();
- QPushButton *new_mailbox = new QPushButton(this);
+ TQPushButton *new_mailbox = new TQPushButton(this);
new_mailbox->setPixmap(UserIcon("mailbox"));
- QToolTip::add(new_mailbox, i18n("New Mailbox"));
+ TQToolTip::add(new_mailbox, i18n("New Mailbox"));
- QPushButton *delete_mailbox = new QPushButton(this);
+ TQPushButton *delete_mailbox = new TQPushButton(this);
delete_mailbox->setPixmap(UserIcon("delete"));
- QToolTip::add(delete_mailbox, i18n("Delete Mailbox"));
+ TQToolTip::add(delete_mailbox, i18n("Delete Mailbox"));
- QLabel *protocol_label = new QLabel(i18n("Pro&tocol:"), this);
- comboProtocol = new QComboBox(this);
+ TQLabel *protocol_label = new TQLabel(i18n("Pro&tocol:"), this);
+ comboProtocol = new TQComboBox(this);
comboProtocol->insertItem("");
comboProtocol->insertItem("mbox");
comboProtocol->insertItem("maildir");
@@ -1290,49 +1290,49 @@ KBiffMailboxTab::KBiffMailboxTab(const QString& profile_, QWidget *parent_)
#endif // USE_SSL
protocol_label->setBuddy(comboProtocol);
- QLabel *mailbox_label = new QLabel(i18n("&Mailbox:"), this);
- editMailbox = new QLineEdit(this);
+ TQLabel *mailbox_label = new TQLabel(i18n("&Mailbox:"), this);
+ editMailbox = new TQLineEdit(this);
mailbox_label->setBuddy(editMailbox);
- buttonBrowse = new QPushButton("...", this);
+ buttonBrowse = new TQPushButton("...", this);
- QLabel *server_label = new QLabel(i18n("&Server:"), this);
- editServer = new QLineEdit(this);
+ TQLabel *server_label = new TQLabel(i18n("&Server:"), this);
+ editServer = new TQLineEdit(this);
server_label->setBuddy(editServer);
- QLabel *user_label = new QLabel(i18n("&User:"), this);
- editUser = new QLineEdit(this);
+ TQLabel *user_label = new TQLabel(i18n("&User:"), this);
+ editUser = new TQLineEdit(this);
user_label->setBuddy(editUser);
- QLabel *password_label = new QLabel(i18n("P&assword:"), this);
- editPassword = new QLineEdit(this);
- editPassword->setEchoMode(QLineEdit::Password);
+ TQLabel *password_label = new TQLabel(i18n("P&assword:"), this);
+ editPassword = new TQLineEdit(this);
+ editPassword->setEchoMode(TQLineEdit::Password);
password_label->setBuddy(editPassword);
- checkStorePassword = new QCheckBox(i18n("S&tore password"), this);
- QPushButton *advanced_button = new QPushButton(i18n("&Advanced"), this);
+ checkStorePassword = new TQCheckBox(i18n("S&tore password"), this);
+ TQPushButton *advanced_button = new TQPushButton(i18n("&Advanced"), this);
// the command to run before polling
- QGroupBox *fetch_box = new QGroupBox(this);
+ TQGroupBox *fetch_box = new TQGroupBox(this);
fetch_box->setTitle(i18n("Pre-&Polling Command"));
- fetch_box->setColumnLayout(0, Qt::Vertical );
+ fetch_box->setColumnLayout(0, TQt::Vertical );
fetch_box->layout()->setSpacing(0);
fetch_box->layout()->setMargin(0);
- checkFetchCommand = new QCheckBox(i18n("&Enable"), fetch_box);
- editFetchCommand = new QLineEdit(fetch_box);
- buttonBrowseFetchCommand = new QPushButton(i18n("Browse"), fetch_box);
- QString whatsthis = i18n(
+ checkFetchCommand = new TQCheckBox(i18n("&Enable"), fetch_box);
+ editFetchCommand = new TQLineEdit(fetch_box);
+ buttonBrowseFetchCommand = new TQPushButton(i18n("Browse"), fetch_box);
+ TQString whatsthis = i18n(
"This command shall be run <em>before</em> KBiff polls for new "
"mail. It is useful for those people that want to download their "
"POP3 mail regularly using (for instance) 'fetchmail'");
- QWhatsThis::add(checkFetchCommand, whatsthis);
- QWhatsThis::add(editFetchCommand, whatsthis);
- QWhatsThis::add(buttonBrowseFetchCommand, whatsthis);
+ TQWhatsThis::add(checkFetchCommand, whatsthis);
+ TQWhatsThis::add(editFetchCommand, whatsthis);
+ TQWhatsThis::add(buttonBrowseFetchCommand, whatsthis);
enableFetchCommand(false);
// connect all the signals
- connect(mailboxes, SIGNAL(selectionChanged(QListViewItem *)),
- SLOT(slotMailboxSelected(QListViewItem *)));
+ connect(mailboxes, SIGNAL(selectionChanged(TQListViewItem *)),
+ SLOT(slotMailboxSelected(TQListViewItem *)));
connect(new_mailbox, SIGNAL(clicked()), SLOT(slotNewMailbox()));
connect(delete_mailbox, SIGNAL(clicked()), SLOT(slotDeleteMailbox()));
connect(comboProtocol, SIGNAL(highlighted(int)),
@@ -1343,22 +1343,22 @@ KBiffMailboxTab::KBiffMailboxTab(const QString& profile_, QWidget *parent_)
connect(checkFetchCommand, SIGNAL(toggled(bool)), SLOT(enableFetchCommand(bool)));
// NOW DO THE LAYOUT
- QHBoxLayout *fetch_command_layout = new QHBoxLayout(5);
+ TQHBoxLayout *fetch_command_layout = new TQHBoxLayout(5);
fetch_command_layout->addWidget(editFetchCommand, 1);
fetch_command_layout->addWidget(buttonBrowseFetchCommand);
- QVBoxLayout *group_layout = new QVBoxLayout(fetch_box->layout());
- group_layout->setAlignment(Qt::AlignTop);
+ TQVBoxLayout *group_layout = new TQVBoxLayout(fetch_box->layout());
+ group_layout->setAlignment(TQt::AlignTop);
group_layout->setSpacing(6);
group_layout->setMargin(11);
group_layout->addWidget(checkFetchCommand);
group_layout->addLayout(fetch_command_layout);
- QHBoxLayout *advanced_layout = new QHBoxLayout;
+ TQHBoxLayout *advanced_layout = new TQHBoxLayout;
advanced_layout->addStretch(1);
advanced_layout->addWidget(advanced_button);
- QGridLayout *param_layout = new QGridLayout(6, 3, 12);
+ TQGridLayout *param_layout = new TQGridLayout(6, 3, 12);
param_layout->addWidget(protocol_label, 0, 0);
param_layout->addWidget(comboProtocol, 0, 1, 1);
param_layout->addWidget(buttonBrowse, 0, 2);
@@ -1373,18 +1373,18 @@ KBiffMailboxTab::KBiffMailboxTab(const QString& profile_, QWidget *parent_)
param_layout->addMultiCellWidget(checkStorePassword, 5, 5, 1, 2);
param_layout->setColStretch(1, 1);
- QVBoxLayout *right_side_layout = new QVBoxLayout;
+ TQVBoxLayout *right_side_layout = new TQVBoxLayout;
right_side_layout->addLayout(param_layout);
right_side_layout->addWidget(fetch_box);
right_side_layout->addLayout(advanced_layout);
right_side_layout->addStretch(1);
- QGridLayout *mailbox_layout = new QGridLayout(2, 2, 1);
+ TQGridLayout *mailbox_layout = new TQGridLayout(2, 2, 1);
mailbox_layout->addMultiCellWidget(mailboxes, 0, 0, 0, 1);
mailbox_layout->addWidget(new_mailbox, 1, 0);
mailbox_layout->addWidget(delete_mailbox, 1, 1);
- QHBoxLayout *top_layout = new QHBoxLayout(this, 12);
+ TQHBoxLayout *top_layout = new TQHBoxLayout(this, 12);
top_layout->addLayout(mailbox_layout);
top_layout->addLayout(right_side_layout);
@@ -1396,7 +1396,7 @@ KBiffMailboxTab::~KBiffMailboxTab()
delete mailboxHash;
}
-void KBiffMailboxTab::readConfig(const QString& profile_)
+void KBiffMailboxTab::readConfig(const TQString& profile_)
{
// initialize some variables that need initing
oldItem = 0;
@@ -1410,7 +1410,7 @@ void KBiffMailboxTab::readConfig(const QString& profile_)
config->setGroup(profile_);
- QStringList mailbox_list;
+ TQStringList mailbox_list;
mailbox_list = config->readListEntry("Mailboxes", ',');
int number_of_mailboxes = mailbox_list.count();
@@ -1422,7 +1422,7 @@ void KBiffMailboxTab::readConfig(const QString& profile_)
KBiffMailbox *mailbox = new KBiffMailbox();
mailbox->key = *mailbox_list.at(i);
mailbox->url = KBiffURL(*mailbox_list.at(i+1));
- QString password(KBiffCodecs::base64Decode(*mailbox_list.at(i+2)));
+ TQString password(KBiffCodecs::base64Decode(*mailbox_list.at(i+2)));
if (password.isEmpty())
mailbox->store = false;
@@ -1432,8 +1432,8 @@ void KBiffMailboxTab::readConfig(const QString& profile_)
mailbox->url.setPass(password);
}
- QListViewItem *item = new QListViewItem(mailboxes, mailbox->key);
- item->setPixmap(0, QPixmap(UserIcon("mailbox")));
+ TQListViewItem *item = new TQListViewItem(mailboxes, mailbox->key);
+ item->setPixmap(0, TQPixmap(UserIcon("mailbox")));
mailboxHash->insert(mailbox->key, mailbox);
}
@@ -1446,15 +1446,15 @@ void KBiffMailboxTab::readConfig(const QString& profile_)
mailbox->url = defaultMailbox();
mailboxHash->insert(mailbox->key, mailbox);
- QListViewItem *item = new QListViewItem(mailboxes, mailbox->key);
- item->setPixmap(0, QPixmap(UserIcon("mailbox")));
+ TQListViewItem *item = new TQListViewItem(mailboxes, mailbox->key);
+ item->setPixmap(0, TQPixmap(UserIcon("mailbox")));
}
mailboxes->setSelected(mailboxes->firstChild(), true);
delete config;
}
-void KBiffMailboxTab::saveConfig(const QString& profile_)
+void KBiffMailboxTab::saveConfig(const TQString& profile_)
{
// open the config file
KSimpleConfig *config = new KSimpleConfig(CONFIG_FILE);
@@ -1462,14 +1462,14 @@ void KBiffMailboxTab::saveConfig(const QString& profile_)
config->setGroup(profile_);
- QStringList mailbox_list;
+ TQStringList mailbox_list;
- for (QListViewItem *item = mailboxes->firstChild();
+ for (TQListViewItem *item = mailboxes->firstChild();
item;
item = item->nextSibling())
{
KBiffMailbox *mailbox = new KBiffMailbox();
- QString item_text(item->text(0));
+ TQString item_text(item->text(0));
// if this mailbox is the current one, then use the current
// settings instead of the hash
@@ -1483,7 +1483,7 @@ void KBiffMailboxTab::saveConfig(const QString& profile_)
mailbox = mailboxHash->find(item_text);
- QString password(KBiffCodecs::base64Encode(mailbox->url.pass().local8Bit()));
+ TQString password(KBiffCodecs::base64Encode(mailbox->url.pass().local8Bit()));
KBiffURL url = mailbox->url;
url.setPass("");
@@ -1523,7 +1523,7 @@ void KBiffMailboxTab::browseFetchCommand()
void KBiffMailboxTab::setMailbox(const KBiffURL& url)
{
- QString prot(url.protocol());
+ TQString prot(url.protocol());
if (prot == "mbox")
protocolSelected(1);
@@ -1550,7 +1550,7 @@ void KBiffMailboxTab::setMailbox(const KBiffURL& url)
if (editMailbox->isEnabled())
{
- QString path(url.path());
+ TQString path(url.path());
if (((prot == "imap4") || (prot == "nntp") || (prot == "imap4s")) && !path.isEmpty() && path[0] == '/')
path.remove(0, 1);
@@ -1563,12 +1563,12 @@ void KBiffMailboxTab::setMailbox(const KBiffURL& url)
editServer->setText(url.host());
if (editUser->isEnabled())
{
- QString user(url.user());
+ TQString user(url.user());
editUser->setText(user);
}
if (editPassword->isEnabled())
{
- QString passwd(url.pass());
+ TQString passwd(url.pass());
editPassword->setText(passwd);
}
@@ -1578,7 +1578,7 @@ void KBiffMailboxTab::setMailbox(const KBiffURL& url)
async = url.searchPar("async") == "yes" ? true : false;
useApop = url.searchPar("apop") == "no" ? false : true;
- QString fetch = url.searchPar("fetch");
+ TQString fetch = url.searchPar("fetch");
checkFetchCommand->setChecked(!fetch.isEmpty());
editFetchCommand->setText(fetch);
}
@@ -1588,17 +1588,17 @@ const KBiffURL KBiffMailboxTab::getMailbox() const
KBiffURL url;
url.setProtocol(comboProtocol->currentText());
- QString prot(url.protocol());
+ TQString prot(url.protocol());
if (editUser->isEnabled())
{
- QString user(editUser->text());
+ TQString user(editUser->text());
url.setUser(user);
}
if (editPassword->isEnabled())
{
- QString passwd(editPassword->text());
+ TQString passwd(editPassword->text());
url.setPass(passwd);
}
@@ -1609,7 +1609,7 @@ const KBiffURL KBiffMailboxTab::getMailbox() const
if (editMailbox->isEnabled())
{
- QString path(editMailbox->text());
+ TQString path(editMailbox->text());
if (!path.isEmpty() && path[0] != '/')
path.prepend("/");
url.setPath(path);
@@ -1634,7 +1634,7 @@ const KBiffURL KBiffMailboxTab::getMailbox() const
else
url.setSearchPar("apop", "no");
}
- url.setSearchPar("timeout", QString().setNum(timeout));
+ url.setSearchPar("timeout", TQString().setNum(timeout));
}
if (checkFetchCommand->isChecked() && !editFetchCommand->text().isEmpty())
@@ -1643,11 +1643,11 @@ const KBiffURL KBiffMailboxTab::getMailbox() const
return url;
}
-const QList<KBiffMailbox> KBiffMailboxTab::getMailboxList() const
+const TQList<KBiffMailbox> KBiffMailboxTab::getMailboxList() const
{
- QList<KBiffMailbox> mbox_list;
+ TQList<KBiffMailbox> mbox_list;
- for (QListViewItem *item = mailboxes->firstChild();
+ for (TQListViewItem *item = mailboxes->firstChild();
item;
item = item->nextSibling())
{
@@ -1667,7 +1667,7 @@ void KBiffMailboxTab::slotDeleteMailbox()
return;
/* need some "Are you sure?" code here */
- QListViewItem *item = mailboxes->currentItem();
+ TQListViewItem *item = mailboxes->currentItem();
mailboxHash->remove(item->text(0));
mailboxes->takeItem(item);
@@ -1684,13 +1684,13 @@ void KBiffMailboxTab::slotNewMailbox()
dlg.setCaption(i18n("New Mailbox"));
if (dlg.exec())
{
- QString mailbox_name = dlg.getName();
+ TQString mailbox_name = dlg.getName();
// continue only if we received a decent name
if (mailbox_name.isEmpty() == false)
{
- QListViewItem *item = new QListViewItem(mailboxes, mailbox_name);
- item->setPixmap(0, QPixmap(UserIcon("mailbox")));
+ TQListViewItem *item = new TQListViewItem(mailboxes, mailbox_name);
+ item->setPixmap(0, TQPixmap(UserIcon("mailbox")));
KBiffMailbox *mailbox = new KBiffMailbox();
mailbox->store = false;
@@ -1702,7 +1702,7 @@ void KBiffMailboxTab::slotNewMailbox()
}
}
-void KBiffMailboxTab::slotMailboxSelected(QListViewItem *item)
+void KBiffMailboxTab::slotMailboxSelected(TQListViewItem *item)
{
KBiffMailbox *mailbox;
@@ -1823,7 +1823,7 @@ void KBiffMailboxTab::protocolSelected(int protocol)
void KBiffMailboxTab::browse()
{
- QString proto(getMailbox().protocol());
+ TQString proto(getMailbox().protocol());
if (proto == "imap4" || proto == "imap4s")
{
@@ -1836,7 +1836,7 @@ void KBiffMailboxTab::browse()
if (url.url().isEmpty())
return;
- QString path(url.path());
+ TQString path(url.path());
if (path.isEmpty())
return;
@@ -1850,7 +1850,7 @@ void KBiffMailboxTab::browse()
}
else
{
- QString file;
+ TQString file;
if (proto == "maildir")
file = KFileDialog::getExistingDirectory();
else
@@ -1866,7 +1866,7 @@ void KBiffMailboxTab::browse()
void KBiffMailboxTab::advanced()
{
KBiffMailboxAdvanced advanced_dlg;
- QString prot(getMailbox().protocol());
+ TQString prot(getMailbox().protocol());
if (prot == "mbox" || prot == "maildir" || prot == "file" || prot == "mh")
{
@@ -1903,17 +1903,17 @@ void KBiffMailboxTab::advanced()
const KBiffURL KBiffMailboxTab::defaultMailbox() const
{
- QFileInfo mailbox_info(getenv("MAIL"));
+ TQFileInfo mailbox_info(getenv("MAIL"));
if (mailbox_info.exists() == false)
{
- QString s(_PATH_MAILDIR);
+ TQString s(_PATH_MAILDIR);
s += "/";
s += getpwuid(getuid())->pw_name;
mailbox_info.setFile(s);
}
- QString default_path = mailbox_info.isDir() ? QString("maildir:") :
- QString("mbox:");
+ TQString default_path = mailbox_info.isDir() ? TQString("maildir:") :
+ TQString("mbox:");
default_path.append(mailbox_info.absFilePath());
return KBiffURL(default_path);
@@ -1922,17 +1922,17 @@ const KBiffURL KBiffMailboxTab::defaultMailbox() const
//////////////////////////////////////////////////////////////////////
// KBiffAboutTab
//////////////////////////////////////////////////////////////////////
-KBiffAboutTab::KBiffAboutTab(QWidget *parent_)
- : QWidget(parent_)
+KBiffAboutTab::KBiffAboutTab(TQWidget *parent_)
+ : TQWidget(parent_)
{
// load in the kbiff pixmap
- QPixmap logo_pixmap(kapp->icon());
+ TQPixmap logo_pixmap(kapp->icon());
- QLabel *pixmap_label = new QLabel(this);
+ TQLabel *pixmap_label = new TQLabel(this);
pixmap_label->setPixmap(logo_pixmap);
// we want a bigger logo
- QFont logo_font = QFont::defaultFont();
+ TQFont logo_font = TQFont::defaultFont();
logo_font.setPointSize(logo_font.pointSize() * 1.5);
logo_font.setBold(true);
@@ -1943,11 +1943,11 @@ KBiffAboutTab::KBiffAboutTab(QWidget *parent_)
logo_label->setUnderline(false);
logo_label->setGlow(false);
logo_label->setFloat(true);
- connect(logo_label, SIGNAL(leftClickedURL(const QString&)),
- SLOT(homepage(const QString&)));
+ connect(logo_label, SIGNAL(leftClickedURL(const TQString&)),
+ SLOT(homepage(const TQString&)));
- QLabel *version_label = new QLabel(this);
- version_label->setText(QString("Version %1\n\nCopyright (C) 1998-2008\nKurt Granroth").arg(kbiff_version));
+ TQLabel *version_label = new TQLabel(this);
+ version_label->setText(TQString("Version %1\n\nCopyright (C) 1998-2008\nKurt Granroth").arg(kbiff_version));
KURLLabel *email_label = new KURLLabel(this);
email_label->setText("granroth@kde.org");
@@ -1955,16 +1955,16 @@ KBiffAboutTab::KBiffAboutTab(QWidget *parent_)
email_label->setUnderline(false);
email_label->setGlow(false);
email_label->setFloat(true);
- connect(email_label, SIGNAL(leftClickedURL(const QString&)),
- SLOT(mailTo(const QString&)));
+ connect(email_label, SIGNAL(leftClickedURL(const TQString&)),
+ SLOT(mailTo(const TQString&)));
// about tab text layout
- QVBoxLayout *text_layout = new QVBoxLayout(0);
+ TQVBoxLayout *text_layout = new TQVBoxLayout(0);
text_layout->addWidget(version_label);
text_layout->addWidget(email_label);
// main about tab layout
- QGridLayout *about_layout = new QGridLayout(this, 3, 2, 12, 0);
+ TQGridLayout *about_layout = new TQGridLayout(this, 3, 2, 12, 0);
about_layout->addWidget(pixmap_label, 0, 0);
about_layout->addWidget(logo_label, 0, 1);
about_layout->addLayout(text_layout, 1, 1);
@@ -1975,39 +1975,39 @@ KBiffAboutTab::~KBiffAboutTab()
{
}
-void KBiffAboutTab::mailTo(const QString& url)
+void KBiffAboutTab::mailTo(const TQString& url)
{
(void) new KRun ( url );
}
-void KBiffAboutTab::homepage(const QString& url)
+void KBiffAboutTab::homepage(const TQString& url)
{
(void) new KRun ( url );
}
-KBiffNewDlg::KBiffNewDlg(QWidget* parent_, const char * name_)
+KBiffNewDlg::KBiffNewDlg(TQWidget* parent_, const char * name_)
: KDialog(parent_, name_, true)
{
// set my name
setCaption(i18n("New Name"));
- QLabel* label = new QLabel(i18n("&New Name:"), this);
- editName = new QLineEdit(this);
+ TQLabel* label = new TQLabel(i18n("&New Name:"), this);
+ editName = new TQLineEdit(this);
editName->setFocus();
label->setBuddy(editName);
// ok button
- QPushButton* button_ok = new QPushButton(i18n("&OK"), this);
+ TQPushButton* button_ok = new TQPushButton(i18n("&OK"), this);
button_ok->setDefault(true);
// cancel button
- QPushButton* button_cancel = new QPushButton(i18n("&Cancel"), this);
+ TQPushButton* button_cancel = new TQPushButton(i18n("&Cancel"), this);
connect(button_ok, SIGNAL(clicked()), SLOT(accept()));
connect(button_cancel, SIGNAL(clicked()), SLOT(reject()));
// NOW DO THE LAYOUT
- QGridLayout *top_layout = new QGridLayout(this, 2, 3, 12);
+ TQGridLayout *top_layout = new TQGridLayout(this, 2, 3, 12);
top_layout->addWidget(label, 0, 0);
top_layout->addMultiCellWidget(editName, 0, 0, 1, 2);
top_layout->addWidget(button_ok, 1, 1);