summaryrefslogtreecommitdiffstats
path: root/kopete/libkopete/webcamwidget.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:48:06 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:48:06 +0000
commit47c8a359c5276062c4bc17f0e82410f29081b502 (patch)
tree2d54a5f60a5b74067632f9ef6df58c2bc38155e6 /kopete/libkopete/webcamwidget.cpp
parent6f82532777a35e0e60bbd2b290b2e93e646f349b (diff)
downloadtdenetwork-47c8a359c5276062c4bc17f0e82410f29081b502.tar.gz
tdenetwork-47c8a359c5276062c4bc17f0e82410f29081b502.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1157648 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
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);
}