diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:53:50 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:53:50 +0000 |
commit | 7be55ffa061c026e35e2d6a0effe1161ddb0d41f (patch) | |
tree | 8474f9b444b2756228600050f07a7ff25de532b2 /kontact/interfaces/summary.cpp | |
parent | f587f20a6d09f1729dd0a8c1cd8ee0110aec7451 (diff) | |
download | tdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.tar.gz tdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1157655 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kontact/interfaces/summary.cpp')
-rw-r--r-- | kontact/interfaces/summary.cpp | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/kontact/interfaces/summary.cpp b/kontact/interfaces/summary.cpp index f4e38771d..da978d6e2 100644 --- a/kontact/interfaces/summary.cpp +++ b/kontact/interfaces/summary.cpp @@ -22,20 +22,20 @@ #include "summary.h" -#include <qimage.h> -#include <qdragobject.h> -#include <qhbox.h> -#include <qfont.h> -#include <qlabel.h> -#include <qpainter.h> +#include <tqimage.h> +#include <tqdragobject.h> +#include <tqhbox.h> +#include <tqfont.h> +#include <tqlabel.h> +#include <tqpainter.h> #include <kiconloader.h> #include <kdialog.h> using namespace Kontact; -Summary::Summary( QWidget *parent, const char *name ) - : QWidget( parent, name ) +Summary::Summary( TQWidget *parent, const char *name ) + : TQWidget( parent, name ) { setAcceptDrops( true ); } @@ -44,22 +44,22 @@ Summary::~Summary() { } -QWidget* Summary::createHeader(QWidget *parent, const QPixmap& icon, const QString& heading) +TQWidget* Summary::createHeader(TQWidget *parent, const TQPixmap& icon, const TQString& heading) { - QHBox* hbox = new QHBox( parent ); + TQHBox* hbox = new TQHBox( parent ); hbox->setMargin( 2 ); - QFont boldFont; + TQFont boldFont; boldFont.setBold( true ); boldFont.setPointSize( boldFont.pointSize() + 2 ); - QLabel *label = new QLabel( hbox ); + TQLabel *label = new TQLabel( hbox ); label->setPixmap( icon ); label->setFixedSize( label->sizeHint() ); label->setPaletteBackgroundColor( colorGroup().mid() ); label->setAcceptDrops( true ); - label = new QLabel( heading, hbox ); + label = new TQLabel( heading, hbox ); label->setAlignment( AlignLeft|AlignVCenter ); label->setIndent( KDialog::spacingHint() ); label->setFont( boldFont ); @@ -73,25 +73,25 @@ QWidget* Summary::createHeader(QWidget *parent, const QPixmap& icon, const QStri return hbox; } -void Summary::mousePressEvent( QMouseEvent *event ) +void Summary::mousePressEvent( TQMouseEvent *event ) { mDragStartPoint = event->pos(); - QWidget::mousePressEvent( event ); + TQWidget::mousePressEvent( event ); } -void Summary::mouseMoveEvent( QMouseEvent *event ) +void Summary::mouseMoveEvent( TQMouseEvent *event ) { if ( (event->state() & LeftButton) && (event->pos() - mDragStartPoint).manhattanLength() > 4 ) { - QDragObject *drag = new QTextDrag( "", this, "SummaryWidgetDrag" ); + TQDragObject *drag = new TQTextDrag( "", this, "SummaryWidgetDrag" ); - QPixmap pm = QPixmap::grabWidget( this ); + TQPixmap pm = TQPixmap::grabWidget( this ); if ( pm.width() > 300 ) - pm = pm.convertToImage().smoothScale( 300, 300, QImage::ScaleMin ); + pm = pm.convertToImage().smoothScale( 300, 300, TQImage::ScaleMin ); - QPainter painter; + TQPainter painter; painter.begin( &pm ); painter.setPen( Qt::gray ); painter.drawRect( 0, 0, pm.width(), pm.height() ); @@ -99,15 +99,15 @@ void Summary::mouseMoveEvent( QMouseEvent *event ) drag->setPixmap( pm ); drag->dragMove(); } else - QWidget::mouseMoveEvent( event ); + TQWidget::mouseMoveEvent( event ); } -void Summary::dragEnterEvent( QDragEnterEvent *event ) +void Summary::dragEnterEvent( TQDragEnterEvent *event ) { - event->accept( QTextDrag::canDecode( event ) ); + event->accept( TQTextDrag::canDecode( event ) ); } -void Summary::dropEvent( QDropEvent *event ) +void Summary::dropEvent( TQDropEvent *event ) { int alignment = (event->pos().y() < (height() / 2) ? Qt::AlignTop : Qt::AlignBottom); emit summaryWidgetDropped( this, event->source(), alignment ); |