diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-05-27 19:21:21 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-05-27 19:21:21 +0000 |
commit | d8cc8bdfa7fa624a526d5aa1626974e1444cb799 (patch) | |
tree | f295f1c545b319963d5357af79fe08991d8141d9 /src/k3bsplash.cpp | |
parent | 2a39a080579fb52a2599c02b2939795385b89093 (diff) | |
download | k3b-d8cc8bdfa7fa624a526d5aa1626974e1444cb799.tar.gz k3b-d8cc8bdfa7fa624a526d5aa1626974e1444cb799.zip |
TQt4 port k3b
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/k3b@1233803 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/k3bsplash.cpp')
-rw-r--r-- | src/k3bsplash.cpp | 72 |
1 files changed, 36 insertions, 36 deletions
diff --git a/src/k3bsplash.cpp b/src/k3bsplash.cpp index dc49bf5..ff39d85 100644 --- a/src/k3bsplash.cpp +++ b/src/k3bsplash.cpp @@ -18,21 +18,21 @@ #include <k3bthememanager.h> #include <k3bapplication.h> -#include <qapplication.h> -#include <qlabel.h> -#include <qpixmap.h> -#include <qevent.h> -#include <qstring.h> -#include <qfontmetrics.h> -#include <qpainter.h> +#include <tqapplication.h> +#include <tqlabel.h> +#include <tqpixmap.h> +#include <tqevent.h> +#include <tqstring.h> +#include <tqfontmetrics.h> +#include <tqpainter.h> #include <kstandarddirs.h> #include <kapplication.h> #include <kaboutdata.h> -K3bSplash::K3bSplash( QWidget* parent, const char* name ) - : QVBox( parent, name, +K3bSplash::K3bSplash( TQWidget* tqparent, const char* name ) + : TQVBox( tqparent, name, WStyle_Customize| WDestructiveClose| /* WStyle_Splash|*/ @@ -43,28 +43,28 @@ K3bSplash::K3bSplash( QWidget* parent, const char* name ) setMargin( 0 ); setSpacing( 0 ); - QLabel* copyrightLabel = new QLabel( kapp->aboutData()->copyrightStatement(), this ); + TQLabel* copyrightLabel = new TQLabel( kapp->aboutData()->copyrightStatement(), this ); copyrightLabel->setMargin( 5 ); copyrightLabel->setPaletteBackgroundColor( black ); copyrightLabel->setPaletteForegroundColor( white ); - copyrightLabel->setAlignment( AlignRight ); + copyrightLabel->tqsetAlignment( AlignRight ); - QLabel* picLabel = new QLabel( this ); + TQLabel* picLabel = new TQLabel( this ); if( K3bTheme* theme = k3bappcore->themeManager()->currentTheme() ) { picLabel->setPaletteBackgroundColor( theme->backgroundColor() ); picLabel->setPixmap( theme->pixmap( K3bTheme::SPLASH ) ); } - m_infoBox = new QLabel( this ); + m_infoBox = new TQLabel( this ); m_infoBox->setMargin( 5 ); m_infoBox->setPaletteBackgroundColor( black ); m_infoBox->setPaletteForegroundColor( white ); - // Set geometry, with support for Xinerama systems - QRect r; - r.setSize(sizeHint()); - int ps = QApplication::desktop()->primaryScreen(); - r.moveCenter( QApplication::desktop()->screenGeometry(ps).center() ); + // Set tqgeometry, with support for Xinerama systems + TQRect r; + r.setSize(tqsizeHint()); + int ps = TQApplication::desktop()->primaryScreen(); + r.moveCenter( TQApplication::desktop()->screenGeometry(ps).center() ); setGeometry(r); } @@ -74,7 +74,7 @@ K3bSplash::~K3bSplash() } -void K3bSplash::mousePressEvent( QMouseEvent* ) +void K3bSplash::mousePressEvent( TQMouseEvent* ) { close(); } @@ -82,47 +82,47 @@ void K3bSplash::mousePressEvent( QMouseEvent* ) void K3bSplash::show() { - QVBox::show(); + TQVBox::show(); // make sure the splash screen is shown immediately - qApp->processEvents(); + tqApp->processEvents(); } -void K3bSplash::addInfo( const QString& s ) +void K3bSplash::addInfo( const TQString& s ) { m_infoBox->setText( s ); - qApp->processEvents(); + tqApp->processEvents(); } -// void K3bSplash::paintEvent( QPaintEvent* e ) +// void K3bSplash::paintEvent( TQPaintEvent* e ) // { // // first let the window paint the background and the child widget -// QWidget::paintEvent( e ); +// TQWidget::paintEvent( e ); // // now create the text we want to display // // find the lower left corner and paint it on top of the pixmap -// QPainter p( this ); -// p.setPen( Qt::blue ); +// TQPainter p( this ); +// p.setPen( TQt::blue ); -// QFontMetrics fm = p.fontMetrics(); +// TQFontMetrics fm = p.fontMetrics(); -// QString line1 = QString( "K3b version %1" ).arg(VERSION); -// QString line2( "(c) 2001 by Sebastian Trueg" ); -// QString line3( "licenced under the GPL" ); +// TQString line1 = TQString( "K3b version %1" ).tqarg(VERSION); +// TQString line2( "(c) 2001 by Sebastian Trueg" ); +// TQString line3( "licenced under the GPL" ); -// QRect rect1 = fm.boundingRect( line1 ); -// QRect rect2 = fm.boundingRect( line2 ); -// QRect rect3 = fm.boundingRect( line3 ); +// TQRect rect1 = fm.boundingRect( line1 ); +// TQRect rect2 = fm.boundingRect( line2 ); +// TQRect rect3 = fm.boundingRect( line3 ); // int textH = rect1.height() + rect2.height() + rect3.height() + 2 * fm.leading() + 2 + rect2.height() /*hack because the boundingRect method seems not to work properly! :-(*/; -// int textW = QMAX( rect1.width(), QMAX( rect2.width(), rect3.width() ) ) + 2; +// int textW = TQMAX( rect1.width(), TQMAX( rect2.width(), rect3.width() ) ) + 2; // int startX = 10; // int startY = height() - 10 - textH; -// p.drawText( startX, startY, textW, textH, 0, QString("%1\n%2\n%3").arg(line1).arg(line2).arg(line3) ); +// p.drawText( startX, startY, textW, textH, 0, TQString("%1\n%2\n%3").tqarg(line1).tqarg(line2).tqarg(line3) ); // } |