diff options
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 ); |