summaryrefslogtreecommitdiffstats
path: root/libkipi/libkipi/batchprogressdialog.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-05-17 20:54:59 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-05-17 20:54:59 +0000
commit252b74ae40311e7e3e2ba9f4d4a0ebf2ead24472 (patch)
treedee6bb999e0d45ec90af181c90eae55427a8e24e /libkipi/libkipi/batchprogressdialog.cpp
parent7e1bbd9180475d0b1398d0e9e01919dd068fb56e (diff)
downloadlibkipi-252b74ae40311e7e3e2ba9f4d4a0ebf2ead24472.tar.gz
libkipi-252b74ae40311e7e3e2ba9f4d4a0ebf2ead24472.zip
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
Diffstat (limited to 'libkipi/libkipi/batchprogressdialog.cpp')
-rw-r--r--libkipi/libkipi/batchprogressdialog.cpp98
1 files changed, 49 insertions, 49 deletions
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 <qvbox.h>
-#include <qlayout.h>
-#include <qdir.h>
-#include <qwidget.h>
-#include <qgroupbox.h>
-#include <qwhatsthis.h>
-#include <qcolor.h>
-#include <qhgroupbox.h>
-#include <qvgroupbox.h>
-#include <qheader.h>
-#include <qlistview.h>
-#include <qframe.h>
-#include <qlabel.h>
-#include <qcolor.h>
-#include <qpixmap.h>
-#include <qpushbutton.h>
+// Include files for TQt
+
+#include <tqvbox.h>
+#include <tqlayout.h>
+#include <tqdir.h>
+#include <tqwidget.h>
+#include <tqgroupbox.h>
+#include <tqwhatsthis.h>
+#include <tqcolor.h>
+#include <tqhgroupbox.h>
+#include <tqvgroupbox.h>
+#include <tqheader.h>
+#include <tqlistview.h>
+#include <tqframe.h>
+#include <tqlabel.h>
+#include <tqcolor.h>
+#include <tqpixmap.h>
+#include <tqpushbutton.h>
// 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("<p>This is the current tasks list released.") );
+ m_actionsList->setResizeMode(TQListView::LastColumn);
+ TQWhatsThis::add( m_actionsList, i18n("<p>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("<p>This is the list current percent task released.") );
+ TQWhatsThis::add( m_progress, i18n("<p>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(),