From fecb0e67b23e8b83ba7fc881bb57bc48c0852d62 Mon Sep 17 00:00:00 2001 From: tpearson Date: Tue, 5 Jul 2011 06:00:29 +0000 Subject: TQt4 port kmymoney This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kmymoney@1239855 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kmymoney2/widgets/kmymoneytitlelabel.cpp | 38 ++++++++++++++++---------------- 1 file changed, 19 insertions(+), 19 deletions(-) (limited to 'kmymoney2/widgets/kmymoneytitlelabel.cpp') diff --git a/kmymoney2/widgets/kmymoneytitlelabel.cpp b/kmymoney2/widgets/kmymoneytitlelabel.cpp index 9dc5140..bad8a77 100644 --- a/kmymoney2/widgets/kmymoneytitlelabel.cpp +++ b/kmymoney2/widgets/kmymoneytitlelabel.cpp @@ -18,10 +18,10 @@ // ---------------------------------------------------------------------------- // QT Includes -#include -#include -#include -#include +#include +#include +#include +#include // ---------------------------------------------------------------------------- // KDE Includes @@ -36,8 +36,8 @@ #include "kmymoneytitlelabel.h" -KMyMoneyTitleLabel::KMyMoneyTitleLabel(QWidget *parent, const char *name) : - QLabel(parent, name), +KMyMoneyTitleLabel::KMyMoneyTitleLabel(TQWidget *tqparent, const char *name) : + TQLabel(tqparent, name), m_bgColor( KGlobalSettings::highlightColor() ), m_textColor( KGlobalSettings::highlightedTextColor() ) { @@ -48,18 +48,18 @@ KMyMoneyTitleLabel::~KMyMoneyTitleLabel() { } -void KMyMoneyTitleLabel::setLeftImageFile(const QString& _file) +void KMyMoneyTitleLabel::setLeftImageFile(const TQString& _file) { m_leftImageFile = _file; - QString lfullpath = KGlobal::dirs()->findResource("appdata", m_leftImageFile); + TQString lfullpath = KGlobal::dirs()->findResource("appdata", m_leftImageFile); m_leftImage.load(lfullpath); m_leftImage.setAlphaBuffer(true); } -void KMyMoneyTitleLabel::setRightImageFile(const QString& _file) +void KMyMoneyTitleLabel::setRightImageFile(const TQString& _file) { m_rightImageFile = _file; - QString rfullpath = KGlobal::dirs()->findResource("appdata", m_rightImageFile); + TQString rfullpath = KGlobal::dirs()->findResource("appdata", m_rightImageFile); m_rightImage.load(rfullpath); m_rightImage.setAlphaBuffer(true); if(m_rightImage.height() < 30) @@ -70,32 +70,32 @@ void KMyMoneyTitleLabel::setRightImageFile(const QString& _file) } } -void KMyMoneyTitleLabel::resizeEvent ( QResizeEvent * ) +void KMyMoneyTitleLabel::resizeEvent ( TQResizeEvent * ) { - QRect cr = contentsRect(); - QImage output( cr.width(), cr.height(), 32 ); + TQRect cr = contentsRect(); + TQImage output( cr.width(), cr.height(), 32 ); output.fill( m_bgColor.rgb() ); bitBlt ( &output, cr.width() - m_rightImage.width(), 0, &m_rightImage, 0, 0, m_rightImage.width(), m_rightImage.height(), 0 ); bitBlt ( &output, 0, 0, &m_leftImage, 0, 0, m_leftImage.width(), m_leftImage.height(), 0 ); - QPixmap pix; + TQPixmap pix; pix.convertFromImage(output); setPixmap(pix); setMinimumWidth( m_rightImage.width() ); } -void KMyMoneyTitleLabel::drawContents(QPainter *p) +void KMyMoneyTitleLabel::drawContents(TQPainter *p) { // first draw pixmap - QLabel::drawContents(p); + TQLabel::drawContents(p); // then draw text on top - style().drawItem( p, contentsRect(), alignment(), colorGroup(), isEnabled(), - 0, QString(" ")+m_text, -1, &m_textColor ); + tqstyle().drawItem( p, contentsRect(), tqalignment(), tqcolorGroup(), isEnabled(), + 0, TQString(" ")+m_text, -1, &m_textColor ); } -void KMyMoneyTitleLabel::setText(const QString& txt) +void KMyMoneyTitleLabel::setText(const TQString& txt) { m_text = txt; update(); -- cgit v1.2.3