summaryrefslogtreecommitdiffstats
path: root/kopete/libkopete/webcamwidget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kopete/libkopete/webcamwidget.cpp')
-rw-r--r--kopete/libkopete/webcamwidget.cpp36
1 files changed, 18 insertions, 18 deletions
diff --git a/kopete/libkopete/webcamwidget.cpp b/kopete/libkopete/webcamwidget.cpp
index ae617ad5..ad701b8e 100644
--- a/kopete/libkopete/webcamwidget.cpp
+++ b/kopete/libkopete/webcamwidget.cpp
@@ -16,15 +16,15 @@
#include "webcamwidget.h"
-#include <qcolor.h>
-#include <qpainter.h>
+#include <tqcolor.h>
+#include <tqpainter.h>
#include <kdebug.h>
namespace Kopete
{
-WebcamWidget::WebcamWidget( QWidget* parent, const char* name )
-: QWidget( parent, name )
+WebcamWidget::WebcamWidget( TQWidget* parent, const char* name )
+: TQWidget( parent, name )
{
clear();
}
@@ -34,12 +34,12 @@ WebcamWidget::~WebcamWidget()
// don't do anything either
}
-void WebcamWidget::updatePixmap(const QPixmap& pixmap)
+void WebcamWidget::updatePixmap(const TQPixmap& pixmap)
{
mPixmap = pixmap;
mText = "";
- QPaintEvent *ev = new QPaintEvent( rect(), true );
+ TQPaintEvent *ev = new TQPaintEvent( rect(), true );
paintEvent( ev );
delete ev;
}
@@ -50,24 +50,24 @@ void WebcamWidget::clear()
if (!mPixmap.isNull())
mPixmap.resize(0,0);
- QPaintEvent *ev = new QPaintEvent( rect(), true );
+ TQPaintEvent *ev = new TQPaintEvent( rect(), true );
paintEvent( ev );
delete ev;
}
-void WebcamWidget::setText(const QString& text)
+void WebcamWidget::setText(const TQString& text)
{
mText = text;
// for now redraw everything
- QPaintEvent *ev = new QPaintEvent( rect(), true );
+ TQPaintEvent *ev = new TQPaintEvent( rect(), true );
paintEvent( ev );
delete ev;
}
-void WebcamWidget::paintEvent( QPaintEvent* event )
+void WebcamWidget::paintEvent( TQPaintEvent* event )
{
- QMemArray<QRect> rects = event->region().rects();
+ TQMemArray<TQRect> rects = event->region().rects();
if (!mPixmap.isNull())
{
@@ -80,23 +80,23 @@ void WebcamWidget::paintEvent( QPaintEvent* event )
{
for (unsigned int i = 0; i < rects.count(); ++i)
{
- QColor bgColor = paletteBackgroundColor();
- QPainter p(this);
+ TQColor bgColor = paletteBackgroundColor();
+ TQPainter p(this);
p.fillRect(rects[i], bgColor);
}
}
// TODO: draw the text
- QPainter p(this);
- QRect r = p.boundingRect(rect(), Qt::AlignCenter | Qt::WordBreak, mText );
+ TQPainter p(this);
+ TQRect r = p.boundingRect(rect(), Qt::AlignCenter | Qt::WordBreak, mText );
if ( !mText.isEmpty() && event->rect().intersects(r))
{
p.setPen(Qt::black);
- QRect rec = rect();
- rec.moveTopLeft(QPoint(1,1));
+ TQRect rec = rect();
+ rec.moveTopLeft(TQPoint(1,1));
p.drawText(rec, Qt::AlignCenter | Qt::WordBreak, mText, -1);
- rec.moveTopLeft(QPoint(-1,-1));
+ rec.moveTopLeft(TQPoint(-1,-1));
p.setPen(Qt::white);
p.drawText(rec, Qt::AlignCenter | Qt::WordBreak, mText, -1);
}