summaryrefslogtreecommitdiffstats
path: root/knode/kncollectionviewitem.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:53:50 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:53:50 +0000
commit7be55ffa061c026e35e2d6a0effe1161ddb0d41f (patch)
tree8474f9b444b2756228600050f07a7ff25de532b2 /knode/kncollectionviewitem.cpp
parentf587f20a6d09f1729dd0a8c1cd8ee0110aec7451 (diff)
downloadtdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.tar.gz
tdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1157655 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'knode/kncollectionviewitem.cpp')
-rw-r--r--knode/kncollectionviewitem.cpp30
1 files changed, 15 insertions, 15 deletions
diff --git a/knode/kncollectionviewitem.cpp b/knode/kncollectionviewitem.cpp
index ace78a63a..8fed1f968 100644
--- a/knode/kncollectionviewitem.cpp
+++ b/knode/kncollectionviewitem.cpp
@@ -18,8 +18,8 @@
#include <config.h>
#endif
-#include <qdragobject.h>
-#include <qpainter.h>
+#include <tqdragobject.h>
+#include <tqpainter.h>
#include <kiconloader.h>
#include <kstringhandler.h>
@@ -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<KFolderTreeItem*>(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<KFolderTree*>( 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 ) {