From 7be55ffa061c026e35e2d6a0effe1161ddb0d41f Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 31 Jul 2010 19:53:50 +0000 Subject: Trinity Qt initial conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1157655 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kmail/kmpopfiltercnfrmdlg.cpp | 82 +++++++++++++++++++++---------------------- 1 file changed, 41 insertions(+), 41 deletions(-) (limited to 'kmail/kmpopfiltercnfrmdlg.cpp') 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 -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include #include @@ -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( 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(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 *aHeaders, const QString &aAccount, bool aShowLaterMsgs, QWidget *aParent, const char *aName) +KMPopFilterCnfrmDlg::KMPopFilterCnfrmDlg(TQPtrList *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 *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: %1

" + TQLabel *l = new TQLabel(i18n("Messages to filter found on POP Account: %1

" "The messages shown exceed the maximum size limit you defined for this account.
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 *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 && aColumnhide(); } } - QTimer::singleShot(0, this, SLOT(slotUpdateMinimumSize())); + TQTimer::singleShot(0, this, TQT_SLOT(slotUpdateMinimumSize())); } void KMPopFilterCnfrmDlg::slotUpdateMinimumSize() -- cgit v1.2.1