From 252b74ae40311e7e3e2ba9f4d4a0ebf2ead24472 Mon Sep 17 00:00:00 2001 From: tpearson Date: Tue, 17 May 2011 20:54:59 +0000 Subject: TQt4 port libkipi This enables compilation under Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/libraries/libkipi@1232471 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- libkipi/libkipi/batchprogressdialog.cpp | 98 ++++++++++++++++----------------- 1 file changed, 49 insertions(+), 49 deletions(-) (limited to 'libkipi/libkipi/batchprogressdialog.cpp') diff --git a/libkipi/libkipi/batchprogressdialog.cpp b/libkipi/libkipi/batchprogressdialog.cpp index f516059..9ad9ad2 100644 --- a/libkipi/libkipi/batchprogressdialog.cpp +++ b/libkipi/libkipi/batchprogressdialog.cpp @@ -21,24 +21,24 @@ ////////////////////////////////////////////////////////////////////////////// -// Include files for Qt - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +// Include files for TQt + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include // Include files for KDE @@ -72,8 +72,8 @@ namespace KIPI class BatchProgressItem : public KListViewItem { public: - BatchProgressItem(KListView * parent, QListViewItem *after, const QString &message, int messageType) - : KListViewItem( parent, after), m_messagetype(messageType) + BatchProgressItem(KListView * tqparent, TQListViewItem *after, const TQString &message, int messageType) + : KListViewItem( tqparent, after), m_messagetype(messageType) { // Set the icon. @@ -106,25 +106,25 @@ public: private: int m_messagetype; - void paintCell (QPainter *p, const QColorGroup &cg, int column, int width, int alignment) + void paintCell (TQPainter *p, const TQColorGroup &cg, int column, int width, int tqalignment) { - QColorGroup _cg( cg ); + TQColorGroup _cg( cg ); if ( m_messagetype == KIPI::ErrorMessage ) { - _cg.setColor( QColorGroup::Text, Qt::red ); - KListViewItem::paintCell( p, _cg, column, width, alignment ); + _cg.setColor( TQColorGroup::Text, TQt::red ); + KListViewItem::paintCell( p, _cg, column, width, tqalignment ); return; } if ( m_messagetype == KIPI::WarningMessage ) { - _cg.setColor( QColorGroup::Text, Qt::darkYellow ); - KListViewItem::paintCell( p, _cg, column, width, alignment ); + _cg.setColor( TQColorGroup::Text, TQt::darkYellow ); + KListViewItem::paintCell( p, _cg, column, width, tqalignment ); return; } - KListViewItem::paintCell( p, cg, column, width, alignment ); + KListViewItem::paintCell( p, cg, column, width, tqalignment ); } }; @@ -135,53 +135,53 @@ struct BatchProgressDialog::Private { /////////////////////////////////// CONSTRUCTOR //////////////////////////////////////////// -BatchProgressDialog::BatchProgressDialog( QWidget *parent, const QString &caption ) - : KDialogBase( parent, "KIPIBatchProgressDialog", true /* modal */, +BatchProgressDialog::BatchProgressDialog( TQWidget *tqparent, const TQString &caption ) + : KDialogBase( tqparent, "KIPIBatchProgressDialog", true /* modal */, caption, Cancel) { d = new Private; - QWidget* box = makeVBoxMainWidget(); + TQWidget* box = makeVBoxMainWidget(); //--------------------------------------------- - QFrame *headerFrame = new QFrame( box ); - headerFrame->setFrameStyle(QFrame::Panel|QFrame::Sunken); - QHBoxLayout* layout = new QHBoxLayout( headerFrame ); - layout->setMargin( 2 ); // to make sure the frame gets displayed - layout->setSpacing( 0 ); - QLabel *pixmapLabelLeft = new QLabel( headerFrame, "pixmapLabelLeft" ); + TQFrame *headerFrame = new TQFrame( box ); + headerFrame->setFrameStyle(TQFrame::Panel|TQFrame::Sunken); + TQHBoxLayout* tqlayout = new TQHBoxLayout( headerFrame ); + tqlayout->setMargin( 2 ); // to make sure the frame gets displayed + tqlayout->setSpacing( 0 ); + TQLabel *pixmapLabelLeft = new TQLabel( headerFrame, "pixmapLabelLeft" ); pixmapLabelLeft->setScaledContents( false ); - layout->addWidget( pixmapLabelLeft ); - QLabel *labelTitle = new QLabel( caption, headerFrame, "labelTitle" ); - layout->addWidget( labelTitle ); - layout->setStretchFactor( labelTitle, 1 ); + tqlayout->addWidget( pixmapLabelLeft ); + TQLabel *labelTitle = new TQLabel( caption, headerFrame, "labelTitle" ); + tqlayout->addWidget( labelTitle ); + tqlayout->setStretchFactor( labelTitle, 1 ); - QString dir; + TQString dir; KGlobal::dirs()->addResourceType("kipi_banner_left", KGlobal::dirs()->kde_default("data") + "kipi/data"); dir = KGlobal::dirs()->findResourceDir("kipi_banner_left", "banner_left.png"); - pixmapLabelLeft->setPaletteBackgroundColor( QColor(201, 208, 255) ); - pixmapLabelLeft->setPixmap( QPixmap( dir + "banner_left.png" ) ); - labelTitle->setPaletteBackgroundColor( QColor(201, 208, 255) ); + pixmapLabelLeft->setPaletteBackgroundColor( TQColor(201, 208, 255) ); + pixmapLabelLeft->setPixmap( TQPixmap( dir + "banner_left.png" ) ); + labelTitle->setPaletteBackgroundColor( TQColor(201, 208, 255) ); //--------------------------------------------- m_actionsList = new KListView( box ); - m_actionsList->addColumn(i18n( "Status" )); + m_actionsList->addColumn(i18n( "tqStatus" )); m_actionsList->addColumn(i18n( "Current Actions" )); m_actionsList->setSorting(-1); m_actionsList->setItemMargin(1); m_actionsList->header()->hide(); - m_actionsList->setResizeMode(QListView::LastColumn); - QWhatsThis::add( m_actionsList, i18n("

This is the current tasks list released.") ); + m_actionsList->setResizeMode(TQListView::LastColumn); + TQWhatsThis::add( m_actionsList, i18n("

This is the current tasks list released.") ); //--------------------------------------------- m_progress = new KProgress( box, "Progress" ); m_progress->setTotalSteps(100); m_progress->setValue(0); - QWhatsThis::add( m_progress, i18n("

This is the list current percent task released.") ); + TQWhatsThis::add( m_progress, i18n("

This is the list current percent task released.") ); resize( 600, 400 ); } @@ -196,7 +196,7 @@ BatchProgressDialog::~BatchProgressDialog() ///////////////////////////////////// FONCTIONS ///////////////////////////////////////////// -void BatchProgressDialog::addedAction(const QString &text, int type) +void BatchProgressDialog::addedAction(const TQString &text, int type) { m_item = new KIPI::BatchProgressItem(m_actionsList, m_actionsList->lastItem(), -- cgit v1.2.3