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 /kbabel/catalogmanager/validateprogress.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 'kbabel/catalogmanager/validateprogress.cpp')
-rw-r--r-- | kbabel/catalogmanager/validateprogress.cpp | 56 |
1 files changed, 28 insertions, 28 deletions
diff --git a/kbabel/catalogmanager/validateprogress.cpp b/kbabel/catalogmanager/validateprogress.cpp index 9075f24e..b8c563a8 100644 --- a/kbabel/catalogmanager/validateprogress.cpp +++ b/kbabel/catalogmanager/validateprogress.cpp @@ -43,8 +43,8 @@ #include <kprogress.h> #include <ksqueezedtextlabel.h> -#include <qlistbox.h> -#include <qtimer.h> +#include <tqlistbox.h> +#include <tqtimer.h> #define ID_ERROR_OPEN 1 #define ID_ERROR_IGNORE 2 @@ -52,7 +52,7 @@ // version identification for validation ignores #define IGNOREFILE_VERSION 0x00 -ValidateProgressDialog::ValidateProgressDialog(const QString& ignoreURL, QWidget *parent,const char *name) +ValidateProgressDialog::ValidateProgressDialog(const TQString& ignoreURL, TQWidget *parent,const char *name) : KDialogBase(parent,name,true,i18n("Caption of dialog","Validation") , Close, Close) , _ignoreURL(ignoreURL), _tool(0), _stopped(false) @@ -61,7 +61,7 @@ ValidateProgressDialog::ValidateProgressDialog(const QString& ignoreURL, QWidget { _mainWidget = new ValidateProgressWidget(this); setMainWidget(_mainWidget); - setInitialSize( QSize(400, 300) ); + setInitialSize( TQSize(400, 300) ); _errors.clear(); _ignores.clear(); @@ -72,12 +72,12 @@ ValidateProgressDialog::ValidateProgressDialog(const QString& ignoreURL, QWidget _errorMenu->insertItem(i18n("&Open"),ID_ERROR_OPEN); _errorMenu->insertItem(i18n("&Ignore"),ID_ERROR_IGNORE); - connect( this, SIGNAL(closeClicked()), this, SLOT(stop())); - connect( _mainWidget->_errorList, SIGNAL( doubleClicked(QListBoxItem *)), - this, SLOT( errorItemDoubleClicked(QListBoxItem *))); + connect( this, TQT_SIGNAL(closeClicked()), this, TQT_SLOT(stop())); + connect( _mainWidget->_errorList, TQT_SIGNAL( doubleClicked(TQListBoxItem *)), + this, TQT_SLOT( errorItemDoubleClicked(TQListBoxItem *))); - connect( _mainWidget->_errorList, SIGNAL( contextMenuRequested(QListBoxItem *, const QPoint &)), - this, SLOT( showContextMenu(QListBoxItem *, const QPoint &))); + connect( _mainWidget->_errorList, TQT_SIGNAL( contextMenuRequested(TQListBoxItem *, const TQPoint &)), + this, TQT_SLOT( showContextMenu(TQListBoxItem *, const TQPoint &))); } ValidateProgressDialog::~ValidateProgressDialog() @@ -85,7 +85,7 @@ ValidateProgressDialog::~ValidateProgressDialog() writeIgnores(); } -void ValidateProgressDialog::validate( const KDataToolInfo &tool, const QPtrList<CatManListItem> files ) +void ValidateProgressDialog::validate( const KDataToolInfo &tool, const TQPtrList<CatManListItem> files ) { if( files.isEmpty() ) return; @@ -111,7 +111,7 @@ void ValidateProgressDialog::validate( const KDataToolInfo &tool, const QPtrList _stopped = false; - QTimer::singleShot( 0, this, SLOT(validate_internal()) ); + TQTimer::singleShot( 0, this, TQT_SLOT(validate_internal()) ); exec(); @@ -139,13 +139,13 @@ void ValidateProgressDialog::validate_internal() if( it->hasErrors() ) { - QValueList<IgnoreItem> err = it->errors(); + TQValueList<IgnoreItem> err = it->errors(); - for( QValueList<IgnoreItem>::Iterator errit = err.begin(); errit!=err.end() ; ++errit ) + for( TQValueList<IgnoreItem>::Iterator errit = err.begin(); errit!=err.end() ; ++errit ) { IgnoreItem item = (*errit); - QValueList<IgnoreItem>::Iterator ig; + TQValueList<IgnoreItem>::Iterator ig; for( ig = _ignores.begin() ; ig != _ignores.end() ; ++ig ) { if( (*ig).validationTool == _toolID && @@ -167,7 +167,7 @@ void ValidateProgressDialog::validate_internal() noHeader = false; } - QString errortext=QString::number(item.index+1)+": " + item.msgid.first().left(50); + TQString errortext=TQString::number(item.index+1)+": " + item.msgid.first().left(50); errortext.replace("\n"," "); if( item.msgid.first().length() > 50 ) errortext+="..."; _mainWidget->_errorList->insertItem( errortext); @@ -200,9 +200,9 @@ void ValidateProgressDialog::stop() _stopped = true; } -void ValidateProgressDialog::errorItemDoubleClicked(QListBoxItem * item) +void ValidateProgressDialog::errorItemDoubleClicked(TQListBoxItem * item) { - QString it = item->text(); + TQString it = item->text(); bool ok =false; int offset = it.find(":"); @@ -215,7 +215,7 @@ void ValidateProgressDialog::errorItemDoubleClicked(QListBoxItem * item) if( !ok ) num = 0; } - QListBoxItem* package=item; + TQListBoxItem* package=item; while( package && !package->text().startsWith("/") ) package=package->prev(); @@ -228,7 +228,7 @@ void ValidateProgressDialog::errorItemDoubleClicked(QListBoxItem * item) emit errorDoubleClicked(package->text(), num-1 ); } -void ValidateProgressDialog::showContextMenu(QListBoxItem * item, const QPoint & pos) +void ValidateProgressDialog::showContextMenu(TQListBoxItem * item, const TQPoint & pos) { // disable ignore for whole package _errorMenu->setItemEnabled(ID_ERROR_IGNORE, item->pixmap()==0 ); @@ -255,10 +255,10 @@ void ValidateProgressDialog::readIgnores() { IgnoreItem item; - QFile ignoreFile( _ignoreURL ); + TQFile ignoreFile( _ignoreURL ); if( ignoreFile.open( IO_ReadOnly ) ) { - QDataStream s( &ignoreFile ); - QString url; + TQDataStream s( &ignoreFile ); + TQString url; int version; s >> version; @@ -277,15 +277,15 @@ void ValidateProgressDialog::readIgnores() void ValidateProgressDialog::writeIgnores() { - QFile ignoreFile( _ignoreURL ); + TQFile ignoreFile( _ignoreURL ); if( ignoreFile.open( IO_WriteOnly ) ) { - QDataStream s( &ignoreFile ); - QString url; + TQDataStream s( &ignoreFile ); + TQString url; int version = IGNOREFILE_VERSION; s << version; - for( QValueList<IgnoreItem>::Iterator it = _ignores.begin(); it!=_ignores.end(); ++it) + for( TQValueList<IgnoreItem>::Iterator it = _ignores.begin(); it!=_ignores.end(); ++it) { s << (*it); } @@ -293,7 +293,7 @@ void ValidateProgressDialog::writeIgnores() } } -QDataStream & operator<<( QDataStream & stream, const IgnoreItem & i ) +TQDataStream & operator<<( TQDataStream & stream, const IgnoreItem & i ) { return stream << i.fileURL << i.msgid @@ -302,7 +302,7 @@ QDataStream & operator<<( QDataStream & stream, const IgnoreItem & i ) << i.validationTool; } -QDataStream & operator>>( QDataStream & stream, IgnoreItem & i ) { +TQDataStream & operator>>( TQDataStream & stream, IgnoreItem & i ) { return stream >> i.fileURL >> i.msgid >> i.msgstr |