Initial TQt conversion

pull/1/head
Slávek Banko 11 years ago
parent 9be78eabff
commit 979e7a713a

@ -1060,7 +1060,7 @@ elif test "$kde_use_qt_emb" = "yes"; then
x_includes=""
x_libraries=""
elif test "$kde_use_qt_mac" = "yes"; then
dnl We're using QT/Mac (I use QT_MAC so that qglobal.h doesn't *have* to
dnl We're using QT/Mac (I use QT_MAC so that ntqglobal.h doesn't *have* to
dnl be included to get the information) --Sam
CXXFLAGS="$CXXFLAGS -DQT_MAC -no-cpp-precomp"
CFLAGS="$CFLAGS -DQT_MAC -no-cpp-precomp"
@ -1092,19 +1092,19 @@ AC_DEFUN([KDE_PRINT_QT_PROGRAM],
AC_REQUIRE([KDE_USE_QT])
cat > conftest.$ac_ext <<EOF
#include "confdefs.h"
#include <qglobal.h>
#include <qapplication.h>
#include <ntqglobal.h>
#include <ntqapplication.h>
EOF
if test "$kde_qtver" = "2"; then
cat >> conftest.$ac_ext <<EOF
#include <qevent.h>
#include <qstring.h>
#include <qstyle.h>
#include <ntqevent.h>
#include <ntqstring.h>
#include <ntqstyle.h>
EOF
if test $kde_qtsubver -gt 0; then
cat >> conftest.$ac_ext <<EOF
#if QT_VERSION < 210
#if TQT_VERSION < 210
#error 1
#endif
EOF
@ -1113,8 +1113,8 @@ fi
if test "$kde_qtver" = "3"; then
cat >> conftest.$ac_ext <<EOF
#include <qcursor.h>
#include <qstylefactory.h>
#include <ntqcursor.h>
#include <ntqstylefactory.h>
#include <private/qucomextra_p.h>
EOF
fi
@ -1201,22 +1201,22 @@ fi
if test -z "$3"; then
if test $kde_qtver = 3; then
if test $kde_qtsubver -gt 0; then
kde_qt_verstring="QT_VERSION >= 0x03@VER@00 && QT_VERSION < 0x040000"
kde_qt_verstring="TQT_VERSION >= 0x03@VER@00 && TQT_VERSION < 0x040000"
qtsubver=`echo "00$kde_qtsubver" | sed -e 's,.*\(..\)$,\1,'`
kde_qt_verstring=`echo $kde_qt_verstring | sed -e "s,@VER@,$qtsubver,"`
else
kde_qt_verstring="QT_VERSION >= 300 && QT_VERSION < 0x040000"
kde_qt_verstring="TQT_VERSION >= 300 && TQT_VERSION < 0x040000"
fi
fi
if test $kde_qtver = 2; then
if test $kde_qtsubver -gt 0; then
kde_qt_verstring="QT_VERSION >= 222"
kde_qt_verstring="TQT_VERSION >= 222"
else
kde_qt_verstring="QT_VERSION >= 200"
kde_qt_verstring="TQT_VERSION >= 200"
fi
fi
if test $kde_qtver = 1; then
kde_qt_verstring="QT_VERSION >= 142 && QT_VERSION < 200"
kde_qt_verstring="TQT_VERSION >= 142 && TQT_VERSION < 200"
fi
else
kde_qt_verstring="$3"
@ -1231,8 +1231,8 @@ if test $kde_qtver = 3; then
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
fi
if test "$PKG_CONFIG" != "no" ; then
if $PKG_CONFIG --exists qt-mt ; then
kde_qt_dirs="$kde_qt_dirs `$PKG_CONFIG --variable=prefix qt-mt`"
if $PKG_CONFIG --exists tqt-mt ; then
kde_qt_dirs="$kde_qt_dirs `$PKG_CONFIG --variable=prefix tqt-mt`"
fi
fi
fi
@ -1333,7 +1333,7 @@ AC_ARG_ENABLE(
USING_QT_MT=""
dnl ------------------------------------------------------------------------
dnl If we not get --disable-qt-mt then adjust some vars for the host.
dnl If we not get --disable-tqt-mt then adjust some vars for the host.
dnl ------------------------------------------------------------------------
KDE_MT_LDFLAGS=
@ -1391,7 +1391,7 @@ dnl ------------------------------------------------------------
fi
dnl ------------------------------------------------------------------------
dnl If we got --enable-qt-mt then adjust the Qt library name for the host.
dnl If we got --enable-tqt-mt then adjust the Qt library name for the host.
dnl ------------------------------------------------------------------------
if test "x$kde_use_qt_mt" = "xyes"; then
@ -1455,8 +1455,8 @@ if test -z "$PKG_CONFIG"; then
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
fi
if test "$PKG_CONFIG" != "no" ; then
if $PKG_CONFIG --exists qt-mt ; then
qt_incdirs="$qt_incdirs `$PKG_CONFIG --variable=includedir qt-mt`"
if $PKG_CONFIG --exists tqt-mt ; then
qt_incdirs="$qt_incdirs `$PKG_CONFIG --variable=includedir tqt-mt`"
fi
fi
qt_incdirs="$QTINC $qt_incdirs /usr/local/qt/include /usr/include/qt /usr/include /usr/X11R6/include/X11/qt /usr/X11R6/include/qt /usr/X11R6/include/qt2 /usr/include/qt3 $x_includes"
@ -1465,9 +1465,9 @@ if test ! "$ac_qt_includes" = "NO"; then
fi
if test "$kde_qtver" != "1"; then
kde_qt_header=qstyle.h
kde_qt_header=ntqstyle.h
else
kde_qt_header=qglobal.h
kde_qt_header=ntqglobal.h
fi
AC_FIND_FILE($kde_qt_header, $qt_incdirs, qt_incdir)
@ -1481,8 +1481,8 @@ if test -z "$PKG_CONFIG"; then
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
fi
if test "$PKG_CONFIG" != "no" ; then
if $PKG_CONFIG --exists qt-mt ; then
qt_libdirs="$qt_incdirs `$PKG_CONFIG --variable=libdir qt-mt`"
if $PKG_CONFIG --exists tqt-mt ; then
qt_libdirs="$qt_incdirs `$PKG_CONFIG --variable=libdir tqt-mt`"
fi
fi
qt_libdirs="$QTLIB $qt_libdirs /usr/X11R6/lib /usr/lib /usr/local/qt/lib $x_libraries"
@ -2058,7 +2058,7 @@ AC_CACHE_VAL(kde_cv_have_kdeqtaddon,
LDFLAGS="$LDFLAGS $all_libraries $USER_LDFLAGS"
AC_TRY_LINK([
#include <qdom.h>
#include <ntqdom.h>
],
[
QDomDocument doc;
@ -2619,7 +2619,7 @@ LIBS=`echo $LIBS | sed "s/$LIBJPEG//"`
ac_save_CXXFLAGS="$CXXFLAGS"
CXXFLAGS="$CXXFLAGS $all_includes $USER_INCLUDES"
AC_TRY_LINK(
[#include <qapplication.h>],
[#include <ntqapplication.h>],
[
int argc;
char** argv;
@ -3464,7 +3464,7 @@ AC_DEFUN([KDE_ENABLE_HIDDEN_VISIBILITY],
AC_TRY_COMPILE(
[
#include <qglobal.h>
#include <ntqglobal.h>
#if Q_EXPORT - 0 != 0
/* if this compiles, then Q_EXPORT is undefined */
/* if Q_EXPORT is nonempty, this will break compilation */
@ -4714,7 +4714,7 @@ CXXFLAGS="$CXXFLAGS -I$qt_incdir $all_includes"
AC_TRY_RUN(dnl
[
#include <qimageio.h>
#include <qstring.h>
#include <ntqstring.h>
int main() {
QString t = "hallo";
t.fill('t');
@ -5559,7 +5559,7 @@ if test "${with_qt_dir+set}" = set; then
kde_qtdir="$with_qt_dir"
fi
AC_FIND_FILE(qsql.html, [ $kde_qtdir/doc/html $QTDIR/doc/html /usr/share/doc/packages/qt3/html /usr/lib/qt/doc /usr/lib/qt3/doc /usr/lib/qt3/doc/html /usr/doc/qt3/html /usr/doc/qt3 /usr/share/doc/qt3-doc /usr/share/qt3/doc/html /usr/X11R6/share/doc/qt/html ], QTDOCDIR)
AC_FIND_FILE(ntqsql.html, [ $kde_qtdir/doc/html $QTDIR/doc/html /usr/share/doc/packages/qt3/html /usr/lib/qt/doc /usr/lib/qt3/doc /usr/lib/qt3/doc/html /usr/doc/qt3/html /usr/doc/qt3 /usr/share/doc/qt3-doc /usr/share/qt3/doc/html /usr/X11R6/share/doc/qt/html ], QTDOCDIR)
AC_MSG_RESULT($QTDOCDIR)
AC_SUBST(QTDOCDIR)
@ -5580,7 +5580,7 @@ AC_SUBST(DOXYGEN_PROJECT_NAME)
AC_SUBST(DOXYGEN_PROJECT_NUMBER)
KDE_HAS_DOXYGEN=no
if test -n "$DOXYGEN" && test -x "$DOXYGEN" && test -f $QTDOCDIR/qsql.html; then
if test -n "$DOXYGEN" && test -x "$DOXYGEN" && test -f $QTDOCDIR/ntqsql.html; then
KDE_HAS_DOXYGEN=yes
fi
AC_SUBST(KDE_HAS_DOXYGEN)

@ -7,8 +7,8 @@
*/
#include "kbiff.h"
#include "kbiff.moc"
#include <qmovie.h>
#include <qtooltip.h>
#include <ntqmovie.h>
#include <ntqtooltip.h>
#include <kaudioplayer.h>
#include <kconfig.h>
@ -30,9 +30,9 @@
#include <dcopclient.h>
KBiff::KBiff(DCOPClient *client_, QWidget *parent_)
KBiff::KBiff(DCOPClient *client_, TQWidget *parent_)
: DCOPObjectProxy(client_),
QLabel(parent_),
TQLabel(parent_),
statusTimer(0),
status(0),
statusChanged(true),
@ -67,13 +67,13 @@ KBiff::~KBiff()
// we no longer want to be registered
DCOPClient *client = kapp->dcopClient();
QCString proxy = QCString("kbiff-") + QCString().setNum(getpid());
TQCString proxy = TQCString("kbiff-") + TQCString().setNum(getpid());
if (client->isApplicationRegistered(proxy) == true)
{
QByteArray params;
QDataStream ds(params, IO_WriteOnly);
TQByteArray params;
TQDataStream ds(params, IO_WriteOnly);
ds << proxy;
client->send("kbiff", "kbiff", "proxyDeregister(QString)", params);
client->send("kbiff", "kbiff", "proxyDeregister(TQString)", params);
}
client->detach();
}
@ -106,9 +106,9 @@ void KBiff::processSetup(const KBiffSetup* setup_, bool run_)
// if we aren't going the status route, we should at least
// provide a tooltip!
if (dostatus == false)
QToolTip::add(this, profile);
TQToolTip::add(this, profile);
else
QToolTip::remove(this);
TQToolTip::remove(this);
// set all the new mailboxes
setMailboxList(setup_->getMailboxList(), setup_->getPoll());
@ -152,9 +152,9 @@ void KBiff::processSetup(const KBiffSetup* setup_, bool run_)
delete setup_;
}
void KBiff::setMailboxList(const QList<KBiffMailbox>& mailbox_list, unsigned int poll)
void KBiff::setMailboxList(const TQList<KBiffMailbox>& mailbox_list, unsigned int poll)
{
QList<KBiffMailbox> tmp_list = mailbox_list;
TQList<KBiffMailbox> tmp_list = mailbox_list;
myMUTEX = true;
if (isRunning())
@ -169,10 +169,10 @@ void KBiff::setMailboxList(const QList<KBiffMailbox>& mailbox_list, unsigned int
monitor->setMailbox(*url);
monitor->setPollInterval(poll);
monitor->setMailboxKey(mbox->key);
connect(monitor, SIGNAL(signal_newMail(const int, const QString&)),
this, SLOT(haveNewMail(const int, const QString&)));
connect(monitor, SIGNAL(signal_currentStatus(const int, const QString&, const KBiffMailState)),
this, SLOT(currentStatus(const int, const QString&, const KBiffMailState)));
connect(monitor, SIGNAL(signal_newMail(const int, const TQString&)),
this, SLOT(haveNewMail(const int, const TQString&)));
connect(monitor, SIGNAL(signal_currentStatus(const int, const TQString&, const KBiffMailState)),
this, SLOT(currentStatus(const int, const TQString&, const KBiffMailState)));
connect(monitor, SIGNAL(signal_noMail()), this, SLOT(displayPixmap()));
connect(monitor, SIGNAL(signal_noMail()),
this, SLOT(haveNoNewMail()));
@ -182,10 +182,10 @@ void KBiff::setMailboxList(const QList<KBiffMailbox>& mailbox_list, unsigned int
connect(monitor, SIGNAL(signal_noConn()), this, SLOT(displayPixmap()));
connect(monitor, SIGNAL(signal_noConn()),
this, SLOT(haveNoNewMail()));
connect(monitor, SIGNAL(signal_invalidLogin(const QString&)),
this, SLOT(invalidLogin(const QString&)));
connect(monitor, SIGNAL(signal_fetchMail(const QString&)),
this, SLOT(slotLaunchFetchClient(const QString&)));
connect(monitor, SIGNAL(signal_invalidLogin(const TQString&)),
this, SLOT(invalidLogin(const TQString&)));
connect(monitor, SIGNAL(signal_fetchMail(const TQString&)),
this, SLOT(slotLaunchFetchClient(const TQString&)));
monitorList.append(monitor);
}
myMUTEX = false;
@ -213,7 +213,7 @@ void KBiff::readSessionConfig()
///////////////////////////////////////////////////////////////////////////
// Protected Virtuals
///////////////////////////////////////////////////////////////////////////
void KBiff::mousePressEvent(QMouseEvent *e)
void KBiff::mousePressEvent(TQMouseEvent *e)
{
// regardless of which button, get rid of the status box
if (status)
@ -242,9 +242,9 @@ void KBiff::mousePressEvent(QMouseEvent *e)
}
}
void KBiff::enterEvent(QEvent *e)
void KBiff::enterEvent(TQEvent *e)
{
QLabel::enterEvent(e);
TQLabel::enterEvent(e);
// return now if the user doesn't want this feature.
// *sniff*.. the ingrate.. I worked so hard on this, too... *sob*
@ -256,15 +256,15 @@ void KBiff::enterEvent(QEvent *e)
return;
// popup the status in one second
statusTimer = new QTimer(this);
statusTimer = new TQTimer(this);
connect(statusTimer, SIGNAL(timeout()), this, SLOT(popupStatus()));
statusTimer->start(1000, true);
}
void KBiff::leaveEvent(QEvent *e)
void KBiff::leaveEvent(TQEvent *e)
{
QLabel::leaveEvent(e);
TQLabel::leaveEvent(e);
// stop the timer if it is going
if (statusTimer)
@ -303,14 +303,14 @@ void KBiff::popupStatus()
}
status->updateListView(statusList);
status->popup(QCursor::pos());
status->popup(TQCursor::pos());
}
bool KBiff::isGIF8x(const QString& file_name)
bool KBiff::isGIF8x(const TQString& file_name)
{
/* The first test checks if we can open the file */
QFile gif8x(file_name);
TQFile gif8x(file_name);
if (gif8x.open(IO_ReadOnly) == false)
return false;
@ -378,7 +378,7 @@ void KBiff::displayPixmap()
// we will try to deduce the pixmap (or gif) name now. it will
// vary depending on the dock and mail state
QString pixmap_name;
TQString pixmap_name;
bool has_new = false, has_old = false, has_no = true, has_noconn = false;
KBiffMonitor *monitor;
for (monitor = monitorList.first();
@ -435,7 +435,7 @@ void KBiff::displayPixmap()
if (docked)
{
// we need to check if this has path info encoded into it
QFileInfo info(pixmap_name);
TQFileInfo info(pixmap_name);
// if info.fileName() returns pixmap_name, then we no there
// isn't any paths attached and we can just prepend our 'mini'
@ -446,7 +446,7 @@ void KBiff::displayPixmap()
// so we have some path junk on it. we get the filename
// by itself, prepend our 'mini' and tack it onto the end
// of the original dirpath. simple
QString filename(info.fileName());
TQString filename(info.fileName());
filename.prepend("mini-");
// we aren't guaranteed that the dirpath will end in a /
@ -454,18 +454,18 @@ void KBiff::displayPixmap()
pixmap_name = info.dirPath() + "/" + filename;
}
}
QString filename = KGlobal::iconLoader()->iconPath( pixmap_name, KIcon::User );
QFileInfo file(filename);
TQString filename = KGlobal::iconLoader()->iconPath( pixmap_name, KIcon::User );
TQFileInfo file(filename);
// at this point, we have the file to display. so display it
if (isGIF8x(file.absFilePath()))
setMovie(QMovie(file.absFilePath()));
setMovie(TQMovie(file.absFilePath()));
else
setPixmap(QPixmap(file.absFilePath()));
setPixmap(TQPixmap(file.absFilePath()));
adjustSize();
}
void KBiff::currentStatus(const int num, const QString& the_mailbox, const KBiffMailState the_state)
void KBiff::currentStatus(const int num, const TQString& the_mailbox, const KBiffMailState the_state)
{
statusChanged = true;
// iterate through all saved notify dialogs to see if "our" one is
@ -508,7 +508,7 @@ void KBiff::currentStatus(const int num, const QString& the_mailbox, const KBiff
}
}
void KBiff::haveNewMail(const int num, const QString& the_mailbox)
void KBiff::haveNewMail(const int num, const TQString& the_mailbox)
{
displayPixmap();
@ -563,7 +563,7 @@ void KBiff::haveNoNewMail()
}
}
QString KBiff::getURLWithNewMail()
TQString KBiff::getURLWithNewMail()
{
KBiffMonitor *monitor;
for (monitor = monitorList.first();
@ -577,9 +577,9 @@ QString KBiff::getURLWithNewMail()
return monitorList.first()->getMailbox();
}
QString KBiff::getMailBoxWithNewMail()
TQString KBiff::getMailBoxWithNewMail()
{
QString url(getURLWithNewMail());
TQString url(getURLWithNewMail());
int slashPos = url.find('/');
if(slashPos == -1)
@ -588,7 +588,7 @@ QString KBiff::getMailBoxWithNewMail()
return url.mid(url.find(':') + 1);
}
QString KBiff::replaceCommandArgs(QString cmdStr)
TQString KBiff::replaceCommandArgs(TQString cmdStr)
{
bool expand = false;
for(unsigned int i = 0; i < cmdStr.length(); i++)
@ -628,7 +628,7 @@ void KBiff::dock()
if (docked)
kapp->setTopWidget(this);
else
kapp->setTopWidget(new QWidget);
kapp->setTopWidget(new TQWidget);
}
if (docked == false)
@ -643,7 +643,7 @@ void KBiff::dock()
// (un)dock it!
this->show();
QTimer::singleShot(1000, this, SLOT(displayPixmap()));
TQTimer::singleShot(1000, this, SLOT(displayPixmap()));
}
void KBiff::setup()
@ -757,7 +757,7 @@ void KBiff::popupMenu()
popup->insertItem(i18n("E&xit"), kapp, SLOT(quit()));
popup->popup(QCursor::pos());
popup->popup(TQCursor::pos());
}
void KBiff::reset()
@ -802,12 +802,12 @@ bool KBiff::isRunning()
return is_running;
}
void KBiff::executeCommand(const QString& command)
void KBiff::executeCommand(const TQString& command)
{
KRun::runCommand(command);
}
void KBiff::slotLaunchFetchClient(const QString& fetchClient)
void KBiff::slotLaunchFetchClient(const TQString& fetchClient)
{
if (!fetchClient.isEmpty())
executeCommand(fetchClient);
@ -819,21 +819,21 @@ void KBiff::slotLaunchMailClient()
executeCommand(replaceCommandArgs(mailClient));
}
void KBiff::slotPlaySound(const QString& play_sound)
void KBiff::slotPlaySound(const TQString& play_sound)
{
// make sure something is specified
if (!play_sound.isNull())
KAudioPlayer::play(play_sound);
}
bool KBiff::process(const QCString&, const QCString& function,
const QByteArray& data, QCString& replyType,
QByteArray &replyData)
bool KBiff::process(const TQCString&, const TQCString& function,
const TQByteArray& data, TQCString& replyType,
TQByteArray &replyData)
{
QDataStream args(data, IO_ReadOnly);
QDataStream reply(replyData, IO_WriteOnly);
QString proxy;
if (function == "proxyRegister(QString)")
TQDataStream args(data, IO_ReadOnly);
TQDataStream reply(replyData, IO_WriteOnly);
TQString proxy;
if (function == "proxyRegister(TQString)")
{
args >> proxy;
proxyList.append(proxy);
@ -841,7 +841,7 @@ bool KBiff::process(const QCString&, const QCString& function,
return true;
}
else if (function == "proxyDeregister(QString)")
else if (function == "proxyDeregister(TQString)")
{
args >> proxy;
proxyList.remove(proxy);
@ -849,9 +849,9 @@ bool KBiff::process(const QCString&, const QCString& function,
return true;
}
else if (function == "hasMailbox(QString)")
else if (function == "hasMailbox(TQString)")
{
QString mailbox;
TQString mailbox;
args >> mailbox;
reply << (bool) findMailbox(mailbox, proxy);
@ -859,16 +859,16 @@ bool KBiff::process(const QCString&, const QCString& function,
return true;
}
else if (function == "mailCount(QString)")
else if (function == "mailCount(TQString)")
{
reply << -1;
replyType = "int";
return true;
}
else if (function == "newMailCount(QString)")
else if (function == "newMailCount(TQString)")
{
QString mailbox;
TQString mailbox;
args >> mailbox;
reply << newMailCount(mailbox);
@ -880,26 +880,26 @@ bool KBiff::process(const QCString&, const QCString& function,
return false;
}
int KBiff::newMailCount(const QString& url)
int KBiff::newMailCount(const TQString& url)
{
int newmail = -1;
QString proxy;
TQString proxy;
if (findMailbox(url, proxy) == true)
{
if (proxy != QString::null)
if (proxy != TQString::null)
{
QByteArray data;
QDataStream ds(data, IO_WriteOnly);
TQByteArray data;
TQDataStream ds(data, IO_WriteOnly);
ds << url;
QByteArray reply_data;
QCString reply_type;
QDataStream reply(reply_data, IO_ReadOnly);
TQByteArray reply_data;
TQCString reply_type;
TQDataStream reply(reply_data, IO_ReadOnly);
DCOPClient *dcc = kapp->dcopClient();
if (dcc->call(proxy.ascii(), "kbiff",
"newMailCount(QString)", data, reply_type,
"newMailCount(TQString)", data, reply_type,
reply_data) == true)
{
reply >> newmail;
@ -923,7 +923,7 @@ int KBiff::newMailCount(const QString& url)
return newmail;
}
bool KBiff::findMailbox(const QString& url, QString& proxy)
bool KBiff::findMailbox(const TQString& url, TQString& proxy)
{
bool has_mailbox = false;
KBiffMonitor *monitor;
@ -937,17 +937,17 @@ bool KBiff::findMailbox(const QString& url, QString& proxy)
}
if (has_mailbox == false)
{
QByteArray data, replyData;
QCString replyType;
QDataStream ds(data, IO_WriteOnly);
TQByteArray data, replyData;
TQCString replyType;
TQDataStream ds(data, IO_WriteOnly);
ds << url;
// okay, now try to iterate through our proxies
QStringList::Iterator it = proxyList.begin();
TQStringList::Iterator it = proxyList.begin();
for ( ; it != proxyList.end(); it++)
{
DCOPClient *dcc = kapp->dcopClient();
if (dcc->call(QCString((*it).ascii()), "kbiff",
"hasMailbox(QString)", data, replyType,
if (dcc->call(TQCString((*it).ascii()), "kbiff",
"hasMailbox(TQString)", data, replyType,
replyData) == true)
{
has_mailbox = true;
@ -973,19 +973,19 @@ void KBiff::registerMe(DCOPClient *client)
{
// okay, there is a running kbiff already. we will let it
// know that we are active and let it feed us requests
QCString proxy = QCString("kbiff-") + QCString().setNum(getpid());
QByteArray params, reply;
QCString reply_type;
QDataStream ds(params, IO_WriteOnly);
TQCString proxy = TQCString("kbiff-") + TQCString().setNum(getpid());
TQByteArray params, reply;
TQCString reply_type;
TQDataStream ds(params, IO_WriteOnly);
ds << proxy;
client->send("kbiff", "kbiff", "proxyRegister(QString)", params);
client->registerAs(QCString(proxy));
client->send("kbiff", "kbiff", "proxyRegister(TQString)", params);
client->registerAs(TQCString(proxy));
}
}
void KBiff::invalidLogin(const QString& mailbox)
void KBiff::invalidLogin(const TQString& mailbox)
{
QString title(i18n("Invalid Login to %1").arg(mailbox));
TQString title(i18n("Invalid Login to %1").arg(mailbox));
KMessageBox::sorry(0,
i18n("I was not able to login to the remote server.\n"
"This means that either the server is down or you have "

@ -14,7 +14,7 @@
#include <config.h>
#endif
#include <qlist.h>
#include <ntqlist.h>
#include <kbiffmonitor.h>
#include <setupdlg.h>
@ -22,8 +22,8 @@
#include <kbiffurl.h>
#include <kapp.h>
#include <qlabel.h>
#include <qtimer.h>
#include <ntqlabel.h>
#include <ntqtimer.h>
#include <notify.h>
#include <status.h>
@ -33,11 +33,11 @@
class Led;
class KBiff : public QLabel, virtual public DCOPObjectProxy
class KBiff : public TQLabel, virtual public DCOPObjectProxy
{
Q_OBJECT
public:
KBiff(DCOPClient *client_, QWidget *parent_ = 0);
KBiff(DCOPClient *client_, TQWidget *parent_ = 0);
virtual ~KBiff();
bool isDocked() const;
@ -45,37 +45,37 @@ public:
void processSetup(const KBiffSetup* setup, bool start);
void readSessionConfig();
void setMailboxList(const QList<KBiffMailbox>& mailbox_list, unsigned int poll = 60);
void setMailboxList(const TQList<KBiffMailbox>& mailbox_list, unsigned int poll = 60);
virtual bool process(const QCString& obj, const QCString& function,
const QByteArray& data, QCString& replyType,
QByteArray &replyData );
virtual bool process(const TQCString& obj, const TQCString& function,
const TQByteArray& data, TQCString& replyType,
TQByteArray &replyData );
public slots:
void slotPlaySound(const QString&);
void slotLaunchFetchClient(const QString&);
void slotPlaySound(const TQString&);
void slotLaunchFetchClient(const TQString&);
void slotLaunchMailClient();
protected:
void mousePressEvent(QMouseEvent *);
void enterEvent(QEvent *);
void leaveEvent(QEvent *);
void mousePressEvent(TQMouseEvent *);
void enterEvent(TQEvent *);
void leaveEvent(TQEvent *);
protected:
void popupMenu();
void reset();
bool isRunning();
bool isGIF8x(const QString & file);
void executeCommand(const QString& command);
bool isGIF8x(const TQString & file);
void executeCommand(const TQString& command);
void registerMe(DCOPClient *client);
protected slots:
void saveYourself();
void invokeHelp();
void displayPixmap();
void haveNewMail(const int, const QString &);
void haveNewMail(const int, const TQString &);
void haveNoNewMail();
void currentStatus(const int, const QString &, const KBiffMailState);
void currentStatus(const int, const TQString &, const KBiffMailState);
void dock();
void setup();
void checkMailNow();
@ -84,38 +84,38 @@ protected slots:
void stop();
void start();
void popupStatus();
void invalidLogin(const QString& mailbox);
void invalidLogin(const TQString& mailbox);
private:
bool findMailbox(const QString& url, QString& proxy);
int newMailCount(const QString& url);
bool findMailbox(const TQString& url, TQString& proxy);
int newMailCount(const TQString& url);
QString getURLWithNewMail();
QString getMailBoxWithNewMail();
QString replaceCommandArgs(QString cmdStr);
TQString getURLWithNewMail();
TQString getMailBoxWithNewMail();
TQString replaceCommandArgs(TQString cmdStr);
protected:
bool myMUTEX;
QList<KBiffMonitor> monitorList;
QList<KBiffNotify> notifyList;
TQList<KBiffMonitor> monitorList;
TQList<KBiffNotify> notifyList;
KBiffStatusList statusList;
QStringList proxyList;
TQStringList proxyList;
// Capability
QTimer *statusTimer;
TQTimer *statusTimer;
// General settings
QString profile;
QString mailClient;
TQString profile;
TQString mailClient;
// New mail
bool systemBeep;
bool runCommand;
QString runCommandPath;
TQString runCommandPath;
bool runResetCommand;
QString runResetCommandPath;
TQString runResetCommandPath;
bool playSound;
QString playSoundPath;
TQString playSoundPath;
bool notify;
bool dostatus;
@ -125,11 +125,11 @@ protected:
bool isSecure;
QString noMailIcon;
QString newMailIcon;
QString oldMailIcon;
QString noConnIcon;
QString stoppedIcon;
TQString noMailIcon;
TQString newMailIcon;
TQString oldMailIcon;
TQString noConnIcon;
TQString stoppedIcon;
KBiffStatus *status;
bool statusChanged;

@ -43,7 +43,7 @@ public:
static char Base64EncMap[64];
static char Base64DecMap[128];
static void base64Encode( const QByteArray& in, QByteArray& out)
static void base64Encode( const TQByteArray& in, TQByteArray& out)
{
bool insertLFs(false);
@ -109,7 +109,7 @@ static void base64Encode( const QByteArray& in, QByteArray& out)
}
}
static void base64Decode( const QByteArray& in, QByteArray& out )
static void base64Decode( const TQByteArray& in, TQByteArray& out )
{
out.resize(0);
if ( in.isEmpty() )
@ -217,27 +217,27 @@ char CodecPrivate::Base64DecMap[128] = {
};
/***************************************************************************/
QString KBiffCodecs::base64Encode( const QString& str )
TQString KBiffCodecs::base64Encode( const TQString& str )
{
if ( str.isEmpty() )
return QString::fromLatin1("");
QByteArray in, out;
return TQString::fromLatin1("");
TQByteArray in, out;
const unsigned int len = str.length();
in.resize( len );
memcpy( in.data(), str.latin1(), len );
CodecPrivate::base64Encode( in, out );
return QString( out );
return TQString( out );
}
QString KBiffCodecs::base64Decode( const QString& str )
TQString KBiffCodecs::base64Decode( const TQString& str )
{
if ( str.isEmpty() )
return QString::fromLatin1("");
return TQString::fromLatin1("");
QByteArray in, out;
TQByteArray in, out;
const unsigned int len = str.length();
in.resize( str.length() );
memcpy( in.data(), str.latin1(), len );
CodecPrivate::base64Decode( in, out );
return QString( out );
return TQString( out );
}

@ -36,7 +36,7 @@
#ifndef _KBIFFCODEC_H
#define _KBIFFCODEC_H
#include <qstring.h>
#include <ntqstring.h>
class KBiffCodecs
{
@ -48,7 +48,7 @@ public:
* @param str the string to be encoded.
* @return the decoded string.
*/
static QString base64Encode( const QString& str );
static TQString base64Encode( const TQString& str );
/**
* Decodes the given data that was encoded using the
@ -57,7 +57,7 @@ public:
* @param in the base64-encoded data to be decoded.
* @return the decoded data.
*/
static QString base64Decode( const QString& in );
static TQString base64Decode( const TQString& in );
private:
KBiffCodecs();

@ -10,28 +10,28 @@
#include "kbiffcrypt.h"
#include <kmdcodec.h>
#include <qcstring.h>
#include <ntqcstring.h>
QString KBiffCrypt::hmac_md5(const QString& text, const QString& k)
TQString KBiffCrypt::hmac_md5(const TQString& text, const TQString& k)
{
// If the original key is too long, the new key will be a hash of
// the original key. Then the new key might have NULL bytes in it,
// so we can't use QCString
QByteArray key = (QByteArray)k.utf8();
// so we can't use TQCString
TQByteArray key = (TQByteArray)k.utf8();
KMD5 context; // for calculating MD5 sums
KMD5::Digest digest; // intermediate storage for MD5 sums
// inner and outer padding (key XORd with ipad and opad, respectively)
QByteArray k_ipad(64);
QByteArray k_opad(64);
TQByteArray k_ipad(64);
TQByteArray k_opad(64);
// if key is longer than 64 bytes reset it to key=MD5(key)
if (key.size() > 64) {
// cast to a QCString because we don't want to hash the
// cast to a TQCString because we don't want to hash the
// trailing NULL byte
KMD5 tctx((QCString)key);
KMD5 tctx((TQCString)key);
key.duplicate((char*)tctx.rawDigest(), 16);
}

@ -8,13 +8,13 @@
#ifndef KBIFFCRYPT_H
#define KBIFFCRYPT_H
#include <qstring.h>
#include <ntqstring.h>
/**
* @brief Useful cryptographic functions for secure authentication
*
* Until QCA
* (<a href='http://delta.affinix.com/qca/'>Qt Cryptographic Architecture</a>)
* Until TQCA
* (<a href='http://delta.affinix.com/qca/'>TQt Cryptographic Architecture</a>)
* becomes more widely available,
* this will be the place for our custom-written, cryptography functions.
* These are mostly needed to implement various forms of secure authentication
@ -43,7 +43,7 @@ namespace KBiffCrypt
* @param key the key used when calculating the HMAC
* @return the HMAC-MD5 value as a string of lower-case, hexadecimal digits
*/
QString hmac_md5(const QString& text, const QString& key);
TQString hmac_md5(const TQString& text, const TQString& key);
}
#endif // KBIFFCRYPT_H

@ -35,11 +35,11 @@
#include <kbiffurl.h>
#include <kdebug.h>
#include <qapplication.h>
#include <qstring.h>
#include <qregexp.h>
#include <qdir.h>
#include <qdatetime.h>
#include <ntqapplication.h>
#include <ntqstring.h>
#include <ntqregexp.h>
#include <ntqdir.h>
#include <ntqdatetime.h>
#include <ksimpleconfig.h>
// Needed for CRAM-MD5 and APOP
@ -54,11 +54,11 @@
extern int h_errno;
#endif
static bool real_from(const QString& buffer);
static bool real_from(const TQString& buffer);
static const char* compare_header(const char* header, const char* field);
KBiffMonitor::KBiffMonitor()
: QObject(),
: TQObject(),
poll(60),
oldTimer(0),
started(false),
@ -114,25 +114,25 @@ void KBiffMonitor::readConfig()
KSimpleConfig *config = new KSimpleConfig(MAIL_STATE_FILE);
config->setDollarExpansion(false);
QString group;
TQString group;
group = mailbox + "(" + key + ")";
config->setGroup(group);
QStrList list;
TQStrList list;
mailState = (KBiffMailState)config->readNumEntry("mailState", UnknownState);
lastSize = config->readNumEntry("lastSize");
config->readListEntry("lastRead", list);
if (list.count()==6)
{
lastRead.setDate(QDate(atoi(list.at(0)),atoi(list.at(1)),atoi(list.at(2))));
lastRead.setTime(QTime(atoi(list.at(3)),atoi(list.at(4)),atoi(list.at(5))));
lastRead.setDate(TQDate(atoi(list.at(0)),atoi(list.at(1)),atoi(list.at(2))));
lastRead.setTime(TQTime(atoi(list.at(3)),atoi(list.at(4)),atoi(list.at(5))));
}
config->readListEntry("lastModified", list);
if (list.count()==6)
{
lastModified.setDate(QDate(atoi(list.at(0)),atoi(list.at(1)),atoi(list.at(2))));
lastModified.setTime(QTime(atoi(list.at(3)),atoi(list.at(4)),atoi(list.at(5))));
lastModified.setDate(TQDate(atoi(list.at(0)),atoi(list.at(1)),atoi(list.at(2))));
lastModified.setTime(TQTime(atoi(list.at(3)),atoi(list.at(4)),atoi(list.at(5))));
}
config->readListEntry("uidlList", list);
@ -140,7 +140,7 @@ void KBiffMonitor::readConfig()
uidlList.clear();
for (UIDL = list.first(); UIDL != 0; UIDL = list.next())
{
uidlList.append( new QString(UIDL) );
uidlList.append( new TQString(UIDL) );
}
newCount = config->readNumEntry("newCount", 0);
@ -155,12 +155,12 @@ void KBiffMonitor::saveConfig()
KSimpleConfig *config = new KSimpleConfig(MAIL_STATE_FILE);
config->setDollarExpansion(false);
QString group;
TQString group;
group = mailbox + "(" + key + ")";
config->setGroup(group);
QStringList uidlist;
QString *UIDL;
TQStringList uidlist;
TQString *UIDL;
for (UIDL = uidlList.first(); UIDL != 0; UIDL = uidlList.next())
{
uidlist.append(*UIDL);
@ -224,7 +224,7 @@ void KBiffMonitor::setPollInterval(const int interval)
}
}
void KBiffMonitor::setMailbox(const QString& url)
void KBiffMonitor::setMailbox(const TQString& url)
{
KBiffURL kurl(url);
setMailbox(kurl);
@ -420,7 +420,7 @@ void KBiffMonitor::setMailbox(KBiffURL& url)
void KBiffMonitor::setMailboxIsRead()
{
lastRead = QDateTime::currentDateTime();
lastRead = TQDateTime::currentDateTime();
if (mailState == NewMail)
{
if (b_new_lastSize) lastSize = new_lastSize;
@ -444,17 +444,17 @@ void KBiffMonitor::checkMailNow()
emit(signal_checkMail());
}
void KBiffMonitor::setPassword(const QString& pass)
void KBiffMonitor::setPassword(const TQString& pass)
{
password = pass;
}
void KBiffMonitor::setMailboxKey(const QString& k)
void KBiffMonitor::setMailboxKey(const TQString& k)
{
key = k;
}
void KBiffMonitor::timerEvent(QTimerEvent *)
void KBiffMonitor::timerEvent(TQTimerEvent *)
{
emit(signal_checkMail());
}
@ -462,7 +462,7 @@ void KBiffMonitor::timerEvent(QTimerEvent *)
void KBiffMonitor::checkLocal()
{
// get the information about this local mailbox
QFileInfo mbox(mailbox);
TQFileInfo mbox(mailbox);
// run external fetch client
if (!fetchCommand.isEmpty())
@ -477,7 +477,7 @@ void KBiffMonitor::checkLocal()
void KBiffMonitor::checkMbox()
{
// get the information about this local mailbox
QFileInfo mbox(mailbox);
TQFileInfo mbox(mailbox);
// run external fetch client
if (!fetchCommand.isEmpty())
@ -501,7 +501,7 @@ void KBiffMonitor::checkMbox()
utimbuf buf;
buf.actime = mbox.lastRead().toTime_t();
buf.modtime = mbox.lastModified().toTime_t();
utime(QFile::encodeName(mailbox), &buf);
utime(TQFile::encodeName(mailbox), &buf);
}
// if there are any new messages, consider the state New
@ -537,7 +537,7 @@ void KBiffMonitor::checkPop()
{
firstRun = false;
QString command;
TQString command;
// connect to the server unless it is active already
if (pop->active() == false)
@ -598,7 +598,7 @@ void KBiffMonitor::checkImap()
{
firstRun = false;
QString command;
TQString command;
int seq = 1000;
bool do_login = false;
@ -622,7 +622,7 @@ void KBiffMonitor::checkImap()
do_login = true;
// check the server's capabilities (see RFC 3050, 6.1.1)
command = QString().setNum(seq) + " CAPABILITY\r\n";
command = TQString().setNum(seq) + " CAPABILITY\r\n";
if (imap->command(command, seq) == false)
{
invalidLogin();
@ -646,7 +646,7 @@ void KBiffMonitor::checkImap()
imap->resetNumbers();
// The STATUS COMMAND is documented in RFC2060, 6.3.10
command = QString().setNum(seq) + " STATUS " + mailbox + " (UNSEEN MESSAGES)\r\n";
command = TQString().setNum(seq) + " STATUS " + mailbox + " (UNSEEN MESSAGES)\r\n";
if ( ! imap->command(command, seq)) {
return;
}
@ -655,7 +655,7 @@ void KBiffMonitor::checkImap()
// lets not logout if we want to keep the session alive
if (keepalive == false)
{
command = QString().setNum(seq) + " LOGOUT\r\n";
command = TQString().setNum(seq) + " LOGOUT\r\n";
if (imap->command(command, seq) == false)
return;
imap->close();
@ -683,7 +683,7 @@ void KBiffMonitor::checkMaildir()
firstRun = false;
// get the information about this local mailbox
QDir mbox(mailbox);
TQDir mbox(mailbox);
// run external fetch client
if (!fetchCommand.isEmpty())
@ -693,15 +693,15 @@ void KBiffMonitor::checkMaildir()
if (mbox.exists())
{
// maildir stores its mail in MAILDIR/new and MAILDIR/cur
QDir new_mailbox(mailbox + "/new");
QDir cur_mailbox(mailbox + "/cur");
TQDir new_mailbox(mailbox + "/new");
TQDir cur_mailbox(mailbox + "/cur");
// make sure both exist
if (new_mailbox.exists() && cur_mailbox.exists())
{
// check only files
new_mailbox.setFilter(QDir::Files);
cur_mailbox.setFilter(QDir::Files);
new_mailbox.setFilter(TQDir::Files);
cur_mailbox.setFilter(TQDir::Files);
// determining "new" (or "unread") mail in maildir folders
// is a *little* tricky. all mail in the 'new' folder are
@ -710,11 +710,11 @@ void KBiffMonitor::checkMaildir()
newCount = new_mailbox.count();
curCount = cur_mailbox.count();
const QFileInfoList *cur_list = cur_mailbox.entryInfoList();
QFileInfoListIterator it(*cur_list);
QFileInfo *info;
const TQFileInfoList *cur_list = cur_mailbox.entryInfoList();
TQFileInfoListIterator it(*cur_list);
TQFileInfo *info;
static QRegExp suffix(":2,?F?R?S?T?$");
static TQRegExp suffix(":2,?F?R?S?T?$");
while ((info = it.current()))
{
if (info->fileName().findRev(suffix) == -1)
@ -746,7 +746,7 @@ void KBiffMonitor::checkNntp()
{
firstRun = false;
QString command;
TQString command;
bool do_login = false;
// connect to the server
@ -792,9 +792,9 @@ void KBiffMonitor::checkNntp()
}
// now, we process the .newsrc file
QString home(getenv("HOME"));
QString newsrc_path(home + "/.newsrc");
QFile newsrc(newsrc_path);
TQString home(getenv("HOME"));
TQString newsrc_path(home + "/.newsrc");
TQFile newsrc(newsrc_path);
if (newsrc.open(IO_ReadOnly) == false)
{
return;
@ -804,7 +804,7 @@ void KBiffMonitor::checkNntp()
while(newsrc.readLine(c_buffer, MAXSTR) > 0)
{
// search for our mailbox name
QString str_buffer(c_buffer);
TQString str_buffer(c_buffer);
if (str_buffer.left(mailbox.length()) != mailbox)
continue;
@ -886,7 +886,7 @@ void KBiffMonitor::checkMHdir()
firstRun = false;
// get the information about this local mailbox
QDir mbox(mailbox);
TQDir mbox(mailbox);
char the_buffer[MAXSTR];
char *buffer = the_buffer;
@ -898,7 +898,7 @@ void KBiffMonitor::checkMHdir()
// make sure the mailbox exists
if (mbox.exists())
{
QFile mhseq(mailbox+"/.mh_sequences");
TQFile mhseq(mailbox+"/.mh_sequences");
if (mhseq.open(IO_ReadOnly) == true)
{
// Check the .mh_sequences file for 'unseen:'
@ -980,9 +980,9 @@ void KBiffMonitor::checkMHdir()
// OK. No new messages listed in .mh_sequences. Check if
// there are any old ones.
//mbox.setFilter(QDir::Files);
QStringList mails = mbox.entryList(QDir::Files);
QStringList::Iterator str;
//mbox.setFilter(TQDir::Files);
TQStringList mails = mbox.entryList(TQDir::Files);
TQStringList::Iterator str;
for (str = mails.begin(); str != mails.end(); str++)
{
@ -1079,7 +1079,7 @@ void KBiffMonitor::determineState(unsigned int size)
void KBiffMonitor::determineState(KBiffUidlList uidl_list)
{
QString *UIDL;
TQString *UIDL;
unsigned int messages = 0;
// if the uidl_list is empty then the number of messages = 0
@ -1186,7 +1186,7 @@ void KBiffMonitor::determineState(KBiffMailState state)
emit(signal_currentStatus(newCount, key, mailState));
}
void KBiffMonitor::determineState(unsigned int size, const QDateTime& last_read, const QDateTime& last_modified)
void KBiffMonitor::determineState(unsigned int size, const TQDateTime& last_read, const TQDateTime& last_modified)
{
// Check for NoMail
if (size == 0)
@ -1253,7 +1253,7 @@ void KBiffMonitor::determineState(unsigned int size, const QDateTime& last_read,
*/
int KBiffMonitor::mboxMessages()
{
QFile mbox(mailbox);
TQFile mbox(mailbox);
char buffer[MAXSTR];
int count = 0;
int msg_count = 0;
@ -1357,7 +1357,7 @@ int KBiffMonitor::mboxMessages()
if(++msg_count >= 100 )
{
qApp->processEvents();
tqApp->processEvents();
msg_count = 0;
}
}//while
@ -1433,7 +1433,7 @@ void KBiffSocket::close()
FD_ZERO(&socketFDS);
}
bool KBiffSocket::connectSocket(const QString& host, unsigned short int port)
bool KBiffSocket::connectSocket(const TQString& host, unsigned short int port)
{
sockaddr_in sin;
hostent *hent;
@ -1546,7 +1546,7 @@ bool KBiffSocket::connectSocket(const QString& host, unsigned short int port)
#endif // USE_SSL
// we're connected! see if the connection is good
QString line(readLine());
TQString line(readLine());
if (line.isNull() || ((line.find("200") == -1 ) && (line.find("OK") == -1) && (line.find("PREAUTH") == -1)))
{
if (line.isNull())
@ -1637,7 +1637,7 @@ void KBiffSocket::setSSL(bool on)
}
#endif // USE_SSL
int KBiffSocket::writeLine(const QString& line)
int KBiffSocket::writeLine(const TQString& line)
{
int bytes = 0;
@ -1659,9 +1659,9 @@ int KBiffSocket::writeLine(const QString& line)
return bytes;
}
QString KBiffSocket::readLine()
TQString KBiffSocket::readLine()
{
QString fault, response;
TQString fault, response;
char buffer;
ssize_t bytes = -1;
@ -1719,10 +1719,10 @@ KBiffImap::~KBiffImap()
close();
}
bool KBiffImap::command(const QString& line, unsigned int seq)
bool KBiffImap::command(const TQString& line, unsigned int seq)
{
QString messagesListString;
QStringList messagesList;
TQString messagesListString;
TQStringList messagesList;
bool tried_cram_md5; // are we trying CRAM-MD5 ?
if (writeLine(line) <= 0)
@ -1731,19 +1731,19 @@ bool KBiffImap::command(const QString& line, unsigned int seq)
return false;
}
QString ok, bad, no, response;
TQString ok, bad, no, response;
ok.sprintf("%d OK", seq);
bad.sprintf("%d BAD", seq);
no.sprintf("%d NO", seq);
// must be case insensitive
QRegExp status("\\* STATUS", FALSE);
QRegExp capability("\\* CAPABILITY", FALSE);
QRegExp cram_md5("AUTHENTICATE CRAM-MD5", FALSE);
TQRegExp status("\\* STATUS", FALSE);
TQRegExp capability("\\* CAPABILITY", FALSE);
TQRegExp cram_md5("AUTHENTICATE CRAM-MD5", FALSE);
// are we trying CRAM-MD5 ?
tried_cram_md5 = cram_md5.search(line)>=0;
cram_md5 = QRegExp("\\+ ([A-Za-z0-9+/=]+)");
cram_md5 = TQRegExp("\\+ ([A-Za-z0-9+/=]+)");
while (!(response = readLine()).isNull())
{
@ -1766,15 +1766,15 @@ bool KBiffImap::command(const QString& line, unsigned int seq)
* S: . OK STATUS Completed
*/
if (status.search(response) >= 0) {
QRegExp unseen("UNSEEN ([0-9]*)", FALSE);
TQRegExp unseen("UNSEEN ([0-9]*)", FALSE);
if (unseen.search(response) >= 0) {
QString num = unseen.cap(1);
TQString num = unseen.cap(1);
newMessages = num.toInt();
}
QRegExp number("MESSAGES ([0-9]*)", FALSE);
TQRegExp number("MESSAGES ([0-9]*)", FALSE);
if (number.search(response) >= 0) {
QString num = number.cap(1);
TQString num = number.cap(1);
messages = num.toInt();
}
}
@ -1787,7 +1787,7 @@ bool KBiffImap::command(const QString& line, unsigned int seq)
* S: . OK CAPABILITY completed.
*/
if (capability.search(response) >= 0) {
QRegExp cram_md5_cap("AUTH=CRAM-MD5", FALSE);
TQRegExp cram_md5_cap("AUTH=CRAM-MD5", FALSE);
if (cram_md5_cap.search(response) >= 0) {
auth_cram_md5 = true;
}
@ -1809,9 +1809,9 @@ bool KBiffImap::command(const QString& line, unsigned int seq)
return false;
}
QString KBiffImap::mungeUserPass(const QString& old_user)
TQString KBiffImap::mungeUserPass(const TQString& old_user)
{
QString new_user(old_user);
TQString new_user(old_user);
if (new_user.left(1) != "\"")
new_user.prepend("\"");
@ -1827,23 +1827,23 @@ void KBiffImap::resetNumbers()
newMessages = 0;
}
bool KBiffImap::authenticate(int *pseq, const QString& user, const QString& pass)
bool KBiffImap::authenticate(int *pseq, const TQString& user, const TQString& pass)
{
QString cmd, username, password;
TQString cmd, username, password;
// If CRAM-MD5 is available, use it. It's the best we know.
// RFC 2195 defines the CRAM-MD5 authentication method
// also see RFC 3501 section 6.2.2 for the AUTHENTICATE command
if( auth_cram_md5 )
{
cmd = QString("%1 AUTHENTICATE CRAM-MD5\r\n").arg(*pseq);
cmd = TQString("%1 AUTHENTICATE CRAM-MD5\r\n").arg(*pseq);
if (command(cmd, *pseq) == false)
{
return false;
}
// calculate the real response to the challenge
QString response = user + " " + KBiffCrypt::hmac_md5(chall_cram_md5, pass);
TQString response = user + " " + KBiffCrypt::hmac_md5(chall_cram_md5, pass);
response = KCodecs::base64Encode(response.latin1());
// send the response
@ -1863,7 +1863,7 @@ bool KBiffImap::authenticate(int *pseq, const QString& user, const QString& pass
// to _always_ munge the user and the password.
password = mungeUserPass(pass);
cmd = QString().setNum(*pseq) + " LOGIN "
cmd = TQString().setNum(*pseq) + " LOGIN "
+ username + " "
+ password + "\r\n";
if (command(cmd, *pseq) == false)
@ -1899,12 +1899,12 @@ void KBiffPop::setApop( bool enabled )
use_apop = enabled;
}
bool KBiffPop::command(const QString& line)
bool KBiffPop::command(const TQString& line)
{
if (writeLine(line) <= 0)
return false;
QString response;
TQString response;
response = readLine();
// check if the response was bad. if so, return now
@ -1925,7 +1925,7 @@ bool KBiffPop::command(const QString& line)
!response.isNull() && response.left(1) != ".";
response = readLine())
{
uidlList.append(new QString(response.right(response.length() -
uidlList.append(new TQString(response.right(response.length() -
response.find(" ") - 1)));
}
}
@ -1948,7 +1948,7 @@ bool KBiffPop::command(const QString& line)
// find out what the server is capable of
if (line == "CAPA\r\n")
{
QRegExp rx("\\bCRAM-MD5\\b");
TQRegExp rx("\\bCRAM-MD5\\b");
auth_cram_md5 = false; // assume no support
@ -1964,7 +1964,7 @@ bool KBiffPop::command(const QString& line)
// look for the CRAM-MD5 challenge
if (line == "AUTH CRAM-MD5\r\n")
{
QRegExp challenge("\\+ ([A-Za-z0-9+/=]+)");
TQRegExp challenge("\\+ ([A-Za-z0-9+/=]+)");
if (challenge.search(response) == -1 )
{
return false;
@ -1996,7 +1996,7 @@ bool KBiffPop::parseBanner(void)
}
// Look for the banner part that indicates APOP support
QRegExp rx("(<[a-zA-Z0-9_+.-]+@[a-zA-Z0-9_+.-]+>)");
TQRegExp rx("(<[a-zA-Z0-9_+.-]+@[a-zA-Z0-9_+.-]+>)");
if( rx.search(banner) == -1 || !use_apop ) {
auth_apop = false;
} else {
@ -2010,11 +2010,11 @@ bool KBiffPop::parseBanner(void)
/*!
This method authenticates using the most secure
technique available.
\fn KBiffPop::authenticate(const QString& user, const QString& pass)
\fn KBiffPop::authenticate(const TQString& user, const TQString& pass)
*/
bool KBiffPop::authenticate(const QString& user, const QString& pass)
bool KBiffPop::authenticate(const TQString& user, const TQString& pass)
{
QString popcommand;
TQString popcommand;
// CRAM-MD5 authentication is the most secure we can handle
// the use of the AUTH command is documented in RFC 1734
@ -2026,7 +2026,7 @@ bool KBiffPop::authenticate(const QString& user, const QString& pass)
}
// calculate the real response to the challenge
QString response = user + " " + KBiffCrypt::hmac_md5(chall_cram_md5, pass);
TQString response = user + " " + KBiffCrypt::hmac_md5(chall_cram_md5, pass);
response = KCodecs::base64Encode(response.latin1());
// send the response
@ -2042,14 +2042,14 @@ bool KBiffPop::authenticate(const QString& user, const QString& pass)
// than sending the password in the clear
if( auth_apop )
{
QCString digest;
TQCString digest;
KMD5 md5(chall_apop);
md5.update(pass);
digest = md5.hexDigest();
popcommand = QString("APOP %1 %2\r\n").arg(user, digest.data());
popcommand = TQString("APOP %1 %2\r\n").arg(user, digest.data());
if (this->command(popcommand) == false)
{
return false;
@ -2082,14 +2082,14 @@ KBiffNntp::~KBiffNntp()
close();
}
bool KBiffNntp::command(const QString& line)
bool KBiffNntp::command(const TQString& line)
{
int bogus;
if (writeLine(line) <= 0)
return false;
QString response;
TQString response;
while (!(response = readLine()).isNull())
{
// return if the response is bad
@ -2100,7 +2100,7 @@ bool KBiffNntp::command(const QString& line)
}
// find return codes for tcp, user, pass
QString code(response.left(3));
TQString code(response.left(3));
if ((code == "200") || (code == "281") || (code == "381"))
return true;
@ -2148,7 +2148,7 @@ static const char *day_name[8] = {
"sun", "mon", "tue", "wed", "thu", "fri", "sat", 0
};
static bool real_from(const QString& orig_buffer)
static bool real_from(const TQString& orig_buffer)
{
/*
A valid from line will be in the following format:
@ -2181,7 +2181,7 @@ static bool real_from(const QString& orig_buffer)
/* <weekday> */
found = 0;
for (i = 0; day_name[i] != NULL; i++)
found = found || (qstrnicmp(day_name[i], buffer, 3) == 0);
found = found || (tqstrnicmp(day_name[i], buffer, 3) == 0);
if (!found)
return false;
@ -2191,7 +2191,7 @@ static bool real_from(const QString& orig_buffer)
/* <month> */
found = 0;
for (i = 0; month_name[i] != NULL; i++)
found = found || (qstrnicmp(month_name[i], buffer, 3) == 0);
found = found || (tqstrnicmp(month_name[i], buffer, 3) == 0);
if (!found)
return false;
@ -2208,7 +2208,7 @@ static const char* compare_header(const char* header, const char* field)
{
int len = strlen(field);
if (qstrnicmp(header, field, len))
if (tqstrnicmp(header, field, len))
return NULL;
header += len;

@ -17,29 +17,29 @@
#include <sys/time.h>
#include <qobject.h>
#include <qlist.h>
#include <qfileinfo.h>
#include <ntqobject.h>
#include <ntqlist.h>
#include <ntqfileinfo.h>
#ifdef USE_SSL
#include <kssl.h>
#endif
class KBiffURL;
class QString;
class TQString;
/**
* @internal
* Internal class to store UIDL list
*/
class KBiffUidlList : public QList<QString>
class KBiffUidlList : public TQList<TQString>
{
protected:
int compareItems(Item s1, Item s2)
{
QString *str1, *str2;
str1 = (QString *)s1;
str2 = (QString *)s2;
TQString *str1, *str2;
str1 = (TQString *)s1;
str2 = (TQString *)s2;
if((*str1) == (*str2))
return 0;
else
@ -59,7 +59,7 @@ public:
KBiffSocket();
virtual ~KBiffSocket();
bool connectSocket(const QString& host, unsigned short int port);
bool connectSocket(const TQString& host, unsigned short int port);
bool active();
bool isAsync();
@ -76,8 +76,8 @@ public:
void close();
protected:
QString readLine();
int writeLine(const QString& line);
TQString readLine();
int writeLine(const TQString& line);
bool async;
@ -87,7 +87,7 @@ protected:
fd_set socketFDS;
int messages;
int newMessages;
QString banner; // the first line read from a new connection
TQString banner; // the first line read from a new connection
#ifdef USE_SSL
bool usessl;
@ -104,8 +104,8 @@ public:
KBiffImap();
virtual ~KBiffImap();
bool command(const QString& line, unsigned int seq);
QString mungeUserPass(const QString& old_user);
bool command(const TQString& line, unsigned int seq);
TQString mungeUserPass(const TQString& old_user);
void resetNumbers();
/**
* @internal
@ -123,7 +123,7 @@ public:
* @param user the user name required for authentication
* @param pass the password required for authentication
*/
bool authenticate(int *pseq, const QString& user, const QString& pass);
bool authenticate(int *pseq, const TQString& user, const TQString& pass);
protected:
/**
@ -138,7 +138,7 @@ protected:
*
* @brief the CRAM-MD5 challenge (base64 decoded) as issued by the server
*/
QString chall_cram_md5;
TQString chall_cram_md5;
};
/**
@ -150,7 +150,7 @@ public:
KBiffPop();
virtual ~KBiffPop();
bool command(const QString& line);
bool command(const TQString& line);
KBiffUidlList getUidlList() const;
void close();
@ -172,7 +172,7 @@ public:
* @param user the user name required for authentication
* @param pass the password required for authentication
*/
bool authenticate(const QString& user, const QString& pass);
bool authenticate(const TQString& user, const TQString& pass);
protected:
KBiffUidlList uidlList;
@ -185,7 +185,7 @@ protected:
* @internal
* @brief the APOP challenge from the server
*/
QCString chall_apop;
TQCString chall_apop;
/**
* @internal
* @brief does the server support CRAM-MD5 authentication ?
@ -195,7 +195,7 @@ protected:
* @internal
* @brief the CRAM-MD5 challenge (base64 decoded)
*/
QString chall_cram_md5; // the CRAM-MD5 challenge (base64 decoded)
TQString chall_cram_md5; // the CRAM-MD5 challenge (base64 decoded)
/**
* @internal
* @brief does the user want APOP authentication
@ -211,7 +211,7 @@ class KBiffNntp : public KBiffSocket
public:
virtual ~KBiffNntp();
bool command(const QString& line);
bool command(const TQString& line);
int first() const;
int last() const;
protected:
@ -262,7 +262,7 @@ typedef enum
* @author Kurt Granroth <granroth@kde.org>
* @version $Id$
*/
class KBiffMonitor : public QObject
class KBiffMonitor : public TQObject
{
Q_OBJECT
@ -287,17 +287,17 @@ public:
/**
* Returns the simpleURL of current mailbox being monitored
*/
const QString getMailbox() const { return simpleURL; }
const TQString getMailbox() const { return simpleURL; }
/**
* Sets or Returns the key of current mailbox being monitored
*/
const QString getMailboxKey() const { return key; }
const TQString getMailboxKey() const { return key; }
/**
* Returns the type of mailbox being monitored
*/
const QString getProtocol() const { return protocol; }
const TQString getProtocol() const { return protocol; }
/**
* Returns <CODE>true</CODE> is KBiffMonitor is currently monitoring
* a mailbox.
@ -361,13 +361,13 @@ public slots:
/**
* Overloaded for convenience
*/
void setMailbox(const QString& url);
void setMailboxKey(const QString& k);
void setMailbox(const TQString& url);
void setMailboxKey(const TQString& k);
/**
* Sets the password for the POP3 and IMAP4 protocols.
*/
void setPassword(const QString& password);
void setPassword(const TQString& password);
/**
* Set the interval between mailbox reads. This is in seconds.
@ -403,7 +403,7 @@ signals:
/**
* This will get <CODE>emit</CODE>ed when new mail arrives
*/
void signal_newMail(const int num_new, const QString& mailbox);
void signal_newMail(const int num_new, const TQString& mailbox);
/**
* This will get <CODE>emit</CODE>ed when no mail exists
@ -413,7 +413,7 @@ signals:
/**
* This will get <CODE>emit</CODE>ed when no mail exists
*/
void signal_noMail(const QString& mailbox);
void signal_noMail(const TQString& mailbox);
/**
* This will get <CODE>emit</CODE>ed when the mailbox is read
@ -423,7 +423,7 @@ signals:
/**
* This will get <CODE>emit</CODE>ed when the mailbox is read
*/
void signal_oldMail(const QString& mailbox);
void signal_oldMail(const TQString& mailbox);
/**
* This will get <CODE>emit</CODE>ed when no connection can be
@ -435,13 +435,13 @@ signals:
* This will get <CODE>emit</CODE>ed when no connection can
* be established
*/
void signal_noConn(const QString& mailbox);
void signal_noConn(const TQString& mailbox);
/**
* This will get <CODE>emit</CODE>ed everytime mail will be
* fetched externally
*/
void signal_fetchMail(const QString& fetchClient);
void signal_fetchMail(const TQString& fetchClient);
/**
* This will get <CODE>emit</CODE>ed everytime the mailbox
@ -454,16 +454,16 @@ signals:
* checked. It contains the current mailbox name, state, and number
* of new messages
*/
void signal_currentStatus(const int, const QString& , const KBiffMailState);
void signal_currentStatus(const int, const TQString& , const KBiffMailState);
/**
* This will get <CODE>emit</CODE>ed everytime there was an
* invalid login or incomplete connection to a remote server.
*/
void signal_invalidLogin(const QString& mailbox);
void signal_invalidLogin(const TQString& mailbox);
protected:
void timerEvent(QTimerEvent *);
void timerEvent(TQTimerEvent *);
protected slots:
void checkLocal();
@ -476,8 +476,8 @@ protected slots:
protected:
// protected (non-slot) functions
void determineState(unsigned int size, const QDateTime& last_read,
const QDateTime& last_modified);
void determineState(unsigned int size, const TQDateTime& last_read,
const TQDateTime& last_modified);
void determineState(unsigned int size);
void determineState(KBiffUidlList uidl_list);
@ -498,22 +498,22 @@ private:
bool firstRun;
// Mailbox stuff
QString key;
QString simpleURL;
QString protocol;
QString mailbox;
QString server;
QString user;
QString password;
QString fetchCommand;
TQString key;
TQString simpleURL;
TQString protocol;
TQString mailbox;
TQString server;
TQString user;
TQString password;
TQString fetchCommand;
unsigned short int port;
bool preauth;
bool keepalive;
// New state cache
unsigned int new_lastSize;
QDateTime new_lastRead;
QDateTime new_lastModified;
TQDateTime new_lastRead;
TQDateTime new_lastModified;
KBiffUidlList new_uidlList;
bool b_new_lastSize;
bool b_new_lastRead;
@ -522,8 +522,8 @@ private:
// State variables
KBiffMailState mailState;
unsigned int lastSize;
QDateTime lastRead;
QDateTime lastModified;
TQDateTime lastRead;
TQDateTime lastModified;
KBiffUidlList uidlList;
// Socket protocols

@ -14,7 +14,7 @@ KBiffURL::KBiffURL()
{
}
KBiffURL::KBiffURL(const QString& _url)
KBiffURL::KBiffURL(const TQString& _url)
: KURL(_url)
{
/**
@ -22,7 +22,7 @@ KBiffURL::KBiffURL(const QString& _url)
*/
if (protocol() == "nntp")
{
QString urlStr(_url);
TQString urlStr(_url);
urlStr.replace(0,4, "imap4");
*this = KBiffURL(urlStr);
setProtocol("nntp");
@ -38,7 +38,7 @@ KBiffURL::KBiffURL(const QString& _url)
* hsegment = *[ uchar | ";" | ":" | "@" | "&" | "=" ]
* search = *[ uchar | ";" | ":" | "@" | "&" | "=" ]
*/
QString KBiffURL::searchPar( const QString & _parName ) const
TQString KBiffURL::searchPar( const TQString & _parName ) const
{
const char *_searchPart, *_searchPos, *_parVal;
int n;
@ -48,14 +48,14 @@ QString KBiffURL::searchPar( const QString & _parName ) const
_parVal = NULL;
// Get the search part of the URL, i.e. the stuff after "?"
QString query_str(query());
TQString query_str(query());
if (!query_str.isNull())
query_str = query_str.remove(0,1);
_searchPart = query_str.ascii();
// Try to find the given parameter in the search part string
if ((n = findPos( _searchPart, _parName )) < 0)
return QString::null;
return TQString::null;
/*
* Now, we know that the parameter name is found
@ -63,7 +63,7 @@ QString KBiffURL::searchPar( const QString & _parName ) const
// If no value is assigned, an empty string is returned
if (_searchPart[n] != '=')
return QString::null;
return TQString::null;
// Set the beginning of the parameter value string
_parVal = &(_searchPart[n+1]);
@ -73,19 +73,19 @@ QString KBiffURL::searchPar( const QString & _parName ) const
// Return the assigned parameter value
if (_searchPos == NULL)
return QString( _parVal );
return TQString( _parVal );
else
return QString( _parVal ).left(_searchPos - _parVal);
return TQString( _parVal ).left(_searchPos - _parVal);
}
void KBiffURL::setSearchPar( const QString & _parName, const QString & _newParVal )
void KBiffURL::setSearchPar( const TQString & _parName, const TQString & _newParVal )
{
QString _newSearchPart;
TQString _newSearchPart;
const char *_searchPart, *_searchPos, *_parVal;
int index, len;
// Get the search part of the URL, i.e. the stuff after "?"
QString query_str(query());
TQString query_str(query());
if (!query_str.isNull())
query_str = query_str.remove(0,1);
@ -141,7 +141,7 @@ void KBiffURL::setSearchPar( const QString & _parName, const QString & _newParVa
setQuery( _newSearchPart );
}
int KBiffURL::findPos( const QString & _searchPart, const QString & _parName ) const
int KBiffURL::findPos( const TQString & _searchPart, const TQString & _parName ) const
{
const char *_searchPos;
int n = -1;
@ -169,7 +169,7 @@ int KBiffURL::findPos( const QString & _searchPart, const QString & _parName ) c
return -1;
}
QString KBiffURL::pass() const
TQString KBiffURL::pass() const
{
return KURL::decode_string(KURL::pass());
}

@ -25,24 +25,24 @@ public:
/**
* Construct a KBiffURL object from _url
*/
KBiffURL(const QString& _url);
KBiffURL(const TQString& _url);
/**
* Returns the parameter value found in the search part of the URL
*/
QString searchPar( const QString & _parName ) const;
TQString searchPar( const TQString & _parName ) const;
/**
* Sets a parameter value in the search part of the URL
*/
void setSearchPar( const QString & _parName, const QString & _newParVal );
void setSearchPar( const TQString & _parName, const TQString & _newParVal );
QString pass() const;
TQString pass() const;
private:
/**
* Returns the position of a parameter within the search part
*/
int findPos( const QString & _searchPart, const QString & _parName ) const;
int findPos( const TQString & _searchPart, const TQString & _parName ) const;
};
#endif // KBIFFURL_H

@ -32,7 +32,7 @@ extern "C" KDE_EXPORT int kdemain(int argc, char *argv[])
KBiffSetup* setup = 0;
bool is_secure = false;
bool have_profile = false;
QString profile;
TQString profile;
app.setMainWidget(&kbiff);
@ -75,7 +75,7 @@ extern "C" KDE_EXPORT int kdemain(int argc, char *argv[])
// check if we are docked (only if restored)
if (kbiff.isDocked())
{
kapp->setTopWidget(new QWidget);
kapp->setTopWidget(new TQWidget);
KWin::setSystemTrayWindowFor(kbiff.winId(), 0);
}
else

@ -8,10 +8,10 @@
#include "notify.h"
#include "notify.moc"
#include <qlayout.h>
#include <qlabel.h>
#include <qpixmap.h>
#include <qpushbutton.h>
#include <ntqlayout.h>
#include <ntqlabel.h>
#include <ntqpixmap.h>
#include <ntqpushbutton.h>
#include <kapp.h>
#include <kglobal.h>
@ -20,33 +20,33 @@
#include <kprocess.h>
#include <kwin.h>
KBiffNotify::KBiffNotify(QWidget *parent_, const int num_new,
const QString& mailbx)
: QDialog(parent_, 0, false, 0)
KBiffNotify::KBiffNotify(TQWidget *parent_, const int num_new,
const TQString& mailbx)
: TQDialog(parent_, 0, false, 0)
{
KWin::setIcons(winId(), kapp->icon(), kapp->miniIcon());
setCaption(i18n("You have new mail!"));
QLabel *pixmap = new QLabel(this);
TQLabel *pixmap = new TQLabel(this);
pixmap->setPixmap(kapp->icon());
pixmap->setFixedSize(pixmap->sizeHint());
QLabel *congrats = new QLabel(i18n("You have new mail!"), this);
QFont the_font(congrats->font());
TQLabel *congrats = new TQLabel(i18n("You have new mail!"), this);
TQFont the_font(congrats->font());
the_font.setBold(true);
congrats->setFont(the_font);
QString msg;
TQString msg;
msg = i18n("New Messages: %1").arg(num_new);
msgLabel = new QLabel(msg, this);
msgLabel = new TQLabel(msg, this);
msg = i18n("Mailbox: %1").arg(mailbx);
QLabel *which_one = new QLabel(msg, this);
TQLabel *which_one = new TQLabel(msg, this);
QPushButton *ok = new QPushButton(i18n("OK"), this);
TQPushButton *ok = new TQPushButton(i18n("OK"), this);
ok->setDefault(true);
QPushButton *launch = new QPushButton(i18n("Mailer"), this);
TQPushButton *launch = new TQPushButton(i18n("Mailer"), this);
// connect the signals to slots
connect(ok, SIGNAL(clicked()), SLOT(accept()));
@ -54,22 +54,22 @@ KBiffNotify::KBiffNotify(QWidget *parent_, const int num_new,
connect(launch, SIGNAL(clicked()), this, SLOT(accept()));
// Now do the layout
QVBoxLayout *info_layout = new QVBoxLayout(12);
TQVBoxLayout *info_layout = new TQVBoxLayout(12);
info_layout->addWidget(congrats);
info_layout->addWidget(msgLabel);
info_layout->addWidget(which_one);
QHBoxLayout *upper_layout = new QHBoxLayout;
TQHBoxLayout *upper_layout = new TQHBoxLayout;
upper_layout->addWidget(pixmap);
upper_layout->addLayout(info_layout, 1);
QHBoxLayout *button_layout = new QHBoxLayout;
TQHBoxLayout *button_layout = new TQHBoxLayout;
button_layout->addStretch(1);
button_layout->addWidget(launch);
button_layout->addWidget(ok);
button_layout->addStretch(1);
QVBoxLayout *top_layout = new QVBoxLayout(this, 12);
TQVBoxLayout *top_layout = new TQVBoxLayout(this, 12);
top_layout->addLayout(upper_layout);
top_layout->addLayout(button_layout);
@ -83,7 +83,7 @@ KBiffNotify::~KBiffNotify()
void KBiffNotify::setNew(const int num_new)
{
QString msg;
TQString msg;
msg = i18n("New Messages: %1").arg(num_new);
msgLabel->setText(msg);
messages = num_new;

@ -14,19 +14,19 @@
#include <config.h>
#endif
#include <qdialog.h>
#include <qstring.h>
#include <ntqdialog.h>
#include <ntqstring.h>
class QLabel;
class TQLabel;
class KBiffNotify : public QDialog
class KBiffNotify : public TQDialog
{
Q_OBJECT
public:
KBiffNotify(QWidget *parent, const int num_new, const QString& mailbx);
KBiffNotify(TQWidget *parent, const int num_new, const TQString& mailbx);
virtual ~KBiffNotify();
const QString getMailbox() { return mailbox; }
const TQString getMailbox() { return mailbox; }
int newMessages() { return messages; }
void setNew(const int num_new);
@ -38,8 +38,8 @@ protected slots:
void slotLaunchMailClient();
protected:
QString mailbox;
QLabel* msgLabel;
TQString mailbox;
TQLabel* msgLabel;
int messages;
};

File diff suppressed because it is too large Load Diff

@ -16,17 +16,17 @@
#include <kbiffurl.h>
#include <qlistview.h>
#include <ntqlistview.h>
#include <qwidget.h>
#include <ntqwidget.h>
#include <kdialog.h>
#include <qdict.h>
#include <qlineedit.h>
#include <ntqdict.h>
#include <ntqlineedit.h>
class QLineEdit;
class QCheckBox;
class QPushButton;
class QComboBox;
class TQLineEdit;
class TQCheckBox;
class TQPushButton;
class TQComboBox;
#include <kicondialog.h>
@ -34,7 +34,7 @@ struct KBiffMailbox
{
KBiffURL url;
bool store;
QString key;
TQString key;
};
class KBiffGeneralTab;
@ -47,22 +47,22 @@ class KBiffSetup : public KDialog
{
Q_OBJECT
public:
KBiffSetup(const QString& name = QString::null, bool secure = false);
KBiffSetup(const TQString& name = TQString::null, bool secure = false);
virtual ~KBiffSetup();
const QString getProfile() const;
const TQString getProfile() const;
const KBiffURL getCurrentMailbox() const;
const QList<KBiffMailbox> getMailboxList() const;
const QString getMailClient() const;
const QString getRunCommandPath() const;
const QString getRunResetCommandPath() const;
const QString getPlaySoundPath() const;
const QString getNoMailIcon() const;
const QString getNewMailIcon() const;
const QString getOldMailIcon() const;
const QString getNoConnIcon() const;
const QString getStoppedIcon() const;
const TQList<KBiffMailbox> getMailboxList() const;
const TQString getMailClient() const;
const TQString getRunCommandPath() const;
const TQString getRunResetCommandPath() const;
const TQString getPlaySoundPath() const;
const TQString getNoMailIcon() const;
const TQString getNewMailIcon() const;
const TQString getOldMailIcon() const;
const TQString getNoConnIcon() const;
const TQString getStoppedIcon() const;
bool getSystemBeep() const;
bool getRunCommand() const;
bool getRunResetCommand() const;
@ -78,11 +78,11 @@ public:
public slots:
void invokeHelp();
void readConfig(const QString& profile);
void readConfig(const TQString& profile);
void saveConfig();
protected:
QString getSomeProfile() const;
TQString getSomeProfile() const;
protected slots:
void slotDone();
@ -94,7 +94,7 @@ private:
bool isSecure;
// "outer" dialog
QComboBox *comboProfile;
TQComboBox *comboProfile;
// tabs
KBiffGeneralTab *generalTab;
@ -103,34 +103,34 @@ private:
KBiffAboutTab *aboutTab;
};
class KBiffGeneralTab : public QWidget
class KBiffGeneralTab : public TQWidget
{
Q_OBJECT
public:
KBiffGeneralTab(const QString& profile = QString::null, QWidget *parent=0);
KBiffGeneralTab(const TQString& profile = TQString::null, TQWidget *parent=0);
virtual ~KBiffGeneralTab();
const QString getButtonNewMail() const;
const QString getButtonOldMail() const;
const QString getButtonNoMail() const;
const QString getButtonNoConn() const;
const QString getButtonStopped() const;
const QString getMailClient() const;
const TQString getButtonNewMail() const;
const TQString getButtonOldMail() const;
const TQString getButtonNoMail() const;
const TQString getButtonNoConn() const;
const TQString getButtonStopped() const;
const TQString getMailClient() const;
int getPoll() const;
bool getDock() const;
bool getSessionManagement() const;
bool getCheckStartup() const;
public slots:
void readConfig(const QString& profile);
void saveConfig(const QString& profile);
void readConfig(const TQString& profile);
void saveConfig(const TQString& profile);
private:
QLineEdit* editPoll;
QLineEdit* editCommand;
QCheckBox* checkDock;
QCheckBox* checkNoSession;
QCheckBox* checkNoStartup;
TQLineEdit* editPoll;
TQLineEdit* editCommand;
TQCheckBox* checkDock;
TQCheckBox* checkNoSession;
TQCheckBox* checkNoStartup;
KIconButton *buttonNoMail;
KIconButton *buttonOldMail;
@ -139,26 +139,26 @@ private:
KIconButton *buttonStopped;
};
class KBiffNewMailTab : public QWidget
class KBiffNewMailTab : public TQWidget
{
Q_OBJECT
public:
KBiffNewMailTab(const QString& profile = QString::null, QWidget *parent=0);
KBiffNewMailTab(const TQString& profile = TQString::null, TQWidget *parent=0);
virtual ~KBiffNewMailTab();
bool getRunCommand() const;
const QString getRunCommandPath() const;
const TQString getRunCommandPath() const;
bool getRunResetCommand() const;
const QString getRunResetCommandPath() const;
const TQString getRunResetCommandPath() const;
bool getPlaySound() const;
const QString getPlaySoundPath() const;
const TQString getPlaySoundPath() const;
bool getSystemBeep() const;
bool getNotify() const;
bool getStatus() const;
public slots:
void readConfig(const QString& profile);
void saveConfig(const QString& profile);
void readConfig(const TQString& profile);
void saveConfig(const TQString& profile);
protected slots:
void enableRunCommand(bool);
@ -170,21 +170,21 @@ protected slots:
void testPlaySound();
private:
QLineEdit *editRunCommand;
QLineEdit *editRunResetCommand;
QLineEdit *editPlaySound;
QCheckBox *checkRunCommand;
QCheckBox *checkRunResetCommand;
QCheckBox *checkPlaySound;
QCheckBox *checkBeep;
QCheckBox *checkNotify;
QCheckBox *checkStatus;
QPushButton *buttonBrowsePlaySound;
QPushButton *buttonTestPlaySound;
QPushButton *buttonBrowseRunCommand;
QPushButton *buttonBrowseRunResetCommand;
TQLineEdit *editRunCommand;
TQLineEdit *editRunResetCommand;
TQLineEdit *editPlaySound;
TQCheckBox *checkRunCommand;
TQCheckBox *checkRunResetCommand;
TQCheckBox *checkPlaySound;
TQCheckBox *checkBeep;
TQCheckBox *checkNotify;
TQCheckBox *checkStatus;
TQPushButton *buttonBrowsePlaySound;
TQPushButton *buttonTestPlaySound;
TQPushButton *buttonBrowseRunCommand;
TQPushButton *buttonBrowseRunResetCommand;
};
class KBiffMailboxAdvanced : public KDialog
@ -207,44 +207,44 @@ public:
void setDisableApop(bool on);
protected slots:
void portModified(const QString& text);
void timeoutModified(const QString& text);
void portModified(const TQString& text);
void timeoutModified(const TQString& text);
void preauthModified(bool toggled);
void keepaliveModified(bool toggled);
void asyncModified(bool toggled);
void apopModified(bool toggled);
private:
QString password;
QLineEdit *mailbox;
QLineEdit *port;
QLineEdit *timeout;
QCheckBox *preauth;
QCheckBox *keepalive;
QCheckBox *async;
QCheckBox *apop;
TQString password;
TQLineEdit *mailbox;
TQLineEdit *port;
TQLineEdit *timeout;
TQCheckBox *preauth;
TQCheckBox *keepalive;
TQCheckBox *async;
TQCheckBox *apop;
};
class KBiffMailboxTab : public QWidget
class KBiffMailboxTab : public TQWidget
{
Q_OBJECT
public:
KBiffMailboxTab(const QString& profile = QString::null, QWidget *parent=0);
KBiffMailboxTab(const TQString& profile = TQString::null, TQWidget *parent=0);
virtual ~KBiffMailboxTab();
void setMailbox(const KBiffURL& url);
const KBiffURL getMailbox() const;
const QList<KBiffMailbox> getMailboxList() const;
const TQList<KBiffMailbox> getMailboxList() const;
public slots:
void readConfig(const QString& profile);
void saveConfig(const QString& profile);
void readConfig(const TQString& profile);
void saveConfig(const TQString& profile);
protected slots:
void slotDeleteMailbox();
void slotNewMailbox();
void slotMailboxSelected(QListViewItem *item);
void slotMailboxSelected(TQListViewItem *item);
void protocolSelected(int protocol);
void browse();
@ -257,8 +257,8 @@ protected:
const KBiffURL defaultMailbox() const;
private:
QDict<KBiffMailbox> *mailboxHash;
QListViewItem *oldItem;
TQDict<KBiffMailbox> *mailboxHash;
TQListViewItem *oldItem;
unsigned int port;
unsigned int timeout;
@ -266,43 +266,43 @@ private:
bool keepalive;
bool async;
bool useApop;
QComboBox *comboProtocol;
QLineEdit *editMailbox;
QLineEdit *editServer;
QLineEdit *editUser;
QLineEdit *editPassword;
QLineEdit *editFetchCommand;
QCheckBox *checkFetchCommand;
QCheckBox *checkStorePassword;
QPushButton *buttonBrowse;
QListView *mailboxes;
QPushButton *buttonBrowseFetchCommand;
TQComboBox *comboProtocol;
TQLineEdit *editMailbox;
TQLineEdit *editServer;
TQLineEdit *editUser;
TQLineEdit *editPassword;
TQLineEdit *editFetchCommand;
TQCheckBox *checkFetchCommand;
TQCheckBox *checkStorePassword;
TQPushButton *buttonBrowse;
TQListView *mailboxes;
TQPushButton *buttonBrowseFetchCommand;
};
class KBiffAboutTab : public QWidget
class KBiffAboutTab : public TQWidget
{
Q_OBJECT
public:
KBiffAboutTab(QWidget *parent=0);
KBiffAboutTab(TQWidget *parent=0);
virtual ~KBiffAboutTab();
protected slots:
void mailTo(const QString&);
void homepage(const QString&);
void mailTo(const TQString&);
void homepage(const TQString&);
};
class KBiffNewDlg : public KDialog
{
Q_OBJECT
public:
KBiffNewDlg(QWidget* parent = 0, const char * name = 0);
KBiffNewDlg(TQWidget* parent = 0, const char * name = 0);
const QString getName() const
const TQString getName() const
{ return editName->text(); }
private:
QLineEdit *editName;
TQLineEdit *editName;
};
#endif // SETUPDLG_H

@ -11,23 +11,23 @@
#include <kapp.h>
#include <klocale.h>
#include <qdesktopwidget.h>
#include <qpoint.h>
#include <qrect.h>
#include <qheader.h>
#include <qlabel.h>
#include <qlayout.h>
#include <qlistview.h>
#include <qpoint.h>
KBiffStatus::KBiffStatus(QWidget *parent_, const QString& profile, const KBiffStatusList& list)
: QFrame(parent_, 0, WType_Popup),
_listView(new QListView(this))
#include <ntqdesktopwidget.h>
#include <ntqpoint.h>
#include <ntqrect.h>
#include <ntqheader.h>
#include <ntqlabel.h>
#include <ntqlayout.h>
#include <ntqlistview.h>
#include <ntqpoint.h>
KBiffStatus::KBiffStatus(TQWidget *parent_, const TQString& profile, const KBiffStatusList& list)
: TQFrame(parent_, 0, WType_Popup),
_listView(new TQListView(this))
{
setFrameStyle(WinPanel|Raised);
QLabel *profile_label = new QLabel(profile, this);
profile_label->setFrameStyle(QFrame::Box | QFrame::Raised);
TQLabel *profile_label = new TQLabel(profile, this);
profile_label->setFrameStyle(TQFrame::Box | TQFrame::Raised);
profile_label->setAlignment(AlignCenter);
_listView->addColumn(i18n("Mailbox"));
@ -36,9 +36,9 @@ KBiffStatus::KBiffStatus(QWidget *parent_, const QString& profile, const KBiffSt
_listView->setColumnAlignment(1, AlignRight);
_listView->setColumnAlignment(2, AlignRight);
_listView->setSorting(1, FALSE);
_listView->setFrameStyle(QFrame::WinPanel | QFrame::Raised);
_listView->setVScrollBarMode(QScrollView::AlwaysOff);
_listView->setHScrollBarMode(QScrollView::AlwaysOff);
_listView->setFrameStyle(TQFrame::WinPanel | TQFrame::Raised);
_listView->setVScrollBarMode(TQScrollView::AlwaysOff);
_listView->setHScrollBarMode(TQScrollView::AlwaysOff);
_listView->header()->hide();
updateListView(list);
@ -47,7 +47,7 @@ KBiffStatus::KBiffStatus(QWidget *parent_, const QString& profile, const KBiffSt
_listView->setFixedSize(_listView->sizeHint().width() + 5, list_height);
resize(_listView->size());
QVBoxLayout *blayout = new QVBoxLayout(this, 0, 0);
TQVBoxLayout *blayout = new TQVBoxLayout(this, 0, 0);
blayout->addWidget(profile_label);
blayout->addWidget(_listView);
}
@ -64,20 +64,20 @@ void KBiffStatus::updateListView(const KBiffStatusList& list)
{
if (it.current()->newMessages() == "-1")
{
new QListViewItem(_listView, it.current()->mailbox(),
new TQListViewItem(_listView, it.current()->mailbox(),
i18n("Disabled"));
}
else
{
new QListViewItem(_listView, it.current()->mailbox(),
new TQListViewItem(_listView, it.current()->mailbox(),
it.current()->newMessages(),it.current()->curMessages());
}
}
}
void KBiffStatus::popup(const QPoint& pos_)
void KBiffStatus::popup(const TQPoint& pos_)
{
QDesktopWidget *desktop = KApplication::desktop();
TQDesktopWidget *desktop = KApplication::desktop();
int cx = pos_.x(), cy = pos_.y();
// for some reason, the width and height are incorrect until
@ -88,7 +88,7 @@ void KBiffStatus::popup(const QPoint& pos_)
// verify that the width is within the desktop
if (desktop->isVirtualDesktop())
{
QRect scn = desktop->screenGeometry(QPoint(cx, cy));
TQRect scn = desktop->screenGeometry(TQPoint(cx, cy));
if ((pos_.x() + width()) > (scn.x() + scn.width()))
{
@ -116,18 +116,18 @@ void KBiffStatus::popup(const QPoint& pos_)
move(cx, cy+1);
}
KBiffStatusItem::KBiffStatusItem(const QString& mailbox_, const int num_new,const int num_cur)
: QObject(),
KBiffStatusItem::KBiffStatusItem(const TQString& mailbox_, const int num_new,const int num_cur)
: TQObject(),
_mailbox(mailbox_),
_newMessages(QString().setNum(num_new)),
_curMessages((num_cur==-1)?QString("?"):QString().setNum(num_cur))
_newMessages(TQString().setNum(num_new)),
_curMessages((num_cur==-1)?TQString("?"):TQString().setNum(num_cur))
{
}
KBiffStatusItem::KBiffStatusItem(const QString& mailbox_, const int num_new)
: QObject(),
KBiffStatusItem::KBiffStatusItem(const TQString& mailbox_, const int num_new)
: TQObject(),
_mailbox(mailbox_),
_newMessages(QString().setNum(num_new)),
_curMessages(QString("?"))
_newMessages(TQString().setNum(num_new)),
_curMessages(TQString("?"))
{
}

@ -14,46 +14,46 @@
#include <config.h>
#endif
#include <qframe.h>
#include <qlist.h>
#include <qstring.h>
#include <ntqframe.h>
#include <ntqlist.h>
#include <ntqstring.h>
class QListView;
class QPoint;
class TQListView;
class TQPoint;
class KBiffStatusItem : QObject
class KBiffStatusItem : TQObject
{
Q_OBJECT
public:
KBiffStatusItem(const QString& mailbox, const int num_new);
KBiffStatusItem(const QString& mailbox, const int num_new,const int num_cur);
KBiffStatusItem(const TQString& mailbox, const int num_new);
KBiffStatusItem(const TQString& mailbox, const int num_new,const int num_cur);
virtual ~KBiffStatusItem();
QString mailbox() const { return _mailbox; }
QString newMessages() const { return _newMessages; }
QString curMessages() const { return _curMessages; }
TQString mailbox() const { return _mailbox; }
TQString newMessages() const { return _newMessages; }
TQString curMessages() const { return _curMessages; }
protected:
QString _mailbox;
QString _newMessages;
QString _curMessages;
TQString _mailbox;
TQString _newMessages;
TQString _curMessages;
};
typedef QList<KBiffStatusItem> KBiffStatusList;
typedef QListIterator<KBiffStatusItem> KBiffStatusListIterator;
typedef TQList<KBiffStatusItem> KBiffStatusList;
typedef TQListIterator<KBiffStatusItem> KBiffStatusListIterator;
class KBiffStatus : public QFrame
class KBiffStatus : public TQFrame
{
Q_OBJECT
public:
KBiffStatus(QWidget *parent, const QString& profile, const KBiffStatusList& list);
KBiffStatus(TQWidget *parent, const TQString& profile, const KBiffStatusList& list);
virtual ~KBiffStatus();
void updateListView(const KBiffStatusList& list);
void popup(const QPoint& pos);
void popup(const TQPoint& pos);
protected:
QListView *_listView;
TQListView *_listView;
};
#endif // KBIFFSTATUS_H

Loading…
Cancel
Save