summaryrefslogtreecommitdiffstats
path: root/kdat/IndexDlg.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kdat/IndexDlg.cpp')
-rw-r--r--kdat/IndexDlg.cpp90
1 files changed, 45 insertions, 45 deletions
diff --git a/kdat/IndexDlg.cpp b/kdat/IndexDlg.cpp
index decea36..7a0d71a 100644
--- a/kdat/IndexDlg.cpp
+++ b/kdat/IndexDlg.cpp
@@ -21,8 +21,8 @@
#include <fcntl.h>
#include <time.h>
-#include <qlabel.h>
-#include <qlayout.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
#include <kpushbutton.h>
#include <kstdguiitem.h>
@@ -41,8 +41,8 @@
#include "IndexDlg.moc"
-IndexDlg::IndexDlg( Tape* tape, QWidget* parent, const char* name )
- : QDialog( parent, name, TRUE ),
+IndexDlg::IndexDlg( Tape* tape, TQWidget* parent, const char* name )
+ : TQDialog( parent, name, TRUE ),
_tarParser( NULL ),
_tape( tape ),
_archive( NULL ),
@@ -63,109 +63,109 @@ IndexDlg::IndexDlg( Tape* tape, QWidget* parent, const char* name )
const int labelWidth = 96;
- QFrame* f1 = new QFrame( this );
- f1->setFrameStyle( QFrame::Panel | QFrame::Sunken );
+ TQFrame* f1 = new TQFrame( this );
+ f1->setFrameStyle( TQFrame::Panel | TQFrame::Sunken );
- QFrame* f2 = new QFrame( this );
- f2->setFrameStyle( QFrame::Panel | QFrame::Sunken );
+ TQFrame* f2 = new TQFrame( this );
+ f2->setFrameStyle( TQFrame::Panel | TQFrame::Sunken );
- QLabel* lbl1 = new QLabel( i18n( "Elapsed time:" ), f1 );
+ TQLabel* lbl1 = new TQLabel( i18n( "Elapsed time:" ), f1 );
lbl1->setFixedSize( labelWidth, lbl1->sizeHint().height() );
- _elapsedTime = new QLabel( i18n( "00:00:00" ), f1 );
+ _elapsedTime = new TQLabel( i18n( "00:00:00" ), f1 );
_elapsedTime->setFixedHeight( _elapsedTime->sizeHint().height() );
- QLabel* lbl2 = new QLabel( i18n( "Archives:" ), f2 );
+ TQLabel* lbl2 = new TQLabel( i18n( "Archives:" ), f2 );
lbl2->setFixedSize( labelWidth, lbl2->sizeHint().height() );
- _archives = new QLabel( i18n( "0" ), f2 );
+ _archives = new TQLabel( i18n( "0" ), f2 );
_archives->setFixedHeight( _archives->sizeHint().height() );
- QLabel* lbl3 = new QLabel( i18n( "KB read:" ), f1 );
+ TQLabel* lbl3 = new TQLabel( i18n( "KB read:" ), f1 );
lbl3->setFixedSize( labelWidth, lbl3->sizeHint().height() );
- _kbytesRead = new QLabel( i18n( "0KB" ), f1 );
+ _kbytesRead = new TQLabel( i18n( "0KB" ), f1 );
_kbytesRead->setFixedHeight( _kbytesRead->sizeHint().height() );
- QLabel* lbl4 = new QLabel( i18n( "Files:" ), f2 );
+ TQLabel* lbl4 = new TQLabel( i18n( "Files:" ), f2 );
lbl4->setFixedSize( labelWidth, lbl4->sizeHint().height() );
- _files = new QLabel( i18n( "0" ), f2 );
+ _files = new TQLabel( i18n( "0" ), f2 );
_files->setFixedHeight( _kbytesRead->sizeHint().height() );
- QLabel* lbl5 = new QLabel( i18n( "Transfer rate:" ), f1 );
+ TQLabel* lbl5 = new TQLabel( i18n( "Transfer rate:" ), f1 );
lbl5->setFixedSize( labelWidth, lbl5->sizeHint().height() );
- _transferRate = new QLabel( i18n( "0KB/min" ), f1 );
+ _transferRate = new TQLabel( i18n( "0KB/min" ), f1 );
_transferRate->setFixedHeight( _transferRate->sizeHint().height() );
- QLabel* lbl6 = new QLabel( i18n( "Total files:" ), f2 );
+ TQLabel* lbl6 = new TQLabel( i18n( "Total files:" ), f2 );
lbl6->setFixedSize( labelWidth, lbl6->sizeHint().height() );
- _totalFiles = new QLabel( i18n( "0" ), f2 );
+ _totalFiles = new TQLabel( i18n( "0" ), f2 );
_totalFiles->setFixedHeight( _totalFiles->sizeHint().height() );
_log = new LoggerWidget( i18n( "Index log:" ), this );
_ok = new KPushButton( KStdGuiItem::ok(), this );
_ok->setFixedSize( 80, _ok->sizeHint().height() );
- connect( _ok, SIGNAL( clicked() ), this, SLOT( slotOK() ) );
+ connect( _ok, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotOK() ) );
_ok->setEnabled( FALSE );
- _save = new QPushButton( i18n( "Save Log..." ), this );
+ _save = new TQPushButton( i18n( "Save Log..." ), this );
_save->setFixedSize( 80, _save->sizeHint().height() );
- connect( _save, SIGNAL( clicked() ), _log, SLOT( save() ) );
+ connect( _save, TQT_SIGNAL( clicked() ), _log, TQT_SLOT( save() ) );
_save->setEnabled( FALSE );
- _abort = new QPushButton( i18n( "Abort" ), this );
+ _abort = new TQPushButton( i18n( "Abort" ), this );
_abort->setFixedSize( 80, _abort->sizeHint().height() );
- connect( _abort, SIGNAL( clicked() ), this, SLOT( slotAbort() ) );
+ connect( _abort, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotAbort() ) );
- QVBoxLayout* l1 = new QVBoxLayout( this, 8, 4 );
+ TQVBoxLayout* l1 = new TQVBoxLayout( this, 8, 4 );
- QHBoxLayout* l1_1 = new QHBoxLayout();
+ TQHBoxLayout* l1_1 = new TQHBoxLayout();
l1->addLayout( l1_1 );
l1_1->addStrut( 3 * lbl1->height() + 16 );
l1_1->addWidget( f1 );
l1_1->addWidget( f2 );
- QVBoxLayout* l1_1_1 = new QVBoxLayout( f1, 4, 4 );
+ TQVBoxLayout* l1_1_1 = new TQVBoxLayout( f1, 4, 4 );
- QHBoxLayout* l1_1_1_1 = new QHBoxLayout();
+ TQHBoxLayout* l1_1_1_1 = new TQHBoxLayout();
l1_1_1->addLayout( l1_1_1_1 );
l1_1_1_1->addWidget( lbl1 );
l1_1_1_1->addWidget( _elapsedTime, 1 );
- QHBoxLayout* l1_1_1_2 = new QHBoxLayout();
+ TQHBoxLayout* l1_1_1_2 = new TQHBoxLayout();
l1_1_1->addLayout( l1_1_1_2 );
l1_1_1_2->addWidget( lbl3 );
l1_1_1_2->addWidget( _kbytesRead, 1 );
- QHBoxLayout* l1_1_1_3 = new QHBoxLayout();
+ TQHBoxLayout* l1_1_1_3 = new TQHBoxLayout();
l1_1_1->addLayout( l1_1_1_3 );
l1_1_1_3->addWidget( lbl5 );
l1_1_1_3->addWidget( _transferRate, 1 );
- QVBoxLayout* l1_1_2 = new QVBoxLayout( f2, 4, 4 );
+ TQVBoxLayout* l1_1_2 = new TQVBoxLayout( f2, 4, 4 );
- QHBoxLayout* l1_1_2_1 = new QHBoxLayout();
+ TQHBoxLayout* l1_1_2_1 = new TQHBoxLayout();
l1_1_2->addLayout( l1_1_2_1 );
l1_1_2_1->addWidget( lbl2 );
l1_1_2_1->addWidget( _archives, 1 );
- QHBoxLayout* l1_1_2_2 = new QHBoxLayout();
+ TQHBoxLayout* l1_1_2_2 = new TQHBoxLayout();
l1_1_2->addLayout( l1_1_2_2 );
l1_1_2_2->addWidget( lbl4 );
l1_1_2_2->addWidget( _files, 1 );
- QHBoxLayout* l1_1_2_3 = new QHBoxLayout();
+ TQHBoxLayout* l1_1_2_3 = new TQHBoxLayout();
l1_1_2->addLayout( l1_1_2_3 );
l1_1_2_3->addWidget( lbl6 );
l1_1_2_3->addWidget( _totalFiles, 1 );
l1->addWidget( _log, 1 );
- QHBoxLayout* l1_2 = new QHBoxLayout();
+ TQHBoxLayout* l1_2 = new TQHBoxLayout();
l1->addLayout( l1_2 );
l1_2->addStretch( 1 );
l1_2->addWidget( _ok );
@@ -182,10 +182,10 @@ void IndexDlg::show()
{
startTimer( 100 );
- QDialog::show();
+ TQDialog::show();
}
-void IndexDlg::slotEntry( const QString & name, int size, int mtime, int record )
+void IndexDlg::slotEntry( const TQString & name, int size, int mtime, int record )
{
if ( !_fileName.isEmpty() ) {
_archive->addFile( _fileSize, _fileMTime, _fileStartRecord, record, _fileName );
@@ -200,7 +200,7 @@ void IndexDlg::slotEntry( const QString & name, int size, int mtime, int record
// printf("IndexDlg::slotEntry called with \"%s\", %d bytes\n", name.latin1(), size);
/* 2002-01-28 LEW */
- QString tmp;
+ TQString tmp;
tmp.setNum( ++_numFiles );
_files->setText( tmp );
_totalFileCount++;
@@ -225,7 +225,7 @@ void IndexDlg::slotAbort()
_aborted = TRUE;
}
-void IndexDlg::timerEvent( QTimerEvent* )
+void IndexDlg::timerEvent( TQTimerEvent* )
{
killTimers();
@@ -253,7 +253,7 @@ void IndexDlg::timerEvent( QTimerEvent* )
_startTime = time( NULL );
int oldElapsed = 0;
- QString msg;
+ TQString msg;
int count;
char *buf = new char[Options::instance()->getTapeBlockSize()];
bool atLeastOneGoodRead = TRUE;
@@ -263,7 +263,7 @@ void IndexDlg::timerEvent( QTimerEvent* )
delete _tarParser;
_tarParser = new TarParser();
- connect( _tarParser, SIGNAL( sigEntry( const QString &, int, int, int ) ), this, SLOT( slotEntry( const QString &, int, int, int ) ) );
+ connect( _tarParser, TQT_SIGNAL( sigEntry( const TQString &, int, int, int ) ), this, TQT_SLOT( slotEntry( const TQString &, int, int, int ) ) );
int endBlock = 0;
int leftover = 0;
@@ -280,7 +280,7 @@ void IndexDlg::timerEvent( QTimerEvent* )
msg = i18n( "Archive %1" ).arg( _archiveCount );
_archive = new Archive( _tape, 0, msg );
- _fileName = QString::null;
+ _fileName = TQString::null;
_fileSize = -1;
_fileMTime = -1;
_fileStartRecord = -1;
@@ -339,10 +339,10 @@ void IndexDlg::timerEvent( QTimerEvent* )
void IndexDlg::updateStats()
{
- QString str;
+ TQString str;
int elapsed = time( NULL ) - _startTime;
- str = QString::fromUtf8( QCString().sprintf( i18n( "%02d:%02d:%02d" ).utf8(), elapsed / 3600, elapsed / 60 % 60, elapsed % 60 ) );
+ str = TQString::fromUtf8( TQCString().sprintf( i18n( "%02d:%02d:%02d" ).utf8(), elapsed / 3600, elapsed / 60 % 60, elapsed % 60 ) );
_elapsedTime->setText( str );
str = Util::kbytesToString( (int)_totalKBytes );