From 67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7 Mon Sep 17 00:00:00 2001 From: tpearson Date: Wed, 13 Apr 2011 00:46:47 +0000 Subject: Initial conversion of kdepim to TQt This will probably require some tweaking before it will build under Qt4, however Qt3 builds are OK. Any alterations this commit makes to kdepim behaviour under Qt3 are unintentional and should be fixed. git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1227832 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kmail/headerlistquicksearch.cpp | 58 ++++++++++++++++++++--------------------- 1 file changed, 29 insertions(+), 29 deletions(-) (limited to 'kmail/headerlistquicksearch.cpp') diff --git a/kmail/headerlistquicksearch.cpp b/kmail/headerlistquicksearch.cpp index a2262744f..39df6dc9b 100644 --- a/kmail/headerlistquicksearch.cpp +++ b/kmail/headerlistquicksearch.cpp @@ -18,11 +18,11 @@ In addition, as a special exception, the copyright holders give permission to link the code of this program with any edition of - the Qt library by Trolltech AS, Norway (or with modified versions - of Qt that use the same license as Qt), and distribute linked + the TQt library by Trolltech AS, Norway (or with modified versions + of TQt that use the same license as TQt), and distribute linked combinations including the two. You must obey the GNU General Public License in all respects for all of the code used other than - Qt. If you modify this file, you may extend this exception to + TQt. If you modify this file, you may extend this exception to your version of the file, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. @@ -47,11 +47,11 @@ namespace KMail { -HeaderListQuickSearch::HeaderListQuickSearch( TQWidget *parent, +HeaderListQuickSearch::HeaderListQuickSearch( TQWidget *tqparent, KListView *listView, KActionCollection *actionCollection, const char *name ) - : KListViewSearchLine(parent, listView, name), mStatusCombo(0), mStatus(0), statusList() + : KListViewSearchLine(tqparent, listView, name), mStatusCombo(0), mtqStatus(0), statusList() { KAction *resetQuickSearch = new KAction( i18n( "Reset Quick Search" ), TQApplication::reverseLayout() @@ -61,27 +61,27 @@ HeaderListQuickSearch::HeaderListQuickSearch( TQWidget *parent, TQT_SLOT( reset() ), actionCollection, "reset_quicksearch" ); - resetQuickSearch->plug( parent ); + resetQuickSearch->plug( tqparent ); resetQuickSearch->setWhatsThis( i18n( "Reset Quick Search\n" "Resets the quick search so that " "all messages are shown again." ) ); - TQLabel *label = new TQLabel( i18n("Stat&us:"), parent, "kde toolbar widget" ); + TQLabel *label = new TQLabel( i18n("Stat&us:"), tqparent, "kde toolbar widget" ); - mStatusCombo = new TQComboBox( parent, "quick search status combo box" ); + mStatusCombo = new TQComboBox( tqparent, "quick search status combo box" ); mStatusCombo->setSizeLimit( 12 ); - mStatusCombo->insertItem( SmallIcon( "run" ), i18n("Any Status") ); - - inserStatus( StatusUnread ); - inserStatus( StatusNew ); - inserStatus( StatusImportant ); - inserStatus( StatusReplied ); - inserStatus( StatusForwarded ); - inserStatus( StatusToDo ); - inserStatus( StatusHasAttachment ); - inserStatus( StatusInvitation ); - inserStatus( StatusWatched ); - inserStatus( StatusIgnored ); + mStatusCombo->insertItem( SmallIcon( "run" ), i18n("Any tqStatus") ); + + insertqStatus( StatusUnread ); + insertqStatus( StatusNew ); + insertqStatus( StatusImportant ); + insertqStatus( StatusReplied ); + insertqStatus( StatusForwarded ); + insertqStatus( StatusToDo ); + insertqStatus( StatusHasAttachment ); + insertqStatus( StatusInvitation ); + insertqStatus( StatusWatched ); + insertqStatus( StatusIgnored ); mStatusCombo->setCurrentItem( 0 ); mStatusCombo->installEventFilter( this ); connect( mStatusCombo, TQT_SIGNAL ( activated( int ) ), @@ -89,7 +89,7 @@ HeaderListQuickSearch::HeaderListQuickSearch( TQWidget *parent, label->setBuddy( mStatusCombo ); - KToolBarButton * btn = new KToolBarButton( "mail_find", 0, parent, + KToolBarButton * btn = new KToolBarButton( "mail_tqfind", 0, tqparent, 0, i18n( "Open Full Search" ) ); connect( btn, TQT_SIGNAL( clicked() ), TQT_SIGNAL( requestFullSearch() ) ); @@ -115,7 +115,7 @@ bool HeaderListQuickSearch::eventFilter( TQObject *watched, TQEvent *event ) if ( watched == mStatusCombo ) { KMMainWidget *mainWidget = 0; - // Travel up the parents list until we find the main widget + // Travel up the tqparents list until we find the main widget for ( TQWidget *curWidget = tqparentWidget(); curWidget; curWidget = curWidget->tqparentWidget() ) { mainWidget = ::qt_cast( curWidget ); if ( mainWidget ) @@ -145,10 +145,10 @@ bool HeaderListQuickSearch::eventFilter( TQObject *watched, TQEvent *event ) bool HeaderListQuickSearch::itemMatches(const TQListViewItem *item, const TQString &s) const { mCurrentSearchTerm = s; // bit of a hack, but works - if ( mStatus != 0 ) { + if ( mtqStatus != 0 ) { KMHeaders *headers = static_cast( item->listView() ); const KMMsgBase *msg = headers->getMsgBaseForItem( item ); - if ( !msg || ! ( msg->status() & mStatus ) ) + if ( !msg || ! ( msg->status() & mtqStatus ) ) return false; } @@ -176,13 +176,13 @@ void HeaderListQuickSearch::reset() void HeaderListQuickSearch::sloStatusChanged( int index ) { if ( index == 0 ) - mStatus = 0; + mtqStatus = 0; else - mStatus = KMSearchRuleStatus::statusFromEnglishName( statusList[index - 1] ); + mtqStatus = KMSearchRuletqStatus::statusFromEnglishName( statusList[index - 1] ); updateSearch(); } -void HeaderListQuickSearch::inserStatus(KMail::StatusValueTypes which) +void HeaderListQuickSearch::insertqStatus(KMail::StatusValueTypes which) { mStatusCombo->insertItem( SmallIcon( KMail::StatusValues[which].icon ), i18n( KMail::StatusValues[ which ].text ) ); @@ -196,9 +196,9 @@ TQString HeaderListQuickSearch::currentSearchTerm() const } -int HeaderListQuickSearch::currenStatus() const +int HeaderListQuickSearch::currentqStatus() const { - return mStatus; + return mtqStatus; } } // namespace KMail -- cgit v1.2.1