summaryrefslogtreecommitdiffstats
path: root/kdat
diff options
context:
space:
mode:
Diffstat (limited to 'kdat')
-rw-r--r--kdat/Archive.cpp40
-rw-r--r--kdat/Archive.h20
-rw-r--r--kdat/ArchiveInfoWidget.cpp40
-rw-r--r--kdat/ArchiveInfoWidget.h16
-rw-r--r--kdat/BackupDlg.cpp114
-rw-r--r--kdat/BackupDlg.h40
-rw-r--r--kdat/BackupOptDlg.cpp22
-rw-r--r--kdat/BackupOptDlg.h14
-rw-r--r--kdat/BackupProfile.cpp46
-rw-r--r--kdat/BackupProfile.h42
-rw-r--r--kdat/BackupProfileInfoWidget.cpp50
-rw-r--r--kdat/BackupProfileInfoWidget.h12
-rw-r--r--kdat/BackupProfileManager.cpp20
-rw-r--r--kdat/BackupProfileManager.h16
-rw-r--r--kdat/BackupProfileWidget.cpp98
-rw-r--r--kdat/BackupProfileWidget.h40
-rw-r--r--kdat/ErrorHandler.cpp34
-rw-r--r--kdat/File.cpp22
-rw-r--r--kdat/File.h18
-rw-r--r--kdat/FileInfoWidget.cpp64
-rw-r--r--kdat/FileInfoWidget.h22
-rw-r--r--kdat/FormatOptDlg.cpp38
-rw-r--r--kdat/FormatOptDlg.h18
-rw-r--r--kdat/ImageCache.cpp58
-rw-r--r--kdat/ImageCache.h52
-rw-r--r--kdat/IndexDlg.cpp90
-rw-r--r--kdat/IndexDlg.h34
-rw-r--r--kdat/InfoShellWidget.cpp14
-rw-r--r--kdat/InfoShellWidget.h8
-rw-r--r--kdat/KDatMainWindow.cpp280
-rw-r--r--kdat/KDatMainWindow.h62
-rw-r--r--kdat/LoggerWidget.cpp24
-rw-r--r--kdat/LoggerWidget.h10
-rw-r--r--kdat/Node.cpp146
-rw-r--r--kdat/Node.h90
-rw-r--r--kdat/Options.cpp8
-rw-r--r--kdat/Options.h16
-rw-r--r--kdat/OptionsDlg.cpp12
-rw-r--r--kdat/OptionsDlg.h4
-rw-r--r--kdat/Range.cpp2
-rw-r--r--kdat/Range.h6
-rw-r--r--kdat/Tape.cpp94
-rw-r--r--kdat/Tape.h18
-rw-r--r--kdat/TapeDrive.cpp6
-rw-r--r--kdat/TapeDrive.h6
-rw-r--r--kdat/TapeFileInfoWidget.cpp44
-rw-r--r--kdat/TapeFileInfoWidget.h16
-rw-r--r--kdat/TapeInfoWidget.cpp76
-rw-r--r--kdat/TapeInfoWidget.h26
-rw-r--r--kdat/TapeManager.cpp28
-rw-r--r--kdat/TapeManager.h18
-rw-r--r--kdat/TarParser.h6
-rw-r--r--kdat/Util.cpp16
-rw-r--r--kdat/Util.h8
-rw-r--r--kdat/VerifyDlg.cpp106
-rw-r--r--kdat/VerifyDlg.h34
-rw-r--r--kdat/VerifyOptDlg.cpp48
-rw-r--r--kdat/VerifyOptDlg.h14
-rw-r--r--kdat/ktreeview.cpp142
-rw-r--r--kdat/ktreeview.h104
-rw-r--r--kdat/main.cpp4
61 files changed, 1288 insertions, 1288 deletions
diff --git a/kdat/Archive.cpp b/kdat/Archive.cpp
index 0933265..5e8ef65 100644
--- a/kdat/Archive.cpp
+++ b/kdat/Archive.cpp
@@ -18,7 +18,7 @@
#include <assert.h>
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <kdebug.h>
@@ -26,7 +26,7 @@
#include "Options.h"
#include "TapeManager.h"
-Archive::Archive( Tape* tape, int ctime, const QString & name )
+Archive::Archive( Tape* tape, int ctime, const TQString & name )
: _stubbed( FALSE ),
_fptr( 0 ),
_offset( 0 ),
@@ -108,7 +108,7 @@ void Archive::readAll( int version )
{
read( version );
- QPtrListIterator<File> i( getChildren() );
+ TQPtrListIterator<File> i( getChildren() );
for ( ; i.current(); ++i ) {
i.current()->readAll( version );
}
@@ -140,7 +140,7 @@ void Archive::write( FILE* fptr )
// Child range list.
ival = _ranges.getRanges().count();
fwrite( &ival, sizeof( ival ), 1, _fptr );
- QPtrListIterator<Range> it( _ranges.getRanges() );
+ TQPtrListIterator<Range> it( _ranges.getRanges() );
for ( ; it.current(); ++it ) {
ival = it.current()->getStart();
fwrite( &ival, sizeof( ival ), 1, _fptr );
@@ -159,7 +159,7 @@ void Archive::write( FILE* fptr )
}
//===== Write files =====
- QPtrListIterator<File> i( getChildren() );
+ TQPtrListIterator<File> i( getChildren() );
int count = 0;
for ( ; i.current(); ++i, count++ ) {
// Fill in the file offset.
@@ -186,7 +186,7 @@ int Archive::getEndBlock()
return _endBlock;
}
-QString Archive::getName()
+TQString Archive::getName()
{
read();
@@ -198,14 +198,14 @@ Tape* Archive::getTape()
return _tape;
}
-const QPtrList<File>& Archive::getChildren()
+const TQPtrList<File>& Archive::getChildren()
{
read();
return _children;
}
-const QPtrList<Range>& Archive::getRanges()
+const TQPtrList<Range>& Archive::getRanges()
{
read();
@@ -226,7 +226,7 @@ void Archive::setEndBlock( int endBlock )
TapeManager::instance()->tapeModified( _tape );
}
-void Archive::setName( const QString & name )
+void Archive::setName( const TQString & name )
{
read();
@@ -258,13 +258,13 @@ void Archive::addChild( File* file )
_children.append( file );
}
-File* Archive::addFile( int size, int mtime, int startRecord, int endRecord, const QString & filename )
+File* Archive::addFile( int size, int mtime, int startRecord, int endRecord, const TQString & filename )
{
read();
- QStringList path;
+ TQStringList path;
- QString fn( filename );
+ TQString fn( filename );
int idx = 0;
while ( ( idx = fn.find( '/' ) ) > -1 ) {
path.append( fn.left( idx + 1 ) );
@@ -285,10 +285,10 @@ File* Archive::addFile( int size, int mtime, int startRecord, int endRecord, con
return file;
}
- QString dir = path.first();
+ TQString dir = path.first();
//path.remove(path.first());
path.remove(path.begin());
- QPtrListIterator<File> i( getChildren() );
+ TQPtrListIterator<File> i( getChildren() );
File* parent = 0;
for ( ; i.current() ; ++i ) {
if ( i.current()->getName() == dir ) {
@@ -302,12 +302,12 @@ File* Archive::addFile( int size, int mtime, int startRecord, int endRecord, con
addChild( parent );
}
- for ( QStringList::Iterator j = path.begin();
+ for ( TQStringList::Iterator j = path.begin();
j != path.end();
++j ) {
- QString dir = *j;
+ TQString dir = *j;
File* pparent = parent;
- QPtrListIterator<File> i( pparent->getChildren() );
+ TQPtrListIterator<File> i( pparent->getChildren() );
for ( parent = 0; i.current() ; ++i ) {
if ( i.current()->getName() == dir ) {
parent = i.current();
@@ -333,10 +333,10 @@ void Archive::calcRanges()
_ranges.clear();
- QPtrListIterator<File> it( getChildren() );
+ TQPtrListIterator<File> it( getChildren() );
for ( ; it.current(); ++it ) {
it.current()->calcRanges();
- QPtrListIterator<Range> it2( it.current()->getRanges() );
+ TQPtrListIterator<Range> it2( it.current()->getRanges() );
for ( ; it2.current(); ++it2 ) {
_ranges.addRange( it2.current()->getStart(), it2.current()->getEnd() );
}
@@ -347,7 +347,7 @@ void Archive::calcRanges()
//%%% into one big contiguous range.
if ( _ranges.getRanges().count() > 1 ) {
kdDebug() << "Archive::calcRanges() -- extra ranges detected, fixing..." << endl;
- QPtrListIterator<Range> iter( _ranges.getRanges() );
+ TQPtrListIterator<Range> iter( _ranges.getRanges() );
for ( ; iter.current(); ++iter ) {
kdDebug() << "Archive::calcRanges() -- range = " << iter.current() << " to " << iter.current()->getEnd() << endl;
}
diff --git a/kdat/Archive.h b/kdat/Archive.h
index b64ae36..9f42684 100644
--- a/kdat/Archive.h
+++ b/kdat/Archive.h
@@ -21,8 +21,8 @@
#include <stdio.h>
-#include <qptrlist.h>
-#include <qstring.h>
+#include <tqptrlist.h>
+#include <tqstring.h>
#include "File.h"
@@ -38,8 +38,8 @@ class Archive {
int _ctime;
FILE* _fptr;
int _offset;
- QString _name;
- QPtrList<File> _children;
+ TQString _name;
+ TQPtrList<File> _children;
RangeList _ranges;
Tape* _tape;
public:
@@ -50,7 +50,7 @@ public:
* @param ctime The create time of the archive.
* @param name The name given to this archive by the user.
*/
- Archive( Tape* tape, int ctime, const QString & name );
+ Archive( Tape* tape, int ctime, const TQString & name );
/**
* Create a new stubbed instance of an archive. The file pointer and
@@ -113,7 +113,7 @@ public:
*
* @return The name of this archive.
*/
- QString getName();
+ TQString getName();
/**
* Get the tape that contains this archive.
@@ -127,14 +127,14 @@ public:
*
* @return A list of the immediate children of this archive.
*/
- const QPtrList<File>& getChildren();
+ const TQPtrList<File>& getChildren();
/**
* Get the list of ranges of this file and all of its children.
*
* @return A list of ranges.
*/
- const QPtrList<Range>& getRanges();
+ const TQPtrList<Range>& getRanges();
/**
* Set the ending tape block for this archive.
@@ -148,7 +148,7 @@ public:
*
* @param name The new archive name.
*/
- void setName( const QString & name );
+ void setName( const TQString & name );
/**
* Add a new top level file as a child of this archive.
@@ -173,7 +173,7 @@ public:
*
* @return A pointer to the newly created file entry.
*/
- File* addFile( int size, int mtime, int startRecord, int endRecord, const QString & filename );
+ 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 children.
diff --git a/kdat/ArchiveInfoWidget.cpp b/kdat/ArchiveInfoWidget.cpp
index 225d229..c3838d4 100644
--- a/kdat/ArchiveInfoWidget.cpp
+++ b/kdat/ArchiveInfoWidget.cpp
@@ -18,9 +18,9 @@
#include <time.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qlineedit.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqlineedit.h>
#include <kapplication.h>
#include <kpushbutton.h>
@@ -35,13 +35,13 @@
#include "ArchiveInfoWidget.moc"
-ArchiveInfoWidget::ArchiveInfoWidget( QWidget* parent, const char* name )
- : QWidget( parent, name ),
+ArchiveInfoWidget::ArchiveInfoWidget( TQWidget* parent, const char* name )
+ : TQWidget( parent, name ),
_archive( 0 )
{
- QLabel* lbl1 = new QLabel( i18n( "Archive name:" ), this );
- QLabel* lbl2 = new QLabel( i18n( "Created on:" ), this );
- QLabel* lbl3 = new QLabel( i18n( "Size:" ), this );
+ TQLabel* lbl1 = new TQLabel( i18n( "Archive name:" ), this );
+ TQLabel* lbl2 = new TQLabel( i18n( "Created on:" ), this );
+ TQLabel* lbl3 = new TQLabel( i18n( "Size:" ), this );
int max = lbl1->sizeHint().width();
if ( lbl2->sizeHint().width() > max ) max = lbl2->sizeHint().width();
@@ -51,45 +51,45 @@ ArchiveInfoWidget::ArchiveInfoWidget( QWidget* parent, const char* name )
lbl2->setFixedSize( max, lbl2->sizeHint().height() );
lbl3->setFixedSize( max, lbl3->sizeHint().height() );
- _archiveName = new QLineEdit( this );
+ _archiveName = new TQLineEdit( this );
_archiveName->setFixedHeight( _archiveName->sizeHint().height() );
- _ctime = new QLabel( "???", this );
+ _ctime = new TQLabel( "???", this );
_ctime->setFixedHeight( _ctime->sizeHint().height() );
- _size = new QLabel( "???", this );
+ _size = new TQLabel( "???", this );
_size->setFixedHeight( _size->sizeHint().height() );
_apply = new KPushButton( KStdGuiItem::apply(), this );
_apply->setFixedSize( 80, _apply->sizeHint().height() );
_apply->setEnabled( FALSE );
- QVBoxLayout* l1 = new QVBoxLayout( this, 4, 4 );
+ TQVBoxLayout* l1 = new TQVBoxLayout( this, 4, 4 );
- QHBoxLayout* l1_1 = new QHBoxLayout();
+ TQHBoxLayout* l1_1 = new TQHBoxLayout();
l1->addLayout( l1_1 );
l1_1->addWidget( lbl1 );
l1_1->addWidget( _archiveName, 1 );
- QHBoxLayout* l1_2 = new QHBoxLayout();
+ TQHBoxLayout* l1_2 = new TQHBoxLayout();
l1->addLayout( l1_2 );
l1_2->addWidget( lbl2 );
l1_2->addWidget( _ctime );
- QHBoxLayout* l1_3 = new QHBoxLayout();
+ TQHBoxLayout* l1_3 = new TQHBoxLayout();
l1->addLayout( l1_3 );
l1_3->addWidget( lbl3 );
l1_3->addWidget( _size );
l1->addStretch( 1 );
- QHBoxLayout* l1_4 = new QHBoxLayout();
+ TQHBoxLayout* l1_4 = new TQHBoxLayout();
l1->addLayout( l1_4 );
l1_4->addStretch( 1 );
l1_4->addWidget( _apply );
- connect( _archiveName, SIGNAL( textChanged( const QString& ) ), this, SLOT( slotTextChanged( const QString& ) ) );
- connect( _apply , SIGNAL( clicked() ) , this, SLOT( slotApply() ) );
+ connect( _archiveName, TQT_SIGNAL( textChanged( const TQString& ) ), this, TQT_SLOT( slotTextChanged( const TQString& ) ) );
+ connect( _apply , TQT_SIGNAL( clicked() ) , this, TQT_SLOT( slotApply() ) );
}
ArchiveInfoWidget::~ArchiveInfoWidget()
@@ -106,7 +106,7 @@ void ArchiveInfoWidget::setArchive( Archive* archive )
_archiveName->setText( _archive->getName() );
- QString tmp;
+ TQString tmp;
time_t tm = _archive->getCTime();
tmp = ctime( &tm );
tmp = tmp.stripWhiteSpace();
@@ -122,7 +122,7 @@ void ArchiveInfoWidget::setArchive( Archive* archive )
_size->setText( Util::kbytesToString( used ) );
}
-void ArchiveInfoWidget::slotTextChanged( const QString& text )
+void ArchiveInfoWidget::slotTextChanged( const TQString& text )
{
if ( !_archive ) {
return;
diff --git a/kdat/ArchiveInfoWidget.h b/kdat/ArchiveInfoWidget.h
index 83d7bab..a34d1c9 100644
--- a/kdat/ArchiveInfoWidget.h
+++ b/kdat/ArchiveInfoWidget.h
@@ -19,7 +19,7 @@
#ifndef _ArchiveInfoWidget_h_
#define _ArchiveInfoWidget_h_
-#include <qwidget.h>
+#include <tqwidget.h>
class QLabel;
class QLineEdit;
@@ -30,21 +30,21 @@ class Archive;
/**
* @short Display/edit information about an archive index.
*/
-class ArchiveInfoWidget : public QWidget {
+class ArchiveInfoWidget : public TQWidget {
Q_OBJECT
Archive* _archive;
- QLineEdit* _archiveName;
- QLabel* _ctime;
- QLabel* _size;
- QPushButton* _apply;
+ TQLineEdit* _archiveName;
+ TQLabel* _ctime;
+ TQLabel* _size;
+ TQPushButton* _apply;
private slots:
- void slotTextChanged( const QString& text );
+ void slotTextChanged( const TQString& text );
void slotApply();
public:
/**
* Create a new archive info widget.
*/
- ArchiveInfoWidget( QWidget* parent = 0, const char* name = 0 );
+ ArchiveInfoWidget( TQWidget* parent = 0, const char* name = 0 );
/**
* Destroy the archive info widget.
diff --git a/kdat/BackupDlg.cpp b/kdat/BackupDlg.cpp
index 1f237ab..8a26d2a 100644
--- a/kdat/BackupDlg.cpp
+++ b/kdat/BackupDlg.cpp
@@ -25,9 +25,9 @@
#include <sys/errno.h>
#include <sys/stat.h>
-#include <qdir.h>
-#include <qlabel.h>
-#include <qlayout.h>
+#include <tqdir.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
#include <kpushbutton.h>
#include <kstdguiitem.h>
@@ -49,10 +49,10 @@
#include "BackupDlg.moc"
-BackupDlg::BackupDlg( const QString & archiveName, const QString & workingDir, const QStringList& files, bool oneFilesystem, bool incremental,
- const QString & snapshot, bool removeSnapshot, int archiveSize, Tape* tape,
- QWidget* parent, const char* name )
- : QDialog( parent, name, TRUE ),
+BackupDlg::BackupDlg( const TQString & archiveName, const TQString & workingDir, const TQStringList& files, bool oneFilesystem, bool incremental,
+ const TQString & snapshot, bool removeSnapshot, int archiveSize, Tape* tape,
+ TQWidget* parent, const char* name )
+ : TQDialog( parent, name, TRUE ),
_proc( NULL ),
_tarParser( NULL ),
_archiveName( archiveName ),
@@ -86,109 +86,109 @@ BackupDlg::BackupDlg( const QString & archiveName, const QString & workingDir, c
// const int labelWidth = 96;
const int labelWidth = 110;
- 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( "Time remaining:" ), f2 );
+ TQLabel* lbl2 = new TQLabel( i18n( "Time remaining:" ), f2 );
lbl2->setFixedSize( labelWidth, lbl2->sizeHint().height() );
- _timeRemaining = new QLabel( i18n( "00:00:00" ), f2 );
+ _timeRemaining = new TQLabel( i18n( "00:00:00" ), f2 );
_timeRemaining->setFixedHeight( _timeRemaining->sizeHint().height() );
- QLabel* lbl3 = new QLabel( i18n( "Total KB:" ), f1 );
+ TQLabel* lbl3 = new TQLabel( i18n( "Total KB:" ), f1 );
lbl3->setFixedSize( labelWidth, lbl3->sizeHint().height() );
- QLabel* totalKbytes = new QLabel( Util::kbytesToString( archiveSize ), f1 );
+ TQLabel* totalKbytes = new TQLabel( Util::kbytesToString( archiveSize ), f1 );
totalKbytes->setFixedHeight( totalKbytes->sizeHint().height() );
- QLabel* lbl4 = new QLabel( i18n( "KB written:" ), f2 );
+ TQLabel* lbl4 = new TQLabel( i18n( "KB written:" ), f2 );
lbl4->setFixedSize( labelWidth, lbl4->sizeHint().height() );
- _kbytesWritten = new QLabel( i18n( "0KB" ), f2 );
+ _kbytesWritten = new TQLabel( i18n( "0KB" ), f2 );
_kbytesWritten->setFixedHeight( _kbytesWritten->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( "Files:" ), f2 );
+ TQLabel* lbl6 = new TQLabel( i18n( "Files:" ), f2 );
lbl6->setFixedSize( labelWidth, lbl6->sizeHint().height() );
- _fileCount = new QLabel( i18n( "0" ), f2 );
+ _fileCount = new TQLabel( i18n( "0" ), f2 );
_fileCount->setFixedHeight( _fileCount->sizeHint().height() );
_log = new LoggerWidget( i18n( "Backup 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 KPushButton( KStdGuiItem::cancel(), 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( totalKbytes, 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( _timeRemaining, 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( _kbytesWritten, 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( _fileCount, 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 );
@@ -207,14 +207,14 @@ void BackupDlg::show()
_archive = new Archive( _tape, time( NULL ), _archiveName.utf8() );
- chdir( QFile::encodeName(_workingDir) );
+ chdir( TQFile::encodeName(_workingDir) );
if ( _removeSnapshot ) {
- unlink( QFile::encodeName(_snapshot) );
+ unlink( TQFile::encodeName(_snapshot) );
}
_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 ) ) );
_proc = new KProcess();
*_proc << Options::instance()->getTarCommand();
@@ -237,16 +237,16 @@ void BackupDlg::show()
}
// Backup all files in current working directory.
- QDir dir;
+ TQDir dir;
//roland
- //QStringList::Iterator i = dir.entryList( QDir::All, QDir::Name | QDir::DirsFirst ).begin();
- QStringList FilesList = dir.entryList( QDir::All, QDir::Name | QDir::DirsFirst );
- QStringList::Iterator i = FilesList.begin();
+ //TQStringList::Iterator i = dir.entryList( TQDir::All, TQDir::Name | TQDir::DirsFirst ).begin();
+ TQStringList FilesList = dir.entryList( TQDir::All, TQDir::Name | TQDir::DirsFirst );
+ TQStringList::Iterator i = FilesList.begin();
//roland
for ( ; !(*i).isNull() ; ++i ) {
if ( *i != "." && *i != ".." ) {
if ( _oneFilesystem ) {
- if ( lstat( QFile::encodeName(*i), &info ) == 0 )
+ if ( lstat( TQFile::encodeName(*i), &info ) == 0 )
{
if ( info.st_dev == device ) {
*_proc << *i;
@@ -264,7 +264,7 @@ void BackupDlg::show()
/* 2002-01-28 LEW */
// printf("Fixing to list the files/dirs to be dumped:\n");
/* 2002-01-28 LEW */
- for ( QStringList::Iterator it = _files.begin();
+ for ( TQStringList::Iterator it = _files.begin();
it != _files.end();
++it ) {
/* 2002-01-28 LEW */
@@ -281,14 +281,14 @@ void BackupDlg::show()
return;
}
- connect( _proc, SIGNAL( processExited( KProcess* ) ), this, SLOT( slotProcessExited( KProcess* ) ) );
- connect( _proc, SIGNAL( receivedStdout( KProcess*, char*, int ) ), this, SLOT( slotStdout( KProcess*, char*, int ) ) );
+ connect( _proc, TQT_SIGNAL( processExited( KProcess* ) ), this, TQT_SLOT( slotProcessExited( KProcess* ) ) );
+ connect( _proc, TQT_SIGNAL( receivedStdout( KProcess*, char*, int ) ), this, TQT_SLOT( slotStdout( KProcess*, char*, int ) ) );
startTimer( 1000 );
_proc->start( KProcess::NotifyOnExit, KProcess::Stdout );
- QDialog::show();
+ TQDialog::show();
}
void BackupDlg::slotProcessExited( KProcess* )
@@ -299,7 +299,7 @@ void BackupDlg::slotProcessExited( KProcess* )
if ( _fileName.length() > 0 ) {
_archive->addFile( _fileSize, _fileMTime, _fileStartRecord, _totalRecords, _fileName );
- _fileName = QString::null;
+ _fileName = TQString::null;
}
TapeDrive::instance()->close();
@@ -349,7 +349,7 @@ void BackupDlg::slotStdout( KProcess*, char* buf, int len )
}
}
-void BackupDlg::slotEntry( const QString& name, int size, int mtime, int record )
+void BackupDlg::slotEntry( const TQString& name, int size, int mtime, int record )
{
if ( _fileName.length() > 0 ) {
_archive->addFile( _fileSize, _fileMTime, _fileStartRecord, record, _fileName );
@@ -364,7 +364,7 @@ void BackupDlg::slotEntry( const QString& name, int size, int mtime, int record
_fileMTime = mtime;
_fileStartRecord = record;
- QString tmp;
+ TQString tmp;
tmp.setNum( ++_numFiles );
_fileCount->setText( tmp );
_log->append( name );
@@ -395,7 +395,7 @@ void BackupDlg::slotAbort()
_abort->setEnabled( FALSE );
}
-void BackupDlg::timerEvent( QTimerEvent* )
+void BackupDlg::timerEvent( TQTimerEvent* )
{
updateStats();
}
@@ -406,10 +406,10 @@ void BackupDlg::updateStats()
return;
}
- QString str;
+ TQString str;
int elapsed = time( NULL ) - _startTime;
- str = QString::fromUtf8( QCString().sprintf( i18n( "%02d:%02d:%02d" ).utf8().data(), elapsed / 3600, elapsed / 60 % 60, elapsed % 60 ) );
+ str = TQString::fromUtf8( TQCString().sprintf( i18n( "%02d:%02d:%02d" ).utf8().data(), elapsed / 3600, elapsed / 60 % 60, elapsed % 60 ) );
_elapsedTime->setText( str );
int remain = 0;
@@ -419,7 +419,7 @@ void BackupDlg::updateStats()
if ( remain < 0 ) {
remain = 0;
}
- str = QString::fromUtf8( QCString().sprintf( i18n( "%02d:%02d:%02d" ).utf8().data(), remain / 3600, remain / 60 % 60, remain % 60 ) );
+ str = TQString::fromUtf8( TQCString().sprintf( i18n( "%02d:%02d:%02d" ).utf8().data(), remain / 3600, remain / 60 % 60, remain % 60 ) );
_timeRemaining->setText( str );
str = Util::kbytesToString( (int)_totalKBytes );
diff --git a/kdat/BackupDlg.h b/kdat/BackupDlg.h
index d15f5c4..c3c602b 100644
--- a/kdat/BackupDlg.h
+++ b/kdat/BackupDlg.h
@@ -19,7 +19,7 @@
#ifndef _BackupDlg_h_
#define _BackupDlg_h_
-#include <qdialog.h>
+#include <tqdialog.h>
class QLabel;
class QPushButton;
@@ -35,30 +35,30 @@ class TarParser;
/**
* @short Status dialog for backing up files.
*/
-class BackupDlg : public QDialog {
+class BackupDlg : public TQDialog {
Q_OBJECT
KProcess* _proc;
TarParser* _tarParser;
- QString _archiveName;
- QString _workingDir;
- QStringList _files;
+ TQString _archiveName;
+ TQString _workingDir;
+ TQStringList _files;
bool _oneFilesystem;
bool _incremental;
- QString _snapshot;
+ TQString _snapshot;
bool _removeSnapshot;
int _archiveSize;
Tape* _tape;
float _totalKBytes;
uint _totalRecords;
- QLabel* _elapsedTime;
- QLabel* _timeRemaining;
- QLabel* _kbytesWritten;
- QLabel* _transferRate;
- QLabel* _fileCount;
+ TQLabel* _elapsedTime;
+ TQLabel* _timeRemaining;
+ TQLabel* _kbytesWritten;
+ TQLabel* _transferRate;
+ TQLabel* _fileCount;
LoggerWidget* _log;
- QPushButton* _ok;
- QPushButton* _save;
- QPushButton* _abort;
+ TQPushButton* _ok;
+ TQPushButton* _save;
+ TQPushButton* _abort;
int _startTime;
Archive* _archive;
bool _aborted;
@@ -67,7 +67,7 @@ class BackupDlg : public QDialog {
int _fileSize;
int _fileMTime;
int _fileStartRecord;
- QString _fileName;
+ TQString _fileName;
void updateStats();
private slots:
@@ -75,10 +75,10 @@ private slots:
void slotStdout( KProcess* proc, char* buf, int len );
void slotOK();
void slotAbort();
- void slotEntry( const QString& name, int size, int mtime, int record );
+ void slotEntry( const TQString& name, int size, int mtime, int record );
protected:
void show();
- void timerEvent( QTimerEvent* e );
+ void timerEvent( TQTimerEvent* e );
public:
/**
* Create a backup dialog.
@@ -95,9 +95,9 @@ public:
* @param parent The parent widget for this dialog.
* @param name The name of this widget.
*/
- BackupDlg( const QString & archiveName, const QString & workingDir, const QStringList& files, bool oneFilesystem, bool incremental,
- const QString & snapshot, bool removeSnapshot, int archiveSize, Tape* tape,
- QWidget* parent = 0, const char* name = 0 );
+ BackupDlg( const TQString & archiveName, const TQString & workingDir, const TQStringList& files, bool oneFilesystem, bool incremental,
+ const TQString & snapshot, bool removeSnapshot, int archiveSize, Tape* tape,
+ TQWidget* parent = 0, const char* name = 0 );
/**
* Destroy the backup dialog.
diff --git a/kdat/BackupOptDlg.cpp b/kdat/BackupOptDlg.cpp
index de4622a..b5311ac 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 <qlayout.h>
+#include <tqlayout.h>
#include <kpushbutton.h>
#include <kstdguiitem.h>
@@ -30,8 +30,8 @@
#include "BackupOptDlg.moc"
-BackupOptDlg::BackupOptDlg( BackupProfile* backupProfile, QWidget* parent, const char* name )
- : QDialog( parent, name, TRUE )
+BackupOptDlg::BackupOptDlg( BackupProfile* backupProfile, TQWidget* parent, const char* name )
+ : TQDialog( parent, name, TRUE )
{
setIconText( i18n( "KDat: Backup Options" ) );
setCaption( i18n( "KDat: Backup Options" ) );
@@ -43,15 +43,15 @@ BackupOptDlg::BackupOptDlg( BackupProfile* backupProfile, QWidget* parent, const
KPushButton* ok = new KPushButton( KStdGuiItem::ok(), this );
ok->setFixedSize( 80, ok->sizeHint().height() );
- connect( ok, SIGNAL( clicked() ), this, SLOT( accept() ) );
+ connect( ok, TQT_SIGNAL( clicked() ), this, TQT_SLOT( accept() ) );
KPushButton* cancel = new KPushButton( KStdGuiItem::cancel(), this );
cancel->setFixedSize( 80, ok->sizeHint().height() );
- connect( cancel, SIGNAL( clicked() ), this, SLOT( reject() ) );
+ connect( cancel, TQT_SIGNAL( clicked() ), this, TQT_SLOT( reject() ) );
- QVBoxLayout* l1 = new QVBoxLayout( this, 8, 4 );
+ TQVBoxLayout* l1 = new TQVBoxLayout( this, 8, 4 );
l1->addWidget( _profile, 1 );
- QHBoxLayout* l1_1 = new QHBoxLayout();
+ TQHBoxLayout* l1_1 = new TQHBoxLayout();
l1->addLayout( l1_1 );
l1_1->addStretch( 1 );
l1_1->addWidget( ok );
@@ -64,17 +64,17 @@ BackupOptDlg::~BackupOptDlg()
{
}
-QString BackupOptDlg::getArchiveName()
+TQString BackupOptDlg::getArchiveName()
{
return _profile->getArchiveName();
}
-QString BackupOptDlg::getWorkingDirectory()
+TQString BackupOptDlg::getWorkingDirectory()
{
return _profile->getWorkingDirectory();
}
-const QStringList& BackupOptDlg::getRelativeFiles()
+const TQStringList& BackupOptDlg::getRelativeFiles()
{
return _profile->getRelativeFiles();
}
@@ -89,7 +89,7 @@ bool BackupOptDlg::isIncremental()
return _profile->isIncremental();
}
-QString BackupOptDlg::getSnapshotFile()
+TQString BackupOptDlg::getSnapshotFile()
{
return _profile->getSnapshotFile();
}
diff --git a/kdat/BackupOptDlg.h b/kdat/BackupOptDlg.h
index f76a7da..10047dc 100644
--- a/kdat/BackupOptDlg.h
+++ b/kdat/BackupOptDlg.h
@@ -19,7 +19,7 @@
#ifndef _BackupOptDlg_h_
#define _BackupOptDlg_h_
-#include <qdialog.h>
+#include <tqdialog.h>
class BackupProfile;
class BackupProfileWidget;
@@ -27,7 +27,7 @@ class BackupProfileWidget;
/**
* @short Display/edit the parameters for a backup operation.
*/
-class BackupOptDlg : public QDialog {
+class BackupOptDlg : public TQDialog {
Q_OBJECT
BackupProfileWidget* _profile;
public:
@@ -36,7 +36,7 @@ public:
*
* @param backupProfile The backup profile.
*/
- BackupOptDlg( BackupProfile* backupProfile, QWidget* parent=0, const char* name=0 );
+ BackupOptDlg( BackupProfile* backupProfile, TQWidget* parent=0, const char* name=0 );
/**
* Destroy the backup options dialog.
@@ -48,21 +48,21 @@ public:
*
* @return The name of the new archive.
*/
- QString getArchiveName();
+ TQString getArchiveName();
/**
* Query the working directory for the tar command.
*
* @return The working directory.
*/
- QString getWorkingDirectory();
+ TQString getWorkingDirectory();
/**
* Query the list of files to backup, relative to the working directory.
*
* @return The file list.
*/
- const QStringList& getRelativeFiles();
+ const TQStringList& getRelativeFiles();
/**
* Query whether or not to cross filesystem boundaries when performing the
@@ -85,7 +85,7 @@ public:
*
* @return The name of the snapshot file.
*/
- QString getSnapshotFile();
+ TQString getSnapshotFile();
/**
* Query whether to remove the snapshot file before beginning an
diff --git a/kdat/BackupProfile.cpp b/kdat/BackupProfile.cpp
index 2116005..72506d4 100644
--- a/kdat/BackupProfile.cpp
+++ b/kdat/BackupProfile.cpp
@@ -20,7 +20,7 @@
#include <stdlib.h>
#include <unistd.h>
-#include <qfile.h>
+#include <tqfile.h>
#include <kstandarddirs.h>
@@ -32,7 +32,7 @@ BackupProfile::BackupProfile()
{
}
-BackupProfile::BackupProfile( const QString & name )
+BackupProfile::BackupProfile( const TQString & name )
: _name( name ),
_lastSavedName( name )
{
@@ -45,9 +45,9 @@ BackupProfile::~BackupProfile()
void BackupProfile::load()
{
- QString filename = locateLocal( "appdata", _lastSavedName + ".bp");
+ TQString filename = locateLocal( "appdata", _lastSavedName + ".bp");
- FILE* fptr = fopen( QFile::encodeName(filename), "r" );
+ FILE* fptr = fopen( TQFile::encodeName(filename), "r" );
if ( !fptr ) {
return;
}
@@ -76,7 +76,7 @@ void BackupProfile::load()
sscanf( buf, "%d", &filecount );
for ( int i = 0; i < filecount; i++ ) {
fgets( buf, 4096, fptr );
- QString filename = buf;
+ TQString filename = buf;
filename.truncate( filename.length() - 1 );
_absoluteFiles.append( filename );
}
@@ -105,7 +105,7 @@ void BackupProfile::load()
void BackupProfile::save()
{
- QString filename = locateLocal( "appdata", _lastSavedName + ".bp");
+ TQString filename = locateLocal( "appdata", _lastSavedName + ".bp");
bool null_name_p = _lastSavedName.isEmpty();
_lastSavedName = _name.copy();
@@ -114,9 +114,9 @@ void BackupProfile::save()
return;
}
- unlink( QFile::encodeName(filename) );
+ unlink( TQFile::encodeName(filename) );
- FILE* fptr = fopen( QFile::encodeName(filename), "w" );
+ FILE* fptr = fopen( TQFile::encodeName(filename), "w" );
if ( !fptr ) {
return;
}
@@ -126,7 +126,7 @@ void BackupProfile::save()
fprintf( fptr, "%s\n", _archiveName.utf8().data() );
fprintf( fptr, "%s\n", _workingDirectory.utf8().data() );
fprintf( fptr, "%d\n", _absoluteFiles.count() );
- for ( QStringList::Iterator it = _absoluteFiles.begin();
+ for ( TQStringList::Iterator it = _absoluteFiles.begin();
it != _absoluteFiles.end();
++it )
fprintf( fptr, "%s\n", (*it).utf8().data() );
@@ -138,17 +138,17 @@ void BackupProfile::save()
fclose( fptr );
}
-QString BackupProfile::getName()
+TQString BackupProfile::getName()
{
return _name;
}
-QString BackupProfile::getArchiveName()
+TQString BackupProfile::getArchiveName()
{
return _archiveName;
}
-QString BackupProfile::getWorkingDirectory()
+TQString BackupProfile::getWorkingDirectory()
{
return _workingDirectory;
@@ -162,12 +162,12 @@ QString BackupProfile::getWorkingDirectory()
#endif
}
-const QStringList& BackupProfile::getRelativeFiles()
+const TQStringList& BackupProfile::getRelativeFiles()
{
return _relativeFiles;
}
-const QStringList& BackupProfile::getAbsoluteFiles()
+const TQStringList& BackupProfile::getAbsoluteFiles()
{
return _absoluteFiles;
}
@@ -182,7 +182,7 @@ bool BackupProfile::isIncremental()
return _incremental;
}
-QString BackupProfile::getSnapshotFile()
+TQString BackupProfile::getSnapshotFile()
{
return _snapshotFile;
}
@@ -192,21 +192,21 @@ bool BackupProfile::getRemoveSnapshot()
return _removeSnapshot;
}
-void BackupProfile::setName( const QString & name )
+void BackupProfile::setName( const TQString & name )
{
_name = name;
BackupProfileManager::instance()->backupProfileModified( this );
}
-void BackupProfile::setArchiveName( const QString & archiveName )
+void BackupProfile::setArchiveName( const TQString & archiveName )
{
_archiveName = archiveName;
BackupProfileManager::instance()->backupProfileModified( this );
}
-void BackupProfile::setWorkingDirectory( const QString & workingDirectory )
+void BackupProfile::setWorkingDirectory( const TQString & workingDirectory )
{
_workingDirectory = workingDirectory;
@@ -216,12 +216,12 @@ void BackupProfile::setWorkingDirectory( const QString & workingDirectory )
BackupProfileManager::instance()->backupProfileModified( this );
}
-void BackupProfile::setAbsoluteFiles( const QStringList& files )
+void BackupProfile::setAbsoluteFiles( const TQStringList& files )
{
_absoluteFiles = files;
// Make sure working directory is still valid.
- QStringList::Iterator it = _absoluteFiles.begin();
+ TQStringList::Iterator it = _absoluteFiles.begin();
for ( ;
it != _absoluteFiles.end();
++it )
@@ -257,7 +257,7 @@ void BackupProfile::setIncremental( bool incremental )
BackupProfileManager::instance()->backupProfileModified( this );
}
-void BackupProfile::setSnapshotFile( const QString & snapshotFile )
+void BackupProfile::setSnapshotFile( const TQString & snapshotFile )
{
_snapshotFile = snapshotFile;
@@ -279,11 +279,11 @@ void BackupProfile::calcRelativeFiles()
remove++;
}
- for ( QStringList::Iterator it = _absoluteFiles.begin();
+ for ( TQStringList::Iterator it = _absoluteFiles.begin();
it != _absoluteFiles.end();
++it )
{
- QString fn = *it;
+ TQString fn = *it;
fn.remove( 0, remove );
if ( fn.isEmpty() ) {
fn = ".";
diff --git a/kdat/BackupProfile.h b/kdat/BackupProfile.h
index 2438fc5..048690d 100644
--- a/kdat/BackupProfile.h
+++ b/kdat/BackupProfile.h
@@ -19,22 +19,22 @@
#ifndef _BackupProfile_h_
#define _BackupProfile_h_
-#include <qstring.h>
-#include <qstrlist.h>
+#include <tqstring.h>
+#include <tqstrlist.h>
/**
* @short This class stores all the information necessary to perform a backup.
*/
class BackupProfile {
- QString _name;
- QString _lastSavedName;
- QString _archiveName;
- QString _workingDirectory;
- QStringList _relativeFiles;
- QStringList _absoluteFiles;
+ TQString _name;
+ TQString _lastSavedName;
+ TQString _archiveName;
+ TQString _workingDirectory;
+ TQStringList _relativeFiles;
+ TQStringList _absoluteFiles;
bool _oneFilesystem;
bool _incremental;
- QString _snapshotFile;
+ TQString _snapshotFile;
bool _removeSnapshot;
void calcRelativeFiles();
@@ -49,7 +49,7 @@ public:
*
* @param name The name of the backup profile.
*/
- BackupProfile( const QString & name );
+ BackupProfile( const TQString & name );
/**
* Destroy the backup profile.
@@ -72,35 +72,35 @@ public:
*
* @return The name of this profile.
*/
- QString getName();
+ TQString getName();
/**
* Query the name of the archive.
*
* @return The name of the new archive.
*/
- QString getArchiveName();
+ TQString getArchiveName();
/**
* Query the working directory for the tar command.
*
* @return The working directory.
*/
- QString getWorkingDirectory();
+ TQString getWorkingDirectory();
/**
* Query the list of files to backup, relative to the working directory.
*
* @return The file list.
*/
- const QStringList& getRelativeFiles();
+ const TQStringList& getRelativeFiles();
/**
* Query the list of files to backup, with their full paths.
*
* @return The file list.
*/
- const QStringList& getAbsoluteFiles();
+ const TQStringList& getAbsoluteFiles();
/**
* Query whether or not to cross filesystem boundaries when performing the
@@ -123,7 +123,7 @@ public:
*
* @return The name of the snapshot file.
*/
- QString getSnapshotFile();
+ TQString getSnapshotFile();
/**
* Query whether to remove the snapshot file before beginning an
@@ -138,28 +138,28 @@ public:
*
* @param name The name of this profile.
*/
- void setName( const QString & name );
+ void setName( const TQString & name );
/**
* Set the name of the archive.
*
* @param archiveName The name of the new archive.
*/
- void setArchiveName( const QString & archiveName );
+ void setArchiveName( const TQString & archiveName );
/**
* Set the working directory for the tar command.
*
* @param workingDirectory The working directory.
*/
- void setWorkingDirectory( const QString & workingDirectory );
+ void setWorkingDirectory( const TQString & workingDirectory );
/**
* Set the list of files to backup, with their full paths.
*
* @param files The file list.
*/
- void setAbsoluteFiles( const QStringList& files );
+ void setAbsoluteFiles( const TQStringList& files );
/**
* Set whether or not to cross filesystem boundaries when performing the
@@ -183,7 +183,7 @@ public:
*
* @param snapshotFile The name of the snapshot file.
*/
- void setSnapshotFile( const QString & snapshotFile );
+ void setSnapshotFile( const TQString & snapshotFile );
/**
* Set whether to remove the snapshot file before beginning an
diff --git a/kdat/BackupProfileInfoWidget.cpp b/kdat/BackupProfileInfoWidget.cpp
index e294c04..7e4a918 100644
--- a/kdat/BackupProfileInfoWidget.cpp
+++ b/kdat/BackupProfileInfoWidget.cpp
@@ -19,9 +19,9 @@
#include <stdlib.h>
#include <time.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qlineedit.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqlineedit.h>
#include <kapplication.h>
#include <kpushbutton.h>
@@ -36,52 +36,52 @@
#include "BackupProfileInfoWidget.moc"
-BackupProfileInfoWidget::BackupProfileInfoWidget( QWidget* parent, const char* name )
- : QWidget( parent, name ),
+BackupProfileInfoWidget::BackupProfileInfoWidget( TQWidget* parent, const char* name )
+ : TQWidget( parent, name ),
_backupProfile( 0 )
{
- QLabel* lbl1 = new QLabel( i18n( "Backup profile name:" ), this );
+ TQLabel* lbl1 = new TQLabel( i18n( "Backup profile name:" ), this );
int max = lbl1->sizeHint().width();
lbl1->setFixedSize( max, lbl1->sizeHint().height() );
- _name = new QLineEdit( this );
+ _name = new TQLineEdit( this );
_name->setFixedHeight( _name->sizeHint().height() );
_profile = new BackupProfileWidget( this );
- QPushButton* getSelection = new QPushButton( i18n( "Files >>" ), this );
+ TQPushButton* getSelection = new TQPushButton( i18n( "Files >>" ), this );
getSelection->setFixedSize( 80, getSelection->sizeHint().height() );
- QPushButton* setSelection = new QPushButton( i18n( "<< Files" ), this );
+ TQPushButton* setSelection = new TQPushButton( i18n( "<< Files" ), this );
setSelection->setFixedSize( 80, setSelection->sizeHint().height() );
_apply = new KPushButton( KStdGuiItem::apply(), this );
_apply->setFixedSize( 80, _apply->sizeHint().height() );
_apply->setEnabled( FALSE );
- QVBoxLayout* l1 = new QVBoxLayout( this, 4, 4 );
+ TQVBoxLayout* l1 = new TQVBoxLayout( this, 4, 4 );
- QHBoxLayout* l1_1 = new QHBoxLayout();
+ TQHBoxLayout* l1_1 = new TQHBoxLayout();
l1->addLayout( l1_1 );
l1_1->addWidget( lbl1 );
l1_1->addWidget( _name, 1 );
l1->addWidget( _profile, 1 );
- QHBoxLayout* l1_2 = new QHBoxLayout();
+ TQHBoxLayout* l1_2 = new TQHBoxLayout();
l1->addLayout( l1_2 );
l1_2->addWidget( setSelection );
l1_2->addWidget( getSelection );
l1_2->addStretch( 1 );
l1_2->addWidget( _apply );
- connect( setSelection, SIGNAL( clicked() ) , this, SLOT( slotSetSelection() ) );
- connect( getSelection, SIGNAL( clicked() ) , this, SLOT( slotGetSelection() ) );
- connect( _name , SIGNAL( textChanged( const QString & ) ), this, SLOT( slotTextChanged( const QString & ) ) );
- connect( _profile , SIGNAL( sigSomethingChanged() ) , this, SLOT( slotSomethingChanged() ) );
- connect( _apply , SIGNAL( clicked() ) , this, SLOT( slotApply() ) );
+ connect( setSelection, TQT_SIGNAL( clicked() ) , this, TQT_SLOT( slotSetSelection() ) );
+ connect( getSelection, TQT_SIGNAL( clicked() ) , this, TQT_SLOT( slotGetSelection() ) );
+ connect( _name , TQT_SIGNAL( textChanged( const TQString & ) ), this, TQT_SLOT( slotTextChanged( const TQString & ) ) );
+ connect( _profile , TQT_SIGNAL( sigSomethingChanged() ) , this, TQT_SLOT( slotSomethingChanged() ) );
+ connect( _apply , TQT_SIGNAL( clicked() ) , this, TQT_SLOT( slotApply() ) );
}
BackupProfileInfoWidget::~BackupProfileInfoWidget()
@@ -111,8 +111,8 @@ bool BackupProfileInfoWidget::isModified()
return TRUE;
}
- QString one = _backupProfile->getWorkingDirectory();
- QString two = _profile->getWorkingDirectory();
+ TQString one = _backupProfile->getWorkingDirectory();
+ TQString two = _profile->getWorkingDirectory();
// 7/31/01: this breaks
// if ( _profile->getWorkingDirectory() != _backupProfile->getWorkingDirectory() ) {
if( one != two ){
@@ -123,10 +123,10 @@ bool BackupProfileInfoWidget::isModified()
return TRUE;
}
- QStringList list1 = _profile->getAbsoluteFiles();
- QStringList list2 = _backupProfile->getAbsoluteFiles();
- QStringList::Iterator i = list1.begin();
- QStringList::Iterator j = list2.begin();
+ TQStringList list1 = _profile->getAbsoluteFiles();
+ TQStringList list2 = _backupProfile->getAbsoluteFiles();
+ TQStringList::Iterator i = list1.begin();
+ TQStringList::Iterator j = list2.begin();
for ( ; i != list1.end(); ++i ) {
for ( ; j != list2.end(); ++j ) {
if ( *i == *j ) {
@@ -158,7 +158,7 @@ bool BackupProfileInfoWidget::isModified()
return FALSE;
}
-void BackupProfileInfoWidget::slotTextChanged( const QString & )
+void BackupProfileInfoWidget::slotTextChanged( const TQString & )
{
if ( !_backupProfile ) {
return;
@@ -203,7 +203,7 @@ void BackupProfileInfoWidget::slotSetSelection()
void BackupProfileInfoWidget::slotGetSelection()
{
- QStringList files;
+ TQStringList files;
KDatMainWindow::getInstance()->getBackupFiles( files );
_profile->setAbsoluteFiles( files );
}
diff --git a/kdat/BackupProfileInfoWidget.h b/kdat/BackupProfileInfoWidget.h
index 413cf63..53ca292 100644
--- a/kdat/BackupProfileInfoWidget.h
+++ b/kdat/BackupProfileInfoWidget.h
@@ -19,23 +19,23 @@
#ifndef _BackupProfileInfoWidget_h_
#define _BackupProfileInfoWidget_h_
-#include <qwidget.h>
+#include <tqwidget.h>
class BackupProfileWidget;
/**
* @short Display/edit information about a backup profile.
*/
-class BackupProfileInfoWidget : public QWidget {
+class BackupProfileInfoWidget : public TQWidget {
Q_OBJECT
BackupProfile* _backupProfile;
- QLineEdit* _name;
+ TQLineEdit* _name;
BackupProfileWidget* _profile;
- QPushButton* _apply;
+ TQPushButton* _apply;
bool isModified();
private slots:
- void slotTextChanged( const QString & text );
+ void slotTextChanged( const TQString & text );
void slotSomethingChanged();
void slotApply();
void slotSetSelection();
@@ -44,7 +44,7 @@ public:
/**
* Create a new backup profile info widget.
*/
- BackupProfileInfoWidget( QWidget* parent = 0, const char* name = 0 );
+ BackupProfileInfoWidget( TQWidget* parent = 0, const char* name = 0 );
/**
* Destroy the backup profile widget.
diff --git a/kdat/BackupProfileManager.cpp b/kdat/BackupProfileManager.cpp
index 7fc2411..7b42ab7 100644
--- a/kdat/BackupProfileManager.cpp
+++ b/kdat/BackupProfileManager.cpp
@@ -19,8 +19,8 @@
#include <stdlib.h>
#include <unistd.h>
-#include <qdir.h>
-#include <qregexp.h>
+#include <tqdir.h>
+#include <tqregexp.h>
#include <kglobal.h>
#include <kstandarddirs.h>
@@ -34,14 +34,14 @@ BackupProfileManager::BackupProfileManager()
_backupProfiles.setAutoDelete( TRUE );
// Get a list of all available backup profiles.
- QStringList relList;
+ TQStringList relList;
(void) KGlobal::dirs()->findAllResources( "appdata", "*.bp", false, true, relList);
- for(QStringList::Iterator it = relList.begin();
+ for(TQStringList::Iterator it = relList.begin();
it != relList.end();
it++)
{
- QString fn = *it;
+ TQString fn = *it;
// Strip extension
_backupProfileNames.append( fn.left( fn.length() - 3 ) );
}
@@ -62,12 +62,12 @@ BackupProfileManager* BackupProfileManager::instance()
return _instance;
}
-const QStringList& BackupProfileManager::getBackupProfileNames()
+const TQStringList& BackupProfileManager::getBackupProfileNames()
{
return _backupProfileNames;
}
-BackupProfile* BackupProfileManager::findBackupProfile( const QString & name )
+BackupProfile* BackupProfileManager::findBackupProfile( const TQString & name )
{
BackupProfile* backupProfile = _backupProfiles[ name ];
@@ -97,10 +97,10 @@ void BackupProfileManager::removeBackupProfile( BackupProfile* backupProfile )
emit sigBackupProfileRemoved( backupProfile );
// Remove the index file.
- QString filename = locateLocal( "appdata",
- QString(backupProfile->getName()) + ".bp");
+ TQString filename = locateLocal( "appdata",
+ TQString(backupProfile->getName()) + ".bp");
- unlink( QFile::encodeName(filename) );
+ unlink( TQFile::encodeName(filename) );
_backupProfileNames.remove( backupProfile->getName() );
_backupProfiles.remove( backupProfile->getName() );
diff --git a/kdat/BackupProfileManager.h b/kdat/BackupProfileManager.h
index fa6939e..418d807 100644
--- a/kdat/BackupProfileManager.h
+++ b/kdat/BackupProfileManager.h
@@ -19,8 +19,8 @@
#ifndef _BackupProfileManager_h_
#define _BackupProfileManager_h_
-#include <qdict.h>
-#include <qobject.h>
+#include <tqdict.h>
+#include <tqobject.h>
#include "BackupProfile.h"
@@ -37,13 +37,13 @@
*
* The BackupProfileManager follows the Singleton pattern.
*/
-class BackupProfileManager : public QObject {
+class BackupProfileManager : public TQObject {
Q_OBJECT
static BackupProfileManager* _instance;
- QDict<BackupProfile> _backupProfiles;
- QStringList _backupProfileNames;
+ TQDict<BackupProfile> _backupProfiles;
+ TQStringList _backupProfileNames;
BackupProfileManager();
public:
@@ -59,9 +59,9 @@ public:
/**
* Get the list of all known backup profiles.
*
- * @return a QStringList containing the backup profile names.
+ * @return a TQStringList containing the backup profile names.
*/
- const QStringList& getBackupProfileNames();
+ const TQStringList& getBackupProfileNames();
/**
* Retrieve the named backup profile.
@@ -69,7 +69,7 @@ public:
* @param name The name of the backup profile.
* @return A pointer to the backup profile.
*/
- BackupProfile* findBackupProfile( const QString & name );
+ BackupProfile* findBackupProfile( const TQString & name );
/**
* Add a new backup profile.
diff --git a/kdat/BackupProfileWidget.cpp b/kdat/BackupProfileWidget.cpp
index 0b4dfa0..45acb56 100644
--- a/kdat/BackupProfileWidget.cpp
+++ b/kdat/BackupProfileWidget.cpp
@@ -16,13 +16,13 @@
// along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-#include <qcheckbox.h>
-#include <qcombobox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qlineedit.h>
-#include <qlistbox.h>
-#include <qpushbutton.h>
+#include <tqcheckbox.h>
+#include <tqcombobox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqlineedit.h>
+#include <tqlistbox.h>
+#include <tqpushbutton.h>
#include <kapplication.h>
@@ -33,58 +33,58 @@
#include "BackupProfileWidget.moc"
-BackupProfileWidget::BackupProfileWidget( QWidget* parent, const char* name )
+BackupProfileWidget::BackupProfileWidget( TQWidget* parent, const char* name )
: KTabCtl( parent, name )
{
- QWidget* one = new QWidget( this );
+ TQWidget* one = new TQWidget( this );
addTab( one, i18n( "Backup" ) );
- QLabel* lbl1 = new QLabel( i18n( "Archive name:" ), one );
+ TQLabel* lbl1 = new TQLabel( i18n( "Archive name:" ), one );
lbl1->setFixedSize( lbl1->sizeHint() );
- _archiveName = new QLineEdit( one );
+ _archiveName = new TQLineEdit( one );
_archiveName->setFixedHeight( _archiveName->sizeHint().height() );
- QLabel* lbl2 = new QLabel( i18n( "Working folder:" ), one );
+ TQLabel* lbl2 = new TQLabel( i18n( "Working folder:" ), one );
lbl2->setFixedSize( lbl2->sizeHint() );
- _workingDir = new QComboBox( FALSE, one );
+ _workingDir = new TQComboBox( FALSE, one );
_workingDir->setFixedHeight( _workingDir->sizeHint().height() );
- QLabel* lbl3 = new QLabel( i18n( "Backup files:" ), one );
+ TQLabel* lbl3 = new TQLabel( i18n( "Backup files:" ), one );
lbl3->setFixedHeight( lbl3->sizeHint().height() );
- _files = new QListBox( one );
+ _files = new TQListBox( one );
- QWidget* two = new QWidget( this );
+ TQWidget* two = new TQWidget( this );
addTab( two, i18n( "Tar Options" ) );
- _oneFilesystem = new QCheckBox( i18n( "Stay on one filesystem" ), two );
+ _oneFilesystem = new TQCheckBox( i18n( "Stay on one filesystem" ), two );
_oneFilesystem->setFixedHeight( _oneFilesystem->sizeHint().height() );
- _incremental = new QCheckBox( i18n( "GNU listed incremental" ), two );
+ _incremental = new TQCheckBox( i18n( "GNU listed incremental" ), two );
_incremental->setFixedHeight( _incremental->sizeHint().height() );
- connect( _incremental, SIGNAL( toggled( bool ) ), this, SLOT( slotIncrementalToggled( bool ) ) );
+ connect( _incremental, TQT_SIGNAL( toggled( bool ) ), this, TQT_SLOT( slotIncrementalToggled( bool ) ) );
- _snapshotLabel = new QLabel( i18n( "Snapshot file:" ), two );
+ _snapshotLabel = new TQLabel( i18n( "Snapshot file:" ), two );
_snapshotLabel->setFixedSize( _snapshotLabel->sizeHint() );
- _snapshotFile = new QLineEdit( two );
+ _snapshotFile = new TQLineEdit( two );
_snapshotFile->setFixedHeight( _snapshotFile->sizeHint().height() );
- _removeSnapshot = new QCheckBox( i18n( "Remove snapshot file before backup" ), two );
+ _removeSnapshot = new TQCheckBox( i18n( "Remove snapshot file before backup" ), two );
_removeSnapshot->setFixedHeight( _removeSnapshot->sizeHint().height() );
slotIncrementalToggled( FALSE );
- QVBoxLayout* l1 = new QVBoxLayout( one, 8, 4 );
+ TQVBoxLayout* l1 = new TQVBoxLayout( one, 8, 4 );
- QHBoxLayout* l1_1 = new QHBoxLayout();
+ TQHBoxLayout* l1_1 = new TQHBoxLayout();
l1->addLayout( l1_1 );
l1_1->addWidget( lbl1 );
l1_1->addWidget( _archiveName, 1 );
- QHBoxLayout* l1_2 = new QHBoxLayout();
+ TQHBoxLayout* l1_2 = new TQHBoxLayout();
l1->addLayout( l1_2 );
l1_2->addWidget( lbl2 );
l1_2->addWidget( _workingDir, 1 );
@@ -92,36 +92,36 @@ BackupProfileWidget::BackupProfileWidget( QWidget* parent, const char* name )
l1->addWidget( lbl3 );
l1->addWidget( _files, 1 );
- QVBoxLayout* l2 = new QVBoxLayout( two, 8, 4 );
+ TQVBoxLayout* l2 = new TQVBoxLayout( two, 8, 4 );
l2->addWidget( _oneFilesystem );
l2->addWidget( _incremental );
- QHBoxLayout* l2_1 = new QHBoxLayout();
+ TQHBoxLayout* l2_1 = new TQHBoxLayout();
l2->addLayout( l2_1 );
l2_1->addSpacing( 20 );
l2_1->addWidget( _snapshotLabel );
l2_1->addWidget( _snapshotFile, 1 );
- QHBoxLayout* l2_2 = new QHBoxLayout();
+ TQHBoxLayout* l2_2 = new TQHBoxLayout();
l2->addLayout( l2_2 );
l2_2->addSpacing( 20 );
l2_2->addWidget( _removeSnapshot );
l2->addStretch( 1 );
- connect( _archiveName , SIGNAL( textChanged( const QString & ) ), this, SLOT( slotTextChanged( const QString & ) ) );
- connect( _workingDir , SIGNAL( activated( const QString & ) ) , this, SLOT( slotWorkingDirActivated( const QString & ) ) );
- connect( _oneFilesystem , SIGNAL( toggled( bool ) ) , this, SLOT( slotToggled( bool ) ) );
- connect( _incremental , SIGNAL( toggled( bool ) ) , this, SLOT( slotIncrementalToggled( bool ) ) );
- connect( _snapshotFile , SIGNAL( textChanged( const QString & ) ), this, SLOT( slotTextChanged( const QString & ) ) );
- connect( _removeSnapshot, SIGNAL( toggled( bool ) ) , this, SLOT( slotToggled( bool ) ) );
+ connect( _archiveName , TQT_SIGNAL( textChanged( const TQString & ) ), this, TQT_SLOT( slotTextChanged( const TQString & ) ) );
+ connect( _workingDir , TQT_SIGNAL( activated( const TQString & ) ) , this, TQT_SLOT( slotWorkingDirActivated( const TQString & ) ) );
+ connect( _oneFilesystem , TQT_SIGNAL( toggled( bool ) ) , this, TQT_SLOT( slotToggled( bool ) ) );
+ connect( _incremental , TQT_SIGNAL( toggled( bool ) ) , this, TQT_SLOT( slotIncrementalToggled( bool ) ) );
+ connect( _snapshotFile , TQT_SIGNAL( textChanged( const TQString & ) ), this, TQT_SLOT( slotTextChanged( const TQString & ) ) );
+ connect( _removeSnapshot, TQT_SIGNAL( toggled( bool ) ) , this, TQT_SLOT( slotToggled( bool ) ) );
}
BackupProfileWidget::~BackupProfileWidget()
{
}
-void BackupProfileWidget::slotTextChanged( const QString & )
+void BackupProfileWidget::slotTextChanged( const TQString & )
{
emit sigSomethingChanged();
}
@@ -140,21 +140,21 @@ void BackupProfileWidget::slotIncrementalToggled( bool set )
emit sigSomethingChanged();
}
-void BackupProfileWidget::slotWorkingDirActivated( const QString & text )
+void BackupProfileWidget::slotWorkingDirActivated( const TQString & text )
{
while ( FALSE == _relativeFiles.isEmpty() ) {
- QString my_first = _relativeFiles.first();
+ TQString my_first = _relativeFiles.first();
_relativeFiles.remove( my_first );
}
_files->clear();
- QStringList::Iterator i = _absoluteFiles.begin();
+ TQStringList::Iterator i = _absoluteFiles.begin();
int remove = text.length();
if ( remove > 1 ) {
remove++;
}
for ( ; i != _absoluteFiles.end(); ++i ) {
- QString fn = *i;
+ TQString fn = *i;
fn.remove( 0, remove );
if ( fn.isEmpty() ) {
fn = ".";
@@ -175,8 +175,8 @@ void BackupProfileWidget::setBackupProfile( BackupProfile* backupProfile )
if ( !backupProfile->getWorkingDirectory().isNull() ) {
for ( int ii = 0; ii < _workingDir->count(); ii++ ) {
- QString one = _workingDir->text( ii );
- QString two = backupProfile->getWorkingDirectory();
+ TQString one = _workingDir->text( ii );
+ TQString two = backupProfile->getWorkingDirectory();
// if ( _workingDir->text( ii ) == backupProfile->getWorkingDirectory() ) {
if( one == two ){
_workingDir->setCurrentItem( ii );
@@ -186,7 +186,7 @@ void BackupProfileWidget::setBackupProfile( BackupProfile* backupProfile )
}
// slotWorkingDirActivated( _workingDir->currentText() );
- QString one = _workingDir->currentText();
+ TQString one = _workingDir->currentText();
slotWorkingDirActivated( one );
_oneFilesystem->setChecked( backupProfile->isOneFilesystem() );
@@ -197,12 +197,12 @@ void BackupProfileWidget::setBackupProfile( BackupProfile* backupProfile )
slotIncrementalToggled( backupProfile->isIncremental() );
}
-void BackupProfileWidget::setAbsoluteFiles( const QStringList& files )
+void BackupProfileWidget::setAbsoluteFiles( const TQStringList& files )
{
// Copy the string list.
_absoluteFiles = files;
- QString prefix = Util::longestCommonPath( files );
+ TQString prefix = Util::longestCommonPath( files );
_workingDir->clear();
for ( int pos = prefix.length(); pos > 0; pos = prefix.findRev( '/', pos - 1 ) ) {
@@ -214,12 +214,12 @@ void BackupProfileWidget::setAbsoluteFiles( const QStringList& files )
slotWorkingDirActivated( _workingDir->currentText() );
}
-QString BackupProfileWidget::getArchiveName()
+TQString BackupProfileWidget::getArchiveName()
{
return _archiveName->text();
}
-QString BackupProfileWidget::getWorkingDirectory()
+TQString BackupProfileWidget::getWorkingDirectory()
{
if ( _workingDir->count() > 0 ) {
return _workingDir->currentText();
@@ -228,12 +228,12 @@ QString BackupProfileWidget::getWorkingDirectory()
}
}
-const QStringList& BackupProfileWidget::getRelativeFiles()
+const TQStringList& BackupProfileWidget::getRelativeFiles()
{
return _relativeFiles;
}
-const QStringList& BackupProfileWidget::getAbsoluteFiles()
+const TQStringList& BackupProfileWidget::getAbsoluteFiles()
{
return _absoluteFiles;
}
@@ -248,7 +248,7 @@ bool BackupProfileWidget::isIncremental()
return _incremental->isChecked();
}
-QString BackupProfileWidget::getSnapshotFile()
+TQString BackupProfileWidget::getSnapshotFile()
{
return _snapshotFile->text();
}
diff --git a/kdat/BackupProfileWidget.h b/kdat/BackupProfileWidget.h
index 08826b9..945f725 100644
--- a/kdat/BackupProfileWidget.h
+++ b/kdat/BackupProfileWidget.h
@@ -20,7 +20,7 @@
#define _BackupProfileWidget_h_
#include <ktabctl.h>
-#include <qstrlist.h>
+#include <tqstrlist.h>
class QCheckBox;
class QComboBox;
@@ -35,21 +35,21 @@ class BackupProfile;
*/
class BackupProfileWidget : public KTabCtl {
Q_OBJECT
- QLineEdit* _archiveName;
- QComboBox* _workingDir;
- QListBox* _files;
- QCheckBox* _oneFilesystem;
- QCheckBox* _incremental;
- QLabel* _snapshotLabel;
- QLineEdit* _snapshotFile;
- QCheckBox* _removeSnapshot;
- QStringList _absoluteFiles;
- QStringList _relativeFiles;
+ TQLineEdit* _archiveName;
+ TQComboBox* _workingDir;
+ TQListBox* _files;
+ TQCheckBox* _oneFilesystem;
+ TQCheckBox* _incremental;
+ TQLabel* _snapshotLabel;
+ TQLineEdit* _snapshotFile;
+ TQCheckBox* _removeSnapshot;
+ TQStringList _absoluteFiles;
+ TQStringList _relativeFiles;
private slots:
- void slotTextChanged( const QString & text );
+ void slotTextChanged( const TQString & text );
void slotIncrementalToggled( bool set );
void slotToggled( bool set );
- void slotWorkingDirActivated( const QString & text );
+ void slotWorkingDirActivated( const TQString & text );
public:
/**
* Create a backup profile widget.
@@ -59,7 +59,7 @@ public:
* @param parent The parent widget of this dialog.
* @param name The widget name of this dialog.
*/
- BackupProfileWidget( QWidget* parent=0, const char* name=0 );
+ BackupProfileWidget( TQWidget* parent=0, const char* name=0 );
/**
* Destroy the backup profile widget.
@@ -78,35 +78,35 @@ public:
*
* @param files The list.
*/
- void setAbsoluteFiles( const QStringList& files );
+ void setAbsoluteFiles( const TQStringList& files );
/**
* Query the name of the archive.
*
* @return The name of the new archive.
*/
- QString getArchiveName();
+ TQString getArchiveName();
/**
* Query the working directory for the tar command.
*
* @return The working directory.
*/
- QString getWorkingDirectory();
+ TQString getWorkingDirectory();
/**
* Query the list of files to backup, relative to the working directory.
*
* @return The file list.
*/
- const QStringList& getRelativeFiles();
+ const TQStringList& getRelativeFiles();
/**
* Query the list of files to backup, with full paths.
*
* @return The file list.
*/
- const QStringList& getAbsoluteFiles();
+ const TQStringList& getAbsoluteFiles();
/**
* Query whether or not to cross filesystem boundaries when performing the
@@ -129,7 +129,7 @@ public:
*
* @return The name of the snapshot file.
*/
- QString getSnapshotFile();
+ TQString getSnapshotFile();
/**
* Query whether to remove the snapshot file before beginning an
diff --git a/kdat/ErrorHandler.cpp b/kdat/ErrorHandler.cpp
index 7a60295..aee1c58 100644
--- a/kdat/ErrorHandler.cpp
+++ b/kdat/ErrorHandler.cpp
@@ -19,7 +19,7 @@
#include <signal.h>
#include <stdlib.h>
#include <kglobal.h>
-#include <qmessagebox.h>
+#include <tqmessagebox.h>
#include <klocale.h>
//#include <kstandarddirs.h>
//#include <kapplication.h>
@@ -45,7 +45,7 @@ void error_handler(int err_sig);
void error_handler(int err_sig)
{
- QString base1a, base1b, base2a, base2b, msg1, msg2, msg3;
+ TQString base1a, base1b, base2a, base2b, msg1, msg2, msg3;
int i;
base1a = i18n( " caught.\nExit the program from File->Quit or do "
@@ -64,44 +64,44 @@ void error_handler(int err_sig)
switch (err_sig) {
case SIGHUP:
fprintf(stderr, "kdat: SIGHUP signal (\"Hangup (POSIX)\") caught\n");
- i = QMessageBox::critical( (QWidget *)NULL,
+ i = TQMessageBox::critical( (TQWidget *)NULL,
msg3,
i18n( "SIGHUP signal (\"Hangup (POSIX)\")" ).append( msg1 ),
- QMessageBox::Ignore, QMessageBox::Abort, QMessageBox::NoButton);
- if( i == QMessageBox::Abort ){ abort(); }
+ TQMessageBox::Ignore, TQMessageBox::Abort, TQMessageBox::NoButton);
+ if( i == TQMessageBox::Abort ){ abort(); }
break;
case SIGINT:
fprintf(stderr, "kdat: SIGINT signal (\"Interrupt (ANSI)\") caught\n");
- i = QMessageBox::critical( (QWidget *)NULL,
+ i = TQMessageBox::critical( (TQWidget *)NULL,
msg3,
i18n( "SIGINT signal (\"Interrupt (ANSI)\")" ).append( msg1 ),
- QMessageBox::Ignore, QMessageBox::Abort, QMessageBox::NoButton);
- if( i == QMessageBox::Abort ){ abort(); }
+ TQMessageBox::Ignore, TQMessageBox::Abort, TQMessageBox::NoButton);
+ if( i == TQMessageBox::Abort ){ abort(); }
break;
case SIGFPE:
fprintf(stderr, "kdat: SIGFPE signal (\"Floating-point exception (ANSI)\") caught\n");
- i = QMessageBox::critical( (QWidget *)NULL,
+ i = TQMessageBox::critical( (TQWidget *)NULL,
msg3,
i18n("SIGFPE signal (\"Floating-point exception (ANSI)\")").append (msg2),
- QMessageBox::Ignore, QMessageBox::Abort, QMessageBox::NoButton);
- if( i == QMessageBox::Abort ){ abort(); }
+ TQMessageBox::Ignore, TQMessageBox::Abort, TQMessageBox::NoButton);
+ if( i == TQMessageBox::Abort ){ abort(); }
break;
case SIGSEGV:
fprintf(stderr, "kdat: SIGSEGV signal (\"Segmentation violation (ANSI)\") caught\n");
- i = QMessageBox::critical( (QWidget *)NULL,
+ i = TQMessageBox::critical( (TQWidget *)NULL,
msg3,
i18n( "SIGSEGV signal (\"Segmentation violation (ANSI)\")").append(msg2),
/* button1, button2 */
- QMessageBox::Ignore, QMessageBox::Abort, QMessageBox::NoButton);
- if( i == QMessageBox::Abort ){ abort(); }
+ TQMessageBox::Ignore, TQMessageBox::Abort, TQMessageBox::NoButton);
+ if( i == TQMessageBox::Abort ){ abort(); }
break;
case SIGTERM:
fprintf(stderr, "kdat: SIGTERM signal (\"Termination (ANSI)\") caught\n");
- i = QMessageBox::critical( (QWidget *)NULL,
+ i = TQMessageBox::critical( (TQWidget *)NULL,
msg3,
i18n( "SIGTERM signal (\"Termination (ANSI)\")").append(msg1),
- QMessageBox::Ignore, QMessageBox::Abort, QMessageBox::NoButton);
- if( i == QMessageBox::Abort ){ abort(); }
+ TQMessageBox::Ignore, TQMessageBox::Abort, TQMessageBox::NoButton);
+ if( i == TQMessageBox::Abort ){ abort(); }
break;
}
diff --git a/kdat/File.cpp b/kdat/File.cpp
index 7fc8f97..fd766b3 100644
--- a/kdat/File.cpp
+++ b/kdat/File.cpp
@@ -21,7 +21,7 @@
#include "File.h"
-File::File( File* parent, int size, int mtime, int startRecord, int endRecord, const QString & name )
+File::File( File* parent, int size, int mtime, int startRecord, int endRecord, const TQString & name )
: _stubbed( FALSE ),
_name( name ),
_parent( parent )
@@ -122,7 +122,7 @@ void File::readAll( int version )
{
read( version );
- QPtrListIterator<File> i( getChildren() );
+ TQPtrListIterator<File> i( getChildren() );
for ( ; i.current(); ++i ) {
i.current()->readAll( version );
}
@@ -156,7 +156,7 @@ void File::write( FILE* fptr )
// Child range list.
ival = _ranges.getRanges().count();
fwrite( &ival, sizeof( ival ), 1, fptr );
- QPtrListIterator<Range> it( _ranges.getRanges() );
+ TQPtrListIterator<Range> it( _ranges.getRanges() );
for ( ; it.current(); ++it ) {
ival = it.current()->getStart();
fwrite( &ival, sizeof( ival ), 1, fptr );
@@ -178,7 +178,7 @@ void File::write( FILE* fptr )
ival = _children.count();
fwrite( &ival, sizeof( ival ), 1, fptr );
- QPtrListIterator<File> i( _children );
+ TQPtrListIterator<File> i( _children );
int count = 0;
for ( ; i.current(); ++i, count++ ) {
// Fill in the file offset.
@@ -226,16 +226,16 @@ int File::getEndRecord()
return _union._data._endRecord;
}
-QString File::getName()
+TQString File::getName()
{
read();
return _name;
}
-QString File::getFullPathName()
+TQString File::getFullPathName()
{
- QString tmp = _name.copy();
+ TQString tmp = _name.copy();
for ( File* parent = getParent(); parent; parent = parent->getParent() ) {
tmp.prepend( parent->getName() );
}
@@ -248,14 +248,14 @@ File* File::getParent()
return _parent;
}
-const QPtrList<File>& File::getChildren()
+const TQPtrList<File>& File::getChildren()
{
read();
return _children;
}
-const QPtrList<Range>& File::getRanges()
+const TQPtrList<Range>& File::getRanges()
{
read();
@@ -276,10 +276,10 @@ void File::calcRanges()
_ranges.clear();
_ranges.addRange( getStartRecord(), getEndRecord() );
- QPtrListIterator<File> it( getChildren() );
+ TQPtrListIterator<File> it( getChildren() );
for ( ; it.current(); ++it ) {
it.current()->calcRanges();
- QPtrListIterator<Range> it2( it.current()->getRanges() );
+ TQPtrListIterator<Range> it2( it.current()->getRanges() );
for ( ; it2.current(); ++it2 ) {
_ranges.addRange( it2.current()->getStart(), it2.current()->getEnd() );
}
diff --git a/kdat/File.h b/kdat/File.h
index 0dda512..75b1d87 100644
--- a/kdat/File.h
+++ b/kdat/File.h
@@ -21,8 +21,8 @@
#include <stdio.h>
-#include <qptrlist.h>
-#include <qstring.h>
+#include <tqptrlist.h>
+#include <tqstring.h>
#include "Range.h"
#include "kdat.h"
@@ -44,9 +44,9 @@ class File {
int _offset;
} _stub;
} _union;
- QString _name;
+ TQString _name;
File* _parent;
- QPtrList<File> _children;
+ TQPtrList<File> _children;
RangeList _ranges;
public:
/**
@@ -63,7 +63,7 @@ public:
* the file's path name should be passed in. The rest of the
* path is determined by this file entry's ancestors.
*/
- File( File* parent, int size, int mtime, int startRecord, int endRecord, const QString & name );
+ File( File* parent, int size, int mtime, int startRecord, int endRecord, const TQString & name );
/**
* Create a new stubbed instance of a file entry. The file pointer and
@@ -153,14 +153,14 @@ public:
*
* @return The file's name.
*/
- QString getName();
+ TQString getName();
/**
* Get the full path name of the file.
*
* @return The full path to the file.
*/
- QString getFullPathName();
+ TQString getFullPathName();
/**
* Get the file entry's parent. A NULL parent indicates that this is one
@@ -176,14 +176,14 @@ public:
*
* @return A list of the immediate children of this file entry.
*/
- const QPtrList<File>& getChildren();
+ const TQPtrList<File>& getChildren();
/**
* Get the list of ranges of this file and all of its children.
*
* @return A list of ranges.
*/
- const QPtrList<Range>& getRanges();
+ const TQPtrList<Range>& getRanges();
/**
* Add a new file entry as a child of this file entry.
diff --git a/kdat/FileInfoWidget.cpp b/kdat/FileInfoWidget.cpp
index 4a2a986..5b75cf7 100644
--- a/kdat/FileInfoWidget.cpp
+++ b/kdat/FileInfoWidget.cpp
@@ -22,10 +22,10 @@
#include <grp.h>
#include <time.h>
-#include <qdatetime.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qfile.h>
+#include <tqdatetime.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqfile.h>
#include <kapplication.h>
#include <kglobal.h>
@@ -36,16 +36,16 @@
#include "FileInfoWidget.moc"
-FileInfoWidget::FileInfoWidget( QWidget* parent, const char* name )
- : QWidget( parent, name )
+FileInfoWidget::FileInfoWidget( TQWidget* parent, const char* name )
+ : TQWidget( parent, name )
{
- QLabel* lbl1 = new QLabel( i18n( "File name:" ), this );
- QLabel* lbl2 = new QLabel( i18n( "Created on:" ), this );
- QLabel* lbl3 = new QLabel( i18n( "Last modified:" ), this );
- QLabel* lbl4 = new QLabel( i18n( "Last accessed:" ), this );
- QLabel* lbl5 = new QLabel( i18n( "Size:" ), this );
- QLabel* lbl6 = new QLabel( i18n( "Owner:" ), this );
- QLabel* lbl7 = new QLabel( i18n( "Group:" ), this );
+ TQLabel* lbl1 = new TQLabel( i18n( "File name:" ), this );
+ TQLabel* lbl2 = new TQLabel( i18n( "Created on:" ), this );
+ TQLabel* lbl3 = new TQLabel( i18n( "Last modified:" ), this );
+ TQLabel* lbl4 = new TQLabel( i18n( "Last accessed:" ), this );
+ TQLabel* lbl5 = new TQLabel( i18n( "Size:" ), this );
+ TQLabel* lbl6 = new TQLabel( i18n( "Owner:" ), this );
+ TQLabel* lbl7 = new TQLabel( i18n( "Group:" ), this );
int max = lbl1->sizeHint().width();
if ( lbl2->sizeHint().width() > max ) max = lbl2->sizeHint().width();
@@ -63,60 +63,60 @@ FileInfoWidget::FileInfoWidget( QWidget* parent, const char* name )
lbl6->setFixedSize( max, lbl6->sizeHint().height() );
lbl7->setFixedSize( max, lbl7->sizeHint().height() );
- _fileName = new QLabel( "???", this );
+ _fileName = new TQLabel( "???", this );
_fileName->setFixedHeight( _fileName->sizeHint().height() );
- _ctime = new QLabel( "???", this );
+ _ctime = new TQLabel( "???", this );
_ctime->setFixedHeight( _ctime->sizeHint().height() );
- _mtime = new QLabel( "???", this );
+ _mtime = new TQLabel( "???", this );
_mtime->setFixedHeight( _mtime->sizeHint().height() );
- _atime = new QLabel( "???", this );
+ _atime = new TQLabel( "???", this );
_atime->setFixedHeight( _atime->sizeHint().height() );
- _size = new QLabel( "???", this );
+ _size = new TQLabel( "???", this );
_size->setFixedHeight( _size->sizeHint().height() );
- _owner = new QLabel( "???", this );
+ _owner = new TQLabel( "???", this );
_owner->setFixedHeight( _owner->sizeHint().height() );
- _group = new QLabel( "???", this );
+ _group = new TQLabel( "???", this );
_group->setFixedHeight( _group->sizeHint().height() );
- QVBoxLayout* l1 = new QVBoxLayout( this, 4, 4 );
+ TQVBoxLayout* l1 = new TQVBoxLayout( this, 4, 4 );
- QHBoxLayout* l1_1 = new QHBoxLayout();
+ TQHBoxLayout* l1_1 = new TQHBoxLayout();
l1->addLayout( l1_1 );
l1_1->addWidget( lbl1 );
l1_1->addWidget( _fileName, 1 );
- QHBoxLayout* l1_2 = new QHBoxLayout();
+ TQHBoxLayout* l1_2 = new TQHBoxLayout();
l1->addLayout( l1_2 );
l1_2->addWidget( lbl2 );
l1_2->addWidget( _ctime, 1 );
- QHBoxLayout* l1_3 = new QHBoxLayout();
+ TQHBoxLayout* l1_3 = new TQHBoxLayout();
l1->addLayout( l1_3 );
l1_3->addWidget( lbl3 );
l1_3->addWidget( _mtime, 1 );
- QHBoxLayout* l1_4 = new QHBoxLayout();
+ TQHBoxLayout* l1_4 = new TQHBoxLayout();
l1->addLayout( l1_4 );
l1_4->addWidget( lbl4 );
l1_4->addWidget( _atime, 1 );
- QHBoxLayout* l1_5 = new QHBoxLayout();
+ TQHBoxLayout* l1_5 = new TQHBoxLayout();
l1->addLayout( l1_5 );
l1_5->addWidget( lbl5 );
l1_5->addWidget( _size, 1 );
- QHBoxLayout* l1_6 = new QHBoxLayout();
+ TQHBoxLayout* l1_6 = new TQHBoxLayout();
l1->addLayout( l1_6 );
l1_6->addWidget( lbl6 );
l1_6->addWidget( _owner, 1 );
- QHBoxLayout* l1_7 = new QHBoxLayout();
+ TQHBoxLayout* l1_7 = new TQHBoxLayout();
l1->addLayout( l1_7 );
l1_7->addWidget( lbl7 );
l1_7->addWidget( _group, 1 );
@@ -128,7 +128,7 @@ FileInfoWidget::~FileInfoWidget()
{
}
-void FileInfoWidget::setFile( const QString & name )
+void FileInfoWidget::setFile( const TQString & name )
{
if ( name.isNull() ) {
return;
@@ -137,10 +137,10 @@ void FileInfoWidget::setFile( const QString & name )
_fileName->setText( name );
struct stat info;
- lstat( QFile::encodeName(name), &info );
+ lstat( TQFile::encodeName(name), &info );
- QString tmp;
- QDateTime datetime;
+ TQString tmp;
+ TQDateTime datetime;
datetime.setTime_t(info.st_ctime);
_ctime->setText( KGlobal::locale()->formatDateTime(datetime, false) );
diff --git a/kdat/FileInfoWidget.h b/kdat/FileInfoWidget.h
index c763886..9b2d227 100644
--- a/kdat/FileInfoWidget.h
+++ b/kdat/FileInfoWidget.h
@@ -19,22 +19,22 @@
#ifndef _FileInfoWidget_h_
#define _FileInfoWidget_h_
-#include <qwidget.h>
+#include <tqwidget.h>
class QLabel;
/**
* @short Display information about a local file.
*/
-class FileInfoWidget : public QWidget {
+class FileInfoWidget : public TQWidget {
Q_OBJECT
- QLabel* _fileName;
- QLabel* _ctime;
- QLabel* _mtime;
- QLabel* _atime;
- QLabel* _size;
- QLabel* _owner;
- QLabel* _group;
+ TQLabel* _fileName;
+ TQLabel* _ctime;
+ TQLabel* _mtime;
+ TQLabel* _atime;
+ TQLabel* _size;
+ TQLabel* _owner;
+ TQLabel* _group;
public:
/**
* Create a new file info widget.
@@ -42,7 +42,7 @@ public:
* @param parent The parent widget.
* @param name The name of this widget.
*/
- FileInfoWidget( QWidget* parent = 0, const char* name = 0 );
+ FileInfoWidget( TQWidget* parent = 0, const char* name = 0 );
/**
* Destroy the file info widget.
@@ -52,7 +52,7 @@ public:
/**
* Display the information for the given file.
*/
- void setFile( const QString & name );
+ void setFile( const TQString & name );
};
#endif
diff --git a/kdat/FormatOptDlg.cpp b/kdat/FormatOptDlg.cpp
index 8ed79f9..81a74f4 100644
--- a/kdat/FormatOptDlg.cpp
+++ b/kdat/FormatOptDlg.cpp
@@ -18,10 +18,10 @@
#include <stdlib.h>
-#include <qcombobox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qlineedit.h>
+#include <tqcombobox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqlineedit.h>
#include <kpushbutton.h>
#include <kstdguiitem.h>
@@ -34,14 +34,14 @@
#include "FormatOptDlg.moc"
-FormatOptDlg::FormatOptDlg( const QString & def, QWidget* parent, const char* name )
- : QDialog( parent, name, TRUE )
+FormatOptDlg::FormatOptDlg( const TQString & def, TQWidget* parent, const char* name )
+ : TQDialog( parent, name, TRUE )
{
setIconText( i18n( "KDat: Format Options" ) );
setCaption( i18n( "KDat: Format Options" ) );
- QLabel* lbl1 = new QLabel( i18n( "Tape name:" ), this );
- QLabel* lbl2 = new QLabel( i18n( "Tape size:" ), this );
+ TQLabel* lbl1 = new TQLabel( i18n( "Tape name:" ), this );
+ TQLabel* lbl2 = new TQLabel( i18n( "Tape size:" ), this );
int max = lbl1->sizeHint().width();
if ( lbl2->sizeHint().width() > max ) max = lbl2->sizeHint().width();
@@ -49,14 +49,14 @@ FormatOptDlg::FormatOptDlg( const QString & def, QWidget* parent, const char* na
lbl1->setFixedSize( max, lbl1->sizeHint().height() );
lbl2->setFixedSize( max, lbl2->sizeHint().height() );
- _entry = new QLineEdit( this );
+ _entry = new TQLineEdit( this );
_entry->setText( def );
_entry->setFixedHeight( _entry->sizeHint().height() );
- _tapeSize = new QLineEdit( this );
+ _tapeSize = new TQLineEdit( this );
_tapeSize->setFixedSize( 48, _tapeSize->sizeHint().height() );
- _tapeSizeUnits = new QComboBox( this );
+ _tapeSizeUnits = new TQComboBox( this );
_tapeSizeUnits->setFixedSize( 48, _tapeSizeUnits->sizeHint().height() );
_tapeSizeUnits->insertItem( "MB" );
_tapeSizeUnits->insertItem( "GB" );
@@ -66,10 +66,10 @@ FormatOptDlg::FormatOptDlg( const QString & def, QWidget* parent, const char* na
KPushButton* cancel = new KPushButton( KStdGuiItem::cancel(), this );
cancel->setFixedSize( 80, cancel->sizeHint().height() );
- QVBoxLayout* l1 = new QVBoxLayout( this, 8, 4 );
- QHBoxLayout* l2 = new QHBoxLayout();
- QHBoxLayout* l3 = new QHBoxLayout();
- QHBoxLayout* l4 = new QHBoxLayout();
+ TQVBoxLayout* l1 = new TQVBoxLayout( this, 8, 4 );
+ TQHBoxLayout* l2 = new TQHBoxLayout();
+ TQHBoxLayout* l3 = new TQHBoxLayout();
+ TQHBoxLayout* l4 = new TQHBoxLayout();
l1->addLayout( l2, 0 );
l1->addLayout( l3, 0 );
@@ -94,9 +94,9 @@ FormatOptDlg::FormatOptDlg( const QString & def, QWidget* parent, const char* na
_entry->setFocus();
_entry->selectAll();
- connect( _entry, SIGNAL( returnPressed() ), this, SLOT( okClicked() ) );
- connect( ok , SIGNAL( clicked() ) , this, SLOT( okClicked() ) );
- connect( cancel, SIGNAL( clicked() ) , this, SLOT( reject() ) );
+ connect( _entry, TQT_SIGNAL( returnPressed() ), this, TQT_SLOT( okClicked() ) );
+ connect( ok , TQT_SIGNAL( clicked() ) , this, TQT_SLOT( okClicked() ) );
+ connect( cancel, TQT_SIGNAL( clicked() ) , this, TQT_SLOT( reject() ) );
int size = Options::instance()->getDefaultTapeSize();
if ( ( size >= 1024*1024 ) && ( size % ( 1024*1024 ) == 0 ) ) {
@@ -131,7 +131,7 @@ void FormatOptDlg::okClicked()
accept();
}
-QString FormatOptDlg::getName()
+TQString FormatOptDlg::getName()
{
return _name;
}
diff --git a/kdat/FormatOptDlg.h b/kdat/FormatOptDlg.h
index b4c5540..b75baeb 100644
--- a/kdat/FormatOptDlg.h
+++ b/kdat/FormatOptDlg.h
@@ -19,8 +19,8 @@
#ifndef _FormatOptDlg_h_
#define _FormatOptDlg_h_
-#include <qdialog.h>
-#include <qstring.h>
+#include <tqdialog.h>
+#include <tqstring.h>
class QComboBox;
class QLineEdit;
@@ -28,13 +28,13 @@ class QLineEdit;
/**
* @short Display/edit options for formatting a tape.
*/
-class FormatOptDlg : public QDialog {
+class FormatOptDlg : public TQDialog {
Q_OBJECT
- QString _name;
+ TQString _name;
int _size;
- QLineEdit* _entry;
- QLineEdit* _tapeSize;
- QComboBox* _tapeSizeUnits;
+ TQLineEdit* _entry;
+ TQLineEdit* _tapeSize;
+ TQComboBox* _tapeSizeUnits;
private slots:
void okClicked();
public:
@@ -45,7 +45,7 @@ public:
* @param parent The parent widget for the dialog.
* @param name The name for the dialog.
*/
- FormatOptDlg( const QString & def, QWidget* parent=0, const char* name=0 );
+ FormatOptDlg( const TQString & def, TQWidget* parent=0, const char* name=0 );
/**
* Destroy the format options dialog.
@@ -57,7 +57,7 @@ public:
*
* @return The name for the tape being formatted.
*/
- QString getName();
+ TQString getName();
/**
* Get the capacity of the new tape.
diff --git a/kdat/ImageCache.cpp b/kdat/ImageCache.cpp
index 016fc61..c50d807 100644
--- a/kdat/ImageCache.cpp
+++ b/kdat/ImageCache.cpp
@@ -16,7 +16,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 <qpixmap.h>
+#include <tqpixmap.h>
#include <kglobal.h>
#include <kiconloader.h>
@@ -26,24 +26,24 @@ ImageCache::ImageCache()
{
KIconLoader *l = KGlobal::iconLoader();
/* 2002-01-24 FP */
- // _archive = new QPixmap(l->iconPath("package", KIcon::Toolbar));
- _archive = new QPixmap(l->iconPath("tar", KIcon::Small));
+ // _archive = new TQPixmap(l->iconPath("package", KIcon::Toolbar));
+ _archive = new TQPixmap(l->iconPath("tar", KIcon::Small));
/* 2002-01-24 FP */
- _backup = new QPixmap(l->iconPath("kdat_backup", KIcon::Toolbar));
- _file = new QPixmap(l->iconPath("mime_empty", KIcon::Small));
- _folderClosed = new QPixmap(l->iconPath("folder_blue", KIcon::Small));
- _folderOpen = new QPixmap(l->iconPath("folder_blue_open", KIcon::Small));
- _restore = new QPixmap(l->iconPath("kdat_restore", KIcon::Toolbar));
- _selectAll = new QPixmap(l->iconPath("kdat_select_all", KIcon::Toolbar));
- _selectNone = new QPixmap(l->iconPath("kdat_select_none", KIcon::Toolbar));
- _selectSome = new QPixmap(l->iconPath("kdat_select_some", KIcon::Toolbar));
+ _backup = new TQPixmap(l->iconPath("kdat_backup", KIcon::Toolbar));
+ _file = new TQPixmap(l->iconPath("mime_empty", KIcon::Small));
+ _folderClosed = new TQPixmap(l->iconPath("folder_blue", KIcon::Small));
+ _folderOpen = new TQPixmap(l->iconPath("folder_blue_open", KIcon::Small));
+ _restore = new TQPixmap(l->iconPath("kdat_restore", KIcon::Toolbar));
+ _selectAll = new TQPixmap(l->iconPath("kdat_select_all", KIcon::Toolbar));
+ _selectNone = new TQPixmap(l->iconPath("kdat_select_none", KIcon::Toolbar));
+ _selectSome = new TQPixmap(l->iconPath("kdat_select_some", KIcon::Toolbar));
// 2002-01-28 FP
- // _tape = new QPixmap(l->iconPath("kdat_archive", KIcon::Toolbar));
- _tape = new QPixmap(l->iconPath("kdat", KIcon::Small));
+ // _tape = new TQPixmap(l->iconPath("kdat_archive", KIcon::Toolbar));
+ _tape = new TQPixmap(l->iconPath("kdat", KIcon::Small));
// 2002-01-28 FP
- _tapeMounted = new QPixmap(l->iconPath("kdat_mounted", KIcon::Toolbar));
- _tapeUnmounted = new QPixmap(l->iconPath("kdat_unmounted", KIcon::Toolbar));
- _verify = new QPixmap(l->iconPath("kdat_verify", KIcon::Toolbar));
+ _tapeMounted = new TQPixmap(l->iconPath("kdat_mounted", KIcon::Toolbar));
+ _tapeUnmounted = new TQPixmap(l->iconPath("kdat_unmounted", KIcon::Toolbar));
+ _verify = new TQPixmap(l->iconPath("kdat_verify", KIcon::Toolbar));
}
ImageCache::~ImageCache()
@@ -71,67 +71,67 @@ ImageCache* ImageCache::instance()
return _instance;
}
-const QPixmap* ImageCache::getArchive()
+const TQPixmap* ImageCache::getArchive()
{
return _archive;
}
-const QPixmap* ImageCache::getBackup()
+const TQPixmap* ImageCache::getBackup()
{
return _backup;
}
-const QPixmap* ImageCache::getFile()
+const TQPixmap* ImageCache::getFile()
{
return _file;
}
-const QPixmap* ImageCache::getFolderClosed()
+const TQPixmap* ImageCache::getFolderClosed()
{
return _folderClosed;
}
-const QPixmap* ImageCache::getFolderOpen()
+const TQPixmap* ImageCache::getFolderOpen()
{
return _folderOpen;
}
-const QPixmap* ImageCache::getRestore()
+const TQPixmap* ImageCache::getRestore()
{
return _restore;
}
-const QPixmap* ImageCache::getSelectAll()
+const TQPixmap* ImageCache::getSelectAll()
{
return _selectAll;
}
-const QPixmap* ImageCache::getSelectNone()
+const TQPixmap* ImageCache::getSelectNone()
{
return _selectNone;
}
-const QPixmap* ImageCache::getSelectSome()
+const TQPixmap* ImageCache::getSelectSome()
{
return _selectSome;
}
-const QPixmap* ImageCache::getTape()
+const TQPixmap* ImageCache::getTape()
{
return _tape;
}
-const QPixmap* ImageCache::getTapeMounted()
+const TQPixmap* ImageCache::getTapeMounted()
{
return _tapeMounted;
}
-const QPixmap* ImageCache::getTapeUnmounted()
+const TQPixmap* ImageCache::getTapeUnmounted()
{
return _tapeUnmounted;
}
-const QPixmap* ImageCache::getVerify()
+const TQPixmap* ImageCache::getVerify()
{
return _verify;
}
diff --git a/kdat/ImageCache.h b/kdat/ImageCache.h
index b9bf59b..acf9b29 100644
--- a/kdat/ImageCache.h
+++ b/kdat/ImageCache.h
@@ -27,19 +27,19 @@ class QPixmap;
class ImageCache {
static ImageCache* _instance;
- QPixmap* _archive;
- QPixmap* _backup;
- QPixmap* _file;
- QPixmap* _folderClosed;
- QPixmap* _folderOpen;
- QPixmap* _restore;
- QPixmap* _selectAll;
- QPixmap* _selectNone;
- QPixmap* _selectSome;
- QPixmap* _tape;
- QPixmap* _tapeMounted;
- QPixmap* _tapeUnmounted;
- QPixmap* _verify;
+ TQPixmap* _archive;
+ TQPixmap* _backup;
+ TQPixmap* _file;
+ TQPixmap* _folderClosed;
+ TQPixmap* _folderOpen;
+ TQPixmap* _restore;
+ TQPixmap* _selectAll;
+ TQPixmap* _selectNone;
+ TQPixmap* _selectSome;
+ TQPixmap* _tape;
+ TQPixmap* _tapeMounted;
+ TQPixmap* _tapeUnmounted;
+ TQPixmap* _verify;
ImageCache();
public:
@@ -60,91 +60,91 @@ public:
*
* @return A pointer to the icon.
*/
- const QPixmap* getArchive();
+ const TQPixmap* getArchive();
/**
* Get the toolbar icon used for the backup action.
*
* @return A pointer to the icon.
*/
- const QPixmap* getBackup();
+ const TQPixmap* getBackup();
/**
* Get the tree-node icon used for files.
*
* @return A pointer to the icon.
*/
- const QPixmap* getFile();
+ const TQPixmap* getFile();
/**
* Get the tree-node icon used for a closed folder.
*
* @return A pointer to the icon.
*/
- const QPixmap* getFolderClosed();
+ const TQPixmap* getFolderClosed();
/**
* Get the tree-node icon used for an open folder.
*
* @return A pointer to the icon.
*/
- const QPixmap* getFolderOpen();
+ const TQPixmap* getFolderOpen();
/**
* Get the toolbar icon used for the restore action.
*
* @return A pointer to the icon.
*/
- const QPixmap* getRestore();
+ const TQPixmap* getRestore();
/**
* Get the tree-node icon used when all subnodes are selected.
*
* @return A pointer to the icon.
*/
- const QPixmap* getSelectAll();
+ const TQPixmap* getSelectAll();
/**
* Get the tree-node icon used when no subnodes are selected.
*
* @return A pointer to the icon.
*/
- const QPixmap* getSelectNone();
+ const TQPixmap* getSelectNone();
/**
* Get the tree-node icon used when some subnodes are selected.
*
* @return A pointer to the icon.
*/
- const QPixmap* getSelectSome();
+ const TQPixmap* getSelectSome();
/**
* Get the tree-node icon used for tape indexes.
*
* @return A pointer to the icon.
*/
- const QPixmap* getTape();
+ const TQPixmap* getTape();
/**
* Get the tree-node/toolbar icon used for a mounted tape drive.
*
* @return A pointer to the icon.
*/
- const QPixmap* getTapeMounted();
+ const TQPixmap* getTapeMounted();
/**
* Get the tree-node/toolbar icon used for an unmounted tape drive.
*
* @return A pointer to the icon.
*/
- const QPixmap* getTapeUnmounted();
+ const TQPixmap* getTapeUnmounted();
/**
* Get the toolbar icon used for the verify action.
*
* @return A pointer to the icon.
*/
- const QPixmap* getVerify();
+ const TQPixmap* getVerify();
};
#endif
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 );
diff --git a/kdat/IndexDlg.h b/kdat/IndexDlg.h
index e624cf5..96556db 100644
--- a/kdat/IndexDlg.h
+++ b/kdat/IndexDlg.h
@@ -19,8 +19,8 @@
#ifndef _IndexDlg_h_
#define _IndexDlg_h_
-#include <qdialog.h>
-#include <qptrlist.h>
+#include <tqdialog.h>
+#include <tqptrlist.h>
#include "Range.h"
@@ -36,22 +36,22 @@ class TarParser;
/**
* @short Status dialog for recreating a tape index.
*/
-class IndexDlg : public QDialog {
+class IndexDlg : public TQDialog {
Q_OBJECT
TarParser* _tarParser;
Tape* _tape;
Archive* _archive;
- QString _leftover;
- QLabel* _elapsedTime;
- QLabel* _kbytesRead;
- QLabel* _transferRate;
- QLabel* _archives;
- QLabel* _files;
- QLabel* _totalFiles;
+ TQString _leftover;
+ TQLabel* _elapsedTime;
+ TQLabel* _kbytesRead;
+ TQLabel* _transferRate;
+ TQLabel* _archives;
+ TQLabel* _files;
+ TQLabel* _totalFiles;
LoggerWidget* _log;
- QPushButton* _ok;
- QPushButton* _save;
- QPushButton* _abort;
+ TQPushButton* _ok;
+ TQPushButton* _save;
+ TQPushButton* _abort;
int _startTime;
float _totalKBytes;
int _archiveCount;
@@ -63,16 +63,16 @@ class IndexDlg : public QDialog {
int _fileSize;
int _fileMTime;
int _fileStartRecord;
- QString _fileName;
+ TQString _fileName;
void updateStats();
private slots:
void slotOK();
void slotAbort();
- void slotEntry( const QString & name, int size, int mtime, int record );
+ void slotEntry( const TQString & name, int size, int mtime, int record );
protected:
void show();
- void timerEvent( QTimerEvent* e );
+ void timerEvent( TQTimerEvent* e );
public:
/**
* Create a new tape index dialog.
@@ -81,7 +81,7 @@ public:
* @param parent The parent widget for this dialog.
* @param name The name of this dialog.
*/
- IndexDlg( Tape* tape, QWidget* parent = 0, const char* name = 0 );
+ IndexDlg( Tape* tape, TQWidget* parent = 0, const char* name = 0 );
/**
* Destroy the tape index dialog.
diff --git a/kdat/InfoShellWidget.cpp b/kdat/InfoShellWidget.cpp
index e7c3189..fc96e8c 100644
--- a/kdat/InfoShellWidget.cpp
+++ b/kdat/InfoShellWidget.cpp
@@ -16,15 +16,15 @@
// along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-#include <qobjectlist.h>
-#include <qobjectdict.h>
+#include <tqobjectlist.h>
+#include <tqobjectdict.h>
#include "InfoShellWidget.h"
#include "InfoShellWidget.moc"
-InfoShellWidget::InfoShellWidget( QWidget* parent, const char* name )
- : QWidget( parent, name )
+InfoShellWidget::InfoShellWidget( TQWidget* parent, const char* name )
+ : TQWidget( parent, name )
{
}
@@ -32,12 +32,12 @@ InfoShellWidget::~InfoShellWidget()
{
}
-void InfoShellWidget::resizeEvent( QResizeEvent* )
+void InfoShellWidget::resizeEvent( TQResizeEvent* )
{
if ( children() ) {
- QObjectListIt i( *children() );
+ TQObjectListIt i( *children() );
for ( ; i.current(); ++i ) {
- ((QWidget*)i.current())->resize( size() );
+ ((TQWidget*)i.current())->resize( size() );
}
}
}
diff --git a/kdat/InfoShellWidget.h b/kdat/InfoShellWidget.h
index c1379ee..f7046db 100644
--- a/kdat/InfoShellWidget.h
+++ b/kdat/InfoShellWidget.h
@@ -19,12 +19,12 @@
#ifndef _InfoShellWidget_h_
#define _InfoShellWidget_h_
-#include <qwidget.h>
+#include <tqwidget.h>
/**
* @short A suitable parent for the info widgets.
*/
-class InfoShellWidget : public QWidget {
+class InfoShellWidget : public TQWidget {
Q_OBJECT
public:
/**
@@ -33,7 +33,7 @@ public:
* @param parent The parent widget.
* @param name The name of this widget.
*/
- InfoShellWidget( QWidget* parent = 0, const char* name = 0 );
+ InfoShellWidget( TQWidget* parent = 0, const char* name = 0 );
/**
* Destroy the info shell widget.
@@ -43,7 +43,7 @@ protected:
/**
* Resize all children to fill all of the available space within the shell.
*/
- virtual void resizeEvent( QResizeEvent* e );
+ virtual void resizeEvent( TQResizeEvent* e );
};
#endif
diff --git a/kdat/KDatMainWindow.cpp b/kdat/KDatMainWindow.cpp
index 925ad92..bd14b8e 100644
--- a/kdat/KDatMainWindow.cpp
+++ b/kdat/KDatMainWindow.cpp
@@ -22,12 +22,12 @@
#include <sys/stat.h>
#include <stdlib.h>
-#include <qdatetime.h>
-#include <qdir.h>
-#include <qfileinfo.h>
-#include <qkeycode.h>
-#include <qlayout.h>
-#include <qtextstream.h>
+#include <tqdatetime.h>
+#include <tqdir.h>
+#include <tqfileinfo.h>
+#include <tqkeycode.h>
+#include <tqlayout.h>
+#include <tqtextstream.h>
#include <kapplication.h>
#include <kiconloader.h>
@@ -68,7 +68,7 @@
#include "kdat.h"
#include "ktreeview.h"
#include <klocale.h>
-#include <qsplitter.h>
+#include <tqsplitter.h>
#include <kstatusbar.h>
#include "KDatMainWindow.moc"
@@ -97,75 +97,75 @@ KDatMainWindow::KDatMainWindow()
setCaption( i18n( "KDat: <no tape>" ) );
// Create object popup menus.
- _tapeDriveMenu = new QPopupMenu();
- _tapeDriveMenu->insertItem( i18n( "Mount Tape" ) , this, SLOT( fileMountTape() ) );
- _tapeDriveMenu->insertItem( i18n( "Recreate Tape Index" ), this, SLOT( fileIndexTape() ) );
+ _tapeDriveMenu = new TQPopupMenu();
+ _tapeDriveMenu->insertItem( i18n( "Mount Tape" ) , this, TQT_SLOT( fileMountTape() ) );
+ _tapeDriveMenu->insertItem( i18n( "Recreate Tape Index" ), this, TQT_SLOT( fileIndexTape() ) );
_tapeDriveMenu->insertSeparator();
- _tapeDriveMenu->insertItem( i18n( "Format Tape..." ), this, SLOT( fileFormatTape() ) );
+ _tapeDriveMenu->insertItem( i18n( "Format Tape..." ), this, TQT_SLOT( fileFormatTape() ) );
- _archiveMenu = new QPopupMenu();
- _archiveMenu->insertItem( i18n( "Delete Archive" ), this, SLOT( fileDeleteArchive() ) );
+ _archiveMenu = new TQPopupMenu();
+ _archiveMenu->insertItem( i18n( "Delete Archive" ), this, TQT_SLOT( fileDeleteArchive() ) );
- _mountedArchiveMenu = new QPopupMenu();
- _mountedArchiveMenu->insertItem( i18n( "Verify..." ) , this, SLOT( fileVerify() ) );
- _mountedArchiveMenu->insertItem( i18n( "Restore..." ) , this, SLOT( fileRestore() ) );
+ _mountedArchiveMenu = new TQPopupMenu();
+ _mountedArchiveMenu->insertItem( i18n( "Verify..." ) , this, TQT_SLOT( fileVerify() ) );
+ _mountedArchiveMenu->insertItem( i18n( "Restore..." ) , this, TQT_SLOT( fileRestore() ) );
_mountedArchiveMenu->insertSeparator();
- _mountedArchiveMenu->insertItem( i18n( "Delete Archive" ), this, SLOT( fileDeleteArchive() ) );
+ _mountedArchiveMenu->insertItem( i18n( "Delete Archive" ), this, TQT_SLOT( fileDeleteArchive() ) );
- _mountedTapeFileMenu = new QPopupMenu();
- _mountedTapeFileMenu->insertItem( i18n( "Verify..." ) , this, SLOT( fileVerify() ) );
- _mountedTapeFileMenu->insertItem( i18n( "Restore..." ), this, SLOT( fileRestore() ) );
+ _mountedTapeFileMenu = new TQPopupMenu();
+ _mountedTapeFileMenu->insertItem( i18n( "Verify..." ) , this, TQT_SLOT( fileVerify() ) );
+ _mountedTapeFileMenu->insertItem( i18n( "Restore..." ), this, TQT_SLOT( fileRestore() ) );
- _localFileMenu = new QPopupMenu();
- _localFileMenu->insertItem( i18n( "Backup..." ), this, SLOT( fileBackup() ) );
+ _localFileMenu = new TQPopupMenu();
+ _localFileMenu->insertItem( i18n( "Backup..." ), this, TQT_SLOT( fileBackup() ) );
- _tapeMenu = new QPopupMenu();
- _tapeMenu->insertItem( i18n( "Delete Tape Index" ), this, SLOT( fileDeleteIndex() ) );
+ _tapeMenu = new TQPopupMenu();
+ _tapeMenu->insertItem( i18n( "Delete Tape Index" ), this, TQT_SLOT( fileDeleteIndex() ) );
- _backupProfileRootMenu = new QPopupMenu();
- _backupProfileRootMenu->insertItem( i18n( "Create Backup Profile" ), this, SLOT( fileNewBackupProfile() ) );
+ _backupProfileRootMenu = new TQPopupMenu();
+ _backupProfileRootMenu->insertItem( i18n( "Create Backup Profile" ), this, TQT_SLOT( fileNewBackupProfile() ) );
- _backupProfileMenu = new QPopupMenu();
- _backupProfileMenu->insertItem( i18n( "Backup..." ), this, SLOT( fileBackup() ) );
+ _backupProfileMenu = new TQPopupMenu();
+ _backupProfileMenu->insertItem( i18n( "Backup..." ), this, TQT_SLOT( fileBackup() ) );
_backupProfileMenu->insertSeparator();
- _backupProfileMenu->insertItem( i18n( "Delete Backup Profile" ), this, SLOT( fileDeleteBackupProfile() ) );
+ _backupProfileMenu->insertItem( i18n( "Delete Backup Profile" ), this, TQT_SLOT( fileDeleteBackupProfile() ) );
_fileMenu = new QPopupMenu;
- _fileMenu->insertItem( i18n( "Backup..." ) , this, SLOT( fileBackup() ) );
- _fileMenu->insertItem( i18n( "Restore..." ) , this, SLOT( fileRestore() ) );
- _fileMenu->insertItem( i18n( "Verify..." ) , this, SLOT( fileVerify() ) );
- _fileMenu->insertItem( i18n( "Mount Tape" ) , this, SLOT( fileMountTape() ) );
- _fileMenu->insertItem( i18n( "Recreate Tape Index" ) , this, SLOT( fileIndexTape() ) );
- _fileMenu->insertItem( i18n( "Create Backup Profile" ), this, SLOT( fileNewBackupProfile() ) );
+ _fileMenu->insertItem( i18n( "Backup..." ) , this, TQT_SLOT( fileBackup() ) );
+ _fileMenu->insertItem( i18n( "Restore..." ) , this, TQT_SLOT( fileRestore() ) );
+ _fileMenu->insertItem( i18n( "Verify..." ) , this, TQT_SLOT( fileVerify() ) );
+ _fileMenu->insertItem( i18n( "Mount Tape" ) , this, TQT_SLOT( fileMountTape() ) );
+ _fileMenu->insertItem( i18n( "Recreate Tape Index" ) , this, TQT_SLOT( fileIndexTape() ) );
+ _fileMenu->insertItem( i18n( "Create Backup Profile" ), this, TQT_SLOT( fileNewBackupProfile() ) );
_fileMenu->insertSeparator();
- _fileMenu->insertItem( i18n( "Delete Archive" ) , this, SLOT( fileDeleteArchive() ) );
- _fileMenu->insertItem( i18n( "Delete Index" ) , this, SLOT( fileDeleteIndex() ) );
- _fileMenu->insertItem( i18n( "Delete Backup Profile" ), this, SLOT( fileDeleteBackupProfile() ) );
- _fileMenu->insertItem( i18n( "Format Tape..." ) , this, SLOT( fileFormatTape() ) );
+ _fileMenu->insertItem( i18n( "Delete Archive" ) , this, TQT_SLOT( fileDeleteArchive() ) );
+ _fileMenu->insertItem( i18n( "Delete Index" ) , this, TQT_SLOT( fileDeleteIndex() ) );
+ _fileMenu->insertItem( i18n( "Delete Backup Profile" ), this, TQT_SLOT( fileDeleteBackupProfile() ) );
+ _fileMenu->insertItem( i18n( "Format Tape..." ) , this, TQT_SLOT( fileFormatTape() ) );
_fileMenu->insertSeparator();
- _fileMenu->insertItem( SmallIcon("exit"), i18n( "&Quit" ) , this, SLOT( fileQuit() ), CTRL + Key_Q );
+ _fileMenu->insertItem( SmallIcon("exit"), i18n( "&Quit" ) , this, TQT_SLOT( fileQuit() ), CTRL + Key_Q );
_editMenu = new QPopupMenu;
- _editMenu->insertItem( SmallIcon("configure"), i18n( "Configure KDat..." ) , this, SLOT( editPreferences() ) );
+ _editMenu->insertItem( SmallIcon("configure"), i18n( "Configure KDat..." ) , this, TQT_SLOT( editPreferences() ) );
_menu = new KMenuBar( this );
_menu->insertItem( i18n( "&File" ), _fileMenu );
_menu->insertItem( i18n( "&Settings" ), _editMenu );
_menu->insertSeparator();
- QString 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 );
+ 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 );
- _toolbar->insertButton( *ImageCache::instance()->getTapeUnmounted(), 0, SIGNAL( clicked( int ) ), this, SLOT( fileMountTape() ), TRUE, i18n( "Mount/unmount tape" ) );
+ _toolbar->insertButton( *ImageCache::instance()->getTapeUnmounted(), 0, TQT_SIGNAL( clicked( int ) ), this, TQT_SLOT( fileMountTape() ), TRUE, i18n( "Mount/unmount tape" ) );
_toolbar->insertSeparator();
- _toolbar->insertButton( *ImageCache::instance()->getBackup() , 1, SIGNAL( clicked( int ) ), this, SLOT( fileBackup() ) , TRUE, i18n( "Backup" ) );
+ _toolbar->insertButton( *ImageCache::instance()->getBackup() , 1, TQT_SIGNAL( clicked( int ) ), this, TQT_SLOT( fileBackup() ) , TRUE, i18n( "Backup" ) );
_toolbar->setButtonIconSet( 1, BarIconSet("kdat_backup"));
- _toolbar->insertButton( *ImageCache::instance()->getRestore(), 2, SIGNAL( clicked( int ) ), this, SLOT( fileRestore() ), TRUE, i18n( "Restore" ) );
+ _toolbar->insertButton( *ImageCache::instance()->getRestore(), 2, TQT_SIGNAL( clicked( int ) ), this, TQT_SLOT( fileRestore() ), TRUE, i18n( "Restore" ) );
_toolbar->setButtonIconSet( 2, BarIconSet("kdat_restore"));
- _toolbar->insertButton( *ImageCache::instance()->getVerify() , 3, SIGNAL( clicked( int ) ), this, SLOT( fileVerify() ) , TRUE, i18n( "Verify" ) );
+ _toolbar->insertButton( *ImageCache::instance()->getVerify() , 3, TQT_SIGNAL( clicked( int ) ), this, TQT_SLOT( fileVerify() ) , TRUE, i18n( "Verify" ) );
_toolbar->setButtonIconSet( 3, BarIconSet("kdat_verify"));
addToolBar( _toolbar );
@@ -173,9 +173,9 @@ KDatMainWindow::KDatMainWindow()
_statusBar->insertItem( i18n( "Ready." ), 0 );
#ifdef KDAT_HORIZONTAL_LAYOUT /* 2002-01-20 LEW */
- _panner = new QSplitter( QSplitter::Horizontal, this, "panner");
+ _panner = new TQSplitter( TQSplitter::Horizontal, this, "panner");
#else
- _panner = new QSplitter( QSplitter::Vertical, this, "panner");
+ _panner = new TQSplitter( TQSplitter::Vertical, this, "panner");
#endif /* KDAT_HORIZONTAL_LAYOUT */
// Create info viewers.
@@ -197,12 +197,12 @@ KDatMainWindow::KDatMainWindow()
_tree->setMinimumHeight( 300 );
#endif /* KDAT_HORIZONTAL_LAYOUT */
- connect( _tree, SIGNAL( expanding( KTreeViewItem*, bool& ) ), this, SLOT( localExpanding( KTreeViewItem*, bool& ) ) );
- connect( _tree, SIGNAL( expanded( int ) ), this, SLOT( localExpanded( int ) ) );
- connect( _tree, SIGNAL( collapsed( int ) ), this, SLOT( localCollapsed( int ) ) );
- connect( _tree, SIGNAL( selected( int ) ), this, SLOT( localSelected( int ) ) );
- connect( _tree, SIGNAL( highlighted( int ) ), this, SLOT( localHighlighted( int ) ) );
- connect( _tree, SIGNAL( popupMenu( int, const QPoint& ) ), this, SLOT( localPopupMenu( int, const QPoint& ) ) );
+ connect( _tree, TQT_SIGNAL( expanding( KTreeViewItem*, bool& ) ), this, TQT_SLOT( localExpanding( KTreeViewItem*, bool& ) ) );
+ connect( _tree, TQT_SIGNAL( expanded( int ) ), this, TQT_SLOT( localExpanded( int ) ) );
+ connect( _tree, TQT_SIGNAL( collapsed( int ) ), this, TQT_SLOT( localCollapsed( int ) ) );
+ connect( _tree, TQT_SIGNAL( selected( int ) ), this, TQT_SLOT( localSelected( int ) ) );
+ connect( _tree, TQT_SIGNAL( highlighted( int ) ), this, TQT_SLOT( localHighlighted( int ) ) );
+ connect( _tree, TQT_SIGNAL( popupMenu( int, const TQPoint& ) ), this, TQT_SLOT( localPopupMenu( int, const TQPoint& ) ) );
setCentralWidget( _panner );
@@ -211,14 +211,14 @@ KDatMainWindow::KDatMainWindow()
_tree->insertItem( _backupProfileRootNode = new BackupProfileRootNode() );
_tree->insertItem( new TapeIndexRootNode() );
- connect( TapeDrive::instance(), SIGNAL( sigStatus( const QString & ) ), this, SLOT( status( const QString & ) ) );
+ connect( TapeDrive::instance(), TQT_SIGNAL( sigStatus( const TQString & ) ), this, TQT_SLOT( status( const TQString & ) ) );
setTapePresent( FALSE );
- connect( Options::instance(), SIGNAL( sigTapeDevice() ), this, SLOT( slotTapeDevice() ) );
+ connect( Options::instance(), TQT_SIGNAL( sigTapeDevice() ), this, TQT_SLOT( slotTapeDevice() ) );
- connect( TapeManager::instance(), SIGNAL( sigTapeMounted() ) , this, SLOT( slotTapeMounted() ) );
- connect( TapeManager::instance(), SIGNAL( sigTapeUnmounted() ), this, SLOT( slotTapeUnmounted() ) );
+ connect( TapeManager::instance(), TQT_SIGNAL( sigTapeMounted() ) , this, TQT_SLOT( slotTapeMounted() ) );
+ connect( TapeManager::instance(), TQT_SIGNAL( sigTapeUnmounted() ), this, TQT_SLOT( slotTapeUnmounted() ) );
configureUI( 0 );
}
@@ -241,7 +241,7 @@ KDatMainWindow::~KDatMainWindow()
}
-void KDatMainWindow::popupTapeDriveMenu( const QPoint& p )
+void KDatMainWindow::popupTapeDriveMenu( const TQPoint& p )
{
// Configure menu before popping up.
if ( TapeManager::instance()->getMountedTape() ) {
@@ -255,22 +255,22 @@ void KDatMainWindow::popupTapeDriveMenu( const QPoint& p )
_tapeDriveMenu->popup( p );
}
-void KDatMainWindow::popupArchiveMenu( const QPoint& p )
+void KDatMainWindow::popupArchiveMenu( const TQPoint& p )
{
_archiveMenu->popup( p );
}
-void KDatMainWindow::popupMountedArchiveMenu( const QPoint& p )
+void KDatMainWindow::popupMountedArchiveMenu( const TQPoint& p )
{
_mountedArchiveMenu->popup( p );
}
-void KDatMainWindow::popupMountedTapeFileMenu( const QPoint& p )
+void KDatMainWindow::popupMountedTapeFileMenu( const TQPoint& p )
{
_mountedTapeFileMenu->popup( p );
}
-void KDatMainWindow::popupLocalFileMenu( const QPoint& p )
+void KDatMainWindow::popupLocalFileMenu( const TQPoint& p )
{
// Configure menu before popping up.
_localFileMenu->setItemEnabled( _localFileMenu->idAt( 0 ), ( TapeManager::instance()->getMountedTape() != 0 ) && ( !TapeDrive::instance()->isReadOnly() ) );
@@ -278,17 +278,17 @@ void KDatMainWindow::popupLocalFileMenu( const QPoint& p )
_localFileMenu->popup( p );
}
-void KDatMainWindow::popupTapeMenu( const QPoint& p )
+void KDatMainWindow::popupTapeMenu( const TQPoint& p )
{
_tapeMenu->popup( p );
}
-void KDatMainWindow::popupBackupProfileRootMenu( const QPoint& p )
+void KDatMainWindow::popupBackupProfileRootMenu( const TQPoint& p )
{
_backupProfileRootMenu->popup( p );
}
-void KDatMainWindow::popupBackupProfileMenu( const QPoint& p )
+void KDatMainWindow::popupBackupProfileMenu( const TQPoint& p )
{
// Configure menu before popping up.
_backupProfileMenu->setItemEnabled( _backupProfileMenu->idAt( 0 ), ( TapeManager::instance()->getMountedTape() != 0 ) && ( !TapeDrive::instance()->isReadOnly() ) );
@@ -345,7 +345,7 @@ void KDatMainWindow::showTapeFileInfo( File* file )
_tapeFileInfo->show();
}
-void KDatMainWindow::showFileInfo( const QString & name )
+void KDatMainWindow::showFileInfo( const TQString & name )
{
assert( !name.isNull() );
@@ -402,7 +402,7 @@ void KDatMainWindow::localHighlighted( int index )
configureUI( TapeManager::instance()->getMountedTape() );
}
-void KDatMainWindow::localPopupMenu( int index, const QPoint& p )
+void KDatMainWindow::localPopupMenu( int index, const TQPoint& p )
{
Node* item = (Node*)_tree->itemAt( index );
item->popupMenu( p );
@@ -416,11 +416,11 @@ void KDatMainWindow::fileBackup()
// To the i18n translator: I apologize for this long text on the last day to submit
// i18n changes. But, the program isn't very usable without this information. Thanks. LEW
// (later today): now the program works correctly! Why? Beats me!
- QString msg = i18n("KDat will dump your files properly to tape, but may not be able\n"
+ 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"
).arg(Options::instance()->getTapeDevice());
- QString msg2 = i18n("For example, if your device is /dev/st0, the non-rewinding version\n"
+ 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"
"tape drive. Substitute that name for /dev/nst0 below.\n"
@@ -445,11 +445,11 @@ void KDatMainWindow::fileBackup()
backupProfile.setSnapshotFile( bp->getSnapshotFile() );
backupProfile.setRemoveSnapshot( bp->getRemoveSnapshot() );
} else {
- QString name;
- name = i18n( "Archive created on %1" ).arg( KGlobal::locale()->formatDate(QDate::currentDate(), true) );
+ TQString name;
+ name = i18n( "Archive created on %1" ).arg( KGlobal::locale()->formatDate(TQDate::currentDate(), true) );
name = name.stripWhiteSpace();
- QStringList files;
+ TQStringList files;
getBackupFiles( files );
backupProfile.setArchiveName( name );
@@ -462,7 +462,7 @@ void KDatMainWindow::fileBackup()
int ret = 0;
BackupOptDlg dlg( &backupProfile, this );
- if ( dlg.exec() == QDialog::Accepted ) {
+ if ( dlg.exec() == TQDialog::Accepted ) {
// Begin backup.
status( i18n( "Performing backup..." ) );
int size = calcBackupSize( dlg.getWorkingDirectory(), dlg.isOneFilesystem(), dlg.getRelativeFiles(), dlg.isIncremental(), dlg.getSnapshotFile(), dlg.getRemoveSnapshot() );
@@ -475,14 +475,14 @@ void KDatMainWindow::fileBackup()
// Make sure the archive will fit on the tape.
int tapeSize = 1;
- QPtrListIterator<Archive> i( TapeManager::instance()->getMountedTape()->getChildren() );
+ TQPtrListIterator<Archive> i( TapeManager::instance()->getMountedTape()->getChildren() );
if ( i.toLast() != NULL ) {
tapeSize = i.current()->getEndBlock();
tapeSize = (int)((float)tapeSize / 1024.0 * (float)Options::instance()->getTapeBlockSize()) + 1;
}
if ( tapeSize + size >= TapeManager::instance()->getMountedTape()->getSize() ) {
// Warn user that tape is probably too short.
- QString msg;
+ TQString msg;
msg = i18n( "WARNING: The estimated archive size is %1 KB but "
"the tape has only %2 KB of space!\n"
"Back up anyway?" )
@@ -531,7 +531,7 @@ void KDatMainWindow::fileBackup()
}
// All done.
- if ( ret == QDialog::Accepted ) {
+ if ( ret == TQDialog::Accepted ) {
status( i18n( "Backup complete." ) );
} else {
status( i18n( "Backup aborted." ) );
@@ -552,7 +552,7 @@ void KDatMainWindow::doVerify( bool restore )
{
RangeableNode* rangeableNode = 0;
MountedArchiveNode* archiveNode = 0;
- QStringList files;
+ TQStringList files;
Archive* archive = 0;
// Check for marked files first.
for ( int i = _tapeDriveNode->childCount() - 1; i >= 0; i-- ) {
@@ -586,7 +586,7 @@ void KDatMainWindow::doVerify( bool restore )
}
assert( archive );
- QPtrListIterator<Archive> it( archive->getTape()->getChildren() );
+ TQPtrListIterator<Archive> it( archive->getTape()->getChildren() );
int fileno;
for ( fileno = 1; ( it.current() ) && ( it.current() != archive ); ++it, fileno++ );
@@ -595,7 +595,7 @@ void KDatMainWindow::doVerify( bool restore )
RangeList ranges;
if ( rangeableNode ) {
- QPtrListIterator<Range> it( rangeableNode->getRanges() );
+ TQPtrListIterator<Range> it( rangeableNode->getRanges() );
for ( ; it.current(); ++it ) {
ranges.addRange( it.current()->getStart(), it.current()->getEnd() );
}
@@ -625,7 +625,7 @@ void KDatMainWindow::doVerify( bool restore )
}
} else {
// Compile a list of files to verify/restore.
- QPtrStack<RangeableNode> stack;
+ TQPtrStack<RangeableNode> stack;
// Make sure the mounted archive node has populated its children.
if ( archiveNode->childCount() == 0 ) {
@@ -640,7 +640,7 @@ void KDatMainWindow::doVerify( bool restore )
while ( stack.count() > 0 ) {
sel = stack.pop();
if ( sel->isSelected() ) {
- QPtrListIterator<Range> it( sel->getRanges() );
+ TQPtrListIterator<Range> it( sel->getRanges() );
for ( ; it.current(); ++it ) {
ranges.addRange( it.current()->getStart(), it.current()->getEnd() );
}
@@ -662,7 +662,7 @@ void KDatMainWindow::doVerify( bool restore )
char buf[1024];
VerifyOptDlg dlg( getcwd( buf, 1024 ), files, restore, this );
- if ( dlg.exec() == QDialog::Accepted ) {
+ if ( dlg.exec() == TQDialog::Accepted ) {
if ( restore ) {
status( i18n( "Restore in progress..." ) );
} else {
@@ -671,7 +671,7 @@ void KDatMainWindow::doVerify( bool restore )
VerifyDlg verifyDlg( dlg.getWorkingDirectory(), fileno, ranges, restore, this );
int ret = verifyDlg.exec();
- if ( ret == QDialog::Accepted ) {
+ if ( ret == TQDialog::Accepted ) {
if ( restore ) {
status( i18n( "Restore complete." ) );
} else {
@@ -689,7 +689,7 @@ void KDatMainWindow::doVerify( bool restore )
void KDatMainWindow::fileMountTape()
{
- static QString msg;
+ static TQString msg;
// construct helpful error message (same as in fileFormatTape())
msg = i18n("There appears to be no tape in the drive %1. Please\n"
@@ -725,8 +725,8 @@ void KDatMainWindow::fileIndexTape()
if ( result == KMessageBox::Continue) {
TapeManager::instance()->getMountedTape()->clear();
IndexDlg dlg( TapeManager::instance()->getMountedTape(), this );
- if ( dlg.exec() == QDialog::Accepted ) {
- QString title;
+ if ( dlg.exec() == TQDialog::Accepted ) {
+ TQString title;
title = i18n( "KDat: %1" ).arg( TapeManager::instance()->getMountedTape()->getName() );
setCaption( title );
setIconText( title );
@@ -758,7 +758,7 @@ void KDatMainWindow::fileDeleteArchive()
assert( archive );
Tape* tape = archive->getTape();
- QPtrListIterator<Archive> i( tape->getChildren() );
+ TQPtrListIterator<Archive> i( tape->getChildren() );
for ( ; i.current(); ++i ) {
if ( i.current() == archive ) {
break;
@@ -769,13 +769,13 @@ void KDatMainWindow::fileDeleteArchive()
++i;
if ( i.current() ) {
// There are other archives after this one on the tape.
- QString list;
+ TQString list;
for ( ; i.current(); ++i ) {
list.append( "\n " );
list.append( i.current()->getName() );
}
- QString msg =
+ 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?" ).arg(archive->getName()).arg(list);
int result = KMessageBox::warningContinueCancel( this,
msg, i18n("Delete Archive"), i18n("Delete All"));
@@ -789,7 +789,7 @@ void KDatMainWindow::fileDeleteArchive()
}
} else {
// This is the last (known) archive on the tape.
- QString msg =
+ TQString msg =
i18n( "Really delete the archive '%1'?" ).arg(archive->getName());
int result = KMessageBox::warningContinueCancel( this,
msg, i18n("Delete Archive"), i18n("Delete"));
@@ -823,7 +823,7 @@ void KDatMainWindow::fileDeleteIndex()
return;
}
- QString msg =
+ TQString msg =
i18n( "Really delete the index for '%1'?" ).arg(tape->getName());
int result = KMessageBox::warningContinueCancel( this,
msg, i18n("Delete Tape Index"), i18n("Delete"));
@@ -839,7 +839,7 @@ void KDatMainWindow::fileDeleteIndex()
void KDatMainWindow::fileFormatTape()
{
- static QString msg;
+ static TQString msg;
// construct helpful error message (same as in fileMountTape())
msg = i18n("There appears to be no tape in the drive %1. Please\n"
@@ -864,10 +864,10 @@ void KDatMainWindow::fileFormatTape()
"Are you sure you want to continue?" ),
i18n("Format Tape"), i18n("Format"));
if (result == KMessageBox::Continue ) {
- QString name;
- name = i18n( "Tape created on %1" ).arg( KGlobal::locale()->formatDate(QDate::currentDate(), true) );
+ TQString name;
+ name = i18n( "Tape created on %1" ).arg( KGlobal::locale()->formatDate(TQDate::currentDate(), true) );
FormatOptDlg dlg( name.stripWhiteSpace(), this );
- if ( dlg.exec() != QDialog::Accepted ) {
+ if ( dlg.exec() != TQDialog::Accepted ) {
return;
}
@@ -896,11 +896,11 @@ void KDatMainWindow::fileNewBackupProfile()
BackupProfile* backupProfile = new BackupProfile();
// Pick a unique name.
- QString name;
+ TQString name;
for ( int i = 1; ; i++ ) {
name = i18n( "Backup Profile %1").arg( i );
- QStringList list = BackupProfileManager::instance()->getBackupProfileNames();
- QStringList::Iterator it = list.begin();
+ TQStringList list = BackupProfileManager::instance()->getBackupProfileNames();
+ TQStringList::Iterator it = list.begin();
for ( ; it != list.end(); ++it ) {
if ( name == *it ) {
break;
@@ -912,7 +912,7 @@ void KDatMainWindow::fileNewBackupProfile()
}
}
- QStringList files;
+ TQStringList files;
getBackupFiles( files );
backupProfile->setName( name );
@@ -945,7 +945,7 @@ void KDatMainWindow::fileDeleteBackupProfile()
BackupProfile* backupProfile = ((BackupProfileNode*)sel)->getBackupProfile();
assert( backupProfile );
- QString msg =
+ TQString msg =
i18n("Really delete backup profile '%1'?").arg(backupProfile->getName());
int result = KMessageBox::warningContinueCancel( this,
msg, i18n("Delete Backup Profile"), i18n("Delete"));
@@ -1003,7 +1003,7 @@ void KDatMainWindow::setTapePresent( bool tapePresent, bool eject )
KMessageBox::sorry( this, i18n( "This tape has not been formatted by KDat." ));
} else {
int result = KMessageBox::questionYesNo( this,
- i18n( "This tape has not been formatted by KDat.\n\nWould you like to format it now?" ), QString::null, i18n("Format"), i18n("Do Not Format"));
+ i18n( "This tape has not been formatted by KDat.\n\nWould you like to format it now?" ), TQString::null, i18n("Format"), i18n("Do Not Format"));
if (result == KMessageBox::Yes) {
fileFormatTape();
return;
@@ -1020,7 +1020,7 @@ void KDatMainWindow::setTapePresent( bool tapePresent, bool eject )
}
}
-void KDatMainWindow::status( const QString & msg )
+void KDatMainWindow::status( const TQString & msg )
{
_statusBar->changeItem( msg, 0 );
KApplication::kApplication()->processEvents();
@@ -1035,26 +1035,26 @@ void KDatMainWindow::show()
// 2002-01-21 LEW: returns backup size in KB, or -1 if user chose
// to abort the backup.
-int KDatMainWindow::calcBackupSize( const QString& workingDir, bool local, const QStringList& files,
- bool incremental, const QString& snapshot, bool removeSnapshot )
+int KDatMainWindow::calcBackupSize( const TQString& workingDir, bool local, const TQStringList& files,
+ bool incremental, const TQString& snapshot, bool removeSnapshot )
{
int return_value;
- chdir( QFile::encodeName(workingDir) );
+ chdir( TQFile::encodeName(workingDir) );
bool useSnapshot = !snapshot.isEmpty() && !removeSnapshot;
int tmp = 0;
if ( incremental && !removeSnapshot ) {
- QFile snap( snapshot );
+ TQFile snap( snapshot );
if ( snap.exists() && snap.open( IO_ReadOnly ) ) {
- QTextStream t( &snap );
+ TQTextStream t( &snap );
t >> tmp;
} else {
useSnapshot = FALSE;
}
}
- QDateTime mtime;
+ TQDateTime mtime;
mtime.setTime_t( tmp );
int size = 0;
@@ -1065,12 +1065,12 @@ int KDatMainWindow::calcBackupSize( const QString& workingDir, bool local, const
// cancelled the backup via the dialog.
/* 2002-01-24 LEW: end of backup-cancel dialog */
- QStringList filesTmp = files;
- QStringList::Iterator ii = filesTmp.begin();
+ TQStringList filesTmp = files;
+ TQStringList::Iterator ii = filesTmp.begin();
for ( ; ii != filesTmp.end(); ++ii ) {
// Is this a normal file, or a directory?
- QFileInfo finfo( *ii );
+ TQFileInfo finfo( *ii );
if ( !finfo.isDir() ) {
if ( ( !useSnapshot ) || ( finfo.lastModified() > mtime ) ) {
size += finfo.size() / 512;
@@ -1081,34 +1081,34 @@ int KDatMainWindow::calcBackupSize( const QString& workingDir, bool local, const
continue;
}
- QPtrStack<QString> dirStack;
- dirStack.push( new QString( *ii ) );
+ TQPtrStack<TQString> dirStack;
+ dirStack.push( new TQString( *ii ) );
// If stay on one file system, get device of starting directory.
dev_t device = 0;
struct stat info;
if ( local ) {
- if ( lstat( QFile::encodeName(*ii), &info ) != 0 ) {
+ if ( lstat( TQFile::encodeName(*ii), &info ) != 0 ) {
device = 0;
} else {
device = info.st_dev;
}
}
- QString msg;
+ TQString msg;
// msg.truncate( 4095 );
- QDir dir;
+ TQDir dir;
const QFileInfoList* infoList;
while ( !dirStack.isEmpty() ) {
if( stop_flag == TRUE ) break;
- QString* path = dirStack.pop();
+ TQString* path = dirStack.pop();
msg = i18n("Estimating backup size: %1, %2" )
.arg(Util::kbytesToString( size / 2 ))
.arg(KStringHandler::csqueeze(*path, 60));
status( msg );
KApplication::kApplication()->processEvents();
dir.setPath( *path );
- infoList = dir.entryInfoList( QDir::Hidden | QDir::Files | QDir::Dirs, 0 );
+ infoList = dir.entryInfoList( TQDir::Hidden | TQDir::Files | TQDir::Dirs, 0 );
if ( infoList ) {
QFileInfoListIterator i( *infoList );
for ( ; i.current(); ++i ) {
@@ -1117,13 +1117,13 @@ int KDatMainWindow::calcBackupSize( const QString& workingDir, bool local, const
if ( i.current()->isSymLink() ) {
} else if ( i.current()->isDir() ) {
if ( local ) {
- if ( lstat( QFile::encodeName(i.current()->absFilePath()), &info ) == 0 ) {
+ if ( lstat( TQFile::encodeName(i.current()->absFilePath()), &info ) == 0 ) {
if ( device == info.st_dev ) {
- dirStack.push( new QString( i.current()->absFilePath() ) );
+ dirStack.push( new TQString( i.current()->absFilePath() ) );
}
}
} else {
- dirStack.push( new QString( i.current()->absFilePath() ) );
+ dirStack.push( new TQString( i.current()->absFilePath() ) );
}
} else if ( ( !useSnapshot ) || ( i.current()->lastModified() > mtime ) ) {
size += i.current()->size() / 512;
@@ -1147,7 +1147,7 @@ int KDatMainWindow::calcBackupSize( const QString& workingDir, bool local, const
return return_value;
}
-void KDatMainWindow::getBackupFiles( QStringList& files )
+void KDatMainWindow::getBackupFiles( TQStringList& files )
{
if ( !_rootNode->isSelected() && !_rootNode->hasSelectedChildren() ) {
// Backup the entire subtree.
@@ -1156,7 +1156,7 @@ void KDatMainWindow::getBackupFiles( QStringList& files )
}
} else {
// Compile a list of files to backup.
- QPtrStack<ArchiveableNode> stack;
+ TQPtrStack<ArchiveableNode> stack;
stack.push( _rootNode );
ArchiveableNode* sel = 0;
while ( stack.count() > 0 ) {
@@ -1172,13 +1172,13 @@ void KDatMainWindow::getBackupFiles( QStringList& files )
}
}
-void KDatMainWindow::setBackupFiles( const QStringList& files )
+void KDatMainWindow::setBackupFiles( const TQStringList& files )
{
_rootNode->setSelected( FALSE );
- QString tmp;
- QStringList filesTmp = files;
- QStringList::Iterator it = filesTmp.begin();
+ TQString tmp;
+ TQStringList filesTmp = files;
+ TQStringList::Iterator it = filesTmp.begin();
for ( ; it != filesTmp.end(); ++it ) {
ArchiveableNode* n = _rootNode;
while ( n ) {
@@ -1231,7 +1231,7 @@ void KDatMainWindow::configureUI( Tape* tape )
// Title bar
if ( tape ) {
- QString title;
+ TQString title;
title = i18n( "KDat: %1" ).arg(tape->getName());
setCaption( title );
setIconText( title );
@@ -1311,7 +1311,7 @@ void KDatMainWindow::configureUI( Tape* tape )
void KDatMainWindow::readProperties( KConfig* config )
{
- QValueList<int> sizes;
+ TQValueList<int> sizes;
sizes << config->readNumEntry( "panner", 50 );
_panner->setSizes( sizes );
}
@@ -1325,7 +1325,7 @@ void KDatMainWindow::saveProperties( KConfig* config )
void KDatMainWindow::create_backup_dialog()
{
/* 2002-01-24 LEW: start of backup-cancel dialog */
- static QString stop_button_text, stop_button_caption;
+ static TQString stop_button_text, stop_button_caption;
stop_button_text =
i18n("Click \"CANCEL\" to stop the backup process.\n"
"For example, you may quickly see that the size of\n"
@@ -1343,26 +1343,26 @@ void KDatMainWindow::create_backup_dialog()
// _backupdialog->resize(370,200); /* 2002-01-28 LEW */
_backupdialog->resize(370,260);
- _lbl = new QLabel( stop_button_text, _backupdialog );
- // _lbl->setGeometry( QRect( 30, 20, 350, 140 ) ); /* 2002-01-28 LEW */
- _lbl->setGeometry( QRect( 30, 20, 350, 200 ) );
+ _lbl = new TQLabel( stop_button_text, _backupdialog );
+ // _lbl->setGeometry( TQRect( 30, 20, 350, 140 ) ); /* 2002-01-28 LEW */
+ _lbl->setGeometry( TQRect( 30, 20, 350, 200 ) );
_cancel = new KPushButton( KStdGuiItem::cancel(), _backupdialog );
_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 :( */
- // _cancel->setGeometry( QRect( 50, 170, 0, 0 ) ); /* 2002-01-28 LEW */
- _cancel->setGeometry( QRect( 50, 230, 0, 0 ) );
- connect( _cancel, SIGNAL( clicked() ), this, SLOT( backupCancel() ) );
+ // _cancel->setGeometry( TQRect( 50, 170, 0, 0 ) ); /* 2002-01-28 LEW */
+ _cancel->setGeometry( TQRect( 50, 230, 0, 0 ) );
+ connect( _cancel, TQT_SIGNAL( clicked() ), this, TQT_SLOT( backupCancel() ) );
_continue = new KPushButton( KStdGuiItem::cont(), _backupdialog );
_continue->setFixedSize( 80, _continue->sizeHint().height() );
_continue->setEnabled( TRUE );
_continue->setDefault( TRUE );
- // _continue->setGeometry( QRect( 200, 170, 0, 0 ) ); /* 2002-01-28 LEW */
- _continue->setGeometry( QRect( 200, 230, 0, 0 ) );
- connect( _continue, SIGNAL( clicked() ), this, SLOT( backupContinue() ) );
+ // _continue->setGeometry( TQRect( 200, 170, 0, 0 ) ); /* 2002-01-28 LEW */
+ _continue->setGeometry( TQRect( 200, 230, 0, 0 ) );
+ connect( _continue, TQT_SIGNAL( clicked() ), this, TQT_SLOT( backupContinue() ) );
_backupdialog->show();
}
diff --git a/kdat/KDatMainWindow.h b/kdat/KDatMainWindow.h
index 33e6732..9091975 100644
--- a/kdat/KDatMainWindow.h
+++ b/kdat/KDatMainWindow.h
@@ -21,8 +21,8 @@
#include <kmainwindow.h>
#include <kdialog.h>
-#include <qpushbutton.h>
-#include <qlabel.h>
+#include <tqpushbutton.h>
+#include <tqlabel.h>
class KMenuBar;
class QSplitter;
@@ -57,20 +57,20 @@ class KDatMainWindow : public KMainWindow {
private:
bool _destroyed;
KMenuBar* _menu;
- QPopupMenu* _fileMenu;
- QPopupMenu* _editMenu;
+ TQPopupMenu* _fileMenu;
+ TQPopupMenu* _editMenu;
KToolBar* _toolbar;
KStatusBar* _statusBar;
- QSplitter* _panner;
+ TQSplitter* _panner;
KTreeView* _tree;
- QPopupMenu* _tapeDriveMenu;
- QPopupMenu* _archiveMenu;
- QPopupMenu* _mountedArchiveMenu;
- QPopupMenu* _mountedTapeFileMenu;
- QPopupMenu* _localFileMenu;
- QPopupMenu* _tapeMenu;
- QPopupMenu* _backupProfileRootMenu;
- QPopupMenu* _backupProfileMenu;
+ TQPopupMenu* _tapeDriveMenu;
+ TQPopupMenu* _archiveMenu;
+ TQPopupMenu* _mountedArchiveMenu;
+ TQPopupMenu* _mountedTapeFileMenu;
+ TQPopupMenu* _localFileMenu;
+ TQPopupMenu* _tapeMenu;
+ TQPopupMenu* _backupProfileRootMenu;
+ TQPopupMenu* _backupProfileMenu;
ArchiveInfoWidget* _archiveInfo;
BackupProfileInfoWidget* _backupProfileInfo;
TapeFileInfoWidget* _tapeFileInfo;
@@ -84,8 +84,8 @@ private:
void doVerify( bool restore = FALSE );
void setTapePresent( bool tapePresent, bool eject = TRUE );
- int calcBackupSize( const QString& workingDir, bool local, const QStringList& files,
- bool incremental, const QString& snapshot, bool removeSnapshot );
+ int calcBackupSize( const TQString& workingDir, bool local, const TQStringList& files,
+ bool incremental, const TQString& snapshot, bool removeSnapshot );
KDatMainWindow();
@@ -93,9 +93,9 @@ private:
// used in calcBackupSize() to see whether user cancelled the on-going
// backup to tape.
KDialog* _backupdialog;
- QPushButton* _cancel;
- QPushButton* _continue;
- QLabel* _lbl;
+ TQPushButton* _cancel;
+ TQPushButton* _continue;
+ TQLabel* _lbl;
int stop_flag;
void create_backup_dialog();
// 2002-01-24 LEW
@@ -106,7 +106,7 @@ private slots:
void localCollapsed( int index );
void localSelected( int index );
void localHighlighted( int index );
- void localPopupMenu( int index, const QPoint& p );
+ void localPopupMenu( int index, const TQPoint& p );
void fileBackup();
void fileRestore();
@@ -153,56 +153,56 @@ public:
*
* @param p The upper left corner of the menu.
*/
- void popupTapeDriveMenu( const QPoint& p );
+ void popupTapeDriveMenu( const TQPoint& p );
/**
* Display the archive node popup menu.
*
* @param p The upper left corner of the menu.
*/
- void popupArchiveMenu( const QPoint& p );
+ void popupArchiveMenu( const TQPoint& p );
/**
* Display the mounted archive node popup menu.
*
* @param p The upper left corner of the menu.
*/
- void popupMountedArchiveMenu( const QPoint& p );
+ void popupMountedArchiveMenu( const TQPoint& p );
/**
* Display the mounted tape file node popup menu.
*
* @param p The upper left corner of the menu.
*/
- void popupMountedTapeFileMenu( const QPoint& p );
+ void popupMountedTapeFileMenu( const TQPoint& p );
/**
* Display the local file node popup menu.
*
* @param p The upper left corner of the menu.
*/
- void popupLocalFileMenu( const QPoint& p );
+ void popupLocalFileMenu( const TQPoint& p );
/**
* Display the tape index node popup menu.
*
* @param p The upper left corner of the menu.
*/
- void popupTapeMenu( const QPoint& p );
+ void popupTapeMenu( const TQPoint& p );
/**
* Display the backup profile root node popup menu.
*
* @param p The upper left corner of the menu.
*/
- void popupBackupProfileRootMenu( const QPoint& p );
+ void popupBackupProfileRootMenu( const TQPoint& p );
/**
* Display the backup profile node popup menu.
*
* @param p The upper left corner of the menu.
*/
- void popupBackupProfileMenu( const QPoint& p );
+ void popupBackupProfileMenu( const TQPoint& p );
/**
* Hide all of the info viewers.
@@ -242,7 +242,7 @@ public:
*
* @param file The full path name of the file to display.
*/
- void showFileInfo( const QString & name );
+ void showFileInfo( const TQString & name );
/**
* Make sure that the user interface is consistent for the given mounted
@@ -258,14 +258,14 @@ public:
*
* @param files This list will be filled with the selected files.
*/
- void getBackupFiles( QStringList& files );
+ void getBackupFiles( TQStringList& files );
/**
* Set the list of all the files selected for backup.
*
* @param files This list will become the selection.
*/
- void setBackupFiles( const QStringList& files );
+ void setBackupFiles( const TQStringList& files );
public slots:
/**
@@ -273,7 +273,7 @@ public slots:
*
* @param msg The message to display.
*/
- void status( const QString & msg );
+ void status( const TQString & msg );
/**
* Initialize the KDat main window before displaying.
diff --git a/kdat/LoggerWidget.cpp b/kdat/LoggerWidget.cpp
index ac0bdc5..11921c2 100644
--- a/kdat/LoggerWidget.cpp
+++ b/kdat/LoggerWidget.cpp
@@ -16,9 +16,9 @@
// along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qmultilineedit.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqmultilineedit.h>
#include <kapplication.h>
#include <kfiledialog.h>
@@ -29,16 +29,16 @@
#include "LoggerWidget.moc"
-LoggerWidget::LoggerWidget( const QString & title, QWidget* parent, const char* name )
- : QWidget( parent, name )
+LoggerWidget::LoggerWidget( const TQString & title, TQWidget* parent, const char* name )
+ : TQWidget( parent, name )
{
- QLabel* lbl1 = new QLabel( title, this );
+ TQLabel* lbl1 = new TQLabel( title, this );
lbl1->setFixedHeight( lbl1->sizeHint().height() );
- _mle = new QMultiLineEdit( this );
+ _mle = new TQMultiLineEdit( this );
_mle->setReadOnly( TRUE );
- QVBoxLayout* l1 = new QVBoxLayout( this, 0, 4 );
+ TQVBoxLayout* l1 = new TQVBoxLayout( this, 0, 4 );
l1->addWidget( lbl1 );
l1->addWidget( _mle, 1 );
}
@@ -47,7 +47,7 @@ LoggerWidget::~LoggerWidget()
{
}
-void LoggerWidget::append( const QString & text )
+void LoggerWidget::append( const TQString & text )
{
_mle->append( text );
_mle->setCursorPosition( _mle->numLines(), 0 );
@@ -55,9 +55,9 @@ void LoggerWidget::append( const QString & text )
void LoggerWidget::save()
{
- QString file = KFileDialog::getSaveFileName( QString::null, QString::null, this );
+ TQString file = KFileDialog::getSaveFileName( TQString::null, TQString::null, this );
if ( !file.isNull() ) {
- QFile f( file );
+ TQFile f( file );
if ( f.exists() ) {
int result = KMessageBox::warningContinueCancel( this,
i18n( "Log file exists, overwrite?" ),
@@ -67,7 +67,7 @@ void LoggerWidget::save()
return;
}
if ( f.open( IO_WriteOnly ) ) {
- QCString line;
+ TQCString line;
for ( int i = 0; i < _mle->numLines(); i++ ) {
line = _mle->textLine( i ).utf8();
f.writeBlock( line, line.length() );
diff --git a/kdat/LoggerWidget.h b/kdat/LoggerWidget.h
index 76afb78..3c57d68 100644
--- a/kdat/LoggerWidget.h
+++ b/kdat/LoggerWidget.h
@@ -19,16 +19,16 @@
#ifndef _LoggerWidget_h_
#define _LoggerWidget_h_
-#include <qwidget.h>
+#include <tqwidget.h>
class QMultiLineEdit;
/**
* @short A titled logging widget with a save option.
*/
-class LoggerWidget : public QWidget {
+class LoggerWidget : public TQWidget {
Q_OBJECT
- QMultiLineEdit* _mle;
+ TQMultiLineEdit* _mle;
public:
/**
* Create a titled logging widget
@@ -37,7 +37,7 @@ public:
* @param parent The parent widget.
* @param name The name of this widget.
*/
- LoggerWidget( const QString & title, QWidget* parent = 0, const char* name = 0 );
+ LoggerWidget( const TQString & title, TQWidget* parent = 0, const char* name = 0 );
/**
* Destroy the logging widget.
@@ -50,7 +50,7 @@ public:
*
* @param text The text to append.
*/
- void append( const QString & text );
+ void append( const TQString & text );
public slots:
/**
* Prompt the user for a file name, and save the contents of the log to
diff --git a/kdat/Node.cpp b/kdat/Node.cpp
index 828ad69..7e42855 100644
--- a/kdat/Node.cpp
+++ b/kdat/Node.cpp
@@ -20,9 +20,9 @@
#include <sys/stat.h>
#include <unistd.h>
-#include <qdir.h>
-#include <qpainter.h>
-#include <qstyle.h>
+#include <tqdir.h>
+#include <tqpainter.h>
+#include <tqstyle.h>
#include <kapplication.h>
#include <kdebug.h>
@@ -40,7 +40,7 @@
#include "Node.moc"
-Node::Node( int type, const QString & text, const QPixmap& pixmap )
+Node::Node( int type, const TQString & text, const TQPixmap& pixmap )
: KTreeViewItem( text, pixmap ),
_type( type )
{
@@ -132,7 +132,7 @@ void Node::selected()
KDatMainWindow::getInstance()->hideInfo();
}
-void Node::popupMenu( const QPoint& )
+void Node::popupMenu( const TQPoint& )
{
}
@@ -160,7 +160,7 @@ bool TapeNode::validate()
}
// Add/update existing archives.
- QPtrListIterator<Archive> i( _tape->getChildren() );
+ TQPtrListIterator<Archive> i( _tape->getChildren() );
ArchiveNode* n;
for ( ; i.current(); ++i ) {
n = findArchiveNode( i.current() );
@@ -215,7 +215,7 @@ void TapeNode::expanding( bool expand )
return;
}
- QPtrListIterator<Archive> f( _tape->getChildren() );
+ TQPtrListIterator<Archive> f( _tape->getChildren() );
for ( ; f.current(); ++f ) {
insertNode( new ArchiveNode( f.current() ) );
}
@@ -226,7 +226,7 @@ void TapeNode::selected()
KDatMainWindow::getInstance()->showTapeInfo( _tape );
}
-void TapeNode::popupMenu( const QPoint& p )
+void TapeNode::popupMenu( const TQPoint& p )
{
KDatMainWindow::getInstance()->popupTapeMenu( p );
}
@@ -284,7 +284,7 @@ void ArchiveNode::expanding( bool expand )
return;
}
- QPtrListIterator<File> f( _archive->getChildren() );
+ TQPtrListIterator<File> f( _archive->getChildren() );
for ( ; f.current(); ++f ) {
if ( f.current()->getName()[f.current()->getName().length()-1] == '/' ) {
insertNode( new TapeDirectoryNode( f.current() ) );
@@ -299,7 +299,7 @@ void ArchiveNode::selected()
KDatMainWindow::getInstance()->showArchiveInfo( _archive );
}
-void ArchiveNode::popupMenu( const QPoint& p )
+void ArchiveNode::popupMenu( const TQPoint& p )
{
KDatMainWindow::getInstance()->popupArchiveMenu( p );
}
@@ -342,7 +342,7 @@ void TapeDirectoryNode::expanding( bool expand )
return;
}
- QPtrListIterator<File> f( _file->getChildren() );
+ TQPtrListIterator<File> f( _file->getChildren() );
for ( ; f.current(); ++f ) {
if ( f.current()->getName()[f.current()->getName().length()-1] == '/' ) {
insertNode( new TapeDirectoryNode( f.current() ) );
@@ -399,7 +399,7 @@ void TapeFileNode::selected()
KDatMainWindow::getInstance()->showTapeFileInfo( _file );
}
-SelectableNode::SelectableNode( int type, const QString & text, const QPixmap& pixmap, int state )
+SelectableNode::SelectableNode( int type, const TQString & text, const TQPixmap& pixmap, int state )
: Node( type, text, pixmap ),
_state( state )
{
@@ -463,7 +463,7 @@ void SelectableNode::doSetSelected( bool select )
}
}
-const QPixmap* SelectableNode::getSelectPixmap() const
+const TQPixmap* SelectableNode::getSelectPixmap() const
{
switch ( _state ) {
case SelAll:
@@ -480,7 +480,7 @@ const QPixmap* SelectableNode::getSelectPixmap() const
}
}
-bool SelectableNode::mousePressEvent( const QPoint& point )
+bool SelectableNode::mousePressEvent( const TQPoint& point )
{
if ( _selectRect.contains( point ) ) {
switch ( _state ) {
@@ -502,7 +502,7 @@ bool SelectableNode::mousePressEvent( const QPoint& point )
}
}
-void SelectableNode::paint( QPainter* p, int indent, const QColorGroup& cg,
+void SelectableNode::paint( TQPainter* p, int indent, const TQColorGroup& cg,
bool highlighted ) const
{
assert(getParent() != 0); /* can't paint root item */
@@ -526,7 +526,7 @@ void SelectableNode::paint( QPainter* p, int indent, const QColorGroup& cg,
paintExpandButton(p, indent, cellHeight);
}
- const QPixmap* pm = getSelectPixmap();
+ const TQPixmap* pm = getSelectPixmap();
p->drawPixmap( indent, ( height() - pm->height() ) / 2, *pm );
_selectRect.setRect( indent, ( height() - pm->height() ) / 2, 12, 12 );
@@ -541,15 +541,15 @@ void SelectableNode::paint( QPainter* p, int indent, const QColorGroup& cg,
p->restore();
}
-void SelectableNode::paintText( QPainter* p, int indent, int cellHeight,
- const QColorGroup& cg, bool highlighted ) const
+void SelectableNode::paintText( TQPainter* p, int indent, int cellHeight,
+ const TQColorGroup& cg, bool highlighted ) const
{
int textX = indent + 12 + 4 + pixmap.width() + 4;
int textY = cellHeight - ((cellHeight - p->fontMetrics().ascent() -
p->fontMetrics().leading()) / 2);
if (highlighted) {
paintHighlight(p, indent, cg, owner->hasFocus(),
- (Qt::GUIStyle)owner->style().styleHint(QStyle::SH_GUIStyle)); // Qt3 doesn't make this easy ;)
+ (Qt::GUIStyle)owner->style().styleHint(TQStyle::SH_GUIStyle)); // Qt3 doesn't make this easy ;)
p->setPen(cg.base());
p->setBackgroundColor(cg.text());
}
@@ -560,22 +560,22 @@ void SelectableNode::paintText( QPainter* p, int indent, int cellHeight,
p->drawText(textX, textY, text);
}
-int SelectableNode::width( int indent, const QFontMetrics& fm ) const
+int SelectableNode::width( int indent, const TQFontMetrics& fm ) const
{
int maxWidth = pixmap.width();
maxWidth += (4 + 12 + 4 + fm.width(text));
return maxWidth == 0 ? -1 : indent + maxWidth + 3;
}
-QRect SelectableNode::textBoundingRect(int indent) const
+TQRect SelectableNode::textBoundingRect(int indent) const
{
- const QFontMetrics& fm = owner->fontMetrics();
+ const TQFontMetrics& fm = owner->fontMetrics();
int cellHeight = height(fm);
int rectX = indent + 12 + 4 + pixmap.width() + 3;
int rectY = (cellHeight - fm.ascent() - fm.leading()) / 2 + 2;
int rectW = fm.width(text) + 1;
int rectH = fm.ascent() + fm.leading();
- return QRect(rectX, rectY, rectW, rectH);
+ return TQRect(rectX, rectY, rectW, rectH);
}
bool SelectableNode::isType( int type )
@@ -610,7 +610,7 @@ void SelectableNode::setSelected( bool select )
KDatMainWindow::getInstance()->configureUI( TapeManager::instance()->getMountedTape() );
}
-RangeableNode::RangeableNode( int type, const QString & text, const QPixmap& pixmap, int state )
+RangeableNode::RangeableNode( int type, const TQString & text, const TQPixmap& pixmap, int state )
: SelectableNode( type, text, pixmap, state )
{
}
@@ -636,7 +636,7 @@ Archive* MountedArchiveNode::getArchive()
return _archive;
}
-const QPtrList<Range>& MountedArchiveNode::getRanges()
+const TQPtrList<Range>& MountedArchiveNode::getRanges()
{
return _archive->getRanges();
}
@@ -684,7 +684,7 @@ void MountedArchiveNode::expanding( bool expand )
return;
}
- QPtrListIterator<File> f( _archive->getChildren() );
+ TQPtrListIterator<File> f( _archive->getChildren() );
for ( ; f.current(); ++f ) {
if ( f.current()->getName()[f.current()->getName().length()-1] == '/' ) {
insertNode( new MountedTapeDirectoryNode( f.current(), _state == SelSome ? SelNone : _state ) );
@@ -699,7 +699,7 @@ void MountedArchiveNode::selected()
KDatMainWindow::getInstance()->showArchiveInfo( _archive );
}
-void MountedArchiveNode::popupMenu( const QPoint& p )
+void MountedArchiveNode::popupMenu( const TQPoint& p )
{
KDatMainWindow::getInstance()->popupMountedArchiveMenu( p );
}
@@ -726,7 +726,7 @@ File* MountedTapeDirectoryNode::getFile()
return _file;
}
-QString MountedTapeDirectoryNode::getFullPath()
+TQString MountedTapeDirectoryNode::getFullPath()
{
if ( _fullPath.length() == 0 ) {
_fullPath = getText() + "/";
@@ -739,7 +739,7 @@ QString MountedTapeDirectoryNode::getFullPath()
return _fullPath;
}
-const QPtrList<Range>& MountedTapeDirectoryNode::getRanges()
+const TQPtrList<Range>& MountedTapeDirectoryNode::getRanges()
{
return _file->getRanges();
}
@@ -784,7 +784,7 @@ void MountedTapeDirectoryNode::expanding( bool expand )
return;
}
- QPtrListIterator<File> f( _file->getChildren() );
+ TQPtrListIterator<File> f( _file->getChildren() );
for ( ; f.current(); ++f ) {
if ( f.current()->getName()[f.current()->getName().length()-1] == '/' ) {
insertNode( new MountedTapeDirectoryNode( f.current(), _state == SelSome ? SelNone : _state ) );
@@ -809,7 +809,7 @@ void MountedTapeDirectoryNode::selected()
KDatMainWindow::getInstance()->showTapeFileInfo( _file );
}
-void MountedTapeDirectoryNode::popupMenu( const QPoint& p )
+void MountedTapeDirectoryNode::popupMenu( const TQPoint& p )
{
KDatMainWindow::getInstance()->popupMountedTapeFileMenu( p );
}
@@ -832,7 +832,7 @@ File* MountedTapeFileNode::getFile()
return _file;
}
-QString MountedTapeFileNode::getFullPath()
+TQString MountedTapeFileNode::getFullPath()
{
if ( _fullPath.length() == 0 ) {
_fullPath = getText();
@@ -845,7 +845,7 @@ QString MountedTapeFileNode::getFullPath()
return _fullPath;
}
-const QPtrList<Range>& MountedTapeFileNode::getRanges()
+const TQPtrList<Range>& MountedTapeFileNode::getRanges()
{
return _file->getRanges();
}
@@ -886,12 +886,12 @@ void MountedTapeFileNode::selected()
KDatMainWindow::getInstance()->showTapeFileInfo( _file );
}
-void MountedTapeFileNode::popupMenu( const QPoint& p )
+void MountedTapeFileNode::popupMenu( const TQPoint& p )
{
KDatMainWindow::getInstance()->popupMountedTapeFileMenu( p );
}
-ArchiveableNode::ArchiveableNode( int type, const QString & text, const QPixmap& pixmap, int state )
+ArchiveableNode::ArchiveableNode( int type, const TQString & text, const TQPixmap& pixmap, int state )
: SelectableNode( type, text, pixmap, state )
{
}
@@ -912,7 +912,7 @@ RootNode::RootNode()
setDelayedExpanding( TRUE );
}
-QString RootNode::getFullPath()
+TQString RootNode::getFullPath()
{
if ( _fullPath.length() == 0 ) {
_fullPath = "/";
@@ -967,7 +967,7 @@ void RootNode::expanding( bool expand )
_mtime = statinfo.st_mtime;
}
- QDir dir( "/" );
+ TQDir dir( "/" );
if ( dir.exists() ) {
// Make sure we can read the directory.
if ( !dir.isReadable() ) {
@@ -976,7 +976,7 @@ void RootNode::expanding( bool expand )
}
// Fill in the child's children.
- const QFileInfoList* list = dir.entryInfoList( QDir::Hidden | QDir::Files | QDir::Dirs, QDir::Name | QDir::DirsFirst );
+ const QFileInfoList* list = dir.entryInfoList( TQDir::Hidden | TQDir::Files | TQDir::Dirs, TQDir::Name | TQDir::DirsFirst );
if ( list ) {
QFileInfoListIterator it( *list );
for ( ; it.current(); ++it ) {
@@ -1007,19 +1007,19 @@ void RootNode::selected()
KDatMainWindow::getInstance()->showFileInfo( "/" );
}
-void RootNode::popupMenu( const QPoint& p )
+void RootNode::popupMenu( const TQPoint& p )
{
KDatMainWindow::getInstance()->popupLocalFileMenu( p );
}
-DirectoryNode::DirectoryNode( const QString & text, int state )
+DirectoryNode::DirectoryNode( const TQString & text, int state )
: ArchiveableNode( DirectoryNodeType, text, *ImageCache::instance()->getFolderClosed(), state ),
_mtime( -1 )
{
setDelayedExpanding( TRUE );
}
-QString DirectoryNode::getFullPath()
+TQString DirectoryNode::getFullPath()
{
if ( _fullPath.isEmpty() ) {
_fullPath = ((ArchiveableNode*)getParent())->getFullPath() + getText() + "/";
@@ -1042,7 +1042,7 @@ void DirectoryNode::expanding( bool expand )
expand = TRUE;
// Construct the full path.
- QString path;
+ TQString path;
Node* n;
for ( n = this; n->getType() != RootNodeType; n = (Node*)n->getParent() ) {
path.prepend( "/" );
@@ -1053,7 +1053,7 @@ void DirectoryNode::expanding( bool expand )
// If we already have some children, check to see if the directory has been modified.
if ( childCount() > 0 ) {
struct stat statinfo;
- if ( stat( QFile::encodeName(path), &statinfo ) < 0 ) {
+ if ( stat( TQFile::encodeName(path), &statinfo ) < 0 ) {
kdError() << "Can't stat " << path << endl;
expand = FALSE;
return;
@@ -1074,7 +1074,7 @@ void DirectoryNode::expanding( bool expand )
}
} else {
struct stat statinfo;
- if ( stat( QFile::encodeName(path), &statinfo ) < 0 ) {
+ if ( stat( TQFile::encodeName(path), &statinfo ) < 0 ) {
kdError() << "Can't stat " << path << endl;
expand = FALSE;
return;
@@ -1083,7 +1083,7 @@ void DirectoryNode::expanding( bool expand )
_mtime = statinfo.st_mtime;
}
- QDir dir( path );
+ TQDir dir( path );
if ( dir.exists() ) {
// Make sure we can read the directory.
if ( !dir.isReadable() ) {
@@ -1092,7 +1092,7 @@ void DirectoryNode::expanding( bool expand )
}
// Fill in the child's children.
- const QFileInfoList* list = dir.entryInfoList( QDir::Hidden | QDir::Files | QDir::Dirs, QDir::Name | QDir::DirsFirst );
+ const QFileInfoList* list = dir.entryInfoList( TQDir::Hidden | TQDir::Files | TQDir::Dirs, TQDir::Name | TQDir::DirsFirst );
if ( list ) {
QFileInfoListIterator it( *list );
for ( ; it.current(); ++it ) {
@@ -1121,7 +1121,7 @@ void DirectoryNode::collapsed()
void DirectoryNode::selected()
{
// Construct the full path.
- QString path;
+ TQString path;
Node* n;
for ( n = this; n->getType() != RootNodeType; n = (Node*)n->getParent() ) {
path.prepend( "/" );
@@ -1133,17 +1133,17 @@ void DirectoryNode::selected()
KDatMainWindow::getInstance()->showFileInfo( path );
}
-void DirectoryNode::popupMenu( const QPoint& p )
+void DirectoryNode::popupMenu( const TQPoint& p )
{
KDatMainWindow::getInstance()->popupLocalFileMenu( p );
}
-FileNode::FileNode( const QString & text, int state )
+FileNode::FileNode( const TQString & text, int state )
: ArchiveableNode( FileNodeType, text, *ImageCache::instance()->getFile(), state )
{
}
-QString FileNode::getFullPath()
+TQString FileNode::getFullPath()
{
if ( _fullPath.isEmpty() ) {
_fullPath = ((ArchiveableNode*)getParent())->getFullPath() + getText();
@@ -1164,7 +1164,7 @@ bool FileNode::isType( int type )
void FileNode::selected()
{
// Construct the full path.
- QString path;
+ TQString path;
Node* n;
for ( n = this; n->getType() != RootNodeType; n = (Node*)n->getParent() ) {
path.prepend( "/" );
@@ -1176,7 +1176,7 @@ void FileNode::selected()
KDatMainWindow::getInstance()->showFileInfo( path );
}
-void FileNode::popupMenu( const QPoint& p )
+void FileNode::popupMenu( const TQPoint& p )
{
KDatMainWindow::getInstance()->popupLocalFileMenu( p );
}
@@ -1186,9 +1186,9 @@ TapeDriveNode::TapeDriveNode()
{
setDelayedExpanding( TRUE );
- connect( TapeManager::instance(), SIGNAL( sigTapeMounted() ) , this, SLOT( slotTapeMounted() ) );
- connect( TapeManager::instance(), SIGNAL( sigTapeUnmounted() ) , this, SLOT( slotTapeUnmounted() ) );
- connect( TapeManager::instance(), SIGNAL( sigTapeModified( Tape* ) ), this, SLOT( slotTapeModified( Tape* ) ) );
+ connect( TapeManager::instance(), TQT_SIGNAL( sigTapeMounted() ) , this, TQT_SLOT( slotTapeMounted() ) );
+ connect( TapeManager::instance(), TQT_SIGNAL( sigTapeUnmounted() ) , this, TQT_SLOT( slotTapeUnmounted() ) );
+ connect( TapeManager::instance(), TQT_SIGNAL( sigTapeModified( Tape* ) ), this, TQT_SLOT( slotTapeModified( Tape* ) ) );
}
bool TapeDriveNode::isType( int type )
@@ -1214,7 +1214,7 @@ void TapeDriveNode::expanding( bool expand )
return;
}
- QPtrListIterator<Archive> f( TapeManager::instance()->getMountedTape()->getChildren() );
+ TQPtrListIterator<Archive> f( TapeManager::instance()->getMountedTape()->getChildren() );
for ( ; f.current(); ++f ) {
insertNode( new MountedArchiveNode( f.current() ) );
}
@@ -1229,7 +1229,7 @@ void TapeDriveNode::selected()
}
}
-void TapeDriveNode::popupMenu( const QPoint& p )
+void TapeDriveNode::popupMenu( const TQPoint& p )
{
KDatMainWindow::getInstance()->popupTapeDriveMenu( p );
}
@@ -1283,7 +1283,7 @@ void TapeDriveNode::slotTapeModified( Tape* tape )
}
// Add/update existing archives.
- QPtrListIterator<Archive> i( tape->getChildren() );
+ TQPtrListIterator<Archive> i( tape->getChildren() );
MountedArchiveNode* n;
for ( ; i.current(); ++i ) {
n = findArchiveNode( i.current() );
@@ -1336,9 +1336,9 @@ TapeIndexRootNode::TapeIndexRootNode()
{
setDelayedExpanding( TRUE );
- connect( TapeManager::instance(), SIGNAL( sigTapeAdded( Tape* ) ) , this, SLOT( slotTapeAdded( Tape* ) ) );
- connect( TapeManager::instance(), SIGNAL( sigTapeRemoved( Tape* ) ) , this, SLOT( slotTapeRemoved( Tape* ) ) );
- connect( TapeManager::instance(), SIGNAL( sigTapeModified( Tape* ) ), this, SLOT( slotTapeModified( Tape* ) ) );
+ connect( TapeManager::instance(), TQT_SIGNAL( sigTapeAdded( Tape* ) ) , this, TQT_SLOT( slotTapeAdded( Tape* ) ) );
+ connect( TapeManager::instance(), TQT_SIGNAL( sigTapeRemoved( Tape* ) ) , this, TQT_SLOT( slotTapeRemoved( Tape* ) ) );
+ connect( TapeManager::instance(), TQT_SIGNAL( sigTapeModified( Tape* ) ), this, TQT_SLOT( slotTapeModified( Tape* ) ) );
}
bool TapeIndexRootNode::isType( int type )
@@ -1358,8 +1358,8 @@ void TapeIndexRootNode::expanding( bool expand )
return;
}
- QStringList list = TapeManager::instance()->getTapeIDs();
- QStringList::Iterator i = list.begin();
+ TQStringList list = TapeManager::instance()->getTapeIDs();
+ TQStringList::Iterator i = list.begin();
for ( ; i != list.end(); ++i ) {
Tape* tape = TapeManager::instance()->findTape( *i );
if ( tape ) {
@@ -1461,7 +1461,7 @@ void BackupProfileNode::selected()
KDatMainWindow::getInstance()->showBackupProfileInfo( _backupProfile );
}
-void BackupProfileNode::popupMenu( const QPoint& p )
+void BackupProfileNode::popupMenu( const TQPoint& p )
{
KDatMainWindow::getInstance()->popupBackupProfileMenu( p );
}
@@ -1471,12 +1471,12 @@ BackupProfileRootNode::BackupProfileRootNode()
{
setDelayedExpanding( TRUE );
- connect( BackupProfileManager::instance(), SIGNAL( sigBackupProfileAdded( BackupProfile* ) ) ,
- this, SLOT( slotBackupProfileAdded( BackupProfile* ) ) );
- connect( BackupProfileManager::instance(), SIGNAL( sigBackupProfileRemoved( BackupProfile* ) ) ,
- this, SLOT( slotBackupProfileRemoved( BackupProfile* ) ) );
- connect( BackupProfileManager::instance(), SIGNAL( sigBackupProfileModified( BackupProfile* ) ),
- this, SLOT( slotBackupProfileModified( BackupProfile* ) ) );
+ connect( BackupProfileManager::instance(), TQT_SIGNAL( sigBackupProfileAdded( BackupProfile* ) ) ,
+ this, TQT_SLOT( slotBackupProfileAdded( BackupProfile* ) ) );
+ connect( BackupProfileManager::instance(), TQT_SIGNAL( sigBackupProfileRemoved( BackupProfile* ) ) ,
+ this, TQT_SLOT( slotBackupProfileRemoved( BackupProfile* ) ) );
+ connect( BackupProfileManager::instance(), TQT_SIGNAL( sigBackupProfileModified( BackupProfile* ) ),
+ this, TQT_SLOT( slotBackupProfileModified( BackupProfile* ) ) );
}
void BackupProfileRootNode::setSelected( BackupProfile* pBackupProfile )
@@ -1512,8 +1512,8 @@ void BackupProfileRootNode::expanding( bool expand )
return;
}
- QStringList list = BackupProfileManager::instance()->getBackupProfileNames();
- QStringList::Iterator i = list.begin();
+ TQStringList list = BackupProfileManager::instance()->getBackupProfileNames();
+ TQStringList::Iterator i = list.begin();
for ( ; i != list.end(); ++i ) {
BackupProfile* backupProfile = BackupProfileManager::instance()->findBackupProfile( *i );
if ( backupProfile ) {
@@ -1532,7 +1532,7 @@ void BackupProfileRootNode::collapsed()
setPixmap( *ImageCache::instance()->getFolderClosed() );
}
-void BackupProfileRootNode::popupMenu( const QPoint& p )
+void BackupProfileRootNode::popupMenu( const TQPoint& p )
{
KDatMainWindow::getInstance()->popupBackupProfileRootMenu( p );
}
diff --git a/kdat/Node.h b/kdat/Node.h
index 84dfea8..e33f7f8 100644
--- a/kdat/Node.h
+++ b/kdat/Node.h
@@ -19,7 +19,7 @@
#ifndef _Node_h_
#define _Node_h_
-#include <qobject.h>
+#include <tqobject.h>
#include "ktreeview.h"
@@ -65,7 +65,7 @@ public:
* @param text Text label for the node.
* @param pixmap A pixmap to display to the left of the text.
*/
- Node( int type, const QString & text, const QPixmap& pixmap );
+ Node( int type, const TQString & text, const TQPixmap& pixmap );
/**
* There must be a virtual destructor in the base class so that all the
@@ -121,7 +121,7 @@ public:
* This method is called when the user right-clicks the mouse over the
* node.
*/
- virtual void popupMenu( const QPoint& );
+ virtual void popupMenu( const TQPoint& );
};
class ArchiveNode;
@@ -179,7 +179,7 @@ public:
* This method is called when the user right-clicks the mouse over the
* node.
*/
- virtual void popupMenu( const QPoint& p );
+ virtual void popupMenu( const TQPoint& p );
};
/**
@@ -234,7 +234,7 @@ public:
* This method is called when the user right-clicks the mouse over the
* node.
*/
- virtual void popupMenu( const QPoint& p );
+ virtual void popupMenu( const TQPoint& p );
};
/**
@@ -325,21 +325,21 @@ public:
*/
class SelectableNode : public Node {
protected:
- mutable QRect _selectRect;
+ mutable TQRect _selectRect;
enum { SelAll, SelNone, SelSome };
int _state;
void doUpdateState();
void doSetSelected( bool select );
- const QPixmap* getSelectPixmap() const;
-
- virtual bool mousePressEvent( const QPoint& point );
- virtual void paint( QPainter* p, int indent,
- const QColorGroup& cg, bool highlighted ) const;
- virtual void paintText( QPainter* p, int indent, int cellHeight,
- const QColorGroup& cg, bool highlighted ) const;
- virtual int width( int indent, const QFontMetrics& fm ) const;
- virtual QRect textBoundingRect( int indent ) const;
+ const TQPixmap* getSelectPixmap() const;
+
+ virtual bool mousePressEvent( const TQPoint& point );
+ virtual void paint( TQPainter* p, int indent,
+ const TQColorGroup& cg, bool highlighted ) const;
+ virtual void paintText( TQPainter* p, int indent, int cellHeight,
+ const TQColorGroup& cg, bool highlighted ) const;
+ virtual int width( int indent, const TQFontMetrics& fm ) const;
+ virtual TQRect textBoundingRect( int indent ) const;
public:
/**
* Create a selectable node.
@@ -349,7 +349,7 @@ public:
* @param pixmap A pixmap to display to the left of the text.
* @param state The initial selection state of the node.
*/
- SelectableNode( int type, const QString & text, const QPixmap& pixmap, int state );
+ SelectableNode( int type, const TQString & text, const TQPixmap& pixmap, int state );
/**
* Determine whether the node is an instance of the given node type.
@@ -394,13 +394,13 @@ public:
* @param pixmap A pixmap to display to the left of the text.
* @param state The initial selection state of the node.
*/
- RangeableNode( int type, const QString & text, const QPixmap& pixmap, int state );
+ RangeableNode( int type, const TQString & text, const TQPixmap& pixmap, int state );
/**
* Get a list of all the selected ranges for the subtree rooted at this
* node.
*/
- virtual const QPtrList<Range>& getRanges() = 0;
+ virtual const TQPtrList<Range>& getRanges() = 0;
/**
* Determine whether the node is an instance of the given node type.
@@ -442,7 +442,7 @@ public:
* Get a list of all the selected ranges for the subtree rooted at this
* node.
*/
- virtual const QPtrList<Range>& getRanges();
+ virtual const TQPtrList<Range>& getRanges();
/**
* Select/deselect this node and all of its children.
@@ -476,7 +476,7 @@ public:
* This method is called when the user right-clicks the mouse over the
* node.
*/
- virtual void popupMenu( const QPoint& p );
+ virtual void popupMenu( const TQPoint& p );
};
/**
@@ -484,7 +484,7 @@ public:
*/
class MountedTapeDirectoryNode : public RangeableNode {
File* _file;
- QString _fullPath;
+ TQString _fullPath;
public:
/**
* Create a tape directory node.
@@ -507,13 +507,13 @@ public:
*
* @return The full path name of the directory.
*/
- QString getFullPath();
+ TQString getFullPath();
/**
* Get a list of all the selected ranges for the subtree rooted at this
* node.
*/
- virtual const QPtrList<Range>& getRanges();
+ virtual const TQPtrList<Range>& getRanges();
/**
* Select/deselect this node and all of its children.
@@ -556,7 +556,7 @@ public:
* This method is called when the user right-clicks the mouse over the
* node.
*/
- virtual void popupMenu( const QPoint& p );
+ virtual void popupMenu( const TQPoint& p );
};
/**
@@ -564,7 +564,7 @@ public:
*/
class MountedTapeFileNode : public RangeableNode {
File* _file;
- QString _fullPath;
+ TQString _fullPath;
public:
/**
* Create a tape file node.
@@ -587,13 +587,13 @@ public:
*
* @return The full path name of the file.
*/
- QString getFullPath();
+ TQString getFullPath();
/**
* Get a list of all the selected ranges for the subtree rooted at this
* node.
*/
- virtual const QPtrList<Range>& getRanges();
+ virtual const TQPtrList<Range>& getRanges();
/**
* Select/deselect this node and all of its children.
@@ -619,7 +619,7 @@ public:
* This method is called when the user right-clicks the mouse over the
* node.
*/
- virtual void popupMenu( const QPoint& p );
+ virtual void popupMenu( const TQPoint& p );
};
/**
@@ -627,7 +627,7 @@ public:
*/
class ArchiveableNode : public SelectableNode {
protected:
- QString _fullPath;
+ TQString _fullPath;
public:
/**
* Create a new archiveable node.
@@ -637,7 +637,7 @@ public:
* @param pixmap A pixmap to display to the left of the text.
* @param state The initial selection state of the node.
*/
- ArchiveableNode( int type, const QString & text, const QPixmap& pixmap, int state );
+ ArchiveableNode( int type, const TQString & text, const TQPixmap& pixmap, int state );
/**
* Compute the full path name of this node. Nodes representing
@@ -645,7 +645,7 @@ public:
*
* @return The full path of the file that this node represents.
*/
- virtual QString getFullPath() = 0;
+ virtual TQString getFullPath() = 0;
/**
* Determine whether the node is an instance of the given node type.
@@ -672,7 +672,7 @@ public:
*
* @return The full path of the file that this node represents.
*/
- virtual QString getFullPath();
+ virtual TQString getFullPath();
/**
* Determine whether the node is an instance of the given node type.
@@ -708,7 +708,7 @@ public:
* This method is called when the user right-clicks the mouse over the
* node.
*/
- virtual void popupMenu( const QPoint& p );
+ virtual void popupMenu( const TQPoint& p );
};
/**
@@ -724,7 +724,7 @@ public:
* traversing the tree to the root node.
* @param state The initial selection state of the node.
*/
- DirectoryNode( const QString & text, int state );
+ DirectoryNode( const TQString & text, int state );
/**
* Compute the full path name of this node. Nodes representing
@@ -732,7 +732,7 @@ public:
*
* @return The full path of the file that this node represents.
*/
- virtual QString getFullPath();
+ virtual TQString getFullPath();
/**
* Determine whether the node is an instance of the given node type.
@@ -768,7 +768,7 @@ public:
* This method is called when the user right-clicks the mouse over the
* node.
*/
- virtual void popupMenu( const QPoint& p );
+ virtual void popupMenu( const TQPoint& p );
};
/**
@@ -783,7 +783,7 @@ public:
* traversing the tree to the root node.
* @param state The initial selection state of the node.
*/
- FileNode( const QString & text, int state );
+ FileNode( const TQString & text, int state );
/**
* Compute the full path name of this node. Nodes representing
@@ -791,7 +791,7 @@ public:
*
* @return The full path of the file that this node represents.
*/
- virtual QString getFullPath();
+ virtual TQString getFullPath();
/**
* Determine whether the node is an instance of the given node type.
@@ -809,13 +809,13 @@ public:
* This method is called when the user right-clicks the mouse over the
* node.
*/
- virtual void popupMenu( const QPoint& p );
+ virtual void popupMenu( const TQPoint& p );
};
/**
* @short This node represents a tape drive.
*/
-class TapeDriveNode : public QObject, public Node {
+class TapeDriveNode : public TQObject, public Node {
Q_OBJECT
MountedArchiveNode* findArchiveNode( Archive* archive );
@@ -848,7 +848,7 @@ public:
* This method is called when the user right-clicks the mouse over the
* node.
*/
- virtual void popupMenu( const QPoint& p );
+ virtual void popupMenu( const TQPoint& p );
public slots:
/**
* This slot is called when the tape is mounted.
@@ -872,7 +872,7 @@ public slots:
/**
* @short This node represents the root of the tape index subtree.
*/
-class TapeIndexRootNode : public QObject, public Node {
+class TapeIndexRootNode : public TQObject, public Node {
Q_OBJECT
TapeNode* findTapeNode( Tape* tape );
@@ -972,13 +972,13 @@ public:
* This method is called when the user right-clicks the mouse over the
* node.
*/
- virtual void popupMenu( const QPoint& );
+ virtual void popupMenu( const TQPoint& );
};
/**
* @short This node represents the root of the backup profile subtree.
*/
-class BackupProfileRootNode : public QObject, public Node {
+class BackupProfileRootNode : public TQObject, public Node {
Q_OBJECT
BackupProfileNode* findBackupProfileNode( BackupProfile* backupProfile );
@@ -1023,7 +1023,7 @@ public:
* This method is called when the user right-clicks the mouse over the
* node.
*/
- virtual void popupMenu( const QPoint& );
+ virtual void popupMenu( const TQPoint& );
public slots:
/**
* Add a new child node for the new backup profile.
diff --git a/kdat/Options.cpp b/kdat/Options.cpp
index 71a784e..234d802 100644
--- a/kdat/Options.cpp
+++ b/kdat/Options.cpp
@@ -62,12 +62,12 @@ int Options::getTapeBlockSize()
return _tapeBlockSize;
}
-QString Options::getTapeDevice()
+TQString Options::getTapeDevice()
{
return _tapeDevice;
}
-QString Options::getTarCommand()
+TQString Options::getTarCommand()
{
return _tarCommand;
}
@@ -110,7 +110,7 @@ void Options::setTapeBlockSize( int bytes )
}
}
-void Options::setTapeDevice( const QString & str )
+void Options::setTapeDevice( const TQString & str )
{
if ( getTapeDevice() != str ) {
_tapeDevice = str;
@@ -119,7 +119,7 @@ void Options::setTapeDevice( const QString & str )
}
}
-void Options::setTarCommand( const QString & str )
+void Options::setTarCommand( const TQString & str )
{
if ( getTarCommand() != str ) {
_tarCommand = str;
diff --git a/kdat/Options.h b/kdat/Options.h
index 4f65795..d9701ea 100644
--- a/kdat/Options.h
+++ b/kdat/Options.h
@@ -19,20 +19,20 @@
#ifndef _Options_h_
#define _Options_h_
-#include <qobject.h>
+#include <tqobject.h>
class KConfig;
/**
* @short The central repository for user preferences.
*/
-class Options : public QObject {
+class Options : public TQObject {
Q_OBJECT
KConfig* _config;
int _defaultTapeSize;
int _tapeBlockSize;
- QString _tapeDevice;
- QString _tarCommand;
+ TQString _tapeDevice;
+ TQString _tarCommand;
bool _loadOnMount;
bool _lockOnMount;
bool _ejectOnUnmount;
@@ -74,14 +74,14 @@ public:
*
* @return The tape device path.
*/
- QString getTapeDevice();
+ TQString getTapeDevice();
/**
* Get the full path to the tar command.
*
* @return The path to the tar command.
*/
- QString getTarCommand();
+ TQString getTarCommand();
/**
* Get whether to load the tape before attempting to mount it.
@@ -130,14 +130,14 @@ public:
*
* @param str The full path to the tape device.
*/
- void setTapeDevice( const QString & str );
+ void setTapeDevice( const TQString & str );
/**
* Set the path to the tar command.
*
* @param str The full path to the tar command.
*/
- void setTarCommand( const QString & str );
+ void setTarCommand( const TQString & str );
/**
* Set whether to load the tape before attempting to mount it.
diff --git a/kdat/OptionsDlg.cpp b/kdat/OptionsDlg.cpp
index ba07773..f056bbf 100644
--- a/kdat/OptionsDlg.cpp
+++ b/kdat/OptionsDlg.cpp
@@ -24,7 +24,7 @@
#include "OptionsDlg.h"
#include "OptionsDlgWidget.h"
-#include <qcheckbox.h>
+#include <tqcheckbox.h>
#include <kcombobox.h>
#include <klineedit.h>
@@ -34,18 +34,18 @@
#include <kglobal.h>
#include "OptionsDlg.moc"
-OptionsDlg::OptionsDlg( QWidget* parent, const char* name )
+OptionsDlg::OptionsDlg( TQWidget* parent, const char* name )
: KDialogBase( Swallow, i18n ("Options"), Ok | Apply | Cancel,
Ok, parent, name, true, true ), apply (0)
{
_baseWidget = new OptionsDlgWidget ( 0 );
setMainWidget (_baseWidget);
- connect( _baseWidget, SIGNAL( valueChanged () ), this, SLOT( slotChanged() ) );
+ connect( _baseWidget, TQT_SIGNAL( valueChanged () ), this, TQT_SLOT( slotChanged() ) );
- connect( this, SIGNAL( okClicked () ), this, SLOT( slotOK() ) );
- connect( this, SIGNAL( applyClicked() ), this, SLOT( slotApply() ) );
- connect( this, SIGNAL( cancelClicked() ), this, SLOT( slotCancel() ) );
+ connect( this, TQT_SIGNAL( okClicked () ), this, TQT_SLOT( slotOK() ) );
+ connect( this, TQT_SIGNAL( applyClicked() ), this, TQT_SLOT( slotApply() ) );
+ connect( this, TQT_SIGNAL( cancelClicked() ), this, TQT_SLOT( slotCancel() ) );
int size = Options::instance()->getDefaultTapeSize();
if ( ( size >= 1024*1024 ) && ( size % ( 1024*1024 ) == 0 ) ) {
diff --git a/kdat/OptionsDlg.h b/kdat/OptionsDlg.h
index 9e62fd7..1f7dcd5 100644
--- a/kdat/OptionsDlg.h
+++ b/kdat/OptionsDlg.h
@@ -41,7 +41,7 @@ public:
* @param parent The parent widget of the dialog.
* @param name The name of the dialog.
*/
- OptionsDlg( QWidget* parent = 0, const char* name = 0 );
+ OptionsDlg( TQWidget* parent = 0, const char* name = 0 );
/**
* Destroy the options dialog.
@@ -50,7 +50,7 @@ public:
private:
bool configChanged;
OptionsDlgWidget *_baseWidget;
- QPushButton* apply;
+ TQPushButton* apply;
};
#endif
diff --git a/kdat/Range.cpp b/kdat/Range.cpp
index b2836aa..00e0e2b 100644
--- a/kdat/Range.cpp
+++ b/kdat/Range.cpp
@@ -58,7 +58,7 @@ RangeList::~RangeList()
}
}
-const QPtrList<Range>& RangeList::getRanges() const
+const TQPtrList<Range>& RangeList::getRanges() const
{
return _ranges;
}
diff --git a/kdat/Range.h b/kdat/Range.h
index 5b042c3..20542ca 100644
--- a/kdat/Range.h
+++ b/kdat/Range.h
@@ -19,7 +19,7 @@
#ifndef _Range_h_
#define _Range_h_
-#include <qptrlist.h>
+#include <tqptrlist.h>
/**
* @short This class represents a range of tar records.
@@ -69,7 +69,7 @@ public:
* A simple list of Ranges.
*/
class RangeList {
- QPtrList<Range> _ranges;
+ TQPtrList<Range> _ranges;
public:
/**
* Create an empty list of ranges.
@@ -86,7 +86,7 @@ public:
*
* @return The list of ranges.
*/
- const QPtrList<Range>& getRanges() const;
+ const TQPtrList<Range>& getRanges() const;
/**
* Intelligently add the given range to the list of ranges. If possible,
diff --git a/kdat/Tape.cpp b/kdat/Tape.cpp
index b015376..ff35d1a 100644
--- a/kdat/Tape.cpp
+++ b/kdat/Tape.cpp
@@ -22,7 +22,7 @@
#include <unistd.h>
#include <errno.h>
-#include <qfile.h>
+#include <tqfile.h>
#include <kmessagebox.h>
#include <klocale.h>
@@ -131,13 +131,13 @@ void Tape::read()
/* 2002-01-28 LEW */
// printf("Preparing to read tape data\n" );
- // QString filename1 = locateLocal( "appdata", _id);
+ // TQString filename1 = locateLocal( "appdata", _id);
// printf("The tape data are in \"%s\"\n", filename1.ascii() );
/* 2002-01-28 LEW */
if ( !_fptr ) {
- QString filename = locateLocal( "appdata", _id);
- _fptr = fopen( QFile::encodeName(filename), "r" );
+ TQString filename = locateLocal( "appdata", _id);
+ _fptr = fopen( TQFile::encodeName(filename), "r" );
/* 2002-01-28 LEW */
#ifdef DEBUG
@@ -226,7 +226,7 @@ void Tape::readAll( int version )
{
read();
- QPtrListIterator<Archive> i( _children );
+ TQPtrListIterator<Archive> i( _children );
for ( ; i.current(); ++i ) {
i.current()->readAll( version );
}
@@ -234,7 +234,7 @@ void Tape::readAll( int version )
void Tape::write()
{
- QString filename = locateLocal( "appdata", _id);
+ TQString filename = locateLocal( "appdata", _id);
/* 2002-01-28 LEW */
#ifdef DEBUG
@@ -244,7 +244,7 @@ void Tape::write()
/* 2002-01-28 LEW */
if ( !_fptr ) {
- _fptr = fopen( QFile::encodeName(filename), "w" );
+ _fptr = fopen( TQFile::encodeName(filename), "w" );
/* 2002-01-31 LEW */
#ifdef DEBUG
@@ -259,7 +259,7 @@ void Tape::write()
return;
}
} else {
- freopen( QFile::encodeName(filename), "w", _fptr );
+ freopen( TQFile::encodeName(filename), "w", _fptr );
/* 2002-01-31 LEW */
#ifdef DEBUG
// printf("Reopened new archive file \"%s\". %s %d\n",
@@ -292,7 +292,7 @@ void Tape::write()
}
//===== Write archives =====
- QPtrListIterator<Archive> i( _children );
+ TQPtrListIterator<Archive> i( _children );
int count = 0;
for ( ; i.current(); ++i, count++ ) {
// Fill in the file offset.
@@ -304,17 +304,17 @@ void Tape::write()
i.current()->write( _fptr );
}
- freopen( QFile::encodeName(filename), "r+", _fptr );
+ freopen( TQFile::encodeName(filename), "r+", _fptr );
}
-QString Tape::getID()
+TQString Tape::getID()
{
read();
return _id;
}
-QString Tape::getName()
+TQString Tape::getName()
{
read();
@@ -342,14 +342,14 @@ int Tape::getSize()
return _size;
}
-const QPtrList<Archive>& Tape::getChildren()
+const TQPtrList<Archive>& Tape::getChildren()
{
read();
return _children;
}
-void Tape::setName( const QString & name )
+void Tape::setName( const TQString & name )
{
/* 2002-01-31 LEW */
int i;
@@ -363,8 +363,8 @@ void Tape::setName( const QString & name )
}
// change file to read-write so we can update it 2002-01-31 LEW
- QString filename = locateLocal( "appdata", _id);
- freopen( QFile::encodeName(filename), "r+", _fptr );
+ TQString filename = locateLocal( "appdata", _id);
+ freopen( TQFile::encodeName(filename), "r+", _fptr );
_name = name;
@@ -377,7 +377,7 @@ void Tape::setName( const QString & name )
down a bug that turns out to be unrelated. The errors I'm looking
for here haven't happened in real use, so there is no rush to add
these checks in KDE 3.0. Thanks. - LW */
- QString msg = i18n("Error during fseek #1 while accessing archive: \"");
+ TQString msg = i18n("Error during fseek #1 while accessing archive: \"");
msg.append( getID() );
msg.append( "\": " );
msg.append( i18n(strerror( errno )) );
@@ -390,7 +390,7 @@ void Tape::setName( const QString & name )
{
clearerr( _fptr );
#ifdef DEBUG /* Can't create new i18n strings now, so we'll save this for KDE 3.1 */
- QString msg = i18n("Error while accessing string #1 in archive: \"");
+ TQString msg = i18n("Error while accessing string #1 in archive: \"");
msg.append( getID() );
msg.append( "\": " );
msg.append( i18n(strerror( errno )) );
@@ -403,7 +403,7 @@ void Tape::setName( const QString & name )
{
clearerr( _fptr );
#ifdef DEBUG /* Can't create new i18n strings now, so we'll save this for KDE 3.1 */
- QString msg = i18n("Error while accessing string #2 in archive: \"");
+ TQString msg = i18n("Error while accessing string #2 in archive: \"");
msg.append( getID() );
msg.append( "\": " );
msg.append( i18n(strerror( errno )) );
@@ -416,7 +416,7 @@ void Tape::setName( const QString & name )
{
clearerr( _fptr );
#ifdef DEBUG /* Can't create new i18n strings now, so we'll save this for KDE 3.1 */
- QString msg = i18n("Error during fseek #2 while accessing archive: \"");
+ TQString msg = i18n("Error during fseek #2 while accessing archive: \"");
msg.append( getID() );
msg.append( "\": " );
msg.append( i18n(strerror( errno )) );
@@ -433,7 +433,7 @@ void Tape::setName( const QString & name )
I fixed the bug that caused this error to occur. Thanks - LW */
if( ( i < 4096 ) || ( ferror( _fptr ) != 0 )){
clearerr( _fptr );
- QString msg = i18n("Error while updating archive name: ");
+ TQString msg = i18n("Error while updating archive name: ");
msg.append( i18n(strerror( errno )) );
printf("%s\n", msg.latin1());
KMessageBox::error(NULL, msg, i18n("File Access Error"));
@@ -451,7 +451,7 @@ void Tape::setName( const QString & name )
/* 2002-01-31 LEW */
// change back to read-only 2002-01-31 LEW
- freopen( QFile::encodeName(filename), "r", _fptr );
+ freopen( TQFile::encodeName(filename), "r", _fptr );
TapeManager::instance()->tapeModified( this );
}
@@ -466,8 +466,8 @@ void Tape::setMTime( int mtime )
}
// change file to read-write so we can update it 2002-01-31 LEW
- QString filename = locateLocal( "appdata", _id);
- freopen( QFile::encodeName(filename), "r+", _fptr );
+ TQString filename = locateLocal( "appdata", _id);
+ freopen( TQFile::encodeName(filename), "r+", _fptr );
_mtime = mtime;
@@ -480,7 +480,7 @@ void Tape::setMTime( int mtime )
fflush( _fptr );
// change back to read-only 2002-01-31 LEW
- freopen( QFile::encodeName(filename), "r", _fptr );
+ freopen( TQFile::encodeName(filename), "r", _fptr );
TapeManager::instance()->tapeModified( this );
}
@@ -497,8 +497,8 @@ void Tape::setSize( int size )
_size = size;
// change file to read-write so we can update it 2002-01-31 LEW
- QString filename = locateLocal( "appdata", _id);
- freopen( QFile::encodeName(filename), "r+", _fptr );
+ TQString filename = locateLocal( "appdata", _id);
+ freopen( TQFile::encodeName(filename), "r+", _fptr );
char buf[4096];
fseek( _fptr, 0, SEEK_SET );
@@ -509,7 +509,7 @@ void Tape::setSize( int size )
fflush( _fptr );
// change back to read-only 2002-01-31 LEW
- freopen( QFile::encodeName(filename), "r", _fptr );
+ freopen( TQFile::encodeName(filename), "r", _fptr );
TapeManager::instance()->tapeModified( this );
}
@@ -523,8 +523,8 @@ void Tape::addChild( Archive* archive )
read();
// change file to read-write so we can update it 2002-01-31 LEW
- QString filename = locateLocal( "appdata", _id);
- freopen( QFile::encodeName(filename), "r+", _fptr );
+ TQString filename = locateLocal( "appdata", _id);
+ freopen( TQFile::encodeName(filename), "r+", _fptr );
archive->calcRanges();
@@ -548,7 +548,7 @@ void Tape::addChild( Archive* archive )
setMTime( time( NULL ) );
// change back to read-only 2002-01-31 LEW
- freopen( QFile::encodeName(filename), "r", _fptr );
+ freopen( TQFile::encodeName(filename), "r", _fptr );
/* 2002-01-28 LEW */
// printf("Done adding archive to tape file\n" );
@@ -580,13 +580,13 @@ void Tape::removeChild( Archive* archive )
here = ftell( _fptr );
}
- QString filename = locateLocal( "appdata", _id);
- truncate( QFile::encodeName(filename), here );
- freopen( QFile::encodeName(filename), "r+", _fptr );
+ TQString filename = locateLocal( "appdata", _id);
+ truncate( TQFile::encodeName(filename), here );
+ freopen( TQFile::encodeName(filename), "r+", _fptr );
fflush( _fptr );
// change back to read-only 2002-01-31 LEW
- freopen( QFile::encodeName(filename), "r", _fptr );
+ freopen( TQFile::encodeName(filename), "r", _fptr );
setMTime( time( NULL ) );
}
@@ -612,13 +612,13 @@ void Tape::clear()
fseek( _fptr, MAX_NUM_ARCHIVES * 4, SEEK_CUR );
int here = ftell( _fptr );
- QString filename = locateLocal( "appdata", _id);
- truncate( QFile::encodeName(filename), here );
- freopen( QFile::encodeName(filename), "r+", _fptr );
+ TQString filename = locateLocal( "appdata", _id);
+ truncate( TQFile::encodeName(filename), here );
+ freopen( TQFile::encodeName(filename), "r+", _fptr );
fflush( _fptr );
// change back to read-only 2002-01-31 LEW
- freopen( QFile::encodeName(filename), "r", _fptr );
+ freopen( TQFile::encodeName(filename), "r", _fptr );
setMTime( time( NULL ) );
}
@@ -634,7 +634,7 @@ void Tape::readVersion1Index( FILE* fptr )
KMessageBox::error( KDatMainWindow::getInstance(), i18n( "Reading tape ID failed." ), i18n("Index File Error") );
return;
}
- QCString tapeID = buf;
+ TQCString tapeID = buf;
tapeID.truncate( tapeID.length() - 1 );
if ( tapeID !=_id ) {
KMessageBox::error( KDatMainWindow::getInstance(), i18n( "Tape ID on tape does not match tape ID in index file." ), i18n("Index File Error") );
@@ -683,7 +683,7 @@ void Tape::readVersion1Index( FILE* fptr )
KMessageBox::error( KDatMainWindow::getInstance(), i18n( "Reading archive name failed." ), i18n("Index File Error") );
return;
}
- QString archiveName = buf;
+ TQString archiveName = buf;
archiveName.truncate( archiveName.length() - 1 );
// Read archive time stamp.
@@ -720,7 +720,7 @@ void Tape::readVersion1Index( FILE* fptr )
}
int archiveNumFiles = atoi( buf );
- QString tmpFileName;
+ TQString tmpFileName;
int tmpFileSize = -1;
int tmpFileMTime = -1;
int tmpFileStartRecord = -1;
@@ -730,7 +730,7 @@ void Tape::readVersion1Index( FILE* fptr )
KMessageBox::error( KDatMainWindow::getInstance(), i18n( "Reading file name failed." ), i18n("Index File Error") );
return;
}
- QString fileName = buf;
+ TQString fileName = buf;
fileName.truncate( fileName.length() - 1 );
// Read file size.
@@ -781,7 +781,7 @@ void Tape::readVersion2Index( FILE* fptr )
KMessageBox::error( KDatMainWindow::getInstance(), i18n( "Reading tape ID failed." ), i18n("Index File Error") );
return;
}
- QCString tapeID = buf;
+ TQCString tapeID = buf;
tapeID.truncate( tapeID.length() - 1 );
if ( tapeID != _id ) {
KMessageBox::error( KDatMainWindow::getInstance(), i18n( "Tape ID on tape does not match tape ID in index file." ), i18n("Index File Error") );
@@ -843,7 +843,7 @@ void Tape::readVersion3Index( FILE* fptr )
KMessageBox::error( KDatMainWindow::getInstance(), i18n( "Reading tape ID failed." ), i18n("Index File Error") );
return;
}
- QCString tapeID = buf;
+ TQCString tapeID = buf;
tapeID.truncate( tapeID.length() - 1 );
if ( tapeID != _id ) {
KMessageBox::error( KDatMainWindow::getInstance(), i18n( "Tape ID on tape does not match tape ID in index file." ), i18n("Index File Error") );
@@ -886,7 +886,7 @@ void Tape::readVersion4Index( FILE* fptr )
KMessageBox::error( KDatMainWindow::getInstance(), i18n( "Reading tape ID failed." ), i18n("Index File Error") );
return;
}
- QCString tapeID = buf;
+ TQCString tapeID = buf;
tapeID.truncate( tapeID.length() - 1 );
if ( tapeID != _id ) {
KMessageBox::error( KDatMainWindow::getInstance(), i18n( "Tape ID on tape does not match tape ID in index file." ), i18n("Index File Error") );
@@ -926,7 +926,7 @@ void Tape::readVersion4Index( FILE* fptr )
void Tape::calcRanges()
{
- QPtrListIterator<Archive> it( getChildren() );
+ TQPtrListIterator<Archive> it( getChildren() );
for ( ; it.current(); ++it ) {
it.current()->calcRanges();
}
diff --git a/kdat/Tape.h b/kdat/Tape.h
index eab7cb3..335619c 100644
--- a/kdat/Tape.h
+++ b/kdat/Tape.h
@@ -19,8 +19,8 @@
#ifndef _Tape_h_
#define _Tape_h_
-#include <qptrlist.h>
-#include <qstring.h>
+#include <tqptrlist.h>
+#include <tqstring.h>
#include "Archive.h"
@@ -29,12 +29,12 @@
*/
class Tape {
bool _stubbed;
- QCString _id;
+ TQCString _id;
int _ctime;
int _mtime;
- QString _name;
+ TQString _name;
int _size;
- QPtrList<Archive> _children;
+ TQPtrList<Archive> _children;
FILE* _fptr;
@@ -77,14 +77,14 @@ public:
*
* @return The tape id.
*/
- QString getID();
+ TQString getID();
/**
* Get the user-specified name for the tape.
*
* @return The name of the tape.
*/
- QString getName();
+ TQString getName();
/**
* Get the date and time that the tape was formatted.
@@ -112,14 +112,14 @@ public:
*
* @return The list of all archives on the tape.
*/
- const QPtrList<Archive>& getChildren();
+ const TQPtrList<Archive>& getChildren();
/**
* Set the name for the tape.
*
* @param name The new name for the tape.
*/
- void setName( const QString & name );
+ void setName( const TQString & name );
/**
* Set the modification time for the tape to be the current time..
diff --git a/kdat/TapeDrive.cpp b/kdat/TapeDrive.cpp
index 64cb46f..2e4c59b 100644
--- a/kdat/TapeDrive.cpp
+++ b/kdat/TapeDrive.cpp
@@ -24,7 +24,7 @@
#include <unistd.h>
#include <time.h>
-#include <qfile.h>
+#include <tqfile.h>
#include <kmessagebox.h>
#include <kapplication.h>
@@ -430,9 +430,9 @@ void TapeDrive::open()
close();
// Open the tape device.
- _fd = ::open( QFile::encodeName(Options::instance()->getTapeDevice()), O_RDWR );
+ _fd = ::open( TQFile::encodeName(Options::instance()->getTapeDevice()), O_RDWR );
if ( _fd < 0 ) {
- _fd = ::open( QFile::encodeName(Options::instance()->getTapeDevice()), O_RDONLY );
+ _fd = ::open( TQFile::encodeName(Options::instance()->getTapeDevice()), O_RDONLY );
if ( _fd < 0 ) {
return;
} else {
diff --git a/kdat/TapeDrive.h b/kdat/TapeDrive.h
index 4709eed..b777bc0 100644
--- a/kdat/TapeDrive.h
+++ b/kdat/TapeDrive.h
@@ -19,14 +19,14 @@
#ifndef _TapeDrive_h_
#define _TapeDrive_h_
-#include <qobject.h>
+#include <tqobject.h>
class Tape;
/**
* @short An OO interface to the tape drive.
*/
-class TapeDrive : public QObject {
+class TapeDrive : public TQObject {
Q_OBJECT
int _fd;
bool _readOnly;
@@ -241,7 +241,7 @@ signals:
*
* @param msg The informational message.
*/
- void sigStatus( const QString & msg );
+ void sigStatus( const TQString & msg );
};
#endif
diff --git a/kdat/TapeFileInfoWidget.cpp b/kdat/TapeFileInfoWidget.cpp
index de5a453..239d7f1 100644
--- a/kdat/TapeFileInfoWidget.cpp
+++ b/kdat/TapeFileInfoWidget.cpp
@@ -18,8 +18,8 @@
#include <time.h>
-#include <qlabel.h>
-#include <qlayout.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
#include <kapplication.h>
@@ -30,14 +30,14 @@
#include "TapeFileInfoWidget.moc"
-TapeFileInfoWidget::TapeFileInfoWidget( QWidget* parent, const char* name )
- : QWidget( parent, name )
+TapeFileInfoWidget::TapeFileInfoWidget( TQWidget* parent, const char* name )
+ : TQWidget( parent, name )
{
- QLabel* lbl1 = new QLabel( i18n( "File name:" ), this );
- QLabel* lbl2 = new QLabel( i18n( "Last modified:" ), this );
- QLabel* lbl3 = new QLabel( i18n( "Size:" ), this );
- QLabel* lbl4 = new QLabel( i18n( "Start record:" ), this );
- QLabel* lbl5 = new QLabel( i18n( "End record:" ), this );
+ TQLabel* lbl1 = new TQLabel( i18n( "File name:" ), this );
+ TQLabel* lbl2 = new TQLabel( i18n( "Last modified:" ), this );
+ TQLabel* lbl3 = new TQLabel( i18n( "Size:" ), this );
+ TQLabel* lbl4 = new TQLabel( i18n( "Start record:" ), this );
+ TQLabel* lbl5 = new TQLabel( i18n( "End record:" ), this );
int max = lbl1->sizeHint().width();
if ( lbl2->sizeHint().width() > max ) max = lbl2->sizeHint().width();
@@ -51,44 +51,44 @@ TapeFileInfoWidget::TapeFileInfoWidget( QWidget* parent, const char* name )
lbl4->setFixedSize( max, lbl4->sizeHint().height() );
lbl5->setFixedSize( max, lbl5->sizeHint().height() );
- _fileName = new QLabel( "???", this );
+ _fileName = new TQLabel( "???", this );
_fileName->setFixedHeight( _fileName->sizeHint().height() );
- _mtime = new QLabel( "???", this );
+ _mtime = new TQLabel( "???", this );
_mtime->setFixedHeight( _mtime->sizeHint().height() );
- _size = new QLabel( "???", this );
+ _size = new TQLabel( "???", this );
_size->setFixedHeight( _size->sizeHint().height() );
- _startRecord = new QLabel( "???", this );
+ _startRecord = new TQLabel( "???", this );
_startRecord->setFixedHeight( _startRecord->sizeHint().height() );
- _endRecord = new QLabel( "???", this );
+ _endRecord = new TQLabel( "???", this );
_endRecord->setFixedHeight( _endRecord->sizeHint().height() );
- QVBoxLayout* l1 = new QVBoxLayout( this, 4, 4 );
+ TQVBoxLayout* l1 = new TQVBoxLayout( this, 4, 4 );
- QHBoxLayout* l1_1 = new QHBoxLayout();
+ TQHBoxLayout* l1_1 = new TQHBoxLayout();
l1->addLayout( l1_1 );
l1_1->addWidget( lbl1 );
l1_1->addWidget( _fileName, 1 );
- QHBoxLayout* l1_2 = new QHBoxLayout();
+ TQHBoxLayout* l1_2 = new TQHBoxLayout();
l1->addLayout( l1_2 );
l1_2->addWidget( lbl2 );
l1_2->addWidget( _mtime, 1 );
- QHBoxLayout* l1_3 = new QHBoxLayout();
+ TQHBoxLayout* l1_3 = new TQHBoxLayout();
l1->addLayout( l1_3 );
l1_3->addWidget( lbl3 );
l1_3->addWidget( _size, 1 );
- QHBoxLayout* l1_4 = new QHBoxLayout();
+ TQHBoxLayout* l1_4 = new TQHBoxLayout();
l1->addLayout( l1_4 );
l1_4->addWidget( lbl4 );
l1_4->addWidget( _startRecord, 1 );
- QHBoxLayout* l1_5 = new QHBoxLayout();
+ TQHBoxLayout* l1_5 = new TQHBoxLayout();
l1->addLayout( l1_5 );
l1_5->addWidget( lbl5 );
l1_5->addWidget( _endRecord, 1 );
@@ -110,7 +110,7 @@ void TapeFileInfoWidget::setFile( File* file )
_fileName->setText( _file->getName() );
- QString tmp;
+ TQString tmp;
time_t tm = _file->getMTime();
tmp = ctime( &tm );
tmp = tmp.stripWhiteSpace();
@@ -121,7 +121,7 @@ void TapeFileInfoWidget::setFile( File* file )
_endRecord->setText( Util::bytesToString( _file->getEndRecord() ) );
if ( _file->isDirectory() ) {
- QPtrListIterator<Range> it( _file->getRanges() );
+ TQPtrListIterator<Range> it( _file->getRanges() );
int records = 0;
for ( ; it.current(); ++it ) {
records += it.current()->getEnd() - it.current()->getStart();
diff --git a/kdat/TapeFileInfoWidget.h b/kdat/TapeFileInfoWidget.h
index 0eaa2a6..e38cd6e 100644
--- a/kdat/TapeFileInfoWidget.h
+++ b/kdat/TapeFileInfoWidget.h
@@ -19,7 +19,7 @@
#ifndef _TapeFileInfoWidget_h_
#define _TapeFileInfoWidget_h_
-#include <qwidget.h>
+#include <tqwidget.h>
class QLabel;
@@ -28,14 +28,14 @@ class File;
/**
* @short Display information about a tape file.
*/
-class TapeFileInfoWidget : public QWidget {
+class TapeFileInfoWidget : public TQWidget {
Q_OBJECT
File* _file;
- QLabel* _fileName;
- QLabel* _mtime;
- QLabel* _startRecord;
- QLabel* _endRecord;
- QLabel* _size;
+ TQLabel* _fileName;
+ TQLabel* _mtime;
+ TQLabel* _startRecord;
+ TQLabel* _endRecord;
+ TQLabel* _size;
public:
/**
* Create a new tape file info widget.
@@ -43,7 +43,7 @@ public:
* @param parent The parent widget.
* @param name The name of this widget.
*/
- TapeFileInfoWidget( QWidget* parent = 0, const char* name = 0 );
+ TapeFileInfoWidget( TQWidget* parent = 0, const char* name = 0 );
/**
* Destroy the tape file info widget.
diff --git a/kdat/TapeInfoWidget.cpp b/kdat/TapeInfoWidget.cpp
index 8a22656..1455743 100644
--- a/kdat/TapeInfoWidget.cpp
+++ b/kdat/TapeInfoWidget.cpp
@@ -19,10 +19,10 @@
#include <stdlib.h>
#include <time.h>
-#include <qcombobox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qlineedit.h>
+#include <tqcombobox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqlineedit.h>
#include <kapplication.h>
#include <kglobal.h>
@@ -37,17 +37,17 @@
#include "TapeInfoWidget.moc"
-TapeInfoWidget::TapeInfoWidget( QWidget* parent, const char* name )
- : QWidget( parent, name ),
+TapeInfoWidget::TapeInfoWidget( TQWidget* parent, const char* name )
+ : TQWidget( parent, name ),
_tape( 0 )
{
- QLabel* lbl1 = new QLabel( i18n( "Tape name:" ), this );
- QLabel* lbl2 = new QLabel( i18n( "Tape size:" ), this );
- QLabel* lbl3 = new QLabel( i18n( "Tape ID:" ), this );
- QLabel* lbl4 = new QLabel( i18n( "Created on:" ), this );
- QLabel* lbl5 = new QLabel( i18n( "Last modified:" ), this );
- QLabel* lbl6 = new QLabel( i18n( "Archive count:" ), this );
- QLabel* lbl7 = new QLabel( i18n( "Space used:" ), this );
+ TQLabel* lbl1 = new TQLabel( i18n( "Tape name:" ), this );
+ TQLabel* lbl2 = new TQLabel( i18n( "Tape size:" ), this );
+ TQLabel* lbl3 = new TQLabel( i18n( "Tape ID:" ), this );
+ TQLabel* lbl4 = new TQLabel( i18n( "Created on:" ), this );
+ TQLabel* lbl5 = new TQLabel( i18n( "Last modified:" ), this );
+ TQLabel* lbl6 = new TQLabel( i18n( "Archive count:" ), this );
+ TQLabel* lbl7 = new TQLabel( i18n( "Space used:" ), this );
int max = lbl1->sizeHint().width();
if ( lbl2->sizeHint().width() > max ) max = lbl2->sizeHint().width();
@@ -65,86 +65,86 @@ TapeInfoWidget::TapeInfoWidget( QWidget* parent, const char* name )
lbl6->setFixedSize( max, lbl6->sizeHint().height() );
lbl7->setFixedSize( max, lbl7->sizeHint().height() );
- _tapeName = new QLineEdit( this );
+ _tapeName = new TQLineEdit( this );
_tapeName->setFixedHeight( _tapeName->sizeHint().height() );
- _tapeSize = new QLineEdit( this );
+ _tapeSize = new TQLineEdit( this );
_tapeSize->setFixedSize( 48, _tapeSize->sizeHint().height() );
- _tapeSizeUnits = new QComboBox( this );
+ _tapeSizeUnits = new TQComboBox( this );
_tapeSizeUnits->setFixedSize( 48, _tapeSizeUnits->sizeHint().height() );
_tapeSizeUnits->insertItem( "MB" );
_tapeSizeUnits->insertItem( "GB" );
- _tapeID = new QLabel( "???", this );
+ _tapeID = new TQLabel( "???", this );
_tapeID->setFixedHeight( _tapeID->sizeHint().height() );
- _ctime = new QLabel( "???", this );
+ _ctime = new TQLabel( "???", this );
_ctime->setFixedHeight( _ctime->sizeHint().height() );
- _mtime = new QLabel( "???", this );
+ _mtime = new TQLabel( "???", this );
_mtime->setFixedHeight( _mtime->sizeHint().height() );
- _archiveCount = new QLabel( "???", this );
+ _archiveCount = new TQLabel( "???", this );
_archiveCount->setFixedHeight( _archiveCount->sizeHint().height() );
- _spaceUsed = new QLabel( "???", this );
+ _spaceUsed = new TQLabel( "???", this );
_spaceUsed->setFixedHeight( _spaceUsed->sizeHint().height() );
_apply = new KPushButton( KStdGuiItem::apply(), this );
_apply->setFixedSize( 80, _apply->sizeHint().height() );
_apply->setEnabled( FALSE );
- QVBoxLayout* l1 = new QVBoxLayout( this, 4, 4 );
+ TQVBoxLayout* l1 = new TQVBoxLayout( this, 4, 4 );
- QHBoxLayout* l1_1 = new QHBoxLayout();
+ TQHBoxLayout* l1_1 = new TQHBoxLayout();
l1->addLayout( l1_1 );
l1_1->addWidget( lbl1 );
l1_1->addWidget( _tapeName, 1 );
- QHBoxLayout* l1_2 = new QHBoxLayout();
+ TQHBoxLayout* l1_2 = new TQHBoxLayout();
l1->addLayout( l1_2 );
l1_2->addWidget( lbl2 );
l1_2->addWidget( _tapeSize );
l1_2->addWidget( _tapeSizeUnits );
l1_2->addStretch( 1 );
- QHBoxLayout* l1_3 = new QHBoxLayout();
+ TQHBoxLayout* l1_3 = new TQHBoxLayout();
l1->addLayout( l1_3 );
l1_3->addWidget( lbl3 );
l1_3->addWidget( _tapeID );
- QHBoxLayout* l1_4 = new QHBoxLayout();
+ TQHBoxLayout* l1_4 = new TQHBoxLayout();
l1->addLayout( l1_4 );
l1_4->addWidget( lbl4 );
l1_4->addWidget( _ctime );
- QHBoxLayout* l1_5 = new QHBoxLayout();
+ TQHBoxLayout* l1_5 = new TQHBoxLayout();
l1->addLayout( l1_5 );
l1_5->addWidget( lbl5 );
l1_5->addWidget( _mtime );
- QHBoxLayout* l1_6 = new QHBoxLayout();
+ TQHBoxLayout* l1_6 = new TQHBoxLayout();
l1->addLayout( l1_6 );
l1_6->addWidget( lbl6 );
l1_6->addWidget( _archiveCount );
- QHBoxLayout* l1_7 = new QHBoxLayout();
+ TQHBoxLayout* l1_7 = new TQHBoxLayout();
l1->addLayout( l1_7 );
l1_7->addWidget( lbl7 );
l1_7->addWidget( _spaceUsed );
l1->addStretch( 1 );
- QHBoxLayout* l1_8 = new QHBoxLayout();
+ TQHBoxLayout* l1_8 = new TQHBoxLayout();
l1->addLayout( l1_8 );
l1_8->addStretch( 1 );
l1_8->addWidget( _apply );
- connect( _tapeName , SIGNAL( textChanged( const QString & ) ), this, SLOT( slotTextChanged( const QString & ) ) );
- connect( _tapeSize , SIGNAL( textChanged( const QString & ) ), this, SLOT( slotTextChanged( const QString & ) ) );
- connect( _tapeSizeUnits, SIGNAL( activated( int ) ) , this, SLOT( slotActivated( int ) ) );
- connect( _apply , SIGNAL( clicked() ) , this, SLOT( slotApply() ) );
+ connect( _tapeName , TQT_SIGNAL( textChanged( const TQString & ) ), this, TQT_SLOT( slotTextChanged( const TQString & ) ) );
+ connect( _tapeSize , TQT_SIGNAL( textChanged( const TQString & ) ), this, TQT_SLOT( slotTextChanged( const TQString & ) ) );
+ connect( _tapeSizeUnits, TQT_SIGNAL( activated( int ) ) , this, TQT_SLOT( slotActivated( int ) ) );
+ connect( _apply , TQT_SIGNAL( clicked() ) , this, TQT_SLOT( slotApply() ) );
}
TapeInfoWidget::~TapeInfoWidget()
@@ -171,7 +171,7 @@ void TapeInfoWidget::setTape( Tape* tape )
size /= 1024;
_tapeSizeUnits->setCurrentItem( 0 );
}
- QString tmp;
+ TQString tmp;
tmp.setNum( size );
_tapeSize->setText( tmp );
@@ -190,7 +190,7 @@ void TapeInfoWidget::setTape( Tape* tape )
tmp.setNum( _tape->getChildren().count() );
_archiveCount->setText( tmp );
- QPtrListIterator<Archive> i( _tape->getChildren() );
+ TQPtrListIterator<Archive> i( _tape->getChildren() );
int used = 1;
for ( ; i.current(); ++i ) {
used += i.current()->getEndBlock();
@@ -202,7 +202,7 @@ void TapeInfoWidget::setTape( Tape* tape )
used *= blockSize / 1024;
}
if ( _tape->getSize() > 0 ) {
- tmp = QString::fromLatin1( "%1 / %2 (%3%)")
+ tmp = TQString::fromLatin1( "%1 / %2 (%3%)")
.arg(Util::kbytesToString( used ))
.arg(Util::kbytesToString( _tape->getSize() ))
.arg(used * 100 / _tape->getSize() );
@@ -230,7 +230,7 @@ bool TapeInfoWidget::isModified()
return _tape->getSize() != size;
}
-void TapeInfoWidget::slotTextChanged( const QString & )
+void TapeInfoWidget::slotTextChanged( const TQString & )
{
if ( !_tape ) {
return;
diff --git a/kdat/TapeInfoWidget.h b/kdat/TapeInfoWidget.h
index 4b3b3a2..74bde2d 100644
--- a/kdat/TapeInfoWidget.h
+++ b/kdat/TapeInfoWidget.h
@@ -19,7 +19,7 @@
#ifndef _TapeInfoWidget_h_
#define _TapeInfoWidget_h_
-#include <qwidget.h>
+#include <tqwidget.h>
class QComboBox;
class QLabel;
@@ -31,29 +31,29 @@ class Tape;
/**
* @short Display/edit information about a tape index.
*/
-class TapeInfoWidget : public QWidget {
+class TapeInfoWidget : public TQWidget {
Q_OBJECT
Tape* _tape;
- QLineEdit* _tapeName;
- QLineEdit* _tapeSize;
- QComboBox* _tapeSizeUnits;
- QLabel* _tapeID;
- QLabel* _ctime;
- QLabel* _mtime;
- QLabel* _archiveCount;
- QLabel* _spaceUsed;
- QPushButton* _apply;
+ TQLineEdit* _tapeName;
+ TQLineEdit* _tapeSize;
+ TQComboBox* _tapeSizeUnits;
+ TQLabel* _tapeID;
+ TQLabel* _ctime;
+ TQLabel* _mtime;
+ TQLabel* _archiveCount;
+ TQLabel* _spaceUsed;
+ TQPushButton* _apply;
bool isModified();
private slots:
- void slotTextChanged( const QString & text );
+ void slotTextChanged( const TQString & text );
void slotActivated( int index );
void slotApply();
public:
/**
* Create a new tape info widget.
*/
- TapeInfoWidget( QWidget* parent = 0, const char* name = 0 );
+ TapeInfoWidget( TQWidget* parent = 0, const char* name = 0 );
/**
* Destroy the tape info widget.
diff --git a/kdat/TapeManager.cpp b/kdat/TapeManager.cpp
index 5de218e..919872f 100644
--- a/kdat/TapeManager.cpp
+++ b/kdat/TapeManager.cpp
@@ -19,9 +19,9 @@
#include <stdlib.h>
#include <unistd.h>
-#include <qdir.h>
-#include <qregexp.h>
-#include <qfile.h>
+#include <tqdir.h>
+#include <tqregexp.h>
+#include <tqfile.h>
#include <kglobal.h>
#include <kstandarddirs.h>
@@ -36,20 +36,20 @@ TapeManager::TapeManager()
_tapes.setAutoDelete( TRUE );
// Get a list of all available tape indexes.
- QStringList relList;
+ TQStringList relList;
// Fix 2002-01-24 c/o RG. The problem was: "Tape Index is empty, but I did
// just a few minutes ago a 1st backup onto the the tape."
// (void) KGlobal::dirs()->findAllResources( "appdata", ".*:[0-9]+", false, true, relList);
(void) KGlobal::dirs()->findAllResources( "appdata", "*:[0-9]*", false, true, relList);
- for(QStringList::Iterator it = relList.begin();
+ for(TQStringList::Iterator it = relList.begin();
it != relList.end();
it++)
{
- QString fn = *it;
- // Convert to outdated QStringList :-)
- _tapeIDs.append( QFile::encodeName(fn) );
+ TQString fn = *it;
+ // Convert to outdated TQStringList :-)
+ _tapeIDs.append( TQFile::encodeName(fn) );
}
}
@@ -68,21 +68,21 @@ TapeManager* TapeManager::instance()
return _instance;
}
-const QStringList& TapeManager::getTapeIDs()
+const TQStringList& TapeManager::getTapeIDs()
{
return _tapeIDs;
}
-Tape* TapeManager::findTape( const QString & id )
+Tape* TapeManager::findTape( const TQString & id )
{
/* 2002-01-26 LEW */
// printf("Contents of _tapeIDs: %d entries\n", _tapes.count());
- // for ( QStringList::Iterator it = _tapeIDs.begin(); it != _tapeIDs.end(); ++it ) {
+ // for ( TQStringList::Iterator it = _tapeIDs.begin(); it != _tapeIDs.end(); ++it ) {
// printf("%s\n", (*it).latin1());
// }
// printf("\n");
- // QDictIterator<Tape> it( _tapes );
+ // TQDictIterator<Tape> it( _tapes );
// printf("Contents of _tapes: %d entries\n", _tapes.count());
// for( ; it.current(); ++it )
// printf("index ?: %s (%d)\n", it.current()->getName().latin1(),
@@ -118,9 +118,9 @@ void TapeManager::removeTape( Tape* tape )
emit sigTapeRemoved( tape );
// Remove the index file.
- QString filename = locateLocal( "appdata", tape->getID() );
+ TQString filename = locateLocal( "appdata", tape->getID() );
- unlink( QFile::encodeName(filename) );
+ unlink( TQFile::encodeName(filename) );
_tapeIDs.remove( tape->getID() );
_tapes.remove( tape->getID() );
diff --git a/kdat/TapeManager.h b/kdat/TapeManager.h
index bc91aab..b571605 100644
--- a/kdat/TapeManager.h
+++ b/kdat/TapeManager.h
@@ -19,9 +19,9 @@
#ifndef _TapeManager_h_
#define _TapeManager_h_
-#include <qdict.h>
-#include <qobject.h>
-#include <qstrlist.h>
+#include <tqdict.h>
+#include <tqobject.h>
+#include <tqstrlist.h>
#include "Tape.h"
@@ -41,13 +41,13 @@
*
* The TapeManager follows the Singleton pattern.
*/
-class TapeManager : public QObject {
+class TapeManager : public TQObject {
Q_OBJECT
static TapeManager* _instance;
- QDict<Tape> _tapes;
- QStringList _tapeIDs;
+ TQDict<Tape> _tapes;
+ TQStringList _tapeIDs;
Tape* _mountedTape;
TapeManager();
@@ -64,9 +64,9 @@ public:
/**
* Get the list of all known tape IDs.
*
- * @return a QStringList containing the tape IDs.
+ * @return a TQStringList containing the tape IDs.
*/
- const QStringList& getTapeIDs();
+ const TQStringList& getTapeIDs();
/**
* Retrieve the index for a tape.
@@ -74,7 +74,7 @@ public:
* @param id the ID of the tape.
* @return the tape's index.
*/
- Tape* findTape( const QString & id );
+ Tape* findTape( const TQString & id );
/**
* Add a new tape index.
diff --git a/kdat/TarParser.h b/kdat/TarParser.h
index b43fd35..8dd4058 100644
--- a/kdat/TarParser.h
+++ b/kdat/TarParser.h
@@ -19,7 +19,7 @@
#ifndef _TarParser_h_
#define _TarParser_h_
-#include <qobject.h>
+#include <tqobject.h>
/* Standard Archive Format - Standard TAR - USTAR. */
@@ -166,7 +166,7 @@ union record
/**
* @short A parser for GNU tar archives.
*/
-class TarParser : public QObject {
+class TarParser : public TQObject {
Q_OBJECT
char _buf[512];
int _bufIdx;
@@ -201,7 +201,7 @@ signals:
* @param mtime The last modification time for the file.
* @param record The tar record that this file begins on.
*/
- void sigEntry( const QString & name, int size, int mtime, int record );
+ void sigEntry( const TQString & name, int size, int mtime, int record );
};
#endif
diff --git a/kdat/Util.cpp b/kdat/Util.cpp
index 7fb06a3..11e7219 100644
--- a/kdat/Util.cpp
+++ b/kdat/Util.cpp
@@ -16,26 +16,26 @@
// along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <kglobal.h>
#include <klocale.h>
#include "Util.h"
-QString Util::bytesToString( uint bytes )
+TQString Util::bytesToString( uint bytes )
{
return KGlobal::locale()->formatNumber(bytes, 0);
}
-QString Util::kbytesToString( uint kbytes )
+TQString Util::kbytesToString( uint kbytes )
{
return KGlobal::locale()->formatNumber(kbytes, 0) + 'k';
}
-QString Util::longestCommonPath( const QStringList& files )
+TQString Util::longestCommonPath( const TQStringList& files )
{
- QStringList filesTmp = files;
- QStringList::Iterator i = filesTmp.begin();
+ TQStringList filesTmp = files;
+ TQStringList::Iterator i = filesTmp.begin();
uint minLen = (*i).length();
for ( ; i != filesTmp.end(); ++i ) {
@@ -46,7 +46,7 @@ QString Util::longestCommonPath( const QStringList& files )
uint j;
for ( j = 0; j < minLen; j++ ) {
i = filesTmp.begin();
- QString first = *i;
+ TQString first = *i;
for ( ; i != filesTmp.end(); ++i ) {
if ( first.left(j) != (*i).left(j) ) {
// Prefixes are NOT the same.
@@ -59,7 +59,7 @@ QString Util::longestCommonPath( const QStringList& files )
}
}
i = filesTmp.begin();
- QString prefix = *i;
+ TQString prefix = *i;
int idx = prefix.findRev( '/', j );
if ( idx > -1 ) {
prefix = prefix.left( prefix.findRev( '/', j ) );
diff --git a/kdat/Util.h b/kdat/Util.h
index bf761e5..846dbc6 100644
--- a/kdat/Util.h
+++ b/kdat/Util.h
@@ -19,7 +19,7 @@
#ifndef _Util_h_
#define _Util_h_
-#include <qstring.h>
+#include <tqstring.h>
/**
* @short A collection of common useful methods.
@@ -30,18 +30,18 @@ public:
* Format the given number of bytes into a comma-separated string of
* digits.
*/
- static QString bytesToString( uint bytes );
+ static TQString bytesToString( uint bytes );
/**
* Format the given number of kilobytes into a comma-separated string of
* digits, followed by a 'k'.
*/
- static QString kbytesToString( uint kbytes );
+ static TQString kbytesToString( uint kbytes );
/**
* Find the longest common path prefix for a list of files.
*/
- static QString longestCommonPath( const QStringList& files );
+ static TQString longestCommonPath( const TQStringList& files );
};
#endif
diff --git a/kdat/VerifyDlg.cpp b/kdat/VerifyDlg.cpp
index 6714322..92fe9cf 100644
--- a/kdat/VerifyDlg.cpp
+++ b/kdat/VerifyDlg.cpp
@@ -24,9 +24,9 @@
#include <time.h>
#include <stdio.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qfile.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqfile.h>
#include <kapplication.h>
#include <kprocess.h>
@@ -44,9 +44,9 @@
#include "VerifyDlg.moc"
-VerifyDlg::VerifyDlg( const QString & workingDir, int fileno, const RangeList& ranges,
- bool restore, QWidget* parent, const char* name )
- : QDialog( parent, name, TRUE ),
+VerifyDlg::VerifyDlg( const TQString & workingDir, int fileno, const RangeList& ranges,
+ bool restore, TQWidget* parent, const char* name )
+ : TQDialog( parent, name, TRUE ),
_restore( restore ),
_proc( NULL ),
_workingDir( workingDir ),
@@ -59,7 +59,7 @@ VerifyDlg::VerifyDlg( const QString & workingDir, int fileno, const RangeList& r
_done( FALSE )
{
// Calculate size of verify.
- QPtrListIterator<Range> i( _ranges.getRanges() );
+ TQPtrListIterator<Range> i( _ranges.getRanges() );
_archiveSize = 0;
for ( ; i.current(); ++i ) {
_archiveSize += i.current()->getEnd() - i.current()->getStart();
@@ -82,52 +82,52 @@ VerifyDlg::VerifyDlg( const QString & workingDir, int fileno, const RangeList& r
// const int labelWidth = 96;
const int labelWidth = 110;
- 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( "Time remaining:" ), f2 );
+ TQLabel* lbl2 = new TQLabel( i18n( "Time remaining:" ), f2 );
lbl2->setFixedSize( labelWidth, lbl2->sizeHint().height() );
- _timeRemaining = new QLabel( i18n( "00:00:00" ), f2 );
+ _timeRemaining = new TQLabel( i18n( "00:00:00" ), f2 );
_timeRemaining->setFixedHeight( _timeRemaining->sizeHint().height() );
- QLabel* lbl3 = new QLabel( i18n( "Total KB:" ), f1 );
+ TQLabel* lbl3 = new TQLabel( i18n( "Total KB:" ), f1 );
lbl3->setFixedSize( labelWidth, lbl3->sizeHint().height() );
- QLabel* totalKbytes = new QLabel( Util::kbytesToString( _archiveSize ), f1 );
+ TQLabel* totalKbytes = new TQLabel( Util::kbytesToString( _archiveSize ), f1 );
totalKbytes->setFixedHeight( totalKbytes->sizeHint().height() );
- QLabel* lbl4 = new QLabel( i18n( "KB read:" ), f2 );
+ TQLabel* lbl4 = new TQLabel( i18n( "KB read:" ), f2 );
lbl4->setFixedSize( labelWidth, lbl4->sizeHint().height() );
- _kbytesRead = new QLabel( i18n( "0KB" ), f2 );
+ _kbytesRead = new TQLabel( i18n( "0KB" ), f2 );
_kbytesRead->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;
+ TQLabel* lbl6;
if ( _restore ) {
- lbl6 = new QLabel( i18n( "Files:" ), f2 );
+ lbl6 = new TQLabel( i18n( "Files:" ), f2 );
lbl6->setFixedSize( labelWidth, lbl6->sizeHint().height() );
} else {
- lbl6 = new QLabel( i18n( "Differences:" ), f2 );
+ lbl6 = new TQLabel( i18n( "Differences:" ), f2 );
lbl6->setFixedSize( labelWidth, lbl6->sizeHint().height() );
}
- _files = new QLabel( "0", f2 );
+ _files = new TQLabel( "0", f2 );
_files->setFixedHeight( _files->sizeHint().height() );
if ( _restore ) {
@@ -138,63 +138,63 @@ VerifyDlg::VerifyDlg( const QString & workingDir, int fileno, const RangeList& r
_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( totalKbytes, 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( _timeRemaining, 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( _kbytesRead, 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( _files, 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 );
@@ -208,7 +208,7 @@ VerifyDlg::~VerifyDlg()
void VerifyDlg::show()
{
- chdir( QFile::encodeName(_workingDir) );
+ chdir( TQFile::encodeName(_workingDir) );
_proc = new KProcess();
//_proc->setExecutable( Options::instance()->getTarCommand() );
@@ -219,16 +219,16 @@ void VerifyDlg::show()
*_proc << "-dvf" << "-";
}
- connect( _proc, SIGNAL( processExited( KProcess* ) ), this, SLOT( slotProcessExited( KProcess* ) ) );
- connect( _proc, SIGNAL( receivedStdout( KProcess*, char*, int ) ), this, SLOT( slotStdout( KProcess*, char*, int ) ) );
- connect( _proc, SIGNAL( wroteStdin( KProcess* ) ), this, SLOT( slotWroteStdin( KProcess* ) ) );
+ connect( _proc, TQT_SIGNAL( processExited( KProcess* ) ), this, TQT_SLOT( slotProcessExited( KProcess* ) ) );
+ connect( _proc, TQT_SIGNAL( receivedStdout( KProcess*, char*, int ) ), this, TQT_SLOT( slotStdout( KProcess*, char*, int ) ) );
+ connect( _proc, TQT_SIGNAL( wroteStdin( KProcess* ) ), this, TQT_SLOT( slotWroteStdin( KProcess* ) ) );
_startTime = time( NULL );
startTimer( 100 );
_proc->start( KProcess::NotifyOnExit, KProcess::All );
- QDialog::show();
+ TQDialog::show();
}
void VerifyDlg::slotProcessExited( KProcess* )
@@ -247,7 +247,7 @@ void VerifyDlg::slotProcessExited( KProcess* )
void VerifyDlg::slotStdout( KProcess*, char* buf, int len )
{
- QString data;
+ TQString data;
data.replace( 0, len, buf );
/* 2002-02-23 RG */
// data[len] = '\0';
@@ -280,7 +280,7 @@ void VerifyDlg::slotStdout( KProcess*, char* buf, int len )
}
_leftover.remove( 0, newlineIndex + 1 );
- QString tmp;
+ TQString tmp;
tmp.setNum( _fileCount );
_files->setText( tmp );
}
@@ -305,7 +305,7 @@ void VerifyDlg::slotAbort()
_aborted = TRUE;
}
-void VerifyDlg::timerEvent( QTimerEvent* )
+void VerifyDlg::timerEvent( TQTimerEvent* )
{
killTimers();
@@ -314,7 +314,7 @@ void VerifyDlg::timerEvent( QTimerEvent* )
int bytesToRead;
int count;
char *buf = new char[Options::instance()->getTapeBlockSize()];
- QPtrListIterator<Range> i( _ranges.getRanges() );
+ TQPtrListIterator<Range> i( _ranges.getRanges() );
for ( ; ( !_done ) && ( !_aborted ) && ( i.current() ); ++i ) {
// Move to the beginning of the next range.
TapeDrive::instance()->seek( _fileno, i.current()->getStart() );
@@ -389,10 +389,10 @@ void VerifyDlg::timerEvent( QTimerEvent* )
void VerifyDlg::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 );
int remain = 0;
@@ -402,7 +402,7 @@ void VerifyDlg::updateStats()
if ( remain < 0 ) {
remain = 0;
}
- str = QString::fromUtf8( QCString().sprintf( i18n( "%02d:%02d:%02d" ).utf8(), remain / 3600, remain / 60 % 60, remain % 60 ) );
+ str = TQString::fromUtf8( TQCString().sprintf( i18n( "%02d:%02d:%02d" ).utf8(), remain / 3600, remain / 60 % 60, remain % 60 ) );
_timeRemaining->setText( str );
str = Util::kbytesToString( (int)_totalKBytes );
diff --git a/kdat/VerifyDlg.h b/kdat/VerifyDlg.h
index 0d7648e..a0ac521 100644
--- a/kdat/VerifyDlg.h
+++ b/kdat/VerifyDlg.h
@@ -19,8 +19,8 @@
#ifndef _VerifyDlg_h_
#define _VerifyDlg_h_
-#include <qdialog.h>
-#include <qptrlist.h>
+#include <tqdialog.h>
+#include <tqptrlist.h>
#include "Range.h"
@@ -35,23 +35,23 @@ class TapeDrive;
/**
* @short Status dialog for verifying/restoring parts of an archive.
*/
-class VerifyDlg : public QDialog {
+class VerifyDlg : public TQDialog {
Q_OBJECT
bool _restore;
KProcess* _proc;
- QString _workingDir;
+ TQString _workingDir;
int _fileno;
const RangeList& _ranges;
- QString _leftover;
- QLabel* _elapsedTime;
- QLabel* _timeRemaining;
- QLabel* _kbytesRead;
- QLabel* _transferRate;
- QLabel* _files;
+ TQString _leftover;
+ TQLabel* _elapsedTime;
+ TQLabel* _timeRemaining;
+ TQLabel* _kbytesRead;
+ TQLabel* _transferRate;
+ TQLabel* _files;
LoggerWidget* _log;
- QPushButton* _ok;
- QPushButton* _save;
- QPushButton* _abort;
+ TQPushButton* _ok;
+ TQPushButton* _save;
+ TQPushButton* _abort;
int _startTime;
float _totalKBytes;
int _fileCount;
@@ -59,7 +59,7 @@ class VerifyDlg : public QDialog {
bool _wroteStdin;
bool _aborted;
bool _done;
- QString _lastFileName;
+ TQString _lastFileName;
void updateStats();
private slots:
@@ -70,7 +70,7 @@ private slots:
void slotAbort();
protected:
void show();
- void timerEvent( QTimerEvent* e );
+ void timerEvent( TQTimerEvent* e );
public:
/**
* Create a new verify/restore dialog.
@@ -82,8 +82,8 @@ public:
* @param parent The parent widget for the dialog.
* @param name The name of this widget.
*/
- VerifyDlg( const QString & workingDir, int fileno, const RangeList& ranges,
- bool restore = FALSE, QWidget* parent = 0, const char* name = 0 );
+ VerifyDlg( const TQString & workingDir, int fileno, const RangeList& ranges,
+ bool restore = FALSE, TQWidget* parent = 0, const char* name = 0 );
/**
* Destroy the verify/restore dialog.
diff --git a/kdat/VerifyOptDlg.cpp b/kdat/VerifyOptDlg.cpp
index 3eb272d..f65d41f 100644
--- a/kdat/VerifyOptDlg.cpp
+++ b/kdat/VerifyOptDlg.cpp
@@ -18,10 +18,10 @@
#include <unistd.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qlineedit.h>
-#include <qlistbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqlineedit.h>
+#include <tqlistbox.h>
#include <kapplication.h>
#include <kfiledialog.h>
@@ -33,8 +33,8 @@
#include "VerifyOptDlg.moc"
-VerifyOptDlg::VerifyOptDlg( const QString & def, const QStringList& files, bool restore, QWidget* parent, const char* name )
- : QDialog( parent, name, TRUE ),
+VerifyOptDlg::VerifyOptDlg( const TQString & def, const TQStringList& files, bool restore, TQWidget* parent, const char* name )
+ : TQDialog( parent, name, TRUE ),
_restore( restore )
{
if ( _restore ) {
@@ -45,30 +45,30 @@ VerifyOptDlg::VerifyOptDlg( const QString & def, const QStringList& files, bool
setCaption( i18n( "KDat: Verify Options" ) );
}
- QLabel* lbl1;
+ TQLabel* lbl1;
if ( _restore ) {
- lbl1 = new QLabel( i18n( "Restore to folder:" ), this );
+ lbl1 = new TQLabel( i18n( "Restore to folder:" ), this );
} else {
- lbl1 = new QLabel( i18n( "Verify in folder:" ), this );
+ lbl1 = new TQLabel( i18n( "Verify in folder:" ), this );
}
lbl1->setFixedSize( lbl1->sizeHint() );
- _entry = new QLineEdit( this );
+ _entry = new TQLineEdit( this );
_entry->setText( def );
_entry->setFixedHeight( _entry->sizeHint().height() );
- QPushButton* browse = new QPushButton( i18n( "..." ), this );
+ TQPushButton* browse = new TQPushButton( i18n( "..." ), this );
browse->setFixedSize( browse->sizeHint() );
- QLabel* lbl2;
+ TQLabel* lbl2;
if ( _restore ) {
- lbl2 = new QLabel( i18n( "Restore files:" ), this );
+ lbl2 = new TQLabel( i18n( "Restore files:" ), this );
} else {
- lbl2 = new QLabel( i18n( "Verify files:" ), this );
+ lbl2 = new TQLabel( i18n( "Verify files:" ), this );
}
lbl2->setFixedHeight( lbl2->sizeHint().height() );
- QListBox* fileList = new QListBox( this );
+ TQListBox* fileList = new TQListBox( this );
fileList->insertStringList(files);
KPushButton* ok = new KPushButton( KStdGuiItem::ok(), this );
@@ -76,9 +76,9 @@ VerifyOptDlg::VerifyOptDlg( const QString & def, const QStringList& files, bool
KPushButton* cancel = new KPushButton( KStdGuiItem::cancel(), this );
cancel->setFixedSize( 80, cancel->sizeHint().height() );
- 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->addWidget( lbl1 );
l1_1->addWidget( _entry, 1 );
@@ -87,7 +87,7 @@ VerifyOptDlg::VerifyOptDlg( const QString & def, const QStringList& files, bool
l1->addWidget( lbl2 );
l1->addWidget( fileList, 1 );
- QHBoxLayout* l1_2 = new QHBoxLayout();
+ TQHBoxLayout* l1_2 = new TQHBoxLayout();
l1->addLayout( l1_2, 0 );
l1_2->addStretch( 1 );
l1_2->addWidget( ok, 0 );
@@ -98,10 +98,10 @@ VerifyOptDlg::VerifyOptDlg( const QString & def, const QStringList& files, bool
_entry->setFocus();
_entry->selectAll();
- connect( _entry, SIGNAL( returnPressed() ), this, SLOT( okClicked() ) );
- connect( browse, SIGNAL( clicked() ) , this, SLOT( slotBrowse() ) );
- connect( ok , SIGNAL( clicked() ) , this, SLOT( okClicked() ) );
- connect( cancel, SIGNAL( clicked() ) , this, SLOT( reject() ) );
+ connect( _entry, TQT_SIGNAL( returnPressed() ), this, TQT_SLOT( okClicked() ) );
+ connect( browse, TQT_SIGNAL( clicked() ) , this, TQT_SLOT( slotBrowse() ) );
+ connect( ok , TQT_SIGNAL( clicked() ) , this, TQT_SLOT( okClicked() ) );
+ connect( cancel, TQT_SIGNAL( clicked() ) , this, TQT_SLOT( reject() ) );
}
VerifyOptDlg::~VerifyOptDlg()
@@ -114,14 +114,14 @@ void VerifyOptDlg::okClicked()
accept();
}
-QString VerifyOptDlg::getWorkingDirectory()
+TQString VerifyOptDlg::getWorkingDirectory()
{
return _workingDir;
}
void VerifyOptDlg::slotBrowse()
{
- QString tmp;
+ TQString tmp;
tmp = KFileDialog::getExistingDirectory( _entry->text() );
if ( tmp.length() ) {
_entry->setText( tmp );
diff --git a/kdat/VerifyOptDlg.h b/kdat/VerifyOptDlg.h
index f5023e4..67275a3 100644
--- a/kdat/VerifyOptDlg.h
+++ b/kdat/VerifyOptDlg.h
@@ -19,8 +19,8 @@
#ifndef _VerifyOptDlg_h_
#define _VerifyOptDlg_h_
-#include <qdialog.h>
-#include <qstring.h>
+#include <tqdialog.h>
+#include <tqstring.h>
class QLineEdit;
@@ -30,11 +30,11 @@ class QLineEdit;
* The verify and restore operations are similiar enough that their options
* have been combined into a single dialog.
*/
-class VerifyOptDlg : public QDialog {
+class VerifyOptDlg : public TQDialog {
Q_OBJECT
bool _restore;
- QString _workingDir;
- QLineEdit* _entry;
+ TQString _workingDir;
+ TQLineEdit* _entry;
private slots:
void okClicked();
void slotBrowse();
@@ -48,7 +48,7 @@ public:
* @param parent The parent widget for the dialog.
* @param name The name for the dialog.
*/
- VerifyOptDlg( const QString & def, const QStringList& files, bool restore = FALSE, QWidget* parent = 0, const char* name = 0 );
+ VerifyOptDlg( const TQString & def, const TQStringList& files, bool restore = FALSE, TQWidget* parent = 0, const char* name = 0 );
/**
* Destroy the verify/restore options dialog.
@@ -60,7 +60,7 @@ public:
*
* @return The working directory for the verify/restore operation.
*/
- QString getWorkingDirectory();
+ TQString getWorkingDirectory();
};
#endif
diff --git a/kdat/ktreeview.cpp b/kdat/ktreeview.cpp
index 334a834..90d445e 100644
--- a/kdat/ktreeview.cpp
+++ b/kdat/ktreeview.cpp
@@ -24,11 +24,11 @@
#include <ktreeview.h>
#include "ktreeview.moc"
-#include <qapplication.h> /* used for QApplication::closingDown() */
-#include <qkeycode.h> /* used for keyboard interface */
-#include <qpainter.h> /* used to paint items */
-#include <qscrollbar.h>
-#include <qstyle.h>
+#include <tqapplication.h> /* used for TQApplication::closingDown() */
+#include <tqkeycode.h> /* used for keyboard interface */
+#include <tqpainter.h> /* used to paint items */
+#include <tqscrollbar.h>
+#include <tqstyle.h>
#include <assert.h>
/*
@@ -40,7 +40,7 @@
*/
// constructor
-KTreeViewItem::KTreeViewItem(const QString& theText) :
+KTreeViewItem::KTreeViewItem(const TQString& theText) :
owner(0),
numChildren(0),
doExpandButton(true),
@@ -57,8 +57,8 @@ KTreeViewItem::KTreeViewItem(const QString& theText) :
}
// constructor that takes a pixmap
-KTreeViewItem::KTreeViewItem(const QString& theText,
- const QPixmap& thePixmap) :
+KTreeViewItem::KTreeViewItem(const TQString& theText,
+ const TQPixmap& thePixmap) :
owner(0),
numChildren(0),
doExpandButton(true),
@@ -110,14 +110,14 @@ void KTreeViewItem::appendChild(KTreeViewItem* newChild)
// returns the bounding rectangle of the item content (not including indent
// and branches) for hit testing
-QRect KTreeViewItem::boundingRect(int indent) const
+TQRect KTreeViewItem::boundingRect(int indent) const
{
- const QFontMetrics& fm = owner->fontMetrics();
+ const TQFontMetrics& fm = owner->fontMetrics();
int rectX = indent;
int rectY = 1;
int rectW = width(indent, fm) - rectX;
int rectH = height(fm) - 2;
- return QRect(rectX, rectY, rectW, rectH);
+ return TQRect(rectX, rectY, rectW, rectH);
}
// returns the child item at the specified index
@@ -153,12 +153,12 @@ int KTreeViewItem::childIndex(KTreeViewItem* searched) const
}
// indicates whether mouse press is in expand button
-inline bool KTreeViewItem::expandButtonClicked(const QPoint& coord) const
+inline bool KTreeViewItem::expandButtonClicked(const TQPoint& coord) const
{
return expandButton.contains(coord);
}
-bool KTreeViewItem::mousePressEvent( const QPoint& )
+bool KTreeViewItem::mousePressEvent( const TQPoint& )
{
return FALSE;
}
@@ -176,7 +176,7 @@ KTreeViewItem* KTreeViewItem::getParent() const
}
// returns reference to the item pixmap
-const QPixmap& KTreeViewItem::getPixmap() const
+const TQPixmap& KTreeViewItem::getPixmap() const
{
return pixmap;
}
@@ -188,7 +188,7 @@ KTreeViewItem* KTreeViewItem::getSibling() const
}
// returns a pointer to the item text
-const QString& KTreeViewItem::getText() const
+const TQString& KTreeViewItem::getText() const
{
return text;
}
@@ -219,7 +219,7 @@ int KTreeViewItem::height() const
// returns the maximum height of text and pixmap including margins
// or -1 if item is empty -- SHOULD NEVER BE -1!
-int KTreeViewItem::height(const QFontMetrics& fm) const
+int KTreeViewItem::height(const TQFontMetrics& fm) const
{
int maxHeight = pixmap.height();
int textHeight = fm.ascent() + fm.leading();
@@ -277,7 +277,7 @@ bool KTreeViewItem::isVisible() const
}
// paint this item, including tree branches and expand button
-void KTreeViewItem::paint(QPainter* p, int indent, const QColorGroup& cg,
+void KTreeViewItem::paint(TQPainter* p, int indent, const TQColorGroup& cg,
bool highlighted) const
{
assert(getParent() != 0); /* can't paint root item */
@@ -312,7 +312,7 @@ void KTreeViewItem::paint(QPainter* p, int indent, const QColorGroup& cg,
p->restore();
}
-void KTreeViewItem::paintExpandButton(QPainter* p, int indent, int cellHeight) const
+void KTreeViewItem::paintExpandButton(TQPainter* p, int indent, int cellHeight) const
{
int parentLeaderX = indent - (22 / 2);
int cellCenterY = cellHeight / 2;
@@ -333,22 +333,22 @@ void KTreeViewItem::paintExpandButton(QPainter* p, int indent, int cellHeight) c
}
// paint the highlight
-void KTreeViewItem::paintHighlight(QPainter* p, int indent, const QColorGroup& colorGroup,
+void KTreeViewItem::paintHighlight(TQPainter* p, int indent, const TQColorGroup& colorGroup,
bool hasFocus, Qt::GUIStyle style) const
{
- QColor fc;
+ TQColor fc;
if (style == Qt::WindowsStyle)
fc = Qt::darkBlue; /* hardcoded in Qt */
else
fc = colorGroup.text();
- QRect textRect = textBoundingRect(indent);
+ TQRect textRect = textBoundingRect(indent);
int t,l,b,r;
textRect.coords(&l, &t, &r, &b);
p->fillRect(textRect, fc); /* draw highlight background */
if (hasFocus) {
if(style == Qt::WindowsStyle) { /* draw Windows style highlight */
textRect.setCoords(l - 1, t - 1, r + 1, b + 1);
- p->setPen(QPen(Qt::yellow, 0, Qt::DotLine));
+ p->setPen(TQPen(Qt::yellow, 0, Qt::DotLine));
p->setBackgroundColor(fc);
p->setBackgroundMode(Qt::OpaqueMode);
p->drawRect(textRect);
@@ -364,15 +364,15 @@ void KTreeViewItem::paintHighlight(QPainter* p, int indent, const QColorGroup& c
}
// draw the text, highlighted if requested
-void KTreeViewItem::paintText(QPainter* p, int indent, int cellHeight,
- const QColorGroup& cg, bool highlighted) const
+void KTreeViewItem::paintText(TQPainter* p, int indent, int cellHeight,
+ const TQColorGroup& cg, bool highlighted) const
{
int textX = indent + pixmap.width() + 4;
int textY = cellHeight - ((cellHeight - p->fontMetrics().ascent() -
p->fontMetrics().leading()) / 2);
if (highlighted) {
paintHighlight(p, indent, cg, owner->hasFocus(),
- (Qt::GUIStyle)owner->style().styleHint(QStyle::SH_GUIStyle)); // Qt3 doesn't make this easy ;)
+ (Qt::GUIStyle)owner->style().styleHint(TQStyle::SH_GUIStyle)); // Qt3 doesn't make this easy ;)
p->setPen(cg.base());
p->setBackgroundColor(cg.text());
}
@@ -384,7 +384,7 @@ void KTreeViewItem::paintText(QPainter* p, int indent, int cellHeight,
}
// paint the tree structure
-void KTreeViewItem::paintTree(QPainter* p, int indent, int cellHeight) const
+void KTreeViewItem::paintTree(TQPainter* p, int indent, int cellHeight) const
{
int parentLeaderX = indent - (22 / 2);
int cellCenterY = cellHeight / 2;
@@ -504,7 +504,7 @@ void KTreeViewItem::setExpanded(bool is)
}
// sets the item pixmap to the given pixmap
-void KTreeViewItem::setPixmap(const QPixmap& pm)
+void KTreeViewItem::setPixmap(const TQPixmap& pm)
{
pixmap = pm;
if ( owner ) {
@@ -514,7 +514,7 @@ void KTreeViewItem::setPixmap(const QPixmap& pm)
}
// sets the item text to the given string
-void KTreeViewItem::setText(const QString& t)
+void KTreeViewItem::setText(const TQString& t)
{
text = t;
if ( owner ) {
@@ -536,17 +536,17 @@ void KTreeViewItem::synchNumChildren()
/*
* returns the bounding rect of the item text in cell coordinates couldn't
- * get QFontMetrics::boundingRect() to work right so I made my own
+ * get TQFontMetrics::boundingRect() to work right so I made my own
*/
-QRect KTreeViewItem::textBoundingRect(int indent) const
+TQRect KTreeViewItem::textBoundingRect(int indent) const
{
- const QFontMetrics& fm = owner->fontMetrics();
+ const TQFontMetrics& fm = owner->fontMetrics();
int cellHeight = height(fm);
int rectX = indent + pixmap.width() + 3;
int rectY = (cellHeight - fm.ascent() - fm.leading()) / 2 + 2;
int rectW = fm.width(text) + 1;
int rectH = fm.ascent() + fm.leading();
- return QRect(rectX, rectY, rectW, rectH);
+ return TQRect(rectX, rectY, rectW, rectH);
}
// returns the total width of text and pixmap, including margins, spacing
@@ -556,7 +556,7 @@ int KTreeViewItem::width(int indent) const
return width(indent, owner->fontMetrics());
}
-int KTreeViewItem::width(int indent, const QFontMetrics& fm) const
+int KTreeViewItem::width(int indent, const TQFontMetrics& fm) const
{
int maxWidth = pixmap.width();
maxWidth += (4 + fm.width(text));
@@ -573,10 +573,10 @@ int KTreeViewItem::width(int indent, const QFontMetrics& fm) const
*/
// constructor
-KTreeView::KTreeView(QWidget *parent,
+KTreeView::KTreeView(TQWidget *parent,
const char *name,
WFlags f) :
- QGridView(parent, name, f),
+ TQGridView(parent, name, f),
clearing(false),
current(-1),
drawExpandButton(true),
@@ -598,11 +598,11 @@ KTreeView::KTreeView(QWidget *parent,
//switch(style().guiStyle()) {
//case WindowsStyle:
//case MotifStyle:
- setFrameStyle(QFrame::WinPanel | QFrame::Sunken);
+ setFrameStyle(TQFrame::WinPanel | TQFrame::Sunken);
setBackgroundColor(colorGroup().base());
//break;
/*default:
- setFrameStyle(QFrame::Panel | QFrame::Plain);
+ setFrameStyle(TQFrame::Panel | TQFrame::Plain);
setLineWidth(1);
}*/
// setAcceptFocus(true);
@@ -628,7 +628,7 @@ KTreeView::~KTreeView()
// appends a child to the item at the given index with the given text
// and pixmap
-void KTreeView::appendChildItem(const QString & theText, const QPixmap& thePixmap,
+void KTreeView::appendChildItem(const TQString & theText, const TQPixmap& thePixmap,
int index)
{
KTreeViewItem* item = new KTreeViewItem(theText, thePixmap);
@@ -638,7 +638,7 @@ void KTreeView::appendChildItem(const QString & theText, const QPixmap& thePixma
// appends a child to the item at the end of the given path with
// the given text and pixmap
-void KTreeView::appendChildItem(const QString & theText, const QPixmap& thePixmap,
+void KTreeView::appendChildItem(const TQString & theText, const TQPixmap& thePixmap,
const KPath& thePath)
{
KTreeViewItem* item = new KTreeViewItem(theText, thePixmap);
@@ -692,8 +692,8 @@ bool KTreeView::bottomScrollBar() const
}
// find item at specified index and change pixmap and/or text
-void KTreeView::changeItem(const QString & newText,
- const QPixmap *newPixmap,
+void KTreeView::changeItem(const TQString & newText,
+ const TQPixmap *newPixmap,
int index)
{
KTreeViewItem *item = itemAt(index);
@@ -702,8 +702,8 @@ void KTreeView::changeItem(const QString & newText,
}
// find item at end of specified path, and change pixmap and/or text
-void KTreeView::changeItem(const QString & newText,
- const QPixmap* newPixmap,
+void KTreeView::changeItem(const TQString & newText,
+ const TQPixmap* newPixmap,
const KPath& thePath)
{
KTreeViewItem* item = itemAt(thePath);
@@ -723,7 +723,7 @@ void KTreeView::clear()
bool autoU = autoUpdate();
setAutoUpdate(FALSE);
- QPtrStack<KTreeViewItem> stack;
+ TQPtrStack<KTreeViewItem> stack;
stack.push(treeRoot);
while(!stack.isEmpty()) {
KTreeViewItem *item = stack.pop();
@@ -741,7 +741,7 @@ void KTreeView::clear()
}
}
clearing = FALSE;
- if(goingDown || QApplication::closingDown())
+ if(goingDown || TQApplication::closingDown())
return;
if(autoU && isVisible())
repaint();
@@ -875,7 +875,7 @@ int KTreeView::indentSpacing()
// or after the item at the given index, depending on the value
// of prefix
// if index is negative, appends item to tree at root level
-bool KTreeView::insertItem(const QString & theText, const QPixmap& thePixmap,
+bool KTreeView::insertItem(const TQString & theText, const TQPixmap& thePixmap,
int row, bool prefix)
{
KTreeViewItem* refItem = itemAt(row);
@@ -892,7 +892,7 @@ bool KTreeView::insertItem(const QString & theText, const QPixmap& thePixmap,
// inserts a new item with the specified text and pixmap before
// or after the item at the end of the given path, depending on the value
// of prefix
-bool KTreeView::insertItem(const QString & theText, const QPixmap& thePixmap,
+bool KTreeView::insertItem(const TQString & theText, const TQPixmap& thePixmap,
const KPath& path, bool prefix)
{
KTreeViewItem* refItem = itemAt(path);
@@ -1269,7 +1269,7 @@ void KTreeView::appendChildItem(KTreeViewItem* theParent,
// changes the given item with the new text and/or pixmap
void KTreeView::changeItem(KTreeViewItem* toChange, int itemRow,
- const QString & newText, const QPixmap* newPixmap)
+ const TQString & newText, const TQPixmap* newPixmap)
{
int indent = indentation(toChange);
int oldWidth = toChange->width(indent);
@@ -1388,10 +1388,10 @@ void KTreeView::fixChildren(KTreeViewItem *parentItem)
}
}
-// handles QFocusEvent processing by setting current item to top
+// handles TQFocusEvent processing by setting current item to top
// row if there is no current item, and updates cell to add or
// delete the focus rectangle on the highlight bar
-void KTreeView::focusInEvent(QFocusEvent *)
+void KTreeView::focusInEvent(TQFocusEvent *)
{
if(current < 0 && numRows() > 0)
setCurrentItem(rowAt(contentsY()));
@@ -1406,7 +1406,7 @@ void KTreeView::forEveryItem(KForEveryM func,
void *user)
{
KTreeViewItem *item = treeRoot->getChild();
- QPtrStack<KTreeViewItem> stack;
+ TQPtrStack<KTreeViewItem> stack;
while(item) {
stack.push(item);
while(!stack.isEmpty()) {
@@ -1432,7 +1432,7 @@ void KTreeView::forEveryItem(KForEveryM func,
void KTreeView::forEveryVisibleItem(KForEveryM func,
void *user)
{
- QPtrStack<KTreeViewItem> stack;
+ TQPtrStack<KTreeViewItem> stack;
KTreeViewItem *item = treeRoot->getChild();
do {
while(item) {
@@ -1528,7 +1528,7 @@ void KTreeView::itemPath(KTreeViewItem* item, KPath& path) const
assert(item->owner == this);
if (item != treeRoot) {
itemPath(item->getParent(), path);
- path.push(new QString(item->getText()));
+ path.push(new TQString(item->getText()));
}
}
@@ -1551,7 +1551,7 @@ void KTreeView::join(KTreeViewItem *item)
}
// handles keyboard interface to tree list
-void KTreeView::keyPressEvent(QKeyEvent *e)
+void KTreeView::keyPressEvent(TQKeyEvent *e)
{
if(numRows() == 0)
@@ -1658,11 +1658,11 @@ void KTreeView::lowerItem(KTreeViewItem *item)
// handle mouse double click events by selecting the clicked item
// and emitting the signal
-void KTreeView::mouseDoubleClickEvent(QMouseEvent *e)
+void KTreeView::mouseDoubleClickEvent(TQMouseEvent *e)
{
// find out which row has been clicked
- QPoint mouseCoord = viewportToContents(e->pos());
+ TQPoint mouseCoord = viewportToContents(e->pos());
int itemClicked = rowAt(mouseCoord.y());
// if a valid row was not clicked, do nothing
@@ -1677,7 +1677,7 @@ void KTreeView::mouseDoubleClickEvent(QMouseEvent *e)
int cellY = cellHeight()*itemClicked;
int cellX = 0;
- QPoint cellCoord(mouseCoord.x() - cellX, mouseCoord.y() - cellY);
+ TQPoint cellCoord(mouseCoord.x() - cellX, mouseCoord.y() - cellY);
// hit test item
int indent = indentation(item);
@@ -1686,7 +1686,7 @@ void KTreeView::mouseDoubleClickEvent(QMouseEvent *e)
}
// handle mouse movement events
-void KTreeView::mouseMoveEvent(QMouseEvent *e)
+void KTreeView::mouseMoveEvent(TQMouseEvent *e)
{
// in rubberband_mode we actually scroll the window now
if (rubberband_mode)
@@ -1697,7 +1697,7 @@ void KTreeView::mouseMoveEvent(QMouseEvent *e)
// handle single mouse presses
-void KTreeView::mousePressEvent(QMouseEvent *e)
+void KTreeView::mousePressEvent(TQMouseEvent *e)
{
// first: check which button was pressed
@@ -1720,7 +1720,7 @@ void KTreeView::mousePressEvent(QMouseEvent *e)
}
// find out which row has been clicked
- QPoint mouseCoord = viewportToContents(e->pos());
+ TQPoint mouseCoord = viewportToContents(e->pos());
int itemClicked = rowAt(mouseCoord.y());
// nothing to do if not on valid row
@@ -1734,7 +1734,7 @@ void KTreeView::mousePressEvent(QMouseEvent *e)
// translate mouse coord to cell coord
int cellX = 0;
int cellY = cellHeight()*itemClicked;
- QPoint cellCoord(mouseCoord.x() - cellX, mouseCoord.y() - cellY);
+ TQPoint cellCoord(mouseCoord.x() - cellX, mouseCoord.y() - cellY);
/* hit expand button (doesn't set currentItem) */
if(item->expandButtonClicked(cellCoord)) {
@@ -1752,13 +1752,13 @@ void KTreeView::mousePressEvent(QMouseEvent *e)
else if (item->boundingRect(indentation(item)).contains(cellCoord)) {
setCurrentItem(itemClicked); // highlight item
if ( e->button() == RightButton ) {
- emit popupMenu( itemClicked, mapToGlobal( QPoint( e->pos().x(), e->pos().y() ) ) );
+ emit popupMenu( itemClicked, mapToGlobal( TQPoint( e->pos().x(), e->pos().y() ) ) );
}
}
}
// handle mouse release events
-void KTreeView::mouseReleaseEvent(QMouseEvent *e)
+void KTreeView::mouseReleaseEvent(TQMouseEvent *e)
{
/* if it's the MMB end rubberbanding */
if (rubberband_mode && e->button()==MidButton)
@@ -1779,7 +1779,7 @@ void KTreeView::draw_rubberband()
*/
if (!rubberband_mode) return;
- QPainter paint(this);
+ TQPainter paint(this);
paint.setPen(white);
paint.setRasterOp(XorROP);
paint.drawRect(xOffset()*viewWidth()/totalWidth(),
@@ -1790,7 +1790,7 @@ void KTreeView::draw_rubberband()
}
// rubberband move: start move
-void KTreeView::start_rubberband(const QPoint& where)
+void KTreeView::start_rubberband(const TQPoint& where)
{
#if 0
if (rubberband_mode) { // Oops!
@@ -1826,13 +1826,13 @@ void KTreeView::end_rubberband()
}
// rubberband move: handle mouse moves
-void KTreeView::move_rubberband(const QPoint& where)
+void KTreeView::move_rubberband(const TQPoint& where)
{
#if 0
if (!rubberband_mode) return;
// look how much the mouse moved and calc the new scroll position
- QPoint delta = where - rubber_startMouse;
+ TQPoint delta = where - rubber_startMouse;
int nx = rubber_startX + delta.x() * totalWidth() / viewWidth();
int ny = rubber_startY + delta.y() * totalHeight() / viewHeight();
@@ -1852,14 +1852,14 @@ void KTreeView::move_rubberband(const QPoint& where)
// paints the cell at the specified row and col
// col is ignored for now since there is only one
-void KTreeView::paintCell(QPainter* p, int row, int)
+void KTreeView::paintCell(TQPainter* p, int row, int)
{
KTreeViewItem* item = itemAt(row);
if (item == 0)
return;
- p->setClipRect(cellRect(), QPainter::CoordPainter );
- QColorGroup cg = colorGroup();
+ p->setClipRect(cellRect(), TQPainter::CoordPainter );
+ TQColorGroup cg = colorGroup();
int indent = indentation(item);
item->paint(p, indent, cg,
current == row); /* highlighted */
@@ -1889,7 +1889,7 @@ KTreeViewItem* KTreeView::recursiveFind(KPath& path)
return treeRoot;
// get the next key
- QString* searchString = path.pop();
+ TQString* searchString = path.pop();
// find the parent item
KTreeViewItem* parent = recursiveFind(path);
diff --git a/kdat/ktreeview.h b/kdat/ktreeview.h
index ad1fe6b..5c6b52b 100644
--- a/kdat/ktreeview.h
+++ b/kdat/ktreeview.h
@@ -23,13 +23,13 @@
#ifndef KDE_KTREE_VIEW_H
#define KDE_KTREE_VIEW_H
-#include <qpixmap.h> /* used in items */
-#include <qptrstack.h> /* used to specify tree paths */
-#include <qstring.h> /* used in items */
-#include <qgridview.h> /* base class for widget */
+#include <tqpixmap.h> /* used in items */
+#include <tqptrstack.h> /* used to specify tree paths */
+#include <tqstring.h> /* used in items */
+#include <tqgridview.h> /* base class for widget */
// use stack of strings to represent path information
-typedef QPtrStack<QString> KPath;
+typedef TQPtrStack<TQString> KPath;
class KTreeView; /* forward declaration */
@@ -50,8 +50,8 @@ public:
* KTreeView::appendChildItem and KTreeView::insertChildItem that do
* not take a KTreeViewItem set the delete-children flag to true.)
*/
- KTreeViewItem(const QString& theText = QString()); // text can not be null when added to the list!
- KTreeViewItem(const QString& theText, const QPixmap& thePixmap);
+ 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 children if this item has been marked
@@ -86,12 +86,12 @@ public:
/**
* Determines whether the specified point is inside the expand button.
*/
- bool expandButtonClicked(const QPoint& coord) const;
+ bool expandButtonClicked(const TQPoint& coord) const;
/**
* Give the item a chance to process the mouse event.
*/
- virtual bool mousePressEvent( const QPoint& coord );
+ virtual bool mousePressEvent( const TQPoint& coord );
/**
* Returns a pointer to the first child item in this item's sub tree, or
@@ -107,9 +107,9 @@ public:
/**
* Returns a reference to this item's pixmap. If there is no pixmap
* associated with this item, it will return a reference to a valid,
- * null QPixmap.
+ * null TQPixmap.
*/
- const QPixmap& getPixmap() const;
+ const TQPixmap& getPixmap() const;
/**
* Returns a pointer to the next item in the same branch below this
@@ -120,7 +120,7 @@ public:
/**
* Returns this item's text.
*/
- const QString& getText() const;
+ const TQString& getText() const;
/**
* Indicates whether this item has any children.
@@ -197,19 +197,19 @@ public:
* Sets the item pixmap to the given pixmap. It does not redraw the
* item or update the owning KTreeView.
*/
- void setPixmap(const QPixmap& pm);
+ void setPixmap(const TQPixmap& pm);
/**
* Sets the item text. This function does not redraw the item or update
* the owning KTreeView.
*/
- void setText(const QString& t);
+ void setText(const TQString& t);
protected:
/**
* Returns the bounding rectangle of the item.
*/
- virtual QRect boundingRect(int indent) const;
+ virtual TQRect boundingRect(int indent) const;
/**
* Returns the hieght of the item. The default implementation uses font
@@ -221,36 +221,36 @@ protected:
* Returns the height of the item depending on the passed-in font
* metrics.
*/
- virtual int height(const QFontMetrics& fm) const;
+ virtual int height(const TQFontMetrics& fm) const;
/**
* Paints the item: pixmap, text, expand button, parent branches
*/
- virtual void paint(QPainter* p, int indent,
- const QColorGroup& cg, bool highlighted) const;
+ virtual void paint(TQPainter* p, int indent,
+ const TQColorGroup& cg, bool highlighted) const;
/**
* paints the expand button
*/
- virtual void paintExpandButton(QPainter* p, int indent, int cellHeight) const;
+ virtual void paintExpandButton(TQPainter* p, int indent, int cellHeight) const;
/**
* paints the highlighted text
*/
- virtual void paintHighlight(QPainter* p, int indent,
- const QColorGroup& cg, bool hasFocus,
+ virtual void paintHighlight(TQPainter* p, int indent,
+ const TQColorGroup& cg, bool hasFocus,
Qt::GUIStyle style) const;
/**
* paints the item's text
*/
- virtual void paintText(QPainter* p, int indent, int cellHeight,
- const QColorGroup& cg, bool highlighted) const;
+ virtual void paintText(TQPainter* p, int indent, int cellHeight,
+ const TQColorGroup& cg, bool highlighted) const;
/**
* paints the item's tree part.
*/
- virtual void paintTree(QPainter* p, int indent, int cellHeight) const;
+ virtual void paintTree(TQPainter* p, int indent, int cellHeight) const;
/**
* Internal function that counts the number of child items.
@@ -260,7 +260,7 @@ protected:
/**
* Returns the bounding rectangle of the text.
*/
- virtual QRect textBoundingRect(int indent) const;
+ virtual TQRect textBoundingRect(int indent) const;
/**
* Returns the width of the item taking into account the specified
@@ -273,7 +273,7 @@ protected:
* Returns the width of the item depending on the passed-in font
* metrics and taking into account the specified indentation.
*/
- virtual int width(int indent, const QFontMetrics& fm) const;
+ virtual int width(int indent, const TQFontMetrics& fm) const;
protected:
/** The KTreeView that this item belongs to */
@@ -284,12 +284,12 @@ protected:
bool delayedExpanding;
bool doTree;
bool doText;
- mutable QRect expandButton; /* is set in paint() */
+ mutable TQRect expandButton; /* is set in paint() */
KTreeViewItem* child;
KTreeViewItem* parent;
KTreeViewItem* sibling;
- QPixmap pixmap;
- QString text;
+ TQPixmap pixmap;
+ TQString text;
bool deleteChildren;
};
@@ -406,7 +406,7 @@ public:
* current item to -1, and sets default values for scroll bars (both
* auto).
*/
- KTreeView(QWidget* parent = 0, const char* name = 0, WFlags f = 0);
+ KTreeView(TQWidget* parent = 0, const char* name = 0, WFlags f = 0);
/*
* Desctructor. Deletes all items from the topmost level that have been
@@ -420,13 +420,13 @@ public:
* children. A KTreeViewItem is created for which the delete-children
* flag is set to true.
*/
- void appendChildItem(const QString & theText, const QPixmap& thePixmap,
+ void appendChildItem(const TQString & theText, const TQPixmap& thePixmap,
int index);
/**
* Same as above except that the parent item is specified by a path.
*/
- void appendChildItem(const QString & theText, const QPixmap& thePixmap,
+ void appendChildItem(const TQString & theText, const TQPixmap& thePixmap,
const KPath& thePath);
/**
@@ -473,16 +473,16 @@ public:
enabled. If changing only the text or pixmap, set the other parameter
to 0.
*/
- void changeItem(const QString & newText,
- const QPixmap *newPixmap,
+ void changeItem(const TQString & newText,
+ const TQPixmap *newPixmap,
int index);
/**
Same as above function, except item to change is specified by a path
through the tree.
*/
- void changeItem(const QString & newText,
- const QPixmap *newPixmap,
+ void changeItem(const TQString & newText,
+ const TQPixmap *newPixmap,
const KPath& thePath);
/**
@@ -570,7 +570,7 @@ public:
* delete-children flag is set to true. Returns true if the item has
* been successfully inserted in the tree, otherwise false.
*/
- bool insertItem(const QString & theText, const QPixmap& thePixmap,
+ bool insertItem(const TQString & theText, const TQPixmap& thePixmap,
int row = -1, bool prefix = true);
/**
@@ -578,7 +578,7 @@ public:
* insert position. If there is no item at the specified path, the item
* is simply appended to the tree at the topmost level.
*/
- bool insertItem(const QString & theText, const QPixmap& thePixmap,
+ bool insertItem(const TQString & theText, const TQPixmap& thePixmap,
const KPath& thePath, bool prefix = true);
/**
@@ -780,7 +780,7 @@ signals:
void highlighted(int index);
void selected(int index);
- void popupMenu( int index, const QPoint& );
+ void popupMenu( int index, const TQPoint& );
protected:
/**
* Appends theChild to theParent as a new direct child. All internal
@@ -790,8 +790,8 @@ protected:
void appendChildItem(KTreeViewItem* theParent,
KTreeViewItem* theChild);
void changeItem(KTreeViewItem* toChange,
- int itemRow, const QString & newText,
- const QPixmap* newPixmap);
+ int itemRow, const TQString & newText,
+ const TQPixmap* newPixmap);
/**
* Collapses the specified subtree and updates the display. subRoot
* need not be visible.
@@ -807,7 +807,7 @@ protected:
*/
void expandSubTree(KTreeViewItem* subRoot);
void fixChildren(KTreeViewItem *parentItem);
- virtual void focusInEvent(QFocusEvent *e);
+ virtual void focusInEvent(TQFocusEvent *e);
void forEveryItem(KForEveryM func,
void *user);
void forEveryVisibleItem(KForEveryM func,
@@ -839,16 +839,16 @@ protected:
void itemPath(KTreeViewItem* item, KPath& path) const;
void join(KTreeViewItem *item);
- virtual void keyPressEvent(QKeyEvent *e);
+ virtual void keyPressEvent(TQKeyEvent *e);
int level(KTreeViewItem* item) const;
void lowerItem(KTreeViewItem *item);
- virtual void mouseDoubleClickEvent(QMouseEvent *e);
- virtual void mouseMoveEvent(QMouseEvent *e);
- virtual void mousePressEvent(QMouseEvent *e);
- virtual void mouseReleaseEvent(QMouseEvent *e);
- virtual void paintCell(QPainter *p, int row, int col);
+ virtual void mouseDoubleClickEvent(TQMouseEvent *e);
+ virtual void mouseMoveEvent(TQMouseEvent *e);
+ virtual void mousePressEvent(TQMouseEvent *e);
+ virtual void mouseReleaseEvent(TQMouseEvent *e);
+ virtual void paintCell(TQPainter *p, int row, int col);
/*
- * virtual void paintItem(QPainter *p, KTreeViewItem *item,
+ * virtual void paintItem(TQPainter *p, KTreeViewItem *item,
* bool highlighted);
*/
void raiseItem(KTreeViewItem* item);
@@ -887,13 +887,13 @@ protected:
// Rainer Bawidamann: move window in "rubberband" mode
bool rubberband_mode; // true if in "rubberband_mode"
- QPoint rubber_startMouse; // where the user pressed the MMB
+ TQPoint rubber_startMouse; // where the user pressed the MMB
int rubber_height, rubber_width, // the size if the rubberband rect
rubber_startX, rubber_startY; // the x/yOffset() when the MMB was pressed
void draw_rubberband();
- void start_rubberband(const QPoint& where);
+ void start_rubberband(const TQPoint& where);
void end_rubberband();
- void move_rubberband(const QPoint& where);
+ void move_rubberband(const TQPoint& where);
};
#endif // KDE_KTREE_VIEW_H
diff --git a/kdat/main.cpp b/kdat/main.cpp
index 0d17ce8..6f988b2 100644
--- a/kdat/main.cpp
+++ b/kdat/main.cpp
@@ -22,8 +22,8 @@
#include <unistd.h>
#include <stdlib.h>
-#include <qfile.h>
-#include <qdir.h>
+#include <tqfile.h>
+#include <tqdir.h>
#include <kapplication.h>
#include <klocale.h>