summaryrefslogtreecommitdiffstats
path: root/knode/kncollectionviewitem.cpp
diff options
context:
space:
mode:
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 ) {