summaryrefslogtreecommitdiffstats
path: root/knode/knhdrviewitem.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'knode/knhdrviewitem.cpp')
-rw-r--r--knode/knhdrviewitem.cpp62
1 files changed, 31 insertions, 31 deletions
diff --git a/knode/knhdrviewitem.cpp b/knode/knhdrviewitem.cpp
index 93b54fc0a..e547b11d9 100644
--- a/knode/knhdrviewitem.cpp
+++ b/knode/knhdrviewitem.cpp
@@ -14,8 +14,8 @@
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, US
*/
-#include <qdragobject.h>
-#include <qpainter.h>
+#include <tqdragobject.h>
+#include <tqpainter.h>
#include <kdeversion.h>
#include <kdebug.h>
@@ -54,7 +54,7 @@ void KNHdrViewItem::init( KNArticle *a )
KNHdrViewItem::~KNHdrViewItem()
{
if (mActive) {
- QListView *lv = listView();
+ TQListView *lv = listView();
if (lv)
static_cast<KNHeaderView*>( lv )->activeRemoved();
}
@@ -65,7 +65,7 @@ KNHdrViewItem::~KNHdrViewItem()
void KNHdrViewItem::expandChildren()
{
- QListViewItemIterator it( firstChild() );
+ TQListViewItemIterator it( firstChild() );
for ( ; it.current(); ++it) {
if (it.current()->depth() <= depth())
break;
@@ -74,7 +74,7 @@ void KNHdrViewItem::expandChildren()
}
-int KNHdrViewItem::compare( QListViewItem *i, int col, bool ) const
+int KNHdrViewItem::compare( TQListViewItem *i, int col, bool ) const
{
KNArticle *otherArticle = static_cast<KNHdrViewItem*>( i )->art;
int diff = 0;
@@ -114,13 +114,13 @@ int KNHdrViewItem::compare( QListViewItem *i, int col, bool ) const
}
-void KNHdrViewItem::paintCell( QPainter *p, const QColorGroup &cg, int column, int width, int alignment )
+void KNHdrViewItem::paintCell( TQPainter *p, const TQColorGroup &cg, int column, int width, int alignment )
{
int xText = 0, xPM = 3, yPM = 0;
- QColor base;
+ TQColor base;
const KPaintInfo *paintInfo = static_cast<KNHeaderView*>( listView() )->paintInfo();
- QPen pen = p->pen();
+ TQPen pen = p->pen();
if (isSelected() || mActive) {
pen.setColor( cg.highlightedText() );
base = cg.highlight();
@@ -134,13 +134,13 @@ void KNHdrViewItem::paintCell( QPainter *p, const QColorGroup &cg, int column, i
p->setPen( pen );
- p->fillRect( 0, 0, width, height(), QBrush(base) );
+ p->fillRect( 0, 0, width, height(), TQBrush(base) );
if ( column == paintInfo->subCol ) {
- QFont font = p->font();
+ TQFont font = p->font();
font.setBold( firstColBold() );
p->setFont( font );
- const QPixmap *pm;
+ const TQPixmap *pm;
for (int i = 0; i < 4; i++) {
pm = pixmap( i );
@@ -156,15 +156,15 @@ void KNHdrViewItem::paintCell( QPainter *p, const QColorGroup &cg, int column, i
if (width - xText - 5 > 0) {
int cntWidth = 0;
- QString t2;
- QFont f2;
+ TQString t2;
+ TQFont f2;
if (countUnreadInThread() > 0 && column == paintInfo->subCol && !isOpen()) {
- t2 = QString( " (%1)" ).arg( countUnreadInThread() );
+ t2 = TQString( " (%1)" ).arg( countUnreadInThread() );
f2 = p->font();
f2.setBold( true );
- cntWidth = QFontMetrics( f2 ).width( t2, -1 );
+ cntWidth = TQFontMetrics( f2 ).width( t2, -1 );
}
- QString t = KStringHandler::rPixelSqueeze( text( column ), p->fontMetrics(), width - xText - cntWidth - 5 );
+ TQString t = KStringHandler::rPixelSqueeze( text( column ), p->fontMetrics(), width - xText - cntWidth - 5 );
// show tooltip if we have to squeeze the text
if ( t != text( column ) )
@@ -174,29 +174,29 @@ void KNHdrViewItem::paintCell( QPainter *p, const QColorGroup &cg, int column, i
p->drawText( xText, 0, width - xText - 5, height(), alignment | AlignVCenter, t );
if (cntWidth) {
- QFont orig = p->font();
+ TQFont orig = p->font();
p->setFont( f2 );
- QPen pen = p->pen();
+ TQPen pen = p->pen();
if (isSelected() || mActive) {
pen.setColor( cg.highlightedText() );
} else {
pen.setColor( cg.link() );
}
p->setPen( pen );
- p->drawText( xText + QFontMetrics( orig ).width( t, -1 ), 0, width - xText - 5, height(), alignment | AlignVCenter, t2 );
+ p->drawText( xText + TQFontMetrics( orig ).width( t, -1 ), 0, width - xText - 5, height(), alignment | AlignVCenter, t2 );
}
}
}
-int KNHdrViewItem::width( const QFontMetrics &fm, const QListView *, int column )
+int KNHdrViewItem::width( const TQFontMetrics &fm, const TQListView *, int column )
{
int ret = fm.boundingRect( text(column) ).width();
const KPaintInfo *paintInfo = static_cast<KNHeaderView*>( listView() )->paintInfo();
// all pixmaps are drawn in the first column
if ( column == paintInfo->subCol ) {
- const QPixmap *pm;
+ const TQPixmap *pm;
for (int i = 0; i < 4; ++i) {
pm = pixmap( i );
if (pm && !pm->isNull())
@@ -208,10 +208,10 @@ int KNHdrViewItem::width( const QFontMetrics &fm, const QListView *, int column
}
-QString KNHdrViewItem::text( int col ) const
+TQString KNHdrViewItem::text( int col ) const
{
if ( !art )
- return QString::null;
+ return TQString::null;
KNHeaderView *hv = static_cast<KNHeaderView*>( listView() );
if ( col == hv->paintInfo()->subCol ) {
@@ -220,16 +220,16 @@ QString KNHdrViewItem::text( int col ) const
if ( col == hv->paintInfo()->sizeCol ) {
if ( art->lines()->numberOfLines() != -1 )
- return QString::number( art->lines()->numberOfLines() );
+ return TQString::number( art->lines()->numberOfLines() );
else
- return QString::null;
+ return TQString::null;
}
if ( col == hv->paintInfo()->scoreCol ) {
if ( art->type() == KMime::Base::ATremote )
- return QString::number( static_cast<KNRemoteArticle*>( art )->score() );
+ return TQString::number( static_cast<KNRemoteArticle*>( art )->score() );
else
- return QString::null;
+ return TQString::null;
}
if ( col == hv->paintInfo()->dateCol ) {
@@ -239,9 +239,9 @@ QString KNHdrViewItem::text( int col ) const
}
-QDragObject* KNHdrViewItem::dragObject()
+TQDragObject* KNHdrViewItem::dragObject()
{
- QDragObject *d = new QStoredDrag( "x-knode-drag/article" , listView()->viewport() );
+ TQDragObject *d = new TQStoredDrag( "x-knode-drag/article" , listView()->viewport() );
d->setPixmap( knGlobals.configManager()->appearance()->icon( KNConfig::Appearance::posting ) );
return d;
}
@@ -278,7 +278,7 @@ bool KNHdrViewItem::firstColBold()
}
-QColor KNHdrViewItem::normalColor()
+TQColor KNHdrViewItem::normalColor()
{
if (art->type()==KMime::Base::ATremote)
return static_cast<KNRemoteArticle*>( art )->color();
@@ -287,7 +287,7 @@ QColor KNHdrViewItem::normalColor()
}
-QColor KNHdrViewItem::greyColor()
+TQColor KNHdrViewItem::greyColor()
{
return knGlobals.configManager()->appearance()->readThreadColor();
}