diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:51:49 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:51:49 +0000 |
commit | 4ae0c208b66e0f7954e194384464fe2d0a2c56dd (patch) | |
tree | b0a7cd1c184f0003c0292eb416ed27f674f9cc43 /kbugbuster/gui/cwloadingwidget.cpp | |
parent | 1964ea0fb4ab57493ca2ebb709c8d3b5395fd653 (diff) | |
download | tdesdk-4ae0c208b66e0f7954e194384464fe2d0a2c56dd.tar.gz tdesdk-4ae0c208b66e0f7954e194384464fe2d0a2c56dd.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdesdk@1157652 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kbugbuster/gui/cwloadingwidget.cpp')
-rw-r--r-- | kbugbuster/gui/cwloadingwidget.cpp | 74 |
1 files changed, 37 insertions, 37 deletions
diff --git a/kbugbuster/gui/cwloadingwidget.cpp b/kbugbuster/gui/cwloadingwidget.cpp index ddd218a5..0c51241d 100644 --- a/kbugbuster/gui/cwloadingwidget.cpp +++ b/kbugbuster/gui/cwloadingwidget.cpp @@ -16,8 +16,8 @@ #include "cwloadingwidget.h" -#include <qpainter.h> -#include <qpixmap.h> +#include <tqpainter.h> +#include <tqpixmap.h> #include <kpixmap.h> #include <kpixmapeffect.h> @@ -27,16 +27,16 @@ using namespace KBugBusterMainWindow; -CWLoadingWidget::CWLoadingWidget( WidgetMode mode, QWidget *parent, +CWLoadingWidget::CWLoadingWidget( WidgetMode mode, TQWidget *parent, const char * name ) -: QFrame( parent, name ) +: TQFrame( parent, name ) { init( mode ); } -CWLoadingWidget::CWLoadingWidget( const QString &text, WidgetMode mode, - QWidget *parent, const char * name ) -: QFrame( parent, name ) +CWLoadingWidget::CWLoadingWidget( const TQString &text, WidgetMode mode, + TQWidget *parent, const char * name ) +: TQFrame( parent, name ) { init( mode ); setText( text ); @@ -46,13 +46,13 @@ void CWLoadingWidget::init( WidgetMode mode ) { m_mode = mode; - QPalette pal = palette(); - pal.setColor( QPalette::Active, QColorGroup::Background, - QColor( 49, 121, 173 ) ); - pal.setColor( QPalette::Inactive, QColorGroup::Background, - QColor( 49, 121, 173 ) ); - pal.setColor( QPalette::Disabled, QColorGroup::Background, - QColor( 49, 121, 173 ) ); + TQPalette pal = palette(); + pal.setColor( TQPalette::Active, TQColorGroup::Background, + TQColor( 49, 121, 173 ) ); + pal.setColor( TQPalette::Inactive, TQColorGroup::Background, + TQColor( 49, 121, 173 ) ); + pal.setColor( TQPalette::Disabled, TQColorGroup::Background, + TQColor( 49, 121, 173 ) ); setPalette( pal ); setFrameShape( StyledPanel ); @@ -65,25 +65,25 @@ void CWLoadingWidget::init( WidgetMode mode ) if( m_mode == TopFrame ) { m_logoPixmap = - new QPixmap( locate( "data", "kbugbuster/pics/logo.png" ) ); + new TQPixmap( locate( "data", "kbugbuster/pics/logo.png" ) ); m_topRightPixmap = - new QPixmap( locate( "data", "kbugbuster/pics/top-right.png" ) ); + new TQPixmap( locate( "data", "kbugbuster/pics/top-right.png" ) ); m_barsPixmap = - new QPixmap( locate( "data", "kbugbuster/pics/bars.png" ) ); + new TQPixmap( locate( "data", "kbugbuster/pics/bars.png" ) ); m_toolsPixmap = 0L; m_toolsPixmapEffect = 0L; } else { m_toolsPixmap = - new QPixmap( locate( "data", "kbugbuster/pics/tools.png" ) ); + new TQPixmap( locate( "data", "kbugbuster/pics/tools.png" ) ); m_toolsPixmapEffect = new KPixmap( m_toolsPixmap->size() ); - QPainter pb; + TQPainter pb; pb.begin( m_toolsPixmapEffect ); pb.fillRect( 0, 0, m_toolsPixmap->width(), m_toolsPixmap->height(), - QBrush( QColor( 49, 121, 172 ) ) ); + TQBrush( TQColor( 49, 121, 172 ) ) ); pb.drawPixmap( 0, 0, *m_toolsPixmap ); pb.end(); @@ -98,12 +98,12 @@ void CWLoadingWidget::init( WidgetMode mode ) m_buffer = new QPixmap; } -void CWLoadingWidget::resizeEvent( QResizeEvent * ) +void CWLoadingWidget::resizeEvent( TQResizeEvent * ) { updatePixmap(); } -void CWLoadingWidget::setText( const QString &text ) +void CWLoadingWidget::setText( const TQString &text ) { m_text = text; updatePixmap(); @@ -112,21 +112,21 @@ void CWLoadingWidget::setText( const QString &text ) void CWLoadingWidget::updatePixmap() { - QRect cr = contentsRect(); + TQRect cr = contentsRect(); cr.setWidth( cr.width() + 2 ); cr.setHeight( cr.height() + 2 ); m_buffer->resize( cr.width(), cr.height() ); - QPainter p( m_buffer ); + TQPainter p( m_buffer ); // fill background p.fillRect( 0, 0, cr.width(), cr.height(), - QBrush( QColor( 49, 121, 173 ) ) ); + TQBrush( TQColor( 49, 121, 173 ) ) ); if( m_mode == TopFrame ) { - QFont bigFont = QFont( KGlobalSettings::generalFont().family(), - 28, QFont::Bold, true ); + TQFont bigFont = TQFont( KGlobalSettings::generalFont().family(), + 28, TQFont::Bold, true ); int xoffset = m_logoPixmap->width(); @@ -146,7 +146,7 @@ void CWLoadingWidget::updatePixmap() AlignAuto | AlignVCenter, m_text ); // Draw intro text - QString desc = i18n( "Welcome to KBugBuster, a tool to manage the " + TQString desc = i18n( "Welcome to KBugBuster, a tool to manage the " "KDE Bug Report System. With KBugBuster you can " "manage outstanding bug reports for KDE from a " "convenient front end." ); @@ -155,9 +155,9 @@ void CWLoadingWidget::updatePixmap() AlignAuto | AlignVCenter | WordBreak, desc ); // Draw the caption text - QString caption = i18n( "KBugBuster" ); + TQString caption = i18n( "KBugBuster" ); p.setFont( bigFont ); - p.setPen( QColor(139, 183, 222) ); + p.setPen( TQColor(139, 183, 222) ); p.drawText( 220, 60, caption ); p.setPen( black ); p.drawText( 217, 57, caption ); @@ -189,11 +189,11 @@ void CWLoadingWidget::updatePixmap() if( boxW > 500 ) boxW = 500; - QRect br = fontMetrics().boundingRect( boxX, boxY, + TQRect br = fontMetrics().boundingRect( boxX, boxY, boxW, cr.height() - boxY - 10 - 2 * fheight, AlignAuto | AlignTop | WordBreak, m_text ); - QRect box = br; + TQRect box = br; box.setHeight( box.height() + 2 * fheight ); box.setWidth( box.width() + 2 * 10 ); if( box.width() < cr.width() - 2 * boxX ) @@ -202,7 +202,7 @@ void CWLoadingWidget::updatePixmap() box.setHeight( QMIN( cr.height() - boxY - 2 * fheight - 10, 100 ) ); p.setClipRect( box ); - p.fillRect( box, QBrush( QColor( 204, 222, 234 ) ) ); + p.fillRect( box, TQBrush( TQColor( 204, 222, 234 ) ) ); p.drawPixmap( toolsEffectX, toolsEffectY, *m_toolsPixmapEffect ); p.setViewport( box ); @@ -237,17 +237,17 @@ CWLoadingWidget::~CWLoadingWidget() m_buffer = 0L; } -void CWLoadingWidget::mouseReleaseEvent( QMouseEvent * ) +void CWLoadingWidget::mouseReleaseEvent( TQMouseEvent * ) { emit clicked(); } -void CWLoadingWidget::drawContents( QPainter *p ) +void CWLoadingWidget::drawContents( TQPainter *p ) { if( !m_buffer || m_buffer->isNull() ) - p->fillRect( contentsRect(), QBrush( QColor( 255, 121, 172 ) ) ); + p->fillRect( contentsRect(), TQBrush( TQColor( 255, 121, 172 ) ) ); else - p->drawPixmap( QPoint( contentsRect().x(), contentsRect().y()), + p->drawPixmap( TQPoint( contentsRect().x(), contentsRect().y()), *m_buffer, contentsRect() ); } |