diff options
Diffstat (limited to 'kdat')
32 files changed, 408 insertions, 408 deletions
diff --git a/kdat/Archive.cpp b/kdat/Archive.cpp index ad66dbd..5e8ef65 100644 --- a/kdat/Archive.cpp +++ b/kdat/Archive.cpp @@ -94,7 +94,7 @@ void Archive::read( int version ) } } - // Number of immediate tqchildren (4 bytes). + // Number of immediate children (4 bytes). fread( &ival, sizeof( ival ), 1, _fptr ); //===== Read files ===== @@ -148,7 +148,7 @@ void Archive::write( FILE* fptr ) fwrite( &ival, sizeof( ival ), 1, _fptr ); } - // Number of immediate tqchildren (4 bytes). + // Number of immediate children (4 bytes). ival = getChildren().count(); fwrite( &ival, sizeof( ival ), 1, _fptr ); @@ -202,7 +202,7 @@ const TQPtrList<File>& Archive::getChildren() { read(); - return _tqchildren; + return _children; } const TQPtrList<Range>& Archive::getRanges() @@ -255,7 +255,7 @@ void Archive::addChild( File* file ) { read(); - _tqchildren.append( file ); + _children.append( file ); } File* Archive::addFile( int size, int mtime, int startRecord, int endRecord, const TQString & filename ) diff --git a/kdat/Archive.h b/kdat/Archive.h index 7527073..9f42684 100644 --- a/kdat/Archive.h +++ b/kdat/Archive.h @@ -39,7 +39,7 @@ class Archive { FILE* _fptr; int _offset; TQString _name; - TQPtrList<File> _tqchildren; + TQPtrList<File> _children; RangeList _ranges; Tape* _tape; public: @@ -67,7 +67,7 @@ public: Archive( Tape* tape, FILE* fptr, int offset ); /** - * Destroy the archive entry and all of its tqchildren. + * Destroy the archive entry and all of its children. */ ~Archive(); @@ -82,7 +82,7 @@ public: /** * Recursively read the instance data for this archive entry and all of its - * tqchildren. This method is used when converting from an older index format. + * children. This method is used when converting from an older index format. * * @param version The version of the old tape index. */ @@ -90,7 +90,7 @@ public: /** * Write out the archive entry to the open file. Entries for each of its - * tqchildren will also be written. + * children will also be written. */ void write( FILE* fptr ); @@ -125,12 +125,12 @@ public: /** * Get the list of top-level files in this archive. * - * @return A list of the immediate tqchildren of this archive. + * @return A list of the immediate children of this archive. */ const TQPtrList<File>& getChildren(); /** - * Get the list of ranges of this file and all of its tqchildren. + * Get the list of ranges of this file and all of its children. * * @return A list of ranges. */ @@ -176,7 +176,7 @@ public: File* addFile( int size, int mtime, int startRecord, int endRecord, const TQString & filename ); /** - * Recursively calculate the list of ranges for all of the archive's tqchildren. + * Recursively calculate the list of ranges for all of the archive's children. */ void calcRanges(); }; diff --git a/kdat/ArchiveInfoWidget.cpp b/kdat/ArchiveInfoWidget.cpp index 875c21d..acf1c16 100644 --- a/kdat/ArchiveInfoWidget.cpp +++ b/kdat/ArchiveInfoWidget.cpp @@ -19,7 +19,7 @@ #include <time.h> #include <tqlabel.h> -#include <tqlayout.h> +#include <layout.h> #include <tqlineedit.h> #include <kapplication.h> @@ -43,25 +43,25 @@ ArchiveInfoWidget::ArchiveInfoWidget( TQWidget* parent, const char* name ) TQLabel* lbl2 = new TQLabel( i18n( "Created on:" ), this ); TQLabel* lbl3 = new TQLabel( i18n( "Size:" ), this ); - int max = lbl1->tqsizeHint().width(); - if ( lbl2->tqsizeHint().width() > max ) max = lbl2->tqsizeHint().width(); - if ( lbl3->tqsizeHint().width() > max ) max = lbl3->tqsizeHint().width(); + int max = lbl1->sizeHint().width(); + if ( lbl2->sizeHint().width() > max ) max = lbl2->sizeHint().width(); + if ( lbl3->sizeHint().width() > max ) max = lbl3->sizeHint().width(); - lbl1->setFixedSize( max, lbl1->tqsizeHint().height() ); - lbl2->setFixedSize( max, lbl2->tqsizeHint().height() ); - lbl3->setFixedSize( max, lbl3->tqsizeHint().height() ); + lbl1->setFixedSize( max, lbl1->sizeHint().height() ); + lbl2->setFixedSize( max, lbl2->sizeHint().height() ); + lbl3->setFixedSize( max, lbl3->sizeHint().height() ); _archiveName = new TQLineEdit( this ); - _archiveName->setFixedHeight( _archiveName->tqsizeHint().height() ); + _archiveName->setFixedHeight( _archiveName->sizeHint().height() ); _ctime = new TQLabel( "???", this ); - _ctime->setFixedHeight( _ctime->tqsizeHint().height() ); + _ctime->setFixedHeight( _ctime->sizeHint().height() ); _size = new TQLabel( "???", this ); - _size->setFixedHeight( _size->tqsizeHint().height() ); + _size->setFixedHeight( _size->sizeHint().height() ); _apply = new KPushButton( KStdGuiItem::apply(), this ); - _apply->setFixedSize( 80, _apply->tqsizeHint().height() ); + _apply->setFixedSize( 80, _apply->sizeHint().height() ); _apply->setEnabled( FALSE ); TQVBoxLayout* l1 = new TQVBoxLayout( this, 4, 4 ); diff --git a/kdat/BackupDlg.cpp b/kdat/BackupDlg.cpp index 93bf65d..45b864c 100644 --- a/kdat/BackupDlg.cpp +++ b/kdat/BackupDlg.cpp @@ -27,7 +27,7 @@ #include <tqdir.h> #include <tqlabel.h> -#include <tqlayout.h> +#include <layout.h> #include <kpushbutton.h> #include <kstdguiitem.h> @@ -93,55 +93,55 @@ BackupDlg::BackupDlg( const TQString & archiveName, const TQString & workingDir, f2->setFrameStyle( TQFrame::Panel | TQFrame::Sunken ); TQLabel* lbl1 = new TQLabel( i18n( "Elapsed time:" ), f1 ); - lbl1->setFixedSize( labelWidth, lbl1->tqsizeHint().height() ); + lbl1->setFixedSize( labelWidth, lbl1->sizeHint().height() ); _elapsedTime = new TQLabel( i18n( "00:00:00" ), f1 ); - _elapsedTime->setFixedHeight( _elapsedTime->tqsizeHint().height() ); + _elapsedTime->setFixedHeight( _elapsedTime->sizeHint().height() ); TQLabel* lbl2 = new TQLabel( i18n( "Time remaining:" ), f2 ); - lbl2->setFixedSize( labelWidth, lbl2->tqsizeHint().height() ); + lbl2->setFixedSize( labelWidth, lbl2->sizeHint().height() ); _timeRemaining = new TQLabel( i18n( "00:00:00" ), f2 ); - _timeRemaining->setFixedHeight( _timeRemaining->tqsizeHint().height() ); + _timeRemaining->setFixedHeight( _timeRemaining->sizeHint().height() ); TQLabel* lbl3 = new TQLabel( i18n( "Total KB:" ), f1 ); - lbl3->setFixedSize( labelWidth, lbl3->tqsizeHint().height() ); + lbl3->setFixedSize( labelWidth, lbl3->sizeHint().height() ); TQLabel* totalKbytes = new TQLabel( Util::kbytesToString( archiveSize ), f1 ); - totalKbytes->setFixedHeight( totalKbytes->tqsizeHint().height() ); + totalKbytes->setFixedHeight( totalKbytes->sizeHint().height() ); TQLabel* lbl4 = new TQLabel( i18n( "KB written:" ), f2 ); - lbl4->setFixedSize( labelWidth, lbl4->tqsizeHint().height() ); + lbl4->setFixedSize( labelWidth, lbl4->sizeHint().height() ); _kbytesWritten = new TQLabel( i18n( "0KB" ), f2 ); - _kbytesWritten->setFixedHeight( _kbytesWritten->tqsizeHint().height() ); + _kbytesWritten->setFixedHeight( _kbytesWritten->sizeHint().height() ); TQLabel* lbl5 = new TQLabel( i18n( "Transfer rate:" ), f1 ); - lbl5->setFixedSize( labelWidth, lbl5->tqsizeHint().height() ); + lbl5->setFixedSize( labelWidth, lbl5->sizeHint().height() ); _transferRate = new TQLabel( i18n( "0KB/min" ), f1 ); - _transferRate->setFixedHeight( _transferRate->tqsizeHint().height() ); + _transferRate->setFixedHeight( _transferRate->sizeHint().height() ); TQLabel* lbl6 = new TQLabel( i18n( "Files:" ), f2 ); - lbl6->setFixedSize( labelWidth, lbl6->tqsizeHint().height() ); + lbl6->setFixedSize( labelWidth, lbl6->sizeHint().height() ); _fileCount = new TQLabel( i18n( "0" ), f2 ); - _fileCount->setFixedHeight( _fileCount->tqsizeHint().height() ); + _fileCount->setFixedHeight( _fileCount->sizeHint().height() ); _log = new LoggerWidget( i18n( "Backup log:" ), this ); _ok = new KPushButton( KStdGuiItem::ok(), this ); - _ok->setFixedSize( 80, _ok->tqsizeHint().height() ); + _ok->setFixedSize( 80, _ok->sizeHint().height() ); connect( _ok, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotOK() ) ); _ok->setEnabled( FALSE ); _save = new TQPushButton( i18n( "Save Log..." ), this ); - _save->setFixedSize( 80, _save->tqsizeHint().height() ); + _save->setFixedSize( 80, _save->sizeHint().height() ); connect( _save, TQT_SIGNAL( clicked() ), _log, TQT_SLOT( save() ) ); _save->setEnabled( FALSE ); _abort = new KPushButton( KStdGuiItem::cancel(), this ); - _abort->setFixedSize( 80, _abort->tqsizeHint().height() ); + _abort->setFixedSize( 80, _abort->sizeHint().height() ); connect( _abort, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotAbort() ) ); TQVBoxLayout* l1 = new TQVBoxLayout( this, 8, 4 ); @@ -426,7 +426,7 @@ void BackupDlg::updateStats() _kbytesWritten->setText( str ); if ( elapsed > 0 ) { - str = i18n( "%1/min" ).tqarg(Util::kbytesToString( (int)_totalKBytes *60 / elapsed ) ); + str = i18n( "%1/min" ).arg(Util::kbytesToString( (int)_totalKBytes *60 / elapsed ) ); _transferRate->setText( str ); } } diff --git a/kdat/BackupDlg.h b/kdat/BackupDlg.h index d98d91c..092f7c0 100644 --- a/kdat/BackupDlg.h +++ b/kdat/BackupDlg.h @@ -33,7 +33,7 @@ class Tape; class TarParser; /** - * @short tqStatus dialog for backing up files. + * @short Status dialog for backing up files. */ class BackupDlg : public TQDialog { Q_OBJECT diff --git a/kdat/BackupOptDlg.cpp b/kdat/BackupOptDlg.cpp index 58ae673..09ca8d8 100644 --- a/kdat/BackupOptDlg.cpp +++ b/kdat/BackupOptDlg.cpp @@ -18,7 +18,7 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -#include <tqlayout.h> +#include <layout.h> #include <kpushbutton.h> #include <kstdguiitem.h> @@ -42,10 +42,10 @@ BackupOptDlg::BackupOptDlg( BackupProfile* backupProfile, TQWidget* parent, cons _profile->setBackupProfile( backupProfile ); KPushButton* ok = new KPushButton( KStdGuiItem::ok(), this ); - ok->setFixedSize( 80, ok->tqsizeHint().height() ); + ok->setFixedSize( 80, ok->sizeHint().height() ); connect( ok, TQT_SIGNAL( clicked() ), this, TQT_SLOT( accept() ) ); KPushButton* cancel = new KPushButton( KStdGuiItem::cancel(), this ); - cancel->setFixedSize( 80, ok->tqsizeHint().height() ); + cancel->setFixedSize( 80, ok->sizeHint().height() ); connect( cancel, TQT_SIGNAL( clicked() ), this, TQT_SLOT( reject() ) ); TQVBoxLayout* l1 = new TQVBoxLayout( this, 8, 4 ); diff --git a/kdat/BackupProfileInfoWidget.cpp b/kdat/BackupProfileInfoWidget.cpp index a40b94c..62aff8b 100644 --- a/kdat/BackupProfileInfoWidget.cpp +++ b/kdat/BackupProfileInfoWidget.cpp @@ -20,7 +20,7 @@ #include <time.h> #include <tqlabel.h> -#include <tqlayout.h> +#include <layout.h> #include <tqlineedit.h> #include <kapplication.h> @@ -42,23 +42,23 @@ BackupProfileInfoWidget::BackupProfileInfoWidget( TQWidget* parent, const char* { TQLabel* lbl1 = new TQLabel( i18n( "Backup profile name:" ), this ); - int max = lbl1->tqsizeHint().width(); + int max = lbl1->sizeHint().width(); - lbl1->setFixedSize( max, lbl1->tqsizeHint().height() ); + lbl1->setFixedSize( max, lbl1->sizeHint().height() ); _name = new TQLineEdit( this ); - _name->setFixedHeight( _name->tqsizeHint().height() ); + _name->setFixedHeight( _name->sizeHint().height() ); _profile = new BackupProfileWidget( this ); TQPushButton* getSelection = new TQPushButton( i18n( "Files >>" ), this ); - getSelection->setFixedSize( 80, getSelection->tqsizeHint().height() ); + getSelection->setFixedSize( 80, getSelection->sizeHint().height() ); TQPushButton* setSelection = new TQPushButton( i18n( "<< Files" ), this ); - setSelection->setFixedSize( 80, setSelection->tqsizeHint().height() ); + setSelection->setFixedSize( 80, setSelection->sizeHint().height() ); _apply = new KPushButton( KStdGuiItem::apply(), this ); - _apply->setFixedSize( 80, _apply->tqsizeHint().height() ); + _apply->setFixedSize( 80, _apply->sizeHint().height() ); _apply->setEnabled( FALSE ); TQVBoxLayout* l1 = new TQVBoxLayout( this, 4, 4 ); diff --git a/kdat/BackupProfileWidget.cpp b/kdat/BackupProfileWidget.cpp index 773a8bd..c088cbe 100644 --- a/kdat/BackupProfileWidget.cpp +++ b/kdat/BackupProfileWidget.cpp @@ -19,7 +19,7 @@ #include <tqcheckbox.h> #include <tqcombobox.h> #include <tqlabel.h> -#include <tqlayout.h> +#include <layout.h> #include <tqlineedit.h> #include <tqlistbox.h> #include <tqpushbutton.h> @@ -40,19 +40,19 @@ BackupProfileWidget::BackupProfileWidget( TQWidget* parent, const char* name ) addTab( one, i18n( "Backup" ) ); TQLabel* lbl1 = new TQLabel( i18n( "Archive name:" ), one ); - lbl1->setFixedSize( lbl1->tqsizeHint() ); + lbl1->setFixedSize( lbl1->sizeHint() ); _archiveName = new TQLineEdit( one ); - _archiveName->setFixedHeight( _archiveName->tqsizeHint().height() ); + _archiveName->setFixedHeight( _archiveName->sizeHint().height() ); TQLabel* lbl2 = new TQLabel( i18n( "Working folder:" ), one ); - lbl2->setFixedSize( lbl2->tqsizeHint() ); + lbl2->setFixedSize( lbl2->sizeHint() ); _workingDir = new TQComboBox( FALSE, one ); - _workingDir->setFixedHeight( _workingDir->tqsizeHint().height() ); + _workingDir->setFixedHeight( _workingDir->sizeHint().height() ); TQLabel* lbl3 = new TQLabel( i18n( "Backup files:" ), one ); - lbl3->setFixedHeight( lbl3->tqsizeHint().height() ); + lbl3->setFixedHeight( lbl3->sizeHint().height() ); _files = new TQListBox( one ); @@ -60,20 +60,20 @@ BackupProfileWidget::BackupProfileWidget( TQWidget* parent, const char* name ) addTab( two, i18n( "Tar Options" ) ); _oneFilesystem = new TQCheckBox( i18n( "Stay on one filesystem" ), two ); - _oneFilesystem->setFixedHeight( _oneFilesystem->tqsizeHint().height() ); + _oneFilesystem->setFixedHeight( _oneFilesystem->sizeHint().height() ); _incremental = new TQCheckBox( i18n( "GNU listed incremental" ), two ); - _incremental->setFixedHeight( _incremental->tqsizeHint().height() ); + _incremental->setFixedHeight( _incremental->sizeHint().height() ); connect( _incremental, TQT_SIGNAL( toggled( bool ) ), this, TQT_SLOT( slotIncrementalToggled( bool ) ) ); _snapshotLabel = new TQLabel( i18n( "Snapshot file:" ), two ); - _snapshotLabel->setFixedSize( _snapshotLabel->tqsizeHint() ); + _snapshotLabel->setFixedSize( _snapshotLabel->sizeHint() ); _snapshotFile = new TQLineEdit( two ); - _snapshotFile->setFixedHeight( _snapshotFile->tqsizeHint().height() ); + _snapshotFile->setFixedHeight( _snapshotFile->sizeHint().height() ); _removeSnapshot = new TQCheckBox( i18n( "Remove snapshot file before backup" ), two ); - _removeSnapshot->setFixedHeight( _removeSnapshot->tqsizeHint().height() ); + _removeSnapshot->setFixedHeight( _removeSnapshot->sizeHint().height() ); slotIncrementalToggled( FALSE ); diff --git a/kdat/File.cpp b/kdat/File.cpp index ce05aeb..fd766b3 100644 --- a/kdat/File.cpp +++ b/kdat/File.cpp @@ -44,9 +44,9 @@ File::File( File* parent, FILE* fptr, int offset ) File::~File() { - while ( _tqchildren.first() ) { - delete _tqchildren.first(); - _tqchildren.removeFirst(); + while ( _children.first() ) { + delete _children.first(); + _children.removeFirst(); } } @@ -164,7 +164,7 @@ void File::write( FILE* fptr ) fwrite( &ival, sizeof( ival ), 1, fptr ); } - // Number of immediate tqchildren (4 bytes). + // Number of immediate children (4 bytes). ival = getChildren().count(); fwrite( &ival, sizeof( ival ), 1, fptr ); @@ -175,10 +175,10 @@ void File::write( FILE* fptr ) } //===== Write files ===== - ival = _tqchildren.count(); + ival = _children.count(); fwrite( &ival, sizeof( ival ), 1, fptr ); - TQPtrListIterator<File> i( _tqchildren ); + TQPtrListIterator<File> i( _children ); int count = 0; for ( ; i.current(); ++i, count++ ) { // Fill in the file offset. @@ -252,7 +252,7 @@ const TQPtrList<File>& File::getChildren() { read(); - return _tqchildren; + return _children; } const TQPtrList<Range>& File::getRanges() @@ -266,7 +266,7 @@ void File::addChild( File* file ) { read(); - _tqchildren.append( file ); + _children.append( file ); } void File::calcRanges() diff --git a/kdat/File.h b/kdat/File.h index 71167f2..75b1d87 100644 --- a/kdat/File.h +++ b/kdat/File.h @@ -46,7 +46,7 @@ class File { } _union; TQString _name; File* _parent; - TQPtrList<File> _tqchildren; + TQPtrList<File> _children; RangeList _ranges; public: /** @@ -80,7 +80,7 @@ public: File( File* parent, FILE* fptr, int offset ); /** - * Destroy the file entry and all of its tqchildren. + * Destroy the file entry and all of its children. */ ~File(); @@ -95,7 +95,7 @@ public: /** * Recursively read the instance for this file entry and all of it's - * tqchildren. This method is used when converting from an older index format. + * children. This method is used when converting from an older index format. * * @param version The version of the old tape index. */ @@ -103,7 +103,7 @@ public: /** * Write out the file entry to the open file. Entries for each of its - * tqchildren will also be written. + * children will also be written. */ void write( FILE* fptr ); @@ -171,15 +171,15 @@ public: File* getParent(); /** - * Get the tqchildren of this file entry. A normal file will never have any - * tqchildren. A directory may or may not have tqchildren. + * Get the children of this file entry. A normal file will never have any + * children. A directory may or may not have children. * - * @return A list of the immediate tqchildren of this file entry. + * @return A list of the immediate children of this file entry. */ const TQPtrList<File>& getChildren(); /** - * Get the list of ranges of this file and all of its tqchildren. + * Get the list of ranges of this file and all of its children. * * @return A list of ranges. */ @@ -193,7 +193,7 @@ public: void addChild( File* file ); /** - * Recursively calculate the list of ranges for all of the file's tqchildren. + * Recursively calculate the list of ranges for all of the file's children. */ void calcRanges(); }; diff --git a/kdat/FileInfoWidget.cpp b/kdat/FileInfoWidget.cpp index e8991a8..bc42d7e 100644 --- a/kdat/FileInfoWidget.cpp +++ b/kdat/FileInfoWidget.cpp @@ -24,7 +24,7 @@ #include <tqdatetime.h> #include <tqlabel.h> -#include <tqlayout.h> +#include <layout.h> #include <tqfile.h> #include <kapplication.h> @@ -47,42 +47,42 @@ FileInfoWidget::FileInfoWidget( TQWidget* parent, const char* name ) TQLabel* lbl6 = new TQLabel( i18n( "Owner:" ), this ); TQLabel* lbl7 = new TQLabel( i18n( "Group:" ), this ); - int max = lbl1->tqsizeHint().width(); - if ( lbl2->tqsizeHint().width() > max ) max = lbl2->tqsizeHint().width(); - if ( lbl3->tqsizeHint().width() > max ) max = lbl3->tqsizeHint().width(); - if ( lbl4->tqsizeHint().width() > max ) max = lbl4->tqsizeHint().width(); - if ( lbl5->tqsizeHint().width() > max ) max = lbl5->tqsizeHint().width(); - if ( lbl6->tqsizeHint().width() > max ) max = lbl6->tqsizeHint().width(); - if ( lbl7->tqsizeHint().width() > max ) max = lbl7->tqsizeHint().width(); - - lbl1->setFixedSize( max, lbl1->tqsizeHint().height() ); - lbl2->setFixedSize( max, lbl2->tqsizeHint().height() ); - lbl3->setFixedSize( max, lbl3->tqsizeHint().height() ); - lbl4->setFixedSize( max, lbl4->tqsizeHint().height() ); - lbl5->setFixedSize( max, lbl5->tqsizeHint().height() ); - lbl6->setFixedSize( max, lbl6->tqsizeHint().height() ); - lbl7->setFixedSize( max, lbl7->tqsizeHint().height() ); + int max = lbl1->sizeHint().width(); + if ( lbl2->sizeHint().width() > max ) max = lbl2->sizeHint().width(); + if ( lbl3->sizeHint().width() > max ) max = lbl3->sizeHint().width(); + if ( lbl4->sizeHint().width() > max ) max = lbl4->sizeHint().width(); + if ( lbl5->sizeHint().width() > max ) max = lbl5->sizeHint().width(); + if ( lbl6->sizeHint().width() > max ) max = lbl6->sizeHint().width(); + if ( lbl7->sizeHint().width() > max ) max = lbl7->sizeHint().width(); + + lbl1->setFixedSize( max, lbl1->sizeHint().height() ); + lbl2->setFixedSize( max, lbl2->sizeHint().height() ); + lbl3->setFixedSize( max, lbl3->sizeHint().height() ); + lbl4->setFixedSize( max, lbl4->sizeHint().height() ); + lbl5->setFixedSize( max, lbl5->sizeHint().height() ); + lbl6->setFixedSize( max, lbl6->sizeHint().height() ); + lbl7->setFixedSize( max, lbl7->sizeHint().height() ); _fileName = new TQLabel( "???", this ); - _fileName->setFixedHeight( _fileName->tqsizeHint().height() ); + _fileName->setFixedHeight( _fileName->sizeHint().height() ); _ctime = new TQLabel( "???", this ); - _ctime->setFixedHeight( _ctime->tqsizeHint().height() ); + _ctime->setFixedHeight( _ctime->sizeHint().height() ); _mtime = new TQLabel( "???", this ); - _mtime->setFixedHeight( _mtime->tqsizeHint().height() ); + _mtime->setFixedHeight( _mtime->sizeHint().height() ); _atime = new TQLabel( "???", this ); - _atime->setFixedHeight( _atime->tqsizeHint().height() ); + _atime->setFixedHeight( _atime->sizeHint().height() ); _size = new TQLabel( "???", this ); - _size->setFixedHeight( _size->tqsizeHint().height() ); + _size->setFixedHeight( _size->sizeHint().height() ); _owner = new TQLabel( "???", this ); - _owner->setFixedHeight( _owner->tqsizeHint().height() ); + _owner->setFixedHeight( _owner->sizeHint().height() ); _group = new TQLabel( "???", this ); - _group->setFixedHeight( _group->tqsizeHint().height() ); + _group->setFixedHeight( _group->sizeHint().height() ); TQVBoxLayout* l1 = new TQVBoxLayout( this, 4, 4 ); diff --git a/kdat/FormatOptDlg.cpp b/kdat/FormatOptDlg.cpp index f6084de..a79ff21 100644 --- a/kdat/FormatOptDlg.cpp +++ b/kdat/FormatOptDlg.cpp @@ -20,7 +20,7 @@ #include <tqcombobox.h> #include <tqlabel.h> -#include <tqlayout.h> +#include <layout.h> #include <tqlineedit.h> #include <kpushbutton.h> #include <kstdguiitem.h> @@ -43,28 +43,28 @@ FormatOptDlg::FormatOptDlg( const TQString & def, TQWidget* parent, const char* TQLabel* lbl1 = new TQLabel( i18n( "Tape name:" ), this ); TQLabel* lbl2 = new TQLabel( i18n( "Tape size:" ), this ); - int max = lbl1->tqsizeHint().width(); - if ( lbl2->tqsizeHint().width() > max ) max = lbl2->tqsizeHint().width(); + int max = lbl1->sizeHint().width(); + if ( lbl2->sizeHint().width() > max ) max = lbl2->sizeHint().width(); - lbl1->setFixedSize( max, lbl1->tqsizeHint().height() ); - lbl2->setFixedSize( max, lbl2->tqsizeHint().height() ); + lbl1->setFixedSize( max, lbl1->sizeHint().height() ); + lbl2->setFixedSize( max, lbl2->sizeHint().height() ); _entry = new TQLineEdit( this ); _entry->setText( def ); - _entry->setFixedHeight( _entry->tqsizeHint().height() ); + _entry->setFixedHeight( _entry->sizeHint().height() ); _tapeSize = new TQLineEdit( this ); - _tapeSize->setFixedSize( 48, _tapeSize->tqsizeHint().height() ); + _tapeSize->setFixedSize( 48, _tapeSize->sizeHint().height() ); _tapeSizeUnits = new TQComboBox( this ); - _tapeSizeUnits->setFixedSize( 48, _tapeSizeUnits->tqsizeHint().height() ); + _tapeSizeUnits->setFixedSize( 48, _tapeSizeUnits->sizeHint().height() ); _tapeSizeUnits->insertItem( "MB" ); _tapeSizeUnits->insertItem( "GB" ); KPushButton* ok = new KPushButton( KStdGuiItem::ok(), this ); - ok->setFixedSize( 80, ok->tqsizeHint().height() ); + ok->setFixedSize( 80, ok->sizeHint().height() ); KPushButton* cancel = new KPushButton( KStdGuiItem::cancel(), this ); - cancel->setFixedSize( 80, cancel->tqsizeHint().height() ); + cancel->setFixedSize( 80, cancel->sizeHint().height() ); TQVBoxLayout* l1 = new TQVBoxLayout( this, 8, 4 ); TQHBoxLayout* l2 = new TQHBoxLayout(); diff --git a/kdat/IndexDlg.cpp b/kdat/IndexDlg.cpp index bd1f62c..7d75c58 100644 --- a/kdat/IndexDlg.cpp +++ b/kdat/IndexDlg.cpp @@ -22,7 +22,7 @@ #include <time.h> #include <tqlabel.h> -#include <tqlayout.h> +#include <layout.h> #include <kpushbutton.h> #include <kstdguiitem.h> @@ -70,55 +70,55 @@ IndexDlg::IndexDlg( Tape* tape, TQWidget* parent, const char* name ) f2->setFrameStyle( TQFrame::Panel | TQFrame::Sunken ); TQLabel* lbl1 = new TQLabel( i18n( "Elapsed time:" ), f1 ); - lbl1->setFixedSize( labelWidth, lbl1->tqsizeHint().height() ); + lbl1->setFixedSize( labelWidth, lbl1->sizeHint().height() ); _elapsedTime = new TQLabel( i18n( "00:00:00" ), f1 ); - _elapsedTime->setFixedHeight( _elapsedTime->tqsizeHint().height() ); + _elapsedTime->setFixedHeight( _elapsedTime->sizeHint().height() ); TQLabel* lbl2 = new TQLabel( i18n( "Archives:" ), f2 ); - lbl2->setFixedSize( labelWidth, lbl2->tqsizeHint().height() ); + lbl2->setFixedSize( labelWidth, lbl2->sizeHint().height() ); _archives = new TQLabel( i18n( "0" ), f2 ); - _archives->setFixedHeight( _archives->tqsizeHint().height() ); + _archives->setFixedHeight( _archives->sizeHint().height() ); TQLabel* lbl3 = new TQLabel( i18n( "KB read:" ), f1 ); - lbl3->setFixedSize( labelWidth, lbl3->tqsizeHint().height() ); + lbl3->setFixedSize( labelWidth, lbl3->sizeHint().height() ); _kbytesRead = new TQLabel( i18n( "0KB" ), f1 ); - _kbytesRead->setFixedHeight( _kbytesRead->tqsizeHint().height() ); + _kbytesRead->setFixedHeight( _kbytesRead->sizeHint().height() ); TQLabel* lbl4 = new TQLabel( i18n( "Files:" ), f2 ); - lbl4->setFixedSize( labelWidth, lbl4->tqsizeHint().height() ); + lbl4->setFixedSize( labelWidth, lbl4->sizeHint().height() ); _files = new TQLabel( i18n( "0" ), f2 ); - _files->setFixedHeight( _kbytesRead->tqsizeHint().height() ); + _files->setFixedHeight( _kbytesRead->sizeHint().height() ); TQLabel* lbl5 = new TQLabel( i18n( "Transfer rate:" ), f1 ); - lbl5->setFixedSize( labelWidth, lbl5->tqsizeHint().height() ); + lbl5->setFixedSize( labelWidth, lbl5->sizeHint().height() ); _transferRate = new TQLabel( i18n( "0KB/min" ), f1 ); - _transferRate->setFixedHeight( _transferRate->tqsizeHint().height() ); + _transferRate->setFixedHeight( _transferRate->sizeHint().height() ); TQLabel* lbl6 = new TQLabel( i18n( "Total files:" ), f2 ); - lbl6->setFixedSize( labelWidth, lbl6->tqsizeHint().height() ); + lbl6->setFixedSize( labelWidth, lbl6->sizeHint().height() ); _totalFiles = new TQLabel( i18n( "0" ), f2 ); - _totalFiles->setFixedHeight( _totalFiles->tqsizeHint().height() ); + _totalFiles->setFixedHeight( _totalFiles->sizeHint().height() ); _log = new LoggerWidget( i18n( "Index log:" ), this ); _ok = new KPushButton( KStdGuiItem::ok(), this ); - _ok->setFixedSize( 80, _ok->tqsizeHint().height() ); + _ok->setFixedSize( 80, _ok->sizeHint().height() ); connect( _ok, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotOK() ) ); _ok->setEnabled( FALSE ); _save = new TQPushButton( i18n( "Save Log..." ), this ); - _save->setFixedSize( 80, _save->tqsizeHint().height() ); + _save->setFixedSize( 80, _save->sizeHint().height() ); connect( _save, TQT_SIGNAL( clicked() ), _log, TQT_SLOT( save() ) ); _save->setEnabled( FALSE ); _abort = new TQPushButton( i18n( "Abort" ), this ); - _abort->setFixedSize( 80, _abort->tqsizeHint().height() ); + _abort->setFixedSize( 80, _abort->sizeHint().height() ); connect( _abort, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotAbort() ) ); TQVBoxLayout* l1 = new TQVBoxLayout( this, 8, 4 ); @@ -275,10 +275,10 @@ void IndexDlg::timerEvent( TQTimerEvent* ) _archiveCount++; msg.setNum( _archiveCount ); _archives->setText( msg ); - msg = i18n( "Indexing archive %1." ).tqarg( _archiveCount ); + msg = i18n( "Indexing archive %1." ).arg( _archiveCount ); _log->append( msg ); - msg = i18n( "Archive %1" ).tqarg( _archiveCount ); + msg = i18n( "Archive %1" ).arg( _archiveCount ); _archive = new Archive( _tape, 0, msg ); _fileName = TQString(); _fileSize = -1; @@ -349,7 +349,7 @@ void IndexDlg::updateStats() _kbytesRead->setText( str ); if ( elapsed > 0 ) { - str = i18n( "%1/min" ).tqarg(Util::kbytesToString( (int)_totalKBytes * 60 / elapsed ) ); + str = i18n( "%1/min" ).arg(Util::kbytesToString( (int)_totalKBytes * 60 / elapsed ) ); _transferRate->setText( str ); } } diff --git a/kdat/IndexDlg.h b/kdat/IndexDlg.h index ffbc505..41a4070 100644 --- a/kdat/IndexDlg.h +++ b/kdat/IndexDlg.h @@ -34,7 +34,7 @@ class Tape; class TarParser; /** - * @short tqStatus dialog for recreating a tape index. + * @short Status dialog for recreating a tape index. */ class IndexDlg : public TQDialog { Q_OBJECT diff --git a/kdat/InfoShellWidget.h b/kdat/InfoShellWidget.h index 0f87585..62f2c5f 100644 --- a/kdat/InfoShellWidget.h +++ b/kdat/InfoShellWidget.h @@ -42,7 +42,7 @@ public: ~InfoShellWidget(); protected: /** - * Resize all tqchildren to fill all of the available space within the shell. + * Resize all children to fill all of the available space within the shell. */ virtual void resizeEvent( TQResizeEvent* e ); }; diff --git a/kdat/KDat.kdoc b/kdat/KDat.kdoc index 21b5a50..7297e64 100644 --- a/kdat/KDat.kdoc +++ b/kdat/KDat.kdoc @@ -12,7 +12,7 @@ Archive::startBlock=Archive.html#startBlock Archive::endBlock=Archive.html#endBlock Archive::name=Archive.html#name Archive::files=Archive.html#files -Archive::tqchildren=Archive.html#tqchildren +Archive::children=Archive.html#children Archive::setEndBlock=Archive.html#setEndBlock Archive::setName=Archive.html#setName Archive::addFile=Archive.html#addFile @@ -94,7 +94,7 @@ File::size=File.html#size File::mtime=File.html#mtime File::record=File.html#record File::name=File.html#name -File::tqchildren=File.html#tqchildren +File::children=File.html#children IndexDlg=IndexDlg.html IndexDlg=IndexDlg.html IndexDlg::_tarParser=IndexDlg.html#_tarParser @@ -387,7 +387,7 @@ TapeDrive::seek=TapeDrive.html#seek TapeDrive::unlock=TapeDrive.html#unlock TapeDrive::write=TapeDrive.html#write TapeDrive::slotTapeBlockSize=TapeDrive.html#slotTapeBlockSize -TapeDrive::slottqStatus=TapeDrive.html#slottqStatus +TapeDrive::slotStatus=TapeDrive.html#slotStatus TapeDrive::status=TapeDrive.html#status TapeInfoDlg=TapeInfoDlg.html TapeInfoDlg=TapeInfoDlg.html @@ -475,7 +475,7 @@ KTreeViewItem::KTreeViewItem=KTreeViewItem.html#KTreeViewItem KTreeViewItem::KTreeViewItem=KTreeViewItem.html#KTreeViewItem KTreeViewItem::~KTreeViewItem=KTreeViewItem.html#~KTreeViewItem KTreeViewItem::appendChild=KTreeViewItem.html#appendChild -KTreeViewItem::tqchildAt=KTreeViewItem.html#tqchildAt +KTreeViewItem::childAt=KTreeViewItem.html#childAt KTreeViewItem::childCount=KTreeViewItem.html#childCount KTreeViewItem::childIndex=KTreeViewItem.html#childIndex KTreeViewItem::expandButtonClicked=KTreeViewItem.html#expandButtonClicked diff --git a/kdat/KDatMainWindow.cpp b/kdat/KDatMainWindow.cpp index 3bc2b6d..5f6427c 100644 --- a/kdat/KDatMainWindow.cpp +++ b/kdat/KDatMainWindow.cpp @@ -26,8 +26,8 @@ #include <tqdir.h> #include <tqfileinfo.h> #include <tqkeycode.h> -#include <tqlayout.h> -#include <tqtextstream.h> +#include <layout.h> +#include <textstream.h> #include <kapplication.h> #include <kiconloader.h> @@ -152,7 +152,7 @@ KDatMainWindow::KDatMainWindow() _menu->insertItem( i18n( "&File" ), _fileMenu ); _menu->insertItem( i18n( "&Settings" ), _editMenu ); _menu->insertSeparator(); - TQString about = i18n( "KDat Version %1\n\nKDat is a tar-based tape archiver.\n\nCopyright (c) 1998-2000 Sean Vyain\nCopyright (c) 2001-2002 Lawrence Widman\nkdat@cardiothink.com" ).tqarg( KDAT_VERSION ); + TQString about = i18n( "KDat Version %1\n\nKDat is a tar-based tape archiver.\n\nCopyright (c) 1998-2000 Sean Vyain\nCopyright (c) 2001-2002 Lawrence Widman\nkdat@cardiothink.com" ).arg( KDAT_VERSION ); _menu->insertItem( i18n( "&Help" ), helpMenu( about ) ); _toolbar = new KToolBar( this ); @@ -211,7 +211,7 @@ KDatMainWindow::KDatMainWindow() _tree->insertItem( _backupProfileRootNode = new BackupProfileRootNode() ); _tree->insertItem( new TapeIndexRootNode() ); - connect( TapeDrive::instance(), TQT_SIGNAL( sigtqStatus( const TQString & ) ), this, TQT_SLOT( status( const TQString & ) ) ); + connect( TapeDrive::instance(), TQT_SIGNAL( sigStatus( const TQString & ) ), this, TQT_SLOT( status( const TQString & ) ) ); setTapePresent( FALSE ); @@ -387,7 +387,7 @@ void KDatMainWindow::localSelected( int index ) _tree->expandItem( index ); _tree->collapseItem( index ); // 2002-01-30 LEW } - // tqrepaint(); // this doesn't work 2002-01-30 LEW + // repaint(); // this doesn't work 2002-01-30 LEW /* 2002-01-30 LEW: RG and I don't like this behavior */ } @@ -419,7 +419,7 @@ void KDatMainWindow::fileBackup() TQString msg = i18n("KDat will dump your files properly to tape, but may not be able\n" "to restore them. To restore your files by hand, you need to know\n" "the name of the *non-rewinding* version of your tape device %1.\n" - ).tqarg(Options::instance()->getTapeDevice()); + ).arg(Options::instance()->getTapeDevice()); TQString msg2 = i18n("For example, if your device is /dev/st0, the non-rewinding version\n" "is /dev/nst0. If your device name doesn't look like that, type\n" "\"ls -l %2\" in a terminal window to see the real name of your\n" @@ -430,7 +430,7 @@ void KDatMainWindow::fileBackup() "The third call to \"tar\" will retrieve your data into your\n" "current directory. Please let us know if this happens to you!\n" " - KDat Maintenance Team\n" - ).tqarg(Options::instance()->getTapeDevice()); + ).arg(Options::instance()->getTapeDevice()); msg = msg.append(msg2); KMessageBox::sorry( this, msg); /* 2002-01-28 LEW */ @@ -446,7 +446,7 @@ void KDatMainWindow::fileBackup() backupProfile.setRemoveSnapshot( bp->getRemoveSnapshot() ); } else { TQString name; - name = i18n( "Archive created on %1" ).tqarg( KGlobal::locale()->formatDate(TQDate::tqcurrentDate(), true) ); + name = i18n( "Archive created on %1" ).arg( KGlobal::locale()->formatDate(TQDate::currentDate(), true) ); name = name.stripWhiteSpace(); TQStringList files; @@ -486,8 +486,8 @@ void KDatMainWindow::fileBackup() msg = i18n( "WARNING: The estimated archive size is %1 KB but " "the tape has only %2 KB of space!\n" "Back up anyway?" ) - .tqarg(KGlobal::locale()->formatNumber(size, 0)) - .tqarg(KGlobal::locale()->formatNumber(TapeManager::instance()->getMountedTape()->getSize() - tapeSize, 0 )); + .arg(KGlobal::locale()->formatNumber(size, 0)) + .arg(KGlobal::locale()->formatNumber(TapeManager::instance()->getMountedTape()->getSize() - tapeSize, 0 )); int result = KMessageBox::warningContinueCancel( this, msg, i18n("Backup"), i18n("Backup") ); if ( result != KMessageBox::Continue) { @@ -556,15 +556,15 @@ void KDatMainWindow::doVerify( bool restore ) Archive* archive = 0; // Check for marked files first. for ( int i = _tapeDriveNode->childCount() - 1; i >= 0; i-- ) { - if ( ( ((SelectableNode*)_tapeDriveNode->tqchildAt( i ))->isSelected() ) || - ( ((SelectableNode*)_tapeDriveNode->tqchildAt( i ))->hasSelectedChildren() )) { - archiveNode = (MountedArchiveNode*)_tapeDriveNode->tqchildAt( i ); + if ( ( ((SelectableNode*)_tapeDriveNode->childAt( i ))->isSelected() ) || + ( ((SelectableNode*)_tapeDriveNode->childAt( i ))->hasSelectedChildren() )) { + archiveNode = (MountedArchiveNode*)_tapeDriveNode->childAt( i ); archive = archiveNode->getArchive(); /* 2002-01-30 LEW */ #ifdef DEBUG printf("KDatMainWindow::doVerify: %d node of %s: ", i, (SelectableNode*)_tapeDriveNode->getText().latin1() ); - if( ((SelectableNode*)_tapeDriveNode->tqchildAt( i ))->isSelected() ){ + if( ((SelectableNode*)_tapeDriveNode->childAt( i ))->isSelected() ){ printf("is completely selected\n"); } else { printf("is partially selected\n"); @@ -600,7 +600,7 @@ void KDatMainWindow::doVerify( bool restore ) ranges.addRange( it.current()->getStart(), it.current()->getEnd() ); } if ( rangeableNode->isType( Node::MountedArchiveNodeType ) ) { - // Make sure the mounted archive node has populated its tqchildren. + // Make sure the mounted archive node has populated its children. archiveNode = (MountedArchiveNode*)rangeableNode; if ( archiveNode->childCount() == 0 ) { bool dummy = TRUE; @@ -608,10 +608,10 @@ void KDatMainWindow::doVerify( bool restore ) } for ( int i = rangeableNode->childCount() - 1; i >= 0; i-- ) { - if ( ((Node*)rangeableNode->tqchildAt( i ))->isType( Node::MountedTapeDirectoryNodeType ) ) { - files.append( ((MountedTapeDirectoryNode*)rangeableNode->tqchildAt( i ))->getFullPath() ); - } else if ( ((Node*)rangeableNode->tqchildAt( i ))->isType( Node::MountedTapeFileNodeType ) ) { - files.append( ((MountedTapeFileNode*)rangeableNode->tqchildAt( i ))->getFullPath() ); + if ( ((Node*)rangeableNode->childAt( i ))->isType( Node::MountedTapeDirectoryNodeType ) ) { + files.append( ((MountedTapeDirectoryNode*)rangeableNode->childAt( i ))->getFullPath() ); + } else if ( ((Node*)rangeableNode->childAt( i ))->isType( Node::MountedTapeFileNodeType ) ) { + files.append( ((MountedTapeFileNode*)rangeableNode->childAt( i ))->getFullPath() ); } else { assert( FALSE ); } @@ -627,14 +627,14 @@ void KDatMainWindow::doVerify( bool restore ) // Compile a list of files to verify/restore. TQPtrStack<RangeableNode> stack; - // Make sure the mounted archive node has populated its tqchildren. + // Make sure the mounted archive node has populated its children. if ( archiveNode->childCount() == 0 ) { bool dummy = TRUE; archiveNode->expanding( dummy ); } for ( int i = archiveNode->childCount() - 1; i >= 0; i-- ) { - stack.push( (RangeableNode*)archiveNode->tqchildAt( i ) ); + stack.push( (RangeableNode*)archiveNode->childAt( i ) ); } RangeableNode* sel = 0; while ( stack.count() > 0 ) { @@ -654,7 +654,7 @@ void KDatMainWindow::doVerify( bool restore ) } } else if ( sel->hasSelectedChildren() ) { for ( int i = sel->childCount() - 1; i >= 0; i-- ) { - stack.push( (RangeableNode*)sel->tqchildAt( i ) ); + stack.push( (RangeableNode*)sel->childAt( i ) ); } } } @@ -697,7 +697,7 @@ void KDatMainWindow::fileMountTape() "correct device is selected as the tape drive (e.g.\n" "/dev/st0). If you hear the tape drive moving, wait\n" "until it stops and then try mounting it again.") - .tqarg(Options::instance()->getTapeDevice()); + .arg(Options::instance()->getTapeDevice()); if ( !TapeManager::instance()->getMountedTape() ) { if ( Options::instance()->getLoadOnMount() ) { @@ -727,7 +727,7 @@ void KDatMainWindow::fileIndexTape() IndexDlg dlg( TapeManager::instance()->getMountedTape(), this ); if ( dlg.exec() == TQDialog::Accepted ) { TQString title; - title = i18n( "KDat: %1" ).tqarg( TapeManager::instance()->getMountedTape()->getName() ); + title = i18n( "KDat: %1" ).arg( TapeManager::instance()->getMountedTape()->getName() ); setCaption( title ); setIconText( title ); @@ -776,7 +776,7 @@ void KDatMainWindow::fileDeleteArchive() } TQString msg = - i18n( "An archive cannot be removed from the middle of the tape. If\nthe archive '%1' is deleted then\nthe following archives will also be deleted:\n%2\n\nDelete all listed archives?" ).tqarg(archive->getName()).tqarg(list); + i18n( "An archive cannot be removed from the middle of the tape. If\nthe archive '%1' is deleted then\nthe following archives will also be deleted:\n%2\n\nDelete all listed archives?" ).arg(archive->getName()).arg(list); int result = KMessageBox::warningContinueCancel( this, msg, i18n("Delete Archive"), i18n("Delete All")); if (result == KMessageBox::Continue) { @@ -790,7 +790,7 @@ void KDatMainWindow::fileDeleteArchive() } else { // This is the last (known) archive on the tape. TQString msg = - i18n( "Really delete the archive '%1'?" ).tqarg(archive->getName()); + i18n( "Really delete the archive '%1'?" ).arg(archive->getName()); int result = KMessageBox::warningContinueCancel( this, msg, i18n("Delete Archive"), i18n("Delete")); if (result == KMessageBox::Continue) { @@ -824,7 +824,7 @@ void KDatMainWindow::fileDeleteIndex() } TQString msg = - i18n( "Really delete the index for '%1'?" ).tqarg(tape->getName()); + i18n( "Really delete the index for '%1'?" ).arg(tape->getName()); int result = KMessageBox::warningContinueCancel( this, msg, i18n("Delete Tape Index"), i18n("Delete")); if (result == KMessageBox::Continue) { @@ -847,7 +847,7 @@ void KDatMainWindow::fileFormatTape() "correct device is selected as the tape drive (e.g.\n" "/dev/st0). If you hear the tape drive moving, wait\n" "until it stops and then try mounting it again.") - .tqarg(Options::instance()->getTapeDevice()); + .arg(Options::instance()->getTapeDevice()); if ( !TapeDrive::instance()->isTapePresent() ) { KMessageBox::sorry( this, msg ); @@ -865,7 +865,7 @@ void KDatMainWindow::fileFormatTape() i18n("Format Tape"), i18n("Format")); if (result == KMessageBox::Continue ) { TQString name; - name = i18n( "Tape created on %1" ).tqarg( KGlobal::locale()->formatDate(TQDate::tqcurrentDate(), true) ); + name = i18n( "Tape created on %1" ).arg( KGlobal::locale()->formatDate(TQDate::currentDate(), true) ); FormatOptDlg dlg( name.stripWhiteSpace(), this ); if ( dlg.exec() != TQDialog::Accepted ) { return; @@ -898,7 +898,7 @@ void KDatMainWindow::fileNewBackupProfile() // Pick a unique name. TQString name; for ( int i = 1; ; i++ ) { - name = i18n( "Backup Profile %1").tqarg( i ); + name = i18n( "Backup Profile %1").arg( i ); TQStringList list = BackupProfileManager::instance()->getBackupProfileNames(); TQStringList::Iterator it = list.begin(); for ( ; it != list.end(); ++it ) { @@ -946,7 +946,7 @@ void KDatMainWindow::fileDeleteBackupProfile() assert( backupProfile ); TQString msg = - i18n("Really delete backup profile '%1'?").tqarg(backupProfile->getName()); + i18n("Really delete backup profile '%1'?").arg(backupProfile->getName()); int result = KMessageBox::warningContinueCancel( this, msg, i18n("Delete Backup Profile"), i18n("Delete")); if (result == KMessageBox::Continue) { @@ -1103,8 +1103,8 @@ int KDatMainWindow::calcBackupSize( const TQString& workingDir, bool local, cons if( stop_flag == TRUE ) break; TQString* path = dirStack.pop(); msg = i18n("Estimating backup size: %1, %2" ) - .tqarg(Util::kbytesToString( size / 2 )) - .tqarg(KStringHandler::csqueeze(*path, 60)); + .arg(Util::kbytesToString( size / 2 )) + .arg(KStringHandler::csqueeze(*path, 60)); status( msg ); KApplication::kApplication()->processEvents(); dir.setPath( *path ); @@ -1165,7 +1165,7 @@ void KDatMainWindow::getBackupFiles( TQStringList& files ) files.append( sel->getFullPath() ); } else if ( sel->hasSelectedChildren() ) { for ( int i = sel->childCount() - 1; i >= 0; i-- ) { - stack.push( (ArchiveableNode*)sel->tqchildAt( i ) ); + stack.push( (ArchiveableNode*)sel->childAt( i ) ); } } } @@ -1192,9 +1192,9 @@ void KDatMainWindow::setBackupFiles( const TQStringList& files ) } int i; for ( i = n->childCount() - 1; i >=0; i-- ) { - tmp = ((ArchiveableNode*)n->tqchildAt( i ))->getFullPath(); + tmp = ((ArchiveableNode*)n->childAt( i ))->getFullPath(); if ( tmp == (*it).left( tmp.length() ) ) { - n = (ArchiveableNode*)n->tqchildAt( i ); + n = (ArchiveableNode*)n->childAt( i ); break; } } @@ -1232,7 +1232,7 @@ void KDatMainWindow::configureUI( Tape* tape ) // Title bar if ( tape ) { TQString title; - title = i18n( "KDat: %1" ).tqarg(tape->getName()); + title = i18n( "KDat: %1" ).arg(tape->getName()); setCaption( title ); setIconText( title ); } else { @@ -1251,8 +1251,8 @@ void KDatMainWindow::configureUI( Tape* tape ) bool canRestore = ( tape ) && ( sel ) && sel->isType( Node::RangeableNodeType ); if ( !canRestore ) { for ( int i = _tapeDriveNode->childCount() - 1; i >= 0; i-- ) { - if ( ( ((SelectableNode*)_tapeDriveNode->tqchildAt( i ))->isSelected() ) || - ( ((SelectableNode*)_tapeDriveNode->tqchildAt( i ))->hasSelectedChildren() )) { + if ( ( ((SelectableNode*)_tapeDriveNode->childAt( i ))->isSelected() ) || + ( ((SelectableNode*)_tapeDriveNode->childAt( i ))->hasSelectedChildren() )) { canRestore = TRUE; break; } @@ -1348,7 +1348,7 @@ void KDatMainWindow::create_backup_dialog() _lbl->setGeometry( TQRect( 30, 20, 350, 200 ) ); _cancel = new KPushButton( KStdGuiItem::cancel(), _backupdialog ); - _cancel->setFixedSize( 80, _cancel->tqsizeHint().height() ); + _cancel->setFixedSize( 80, _cancel->sizeHint().height() ); _cancel->setEnabled( TRUE ); /* 2002-01-24 LEW: looks like we can't increase the button width to accomodate a wider message :( */ @@ -1357,7 +1357,7 @@ void KDatMainWindow::create_backup_dialog() connect( _cancel, TQT_SIGNAL( clicked() ), this, TQT_SLOT( backupCancel() ) ); _continue = new KPushButton( KStdGuiItem::cont(), _backupdialog ); - _continue->setFixedSize( 80, _continue->tqsizeHint().height() ); + _continue->setFixedSize( 80, _continue->sizeHint().height() ); _continue->setEnabled( TRUE ); _continue->setDefault( TRUE ); // _continue->setGeometry( TQRect( 200, 170, 0, 0 ) ); /* 2002-01-28 LEW */ diff --git a/kdat/LoggerWidget.cpp b/kdat/LoggerWidget.cpp index 3505dfb..a5c097a 100644 --- a/kdat/LoggerWidget.cpp +++ b/kdat/LoggerWidget.cpp @@ -17,7 +17,7 @@ // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA #include <tqlabel.h> -#include <tqlayout.h> +#include <layout.h> #include <tqmultilineedit.h> #include <kapplication.h> @@ -33,7 +33,7 @@ LoggerWidget::LoggerWidget( const TQString & title, TQWidget* parent, const char : TQWidget( parent, name ) { TQLabel* lbl1 = new TQLabel( title, this ); - lbl1->setFixedHeight( lbl1->tqsizeHint().height() ); + lbl1->setFixedHeight( lbl1->sizeHint().height() ); _mle = new TQMultiLineEdit( this ); _mle->setReadOnly( TRUE ); diff --git a/kdat/Node.cpp b/kdat/Node.cpp index 006e978..cfc0610 100644 --- a/kdat/Node.cpp +++ b/kdat/Node.cpp @@ -58,7 +58,7 @@ void Node::insertNode( Node* child ) if ( lastParent != this ) { // Recompute lastDirIndex. for ( lastDirIndex = 0; - ( lastDirIndex < childCount() ) && ( ((Node*)tqchildAt( lastDirIndex ))->getType() == TapeDirectoryNodeType ); + ( lastDirIndex < childCount() ) && ( ((Node*)childAt( lastDirIndex ))->getType() == TapeDirectoryNodeType ); lastDirIndex++ ); lastParent = this; } @@ -83,7 +83,7 @@ void Node::insertNode( Node* child ) while ( min < max ) { mid = ( max - min ) / 2 + min; //mid = ( min + max ) / 2; - if ( child->getText().compare( tqchildAt( mid )->getText() ) < 0 ) { + if ( child->getText().compare( childAt( mid )->getText() ) < 0 ) { max = mid - 1; } else { min = mid + 1; @@ -94,8 +94,8 @@ void Node::insertNode( Node* child ) // KLUDGE! mid -= 5; if ( mid < smin ) mid = smin; - if ( ((Node*)tqchildAt( mid ))->getType() != child->getType() ) mid++; - for ( ; ( mid <= smax ) && ( child->getText().compare( tqchildAt( mid )->getText() ) > 0 ); mid++ ); + if ( ((Node*)childAt( mid ))->getType() != child->getType() ) mid++; + for ( ; ( mid <= smax ) && ( child->getText().compare( childAt( mid )->getText() ) > 0 ); mid++ ); //printf( "index = %d, text = '%s'\n", mid, child->getText().data() ); insertChild( mid, child ); } else { @@ -181,14 +181,14 @@ bool TapeNode::validate() // Remove deleted archives. Archive* a; for ( uint j = 0; j < childCount(); ) { - a = ((ArchiveNode*)tqchildAt( j ))->getArchive(); + a = ((ArchiveNode*)childAt( j ))->getArchive(); for ( i.toFirst(); i.current(); ++i ) { if ( i.current() == a ) { break; } } if ( !i.current() ) { - removeChild( tqchildAt( j ) ); + removeChild( childAt( j ) ); } else { j++; } @@ -211,7 +211,7 @@ void TapeNode::expanding( bool expand ) expand = TRUE; if ( childCount() > 0 ) { - // We already have the tqchildren added + // We already have the children added return; } @@ -235,8 +235,8 @@ ArchiveNode* TapeNode::findArchiveNode( Archive* archive ) { ArchiveNode* n = 0; for ( uint i = 0; i < childCount(); i++ ) { - if ( ((ArchiveNode*)tqchildAt( i ))->getArchive() == archive ) { - n = (ArchiveNode*)tqchildAt( i ); + if ( ((ArchiveNode*)childAt( i ))->getArchive() == archive ) { + n = (ArchiveNode*)childAt( i ); break; } } @@ -280,7 +280,7 @@ void ArchiveNode::expanding( bool expand ) expand = TRUE; if ( childCount() > 0 ) { - // We already have the tqchildren added. + // We already have the children added. return; } @@ -338,7 +338,7 @@ void TapeDirectoryNode::expanding( bool expand ) expand = TRUE; if ( childCount() > 0 ) { - // We already have the tqchildren added. + // We already have the children added. return; } @@ -411,7 +411,7 @@ void SelectableNode::doUpdateState() bool hasSelected = FALSE; bool allSelected = TRUE; for ( uint i = 0; i < childCount(); i++ ) { - switch ( ((SelectableNode*)tqchildAt( i ))->_state ) { + switch ( ((SelectableNode*)childAt( i ))->_state ) { case SelAll: oneSelected = TRUE; hasSelected = TRUE; @@ -443,15 +443,15 @@ void SelectableNode::doUpdateState() void SelectableNode::doSetSelected( bool select ) { - // All my tqchildren get the same selection state. + // All my children get the same selection state. for ( uint i = 0; i < childCount(); i++ ) { if ( select ) { - if ( !((SelectableNode*)tqchildAt( i ))->isSelected() ) { - ((SelectableNode*)tqchildAt( i ))->doSetSelected( TRUE ); + if ( !((SelectableNode*)childAt( i ))->isSelected() ) { + ((SelectableNode*)childAt( i ))->doSetSelected( TRUE ); } } else { - if ( ((SelectableNode*)tqchildAt( i ))->isSelected() || ((SelectableNode*)tqchildAt( i ))->hasSelectedChildren() ) { - ((SelectableNode*)tqchildAt( i ))->doSetSelected( FALSE ); + if ( ((SelectableNode*)childAt( i ))->isSelected() || ((SelectableNode*)childAt( i ))->hasSelectedChildren() ) { + ((SelectableNode*)childAt( i ))->doSetSelected( FALSE ); } } } @@ -549,7 +549,7 @@ void SelectableNode::paintText( TQPainter* p, int indent, int cellHeight, p->fontMetrics().leading()) / 2); if (highlighted) { paintHighlight(p, indent, cg, owner->hasFocus(), - (TQt::GUIStyle)owner->tqstyle().tqstyleHint(TQStyle::SH_GUIStyle)); // TQt3 doesn't make this easy ;) + (TQt::GUIStyle)owner->tqstyle().styleHint(TQStyle::SH_GUIStyle)); // TQt3 doesn't make this easy ;) p->setPen(cg.base()); p->setBackgroundColor(cg.text()); } @@ -605,7 +605,7 @@ void SelectableNode::setSelected( bool select ) ((SelectableNode*)getParent())->doUpdateState(); } - owner->tqrepaint(); + owner->repaint(); KDatMainWindow::getInstance()->configureUI( TapeManager::instance()->getMountedTape() ); } @@ -657,8 +657,8 @@ void MountedArchiveNode::setSelected( bool select ) // Deselect all other archives. Node* parent = (Node*)getParent(); for ( int i = parent->childCount() - 1; i >= 0; i-- ) { - if ( parent->tqchildAt( i ) != this ) { - ((SelectableNode*)parent->tqchildAt( i ))->setSelected( FALSE ); + if ( parent->childAt( i ) != this ) { + ((SelectableNode*)parent->childAt( i ))->setSelected( FALSE ); } } } @@ -680,7 +680,7 @@ void MountedArchiveNode::expanding( bool expand ) expand = TRUE; if ( childCount() > 0 ) { - // We already have the tqchildren added. + // We already have the children added. return; } @@ -757,8 +757,8 @@ void MountedTapeDirectoryNode::setSelected( bool select ) parent = (Node*)parent->getParent(); } for ( int i = parent->childCount() - 1; i >= 0; i-- ) { - if ( parent->tqchildAt( i ) != arcNode ) { - ((SelectableNode*)parent->tqchildAt( i ))->setSelected( FALSE ); + if ( parent->childAt( i ) != arcNode ) { + ((SelectableNode*)parent->childAt( i ))->setSelected( FALSE ); } } } @@ -780,7 +780,7 @@ void MountedTapeDirectoryNode::expanding( bool expand ) expand = TRUE; if ( childCount() > 0 ) { - // We already have the tqchildren added. + // We already have the children added. return; } @@ -863,8 +863,8 @@ void MountedTapeFileNode::setSelected( bool select ) parent = (Node*)parent->getParent(); } for ( int i = parent->childCount() - 1; i >= 0; i-- ) { - if ( parent->tqchildAt( i ) != arcNode ) { - ((SelectableNode*)parent->tqchildAt( i ))->setSelected( FALSE ); + if ( parent->childAt( i ) != arcNode ) { + ((SelectableNode*)parent->childAt( i ))->setSelected( FALSE ); } } } @@ -934,7 +934,7 @@ void RootNode::expanding( bool expand ) { expand = TRUE; - // If we already have some tqchildren, check to see if the directory has been modified. + // If we already have some children, check to see if the directory has been modified. if ( childCount() > 0 ) { struct stat statinfo; if ( stat( "/", &statinfo ) < 0 ) { @@ -950,7 +950,7 @@ void RootNode::expanding( bool expand ) _mtime = statinfo.st_mtime; - // Remove all the tqchildren. + // Remove all the children. Node* n; while ( ( n = (Node*)getChild() ) ) { removeChild( n ); @@ -975,7 +975,7 @@ void RootNode::expanding( bool expand ) return; } - // Fill in the child's tqchildren. + // Fill in the child's children. const TQFileInfoList* list = dir.entryInfoList( TQDir::Hidden | TQDir::Files | TQDir::Dirs, TQDir::Name | TQDir::DirsFirst ); if ( list ) { TQFileInfoListIterator it( *list ); @@ -1050,7 +1050,7 @@ void DirectoryNode::expanding( bool expand ) } path.prepend( "/" ); - // If we already have some tqchildren, check to see if the directory has been modified. + // If we already have some children, check to see if the directory has been modified. if ( childCount() > 0 ) { struct stat statinfo; if ( stat( TQFile::encodeName(path), &statinfo ) < 0 ) { @@ -1066,7 +1066,7 @@ void DirectoryNode::expanding( bool expand ) _mtime = statinfo.st_mtime; - // Remove all the tqchildren. + // Remove all the children. Node* n; while ( ( n = (Node*)getChild() ) ) { removeChild( n ); @@ -1091,7 +1091,7 @@ void DirectoryNode::expanding( bool expand ) return; } - // Fill in the child's tqchildren. + // Fill in the child's children. const TQFileInfoList* list = dir.entryInfoList( TQDir::Hidden | TQDir::Files | TQDir::Dirs, TQDir::Name | TQDir::DirsFirst ); if ( list ) { TQFileInfoListIterator it( *list ); @@ -1210,7 +1210,7 @@ void TapeDriveNode::expanding( bool expand ) expand = TRUE; if ( childCount() > 0 ) { - // We already have the tqchildren added + // We already have the children added return; } @@ -1254,7 +1254,7 @@ void TapeDriveNode::slotTapeUnmounted() setPixmap( *ImageCache::instance()->getTapeUnmounted() ); setText( i18n( "<no tape>" ) ); - // Remove all the tqchildren. + // Remove all the children. Node* n; while ( ( n = (Node*)getChild() ) ) { Node::removeChild( n ); @@ -1304,14 +1304,14 @@ void TapeDriveNode::slotTapeModified( Tape* tape ) // Remove deleted archives. Archive* a; for ( uint j = 0; j < childCount(); ) { - a = ((MountedArchiveNode*)tqchildAt( j ))->getArchive(); + a = ((MountedArchiveNode*)childAt( j ))->getArchive(); for ( i.toFirst(); i.current(); ++i ) { if ( i.current() == a ) { break; } } if ( !i.current() ) { - Node::removeChild( tqchildAt( j ) ); + Node::removeChild( childAt( j ) ); } else { j++; } @@ -1322,8 +1322,8 @@ MountedArchiveNode* TapeDriveNode::findArchiveNode( Archive* archive ) { MountedArchiveNode* n = 0; for ( uint i = 0; i < childCount(); i++ ) { - if ( ((MountedArchiveNode*)tqchildAt( i ))->getArchive() == archive ) { - n = (MountedArchiveNode*)tqchildAt( i ); + if ( ((MountedArchiveNode*)childAt( i ))->getArchive() == archive ) { + n = (MountedArchiveNode*)childAt( i ); break; } } @@ -1417,7 +1417,7 @@ TapeNode* TapeIndexRootNode::findTapeNode( Tape* tape ) { TapeNode* n = 0; for ( uint i = 0; i < childCount(); i++ ) { - n = (TapeNode*)tqchildAt( i ); + n = (TapeNode*)childAt( i ); if ( n->getTape() == tape ) { return n; } @@ -1575,7 +1575,7 @@ BackupProfileNode* BackupProfileRootNode::findBackupProfileNode( BackupProfile* { BackupProfileNode* n = 0; for ( uint i = 0; i < childCount(); i++ ) { - n = (BackupProfileNode*)tqchildAt( i ); + n = (BackupProfileNode*)childAt( i ); if ( n->getBackupProfile() == backupProfile ) { return n; } diff --git a/kdat/Node.h b/kdat/Node.h index d2d0c26..2caa24b 100644 --- a/kdat/Node.h +++ b/kdat/Node.h @@ -90,7 +90,7 @@ public: /** * This method is called immediately before the node is to be expanded. - * This method can be used to fill in the tqchildren of this node, or + * This method can be used to fill in the children of this node, or * prevent the node from expanding. The default implementation does * nothing. * @@ -359,7 +359,7 @@ public: virtual bool isType( int type ); /** - * Determine whether the node and all of its tqchildren are selected. + * Determine whether the node and all of its children are selected. * * @return TRUE if the node is selected, otherwise FALSE. */ @@ -373,7 +373,7 @@ public: bool hasSelectedChildren(); /** - * Select/deselect this node and all of its tqchildren. + * Select/deselect this node and all of its children. * * @param selected TRUE means the node will be selected, FALSE means the * node will be deselected. @@ -445,7 +445,7 @@ public: virtual const TQPtrList<Range>& getRanges(); /** - * Select/deselect this node and all of its tqchildren. + * Select/deselect this node and all of its children. * * @param selected TRUE means the node will be selected, FALSE means the * node will be deselected. @@ -516,7 +516,7 @@ public: virtual const TQPtrList<Range>& getRanges(); /** - * Select/deselect this node and all of its tqchildren. + * Select/deselect this node and all of its children. * * @param selected TRUE means the node will be selected, FALSE means the * node will be deselected. @@ -596,7 +596,7 @@ public: virtual const TQPtrList<Range>& getRanges(); /** - * Select/deselect this node and all of its tqchildren. + * Select/deselect this node and all of its children. * * @param selected TRUE means the node will be selected, FALSE means the * node will be deselected. @@ -863,7 +863,7 @@ public slots: /** * Locate the child associated with the modified tape index, and make sure - * that the displayed information (including all tqchildren) is updated. + * that the displayed information (including all children) is updated. * * @param tape A pointer to the tape index that was modified. */ @@ -924,7 +924,7 @@ public slots: /** * Locate the child associated with the modified tape index, and make sure - * that the displayed information (including all tqchildren) is updated. + * that the displayed information (including all children) is updated. * * @param tape A pointer to the tape index that was modified. */ diff --git a/kdat/OptionsDlgWidget.ui b/kdat/OptionsDlgWidget.ui index aaa9348..c5c9583 100644 --- a/kdat/OptionsDlgWidget.ui +++ b/kdat/OptionsDlgWidget.ui @@ -22,7 +22,7 @@ </property> <widget class="TQLayoutWidget"> <property name="name"> - <cstring>tqlayout4</cstring> + <cstring>layout4</cstring> </property> <vbox> <property name="name"> @@ -33,7 +33,7 @@ </property> <widget class="TQLayoutWidget"> <property name="name"> - <cstring>tqlayout5</cstring> + <cstring>layout5</cstring> </property> <grid> <property name="name"> @@ -43,7 +43,7 @@ <property name="name"> <cstring>_defaultTapeSize</cstring> </property> - <property name="tqminimumSize"> + <property name="minimumSize"> <size> <width>96</width> <height>0</height> @@ -60,7 +60,7 @@ <property name="name"> <cstring>_tapeBlockSize</cstring> </property> - <property name="tqminimumSize"> + <property name="minimumSize"> <size> <width>96</width> <height>0</height> @@ -128,7 +128,7 @@ </widget> <widget class="TQLayoutWidget"> <property name="name"> - <cstring>tqlayout1</cstring> + <cstring>layout1</cstring> </property> <grid> <property name="name"> @@ -283,7 +283,7 @@ You must still specify the block size.</string> <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="tqsizeHint"> + <property name="sizeHint"> <size> <width>20</width> <height>0</height> diff --git a/kdat/Tape.cpp b/kdat/Tape.cpp index 1f762c3..ff35d1a 100644 --- a/kdat/Tape.cpp +++ b/kdat/Tape.cpp @@ -216,7 +216,7 @@ void Tape::read() default: { KMessageBox::sorry( KDatMainWindow::getInstance(), - i18n( "The tape index file format is version %d. The index cannot be read by this version of KDat. Perhaps the tape index file was created by a newer version of KDat?" ).tqarg(version ), + i18n( "The tape index file format is version %d. The index cannot be read by this version of KDat. Perhaps the tape index file was created by a newer version of KDat?" ).arg(version ), i18n("Tape Index") ); } } @@ -226,7 +226,7 @@ void Tape::readAll( int version ) { read(); - TQPtrListIterator<Archive> i( _tqchildren ); + TQPtrListIterator<Archive> i( _children ); for ( ; i.current(); ++i ) { i.current()->readAll( version ); } @@ -282,7 +282,7 @@ void Tape::write() memset( buf, 0, 4096 ); memcpy( buf, _name.ascii(), _name.length() > 4095 ? 4095 : _name.length() ); fwrite( buf, sizeof( char ), 4096, _fptr ); - int ival = _tqchildren.count(); + int ival = _children.count(); fwrite( &ival, sizeof( ival ), 1, _fptr ); // Fill in the archive offsets later... @@ -292,7 +292,7 @@ void Tape::write() } //===== Write archives ===== - TQPtrListIterator<Archive> i( _tqchildren ); + TQPtrListIterator<Archive> i( _children ); int count = 0; for ( ; i.current(); ++i, count++ ) { // Fill in the file offset. @@ -346,7 +346,7 @@ const TQPtrList<Archive>& Tape::getChildren() { read(); - return _tqchildren; + return _children; } void Tape::setName( const TQString & name ) @@ -528,7 +528,7 @@ void Tape::addChild( Archive* archive ) archive->calcRanges(); - _tqchildren.append( archive ); + _children.append( archive ); char buf[4096]; fseek( _fptr, 0, SEEK_END ); @@ -537,9 +537,9 @@ void Tape::addChild( Archive* archive ) fgets( buf, 4096, _fptr ); fgets( buf, 4096, _fptr ); fseek( _fptr, 12 + 4096, SEEK_CUR ); - int ival = _tqchildren.count(); + int ival = _children.count(); fwrite( &ival, sizeof( ival ), 1, _fptr ); - fseek( _fptr, ( _tqchildren.count() - 1 ) * 4, SEEK_CUR ); + fseek( _fptr, ( _children.count() - 1 ) * 4, SEEK_CUR ); fwrite( &here, sizeof( here ), 1, _fptr ); fseek( _fptr, here, SEEK_SET ); archive->write( _fptr ); @@ -559,21 +559,21 @@ void Tape::removeChild( Archive* archive ) { read(); - while ( _tqchildren.last() != archive ) { - _tqchildren.removeLast(); + while ( _children.last() != archive ) { + _children.removeLast(); } - _tqchildren.removeLast(); + _children.removeLast(); char buf[4096]; fseek( _fptr, 0, SEEK_SET ); fgets( buf, 4096, _fptr ); fgets( buf, 4096, _fptr ); fseek( _fptr, 12 + 4096, SEEK_CUR ); - int ival = _tqchildren.count(); + int ival = _children.count(); fwrite( &ival, sizeof( ival ), 1, _fptr ); int here; if ( ival > 0 ) { - fseek( _fptr, _tqchildren.count() * 4, SEEK_CUR ); + fseek( _fptr, _children.count() * 4, SEEK_CUR ); fread( &here, sizeof( here ), 1, _fptr ); } else { fseek( _fptr, MAX_NUM_ARCHIVES * 4, SEEK_CUR ); @@ -593,13 +593,13 @@ void Tape::removeChild( Archive* archive ) void Tape::clear() { - if ( _tqchildren.count() < 1 ) { + if ( _children.count() < 1 ) { return; } - while ( _tqchildren.first() ) { - delete _tqchildren.first(); - _tqchildren.removeFirst(); + while ( _children.first() ) { + delete _children.first(); + _children.removeFirst(); } char buf[4096]; @@ -607,7 +607,7 @@ void Tape::clear() fgets( buf, 4096, _fptr ); fgets( buf, 4096, _fptr ); fseek( _fptr, 12 + 4096, SEEK_CUR ); - int ival = _tqchildren.count(); + int ival = _children.count(); fwrite( &ival, sizeof( ival ), 1, _fptr ); fseek( _fptr, MAX_NUM_ARCHIVES * 4, SEEK_CUR ); int here = ftell( _fptr ); @@ -711,7 +711,7 @@ void Tape::readVersion1Index( FILE* fptr ) Archive* archive = new Archive( this, archiveTimeStamp, archiveName ); archive->setEndBlock( archiveEndBlock - archiveStartBlock ); - _tqchildren.append( archive ); + _children.append( archive ); // Read the number of files. if ( !fgets( buf, 4096, fptr ) ) { @@ -827,7 +827,7 @@ void Tape::readVersion2Index( FILE* fptr ) int ival; for ( ; numArchives; numArchives-- ) { fread( &ival, sizeof( ival ), 1, fptr ); - _tqchildren.append( new Archive( this, fptr, ival ) ); + _children.append( new Archive( this, fptr, ival ) ); } } @@ -870,7 +870,7 @@ void Tape::readVersion3Index( FILE* fptr ) int ival; for ( ; numArchives; numArchives-- ) { fread( &ival, sizeof( ival ), 1, fptr ); - _tqchildren.append( new Archive( this, fptr, ival ) ); + _children.append( new Archive( this, fptr, ival ) ); } } @@ -913,7 +913,7 @@ void Tape::readVersion4Index( FILE* fptr ) int ival; for ( ; numArchives; numArchives-- ) { fread( &ival, sizeof( ival ), 1, fptr ); - _tqchildren.append( new Archive( this, fptr, ival ) ); + _children.append( new Archive( this, fptr, ival ) ); } /* 2002-01-31 LEW */ diff --git a/kdat/Tape.h b/kdat/Tape.h index 153561e..335619c 100644 --- a/kdat/Tape.h +++ b/kdat/Tape.h @@ -34,7 +34,7 @@ class Tape { int _mtime; TQString _name; int _size; - TQPtrList<Archive> _tqchildren; + TQPtrList<Archive> _children; FILE* _fptr; @@ -148,7 +148,7 @@ public: void removeChild( Archive* archive ); /** - * Recursively destroy all tqchildren of the tape index. + * Recursively destroy all children of the tape index. */ void clear(); }; diff --git a/kdat/TapeDrive.cpp b/kdat/TapeDrive.cpp index 4fbcb25..2e4c59b 100644 --- a/kdat/TapeDrive.cpp +++ b/kdat/TapeDrive.cpp @@ -170,15 +170,15 @@ bool TapeDrive::isTapePresent() } // Get tape status. - struct mtget tapetqStatus; - int ret = ioctl( _fd, MTIOCGET, &tapetqStatus ); + struct mtget tapeStatus; + int ret = ioctl( _fd, MTIOCGET, &tapeStatus ); if ( ret < 0 ) { return FALSE; } // Check for the presence of a tape. -// if ( !GMT_DR_OPEN( tapetqStatus.mt_gstat ) ) { - if ( GMT_ONLINE( tapetqStatus.mt_gstat ) ) { +// if ( !GMT_DR_OPEN( tapeStatus.mt_gstat ) ) { + if ( GMT_ONLINE( tapeStatus.mt_gstat ) ) { // Lock the tape drive door. //struct mtop tapeOp; //tapeOp.mt_op = MTLOCK; @@ -189,9 +189,9 @@ bool TapeDrive::isTapePresent() //} if ( _readOnly ) { - emit sigtqStatus( i18n( "Tape mounted readonly." ) ); + emit sigStatus( i18n( "Tape mounted readonly." ) ); } else { - emit sigtqStatus( i18n( "Tape mounted read/write." ) ); + emit sigStatus( i18n( "Tape mounted read/write." ) ); } return TRUE; } else { @@ -221,14 +221,14 @@ Tape* TapeDrive::readHeader() _tape = NULL; // Rewind tape. - emit sigtqStatus( "Rewinding tape..." ); + emit sigStatus( "Rewinding tape..." ); if ( !rewind() ) { KMessageBox::error( KDatMainWindow::getInstance(), i18n( "Rewinding tape failed." )); return NULL; } // KDat magic string. - emit sigtqStatus( i18n( "Reading magic string..." ) ); + emit sigStatus( i18n( "Reading magic string..." ) ); char magic[9]; if ( read( magic, 9 ) < 9 ) { KMessageBox::error( KDatMainWindow::getInstance(), i18n( "Reading magic string failed." )); @@ -240,7 +240,7 @@ Tape* TapeDrive::readHeader() } // Read version number. - emit sigtqStatus( i18n( "Reading version number..." ) ); + emit sigStatus( i18n( "Reading version number..." ) ); int version; if ( read( (char*)&version, 4 ) < 4 ) { KMessageBox::error( KDatMainWindow::getInstance(), i18n( "Reading version number failed." )); @@ -252,7 +252,7 @@ Tape* TapeDrive::readHeader() } // Read tape ID. - emit sigtqStatus( i18n( "Reading tape ID..." ) ); + emit sigStatus( i18n( "Reading tape ID..." ) ); int len; if ( read( (char*)&len, 4 ) < 4 ) { KMessageBox::error( KDatMainWindow::getInstance(), i18n( "Reading tape ID length failed." )); @@ -517,12 +517,12 @@ bool TapeDrive::seek( int file, int tarBlock ) flush(); // Go to the desired archive. - emit sigtqStatus( i18n( "Skipping to archive..." ) ); + emit sigStatus( i18n( "Skipping to archive..." ) ); int curFile = getFile(); // printf( "TapeDrive::seek() -- curFile = %d\n", curFile ); if ( curFile < 0 ) { - emit sigtqStatus( i18n( "Rewinding tape..." ) ); + emit sigStatus( i18n( "Rewinding tape..." ) ); rewind(); curFile = 0; } @@ -539,11 +539,11 @@ bool TapeDrive::seek( int file, int tarBlock ) // printf( "TapeDrive::seek() -- desired tapeBlock = %d\n", tapeBlock ); // Go to the desired record within the archive. - emit sigtqStatus( i18n( "Skipping to block..." ) ); + emit sigStatus( i18n( "Skipping to block..." ) ); int curBlock = getBlock(); // printf( "TapeDrive::seek() -- curBlock = %d\n", curBlock ); if ( curBlock < 0 ) { - emit sigtqStatus( i18n( "Rewinding tape..." ) ); + emit sigStatus( i18n( "Rewinding tape..." ) ); rewind(); nextFile( file ); if ( ( curBlock = getBlock() ) < 0 ) { @@ -597,13 +597,13 @@ bool TapeDrive::pastEOF() return FALSE; } - struct mtget tapetqStatus; - if ( ioctl( _fd, MTIOCGET, &tapetqStatus ) < 0 ) { + struct mtget tapeStatus; + if ( ioctl( _fd, MTIOCGET, &tapeStatus ) < 0 ) { printf( "TapeDrive::pastEOF() -- ioctl( MTIOCGET ) failed!\n" ); return FALSE; } - return GMT_EOF( tapetqStatus.mt_gstat ); + return GMT_EOF( tapeStatus.mt_gstat ); } bool TapeDrive::setBlockSize( int blockSize ) diff --git a/kdat/TapeDrive.h b/kdat/TapeDrive.h index 06a0b82..7e49aa2 100644 --- a/kdat/TapeDrive.h +++ b/kdat/TapeDrive.h @@ -242,7 +242,7 @@ signals: * * @param msg The informational message. */ - void sigtqStatus( const TQString & msg ); + void sigStatus( const TQString & msg ); }; #endif diff --git a/kdat/TapeFileInfoWidget.cpp b/kdat/TapeFileInfoWidget.cpp index 2a87862..96e7023 100644 --- a/kdat/TapeFileInfoWidget.cpp +++ b/kdat/TapeFileInfoWidget.cpp @@ -19,7 +19,7 @@ #include <time.h> #include <tqlabel.h> -#include <tqlayout.h> +#include <layout.h> #include <kapplication.h> @@ -39,32 +39,32 @@ TapeFileInfoWidget::TapeFileInfoWidget( TQWidget* parent, const char* name ) TQLabel* lbl4 = new TQLabel( i18n( "Start record:" ), this ); TQLabel* lbl5 = new TQLabel( i18n( "End record:" ), this ); - int max = lbl1->tqsizeHint().width(); - if ( lbl2->tqsizeHint().width() > max ) max = lbl2->tqsizeHint().width(); - if ( lbl3->tqsizeHint().width() > max ) max = lbl3->tqsizeHint().width(); - if ( lbl4->tqsizeHint().width() > max ) max = lbl4->tqsizeHint().width(); - if ( lbl5->tqsizeHint().width() > max ) max = lbl5->tqsizeHint().width(); + int max = lbl1->sizeHint().width(); + if ( lbl2->sizeHint().width() > max ) max = lbl2->sizeHint().width(); + if ( lbl3->sizeHint().width() > max ) max = lbl3->sizeHint().width(); + if ( lbl4->sizeHint().width() > max ) max = lbl4->sizeHint().width(); + if ( lbl5->sizeHint().width() > max ) max = lbl5->sizeHint().width(); - lbl1->setFixedSize( max, lbl1->tqsizeHint().height() ); - lbl2->setFixedSize( max, lbl2->tqsizeHint().height() ); - lbl3->setFixedSize( max, lbl3->tqsizeHint().height() ); - lbl4->setFixedSize( max, lbl4->tqsizeHint().height() ); - lbl5->setFixedSize( max, lbl5->tqsizeHint().height() ); + lbl1->setFixedSize( max, lbl1->sizeHint().height() ); + lbl2->setFixedSize( max, lbl2->sizeHint().height() ); + lbl3->setFixedSize( max, lbl3->sizeHint().height() ); + lbl4->setFixedSize( max, lbl4->sizeHint().height() ); + lbl5->setFixedSize( max, lbl5->sizeHint().height() ); _fileName = new TQLabel( "???", this ); - _fileName->setFixedHeight( _fileName->tqsizeHint().height() ); + _fileName->setFixedHeight( _fileName->sizeHint().height() ); _mtime = new TQLabel( "???", this ); - _mtime->setFixedHeight( _mtime->tqsizeHint().height() ); + _mtime->setFixedHeight( _mtime->sizeHint().height() ); _size = new TQLabel( "???", this ); - _size->setFixedHeight( _size->tqsizeHint().height() ); + _size->setFixedHeight( _size->sizeHint().height() ); _startRecord = new TQLabel( "???", this ); - _startRecord->setFixedHeight( _startRecord->tqsizeHint().height() ); + _startRecord->setFixedHeight( _startRecord->sizeHint().height() ); _endRecord = new TQLabel( "???", this ); - _endRecord->setFixedHeight( _endRecord->tqsizeHint().height() ); + _endRecord->setFixedHeight( _endRecord->sizeHint().height() ); TQVBoxLayout* l1 = new TQVBoxLayout( this, 4, 4 ); diff --git a/kdat/TapeInfoWidget.cpp b/kdat/TapeInfoWidget.cpp index 3e94ae8..4d0801e 100644 --- a/kdat/TapeInfoWidget.cpp +++ b/kdat/TapeInfoWidget.cpp @@ -21,7 +21,7 @@ #include <tqcombobox.h> #include <tqlabel.h> -#include <tqlayout.h> +#include <layout.h> #include <tqlineedit.h> #include <kapplication.h> @@ -49,50 +49,50 @@ TapeInfoWidget::TapeInfoWidget( TQWidget* parent, const char* name ) TQLabel* lbl6 = new TQLabel( i18n( "Archive count:" ), this ); TQLabel* lbl7 = new TQLabel( i18n( "Space used:" ), this ); - int max = lbl1->tqsizeHint().width(); - if ( lbl2->tqsizeHint().width() > max ) max = lbl2->tqsizeHint().width(); - if ( lbl3->tqsizeHint().width() > max ) max = lbl3->tqsizeHint().width(); - if ( lbl4->tqsizeHint().width() > max ) max = lbl4->tqsizeHint().width(); - if ( lbl5->tqsizeHint().width() > max ) max = lbl5->tqsizeHint().width(); - if ( lbl6->tqsizeHint().width() > max ) max = lbl6->tqsizeHint().width(); - if ( lbl7->tqsizeHint().width() > max ) max = lbl7->tqsizeHint().width(); - - lbl1->setFixedSize( max, lbl1->tqsizeHint().height() ); - lbl2->setFixedSize( max, lbl2->tqsizeHint().height() ); - lbl3->setFixedSize( max, lbl3->tqsizeHint().height() ); - lbl4->setFixedSize( max, lbl4->tqsizeHint().height() ); - lbl5->setFixedSize( max, lbl5->tqsizeHint().height() ); - lbl6->setFixedSize( max, lbl6->tqsizeHint().height() ); - lbl7->setFixedSize( max, lbl7->tqsizeHint().height() ); + int max = lbl1->sizeHint().width(); + if ( lbl2->sizeHint().width() > max ) max = lbl2->sizeHint().width(); + if ( lbl3->sizeHint().width() > max ) max = lbl3->sizeHint().width(); + if ( lbl4->sizeHint().width() > max ) max = lbl4->sizeHint().width(); + if ( lbl5->sizeHint().width() > max ) max = lbl5->sizeHint().width(); + if ( lbl6->sizeHint().width() > max ) max = lbl6->sizeHint().width(); + if ( lbl7->sizeHint().width() > max ) max = lbl7->sizeHint().width(); + + lbl1->setFixedSize( max, lbl1->sizeHint().height() ); + lbl2->setFixedSize( max, lbl2->sizeHint().height() ); + lbl3->setFixedSize( max, lbl3->sizeHint().height() ); + lbl4->setFixedSize( max, lbl4->sizeHint().height() ); + lbl5->setFixedSize( max, lbl5->sizeHint().height() ); + lbl6->setFixedSize( max, lbl6->sizeHint().height() ); + lbl7->setFixedSize( max, lbl7->sizeHint().height() ); _tapeName = new TQLineEdit( this ); - _tapeName->setFixedHeight( _tapeName->tqsizeHint().height() ); + _tapeName->setFixedHeight( _tapeName->sizeHint().height() ); _tapeSize = new TQLineEdit( this ); - _tapeSize->setFixedSize( 48, _tapeSize->tqsizeHint().height() ); + _tapeSize->setFixedSize( 48, _tapeSize->sizeHint().height() ); _tapeSizeUnits = new TQComboBox( this ); - _tapeSizeUnits->setFixedSize( 48, _tapeSizeUnits->tqsizeHint().height() ); + _tapeSizeUnits->setFixedSize( 48, _tapeSizeUnits->sizeHint().height() ); _tapeSizeUnits->insertItem( "MB" ); _tapeSizeUnits->insertItem( "GB" ); _tapeID = new TQLabel( "???", this ); - _tapeID->setFixedHeight( _tapeID->tqsizeHint().height() ); + _tapeID->setFixedHeight( _tapeID->sizeHint().height() ); _ctime = new TQLabel( "???", this ); - _ctime->setFixedHeight( _ctime->tqsizeHint().height() ); + _ctime->setFixedHeight( _ctime->sizeHint().height() ); _mtime = new TQLabel( "???", this ); - _mtime->setFixedHeight( _mtime->tqsizeHint().height() ); + _mtime->setFixedHeight( _mtime->sizeHint().height() ); _archiveCount = new TQLabel( "???", this ); - _archiveCount->setFixedHeight( _archiveCount->tqsizeHint().height() ); + _archiveCount->setFixedHeight( _archiveCount->sizeHint().height() ); _spaceUsed = new TQLabel( "???", this ); - _spaceUsed->setFixedHeight( _spaceUsed->tqsizeHint().height() ); + _spaceUsed->setFixedHeight( _spaceUsed->sizeHint().height() ); _apply = new KPushButton( KStdGuiItem::apply(), this ); - _apply->setFixedSize( 80, _apply->tqsizeHint().height() ); + _apply->setFixedSize( 80, _apply->sizeHint().height() ); _apply->setEnabled( FALSE ); TQVBoxLayout* l1 = new TQVBoxLayout( this, 4, 4 ); @@ -202,10 +202,10 @@ void TapeInfoWidget::setTape( Tape* tape ) used *= blockSize / 1024; } if ( _tape->getSize() > 0 ) { - tmp = TQString::tqfromLatin1( "%1 / %2 (%3%)") - .tqarg(Util::kbytesToString( used )) - .tqarg(Util::kbytesToString( _tape->getSize() )) - .tqarg(used * 100 / _tape->getSize() ); + tmp = TQString::fromLatin1( "%1 / %2 (%3%)") + .arg(Util::kbytesToString( used )) + .arg(Util::kbytesToString( _tape->getSize() )) + .arg(used * 100 / _tape->getSize() ); } else { tmp = Util::kbytesToString( used ); } diff --git a/kdat/VerifyDlg.cpp b/kdat/VerifyDlg.cpp index 209c177..45b727c 100644 --- a/kdat/VerifyDlg.cpp +++ b/kdat/VerifyDlg.cpp @@ -25,7 +25,7 @@ #include <stdio.h> #include <tqlabel.h> -#include <tqlayout.h> +#include <layout.h> #include <tqfile.h> #include <kapplication.h> @@ -89,46 +89,46 @@ VerifyDlg::VerifyDlg( const TQString & workingDir, int fileno, const RangeList& f2->setFrameStyle( TQFrame::Panel | TQFrame::Sunken ); TQLabel* lbl1 = new TQLabel( i18n( "Elapsed time:" ), f1 ); - lbl1->setFixedSize( labelWidth, lbl1->tqsizeHint().height() ); + lbl1->setFixedSize( labelWidth, lbl1->sizeHint().height() ); _elapsedTime = new TQLabel( i18n( "00:00:00" ), f1 ); - _elapsedTime->setFixedHeight( _elapsedTime->tqsizeHint().height() ); + _elapsedTime->setFixedHeight( _elapsedTime->sizeHint().height() ); TQLabel* lbl2 = new TQLabel( i18n( "Time remaining:" ), f2 ); - lbl2->setFixedSize( labelWidth, lbl2->tqsizeHint().height() ); + lbl2->setFixedSize( labelWidth, lbl2->sizeHint().height() ); _timeRemaining = new TQLabel( i18n( "00:00:00" ), f2 ); - _timeRemaining->setFixedHeight( _timeRemaining->tqsizeHint().height() ); + _timeRemaining->setFixedHeight( _timeRemaining->sizeHint().height() ); TQLabel* lbl3 = new TQLabel( i18n( "Total KB:" ), f1 ); - lbl3->setFixedSize( labelWidth, lbl3->tqsizeHint().height() ); + lbl3->setFixedSize( labelWidth, lbl3->sizeHint().height() ); TQLabel* totalKbytes = new TQLabel( Util::kbytesToString( _archiveSize ), f1 ); - totalKbytes->setFixedHeight( totalKbytes->tqsizeHint().height() ); + totalKbytes->setFixedHeight( totalKbytes->sizeHint().height() ); TQLabel* lbl4 = new TQLabel( i18n( "KB read:" ), f2 ); - lbl4->setFixedSize( labelWidth, lbl4->tqsizeHint().height() ); + lbl4->setFixedSize( labelWidth, lbl4->sizeHint().height() ); _kbytesRead = new TQLabel( i18n( "0KB" ), f2 ); - _kbytesRead->setFixedHeight( _kbytesRead->tqsizeHint().height() ); + _kbytesRead->setFixedHeight( _kbytesRead->sizeHint().height() ); TQLabel* lbl5 = new TQLabel( i18n( "Transfer rate:" ), f1 ); - lbl5->setFixedSize( labelWidth, lbl5->tqsizeHint().height() ); + lbl5->setFixedSize( labelWidth, lbl5->sizeHint().height() ); _transferRate = new TQLabel( i18n( "0KB/min" ), f1 ); - _transferRate->setFixedHeight( _transferRate->tqsizeHint().height() ); + _transferRate->setFixedHeight( _transferRate->sizeHint().height() ); TQLabel* lbl6; if ( _restore ) { lbl6 = new TQLabel( i18n( "Files:" ), f2 ); - lbl6->setFixedSize( labelWidth, lbl6->tqsizeHint().height() ); + lbl6->setFixedSize( labelWidth, lbl6->sizeHint().height() ); } else { lbl6 = new TQLabel( i18n( "Differences:" ), f2 ); - lbl6->setFixedSize( labelWidth, lbl6->tqsizeHint().height() ); + lbl6->setFixedSize( labelWidth, lbl6->sizeHint().height() ); } _files = new TQLabel( "0", f2 ); - _files->setFixedHeight( _files->tqsizeHint().height() ); + _files->setFixedHeight( _files->sizeHint().height() ); if ( _restore ) { _log = new LoggerWidget( i18n( "Restore log:" ), this ); @@ -137,17 +137,17 @@ VerifyDlg::VerifyDlg( const TQString & workingDir, int fileno, const RangeList& } _ok = new KPushButton( KStdGuiItem::ok(), this ); - _ok->setFixedSize( 80, _ok->tqsizeHint().height() ); + _ok->setFixedSize( 80, _ok->sizeHint().height() ); connect( _ok, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotOK() ) ); _ok->setEnabled( FALSE ); _save = new TQPushButton( i18n( "&Save Log..." ), this ); - _save->setFixedSize( 80, _save->tqsizeHint().height() ); + _save->setFixedSize( 80, _save->sizeHint().height() ); connect( _save, TQT_SIGNAL( clicked() ), _log, TQT_SLOT( save() ) ); _save->setEnabled( FALSE ); _abort = new TQPushButton( i18n( "&Abort" ), this ); - _abort->setFixedSize( 80, _abort->tqsizeHint().height() ); + _abort->setFixedSize( 80, _abort->sizeHint().height() ); connect( _abort, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotAbort() ) ); TQVBoxLayout* l1 = new TQVBoxLayout( this, 8, 4 ); @@ -409,7 +409,7 @@ void VerifyDlg::updateStats() _kbytesRead->setText( str ); if ( elapsed > 0 ) { - str = i18n( "%1/min" ).tqarg(Util::kbytesToString( (int)_totalKBytes * 60 / elapsed ) ); + str = i18n( "%1/min" ).arg(Util::kbytesToString( (int)_totalKBytes * 60 / elapsed ) ); _transferRate->setText( str ); } } diff --git a/kdat/VerifyDlg.h b/kdat/VerifyDlg.h index 41df846..e9b5db6 100644 --- a/kdat/VerifyDlg.h +++ b/kdat/VerifyDlg.h @@ -33,7 +33,7 @@ class LoggerWidget; class TapeDrive; /** - * @short tqStatus dialog for verifying/restoring parts of an archive. + * @short Status dialog for verifying/restoring parts of an archive. */ class VerifyDlg : public TQDialog { Q_OBJECT diff --git a/kdat/VerifyOptDlg.cpp b/kdat/VerifyOptDlg.cpp index a1f1353..c184690 100644 --- a/kdat/VerifyOptDlg.cpp +++ b/kdat/VerifyOptDlg.cpp @@ -19,7 +19,7 @@ #include <unistd.h> #include <tqlabel.h> -#include <tqlayout.h> +#include <layout.h> #include <tqlineedit.h> #include <tqlistbox.h> @@ -51,14 +51,14 @@ VerifyOptDlg::VerifyOptDlg( const TQString & def, const TQStringList& files, boo } else { lbl1 = new TQLabel( i18n( "Verify in folder:" ), this ); } - lbl1->setFixedSize( lbl1->tqsizeHint() ); + lbl1->setFixedSize( lbl1->sizeHint() ); _entry = new TQLineEdit( this ); _entry->setText( def ); - _entry->setFixedHeight( _entry->tqsizeHint().height() ); + _entry->setFixedHeight( _entry->sizeHint().height() ); TQPushButton* browse = new TQPushButton( i18n( "..." ), this ); - browse->setFixedSize( browse->tqsizeHint() ); + browse->setFixedSize( browse->sizeHint() ); TQLabel* lbl2; if ( _restore ) { @@ -66,15 +66,15 @@ VerifyOptDlg::VerifyOptDlg( const TQString & def, const TQStringList& files, boo } else { lbl2 = new TQLabel( i18n( "Verify files:" ), this ); } - lbl2->setFixedHeight( lbl2->tqsizeHint().height() ); + lbl2->setFixedHeight( lbl2->sizeHint().height() ); TQListBox* fileList = new TQListBox( this ); fileList->insertStringList(files); KPushButton* ok = new KPushButton( KStdGuiItem::ok(), this ); - ok->setFixedSize( 80, ok->tqsizeHint().height() ); + ok->setFixedSize( 80, ok->sizeHint().height() ); KPushButton* cancel = new KPushButton( KStdGuiItem::cancel(), this ); - cancel->setFixedSize( 80, cancel->tqsizeHint().height() ); + cancel->setFixedSize( 80, cancel->sizeHint().height() ); TQVBoxLayout* l1 = new TQVBoxLayout( this, 8, 4 ); diff --git a/kdat/ktreeview.cpp b/kdat/ktreeview.cpp index 516fb92..df68b3d 100644 --- a/kdat/ktreeview.cpp +++ b/kdat/ktreeview.cpp @@ -79,7 +79,7 @@ KTreeViewItem::KTreeViewItem(const TQString& theText, KTreeViewItem::~KTreeViewItem() { if (deleteChildren) { - // remove the tqchildren + // remove the children KTreeViewItem* i = child; while (i) { KTreeViewItem* d = i; @@ -121,7 +121,7 @@ TQRect KTreeViewItem::boundingRect(int indent) const } // returns the child item at the specified index -KTreeViewItem* KTreeViewItem::tqchildAt(int index) const +KTreeViewItem* KTreeViewItem::childAt(int index) const { if (!hasChild()) return 0; @@ -133,7 +133,7 @@ KTreeViewItem* KTreeViewItem::tqchildAt(int index) const return item; } -// returns the number of tqchildren this item has +// returns the number of children this item has uint KTreeViewItem::childCount() const { return numChildren; @@ -193,7 +193,7 @@ const TQString& KTreeViewItem::getText() const return text; } -// indicates whether this item has any tqchildren +// indicates whether this item has any children bool KTreeViewItem::hasChild() const { return child != 0; @@ -260,7 +260,7 @@ void KTreeViewItem::insertChild(int index, KTreeViewItem* newChild) // indicates whether this item is displayed expanded // NOTE: a TRUE response does not necessarily indicate the item -// has any tqchildren +// has any children bool KTreeViewItem::isExpanded() const { return expanded; @@ -333,14 +333,14 @@ void KTreeViewItem::paintExpandButton(TQPainter* p, int indent, int cellHeight) } // paint the highlight -void KTreeViewItem::paintHighlight(TQPainter* p, int indent, const TQColorGroup& tqcolorGroup, +void KTreeViewItem::paintHighlight(TQPainter* p, int indent, const TQColorGroup& colorGroup, bool hasFocus, TQt::GUIStyle style) const { TQColor fc; if (style == TQt::WindowsStyle) fc = TQt::darkBlue; /* hardcoded in TQt */ else - fc = tqcolorGroup.text(); + fc = colorGroup.text(); TQRect textRect = textBoundingRect(indent); int t,l,b,r; textRect.coords(&l, &t, &r, &b); @@ -372,7 +372,7 @@ void KTreeViewItem::paintText(TQPainter* p, int indent, int cellHeight, p->fontMetrics().leading()) / 2); if (highlighted) { paintHighlight(p, indent, cg, owner->hasFocus(), - (TQt::GUIStyle)owner->tqstyle().tqstyleHint(TQStyle::SH_GUIStyle)); // TQt3 doesn't make this easy ;) + (TQt::GUIStyle)owner->tqstyle().styleHint(TQStyle::SH_GUIStyle)); // TQt3 doesn't make this easy ;) p->setPen(cg.base()); p->setBackgroundColor(cg.text()); } @@ -403,7 +403,7 @@ void KTreeViewItem::paintTree(TQPainter* p, int indent, int cellHeight) const p->drawLine(parentLeaderX, cellCenterY, parentLeaderX, cellBottomY); /* - * If this item has tqchildren or siblings in the tree or is a child of + * If this item has children or siblings in the tree or is a child of * an item other than the root item then draw the little line from the * item out to the left. */ @@ -411,7 +411,7 @@ void KTreeViewItem::paintTree(TQPainter* p, int indent, int cellHeight) const parent->parent != 0 || /* * The following handles the case of an item at the end of the - * topmost level which doesn't have tqchildren. + * topmost level which doesn't have children. */ parent->getChild() != this) { @@ -435,7 +435,7 @@ void KTreeViewItem::paintTree(TQPainter* p, int indent, int cellHeight) const // removes the given (direct) child from the branch bool KTreeViewItem::removeChild(KTreeViewItem* theChild) { - // search item in list of tqchildren + // search item in list of children KTreeViewItem* prevItem = 0; KTreeViewItem* toRemove = getChild(); while (toRemove && toRemove != theChild) { @@ -599,7 +599,7 @@ KTreeView::KTreeView(TQWidget *parent, //case WindowsStyle: //case MotifStyle: setFrameStyle(TQFrame::WinPanel | TQFrame::Sunken); - setBackgroundColor(tqcolorGroup().base()); + setBackgroundColor(colorGroup().base()); //break; /*default: setFrameStyle(TQFrame::Panel | TQFrame::Plain); @@ -646,7 +646,7 @@ void KTreeView::appendChildItem(const TQString & theText, const TQPixmap& thePix appendChildItem(item, thePath); } -// appends the given item to the tqchildren of the item at the given index +// appends the given item to the children of the item at the given index void KTreeView::appendChildItem(KTreeViewItem* newItem, int index) { /* find parent item and append new item to parent's sub tree */ @@ -656,7 +656,7 @@ void KTreeView::appendChildItem(KTreeViewItem* newItem, int index) appendChildItem(parentItem, newItem); } -// appends the given item to the tqchildren of the item at the end of the +// appends the given item to the children of the item at the end of the // given path void KTreeView::appendChildItem(KTreeViewItem* newItem, const KPath& thePath) { @@ -744,7 +744,7 @@ void KTreeView::clear() if(goingDown || TQApplication::closingDown()) return; if(autoU && isVisible()) - tqrepaint(); + repaint(); setAutoUpdate(autoU); } @@ -789,7 +789,7 @@ int KTreeView::expandLevel() const // expands or collapses the subtree rooted at the given item, // as approptiate -// if item has no tqchildren, does nothing +// if item has no children, does nothing void KTreeView::expandOrCollapseItem(int index) { KTreeViewItem *item = itemAt(index); @@ -813,7 +813,7 @@ bool KTreeView::forEveryItem(KForEvery func, void* user, KTreeViewItem* item) if ((*func)(item, user)) { return true; } - // visit the tqchildren (recursively) + // visit the children (recursively) if (item->hasChild()) { if (forEveryItem(func, user, item)) return true; @@ -833,7 +833,7 @@ bool KTreeView::forEveryVisibleItem(KForEvery func, void *user, if (item == 0) { item = treeRoot; } else { - // tqchildren are invisible (hence, nothing to do) + // children are invisible (hence, nothing to do) // if item is invisible or collapsed if (!item->isVisible() || !item->isExpanded()) { return false; @@ -847,7 +847,7 @@ bool KTreeView::forEveryVisibleItem(KForEvery func, void *user, if ((*func)(item, user)) { return true; } - // visit the tqchildren (recursively) + // visit the children (recursively) if (item->hasChild() && item->isExpanded()) { if (forEveryVisibleItem(func, user, item)) return true; @@ -1113,7 +1113,7 @@ void KTreeView::setExpandButtonDrawing(bool enable) drawExpandButton = enable; forEveryItem(&KTreeView::setItemExpandButtonDrawing, 0); if(autoUpdate() && isVisible()) - tqrepaint(); + repaint(); } // sets depth to which subtrees are automatically expanded, and @@ -1132,7 +1132,7 @@ void KTreeView::setExpandLevel(int level) } setCurrentItem(itemRow(item)); if(autoUpdate() && isVisible()) - tqrepaint(); + repaint(); } // sets the indent margin for all branches and repaints if auto update enabled @@ -1143,7 +1143,7 @@ void KTreeView::setIndentSpacing(int spacing) itemIndent = spacing; updateCellWidth(); if (autoUpdate() && isVisible()) - tqrepaint(); + repaint(); } // enables/disables vertical scrollbar @@ -1160,7 +1160,7 @@ void KTreeView::setShowItemText(bool enable) showText = enable; forEveryItem(&KTreeView::setItemShowText, 0); if(autoUpdate() && isVisible()) - tqrepaint(); + repaint(); } // indicates whether vertical scrolling is by pixel or row @@ -1177,7 +1177,7 @@ void KTreeView::setTreeDrawing(bool enable) drawTree = enable; forEveryItem(&KTreeView::setItemTreeDrawing, 0); if(autoUpdate() && isVisible()) - tqrepaint(); + repaint(); } // indicates whether item text keys are displayed @@ -1251,18 +1251,18 @@ void KTreeView::appendChildItem(KTreeViewItem* theParent, newItem->setExpanded(true); } - // fix up branch levels of any tqchildren that the new item may already have + // fix up branch levels of any children that the new item may already have if(newItem->hasChild()) { fixChildren(newItem); } - // if necessary, adjust cell width, number of rows and tqrepaint + // if necessary, adjust cell width, number of rows and repaint if (newItem->isVisible() || theParent->childCount() == 1) { bool autoU = autoUpdate(); setAutoUpdate(false); updateVisibleItems(); if(autoU && isVisible()) - tqrepaint(); + repaint(); setAutoUpdate(autoU); } } @@ -1302,7 +1302,7 @@ void KTreeView::collapseSubTree(KTreeViewItem* subRoot) } } // roland - tqrepaint(); + repaint(); setAutoUpdate(TRUE); // roland } @@ -1331,7 +1331,7 @@ void KTreeView::expandOrCollapse(KTreeViewItem* parent) emit expanded(parentIndex); } if (autoU && isVisible()) - tqrepaint(); + repaint(); setAutoUpdate(autoU); } @@ -1361,7 +1361,7 @@ void KTreeView::expandSubTree(KTreeViewItem* subRoot) } } // roland - tqrepaint(); + repaint(); setAutoUpdate(TRUE); // roland @@ -1493,7 +1493,7 @@ bool KTreeView::insertItem(KTreeViewItem* referenceItem, } else { // no reference item, append at end of visible tree - // need to tqrepaint + // need to repaint parentItem = treeRoot; parentItem->appendChild(newItem); } @@ -1502,18 +1502,18 @@ bool KTreeView::insertItem(KTreeViewItem* referenceItem, if (level(newItem) < expansion) newItem->setExpanded(true); - // fix up branch levels of any tqchildren + // fix up branch levels of any children if (newItem->hasChild()) fixChildren(newItem); - // if tqrepaint necessary, do it if visible and auto update + // if repaint necessary, do it if visible and auto update // enabled if (newItem->isVisible() || parentItem->childCount() == 1) { bool autoU = autoUpdate(); setAutoUpdate(FALSE); updateVisibleItems(); if(autoU && isVisible()) - tqrepaint(); + repaint(); setAutoUpdate(autoU); } return true; @@ -1545,7 +1545,7 @@ void KTreeView::join(KTreeViewItem *item) takeItem(item); insertItem(itemParent, item, FALSE); if(autoU && isVisible()) - tqrepaint(); + repaint(); setAutoUpdate(autoU); } } @@ -1649,9 +1649,9 @@ void KTreeView::lowerItem(KTreeViewItem *item) bool autoU = autoUpdate(); setAutoUpdate(FALSE); takeItem(item); - insertItem(itemParent->tqchildAt(itemChildIndex), item, FALSE); + insertItem(itemParent->childAt(itemChildIndex), item, FALSE); if(autoU && isVisible()) - tqrepaint(); + repaint(); setAutoUpdate(autoU); } } @@ -1859,7 +1859,7 @@ void KTreeView::paintCell(TQPainter* p, int row, int) return; p->setClipRect(cellRect(), TQPainter::CoordPainter ); - TQColorGroup cg = tqcolorGroup(); + TQColorGroup cg = colorGroup(); int indent = indentation(item); item->paint(p, indent, cg, current == row); /* highlighted */ @@ -1875,9 +1875,9 @@ void KTreeView::raiseItem(KTreeViewItem *item) bool autoU = autoUpdate(); setAutoUpdate(FALSE); takeItem(item); - insertItem(itemParent->tqchildAt(--itemChildIndex), item, TRUE); + insertItem(itemParent->childAt(--itemChildIndex), item, TRUE); if(autoU && isVisible()) - tqrepaint(); + repaint(); setAutoUpdate(autoU); } } @@ -1897,7 +1897,7 @@ KTreeViewItem* KTreeView::recursiveFind(KPath& path) return 0; /* - * Iterate through the parent's tqchildren searching for searchString. + * Iterate through the parent's children searching for searchString. */ KTreeViewItem* sibling = parent->getChild(); while (sibling != 0) { @@ -1961,9 +1961,9 @@ void KTreeView::split(KTreeViewItem *item) bool autoU = autoUpdate(); setAutoUpdate(FALSE); takeItem(item); - appendChildItem(itemParent->tqchildAt(--itemChildIndex), item); + appendChildItem(itemParent->childAt(--itemChildIndex), item); if(autoU && isVisible()) - tqrepaint(); + repaint(); setAutoUpdate(autoU); } @@ -2003,7 +2003,7 @@ void KTreeView::takeItem(KTreeViewItem* item) updateVisibleItems(); if (autoU && isVisible()) - tqrepaint(); + repaint(); setAutoUpdate(autoU); } @@ -2041,10 +2041,10 @@ void KTreeView::updateVisibleItemRec(KTreeViewItem* item, int& index, int& count } /* - * Record the tqchildren of item in the list of visible items. + * Record the children of item in the list of visible items. * * Don't register item itself, it's already in the list. Also only - * allocate new space for tqchildren. + * allocate new space for children. */ count += item->childCount(); if (count > itemCapacity) { @@ -2066,7 +2066,7 @@ void KTreeView::updateVisibleItemRec(KTreeViewItem* item, int& index, int& count visibleItems = newItems; itemCapacity = newCapacity; } - // insert tqchildren + // insert children for (KTreeViewItem* i = item->getChild(); i != 0; i = i->getSibling()) { visibleItems[index++] = i; updateVisibleItemRec(i, index, count); diff --git a/kdat/ktreeview.h b/kdat/ktreeview.h index d0af2d5..6e43518 100644 --- a/kdat/ktreeview.h +++ b/kdat/ktreeview.h @@ -43,18 +43,18 @@ public: * item can be constructed this way, the text has to be non-null when * the item is added to the tree, or it will not be inserted. * - * The constructor sets the delete-tqchildren flag to false. This flag + * The constructor sets the delete-children flag to false. This flag * tells the item whether it shall delete the child items when it is * itself deleted. By default the creator of the item is responsible to * also delete the child items. (However, the versions of * KTreeView::appendChildItem and KTreeView::insertChildItem that do - * not take a KTreeViewItem set the delete-tqchildren flag to true.) + * not take a KTreeViewItem set the delete-children flag to true.) */ KTreeViewItem(const TQString& theText = TQString()); // text can not be null when added to the list! KTreeViewItem(const TQString& theText, const TQPixmap& thePixmap); /** - * Destructor. It destroys its tqchildren if this item has been marked + * Destructor. It destroys its children if this item has been marked * with setDeleteChildren(true). */ virtual ~KTreeViewItem(); @@ -70,7 +70,7 @@ public: * Returns a pointer to the child item at the given index in this * item's sub tree, or 0 if not found. */ - KTreeViewItem* tqchildAt(int index) const; + KTreeViewItem* childAt(int index) const; /** * Returns the number of child items in this item's sub tree. @@ -123,7 +123,7 @@ public: const TQString& getText() const; /** - * Indicates whether this item has any tqchildren. + * Indicates whether this item has any children. */ bool hasChild() const; @@ -152,7 +152,7 @@ public: * items (if any) would be visible if this item were visible. * * Note: If this function returns true, it does not necessarily indicate that - * this item is visible or that this item has any tqchildren. + * this item is visible or that this item has any children. */ bool isExpanded() const; @@ -174,12 +174,12 @@ public: * Sets the delayed-expanding flag. If this flag is true, the expanding * signal is emitted when the item is about to be expanded. The expand * button is always painted for this item, even if it doesn't have - * tqchildren. + * children. */ void setDelayedExpanding(bool flag); /** - * Tells the item whether it should delete its tqchildren when it is + * Tells the item whether it should delete its children when it is * deleted. The default is false, which means that the child items must * be deleted explicitly. */ @@ -417,8 +417,8 @@ public: /** * Appends a new child item to the item at the specified row. If that - * item already has tqchildren, the new item is appended below these - * tqchildren. A KTreeViewItem is created for which the delete-tqchildren + * item already has children, the new item is appended below these + * children. A KTreeViewItem is created for which the delete-children * flag is set to true. */ void appendChildItem(const TQString & theText, const TQPixmap& thePixmap, @@ -432,8 +432,8 @@ public: /** * Appendss the specified item as a child of the item that is at the - * specified row. If that item already has tqchildren, the new item is - * appended below these tqchildren. + * specified row. If that item already has children, the new item is + * appended below these children. */ void appendChildItem(KTreeViewItem* newItem, int index); @@ -529,7 +529,7 @@ public: /** * Iterates every item in the tree, visible or not, and applies the * function func with a pointer to each item and user data supplied as - * parameters. The tqchildren of the specified root item are visited + * parameters. The children of the specified root item are visited * (root itself is not visited!). If root is 0 all items in the tree * are visited. KForEveryFunc is defined as: * @@ -568,7 +568,7 @@ public: * the value of prefix. The new item is added to the same branch as the * referenced item. If row is -1, the item is simply appended to the * tree at the topmost level. A KTreeViewItem is created for which the - * delete-tqchildren flag is set to true. Returns true if the item has + * delete-children flag is set to true. Returns true if the item has * been successfully inserted in the tree, otherwise false. */ bool insertItem(const TQString & theText, const TQPixmap& thePixmap, |