Source Code (Use browser search to find items of interest.)

Class Index

kbiff'KBiffMailboxAdvanced (./kdenetwork/kbiff/setupdlg.h:184)

class KBiffMailboxAdvanced : public QDialog
{
	Q_OBJECT
public:
	KBiffMailboxAdvanced();
	virtual ~KBiffMailboxAdvanced();

	const KBiffURL getMailbox() const;
	const unsigned int getPort() const;
	bool getPreauth() const;

	void setPort(unsigned int the_port, bool enable = true);
	void setTimeout(unsigned int the_to, bool enable = true);
	void setMailbox(const KBiffURL& url);
	void setPreauth(bool on);
	void setKeepalive(bool on);
	void setAsync(bool on);

protected slots:
	void portModified(const QString& text);
	void timeoutModified(const QString& text);
	void preauthModified(bool toggled);
	void keepaliveModified(bool toggled);
	void asyncModified(bool toggled);

private:
	QString    password;
	QLineEdit *mailbox;
	QLineEdit *port;
	QLineEdit *timeout;
	QCheckBox *preauth;
	QCheckBox *keepalive;
	QCheckBox *async;
};


kbiff'KBiffMailboxAdvanced::KBiffMailboxAdvanced() (./kdenetwork/kbiff/setupdlg.cpp:944)

KBiffMailboxAdvanced::KBiffMailboxAdvanced()
	: QDialog(0, 0, true, 0)
{
TRACEINIT("KBiffMailboxAdvanced::KBiffMailboxAdvanced()");
	setCaption(i18n("Advanced Options"));

	QLabel *mailbox_label = new QLabel(i18n("Mailbox &URL:"), this);
    mailbox_label->setAlignment(AlignVCenter | AlignRight);
	mailbox = new QLineEdit(this);
	mailbox_label->setBuddy(mailbox);
    QString 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);

	QLabel *port_label = new QLabel(i18n("P&ort:"), this);
    port_label->setAlignment(AlignVCenter | AlignRight);
	port = new QLineEdit(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);

    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);
	timeout_label->setAlignment(AlignVCenter | AlignRight);
	timeout = new QLineEdit(this);
    QWhatsThis::add(timeout, whatsthis);
    timeout_label->setBuddy(timeout);

	preauth = new QCheckBox(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);

	keepalive = new QCheckBox(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);

	async = new QCheckBox(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);

	QPushButton *ok = new QPushButton(i18n("&OK"), this);
	ok->setDefault(true);

	QPushButton *cancel = new QPushButton(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(port, SIGNAL(textChanged(const QString&)),
	              SLOT(portModified(const QString&)));
	connect(ok, SIGNAL(clicked()), SLOT(accept()));
	connect(cancel, SIGNAL(clicked()), SLOT(reject()));
	connect(timeout, SIGNAL(textChanged(const QString&)),
	                 SLOT(timeoutModified(const QString&)));

	// NOW DO THE LAYOUT
	QGridLayout *top_layout = new QGridLayout(this, 6, 4, 12);
	top_layout->addWidget(mailbox_label, 0, 0);
	top_layout->addMultiCellWidget(mailbox, 0, 0, 1, 3);
	top_layout->addWidget(port_label, 1, 0);
	top_layout->addWidget(port, 1, 1);
	top_layout->addWidget(timeout_label, 1, 2);
	top_layout->addWidget(timeout, 1, 3);
	top_layout->addWidget(preauth, 2, 1);
	top_layout->addWidget(keepalive, 3, 1);
	top_layout->addWidget(async, 4, 1);
	top_layout->addWidget(ok, 5, 2);
	top_layout->addWidget(cancel, 5, 3);
}


kbiff'KBiffMailboxAdvanced::~KBiffMailboxAdvanced() (./kdenetwork/kbiff/setupdlg.cpp:1033)

KBiffMailboxAdvanced::~KBiffMailboxAdvanced()
{
TRACEINIT("KBiffMailboxAdvanced::~KBiffMailboxAdvanced()");
}


kbiff'KBiffMailboxAdvanced::getMailbox() (./kdenetwork/kbiff/setupdlg.cpp:1038)

const KBiffURL KBiffMailboxAdvanced::getMailbox() const
{
	KBiffURL url(mailbox->text());
	url.setPass(password);
	return url;
}


kbiff'KBiffMailboxAdvanced::getPort() (./kdenetwork/kbiff/setupdlg.cpp:1045)

const unsigned int KBiffMailboxAdvanced::getPort() const
{
	return QString(port->text()).toInt();
}


kbiff'KBiffMailboxAdvanced::setMailbox() (./kdenetwork/kbiff/setupdlg.cpp:1050)

void KBiffMailboxAdvanced::setMailbox(const KBiffURL& url)
{
	password = url.pass();
	KBiffURL new_url(url);
	new_url.setPass("");
	mailbox->setText(new_url.url());
}


kbiff'KBiffMailboxAdvanced::setPort() (./kdenetwork/kbiff/setupdlg.cpp:1058)

void KBiffMailboxAdvanced::setPort(unsigned int the_port, bool enable)
{
	port->setEnabled(enable);
	port->setText(QString().setNum(the_port));
}


kbiff'KBiffMailboxAdvanced::portModified() (./kdenetwork/kbiff/setupdlg.cpp:1064)

void KBiffMailboxAdvanced::portModified(const QString& text)
{
	KBiffURL url = getMailbox();
	url.setPort(QString(text).toInt());
	setMailbox(url);
}


kbiff'KBiffMailboxAdvanced::setTimeout() (./kdenetwork/kbiff/setupdlg.cpp:1071)

void KBiffMailboxAdvanced::setTimeout(unsigned int the_to, bool enable)
{
	timeout->setEnabled(enable);
	timeout->setText(QString().setNum(the_to));
}


kbiff'KBiffMailboxAdvanced::timeoutModified() (./kdenetwork/kbiff/setupdlg.cpp:1077)

void KBiffMailboxAdvanced::timeoutModified(const QString& text)
{
	KBiffURL url = getMailbox();
	url.setSearchPar("timeout", text.local8Bit());
	setMailbox(url);
}


kbiff'KBiffMailboxAdvanced::preauthModified() (./kdenetwork/kbiff/setupdlg.cpp:1084)

void KBiffMailboxAdvanced::preauthModified(bool is_preauth)
{
TRACEINIT("KBiffMailboxAdvanced::preauthModified()");
	KBiffURL url = getMailbox();
	if (is_preauth)
		url.setSearchPar("preauth", "yes");
	else
		url.setSearchPar("preauth", "no");
	setMailbox(url);
}


kbiff'KBiffMailboxAdvanced::keepaliveModified() (./kdenetwork/kbiff/setupdlg.cpp:1095)

void KBiffMailboxAdvanced::keepaliveModified(bool is_keepalive)
{
	KBiffURL url = getMailbox();
	if (is_keepalive)
		url.setSearchPar("keepalive", "yes");
	else
		url.setSearchPar("keepalive", "no");
	setMailbox(url);
}


kbiff'KBiffMailboxAdvanced::asyncModified() (./kdenetwork/kbiff/setupdlg.cpp:1105)

void KBiffMailboxAdvanced::asyncModified(bool is_async)
{
	KBiffURL url = getMailbox();
	if (is_async)
		url.setSearchPar("async", "yes");
	else
		url.setSearchPar("async", "no");
	setMailbox(url);
}


kbiff'KBiffMailboxAdvanced::setPreauth() (./kdenetwork/kbiff/setupdlg.cpp:1115)

void KBiffMailboxAdvanced::setPreauth(bool on)
{
	preauth->setEnabled(true);
	preauth->setChecked(on);
}


kbiff'KBiffMailboxAdvanced::setKeepalive() (./kdenetwork/kbiff/setupdlg.cpp:1121)

void KBiffMailboxAdvanced::setKeepalive(bool on)
{
	keepalive->setEnabled(true);
	keepalive->setChecked(on);
}


kbiff'KBiffMailboxAdvanced::setAsync() (./kdenetwork/kbiff/setupdlg.cpp:1127)

void KBiffMailboxAdvanced::setAsync(bool on)
{
	async->setEnabled(true);
	async->setChecked(on);
}


kbiff'KBiffMailboxAdvanced::getPreauth() (./kdenetwork/kbiff/setupdlg.cpp:1133)

bool KBiffMailboxAdvanced::getPreauth() const
{
	return preauth->isChecked();
}