summaryrefslogtreecommitdiffstats
path: root/kmail/kmpopfiltercnfrmdlg.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kmail/kmpopfiltercnfrmdlg.cpp')
-rw-r--r--kmail/kmpopfiltercnfrmdlg.cpp82
1 files changed, 41 insertions, 41 deletions
diff --git a/kmail/kmpopfiltercnfrmdlg.cpp b/kmail/kmpopfiltercnfrmdlg.cpp
index a51333e21..2654f52ca 100644
--- a/kmail/kmpopfiltercnfrmdlg.cpp
+++ b/kmail/kmpopfiltercnfrmdlg.cpp
@@ -12,12 +12,12 @@
#include "kmpopfiltercnfrmdlg.h"
#include "kmheaders.h"
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qheader.h>
-#include <qcheckbox.h>
-#include <qvgroupbox.h>
-#include <qtimer.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqheader.h>
+#include <tqcheckbox.h>
+#include <tqvgroupbox.h>
+#include <tqtimer.h>
#include <klocale.h>
#include <kio/global.h>
@@ -26,15 +26,15 @@
////////////////////////////////////////
/// view
-KMPopHeadersView::KMPopHeadersView(QWidget *aParent, KMPopFilterCnfrmDlg *aDialog)
+KMPopHeadersView::KMPopHeadersView(TQWidget *aParent, KMPopFilterCnfrmDlg *aDialog)
: KListView(aParent)
{
mDialog=aDialog;
- int mDownIndex=addColumn(QIconSet(QPixmap(mDown)), QString::null, 24);
+ int mDownIndex=addColumn(TQIconSet(TQPixmap(mDown)), TQString::null, 24);
assert( mDownIndex == Down ); //This code relies on the fact that radiobuttons are the first three columns for easier Column-Action mapping
//it does not necessarily be true - you could redefine mapToColumn and mapToAction to eg. shift those numbers by 1
- addColumn(QIconSet(QPixmap(mLater)), QString::null, 24);
- addColumn(QIconSet(QPixmap(mDel)), QString::null, 24);
+ addColumn(TQIconSet(TQPixmap(mLater)), TQString::null, 24);
+ addColumn(TQIconSet(TQPixmap(mDel)), TQString::null, 24);
/*int subjCol =*/ addColumn(i18n("Subject"), 180);
/*int sendCol =*/ addColumn(i18n("Sender"), 150);
@@ -61,8 +61,8 @@ KMPopHeadersView::KMPopHeadersView(QWidget *aParent, KMPopFilterCnfrmDlg *aDialo
//we rely on fixed column order, so we forbid this
header()->setMovingEnabled(false);
- connect(this, SIGNAL(pressed(QListViewItem*, const QPoint&, int)),
- SLOT(slotPressed(QListViewItem*, const QPoint&, int)));
+ connect(this, TQT_SIGNAL(pressed(TQListViewItem*, const TQPoint&, int)),
+ TQT_SLOT(slotPressed(TQListViewItem*, const TQPoint&, int)));
}
KMPopHeadersView::~KMPopHeadersView()
@@ -70,7 +70,7 @@ KMPopHeadersView::~KMPopHeadersView()
}
//Handle keystrokes - Left and Right key select previous/next action correspondingly
-void KMPopHeadersView::keyPressEvent( QKeyEvent *e )
+void KMPopHeadersView::keyPressEvent( TQKeyEvent *e )
{
if (e->key() == Key_Left) {
KMPopHeadersViewItem *item = dynamic_cast<KMPopHeadersViewItem*>( selectedItem() );
@@ -89,11 +89,11 @@ void KMPopHeadersView::keyPressEvent( QKeyEvent *e )
}
}
} else {
- QListView::keyPressEvent( e );
+ TQListView::keyPressEvent( e );
}
}
-void KMPopHeadersView::slotPressed(QListViewItem* aItem, const QPoint&, int aColumn) {
+void KMPopHeadersView::slotPressed(TQListViewItem* aItem, const TQPoint&, int aColumn) {
if ( !( aItem && aColumn>=0 && aColumn<NoAction ) ) return;
KMPopHeadersViewItem *item = dynamic_cast<KMPopHeadersViewItem*>(aItem);
assert( item );
@@ -238,9 +238,9 @@ KMPopHeadersViewItem::KMPopHeadersViewItem(KMPopHeadersView *aParent, KMPopFilte
mParent = aParent;
mAction = NoAction;
- setPixmap(mParent->mapToColumn(Delete), QPixmap(KMPopHeadersView::mUnchecked));
- setPixmap(mParent->mapToColumn(Down), QPixmap(KMPopHeadersView::mUnchecked));
- setPixmap(mParent->mapToColumn(Later), QPixmap(KMPopHeadersView::mUnchecked));
+ setPixmap(mParent->mapToColumn(Delete), TQPixmap(KMPopHeadersView::mUnchecked));
+ setPixmap(mParent->mapToColumn(Down), TQPixmap(KMPopHeadersView::mUnchecked));
+ setPixmap(mParent->mapToColumn(Later), TQPixmap(KMPopHeadersView::mUnchecked));
setAction( aAction );
}
@@ -253,17 +253,17 @@ void KMPopHeadersViewItem::setAction(KMPopFilterAction aAction)
{
if(aAction != NoAction && aAction!=mAction)
{
- if ( mAction!=NoAction ) setPixmap(mParent->mapToColumn(mAction), QPixmap(KMPopHeadersView::mUnchecked));
- setPixmap(mParent->mapToColumn(aAction), QPixmap(KMPopHeadersView::mChecked));
+ if ( mAction!=NoAction ) setPixmap(mParent->mapToColumn(mAction), TQPixmap(KMPopHeadersView::mUnchecked));
+ setPixmap(mParent->mapToColumn(aAction), TQPixmap(KMPopHeadersView::mChecked));
mAction=aAction;
}
}
-void KMPopHeadersViewItem::paintFocus(QPainter *, const QColorGroup &, const QRect &)
+void KMPopHeadersViewItem::paintFocus(TQPainter *, const TQColorGroup &, const TQRect &)
{
}
-QString KMPopHeadersViewItem::key(int col, bool) const
+TQString KMPopHeadersViewItem::key(int col, bool) const
{
if (col == 3) return KMMsgBase::skipKeyword(text(col).lower());
if (col == 6) return text(8);
@@ -277,7 +277,7 @@ QString KMPopHeadersViewItem::key(int col, bool) const
/// dlg
/////////////////////////////////////////
/////////////////////////////////////////
-KMPopFilterCnfrmDlg::KMPopFilterCnfrmDlg(QPtrList<KMPopHeaders> *aHeaders, const QString &aAccount, bool aShowLaterMsgs, QWidget *aParent, const char *aName)
+KMPopFilterCnfrmDlg::KMPopFilterCnfrmDlg(TQPtrList<KMPopHeaders> *aHeaders, const TQString &aAccount, bool aShowLaterMsgs, TQWidget *aParent, const char *aName)
: KDialogBase(aParent, aName, true, i18n("POP Filter"), Ok | Help, Ok, false)
{
unsigned int rulesetCount = 0;
@@ -285,26 +285,26 @@ KMPopFilterCnfrmDlg::KMPopFilterCnfrmDlg(QPtrList<KMPopHeaders> *aHeaders, const
mShowLaterMsgs = aShowLaterMsgs;
mLowerBoxVisible = false;
- QWidget *w = new QWidget(this);
+ TQWidget *w = new TQWidget(this);
setMainWidget(w);
- QVBoxLayout *vbl = new QVBoxLayout(w, 0, spacingHint());
+ TQVBoxLayout *vbl = new TQVBoxLayout(w, 0, spacingHint());
- QLabel *l = new QLabel(i18n("Messages to filter found on POP Account: <b>%1</b><p>"
+ TQLabel *l = new TQLabel(i18n("Messages to filter found on POP Account: <b>%1</b><p>"
"The messages shown exceed the maximum size limit you defined for this account.<br>You can select "
"what you want to do with them by checking the appropriate button.").arg(aAccount), w);
vbl->addWidget(l);
- QVGroupBox *upperBox = new QVGroupBox(i18n("Messages Exceeding Size"), w);
+ TQVGroupBox *upperBox = new TQVGroupBox(i18n("Messages Exceeding Size"), w);
upperBox->hide();
KMPopHeadersView *lv = new KMPopHeadersView(upperBox, this);
vbl->addWidget(upperBox);
- QVGroupBox *lowerBox = new QVGroupBox(i18n("Ruleset Filtered Messages: none"), w);
- QString checkBoxText((aShowLaterMsgs)?
+ TQVGroupBox *lowerBox = new TQVGroupBox(i18n("Ruleset Filtered Messages: none"), w);
+ TQString checkBoxText((aShowLaterMsgs)?
i18n("Show messages matched by a ruleset and tagged 'Download' or 'Delete'"):
i18n("Show messages matched by a filter ruleset"));
- QCheckBox* cb = new QCheckBox(checkBoxText, lowerBox);
+ TQCheckBox* cb = new TQCheckBox(checkBoxText, lowerBox);
cb->setEnabled(false);
mFilteredHeaders = new KMPopHeadersView(lowerBox, this);
mFilteredHeaders->hide();
@@ -363,15 +363,15 @@ KMPopFilterCnfrmDlg::KMPopFilterCnfrmDlg(QPtrList<KMPopHeaders> *aHeaders, const
lowerBox->setTitle(i18n("Ruleset Filtered Messages: %1").arg(rulesetCount));
// connect signals and slots
- connect(lv, SIGNAL(pressed(QListViewItem*, const QPoint&, int)),
- this, SLOT(slotPressed(QListViewItem*, const QPoint&, int)));
- connect(mFilteredHeaders, SIGNAL(pressed(QListViewItem*, const QPoint&, int)),
- this, SLOT(slotPressed(QListViewItem*, const QPoint&, int)));
- connect(cb, SIGNAL(toggled(bool)),
- this, SLOT(slotToggled(bool)));
+ connect(lv, TQT_SIGNAL(pressed(TQListViewItem*, const TQPoint&, int)),
+ this, TQT_SLOT(slotPressed(TQListViewItem*, const TQPoint&, int)));
+ connect(mFilteredHeaders, TQT_SIGNAL(pressed(TQListViewItem*, const TQPoint&, int)),
+ this, TQT_SLOT(slotPressed(TQListViewItem*, const TQPoint&, int)));
+ connect(cb, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(slotToggled(bool)));
adjustSize();
- QTimer::singleShot(0, this, SLOT(slotUpdateMinimumSize()));
+ TQTimer::singleShot(0, this, TQT_SLOT(slotUpdateMinimumSize()));
}
KMPopFilterCnfrmDlg::~KMPopFilterCnfrmDlg()
@@ -381,7 +381,7 @@ KMPopFilterCnfrmDlg::~KMPopFilterCnfrmDlg()
void KMPopFilterCnfrmDlg::setupLVI(KMPopHeadersViewItem *lvi, KMMessage *msg)
{
// set the subject
- QString tmp = msg->subject();
+ TQString tmp = msg->subject();
if(tmp.isEmpty())
tmp = i18n("no subject");
lvi->setText(3, tmp);
@@ -406,7 +406,7 @@ void KMPopFilterCnfrmDlg::setupLVI(KMPopHeadersViewItem *lvi, KMMessage *msg)
lvi->setText(8, msg->dateIsoStr());
}
-void KMPopFilterCnfrmDlg::setAction(QListViewItem *aItem, KMPopFilterAction aAction)
+void KMPopFilterCnfrmDlg::setAction(TQListViewItem *aItem, KMPopFilterAction aAction)
{
mItemMap[aItem]->setAction(aAction);
}
@@ -416,7 +416,7 @@ void KMPopFilterCnfrmDlg::setAction(QListViewItem *aItem, KMPopFilterAction aAct
click happened over a radio button column.
Of course the radio button state is changed as well if the above is true.
*/
-void KMPopFilterCnfrmDlg::slotPressed(QListViewItem *aItem, const QPoint &, int aColumn)
+void KMPopFilterCnfrmDlg::slotPressed(TQListViewItem *aItem, const TQPoint &, int aColumn)
{
if ( aColumn>=0 && aColumn<NoAction ) setAction(aItem,KMPopHeadersView::mapToAction(aColumn));
}
@@ -459,7 +459,7 @@ void KMPopFilterCnfrmDlg::slotToggled(bool aOn)
mFilteredHeaders->hide();
}
}
- QTimer::singleShot(0, this, SLOT(slotUpdateMinimumSize()));
+ TQTimer::singleShot(0, this, TQT_SLOT(slotUpdateMinimumSize()));
}
void KMPopFilterCnfrmDlg::slotUpdateMinimumSize()