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 --- knode/kncollectionviewitem.cpp | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'knode/kncollectionviewitem.cpp') diff --git a/knode/kncollectionviewitem.cpp b/knode/kncollectionviewitem.cpp index ace78a63..8fed1f96 100644 --- a/knode/kncollectionviewitem.cpp +++ b/knode/kncollectionviewitem.cpp @@ -18,8 +18,8 @@ #include #endif -#include -#include +#include +#include #include #include @@ -33,14 +33,14 @@ KNCollectionViewItem::KNCollectionViewItem( KFolderTree *parent, Protocol protocol, Type type) : - KFolderTreeItem(parent, QString::null, protocol, type), coll(0) + KFolderTreeItem(parent, TQString::null, protocol, type), coll(0) { setIcon(); } KNCollectionViewItem::KNCollectionViewItem( KFolderTreeItem *it, Protocol protocol, Type type, int unread, int total ) : - KFolderTreeItem(it, QString::null, protocol, type, unread, total), coll(0) + KFolderTreeItem(it, TQString::null, protocol, type, unread, total), coll(0) { setIcon(); } @@ -81,7 +81,7 @@ void KNCollectionViewItem::setIcon() { } -int KNCollectionViewItem::compare(QListViewItem *i, int col, bool ascending) const +int KNCollectionViewItem::compare(TQListViewItem *i, int col, bool ascending) const { KFolderTreeItem *other = static_cast(i); @@ -101,7 +101,7 @@ int KNCollectionViewItem::compare(QListViewItem *i, int col, bool ascending) con } -bool KNCollectionViewItem::acceptDrag(QDropEvent* event) const +bool KNCollectionViewItem::acceptDrag(TQDropEvent* event) const { if (event && coll && coll->type()==KNCollection::CTfolder) { if (event->provides("x-knode-drag/article")) @@ -113,7 +113,7 @@ bool KNCollectionViewItem::acceptDrag(QDropEvent* event) const } -void KNCollectionViewItem::paintCell( QPainter * p, const QColorGroup & cg,int column, int width, int align ) +void KNCollectionViewItem::paintCell( TQPainter * p, const TQColorGroup & cg,int column, int width, int align ) { KFolderTree *ft = static_cast( listView() ); @@ -126,19 +126,19 @@ void KNCollectionViewItem::paintCell( QPainter * p, const QColorGroup & cg,int c // find out if we will use bold font, necessary for the text squeezing if ( (column == 0 || column == ft->unreadIndex()) && ( mUnread > 0 ) ) { - QFont f = p->font(); - f.setWeight(QFont::Bold); + TQFont f = p->font(); + f.setWeight(TQFont::Bold); p->setFont(f); } // consider pixmap size for squeezing int pxWidth = 8; - const QPixmap *px = pixmap(column); + const TQPixmap *px = pixmap(column); if (px) pxWidth += px->width(); // temporary set the squeezed text and use the parent class to paint it - QString curText = text( column ); + TQString curText = text( column ); if ( p->fontMetrics().width( curText ) > width - pxWidth ) { setText( column, squeezeFolderName( curText, p->fontMetrics(), width - pxWidth ) ); KFolderTreeItem::paintCell( p, cg, column, width, align ); @@ -148,14 +148,14 @@ void KNCollectionViewItem::paintCell( QPainter * p, const QColorGroup & cg,int c } -QString KNCollectionViewItem::squeezeFolderName( const QString &text, - const QFontMetrics &fm, +TQString KNCollectionViewItem::squeezeFolderName( const TQString &text, + const TQFontMetrics &fm, uint width ) const { if (protocol() == KFolderTreeItem::News && type() == KFolderTreeItem::Other) { - QString t(text); + TQString t(text); int curPos = 0, nextPos = 0; - QString temp; + TQString temp; while ( (uint)fm.width(t) > width && nextPos != -1 ) { nextPos = t.find('.', curPos); if ( nextPos != -1 ) { -- cgit v1.2.3