diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-15 15:45:05 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-15 15:45:05 -0600 |
commit | d1248617107f659af9d03cf1ef6d783571a0cba8 (patch) | |
tree | 06ce6d250704f2cddca023e81b63f25b19c9aa48 /kdat/KDatMainWindow.cpp | |
parent | 72fee035e994371467475e062b46287d68fa3f57 (diff) | |
download | tdeadmin-d1248617107f659af9d03cf1ef6d783571a0cba8.tar.gz tdeadmin-d1248617107f659af9d03cf1ef6d783571a0cba8.zip |
Rename a number of old tq methods that are no longer tq specific
Diffstat (limited to 'kdat/KDatMainWindow.cpp')
-rw-r--r-- | kdat/KDatMainWindow.cpp | 82 |
1 files changed, 41 insertions, 41 deletions
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 */ |