diff options
Diffstat (limited to 'src/netlistviewitem.cpp')
-rw-r--r-- | src/netlistviewitem.cpp | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/src/netlistviewitem.cpp b/src/netlistviewitem.cpp index a607eee..66f574c 100644 --- a/src/netlistviewitem.cpp +++ b/src/netlistviewitem.cpp @@ -26,22 +26,22 @@ #include <kiconeffect.h> #include <kdeversion.h> -void NetListViewItem::paintCell(QPainter *p, const QColorGroup &cg, int column, int width, int alignment) +void NetListViewItem::paintCell(TQPainter *p, const TQColorGroup &cg, int column, int width, int tqalignment) { /// HACK fixes: higher item (connected) is drawn using regular height upon widget change (widgetStack); if ( height()!=mHeight ) setHeight( mHeight ); /// PREPARE COLORS /// - QColor bgColor, fgColor; + TQColor bgColor, fgColor; /// colors of selected item if ( listView()->isSelected(this) ) { - bgColor = cg.color( QColorGroup::Highlight ); /// settings for selected item; - fgColor = cg.color( QColorGroup::HighlightedText ); + bgColor = cg.color( TQColorGroup::Highlight ); /// settings for selected item; + fgColor = cg.color( TQColorGroup::HighlightedText ); /// colors of deselected item` } else { if (mConnected) - bgColor = cg.color( QColorGroup::Background); + bgColor = cg.color( TQColorGroup::Background); else { #if KDE_IS_VERSION(3,4,0) bgColor = ((KListViewItem*)this)->backgroundColor(column); @@ -51,7 +51,7 @@ void NetListViewItem::paintCell(QPainter *p, const QColorGroup &cg, int column, #endif } - fgColor = cg.color( QColorGroup::Text); + fgColor = cg.color( TQColorGroup::Text); if (mQuality<8) fgColor = fgColor.light(); } @@ -66,10 +66,10 @@ void NetListViewItem::paintCell(QPainter *p, const QColorGroup &cg, int column, switch (column) { - /// DRAW QUALITY /// + /// DRAW TQUALITY /// case mQualityColumn: { - QPixmap qualityIcon = SmallIcon("knewstuff"); - QPixmap qualityIconGray = KIconEffect().apply( qualityIcon, KIconEffect::ToGray, 1, Qt::black, true ); + TQPixmap qualityIcon = SmallIcon("knewstuff"); + TQPixmap qualityIconGray = KIconEffect().apply( qualityIcon, KIconEffect::ToGray, 1, TQt::black, true ); int barWidth = int(mQuality/8)*8; if (mQuality>0) barWidth+=8; //add 8 (half a star) b/c int rounds down. @@ -86,7 +86,7 @@ void NetListViewItem::paintCell(QPainter *p, const QColorGroup &cg, int column, if (mEnc) { int icoTop = int( ( this->height()-16 )/2 ); int icoLeft = int( ( width-listView()->itemMargin()-16 )/2 ); - QPixmap encIcon = SmallIcon("encrypted"); + TQPixmap encIcon = SmallIcon("encrypted"); p->drawPixmap(icoLeft,icoTop, encIcon ); } break; @@ -96,13 +96,13 @@ void NetListViewItem::paintCell(QPainter *p, const QColorGroup &cg, int column, case mEssidColumn: { /// draw icon and its shadow. if (mConnected) { - QPixmap connectedIcon; + TQPixmap connectedIcon; connectedIcon = SmallIcon("forward"); int icoTop = int( ( this->height()-16 )/2 ); p->drawPixmap(listView()->itemMargin(),icoTop, connectedIcon ); } - QFont mFont = listView()->font(); + TQFont mFont = listView()->font(); if (mConnected) mFont.setBold( true ); if (mHidden) @@ -127,7 +127,7 @@ void NetListViewItem::paintCell(QPainter *p, const QColorGroup &cg, int column, /// DRAW CHANNEL /// case mChanColumn: { - QFont mFont = listView()->font(); + TQFont mFont = listView()->font(); mFont.setItalic(true); if (mConnected) mFont.setBold( true ); @@ -145,7 +145,7 @@ void NetListViewItem::paintCell(QPainter *p, const QColorGroup &cg, int column, } /// DRAW ACCESS POINT /// case mAPColumn: { - QFont mFont = listView()->font(); + TQFont mFont = listView()->font(); if (mHidden) mFont.setItalic( true ); if (mConnected) @@ -165,20 +165,20 @@ void NetListViewItem::paintCell(QPainter *p, const QColorGroup &cg, int column, } default: - KListViewItem::paintCell(p, cg, column, width, alignment); + KListViewItem::paintCell(p, cg, column, width, tqalignment); } //switch } -int NetListViewItem::width(const QFontMetrics &fm, const QListView *lv, int column) const +int NetListViewItem::width(const TQFontMetrics &fm, const TQListView *lv, int column) const { int w; - QFont mFont = listView()->font(); + TQFont mFont = listView()->font(); if (mConnected) mFont.setBold(true); if (mHidden) mFont.setItalic(true); - QFontMetrics mFm( mFont ); + TQFontMetrics mFm( mFont ); if (column == mQualityColumn) w = 6*16 + (lv->itemMargin()*2); @@ -203,7 +203,7 @@ int NetListViewItem::width(const QFontMetrics &fm, const QListView *lv, int colu return w; } -QString NetListViewItem::key( int column, bool ascending ) const +TQString NetListViewItem::key( int column, bool ascending ) const { if (mConnected) { // make sure that connected item is always 1st. if (ascending) @@ -211,9 +211,9 @@ QString NetListViewItem::key( int column, bool ascending ) const else return "ZZZ"; } - QString t = QString::null; + TQString t = TQString(); if (column == mQualityColumn) { - t = QString::number( mQuality ); + t = TQString::number( mQuality ); if (mQuality < 10) t.prepend("0"); } else if (column == mEncColumn) { |