summaryrefslogtreecommitdiffstats
path: root/src/kvirc/ui/kvi_userlistview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/kvirc/ui/kvi_userlistview.cpp')
-rw-r--r--src/kvirc/ui/kvi_userlistview.cpp44
1 files changed, 0 insertions, 44 deletions
diff --git a/src/kvirc/ui/kvi_userlistview.cpp b/src/kvirc/ui/kvi_userlistview.cpp
index 001dc625..d18a2f0f 100644
--- a/src/kvirc/ui/kvi_userlistview.cpp
+++ b/src/kvirc/ui/kvi_userlistview.cpp
@@ -1309,16 +1309,8 @@ KviUserListViewArea::KviUserListViewArea(KviUserListView * par)
: TQWidget(par)
{
m_pListView = par;
-#ifdef COMPILE_USE_QT4
- setAutoFillBackground(false);
-#else
setBackgroundMode(TQWidget::NoBackground);
-#endif
-#ifdef COMPILE_USE_QT4
- m_pScrollBar = new TQScrollBar(Qt::Vertical,this,"scrollbar");
-#else
m_pScrollBar = new TQScrollBar(Qt::Vertical,this,"scrollbar");
-#endif
m_pScrollBar->setRange(0,0);
m_pScrollBar->setValue(0);
connect(m_pScrollBar,TQT_SIGNAL(valueChanged(int)),this,TQT_SLOT(scrollBarMoved(int)));
@@ -1421,9 +1413,6 @@ void KviUserListViewArea::paintEvent(TQPaintEvent *ev)
SET_ANTI_ALIASING(p);
p.setFont(KVI_OPTION_FONT(KviOption_fontUserListView));
-#ifdef COMPILE_USE_QT4
- TQFontMetrics fm(p.fontMetrics());
-#endif
#ifdef COMPILE_PSEUDO_TRANSPARENCY
if(g_pShadedChildGlobalDesktopBackground)
@@ -1516,11 +1505,7 @@ void KviUserListViewArea::paintEvent(TQPaintEvent *ev)
case KVI_USERLISTVIEW_GRIDTYPE_PLAINGRID:
case KVI_USERLISTVIEW_GRIDTYPE_DOTGRID:
p.setPen(TQPen(KVI_OPTION_COLOR(KviOption_colorUserListViewGrid),0,
-#ifdef COMPILE_USE_QT4
- (KVI_OPTION_UINT(KviOption_uintUserListViewGridType) == KVI_USERLISTVIEW_GRIDTYPE_DOTGRID) ? TQt::DotLine : TQt::SolidLine));
-#else
(KVI_OPTION_UINT(KviOption_uintUserListViewGridType) == KVI_USERLISTVIEW_GRIDTYPE_DOTGRID) ? TQPen::DotLine : TQPen::SolidLine));
-#endif
p.drawLine(0,bottom - 1,wdth,bottom - 1);
if(bShowState || bShowIcons)
p.drawLine(iAvatarAndTextX,bottom - 1,iAvatarAndTextX,theY);
@@ -1683,18 +1668,10 @@ void KviUserListViewArea::paintEvent(TQPaintEvent *ev)
KVI_SMALLICON_VOICE : KVI_SMALLICON_USEROP)))) \
) \
);
-#ifdef COMPILE_USE_QT4
- p.drawPixmap(theX,theY+(fm.lineSpacing()-16/*size of small icon*/)/2,*ico);
-#else
p.drawPixmap(theX,theY+(m_pListView->m_iFontHeight-16/*size of small icon*/)/2,*ico);
-#endif
}
theX +=18;
-#ifdef COMPILE_USE_QT4
- p.drawText(iAvatarAndTextX,theY,wdth - theX,fm.lineSpacing(),TQt::AlignLeft|TQt::AlignVCenter,e->m_szNick);
-#else
p.drawText(iAvatarAndTextX,theY,wdth - theX,m_pListView->m_iFontHeight,TQt::AlignLeft|TQt::AlignVCenter,e->m_szNick);
-#endif
} else {
char flag = m_pListView->getUserFlag(e);
@@ -1702,17 +1679,9 @@ void KviUserListViewArea::paintEvent(TQPaintEvent *ev)
{
TQString ttt = TQChar(flag);
ttt += e->m_szNick;
-#ifdef COMPILE_USE_QT4
- p.drawText(iAvatarAndTextX,theY,wdth - theX,fm.lineSpacing(),TQt::AlignLeft|TQt::AlignVCenter,ttt);
-#else
p.drawText(iAvatarAndTextX,theY,wdth - theX,m_pListView->m_iFontHeight,TQt::AlignLeft|TQt::AlignVCenter,ttt);
-#endif
} else {
-#ifdef COMPILE_USE_QT4
- p.drawText(iAvatarAndTextX,theY,wdth - theX,fm.lineSpacing(),TQt::AlignLeft|TQt::AlignVCenter,e->m_szNick);
-#else
p.drawText(iAvatarAndTextX,theY,wdth - theX,m_pListView->m_iFontHeight,TQt::AlignLeft|TQt::AlignVCenter,e->m_szNick);
-#endif
}
}
if(bColorAllocated) delete pClrFore;
@@ -1732,12 +1701,7 @@ void KviUserListViewArea::paintEvent(TQPaintEvent *ev)
//p.drawLine(1,height()-1,wdth,height()-1);
//p.drawLine(wdth - 1,1,wdth - 1,height());
-#ifdef COMPILE_USE_QT4
- TQPainter qt4SuxBecauseOfThisAdditionalPainter(this);
- qt4SuxBecauseOfThisAdditionalPainter.drawPixmap(r.left(),r.top(),r.width(),r.height(),*pMemBuffer,r.left(),r.top(),r.width(),r.height());
-#else
bitBlt(TQT_TQPAINTDEVICE(this),r.left(),r.top(),TQT_TQPAINTDEVICE(pMemBuffer),r.left(),r.top(),r.width(),r.height(),TQt::CopyROP,false);
-#endif
}
void KviUserListViewArea::resizeEvent(TQResizeEvent *)
@@ -1958,15 +1922,7 @@ void KviUserListViewArea::mouseReleaseEvent(TQMouseEvent *)
void KviUserListViewArea::wheelEvent(TQWheelEvent *e)
{
-#ifdef COMPILE_USE_QT4
- static bool bHere = false; // TQt4(<= 4.2.2) has a nasty bug that makes the re-sent wheelEvent to cause infinite recursion
- if(bHere)return;
- bHere = true;
-#endif
g_pApp->sendEvent(m_pScrollBar,e);
-#ifdef COMPILE_USE_QT4
- bHere = false;
-#endif
}
#include "kvi_userlistview.moc"