summaryrefslogtreecommitdiffstats
path: root/src/kvirc/ui/kvi_ircview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/kvirc/ui/kvi_ircview.cpp')
-rw-r--r--src/kvirc/ui/kvi_ircview.cpp57
1 files changed, 0 insertions, 57 deletions
diff --git a/src/kvirc/ui/kvi_ircview.cpp b/src/kvirc/ui/kvi_ircview.cpp
index 4cb5425..af2da64 100644
--- a/src/kvirc/ui/kvi_ircview.cpp
+++ b/src/kvirc/ui/kvi_ircview.cpp
@@ -135,10 +135,6 @@
#include <time.h>
-#ifdef COMPILE_USE_QT4
- #include <tq3mimefactory.h>
- #define TQMimeSourceFactory Q3MimeSourceFactory
-#endif
#ifdef COMPILE_ON_WINDOWS
@@ -280,11 +276,6 @@ KviIrcView::KviIrcView(TQWidget *parent,KviFrame *pFrm,KviWindow *pWnd)
// Ok...here we go
// initialize the initializable
-#ifdef COMPILE_USE_QT4
- setAttribute(TQt::WA_NoSystemBackground); // This disables automatic qt double buffering
- setAttribute(TQt::WA_OpaquePaintEvent);
- //setAttribute(TQt::WA_PaintOnScreen); // disable qt backing store (that would force us to trigger repaint() instead of the 10 times faster paintEvent(0))
-#endif
m_iFlushTimer = 0;
m_pToolsPopup = 0;
@@ -340,22 +331,14 @@ KviIrcView::KviIrcView(TQWidget *parent,KviFrame *pFrm,KviWindow *pWnd)
m_pMessagesStoppedWhileSelecting->setAutoDelete(false);
// say qt to avoid erasing on repaint
-#ifdef COMPILE_USE_QT4
- setAutoFillBackground(false);
-#else
setBackgroundMode(NoBackground);
-#endif
m_pFm = 0; // will be updated in the first paint event
m_pToolTip = new KviIrcViewToolTip(this);
// Create the scroll bar
-#ifdef COMPILE_USE_QT4
- m_pScrollBar = new TQScrollBar(0,0,1,10,0,Qt::Vertical,this,"irc_view_scrollbar");
-#else
m_pScrollBar = new TQScrollBar(0,0,1,10,0,Qt::Vertical,this,"irc_view_scrollbar");
-#endif
m_pScrollBar->setTracking(true);
m_pScrollBar->show();
@@ -363,12 +346,7 @@ KviIrcView::KviIrcView(TQWidget *parent,KviFrame *pFrm,KviWindow *pWnd)
m_pToolsButton = new KviStyledToolButton(this,"btntools");
-#ifdef COMPILE_USE_QT4
- TQIcon is1(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_POPUPMENU)));
- m_pToolsButton->setAutoRaise(true);
-#else
TQIconSet is1(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_POPUPMENU)),TQIconSet::Small);
-#endif
m_pToolsButton->setIconSet(is1);
KviTalToolTip::add(m_pToolsButton,__tr2qs("Search tools"));
@@ -914,15 +892,7 @@ bool KviIrcView::event(TQEvent *e)
void KviIrcView::wheelEvent(TQWheelEvent *e)
{
-#ifdef COMPILE_USE_QT4
- static bool bHere = false;
- if(bHere)return;
- bHere = true; // TQt4 tends to jump into infinite recursion here
-#endif
g_pApp->sendEvent(m_pScrollBar,e);
-#ifdef COMPILE_USE_QT4
- bHere = false;
-#endif
}
@@ -2739,9 +2709,6 @@ void KviIrcView::fastScroll(int lines)
} else lines = 0;
}
-#ifdef COMPILE_USE_QT4
- scroll(0,-(heightToPaint-1),TQRect(1,1,widgetWidth-2,widgetHeight-2));
-#else
bitBlt(this,1,1,this,1,heightToPaint,widgetWidth -2,widgetHeight - (heightToPaint + KVI_IRCVIEW_VERTICAL_BORDER));
TQRect r(0,widgetHeight - (heightToPaint + KVI_IRCVIEW_VERTICAL_BORDER),
@@ -2750,7 +2717,6 @@ void KviIrcView::fastScroll(int lines)
TQPaintEvent * e = new TQPaintEvent(r);
paintEvent(e);
delete e;
-#endif
if(m_iLastLinkRectHeight > -1)
{
@@ -2819,14 +2785,10 @@ void KviIrcView::paintEvent(TQPaintEvent *p)
int rectWidth = r.width();
if(rectWidth > widgetWidth)rectWidth = widgetWidth;
-#ifdef COMPILE_USE_QT4
- TQPainter pa(this); // we use qt4 double buffering
-#else
KviDoubleBuffer doublebuffer(width(),height());
TQPixmap * pDoubleBufferPixmap = doublebuffer.pixmap();
TQPainter pa(pDoubleBufferPixmap);
-#endif
SET_ANTI_ALIASING(pa);
pa.setFont(font());
@@ -3325,17 +3287,9 @@ no_selection_paint:
{
// paint the cursor line
int iH = lineWrapsHeight + m_iFontLineSpacing;
-#ifdef COMPILE_USE_QT4
- pa.setCompositionMode(TQPainter::CompositionMode_SourceOut);
-#else
pa.setRasterOp(NotROP);
-#endif
pa.fillRect(0,curBottomCoord - iH,widgetWidth,iH + (m_iFontDescent << 1),TQt::black);
-#ifdef COMPILE_USE_QT4
- pa.setCompositionMode(TQPainter::CompositionMode_SourceOver);
-#else
pa.setRasterOp(CopyROP);
-#endif
}
if(m_bMouseIsDown)
@@ -3357,11 +3311,7 @@ no_selection_paint:
// visible!
bLineMarkPainted = true;
//pa.setRasterOp(NotROP);
-#ifdef COMPILE_USE_QT4
- pa.setPen(TQPen(KVI_OPTION_COLOR(KviOption_colorIrcViewMarkLine),1,TQt::DotLine));
-#else
pa.setPen(TQPen(KVI_OPTION_COLOR(KviOption_colorIrcViewMarkLine),1,TQPen::DotLine));
-#endif
pa.drawLine(0,curBottomCoord,widgetWidth,curBottomCoord);
//pa.setRasterOp(CopyROP);
} // else was partially visible only
@@ -3403,11 +3353,7 @@ no_selection_paint:
// need to mark it!
//pa.setRasterOp(NotROP);
//pa.setPen(TQt::black);
-#ifdef COMPILE_USE_QT4
- pa.setPen(TQPen(KVI_OPTION_COLOR(KviOption_colorIrcViewMarkLine),1,TQt::DotLine));
-#else
pa.setPen(TQPen(KVI_OPTION_COLOR(KviOption_colorIrcViewMarkLine),1,TQPen::DotLine));
-#endif
int x = widgetWidth - 8;
int y = KVI_IRCVIEW_VERTICAL_BORDER;
pa.drawLine(x,y,x,y);
@@ -3430,10 +3376,7 @@ no_selection_paint:
pa.drawLine(widgetWidth,1,widgetWidth,widgetHeight);
// COPY TO THE DISPLAY
-#ifndef COMPILE_USE_QT4
bitBlt(this,rectLeft,rectTop,pDoubleBufferPixmap,rectLeft,rectTop,rectWidth,rectHeight,TQt::CopyROP);
-#endif
-// else we use the TQt4 native double buffering
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////