summaryrefslogtreecommitdiffstats
path: root/kdat
diff options
context:
space:
mode:
Diffstat (limited to 'kdat')
-rw-r--r--kdat/Archive.cpp38
-rw-r--r--kdat/Archive.h16
-rw-r--r--kdat/ArchiveInfoWidget.cpp24
-rw-r--r--kdat/ArchiveInfoWidget.h3
-rw-r--r--kdat/BackupDlg.cpp42
-rw-r--r--kdat/BackupDlg.h7
-rw-r--r--kdat/BackupOptDlg.cpp8
-rw-r--r--kdat/BackupOptDlg.h3
-rw-r--r--kdat/BackupProfileInfoWidget.cpp16
-rw-r--r--kdat/BackupProfileInfoWidget.h3
-rw-r--r--kdat/BackupProfileManager.h1
-rw-r--r--kdat/BackupProfileWidget.cpp26
-rw-r--r--kdat/BackupProfileWidget.h5
-rw-r--r--kdat/File.cpp28
-rw-r--r--kdat/File.h28
-rw-r--r--kdat/FileInfoWidget.cpp48
-rw-r--r--kdat/FileInfoWidget.h5
-rw-r--r--kdat/FormatOptDlg.cpp22
-rw-r--r--kdat/FormatOptDlg.h5
-rw-r--r--kdat/IndexDlg.cpp46
-rw-r--r--kdat/IndexDlg.h7
-rw-r--r--kdat/InfoShellWidget.cpp9
-rw-r--r--kdat/InfoShellWidget.h9
-rw-r--r--kdat/KDat.kdoc10
-rw-r--r--kdat/KDatMainWindow.cpp112
-rw-r--r--kdat/KDatMainWindow.h1
-rw-r--r--kdat/LoggerWidget.cpp8
-rw-r--r--kdat/LoggerWidget.h5
-rw-r--r--kdat/Node.cpp136
-rw-r--r--kdat/Node.h19
-rw-r--r--kdat/Options.h1
-rw-r--r--kdat/OptionsDlg.cpp4
-rw-r--r--kdat/OptionsDlg.h5
-rw-r--r--kdat/OptionsDlgWidget.ui52
-rw-r--r--kdat/OptionsDlgWidget.ui.h2
-rw-r--r--kdat/RELEASE_NOTES2
-rw-r--r--kdat/Tape.cpp44
-rw-r--r--kdat/Tape.h4
-rw-r--r--kdat/TapeDrive.cpp34
-rw-r--r--kdat/TapeDrive.h3
-rw-r--r--kdat/TapeFileInfoWidget.cpp34
-rw-r--r--kdat/TapeFileInfoWidget.h5
-rw-r--r--kdat/TapeInfoWidget.cpp60
-rw-r--r--kdat/TapeInfoWidget.h3
-rw-r--r--kdat/TapeManager.h1
-rw-r--r--kdat/TarParser.h1
-rw-r--r--kdat/Util.cpp4
-rw-r--r--kdat/VerifyDlg.cpp46
-rw-r--r--kdat/VerifyDlg.h7
-rw-r--r--kdat/VerifyOptDlg.cpp16
-rw-r--r--kdat/VerifyOptDlg.h5
-rw-r--r--kdat/ktreeview.cpp284
-rw-r--r--kdat/ktreeview.h73
53 files changed, 703 insertions, 677 deletions
diff --git a/kdat/Archive.cpp b/kdat/Archive.cpp
index 5e8ef65..1a78d44 100644
--- a/kdat/Archive.cpp
+++ b/kdat/Archive.cpp
@@ -94,7 +94,7 @@ void Archive::read( int version )
}
}
- // Number of immediate children (4 bytes).
+ // Number of immediate tqchildren (4 bytes).
fread( &ival, sizeof( ival ), 1, _fptr );
//===== Read files =====
@@ -148,7 +148,7 @@ void Archive::write( FILE* fptr )
fwrite( &ival, sizeof( ival ), 1, _fptr );
}
- // Number of immediate children (4 bytes).
+ // Number of immediate tqchildren (4 bytes).
ival = getChildren().count();
fwrite( &ival, sizeof( ival ), 1, _fptr );
@@ -202,7 +202,7 @@ const TQPtrList<File>& Archive::getChildren()
{
read();
- return _children;
+ return _tqchildren;
}
const TQPtrList<Range>& Archive::getRanges()
@@ -255,7 +255,7 @@ void Archive::addChild( File* file )
{
read();
- _children.append( file );
+ _tqchildren.append( file );
}
File* Archive::addFile( int size, int mtime, int startRecord, int endRecord, const TQString & filename )
@@ -266,7 +266,7 @@ File* Archive::addFile( int size, int mtime, int startRecord, int endRecord, con
TQString fn( filename );
int idx = 0;
- while ( ( idx = fn.find( '/' ) ) > -1 ) {
+ while ( ( idx = fn.tqfind( '/' ) ) > -1 ) {
path.append( fn.left( idx + 1 ) );
fn.remove( 0, idx + 1 );
}
@@ -289,40 +289,40 @@ File* Archive::addFile( int size, int mtime, int startRecord, int endRecord, con
//path.remove(path.first());
path.remove(path.begin());
TQPtrListIterator<File> i( getChildren() );
- File* parent = 0;
+ File* tqparent = 0;
for ( ; i.current() ; ++i ) {
if ( i.current()->getName() == dir ) {
- parent = i.current();
+ tqparent = i.current();
break;
}
}
- if ( parent == 0 ) {
- parent = new File( 0, 0, 0, startRecord, endRecord, dir );
- addChild( parent );
+ if ( tqparent == 0 ) {
+ tqparent = new File( 0, 0, 0, startRecord, endRecord, dir );
+ addChild( tqparent );
}
for ( TQStringList::Iterator j = path.begin();
j != path.end();
++j ) {
TQString dir = *j;
- File* pparent = parent;
- TQPtrListIterator<File> i( pparent->getChildren() );
- for ( parent = 0; i.current() ; ++i ) {
+ File* ptqparent = tqparent;
+ TQPtrListIterator<File> i( ptqparent->getChildren() );
+ for ( tqparent = 0; i.current() ; ++i ) {
if ( i.current()->getName() == dir ) {
- parent = i.current();
+ tqparent = i.current();
break;
}
}
- if ( parent == 0 ) {
- parent = new File( pparent, 0, 0, 0, 0, dir );
- pparent->addChild( parent );
+ if ( tqparent == 0 ) {
+ tqparent = new File( ptqparent, 0, 0, 0, 0, dir );
+ ptqparent->addChild( tqparent );
}
}
- file = new File( parent, size, mtime, startRecord, endRecord, fn );
- parent->addChild( file );
+ file = new File( tqparent, size, mtime, startRecord, endRecord, fn );
+ tqparent->addChild( file );
return file;
}
diff --git a/kdat/Archive.h b/kdat/Archive.h
index 9f42684..4f593ab 100644
--- a/kdat/Archive.h
+++ b/kdat/Archive.h
@@ -39,7 +39,7 @@ class Archive {
FILE* _fptr;
int _offset;
TQString _name;
- TQPtrList<File> _children;
+ TQPtrList<File> _tqchildren;
RangeList _ranges;
Tape* _tape;
public:
@@ -67,7 +67,7 @@ public:
Archive( Tape* tape, FILE* fptr, int offset );
/**
- * Destroy the archive entry and all of its children.
+ * Destroy the archive entry and all of its tqchildren.
*/
~Archive();
@@ -82,7 +82,7 @@ public:
/**
* Recursively read the instance data for this archive entry and all of its
- * children. This method is used when converting from an older index format.
+ * tqchildren. This method is used when converting from an older index format.
*
* @param version The version of the old tape index.
*/
@@ -90,7 +90,7 @@ public:
/**
* Write out the archive entry to the open file. Entries for each of its
- * children will also be written.
+ * tqchildren will also be written.
*/
void write( FILE* fptr );
@@ -125,12 +125,12 @@ public:
/**
* Get the list of top-level files in this archive.
*
- * @return A list of the immediate children of this archive.
+ * @return A list of the immediate tqchildren of this archive.
*/
const TQPtrList<File>& getChildren();
/**
- * Get the list of ranges of this file and all of its children.
+ * Get the list of ranges of this file and all of its tqchildren.
*
* @return A list of ranges.
*/
@@ -159,7 +159,7 @@ public:
/**
* Create a new file entry, and add it to the archive. Based on the
- * full path name of the file, an appropriate parent is found. The parent
+ * full path name of the file, an appropriate tqparent is found. The tqparent
* may be this archive or another file entry. File entries will be created
* on demand if some or all of the file's path does not yet exist in this
* archive.
@@ -176,7 +176,7 @@ public:
File* addFile( int size, int mtime, int startRecord, int endRecord, const TQString & filename );
/**
- * Recursively calculate the list of ranges for all of the archive's children.
+ * Recursively calculate the list of ranges for all of the archive's tqchildren.
*/
void calcRanges();
};
diff --git a/kdat/ArchiveInfoWidget.cpp b/kdat/ArchiveInfoWidget.cpp
index c3838d4..754b701 100644
--- a/kdat/ArchiveInfoWidget.cpp
+++ b/kdat/ArchiveInfoWidget.cpp
@@ -35,33 +35,33 @@
#include "ArchiveInfoWidget.moc"
-ArchiveInfoWidget::ArchiveInfoWidget( TQWidget* parent, const char* name )
- : TQWidget( parent, name ),
+ArchiveInfoWidget::ArchiveInfoWidget( TQWidget* tqparent, const char* name )
+ : TQWidget( tqparent, name ),
_archive( 0 )
{
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();
- if ( lbl3->sizeHint().width() > max ) max = lbl3->sizeHint().width();
+ int max = lbl1->tqsizeHint().width();
+ if ( lbl2->tqsizeHint().width() > max ) max = lbl2->tqsizeHint().width();
+ if ( lbl3->tqsizeHint().width() > max ) max = lbl3->tqsizeHint().width();
- lbl1->setFixedSize( max, lbl1->sizeHint().height() );
- lbl2->setFixedSize( max, lbl2->sizeHint().height() );
- lbl3->setFixedSize( max, lbl3->sizeHint().height() );
+ lbl1->setFixedSize( max, lbl1->tqsizeHint().height() );
+ lbl2->setFixedSize( max, lbl2->tqsizeHint().height() );
+ lbl3->setFixedSize( max, lbl3->tqsizeHint().height() );
_archiveName = new TQLineEdit( this );
- _archiveName->setFixedHeight( _archiveName->sizeHint().height() );
+ _archiveName->setFixedHeight( _archiveName->tqsizeHint().height() );
_ctime = new TQLabel( "???", this );
- _ctime->setFixedHeight( _ctime->sizeHint().height() );
+ _ctime->setFixedHeight( _ctime->tqsizeHint().height() );
_size = new TQLabel( "???", this );
- _size->setFixedHeight( _size->sizeHint().height() );
+ _size->setFixedHeight( _size->tqsizeHint().height() );
_apply = new KPushButton( KStdGuiItem::apply(), this );
- _apply->setFixedSize( 80, _apply->sizeHint().height() );
+ _apply->setFixedSize( 80, _apply->tqsizeHint().height() );
_apply->setEnabled( FALSE );
TQVBoxLayout* l1 = new TQVBoxLayout( this, 4, 4 );
diff --git a/kdat/ArchiveInfoWidget.h b/kdat/ArchiveInfoWidget.h
index 5e745b0..e9bc175 100644
--- a/kdat/ArchiveInfoWidget.h
+++ b/kdat/ArchiveInfoWidget.h
@@ -32,6 +32,7 @@ class Archive;
*/
class ArchiveInfoWidget : public TQWidget {
Q_OBJECT
+ TQ_OBJECT
Archive* _archive;
TQLineEdit* _archiveName;
TQLabel* _ctime;
@@ -44,7 +45,7 @@ public:
/**
* Create a new archive info widget.
*/
- ArchiveInfoWidget( TQWidget* parent = 0, const char* name = 0 );
+ ArchiveInfoWidget( TQWidget* tqparent = 0, const char* name = 0 );
/**
* Destroy the archive info widget.
diff --git a/kdat/BackupDlg.cpp b/kdat/BackupDlg.cpp
index 8a26d2a..1c66805 100644
--- a/kdat/BackupDlg.cpp
+++ b/kdat/BackupDlg.cpp
@@ -51,8 +51,8 @@
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 ),
+ TQWidget* tqparent, const char* name )
+ : TQDialog( tqparent, name, TRUE ),
_proc( NULL ),
_tarParser( NULL ),
_archiveName( archiveName ),
@@ -93,55 +93,55 @@ BackupDlg::BackupDlg( const TQString & archiveName, const TQString & workingDir,
f2->setFrameStyle( TQFrame::Panel | TQFrame::Sunken );
TQLabel* lbl1 = new TQLabel( i18n( "Elapsed time:" ), f1 );
- lbl1->setFixedSize( labelWidth, lbl1->sizeHint().height() );
+ lbl1->setFixedSize( labelWidth, lbl1->tqsizeHint().height() );
_elapsedTime = new TQLabel( i18n( "00:00:00" ), f1 );
- _elapsedTime->setFixedHeight( _elapsedTime->sizeHint().height() );
+ _elapsedTime->setFixedHeight( _elapsedTime->tqsizeHint().height() );
TQLabel* lbl2 = new TQLabel( i18n( "Time remaining:" ), f2 );
- lbl2->setFixedSize( labelWidth, lbl2->sizeHint().height() );
+ lbl2->setFixedSize( labelWidth, lbl2->tqsizeHint().height() );
_timeRemaining = new TQLabel( i18n( "00:00:00" ), f2 );
- _timeRemaining->setFixedHeight( _timeRemaining->sizeHint().height() );
+ _timeRemaining->setFixedHeight( _timeRemaining->tqsizeHint().height() );
TQLabel* lbl3 = new TQLabel( i18n( "Total KB:" ), f1 );
- lbl3->setFixedSize( labelWidth, lbl3->sizeHint().height() );
+ lbl3->setFixedSize( labelWidth, lbl3->tqsizeHint().height() );
TQLabel* totalKbytes = new TQLabel( Util::kbytesToString( archiveSize ), f1 );
- totalKbytes->setFixedHeight( totalKbytes->sizeHint().height() );
+ totalKbytes->setFixedHeight( totalKbytes->tqsizeHint().height() );
TQLabel* lbl4 = new TQLabel( i18n( "KB written:" ), f2 );
- lbl4->setFixedSize( labelWidth, lbl4->sizeHint().height() );
+ lbl4->setFixedSize( labelWidth, lbl4->tqsizeHint().height() );
_kbytesWritten = new TQLabel( i18n( "0KB" ), f2 );
- _kbytesWritten->setFixedHeight( _kbytesWritten->sizeHint().height() );
+ _kbytesWritten->setFixedHeight( _kbytesWritten->tqsizeHint().height() );
TQLabel* lbl5 = new TQLabel( i18n( "Transfer rate:" ), f1 );
- lbl5->setFixedSize( labelWidth, lbl5->sizeHint().height() );
+ lbl5->setFixedSize( labelWidth, lbl5->tqsizeHint().height() );
_transferRate = new TQLabel( i18n( "0KB/min" ), f1 );
- _transferRate->setFixedHeight( _transferRate->sizeHint().height() );
+ _transferRate->setFixedHeight( _transferRate->tqsizeHint().height() );
TQLabel* lbl6 = new TQLabel( i18n( "Files:" ), f2 );
- lbl6->setFixedSize( labelWidth, lbl6->sizeHint().height() );
+ lbl6->setFixedSize( labelWidth, lbl6->tqsizeHint().height() );
_fileCount = new TQLabel( i18n( "0" ), f2 );
- _fileCount->setFixedHeight( _fileCount->sizeHint().height() );
+ _fileCount->setFixedHeight( _fileCount->tqsizeHint().height() );
_log = new LoggerWidget( i18n( "Backup log:" ), this );
_ok = new KPushButton( KStdGuiItem::ok(), this );
- _ok->setFixedSize( 80, _ok->sizeHint().height() );
+ _ok->setFixedSize( 80, _ok->tqsizeHint().height() );
connect( _ok, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotOK() ) );
_ok->setEnabled( FALSE );
_save = new TQPushButton( i18n( "Save Log..." ), this );
- _save->setFixedSize( 80, _save->sizeHint().height() );
+ _save->setFixedSize( 80, _save->tqsizeHint().height() );
connect( _save, TQT_SIGNAL( clicked() ), _log, TQT_SLOT( save() ) );
_save->setEnabled( FALSE );
_abort = new KPushButton( KStdGuiItem::cancel(), this );
- _abort->setFixedSize( 80, _abort->sizeHint().height() );
+ _abort->setFixedSize( 80, _abort->tqsizeHint().height() );
connect( _abort, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotAbort() ) );
TQVBoxLayout* l1 = new TQVBoxLayout( this, 8, 4 );
@@ -299,13 +299,13 @@ void BackupDlg::slotProcessExited( KProcess* )
if ( _fileName.length() > 0 ) {
_archive->addFile( _fileSize, _fileMTime, _fileStartRecord, _totalRecords, _fileName );
- _fileName = TQString::null;
+ _fileName = TQString();
}
TapeDrive::instance()->close();
TapeDrive::instance()->open();
- killTimers();
+ TQT_TQOBJECT(this)->killTimers();
delete _proc;
_tape->addChild( _archive );
@@ -381,7 +381,7 @@ void BackupDlg::slotOK()
void BackupDlg::slotAbort()
{
- killTimers();
+ TQT_TQOBJECT(this)->killTimers();
if ( _proc ) {
_proc->kill();
delete _proc;
@@ -426,7 +426,7 @@ void BackupDlg::updateStats()
_kbytesWritten->setText( str );
if ( elapsed > 0 ) {
- str = i18n( "%1/min" ).arg(Util::kbytesToString( (int)_totalKBytes *60 / elapsed ) );
+ str = i18n( "%1/min" ).tqarg(Util::kbytesToString( (int)_totalKBytes *60 / elapsed ) );
_transferRate->setText( str );
}
}
diff --git a/kdat/BackupDlg.h b/kdat/BackupDlg.h
index cf32bef..0cbc61c 100644
--- a/kdat/BackupDlg.h
+++ b/kdat/BackupDlg.h
@@ -33,10 +33,11 @@ class Tape;
class TarParser;
/**
- * @short Status dialog for backing up files.
+ * @short tqStatus dialog for backing up files.
*/
class BackupDlg : public TQDialog {
Q_OBJECT
+ TQ_OBJECT
KProcess* _proc;
TarParser* _tarParser;
TQString _archiveName;
@@ -92,12 +93,12 @@ public:
* @param removeSnapshot Remove the snapshot before backing up.
* @param archiveSize The estimate size of the archive in kilobytes.
* @param tape The tape index to add the archive to.
- * @param parent The parent widget for this dialog.
+ * @param tqparent The tqparent widget for this dialog.
* @param name The name of this widget.
*/
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 );
+ TQWidget* tqparent = 0, const char* name = 0 );
/**
* Destroy the backup dialog.
diff --git a/kdat/BackupOptDlg.cpp b/kdat/BackupOptDlg.cpp
index b5311ac..86aa875 100644
--- a/kdat/BackupOptDlg.cpp
+++ b/kdat/BackupOptDlg.cpp
@@ -30,8 +30,8 @@
#include "BackupOptDlg.moc"
-BackupOptDlg::BackupOptDlg( BackupProfile* backupProfile, TQWidget* parent, const char* name )
- : TQDialog( parent, name, TRUE )
+BackupOptDlg::BackupOptDlg( BackupProfile* backupProfile, TQWidget* tqparent, const char* name )
+ : TQDialog( tqparent, name, TRUE )
{
setIconText( i18n( "KDat: Backup Options" ) );
setCaption( i18n( "KDat: Backup Options" ) );
@@ -42,10 +42,10 @@ BackupOptDlg::BackupOptDlg( BackupProfile* backupProfile, TQWidget* parent, cons
_profile->setBackupProfile( backupProfile );
KPushButton* ok = new KPushButton( KStdGuiItem::ok(), this );
- ok->setFixedSize( 80, ok->sizeHint().height() );
+ ok->setFixedSize( 80, ok->tqsizeHint().height() );
connect( ok, TQT_SIGNAL( clicked() ), this, TQT_SLOT( accept() ) );
KPushButton* cancel = new KPushButton( KStdGuiItem::cancel(), this );
- cancel->setFixedSize( 80, ok->sizeHint().height() );
+ cancel->setFixedSize( 80, ok->tqsizeHint().height() );
connect( cancel, TQT_SIGNAL( clicked() ), this, TQT_SLOT( reject() ) );
TQVBoxLayout* l1 = new TQVBoxLayout( this, 8, 4 );
diff --git a/kdat/BackupOptDlg.h b/kdat/BackupOptDlg.h
index 10047dc..4a5e3dd 100644
--- a/kdat/BackupOptDlg.h
+++ b/kdat/BackupOptDlg.h
@@ -29,6 +29,7 @@ class BackupProfileWidget;
*/
class BackupOptDlg : public TQDialog {
Q_OBJECT
+ TQ_OBJECT
BackupProfileWidget* _profile;
public:
/**
@@ -36,7 +37,7 @@ public:
*
* @param backupProfile The backup profile.
*/
- BackupOptDlg( BackupProfile* backupProfile, TQWidget* parent=0, const char* name=0 );
+ BackupOptDlg( BackupProfile* backupProfile, TQWidget* tqparent=0, const char* name=0 );
/**
* Destroy the backup options dialog.
diff --git a/kdat/BackupProfileInfoWidget.cpp b/kdat/BackupProfileInfoWidget.cpp
index 7e4a918..ff0b541 100644
--- a/kdat/BackupProfileInfoWidget.cpp
+++ b/kdat/BackupProfileInfoWidget.cpp
@@ -36,29 +36,29 @@
#include "BackupProfileInfoWidget.moc"
-BackupProfileInfoWidget::BackupProfileInfoWidget( TQWidget* parent, const char* name )
- : TQWidget( parent, name ),
+BackupProfileInfoWidget::BackupProfileInfoWidget( TQWidget* tqparent, const char* name )
+ : TQWidget( tqparent, name ),
_backupProfile( 0 )
{
TQLabel* lbl1 = new TQLabel( i18n( "Backup profile name:" ), this );
- int max = lbl1->sizeHint().width();
+ int max = lbl1->tqsizeHint().width();
- lbl1->setFixedSize( max, lbl1->sizeHint().height() );
+ lbl1->setFixedSize( max, lbl1->tqsizeHint().height() );
_name = new TQLineEdit( this );
- _name->setFixedHeight( _name->sizeHint().height() );
+ _name->setFixedHeight( _name->tqsizeHint().height() );
_profile = new BackupProfileWidget( this );
TQPushButton* getSelection = new TQPushButton( i18n( "Files >>" ), this );
- getSelection->setFixedSize( 80, getSelection->sizeHint().height() );
+ getSelection->setFixedSize( 80, getSelection->tqsizeHint().height() );
TQPushButton* setSelection = new TQPushButton( i18n( "<< Files" ), this );
- setSelection->setFixedSize( 80, setSelection->sizeHint().height() );
+ setSelection->setFixedSize( 80, setSelection->tqsizeHint().height() );
_apply = new KPushButton( KStdGuiItem::apply(), this );
- _apply->setFixedSize( 80, _apply->sizeHint().height() );
+ _apply->setFixedSize( 80, _apply->tqsizeHint().height() );
_apply->setEnabled( FALSE );
TQVBoxLayout* l1 = new TQVBoxLayout( this, 4, 4 );
diff --git a/kdat/BackupProfileInfoWidget.h b/kdat/BackupProfileInfoWidget.h
index 53ca292..3366cd4 100644
--- a/kdat/BackupProfileInfoWidget.h
+++ b/kdat/BackupProfileInfoWidget.h
@@ -28,6 +28,7 @@ class BackupProfileWidget;
*/
class BackupProfileInfoWidget : public TQWidget {
Q_OBJECT
+ TQ_OBJECT
BackupProfile* _backupProfile;
TQLineEdit* _name;
BackupProfileWidget* _profile;
@@ -44,7 +45,7 @@ public:
/**
* Create a new backup profile info widget.
*/
- BackupProfileInfoWidget( TQWidget* parent = 0, const char* name = 0 );
+ BackupProfileInfoWidget( TQWidget* tqparent = 0, const char* name = 0 );
/**
* Destroy the backup profile widget.
diff --git a/kdat/BackupProfileManager.h b/kdat/BackupProfileManager.h
index 418d807..7e54dae 100644
--- a/kdat/BackupProfileManager.h
+++ b/kdat/BackupProfileManager.h
@@ -39,6 +39,7 @@
*/
class BackupProfileManager : public TQObject {
Q_OBJECT
+ TQ_OBJECT
static BackupProfileManager* _instance;
diff --git a/kdat/BackupProfileWidget.cpp b/kdat/BackupProfileWidget.cpp
index 45acb56..7530d5c 100644
--- a/kdat/BackupProfileWidget.cpp
+++ b/kdat/BackupProfileWidget.cpp
@@ -33,26 +33,26 @@
#include "BackupProfileWidget.moc"
-BackupProfileWidget::BackupProfileWidget( TQWidget* parent, const char* name )
- : KTabCtl( parent, name )
+BackupProfileWidget::BackupProfileWidget( TQWidget* tqparent, const char* name )
+ : KTabCtl( tqparent, name )
{
TQWidget* one = new TQWidget( this );
addTab( one, i18n( "Backup" ) );
TQLabel* lbl1 = new TQLabel( i18n( "Archive name:" ), one );
- lbl1->setFixedSize( lbl1->sizeHint() );
+ lbl1->setFixedSize( lbl1->tqsizeHint() );
_archiveName = new TQLineEdit( one );
- _archiveName->setFixedHeight( _archiveName->sizeHint().height() );
+ _archiveName->setFixedHeight( _archiveName->tqsizeHint().height() );
TQLabel* lbl2 = new TQLabel( i18n( "Working folder:" ), one );
- lbl2->setFixedSize( lbl2->sizeHint() );
+ lbl2->setFixedSize( lbl2->tqsizeHint() );
_workingDir = new TQComboBox( FALSE, one );
- _workingDir->setFixedHeight( _workingDir->sizeHint().height() );
+ _workingDir->setFixedHeight( _workingDir->tqsizeHint().height() );
TQLabel* lbl3 = new TQLabel( i18n( "Backup files:" ), one );
- lbl3->setFixedHeight( lbl3->sizeHint().height() );
+ lbl3->setFixedHeight( lbl3->tqsizeHint().height() );
_files = new TQListBox( one );
@@ -60,20 +60,20 @@ BackupProfileWidget::BackupProfileWidget( TQWidget* parent, const char* name )
addTab( two, i18n( "Tar Options" ) );
_oneFilesystem = new TQCheckBox( i18n( "Stay on one filesystem" ), two );
- _oneFilesystem->setFixedHeight( _oneFilesystem->sizeHint().height() );
+ _oneFilesystem->setFixedHeight( _oneFilesystem->tqsizeHint().height() );
_incremental = new TQCheckBox( i18n( "GNU listed incremental" ), two );
- _incremental->setFixedHeight( _incremental->sizeHint().height() );
+ _incremental->setFixedHeight( _incremental->tqsizeHint().height() );
connect( _incremental, TQT_SIGNAL( toggled( bool ) ), this, TQT_SLOT( slotIncrementalToggled( bool ) ) );
_snapshotLabel = new TQLabel( i18n( "Snapshot file:" ), two );
- _snapshotLabel->setFixedSize( _snapshotLabel->sizeHint() );
+ _snapshotLabel->setFixedSize( _snapshotLabel->tqsizeHint() );
_snapshotFile = new TQLineEdit( two );
- _snapshotFile->setFixedHeight( _snapshotFile->sizeHint().height() );
+ _snapshotFile->setFixedHeight( _snapshotFile->tqsizeHint().height() );
_removeSnapshot = new TQCheckBox( i18n( "Remove snapshot file before backup" ), two );
- _removeSnapshot->setFixedHeight( _removeSnapshot->sizeHint().height() );
+ _removeSnapshot->setFixedHeight( _removeSnapshot->tqsizeHint().height() );
slotIncrementalToggled( FALSE );
@@ -205,7 +205,7 @@ void BackupProfileWidget::setAbsoluteFiles( const TQStringList& files )
TQString prefix = Util::longestCommonPath( files );
_workingDir->clear();
- for ( int pos = prefix.length(); pos > 0; pos = prefix.findRev( '/', pos - 1 ) ) {
+ for ( int pos = prefix.length(); pos > 0; pos = prefix.tqfindRev( '/', pos - 1 ) ) {
_workingDir->insertItem( prefix.left( pos ) );
}
_workingDir->insertItem( "/" );
diff --git a/kdat/BackupProfileWidget.h b/kdat/BackupProfileWidget.h
index 0a2f580..4458c38 100644
--- a/kdat/BackupProfileWidget.h
+++ b/kdat/BackupProfileWidget.h
@@ -35,6 +35,7 @@ class BackupProfile;
*/
class BackupProfileWidget : public KTabCtl {
Q_OBJECT
+ TQ_OBJECT
TQLineEdit* _archiveName;
TQComboBox* _workingDir;
TQListBox* _files;
@@ -56,10 +57,10 @@ public:
*
* @param archiveName The default name for the new archive.
* @param files The list of files to be archived.
- * @param parent The parent widget of this dialog.
+ * @param tqparent The tqparent widget of this dialog.
* @param name The widget name of this dialog.
*/
- BackupProfileWidget( TQWidget* parent=0, const char* name=0 );
+ BackupProfileWidget( TQWidget* tqparent=0, const char* name=0 );
/**
* Destroy the backup profile widget.
diff --git a/kdat/File.cpp b/kdat/File.cpp
index fd766b3..01a1e13 100644
--- a/kdat/File.cpp
+++ b/kdat/File.cpp
@@ -21,10 +21,10 @@
#include "File.h"
-File::File( File* parent, int size, int mtime, int startRecord, int endRecord, const TQString & name )
+File::File( File* tqparent, int size, int mtime, int startRecord, int endRecord, const TQString & name )
: _stubbed( FALSE ),
_name( name ),
- _parent( parent )
+ _parent( tqparent )
{
assert( endRecord >= startRecord );
@@ -34,9 +34,9 @@ File::File( File* parent, int size, int mtime, int startRecord, int endRecord, c
_union._data._endRecord = endRecord;
}
-File::File( File* parent, FILE* fptr, int offset )
+File::File( File* tqparent, FILE* fptr, int offset )
: _stubbed( TRUE ),
- _parent( parent )
+ _parent( tqparent )
{
_union._stub._fptr = fptr;
_union._stub._offset = offset;
@@ -44,9 +44,9 @@ File::File( File* parent, FILE* fptr, int offset )
File::~File()
{
- while ( _children.first() ) {
- delete _children.first();
- _children.removeFirst();
+ while ( _tqchildren.first() ) {
+ delete _tqchildren.first();
+ _tqchildren.removeFirst();
}
}
@@ -164,7 +164,7 @@ void File::write( FILE* fptr )
fwrite( &ival, sizeof( ival ), 1, fptr );
}
- // Number of immediate children (4 bytes).
+ // Number of immediate tqchildren (4 bytes).
ival = getChildren().count();
fwrite( &ival, sizeof( ival ), 1, fptr );
@@ -175,10 +175,10 @@ void File::write( FILE* fptr )
}
//===== Write files =====
- ival = _children.count();
+ ival = _tqchildren.count();
fwrite( &ival, sizeof( ival ), 1, fptr );
- TQPtrListIterator<File> i( _children );
+ TQPtrListIterator<File> i( _tqchildren );
int count = 0;
for ( ; i.current(); ++i, count++ ) {
// Fill in the file offset.
@@ -236,8 +236,8 @@ TQString File::getName()
TQString File::getFullPathName()
{
TQString tmp = _name.copy();
- for ( File* parent = getParent(); parent; parent = parent->getParent() ) {
- tmp.prepend( parent->getName() );
+ for ( File* tqparent = getParent(); tqparent; tqparent = tqparent->getParent() ) {
+ tmp.prepend( tqparent->getName() );
}
return tmp;
@@ -252,7 +252,7 @@ const TQPtrList<File>& File::getChildren()
{
read();
- return _children;
+ return _tqchildren;
}
const TQPtrList<Range>& File::getRanges()
@@ -266,7 +266,7 @@ void File::addChild( File* file )
{
read();
- _children.append( file );
+ _tqchildren.append( file );
}
void File::calcRanges()
diff --git a/kdat/File.h b/kdat/File.h
index 75b1d87..7bfcd3e 100644
--- a/kdat/File.h
+++ b/kdat/File.h
@@ -46,13 +46,13 @@ class File {
} _union;
TQString _name;
File* _parent;
- TQPtrList<File> _children;
+ TQPtrList<File> _tqchildren;
RangeList _ranges;
public:
/**
* Create a new file entry.
*
- * @param parent The directory file entry that contains this file.
+ * @param tqparent The directory file entry that contains this file.
* @param size The size of the file in bytes.
* @param mtime The last modification time of the file in seconds since
* the Epoch.
@@ -63,24 +63,24 @@ 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 TQString & name );
+ File( File* tqparent, int size, int mtime, int startRecord, int endRecord, const TQString & name );
/**
* Create a new stubbed instance of a file entry. The file pointer and
* offset specify where the actual instance data can be found. The real
* data is read on demand when one of the accessor functions is called.
*
- * @param parent The directory file entry that contains this file.
+ * @param tqparent The directory file entry that contains this file.
* @param fptr The open index file containing this file entry. The file
* must be left open so that the file entry information can
* be read at a later time.
* @param offset The offset that will be seeked to when reading the file
* entry information.
*/
- File( File* parent, FILE* fptr, int offset );
+ File( File* tqparent, FILE* fptr, int offset );
/**
- * Destroy the file entry and all of its children.
+ * Destroy the file entry and all of its tqchildren.
*/
~File();
@@ -95,7 +95,7 @@ public:
/**
* Recursively read the instance for this file entry and all of it's
- * children. This method is used when converting from an older index format.
+ * tqchildren. This method is used when converting from an older index format.
*
* @param version The version of the old tape index.
*/
@@ -103,7 +103,7 @@ public:
/**
* Write out the file entry to the open file. Entries for each of its
- * children will also be written.
+ * tqchildren will also be written.
*/
void write( FILE* fptr );
@@ -163,7 +163,7 @@ public:
TQString getFullPathName();
/**
- * Get the file entry's parent. A NULL parent indicates that this is one
+ * Get the file entry's tqparent. A NULL tqparent indicates that this is one
* of (possibly) many top level directories within the tar archive.
*
* @return A pointer to the file entry that contains this file entry.
@@ -171,15 +171,15 @@ public:
File* getParent();
/**
- * Get the children of this file entry. A normal file will never have any
- * children. A directory may or may not have children.
+ * Get the tqchildren of this file entry. A normal file will never have any
+ * tqchildren. A directory may or may not have tqchildren.
*
- * @return A list of the immediate children of this file entry.
+ * @return A list of the immediate tqchildren of this file entry.
*/
const TQPtrList<File>& getChildren();
/**
- * Get the list of ranges of this file and all of its children.
+ * Get the list of ranges of this file and all of its tqchildren.
*
* @return A list of ranges.
*/
@@ -193,7 +193,7 @@ public:
void addChild( File* file );
/**
- * Recursively calculate the list of ranges for all of the file's children.
+ * Recursively calculate the list of ranges for all of the file's tqchildren.
*/
void calcRanges();
};
diff --git a/kdat/FileInfoWidget.cpp b/kdat/FileInfoWidget.cpp
index 5b75cf7..bcb896d 100644
--- a/kdat/FileInfoWidget.cpp
+++ b/kdat/FileInfoWidget.cpp
@@ -36,8 +36,8 @@
#include "FileInfoWidget.moc"
-FileInfoWidget::FileInfoWidget( TQWidget* parent, const char* name )
- : TQWidget( parent, name )
+FileInfoWidget::FileInfoWidget( TQWidget* tqparent, const char* name )
+ : TQWidget( tqparent, name )
{
TQLabel* lbl1 = new TQLabel( i18n( "File name:" ), this );
TQLabel* lbl2 = new TQLabel( i18n( "Created on:" ), this );
@@ -47,42 +47,42 @@ FileInfoWidget::FileInfoWidget( TQWidget* parent, const char* name )
TQLabel* lbl6 = new TQLabel( i18n( "Owner:" ), this );
TQLabel* lbl7 = new TQLabel( i18n( "Group:" ), this );
- int max = lbl1->sizeHint().width();
- if ( lbl2->sizeHint().width() > max ) max = lbl2->sizeHint().width();
- if ( lbl3->sizeHint().width() > max ) max = lbl3->sizeHint().width();
- if ( lbl4->sizeHint().width() > max ) max = lbl4->sizeHint().width();
- if ( lbl5->sizeHint().width() > max ) max = lbl5->sizeHint().width();
- if ( lbl6->sizeHint().width() > max ) max = lbl6->sizeHint().width();
- if ( lbl7->sizeHint().width() > max ) max = lbl7->sizeHint().width();
-
- lbl1->setFixedSize( max, lbl1->sizeHint().height() );
- lbl2->setFixedSize( max, lbl2->sizeHint().height() );
- lbl3->setFixedSize( max, lbl3->sizeHint().height() );
- lbl4->setFixedSize( max, lbl4->sizeHint().height() );
- lbl5->setFixedSize( max, lbl5->sizeHint().height() );
- lbl6->setFixedSize( max, lbl6->sizeHint().height() );
- lbl7->setFixedSize( max, lbl7->sizeHint().height() );
+ int max = lbl1->tqsizeHint().width();
+ if ( lbl2->tqsizeHint().width() > max ) max = lbl2->tqsizeHint().width();
+ if ( lbl3->tqsizeHint().width() > max ) max = lbl3->tqsizeHint().width();
+ if ( lbl4->tqsizeHint().width() > max ) max = lbl4->tqsizeHint().width();
+ if ( lbl5->tqsizeHint().width() > max ) max = lbl5->tqsizeHint().width();
+ if ( lbl6->tqsizeHint().width() > max ) max = lbl6->tqsizeHint().width();
+ if ( lbl7->tqsizeHint().width() > max ) max = lbl7->tqsizeHint().width();
+
+ lbl1->setFixedSize( max, lbl1->tqsizeHint().height() );
+ lbl2->setFixedSize( max, lbl2->tqsizeHint().height() );
+ lbl3->setFixedSize( max, lbl3->tqsizeHint().height() );
+ lbl4->setFixedSize( max, lbl4->tqsizeHint().height() );
+ lbl5->setFixedSize( max, lbl5->tqsizeHint().height() );
+ lbl6->setFixedSize( max, lbl6->tqsizeHint().height() );
+ lbl7->setFixedSize( max, lbl7->tqsizeHint().height() );
_fileName = new TQLabel( "???", this );
- _fileName->setFixedHeight( _fileName->sizeHint().height() );
+ _fileName->setFixedHeight( _fileName->tqsizeHint().height() );
_ctime = new TQLabel( "???", this );
- _ctime->setFixedHeight( _ctime->sizeHint().height() );
+ _ctime->setFixedHeight( _ctime->tqsizeHint().height() );
_mtime = new TQLabel( "???", this );
- _mtime->setFixedHeight( _mtime->sizeHint().height() );
+ _mtime->setFixedHeight( _mtime->tqsizeHint().height() );
_atime = new TQLabel( "???", this );
- _atime->setFixedHeight( _atime->sizeHint().height() );
+ _atime->setFixedHeight( _atime->tqsizeHint().height() );
_size = new TQLabel( "???", this );
- _size->setFixedHeight( _size->sizeHint().height() );
+ _size->setFixedHeight( _size->tqsizeHint().height() );
_owner = new TQLabel( "???", this );
- _owner->setFixedHeight( _owner->sizeHint().height() );
+ _owner->setFixedHeight( _owner->tqsizeHint().height() );
_group = new TQLabel( "???", this );
- _group->setFixedHeight( _group->sizeHint().height() );
+ _group->setFixedHeight( _group->tqsizeHint().height() );
TQVBoxLayout* l1 = new TQVBoxLayout( this, 4, 4 );
diff --git a/kdat/FileInfoWidget.h b/kdat/FileInfoWidget.h
index 9a0a32f..5e7f9e2 100644
--- a/kdat/FileInfoWidget.h
+++ b/kdat/FileInfoWidget.h
@@ -28,6 +28,7 @@ class TQLabel;
*/
class FileInfoWidget : public TQWidget {
Q_OBJECT
+ TQ_OBJECT
TQLabel* _fileName;
TQLabel* _ctime;
TQLabel* _mtime;
@@ -39,10 +40,10 @@ public:
/**
* Create a new file info widget.
*
- * @param parent The parent widget.
+ * @param tqparent The tqparent widget.
* @param name The name of this widget.
*/
- FileInfoWidget( TQWidget* parent = 0, const char* name = 0 );
+ FileInfoWidget( TQWidget* tqparent = 0, const char* name = 0 );
/**
* Destroy the file info widget.
diff --git a/kdat/FormatOptDlg.cpp b/kdat/FormatOptDlg.cpp
index 81a74f4..3041be5 100644
--- a/kdat/FormatOptDlg.cpp
+++ b/kdat/FormatOptDlg.cpp
@@ -34,8 +34,8 @@
#include "FormatOptDlg.moc"
-FormatOptDlg::FormatOptDlg( const TQString & def, TQWidget* parent, const char* name )
- : TQDialog( parent, name, TRUE )
+FormatOptDlg::FormatOptDlg( const TQString & def, TQWidget* tqparent, const char* name )
+ : TQDialog( tqparent, name, TRUE )
{
setIconText( i18n( "KDat: Format Options" ) );
setCaption( i18n( "KDat: Format Options" ) );
@@ -43,28 +43,28 @@ FormatOptDlg::FormatOptDlg( const TQString & def, TQWidget* parent, const char*
TQLabel* lbl1 = new TQLabel( i18n( "Tape name:" ), this );
TQLabel* lbl2 = new TQLabel( i18n( "Tape size:" ), this );
- int max = lbl1->sizeHint().width();
- if ( lbl2->sizeHint().width() > max ) max = lbl2->sizeHint().width();
+ int max = lbl1->tqsizeHint().width();
+ if ( lbl2->tqsizeHint().width() > max ) max = lbl2->tqsizeHint().width();
- lbl1->setFixedSize( max, lbl1->sizeHint().height() );
- lbl2->setFixedSize( max, lbl2->sizeHint().height() );
+ lbl1->setFixedSize( max, lbl1->tqsizeHint().height() );
+ lbl2->setFixedSize( max, lbl2->tqsizeHint().height() );
_entry = new TQLineEdit( this );
_entry->setText( def );
- _entry->setFixedHeight( _entry->sizeHint().height() );
+ _entry->setFixedHeight( _entry->tqsizeHint().height() );
_tapeSize = new TQLineEdit( this );
- _tapeSize->setFixedSize( 48, _tapeSize->sizeHint().height() );
+ _tapeSize->setFixedSize( 48, _tapeSize->tqsizeHint().height() );
_tapeSizeUnits = new TQComboBox( this );
- _tapeSizeUnits->setFixedSize( 48, _tapeSizeUnits->sizeHint().height() );
+ _tapeSizeUnits->setFixedSize( 48, _tapeSizeUnits->tqsizeHint().height() );
_tapeSizeUnits->insertItem( "MB" );
_tapeSizeUnits->insertItem( "GB" );
KPushButton* ok = new KPushButton( KStdGuiItem::ok(), this );
- ok->setFixedSize( 80, ok->sizeHint().height() );
+ ok->setFixedSize( 80, ok->tqsizeHint().height() );
KPushButton* cancel = new KPushButton( KStdGuiItem::cancel(), this );
- cancel->setFixedSize( 80, cancel->sizeHint().height() );
+ cancel->setFixedSize( 80, cancel->tqsizeHint().height() );
TQVBoxLayout* l1 = new TQVBoxLayout( this, 8, 4 );
TQHBoxLayout* l2 = new TQHBoxLayout();
diff --git a/kdat/FormatOptDlg.h b/kdat/FormatOptDlg.h
index 861fa93..db557e9 100644
--- a/kdat/FormatOptDlg.h
+++ b/kdat/FormatOptDlg.h
@@ -30,6 +30,7 @@ class TQLineEdit;
*/
class FormatOptDlg : public TQDialog {
Q_OBJECT
+ TQ_OBJECT
TQString _name;
int _size;
TQLineEdit* _entry;
@@ -42,10 +43,10 @@ public:
* Create a new format options dialog.
*
* @param def The default value for the tape name.
- * @param parent The parent widget for the dialog.
+ * @param tqparent The tqparent widget for the dialog.
* @param name The name for the dialog.
*/
- FormatOptDlg( const TQString & def, TQWidget* parent=0, const char* name=0 );
+ FormatOptDlg( const TQString & def, TQWidget* tqparent=0, const char* name=0 );
/**
* Destroy the format options dialog.
diff --git a/kdat/IndexDlg.cpp b/kdat/IndexDlg.cpp
index 7a0d71a..2808f86 100644
--- a/kdat/IndexDlg.cpp
+++ b/kdat/IndexDlg.cpp
@@ -41,8 +41,8 @@
#include "IndexDlg.moc"
-IndexDlg::IndexDlg( Tape* tape, TQWidget* parent, const char* name )
- : TQDialog( parent, name, TRUE ),
+IndexDlg::IndexDlg( Tape* tape, TQWidget* tqparent, const char* name )
+ : TQDialog( tqparent, name, TRUE ),
_tarParser( NULL ),
_tape( tape ),
_archive( NULL ),
@@ -70,55 +70,55 @@ IndexDlg::IndexDlg( Tape* tape, TQWidget* parent, const char* name )
f2->setFrameStyle( TQFrame::Panel | TQFrame::Sunken );
TQLabel* lbl1 = new TQLabel( i18n( "Elapsed time:" ), f1 );
- lbl1->setFixedSize( labelWidth, lbl1->sizeHint().height() );
+ lbl1->setFixedSize( labelWidth, lbl1->tqsizeHint().height() );
_elapsedTime = new TQLabel( i18n( "00:00:00" ), f1 );
- _elapsedTime->setFixedHeight( _elapsedTime->sizeHint().height() );
+ _elapsedTime->setFixedHeight( _elapsedTime->tqsizeHint().height() );
TQLabel* lbl2 = new TQLabel( i18n( "Archives:" ), f2 );
- lbl2->setFixedSize( labelWidth, lbl2->sizeHint().height() );
+ lbl2->setFixedSize( labelWidth, lbl2->tqsizeHint().height() );
_archives = new TQLabel( i18n( "0" ), f2 );
- _archives->setFixedHeight( _archives->sizeHint().height() );
+ _archives->setFixedHeight( _archives->tqsizeHint().height() );
TQLabel* lbl3 = new TQLabel( i18n( "KB read:" ), f1 );
- lbl3->setFixedSize( labelWidth, lbl3->sizeHint().height() );
+ lbl3->setFixedSize( labelWidth, lbl3->tqsizeHint().height() );
_kbytesRead = new TQLabel( i18n( "0KB" ), f1 );
- _kbytesRead->setFixedHeight( _kbytesRead->sizeHint().height() );
+ _kbytesRead->setFixedHeight( _kbytesRead->tqsizeHint().height() );
TQLabel* lbl4 = new TQLabel( i18n( "Files:" ), f2 );
- lbl4->setFixedSize( labelWidth, lbl4->sizeHint().height() );
+ lbl4->setFixedSize( labelWidth, lbl4->tqsizeHint().height() );
_files = new TQLabel( i18n( "0" ), f2 );
- _files->setFixedHeight( _kbytesRead->sizeHint().height() );
+ _files->setFixedHeight( _kbytesRead->tqsizeHint().height() );
TQLabel* lbl5 = new TQLabel( i18n( "Transfer rate:" ), f1 );
- lbl5->setFixedSize( labelWidth, lbl5->sizeHint().height() );
+ lbl5->setFixedSize( labelWidth, lbl5->tqsizeHint().height() );
_transferRate = new TQLabel( i18n( "0KB/min" ), f1 );
- _transferRate->setFixedHeight( _transferRate->sizeHint().height() );
+ _transferRate->setFixedHeight( _transferRate->tqsizeHint().height() );
TQLabel* lbl6 = new TQLabel( i18n( "Total files:" ), f2 );
- lbl6->setFixedSize( labelWidth, lbl6->sizeHint().height() );
+ lbl6->setFixedSize( labelWidth, lbl6->tqsizeHint().height() );
_totalFiles = new TQLabel( i18n( "0" ), f2 );
- _totalFiles->setFixedHeight( _totalFiles->sizeHint().height() );
+ _totalFiles->setFixedHeight( _totalFiles->tqsizeHint().height() );
_log = new LoggerWidget( i18n( "Index log:" ), this );
_ok = new KPushButton( KStdGuiItem::ok(), this );
- _ok->setFixedSize( 80, _ok->sizeHint().height() );
+ _ok->setFixedSize( 80, _ok->tqsizeHint().height() );
connect( _ok, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotOK() ) );
_ok->setEnabled( FALSE );
_save = new TQPushButton( i18n( "Save Log..." ), this );
- _save->setFixedSize( 80, _save->sizeHint().height() );
+ _save->setFixedSize( 80, _save->tqsizeHint().height() );
connect( _save, TQT_SIGNAL( clicked() ), _log, TQT_SLOT( save() ) );
_save->setEnabled( FALSE );
_abort = new TQPushButton( i18n( "Abort" ), this );
- _abort->setFixedSize( 80, _abort->sizeHint().height() );
+ _abort->setFixedSize( 80, _abort->tqsizeHint().height() );
connect( _abort, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotAbort() ) );
TQVBoxLayout* l1 = new TQVBoxLayout( this, 8, 4 );
@@ -221,13 +221,13 @@ void IndexDlg::slotOK()
void IndexDlg::slotAbort()
{
- killTimers();
+ TQT_TQOBJECT(this)->killTimers();
_aborted = TRUE;
}
void IndexDlg::timerEvent( TQTimerEvent* )
{
- killTimers();
+ TQT_TQOBJECT(this)->killTimers();
// Rewind tape.
_log->append( i18n( "Rewinding tape." ) );
@@ -275,12 +275,12 @@ void IndexDlg::timerEvent( TQTimerEvent* )
_archiveCount++;
msg.setNum( _archiveCount );
_archives->setText( msg );
- msg = i18n( "Indexing archive %1." ).arg( _archiveCount );
+ msg = i18n( "Indexing archive %1." ).tqarg( _archiveCount );
_log->append( msg );
- msg = i18n( "Archive %1" ).arg( _archiveCount );
+ msg = i18n( "Archive %1" ).tqarg( _archiveCount );
_archive = new Archive( _tape, 0, msg );
- _fileName = TQString::null;
+ _fileName = TQString();
_fileSize = -1;
_fileMTime = -1;
_fileStartRecord = -1;
@@ -349,7 +349,7 @@ void IndexDlg::updateStats()
_kbytesRead->setText( str );
if ( elapsed > 0 ) {
- str = i18n( "%1/min" ).arg(Util::kbytesToString( (int)_totalKBytes * 60 / elapsed ) );
+ str = i18n( "%1/min" ).tqarg(Util::kbytesToString( (int)_totalKBytes * 60 / elapsed ) );
_transferRate->setText( str );
}
}
diff --git a/kdat/IndexDlg.h b/kdat/IndexDlg.h
index 5b237c8..9dfd6ea 100644
--- a/kdat/IndexDlg.h
+++ b/kdat/IndexDlg.h
@@ -34,10 +34,11 @@ class Tape;
class TarParser;
/**
- * @short Status dialog for recreating a tape index.
+ * @short tqStatus dialog for recreating a tape index.
*/
class IndexDlg : public TQDialog {
Q_OBJECT
+ TQ_OBJECT
TarParser* _tarParser;
Tape* _tape;
Archive* _archive;
@@ -78,10 +79,10 @@ public:
* Create a new tape index dialog.
*
* @param tape A pointer to the empty tape index to fill in.
- * @param parent The parent widget for this dialog.
+ * @param tqparent The tqparent widget for this dialog.
* @param name The name of this dialog.
*/
- IndexDlg( Tape* tape, TQWidget* parent = 0, const char* name = 0 );
+ IndexDlg( Tape* tape, TQWidget* tqparent = 0, const char* name = 0 );
/**
* Destroy the tape index dialog.
diff --git a/kdat/InfoShellWidget.cpp b/kdat/InfoShellWidget.cpp
index fc96e8c..bda2be9 100644
--- a/kdat/InfoShellWidget.cpp
+++ b/kdat/InfoShellWidget.cpp
@@ -23,8 +23,8 @@
#include "InfoShellWidget.moc"
-InfoShellWidget::InfoShellWidget( TQWidget* parent, const char* name )
- : TQWidget( parent, name )
+InfoShellWidget::InfoShellWidget( TQWidget* tqparent, const char* name )
+ : TQWidget( tqparent, name )
{
}
@@ -34,8 +34,9 @@ InfoShellWidget::~InfoShellWidget()
void InfoShellWidget::resizeEvent( TQResizeEvent* )
{
- if ( children() ) {
- TQObjectListIt i( *children() );
+ TQObjectList clo = childrenListObject();
+ if ( !clo.isEmpty() ) {
+ TQObjectListIt i( clo );
for ( ; i.current(); ++i ) {
((TQWidget*)i.current())->resize( size() );
}
diff --git a/kdat/InfoShellWidget.h b/kdat/InfoShellWidget.h
index f7046db..ae8dd90 100644
--- a/kdat/InfoShellWidget.h
+++ b/kdat/InfoShellWidget.h
@@ -22,18 +22,19 @@
#include <tqwidget.h>
/**
- * @short A suitable parent for the info widgets.
+ * @short A suitable tqparent for the info widgets.
*/
class InfoShellWidget : public TQWidget {
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Create a new info shell widget.
*
- * @param parent The parent widget.
+ * @param tqparent The tqparent widget.
* @param name The name of this widget.
*/
- InfoShellWidget( TQWidget* parent = 0, const char* name = 0 );
+ InfoShellWidget( TQWidget* tqparent = 0, const char* name = 0 );
/**
* Destroy the info shell widget.
@@ -41,7 +42,7 @@ public:
~InfoShellWidget();
protected:
/**
- * Resize all children to fill all of the available space within the shell.
+ * Resize all tqchildren to fill all of the available space within the shell.
*/
virtual void resizeEvent( TQResizeEvent* e );
};
diff --git a/kdat/KDat.kdoc b/kdat/KDat.kdoc
index 7297e64..d69f3eb 100644
--- a/kdat/KDat.kdoc
+++ b/kdat/KDat.kdoc
@@ -12,7 +12,7 @@ Archive::startBlock=Archive.html#startBlock
Archive::endBlock=Archive.html#endBlock
Archive::name=Archive.html#name
Archive::files=Archive.html#files
-Archive::children=Archive.html#children
+Archive::tqchildren=Archive.html#tqchildren
Archive::setEndBlock=Archive.html#setEndBlock
Archive::setName=Archive.html#setName
Archive::addFile=Archive.html#addFile
@@ -94,7 +94,7 @@ File::size=File.html#size
File::mtime=File.html#mtime
File::record=File.html#record
File::name=File.html#name
-File::children=File.html#children
+File::tqchildren=File.html#tqchildren
IndexDlg=IndexDlg.html
IndexDlg=IndexDlg.html
IndexDlg::_tarParser=IndexDlg.html#_tarParser
@@ -387,7 +387,7 @@ TapeDrive::seek=TapeDrive.html#seek
TapeDrive::unlock=TapeDrive.html#unlock
TapeDrive::write=TapeDrive.html#write
TapeDrive::slotTapeBlockSize=TapeDrive.html#slotTapeBlockSize
-TapeDrive::slotStatus=TapeDrive.html#slotStatus
+TapeDrive::slottqStatus=TapeDrive.html#slottqStatus
TapeDrive::status=TapeDrive.html#status
TapeInfoDlg=TapeInfoDlg.html
TapeInfoDlg=TapeInfoDlg.html
@@ -475,7 +475,7 @@ KTreeViewItem::KTreeViewItem=KTreeViewItem.html#KTreeViewItem
KTreeViewItem::KTreeViewItem=KTreeViewItem.html#KTreeViewItem
KTreeViewItem::~KTreeViewItem=KTreeViewItem.html#~KTreeViewItem
KTreeViewItem::appendChild=KTreeViewItem.html#appendChild
-KTreeViewItem::childAt=KTreeViewItem.html#childAt
+KTreeViewItem::tqchildAt=KTreeViewItem.html#tqchildAt
KTreeViewItem::childCount=KTreeViewItem.html#childCount
KTreeViewItem::childIndex=KTreeViewItem.html#childIndex
KTreeViewItem::expandButtonClicked=KTreeViewItem.html#expandButtonClicked
@@ -519,7 +519,7 @@ KTreeViewItem::delayedExpanding=KTreeViewItem.html#delayedExpanding
KTreeViewItem::doTree=KTreeViewItem.html#doTree
KTreeViewItem::doText=KTreeViewItem.html#doText
KTreeViewItem::paint=KTreeViewItem.html#paint
-KTreeViewItem::parent=KTreeViewItem.html#parent
+KTreeViewItem::tqparent=KTreeViewItem.html#tqparent
KTreeViewItem::sibling=KTreeViewItem.html#sibling
KTreeViewItem::pixmap=KTreeViewItem.html#pixmap
KTreeViewItem::text=KTreeViewItem.html#text
diff --git a/kdat/KDatMainWindow.cpp b/kdat/KDatMainWindow.cpp
index 5ead8c9..d3cf265 100644
--- a/kdat/KDatMainWindow.cpp
+++ b/kdat/KDatMainWindow.cpp
@@ -152,20 +152,20 @@ KDatMainWindow::KDatMainWindow()
_menu->insertItem( i18n( "&File" ), _fileMenu );
_menu->insertItem( i18n( "&Settings" ), _editMenu );
_menu->insertSeparator();
- TQString about = i18n( "KDat Version %1\n\nKDat is a tar-based tape archiver.\n\nCopyright (c) 1998-2000 Sean Vyain\nCopyright (c) 2001-2002 Lawrence Widman\nkdat@cardiothink.com" ).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" ).tqarg( KDAT_VERSION );
_menu->insertItem( i18n( "&Help" ), helpMenu( about ) );
_toolbar = new KToolBar( this );
- _toolbar->insertButton( *ImageCache::instance()->getTapeUnmounted(), 0, TQT_SIGNAL( clicked( int ) ), this, TQT_SLOT( fileMountTape() ), TRUE, i18n( "Mount/unmount tape" ) );
+ _toolbar->insertButton( *ImageCache::instance()->getTapeUnmounted(), 0, TQT_SIGNAL( clicked( int ) ), TQT_TQOBJECT(this), TQT_SLOT( fileMountTape() ), TRUE, i18n( "Mount/unmount tape" ) );
_toolbar->insertSeparator();
- _toolbar->insertButton( *ImageCache::instance()->getBackup() , 1, TQT_SIGNAL( clicked( int ) ), this, TQT_SLOT( fileBackup() ) , TRUE, i18n( "Backup" ) );
+ _toolbar->insertButton( *ImageCache::instance()->getBackup() , 1, TQT_SIGNAL( clicked( int ) ), TQT_TQOBJECT(this), TQT_SLOT( fileBackup() ) , TRUE, i18n( "Backup" ) );
_toolbar->setButtonIconSet( 1, BarIconSet("kdat_backup"));
- _toolbar->insertButton( *ImageCache::instance()->getRestore(), 2, TQT_SIGNAL( clicked( int ) ), this, TQT_SLOT( fileRestore() ), TRUE, i18n( "Restore" ) );
+ _toolbar->insertButton( *ImageCache::instance()->getRestore(), 2, TQT_SIGNAL( clicked( int ) ), TQT_TQOBJECT(this), TQT_SLOT( fileRestore() ), TRUE, i18n( "Restore" ) );
_toolbar->setButtonIconSet( 2, BarIconSet("kdat_restore"));
- _toolbar->insertButton( *ImageCache::instance()->getVerify() , 3, TQT_SIGNAL( clicked( int ) ), this, TQT_SLOT( fileVerify() ) , TRUE, i18n( "Verify" ) );
+ _toolbar->insertButton( *ImageCache::instance()->getVerify() , 3, TQT_SIGNAL( clicked( int ) ), TQT_TQOBJECT(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 TQSplitter( TQSplitter::Horizontal, this, "panner");
+ _panner = new TQSplitter( Qt::Horizontal, this, "panner");
#else
- _panner = new TQSplitter( TQSplitter::Vertical, this, "panner");
+ _panner = new TQSplitter( Qt::Vertical, this, "panner");
#endif /* KDAT_HORIZONTAL_LAYOUT */
// Create info viewers.
@@ -211,7 +211,7 @@ KDatMainWindow::KDatMainWindow()
_tree->insertItem( _backupProfileRootNode = new BackupProfileRootNode() );
_tree->insertItem( new TapeIndexRootNode() );
- connect( TapeDrive::instance(), TQT_SIGNAL( sigStatus( const TQString & ) ), this, TQT_SLOT( status( const TQString & ) ) );
+ connect( TapeDrive::instance(), TQT_SIGNAL( sigtqStatus( const TQString & ) ), this, TQT_SLOT( status( const TQString & ) ) );
setTapePresent( FALSE );
@@ -387,7 +387,7 @@ void KDatMainWindow::localSelected( int index )
_tree->expandItem( index );
_tree->collapseItem( index ); // 2002-01-30 LEW
}
- // repaint(); // this doesn't work 2002-01-30 LEW
+ // tqrepaint(); // this doesn't work 2002-01-30 LEW
/* 2002-01-30 LEW: RG and I don't like this behavior */
}
@@ -419,7 +419,7 @@ void KDatMainWindow::fileBackup()
TQString msg = i18n("KDat will dump your files properly to tape, but may not be able\n"
"to restore them. To restore your files by hand, you need to know\n"
"the name of the *non-rewinding* version of your tape device %1.\n"
- ).arg(Options::instance()->getTapeDevice());
+ ).tqarg(Options::instance()->getTapeDevice());
TQString msg2 = i18n("For example, if your device is /dev/st0, the non-rewinding version\n"
"is /dev/nst0. If your device name doesn't look like that, type\n"
"\"ls -l %2\" in a terminal window to see the real name of your\n"
@@ -430,7 +430,7 @@ void KDatMainWindow::fileBackup()
"The third call to \"tar\" will retrieve your data into your\n"
"current directory. Please let us know if this happens to you!\n"
" - KDat Maintenance Team\n"
- ).arg(Options::instance()->getTapeDevice());
+ ).tqarg(Options::instance()->getTapeDevice());
msg = msg.append(msg2);
KMessageBox::sorry( this, msg);
/* 2002-01-28 LEW */
@@ -446,7 +446,7 @@ void KDatMainWindow::fileBackup()
backupProfile.setRemoveSnapshot( bp->getRemoveSnapshot() );
} else {
TQString name;
- name = i18n( "Archive created on %1" ).arg( KGlobal::locale()->formatDate(TQDate::currentDate(), true) );
+ name = i18n( "Archive created on %1" ).tqarg( KGlobal::locale()->formatDate(TQDate::tqcurrentDate(), true) );
name = name.stripWhiteSpace();
TQStringList files;
@@ -486,8 +486,8 @@ void KDatMainWindow::fileBackup()
msg = i18n( "WARNING: The estimated archive size is %1 KB but "
"the tape has only %2 KB of space!\n"
"Back up anyway?" )
- .arg(KGlobal::locale()->formatNumber(size, 0))
- .arg(KGlobal::locale()->formatNumber(TapeManager::instance()->getMountedTape()->getSize() - tapeSize, 0 ));
+ .tqarg(KGlobal::locale()->formatNumber(size, 0))
+ .tqarg(KGlobal::locale()->formatNumber(TapeManager::instance()->getMountedTape()->getSize() - tapeSize, 0 ));
int result = KMessageBox::warningContinueCancel( this,
msg, i18n("Backup"), i18n("Backup") );
if ( result != KMessageBox::Continue) {
@@ -556,15 +556,15 @@ void KDatMainWindow::doVerify( bool restore )
Archive* archive = 0;
// Check for marked files first.
for ( int i = _tapeDriveNode->childCount() - 1; i >= 0; i-- ) {
- if ( ( ((SelectableNode*)_tapeDriveNode->childAt( i ))->isSelected() ) ||
- ( ((SelectableNode*)_tapeDriveNode->childAt( i ))->hasSelectedChildren() )) {
- archiveNode = (MountedArchiveNode*)_tapeDriveNode->childAt( i );
+ if ( ( ((SelectableNode*)_tapeDriveNode->tqchildAt( i ))->isSelected() ) ||
+ ( ((SelectableNode*)_tapeDriveNode->tqchildAt( i ))->hasSelectedChildren() )) {
+ archiveNode = (MountedArchiveNode*)_tapeDriveNode->tqchildAt( i );
archive = archiveNode->getArchive();
/* 2002-01-30 LEW */
#ifdef DEBUG
printf("KDatMainWindow::doVerify: %d node of %s: ", i,
(SelectableNode*)_tapeDriveNode->getText().latin1() );
- if( ((SelectableNode*)_tapeDriveNode->childAt( i ))->isSelected() ){
+ if( ((SelectableNode*)_tapeDriveNode->tqchildAt( i ))->isSelected() ){
printf("is completely selected\n");
} else {
printf("is partially selected\n");
@@ -578,10 +578,10 @@ void KDatMainWindow::doVerify( bool restore )
if ( !archiveNode ) {
if ( ((Node*)_tree->getCurrentItem())->isType( Node::RangeableNodeType ) ) {
rangeableNode = (RangeableNode*)_tree->getCurrentItem();
- Node* parent = rangeableNode;
- for ( ; !parent->isType( Node::MountedArchiveNodeType ); parent = (Node*)parent->getParent() );
- assert( parent );
- archive = ((MountedArchiveNode*)parent)->getArchive();
+ Node* tqparent = rangeableNode;
+ for ( ; !tqparent->isType( Node::MountedArchiveNodeType ); tqparent = (Node*)tqparent->getParent() );
+ assert( tqparent );
+ archive = ((MountedArchiveNode*)tqparent)->getArchive();
}
}
@@ -600,7 +600,7 @@ void KDatMainWindow::doVerify( bool restore )
ranges.addRange( it.current()->getStart(), it.current()->getEnd() );
}
if ( rangeableNode->isType( Node::MountedArchiveNodeType ) ) {
- // Make sure the mounted archive node has populated its children.
+ // Make sure the mounted archive node has populated its tqchildren.
archiveNode = (MountedArchiveNode*)rangeableNode;
if ( archiveNode->childCount() == 0 ) {
bool dummy = TRUE;
@@ -608,10 +608,10 @@ void KDatMainWindow::doVerify( bool restore )
}
for ( int i = rangeableNode->childCount() - 1; i >= 0; i-- ) {
- if ( ((Node*)rangeableNode->childAt( i ))->isType( Node::MountedTapeDirectoryNodeType ) ) {
- files.append( ((MountedTapeDirectoryNode*)rangeableNode->childAt( i ))->getFullPath() );
- } else if ( ((Node*)rangeableNode->childAt( i ))->isType( Node::MountedTapeFileNodeType ) ) {
- files.append( ((MountedTapeFileNode*)rangeableNode->childAt( i ))->getFullPath() );
+ if ( ((Node*)rangeableNode->tqchildAt( i ))->isType( Node::MountedTapeDirectoryNodeType ) ) {
+ files.append( ((MountedTapeDirectoryNode*)rangeableNode->tqchildAt( i ))->getFullPath() );
+ } else if ( ((Node*)rangeableNode->tqchildAt( i ))->isType( Node::MountedTapeFileNodeType ) ) {
+ files.append( ((MountedTapeFileNode*)rangeableNode->tqchildAt( i ))->getFullPath() );
} else {
assert( FALSE );
}
@@ -627,14 +627,14 @@ void KDatMainWindow::doVerify( bool restore )
// Compile a list of files to verify/restore.
TQPtrStack<RangeableNode> stack;
- // Make sure the mounted archive node has populated its children.
+ // Make sure the mounted archive node has populated its tqchildren.
if ( archiveNode->childCount() == 0 ) {
bool dummy = TRUE;
archiveNode->expanding( dummy );
}
for ( int i = archiveNode->childCount() - 1; i >= 0; i-- ) {
- stack.push( (RangeableNode*)archiveNode->childAt( i ) );
+ stack.push( (RangeableNode*)archiveNode->tqchildAt( i ) );
}
RangeableNode* sel = 0;
while ( stack.count() > 0 ) {
@@ -654,7 +654,7 @@ void KDatMainWindow::doVerify( bool restore )
}
} else if ( sel->hasSelectedChildren() ) {
for ( int i = sel->childCount() - 1; i >= 0; i-- ) {
- stack.push( (RangeableNode*)sel->childAt( i ) );
+ stack.push( (RangeableNode*)sel->tqchildAt( i ) );
}
}
}
@@ -697,7 +697,7 @@ void KDatMainWindow::fileMountTape()
"correct device is selected as the tape drive (e.g.\n"
"/dev/st0). If you hear the tape drive moving, wait\n"
"until it stops and then try mounting it again.")
- .arg(Options::instance()->getTapeDevice());
+ .tqarg(Options::instance()->getTapeDevice());
if ( !TapeManager::instance()->getMountedTape() ) {
if ( Options::instance()->getLoadOnMount() ) {
@@ -727,7 +727,7 @@ void KDatMainWindow::fileIndexTape()
IndexDlg dlg( TapeManager::instance()->getMountedTape(), this );
if ( dlg.exec() == TQDialog::Accepted ) {
TQString title;
- title = i18n( "KDat: %1" ).arg( TapeManager::instance()->getMountedTape()->getName() );
+ title = i18n( "KDat: %1" ).tqarg( TapeManager::instance()->getMountedTape()->getName() );
setCaption( title );
setIconText( title );
@@ -776,7 +776,7 @@ void KDatMainWindow::fileDeleteArchive()
}
TQString msg =
- i18n( "An archive cannot be removed from the middle of the tape. If\nthe archive '%1' is deleted then\nthe following archives will also be deleted:\n%2\n\nDelete all listed archives?" ).arg(archive->getName()).arg(list);
+ i18n( "An archive cannot be removed from the middle of the tape. If\nthe archive '%1' is deleted then\nthe following archives will also be deleted:\n%2\n\nDelete all listed archives?" ).tqarg(archive->getName()).tqarg(list);
int result = KMessageBox::warningContinueCancel( this,
msg, i18n("Delete Archive"), i18n("Delete All"));
if (result == KMessageBox::Continue) {
@@ -790,7 +790,7 @@ void KDatMainWindow::fileDeleteArchive()
} else {
// This is the last (known) archive on the tape.
TQString msg =
- i18n( "Really delete the archive '%1'?" ).arg(archive->getName());
+ i18n( "Really delete the archive '%1'?" ).tqarg(archive->getName());
int result = KMessageBox::warningContinueCancel( this,
msg, i18n("Delete Archive"), i18n("Delete"));
if (result == KMessageBox::Continue) {
@@ -824,7 +824,7 @@ void KDatMainWindow::fileDeleteIndex()
}
TQString msg =
- i18n( "Really delete the index for '%1'?" ).arg(tape->getName());
+ i18n( "Really delete the index for '%1'?" ).tqarg(tape->getName());
int result = KMessageBox::warningContinueCancel( this,
msg, i18n("Delete Tape Index"), i18n("Delete"));
if (result == KMessageBox::Continue) {
@@ -847,7 +847,7 @@ void KDatMainWindow::fileFormatTape()
"correct device is selected as the tape drive (e.g.\n"
"/dev/st0). If you hear the tape drive moving, wait\n"
"until it stops and then try mounting it again.")
- .arg(Options::instance()->getTapeDevice());
+ .tqarg(Options::instance()->getTapeDevice());
if ( !TapeDrive::instance()->isTapePresent() ) {
KMessageBox::sorry( this, msg );
@@ -865,7 +865,7 @@ void KDatMainWindow::fileFormatTape()
i18n("Format Tape"), i18n("Format"));
if (result == KMessageBox::Continue ) {
TQString name;
- name = i18n( "Tape created on %1" ).arg( KGlobal::locale()->formatDate(TQDate::currentDate(), true) );
+ name = i18n( "Tape created on %1" ).tqarg( KGlobal::locale()->formatDate(TQDate::tqcurrentDate(), true) );
FormatOptDlg dlg( name.stripWhiteSpace(), this );
if ( dlg.exec() != TQDialog::Accepted ) {
return;
@@ -898,7 +898,7 @@ void KDatMainWindow::fileNewBackupProfile()
// Pick a unique name.
TQString name;
for ( int i = 1; ; i++ ) {
- name = i18n( "Backup Profile %1").arg( i );
+ name = i18n( "Backup Profile %1").tqarg( i );
TQStringList list = BackupProfileManager::instance()->getBackupProfileNames();
TQStringList::Iterator it = list.begin();
for ( ; it != list.end(); ++it ) {
@@ -946,7 +946,7 @@ void KDatMainWindow::fileDeleteBackupProfile()
assert( backupProfile );
TQString msg =
- i18n("Really delete backup profile '%1'?").arg(backupProfile->getName());
+ i18n("Really delete backup profile '%1'?").tqarg(backupProfile->getName());
int result = KMessageBox::warningContinueCancel( this,
msg, i18n("Delete Backup Profile"), i18n("Delete"));
if (result == KMessageBox::Continue) {
@@ -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?" ), TQString::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(), i18n("Format"), i18n("Do Not Format"));
if (result == KMessageBox::Yes) {
fileFormatTape();
return;
@@ -1098,19 +1098,19 @@ int KDatMainWindow::calcBackupSize( const TQString& workingDir, bool local, cons
TQString msg;
// msg.truncate( 4095 );
TQDir dir;
- const QFileInfoList* infoList;
+ const TQFileInfoList* infoList;
while ( !dirStack.isEmpty() ) {
if( stop_flag == TRUE ) break;
TQString* path = dirStack.pop();
msg = i18n("Estimating backup size: %1, %2" )
- .arg(Util::kbytesToString( size / 2 ))
- .arg(KStringHandler::csqueeze(*path, 60));
+ .tqarg(Util::kbytesToString( size / 2 ))
+ .tqarg(KStringHandler::csqueeze(*path, 60));
status( msg );
KApplication::kApplication()->processEvents();
dir.setPath( *path );
infoList = dir.entryInfoList( TQDir::Hidden | TQDir::Files | TQDir::Dirs, 0 );
if ( infoList ) {
- QFileInfoListIterator i( *infoList );
+ TQFileInfoListIterator i( *infoList );
for ( ; i.current(); ++i ) {
if ( ( i.current()->fileName() != "." ) && ( i.current()->fileName() != ".." ) ) {
size++;
@@ -1165,7 +1165,7 @@ void KDatMainWindow::getBackupFiles( TQStringList& files )
files.append( sel->getFullPath() );
} else if ( sel->hasSelectedChildren() ) {
for ( int i = sel->childCount() - 1; i >= 0; i-- ) {
- stack.push( (ArchiveableNode*)sel->childAt( i ) );
+ stack.push( (ArchiveableNode*)sel->tqchildAt( i ) );
}
}
}
@@ -1192,9 +1192,9 @@ void KDatMainWindow::setBackupFiles( const TQStringList& files )
}
int i;
for ( i = n->childCount() - 1; i >=0; i-- ) {
- tmp = ((ArchiveableNode*)n->childAt( i ))->getFullPath();
+ tmp = ((ArchiveableNode*)n->tqchildAt( i ))->getFullPath();
if ( tmp == (*it).left( tmp.length() ) ) {
- n = (ArchiveableNode*)n->childAt( i );
+ n = (ArchiveableNode*)n->tqchildAt( i );
break;
}
}
@@ -1232,7 +1232,7 @@ void KDatMainWindow::configureUI( Tape* tape )
// Title bar
if ( tape ) {
TQString title;
- title = i18n( "KDat: %1" ).arg(tape->getName());
+ title = i18n( "KDat: %1" ).tqarg(tape->getName());
setCaption( title );
setIconText( title );
} else {
@@ -1251,8 +1251,8 @@ void KDatMainWindow::configureUI( Tape* tape )
bool canRestore = ( tape ) && ( sel ) && sel->isType( Node::RangeableNodeType );
if ( !canRestore ) {
for ( int i = _tapeDriveNode->childCount() - 1; i >= 0; i-- ) {
- if ( ( ((SelectableNode*)_tapeDriveNode->childAt( i ))->isSelected() ) ||
- ( ((SelectableNode*)_tapeDriveNode->childAt( i ))->hasSelectedChildren() )) {
+ if ( ( ((SelectableNode*)_tapeDriveNode->tqchildAt( i ))->isSelected() ) ||
+ ( ((SelectableNode*)_tapeDriveNode->tqchildAt( i ))->hasSelectedChildren() )) {
canRestore = TRUE;
break;
}
@@ -1263,10 +1263,10 @@ void KDatMainWindow::configureUI( Tape* tape )
// even if sel==NULL when a child is selected (see loop above).
if( sel != (Node *)0x0 )
{
- for ( Node* parent = (Node*)sel->getParent();
- ( parent ) && ( parent->getParent() );
- parent = (Node*)parent->getParent() ) {
- if ( parent->isType( Node::TapeNodeType ) ) {
+ for ( Node* tqparent = (Node*)sel->getParent();
+ ( tqparent ) && ( tqparent->getParent() );
+ tqparent = (Node*)tqparent->getParent() ) {
+ if ( tqparent->isType( Node::TapeNodeType ) ) {
canRestore = FALSE;
}
}
@@ -1348,7 +1348,7 @@ void KDatMainWindow::create_backup_dialog()
_lbl->setGeometry( TQRect( 30, 20, 350, 200 ) );
_cancel = new KPushButton( KStdGuiItem::cancel(), _backupdialog );
- _cancel->setFixedSize( 80, _cancel->sizeHint().height() );
+ _cancel->setFixedSize( 80, _cancel->tqsizeHint().height() );
_cancel->setEnabled( TRUE );
/* 2002-01-24 LEW: looks like we can't increase the button width
to accomodate a wider message :( */
@@ -1357,7 +1357,7 @@ void KDatMainWindow::create_backup_dialog()
connect( _cancel, TQT_SIGNAL( clicked() ), this, TQT_SLOT( backupCancel() ) );
_continue = new KPushButton( KStdGuiItem::cont(), _backupdialog );
- _continue->setFixedSize( 80, _continue->sizeHint().height() );
+ _continue->setFixedSize( 80, _continue->tqsizeHint().height() );
_continue->setEnabled( TRUE );
_continue->setDefault( TRUE );
// _continue->setGeometry( TQRect( 200, 170, 0, 0 ) ); /* 2002-01-28 LEW */
diff --git a/kdat/KDatMainWindow.h b/kdat/KDatMainWindow.h
index 7855923..022e856 100644
--- a/kdat/KDatMainWindow.h
+++ b/kdat/KDatMainWindow.h
@@ -53,6 +53,7 @@ class TapeInfoWidget;
*/
class KDatMainWindow : public KMainWindow {
Q_OBJECT
+ TQ_OBJECT
private:
bool _destroyed;
diff --git a/kdat/LoggerWidget.cpp b/kdat/LoggerWidget.cpp
index 11921c2..2412104 100644
--- a/kdat/LoggerWidget.cpp
+++ b/kdat/LoggerWidget.cpp
@@ -29,11 +29,11 @@
#include "LoggerWidget.moc"
-LoggerWidget::LoggerWidget( const TQString & title, TQWidget* parent, const char* name )
- : TQWidget( parent, name )
+LoggerWidget::LoggerWidget( const TQString & title, TQWidget* tqparent, const char* name )
+ : TQWidget( tqparent, name )
{
TQLabel* lbl1 = new TQLabel( title, this );
- lbl1->setFixedHeight( lbl1->sizeHint().height() );
+ lbl1->setFixedHeight( lbl1->tqsizeHint().height() );
_mle = new TQMultiLineEdit( this );
_mle->setReadOnly( TRUE );
@@ -55,7 +55,7 @@ void LoggerWidget::append( const TQString & text )
void LoggerWidget::save()
{
- TQString file = KFileDialog::getSaveFileName( TQString::null, TQString::null, this );
+ TQString file = KFileDialog::getSaveFileName( TQString(), TQString(), this );
if ( !file.isNull() ) {
TQFile f( file );
if ( f.exists() ) {
diff --git a/kdat/LoggerWidget.h b/kdat/LoggerWidget.h
index fed21c0..d649e65 100644
--- a/kdat/LoggerWidget.h
+++ b/kdat/LoggerWidget.h
@@ -28,16 +28,17 @@ class TQMultiLineEdit;
*/
class LoggerWidget : public TQWidget {
Q_OBJECT
+ TQ_OBJECT
TQMultiLineEdit* _mle;
public:
/**
* Create a titled logging widget
*
* @param title The title text displayed above the logging window.
- * @param parent The parent widget.
+ * @param tqparent The tqparent widget.
* @param name The name of this widget.
*/
- LoggerWidget( const TQString & title, TQWidget* parent = 0, const char* name = 0 );
+ LoggerWidget( const TQString & title, TQWidget* tqparent = 0, const char* name = 0 );
/**
* Destroy the logging widget.
diff --git a/kdat/Node.cpp b/kdat/Node.cpp
index 7e42855..7999c9d 100644
--- a/kdat/Node.cpp
+++ b/kdat/Node.cpp
@@ -58,7 +58,7 @@ void Node::insertNode( Node* child )
if ( lastParent != this ) {
// Recompute lastDirIndex.
for ( lastDirIndex = 0;
- ( lastDirIndex < childCount() ) && ( ((Node*)childAt( lastDirIndex ))->getType() == TapeDirectoryNodeType );
+ ( lastDirIndex < childCount() ) && ( ((Node*)tqchildAt( lastDirIndex ))->getType() == TapeDirectoryNodeType );
lastDirIndex++ );
lastParent = this;
}
@@ -83,7 +83,7 @@ void Node::insertNode( Node* child )
while ( min < max ) {
mid = ( max - min ) / 2 + min;
//mid = ( min + max ) / 2;
- if ( child->getText().compare( childAt( mid )->getText() ) < 0 ) {
+ if ( child->getText().compare( tqchildAt( mid )->getText() ) < 0 ) {
max = mid - 1;
} else {
min = mid + 1;
@@ -94,8 +94,8 @@ void Node::insertNode( Node* child )
// KLUDGE!
mid -= 5;
if ( mid < smin ) mid = smin;
- if ( ((Node*)childAt( mid ))->getType() != child->getType() ) mid++;
- for ( ; ( mid <= smax ) && ( child->getText().compare( childAt( mid )->getText() ) > 0 ); mid++ );
+ if ( ((Node*)tqchildAt( mid ))->getType() != child->getType() ) mid++;
+ for ( ; ( mid <= smax ) && ( child->getText().compare( tqchildAt( mid )->getText() ) > 0 ); mid++ );
//printf( "index = %d, text = '%s'\n", mid, child->getText().data() );
insertChild( mid, child );
} else {
@@ -181,14 +181,14 @@ bool TapeNode::validate()
// Remove deleted archives.
Archive* a;
for ( uint j = 0; j < childCount(); ) {
- a = ((ArchiveNode*)childAt( j ))->getArchive();
+ a = ((ArchiveNode*)tqchildAt( j ))->getArchive();
for ( i.toFirst(); i.current(); ++i ) {
if ( i.current() == a ) {
break;
}
}
if ( !i.current() ) {
- removeChild( childAt( j ) );
+ removeChild( tqchildAt( j ) );
} else {
j++;
}
@@ -211,7 +211,7 @@ void TapeNode::expanding( bool expand )
expand = TRUE;
if ( childCount() > 0 ) {
- // We already have the children added
+ // We already have the tqchildren added
return;
}
@@ -235,8 +235,8 @@ ArchiveNode* TapeNode::findArchiveNode( Archive* archive )
{
ArchiveNode* n = 0;
for ( uint i = 0; i < childCount(); i++ ) {
- if ( ((ArchiveNode*)childAt( i ))->getArchive() == archive ) {
- n = (ArchiveNode*)childAt( i );
+ if ( ((ArchiveNode*)tqchildAt( i ))->getArchive() == archive ) {
+ n = (ArchiveNode*)tqchildAt( i );
break;
}
}
@@ -280,7 +280,7 @@ void ArchiveNode::expanding( bool expand )
expand = TRUE;
if ( childCount() > 0 ) {
- // We already have the children added.
+ // We already have the tqchildren added.
return;
}
@@ -311,7 +311,7 @@ TapeDirectoryNode::TapeDirectoryNode( File* file )
setDelayedExpanding( TRUE );
int len = _file->getName().length();
- int idx1 = _file->getName().findRev( '/', len - 2 );
+ int idx1 = _file->getName().tqfindRev( '/', len - 2 );
if ( idx1 < 0 ) {
setText( _file->getName().left( len - 1 ) );
} else {
@@ -338,7 +338,7 @@ void TapeDirectoryNode::expanding( bool expand )
expand = TRUE;
if ( childCount() > 0 ) {
- // We already have the children added.
+ // We already have the tqchildren added.
return;
}
@@ -372,7 +372,7 @@ TapeFileNode::TapeFileNode( File* file )
_file( file )
{
int len = _file->getName().length();
- int idx1 = _file->getName().findRev( '/', len - 1 );
+ int idx1 = _file->getName().tqfindRev( '/', len - 1 );
if ( idx1 < 0 ) {
setText( _file->getName().left( len ) );
} else {
@@ -411,7 +411,7 @@ void SelectableNode::doUpdateState()
bool hasSelected = FALSE;
bool allSelected = TRUE;
for ( uint i = 0; i < childCount(); i++ ) {
- switch ( ((SelectableNode*)childAt( i ))->_state ) {
+ switch ( ((SelectableNode*)tqchildAt( i ))->_state ) {
case SelAll:
oneSelected = TRUE;
hasSelected = TRUE;
@@ -443,15 +443,15 @@ void SelectableNode::doUpdateState()
void SelectableNode::doSetSelected( bool select )
{
- // All my children get the same selection state.
+ // All my tqchildren get the same selection state.
for ( uint i = 0; i < childCount(); i++ ) {
if ( select ) {
- if ( !((SelectableNode*)childAt( i ))->isSelected() ) {
- ((SelectableNode*)childAt( i ))->doSetSelected( TRUE );
+ if ( !((SelectableNode*)tqchildAt( i ))->isSelected() ) {
+ ((SelectableNode*)tqchildAt( i ))->doSetSelected( TRUE );
}
} else {
- if ( ((SelectableNode*)childAt( i ))->isSelected() || ((SelectableNode*)childAt( i ))->hasSelectedChildren() ) {
- ((SelectableNode*)childAt( i ))->doSetSelected( FALSE );
+ if ( ((SelectableNode*)tqchildAt( i ))->isSelected() || ((SelectableNode*)tqchildAt( i ))->hasSelectedChildren() ) {
+ ((SelectableNode*)tqchildAt( i ))->doSetSelected( FALSE );
}
}
}
@@ -482,7 +482,7 @@ const TQPixmap* SelectableNode::getSelectPixmap() const
bool SelectableNode::mousePressEvent( const TQPoint& point )
{
- if ( _selectRect.contains( point ) ) {
+ if ( _selectRect.tqcontains( point ) ) {
switch ( _state ) {
case SelAll:
setSelected( FALSE );
@@ -549,7 +549,7 @@ void SelectableNode::paintText( TQPainter* p, int indent, int cellHeight,
p->fontMetrics().leading()) / 2);
if (highlighted) {
paintHighlight(p, indent, cg, owner->hasFocus(),
- (Qt::GUIStyle)owner->style().styleHint(TQStyle::SH_GUIStyle)); // Qt3 doesn't make this easy ;)
+ (TQt::GUIStyle)owner->tqstyle().tqstyleHint(TQStyle::SH_GUIStyle)); // TQt3 doesn't make this easy ;)
p->setPen(cg.base());
p->setBackgroundColor(cg.text());
}
@@ -605,7 +605,7 @@ void SelectableNode::setSelected( bool select )
((SelectableNode*)getParent())->doUpdateState();
}
- owner->repaint();
+ owner->tqrepaint();
KDatMainWindow::getInstance()->configureUI( TapeManager::instance()->getMountedTape() );
}
@@ -655,10 +655,10 @@ void MountedArchiveNode::setSelected( bool select )
{
if ( select ) {
// Deselect all other archives.
- Node* parent = (Node*)getParent();
- for ( int i = parent->childCount() - 1; i >= 0; i-- ) {
- if ( parent->childAt( i ) != this ) {
- ((SelectableNode*)parent->childAt( i ))->setSelected( FALSE );
+ Node* tqparent = (Node*)getParent();
+ for ( int i = tqparent->childCount() - 1; i >= 0; i-- ) {
+ if ( tqparent->tqchildAt( i ) != this ) {
+ ((SelectableNode*)tqparent->tqchildAt( i ))->setSelected( FALSE );
}
}
}
@@ -680,7 +680,7 @@ void MountedArchiveNode::expanding( bool expand )
expand = TRUE;
if ( childCount() > 0 ) {
- // We already have the children added.
+ // We already have the tqchildren added.
return;
}
@@ -713,7 +713,7 @@ MountedTapeDirectoryNode::MountedTapeDirectoryNode( File* file, int state )
setDelayedExpanding( TRUE );
int len = _file->getName().length();
- int idx1 = _file->getName().findRev( '/', len - 2 );
+ int idx1 = _file->getName().tqfindRev( '/', len - 2 );
if ( idx1 < 0 ) {
setText( _file->getName().left( len - 1 ) );
} else {
@@ -730,9 +730,9 @@ TQString MountedTapeDirectoryNode::getFullPath()
{
if ( _fullPath.length() == 0 ) {
_fullPath = getText() + "/";
- for ( Node* parent = (Node*)getParent(); !parent->isType( MountedArchiveNodeType ); parent = (Node*)parent->getParent() ) {
+ for ( Node* tqparent = (Node*)getParent(); !tqparent->isType( MountedArchiveNodeType ); tqparent = (Node*)tqparent->getParent() ) {
_fullPath.prepend( "/" );
- _fullPath.prepend( parent->getText() );
+ _fullPath.prepend( tqparent->getText() );
}
}
@@ -748,17 +748,17 @@ void MountedTapeDirectoryNode::setSelected( bool select )
{
if ( select ) {
// Deselect all other archives.
- Node* parent = (Node*)getParent();
+ Node* tqparent = (Node*)getParent();
Node* arcNode = 0;
- while ( !parent->isType( TapeDriveNodeType ) ) {
- if ( parent->isType( MountedArchiveNodeType ) ) {
- arcNode = parent;
+ while ( !tqparent->isType( TapeDriveNodeType ) ) {
+ if ( tqparent->isType( MountedArchiveNodeType ) ) {
+ arcNode = tqparent;
}
- parent = (Node*)parent->getParent();
+ tqparent = (Node*)tqparent->getParent();
}
- for ( int i = parent->childCount() - 1; i >= 0; i-- ) {
- if ( parent->childAt( i ) != arcNode ) {
- ((SelectableNode*)parent->childAt( i ))->setSelected( FALSE );
+ for ( int i = tqparent->childCount() - 1; i >= 0; i-- ) {
+ if ( tqparent->tqchildAt( i ) != arcNode ) {
+ ((SelectableNode*)tqparent->tqchildAt( i ))->setSelected( FALSE );
}
}
}
@@ -780,7 +780,7 @@ void MountedTapeDirectoryNode::expanding( bool expand )
expand = TRUE;
if ( childCount() > 0 ) {
- // We already have the children added.
+ // We already have the tqchildren added.
return;
}
@@ -819,7 +819,7 @@ MountedTapeFileNode::MountedTapeFileNode( File* file, int state )
_file( file )
{
int len = _file->getName().length();
- int idx1 = _file->getName().findRev( '/', len - 1 );
+ int idx1 = _file->getName().tqfindRev( '/', len - 1 );
if ( idx1 < 0 ) {
setText( _file->getName().left( len ) );
} else {
@@ -836,9 +836,9 @@ TQString MountedTapeFileNode::getFullPath()
{
if ( _fullPath.length() == 0 ) {
_fullPath = getText();
- for ( Node* parent = (Node*)getParent(); !parent->isType( MountedArchiveNodeType ); parent = (Node*)parent->getParent() ) {
+ for ( Node* tqparent = (Node*)getParent(); !tqparent->isType( MountedArchiveNodeType ); tqparent = (Node*)tqparent->getParent() ) {
_fullPath.prepend( "/" );
- _fullPath.prepend( parent->getText() );
+ _fullPath.prepend( tqparent->getText() );
}
}
@@ -854,17 +854,17 @@ void MountedTapeFileNode::setSelected( bool select )
{
if ( select ) {
// Deselect all other archives.
- Node* parent = (Node*)getParent();
+ Node* tqparent = (Node*)getParent();
Node* arcNode = 0;
- while ( !parent->isType( TapeDriveNodeType ) ) {
- if ( parent->isType( MountedArchiveNodeType ) ) {
- arcNode = parent;
+ while ( !tqparent->isType( TapeDriveNodeType ) ) {
+ if ( tqparent->isType( MountedArchiveNodeType ) ) {
+ arcNode = tqparent;
}
- parent = (Node*)parent->getParent();
+ tqparent = (Node*)tqparent->getParent();
}
- for ( int i = parent->childCount() - 1; i >= 0; i-- ) {
- if ( parent->childAt( i ) != arcNode ) {
- ((SelectableNode*)parent->childAt( i ))->setSelected( FALSE );
+ for ( int i = tqparent->childCount() - 1; i >= 0; i-- ) {
+ if ( tqparent->tqchildAt( i ) != arcNode ) {
+ ((SelectableNode*)tqparent->tqchildAt( i ))->setSelected( FALSE );
}
}
}
@@ -934,7 +934,7 @@ void RootNode::expanding( bool expand )
{
expand = TRUE;
- // If we already have some children, check to see if the directory has been modified.
+ // If we already have some tqchildren, check to see if the directory has been modified.
if ( childCount() > 0 ) {
struct stat statinfo;
if ( stat( "/", &statinfo ) < 0 ) {
@@ -950,7 +950,7 @@ void RootNode::expanding( bool expand )
_mtime = statinfo.st_mtime;
- // Remove all the children.
+ // Remove all the tqchildren.
Node* n;
while ( ( n = (Node*)getChild() ) ) {
removeChild( n );
@@ -975,10 +975,10 @@ void RootNode::expanding( bool expand )
return;
}
- // Fill in the child's children.
- const QFileInfoList* list = dir.entryInfoList( TQDir::Hidden | TQDir::Files | TQDir::Dirs, TQDir::Name | TQDir::DirsFirst );
+ // Fill in the child's tqchildren.
+ const TQFileInfoList* list = dir.entryInfoList( TQDir::Hidden | TQDir::Files | TQDir::Dirs, TQDir::Name | TQDir::DirsFirst );
if ( list ) {
- QFileInfoListIterator it( *list );
+ TQFileInfoListIterator it( *list );
for ( ; it.current(); ++it ) {
if ( ( it.current()->fileName() != "." ) && ( it.current()->fileName() != ".." ) ) {
if ( it.current()->isDir() ) {
@@ -1050,7 +1050,7 @@ void DirectoryNode::expanding( bool expand )
}
path.prepend( "/" );
- // If we already have some children, check to see if the directory has been modified.
+ // If we already have some tqchildren, check to see if the directory has been modified.
if ( childCount() > 0 ) {
struct stat statinfo;
if ( stat( TQFile::encodeName(path), &statinfo ) < 0 ) {
@@ -1066,7 +1066,7 @@ void DirectoryNode::expanding( bool expand )
_mtime = statinfo.st_mtime;
- // Remove all the children.
+ // Remove all the tqchildren.
Node* n;
while ( ( n = (Node*)getChild() ) ) {
removeChild( n );
@@ -1091,10 +1091,10 @@ void DirectoryNode::expanding( bool expand )
return;
}
- // Fill in the child's children.
- const QFileInfoList* list = dir.entryInfoList( TQDir::Hidden | TQDir::Files | TQDir::Dirs, TQDir::Name | TQDir::DirsFirst );
+ // Fill in the child's tqchildren.
+ const TQFileInfoList* list = dir.entryInfoList( TQDir::Hidden | TQDir::Files | TQDir::Dirs, TQDir::Name | TQDir::DirsFirst );
if ( list ) {
- QFileInfoListIterator it( *list );
+ TQFileInfoListIterator it( *list );
for ( ; it.current(); ++it ) {
if ( ( it.current()->fileName() != "." ) && ( it.current()->fileName() != ".." ) ) {
if ( it.current()->isDir() ) {
@@ -1210,7 +1210,7 @@ void TapeDriveNode::expanding( bool expand )
expand = TRUE;
if ( childCount() > 0 ) {
- // We already have the children added
+ // We already have the tqchildren added
return;
}
@@ -1254,7 +1254,7 @@ void TapeDriveNode::slotTapeUnmounted()
setPixmap( *ImageCache::instance()->getTapeUnmounted() );
setText( i18n( "<no tape>" ) );
- // Remove all the children.
+ // Remove all the tqchildren.
Node* n;
while ( ( n = (Node*)getChild() ) ) {
Node::removeChild( n );
@@ -1304,14 +1304,14 @@ void TapeDriveNode::slotTapeModified( Tape* tape )
// Remove deleted archives.
Archive* a;
for ( uint j = 0; j < childCount(); ) {
- a = ((MountedArchiveNode*)childAt( j ))->getArchive();
+ a = ((MountedArchiveNode*)tqchildAt( j ))->getArchive();
for ( i.toFirst(); i.current(); ++i ) {
if ( i.current() == a ) {
break;
}
}
if ( !i.current() ) {
- Node::removeChild( childAt( j ) );
+ Node::removeChild( tqchildAt( j ) );
} else {
j++;
}
@@ -1322,8 +1322,8 @@ MountedArchiveNode* TapeDriveNode::findArchiveNode( Archive* archive )
{
MountedArchiveNode* n = 0;
for ( uint i = 0; i < childCount(); i++ ) {
- if ( ((MountedArchiveNode*)childAt( i ))->getArchive() == archive ) {
- n = (MountedArchiveNode*)childAt( i );
+ if ( ((MountedArchiveNode*)tqchildAt( i ))->getArchive() == archive ) {
+ n = (MountedArchiveNode*)tqchildAt( i );
break;
}
}
@@ -1417,7 +1417,7 @@ TapeNode* TapeIndexRootNode::findTapeNode( Tape* tape )
{
TapeNode* n = 0;
for ( uint i = 0; i < childCount(); i++ ) {
- n = (TapeNode*)childAt( i );
+ n = (TapeNode*)tqchildAt( i );
if ( n->getTape() == tape ) {
return n;
}
@@ -1575,7 +1575,7 @@ BackupProfileNode* BackupProfileRootNode::findBackupProfileNode( BackupProfile*
{
BackupProfileNode* n = 0;
for ( uint i = 0; i < childCount(); i++ ) {
- n = (BackupProfileNode*)childAt( i );
+ n = (BackupProfileNode*)tqchildAt( i );
if ( n->getBackupProfile() == backupProfile ) {
return n;
}
diff --git a/kdat/Node.h b/kdat/Node.h
index e33f7f8..d2d0c26 100644
--- a/kdat/Node.h
+++ b/kdat/Node.h
@@ -90,7 +90,7 @@ public:
/**
* This method is called immediately before the node is to be expanded.
- * This method can be used to fill in the children of this node, or
+ * This method can be used to fill in the tqchildren of this node, or
* prevent the node from expanding. The default implementation does
* nothing.
*
@@ -359,7 +359,7 @@ public:
virtual bool isType( int type );
/**
- * Determine whether the node and all of its children are selected.
+ * Determine whether the node and all of its tqchildren are selected.
*
* @return TRUE if the node is selected, otherwise FALSE.
*/
@@ -373,7 +373,7 @@ public:
bool hasSelectedChildren();
/**
- * Select/deselect this node and all of its children.
+ * Select/deselect this node and all of its tqchildren.
*
* @param selected TRUE means the node will be selected, FALSE means the
* node will be deselected.
@@ -445,7 +445,7 @@ public:
virtual const TQPtrList<Range>& getRanges();
/**
- * Select/deselect this node and all of its children.
+ * Select/deselect this node and all of its tqchildren.
*
* @param selected TRUE means the node will be selected, FALSE means the
* node will be deselected.
@@ -516,7 +516,7 @@ public:
virtual const TQPtrList<Range>& getRanges();
/**
- * Select/deselect this node and all of its children.
+ * Select/deselect this node and all of its tqchildren.
*
* @param selected TRUE means the node will be selected, FALSE means the
* node will be deselected.
@@ -596,7 +596,7 @@ public:
virtual const TQPtrList<Range>& getRanges();
/**
- * Select/deselect this node and all of its children.
+ * Select/deselect this node and all of its tqchildren.
*
* @param selected TRUE means the node will be selected, FALSE means the
* node will be deselected.
@@ -817,6 +817,7 @@ public:
*/
class TapeDriveNode : public TQObject, public Node {
Q_OBJECT
+ TQ_OBJECT
MountedArchiveNode* findArchiveNode( Archive* archive );
public:
@@ -862,7 +863,7 @@ public slots:
/**
* Locate the child associated with the modified tape index, and make sure
- * that the displayed information (including all children) is updated.
+ * that the displayed information (including all tqchildren) is updated.
*
* @param tape A pointer to the tape index that was modified.
*/
@@ -874,6 +875,7 @@ public slots:
*/
class TapeIndexRootNode : public TQObject, public Node {
Q_OBJECT
+ TQ_OBJECT
TapeNode* findTapeNode( Tape* tape );
public:
@@ -922,7 +924,7 @@ public slots:
/**
* Locate the child associated with the modified tape index, and make sure
- * that the displayed information (including all children) is updated.
+ * that the displayed information (including all tqchildren) is updated.
*
* @param tape A pointer to the tape index that was modified.
*/
@@ -980,6 +982,7 @@ public:
*/
class BackupProfileRootNode : public TQObject, public Node {
Q_OBJECT
+ TQ_OBJECT
BackupProfileNode* findBackupProfileNode( BackupProfile* backupProfile );
public:
diff --git a/kdat/Options.h b/kdat/Options.h
index d9701ea..07e02a0 100644
--- a/kdat/Options.h
+++ b/kdat/Options.h
@@ -28,6 +28,7 @@ class KConfig;
*/
class Options : public TQObject {
Q_OBJECT
+ TQ_OBJECT
KConfig* _config;
int _defaultTapeSize;
int _tapeBlockSize;
diff --git a/kdat/OptionsDlg.cpp b/kdat/OptionsDlg.cpp
index f056bbf..31aec9c 100644
--- a/kdat/OptionsDlg.cpp
+++ b/kdat/OptionsDlg.cpp
@@ -34,9 +34,9 @@
#include <kglobal.h>
#include "OptionsDlg.moc"
-OptionsDlg::OptionsDlg( TQWidget* parent, const char* name )
+OptionsDlg::OptionsDlg( TQWidget* tqparent, const char* name )
: KDialogBase( Swallow, i18n ("Options"), Ok | Apply | Cancel,
- Ok, parent, name, true, true ), apply (0)
+ Ok, tqparent, name, true, true ), apply (0)
{
_baseWidget = new OptionsDlgWidget ( 0 );
setMainWidget (_baseWidget);
diff --git a/kdat/OptionsDlg.h b/kdat/OptionsDlg.h
index bd8a7de..b96fe8c 100644
--- a/kdat/OptionsDlg.h
+++ b/kdat/OptionsDlg.h
@@ -29,6 +29,7 @@ class OptionsDlgWidget;
*/
class OptionsDlg : public KDialogBase {
Q_OBJECT
+ TQ_OBJECT
private slots:
void slotOK();
void slotApply();
@@ -38,10 +39,10 @@ public:
/**
* Create a new options dialog.
*
- * @param parent The parent widget of the dialog.
+ * @param tqparent The tqparent widget of the dialog.
* @param name The name of the dialog.
*/
- OptionsDlg( TQWidget* parent = 0, const char* name = 0 );
+ OptionsDlg( TQWidget* tqparent = 0, const char* name = 0 );
/**
* Destroy the options dialog.
diff --git a/kdat/OptionsDlgWidget.ui b/kdat/OptionsDlgWidget.ui
index 5ace94d..4d8d6a7 100644
--- a/kdat/OptionsDlgWidget.ui
+++ b/kdat/OptionsDlgWidget.ui
@@ -1,7 +1,7 @@
<!DOCTYPE UI><UI version="3.2" stdsetdef="1">
<class>OptionsDlgWidget</class>
<author>Michael Pyne</author>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>OptionsDlgWidget</cstring>
</property>
@@ -20,9 +20,9 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout4</cstring>
+ <cstring>tqlayout4</cstring>
</property>
<vbox>
<property name="name">
@@ -31,9 +31,9 @@
<property name="margin">
<number>0</number>
</property>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout5</cstring>
+ <cstring>tqlayout5</cstring>
</property>
<grid>
<property name="name">
@@ -43,7 +43,7 @@
<property name="name">
<cstring>_defaultTapeSize</cstring>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>96</width>
<height>0</height>
@@ -60,7 +60,7 @@
<property name="name">
<cstring>_tapeBlockSize</cstring>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>96</width>
<height>0</height>
@@ -94,7 +94,7 @@
<string>This option chooses whether the default tape size to the left is in megabytes (MB) or gigabytes (GB).</string>
</property>
</widget>
- <widget class="QLabel" row="1" column="2">
+ <widget class="TQLabel" row="1" column="2">
<property name="name">
<cstring>textLabel3</cstring>
</property>
@@ -102,7 +102,7 @@
<string>bytes</string>
</property>
</widget>
- <widget class="QLabel" row="1" column="0">
+ <widget class="TQLabel" row="1" column="0">
<property name="name">
<cstring>textLabel2</cstring>
</property>
@@ -113,7 +113,7 @@
<cstring>_tapeBlockSize</cstring>
</property>
</widget>
- <widget class="QLabel" row="0" column="0">
+ <widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>textLabel1</cstring>
</property>
@@ -126,9 +126,9 @@
</widget>
</grid>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout1</cstring>
+ <cstring>tqlayout1</cstring>
</property>
<grid>
<property name="name">
@@ -153,7 +153,7 @@
<string>The location in the filesystem of the &lt;em&gt;non-rewinding&lt;/em&gt; tape device. The default is &lt;b&gt;/dev/tape&lt;/b&gt;.</string>
</property>
</widget>
- <widget class="QLabel" row="1" column="0">
+ <widget class="TQLabel" row="1" column="0">
<property name="name">
<cstring>textLabel5</cstring>
</property>
@@ -183,7 +183,7 @@
<string>This setting controls the command that KDat uses to perform the tape backup. The full path should be given. The default is &lt;b&gt;tar&lt;/b&gt;.</string>
</property>
</widget>
- <widget class="QLabel" row="0" column="0">
+ <widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>textLabel4</cstring>
</property>
@@ -196,7 +196,7 @@
</widget>
</grid>
</widget>
- <widget class="QButtonGroup">
+ <widget class="TQButtonGroup">
<property name="name">
<cstring>buttonGroup1</cstring>
</property>
@@ -207,7 +207,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>_loadOnMount</cstring>
</property>
@@ -223,7 +223,7 @@
This is required by some tape drives.</string>
</property>
</widget>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>_lockOnMount</cstring>
</property>
@@ -239,7 +239,7 @@ This is required by some tape drives.</string>
This doesn't work for all tape drives.</string>
</property>
</widget>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>_ejectOnUnmount</cstring>
</property>
@@ -255,7 +255,7 @@ This doesn't work for all tape drives.</string>
This option should not be used for floppy-tape drives.</string>
</property>
</widget>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>_variableBlockSize</cstring>
</property>
@@ -283,7 +283,7 @@ You must still specify the block size.</string>
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>0</height>
@@ -370,16 +370,16 @@ You must still specify the block size.</string>
<include location="global" impldecl="in implementation">kdialog.h</include>
<include location="local" impldecl="in implementation">OptionsDlgWidget.ui.h</include>
</includes>
-<signals>
+<Q_SIGNALS>
<signal>doBrowseTapeDevice()</signal>
<signal>doBrowseTarCommand()</signal>
<signal>valueChanged()</signal>
-</signals>
-<slots>
+</Q_SIGNALS>
+<Q_SLOTS>
<slot access="protected">slotValueChanged()</slot>
<slot access="protected">slotBrowseTapeDevice()</slot>
<slot access="protected">slotBrowseTarCommand()</slot>
-</slots>
-<layoutdefaults spacing="11" margin="6"/>
-<layoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/>
+</Q_SLOTS>
+<tqlayoutdefaults spacing="11" margin="6"/>
+<tqlayoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/>
</UI>
diff --git a/kdat/OptionsDlgWidget.ui.h b/kdat/OptionsDlgWidget.ui.h
index 6b2d4d8..32c7497 100644
--- a/kdat/OptionsDlgWidget.ui.h
+++ b/kdat/OptionsDlgWidget.ui.h
@@ -2,7 +2,7 @@
** ui.h extension file, included from the uic-generated form implementation.
**
** If you wish to add, delete or rename functions or slots use
-** Qt Designer which will update this file, preserving your code. Create an
+** TQt Designer which will update this file, preserving your code. Create an
** init() function in place of a constructor, and a destroy() function in
** place of a destructor.
*****************************************************************************/
diff --git a/kdat/RELEASE_NOTES b/kdat/RELEASE_NOTES
index 85314f8..adc1584 100644
--- a/kdat/RELEASE_NOTES
+++ b/kdat/RELEASE_NOTES
@@ -51,7 +51,7 @@
2002-01-21
- Added signal handler so user can have a chance to figure out what
- program was doing when it received one of the signals SIGHUP,
+ program was doing when it received one of the Q_SIGNALS SIGHUP,
SIGINT, SIGFPE, SIGSEGV, SIGTERM. The program can always be killed
with "kill -9 <pid>".
diff --git a/kdat/Tape.cpp b/kdat/Tape.cpp
index ff35d1a..1f762c3 100644
--- a/kdat/Tape.cpp
+++ b/kdat/Tape.cpp
@@ -216,7 +216,7 @@ void Tape::read()
default:
{
KMessageBox::sorry( KDatMainWindow::getInstance(),
- i18n( "The tape index file format is version %d. The index cannot be read by this version of KDat. Perhaps the tape index file was created by a newer version of KDat?" ).arg(version ),
+ i18n( "The tape index file format is version %d. The index cannot be read by this version of KDat. Perhaps the tape index file was created by a newer version of KDat?" ).tqarg(version ),
i18n("Tape Index") );
}
}
@@ -226,7 +226,7 @@ void Tape::readAll( int version )
{
read();
- TQPtrListIterator<Archive> i( _children );
+ TQPtrListIterator<Archive> i( _tqchildren );
for ( ; i.current(); ++i ) {
i.current()->readAll( version );
}
@@ -282,7 +282,7 @@ void Tape::write()
memset( buf, 0, 4096 );
memcpy( buf, _name.ascii(), _name.length() > 4095 ? 4095 : _name.length() );
fwrite( buf, sizeof( char ), 4096, _fptr );
- int ival = _children.count();
+ int ival = _tqchildren.count();
fwrite( &ival, sizeof( ival ), 1, _fptr );
// Fill in the archive offsets later...
@@ -292,7 +292,7 @@ void Tape::write()
}
//===== Write archives =====
- TQPtrListIterator<Archive> i( _children );
+ TQPtrListIterator<Archive> i( _tqchildren );
int count = 0;
for ( ; i.current(); ++i, count++ ) {
// Fill in the file offset.
@@ -346,7 +346,7 @@ const TQPtrList<Archive>& Tape::getChildren()
{
read();
- return _children;
+ return _tqchildren;
}
void Tape::setName( const TQString & name )
@@ -528,7 +528,7 @@ void Tape::addChild( Archive* archive )
archive->calcRanges();
- _children.append( archive );
+ _tqchildren.append( archive );
char buf[4096];
fseek( _fptr, 0, SEEK_END );
@@ -537,9 +537,9 @@ void Tape::addChild( Archive* archive )
fgets( buf, 4096, _fptr );
fgets( buf, 4096, _fptr );
fseek( _fptr, 12 + 4096, SEEK_CUR );
- int ival = _children.count();
+ int ival = _tqchildren.count();
fwrite( &ival, sizeof( ival ), 1, _fptr );
- fseek( _fptr, ( _children.count() - 1 ) * 4, SEEK_CUR );
+ fseek( _fptr, ( _tqchildren.count() - 1 ) * 4, SEEK_CUR );
fwrite( &here, sizeof( here ), 1, _fptr );
fseek( _fptr, here, SEEK_SET );
archive->write( _fptr );
@@ -559,21 +559,21 @@ void Tape::removeChild( Archive* archive )
{
read();
- while ( _children.last() != archive ) {
- _children.removeLast();
+ while ( _tqchildren.last() != archive ) {
+ _tqchildren.removeLast();
}
- _children.removeLast();
+ _tqchildren.removeLast();
char buf[4096];
fseek( _fptr, 0, SEEK_SET );
fgets( buf, 4096, _fptr );
fgets( buf, 4096, _fptr );
fseek( _fptr, 12 + 4096, SEEK_CUR );
- int ival = _children.count();
+ int ival = _tqchildren.count();
fwrite( &ival, sizeof( ival ), 1, _fptr );
int here;
if ( ival > 0 ) {
- fseek( _fptr, _children.count() * 4, SEEK_CUR );
+ fseek( _fptr, _tqchildren.count() * 4, SEEK_CUR );
fread( &here, sizeof( here ), 1, _fptr );
} else {
fseek( _fptr, MAX_NUM_ARCHIVES * 4, SEEK_CUR );
@@ -593,13 +593,13 @@ void Tape::removeChild( Archive* archive )
void Tape::clear()
{
- if ( _children.count() < 1 ) {
+ if ( _tqchildren.count() < 1 ) {
return;
}
- while ( _children.first() ) {
- delete _children.first();
- _children.removeFirst();
+ while ( _tqchildren.first() ) {
+ delete _tqchildren.first();
+ _tqchildren.removeFirst();
}
char buf[4096];
@@ -607,7 +607,7 @@ void Tape::clear()
fgets( buf, 4096, _fptr );
fgets( buf, 4096, _fptr );
fseek( _fptr, 12 + 4096, SEEK_CUR );
- int ival = _children.count();
+ int ival = _tqchildren.count();
fwrite( &ival, sizeof( ival ), 1, _fptr );
fseek( _fptr, MAX_NUM_ARCHIVES * 4, SEEK_CUR );
int here = ftell( _fptr );
@@ -711,7 +711,7 @@ void Tape::readVersion1Index( FILE* fptr )
Archive* archive = new Archive( this, archiveTimeStamp, archiveName );
archive->setEndBlock( archiveEndBlock - archiveStartBlock );
- _children.append( archive );
+ _tqchildren.append( archive );
// Read the number of files.
if ( !fgets( buf, 4096, fptr ) ) {
@@ -827,7 +827,7 @@ void Tape::readVersion2Index( FILE* fptr )
int ival;
for ( ; numArchives; numArchives-- ) {
fread( &ival, sizeof( ival ), 1, fptr );
- _children.append( new Archive( this, fptr, ival ) );
+ _tqchildren.append( new Archive( this, fptr, ival ) );
}
}
@@ -870,7 +870,7 @@ void Tape::readVersion3Index( FILE* fptr )
int ival;
for ( ; numArchives; numArchives-- ) {
fread( &ival, sizeof( ival ), 1, fptr );
- _children.append( new Archive( this, fptr, ival ) );
+ _tqchildren.append( new Archive( this, fptr, ival ) );
}
}
@@ -913,7 +913,7 @@ void Tape::readVersion4Index( FILE* fptr )
int ival;
for ( ; numArchives; numArchives-- ) {
fread( &ival, sizeof( ival ), 1, fptr );
- _children.append( new Archive( this, fptr, ival ) );
+ _tqchildren.append( new Archive( this, fptr, ival ) );
}
/* 2002-01-31 LEW */
diff --git a/kdat/Tape.h b/kdat/Tape.h
index 335619c..153561e 100644
--- a/kdat/Tape.h
+++ b/kdat/Tape.h
@@ -34,7 +34,7 @@ class Tape {
int _mtime;
TQString _name;
int _size;
- TQPtrList<Archive> _children;
+ TQPtrList<Archive> _tqchildren;
FILE* _fptr;
@@ -148,7 +148,7 @@ public:
void removeChild( Archive* archive );
/**
- * Recursively destroy all children of the tape index.
+ * Recursively destroy all tqchildren of the tape index.
*/
void clear();
};
diff --git a/kdat/TapeDrive.cpp b/kdat/TapeDrive.cpp
index 2e4c59b..4fbcb25 100644
--- a/kdat/TapeDrive.cpp
+++ b/kdat/TapeDrive.cpp
@@ -170,15 +170,15 @@ bool TapeDrive::isTapePresent()
}
// Get tape status.
- struct mtget tapeStatus;
- int ret = ioctl( _fd, MTIOCGET, &tapeStatus );
+ struct mtget tapetqStatus;
+ int ret = ioctl( _fd, MTIOCGET, &tapetqStatus );
if ( ret < 0 ) {
return FALSE;
}
// Check for the presence of a tape.
-// if ( !GMT_DR_OPEN( tapeStatus.mt_gstat ) ) {
- if ( GMT_ONLINE( tapeStatus.mt_gstat ) ) {
+// if ( !GMT_DR_OPEN( tapetqStatus.mt_gstat ) ) {
+ if ( GMT_ONLINE( tapetqStatus.mt_gstat ) ) {
// Lock the tape drive door.
//struct mtop tapeOp;
//tapeOp.mt_op = MTLOCK;
@@ -189,9 +189,9 @@ bool TapeDrive::isTapePresent()
//}
if ( _readOnly ) {
- emit sigStatus( i18n( "Tape mounted readonly." ) );
+ emit sigtqStatus( i18n( "Tape mounted readonly." ) );
} else {
- emit sigStatus( i18n( "Tape mounted read/write." ) );
+ emit sigtqStatus( i18n( "Tape mounted read/write." ) );
}
return TRUE;
} else {
@@ -221,14 +221,14 @@ Tape* TapeDrive::readHeader()
_tape = NULL;
// Rewind tape.
- emit sigStatus( "Rewinding tape..." );
+ emit sigtqStatus( "Rewinding tape..." );
if ( !rewind() ) {
KMessageBox::error( KDatMainWindow::getInstance(), i18n( "Rewinding tape failed." ));
return NULL;
}
// KDat magic string.
- emit sigStatus( i18n( "Reading magic string..." ) );
+ emit sigtqStatus( i18n( "Reading magic string..." ) );
char magic[9];
if ( read( magic, 9 ) < 9 ) {
KMessageBox::error( KDatMainWindow::getInstance(), i18n( "Reading magic string failed." ));
@@ -240,7 +240,7 @@ Tape* TapeDrive::readHeader()
}
// Read version number.
- emit sigStatus( i18n( "Reading version number..." ) );
+ emit sigtqStatus( i18n( "Reading version number..." ) );
int version;
if ( read( (char*)&version, 4 ) < 4 ) {
KMessageBox::error( KDatMainWindow::getInstance(), i18n( "Reading version number failed." ));
@@ -252,7 +252,7 @@ Tape* TapeDrive::readHeader()
}
// Read tape ID.
- emit sigStatus( i18n( "Reading tape ID..." ) );
+ emit sigtqStatus( i18n( "Reading tape ID..." ) );
int len;
if ( read( (char*)&len, 4 ) < 4 ) {
KMessageBox::error( KDatMainWindow::getInstance(), i18n( "Reading tape ID length failed." ));
@@ -517,12 +517,12 @@ bool TapeDrive::seek( int file, int tarBlock )
flush();
// Go to the desired archive.
- emit sigStatus( i18n( "Skipping to archive..." ) );
+ emit sigtqStatus( i18n( "Skipping to archive..." ) );
int curFile = getFile();
// printf( "TapeDrive::seek() -- curFile = %d\n", curFile );
if ( curFile < 0 ) {
- emit sigStatus( i18n( "Rewinding tape..." ) );
+ emit sigtqStatus( i18n( "Rewinding tape..." ) );
rewind();
curFile = 0;
}
@@ -539,11 +539,11 @@ bool TapeDrive::seek( int file, int tarBlock )
// printf( "TapeDrive::seek() -- desired tapeBlock = %d\n", tapeBlock );
// Go to the desired record within the archive.
- emit sigStatus( i18n( "Skipping to block..." ) );
+ emit sigtqStatus( i18n( "Skipping to block..." ) );
int curBlock = getBlock();
// printf( "TapeDrive::seek() -- curBlock = %d\n", curBlock );
if ( curBlock < 0 ) {
- emit sigStatus( i18n( "Rewinding tape..." ) );
+ emit sigtqStatus( i18n( "Rewinding tape..." ) );
rewind();
nextFile( file );
if ( ( curBlock = getBlock() ) < 0 ) {
@@ -597,13 +597,13 @@ bool TapeDrive::pastEOF()
return FALSE;
}
- struct mtget tapeStatus;
- if ( ioctl( _fd, MTIOCGET, &tapeStatus ) < 0 ) {
+ struct mtget tapetqStatus;
+ if ( ioctl( _fd, MTIOCGET, &tapetqStatus ) < 0 ) {
printf( "TapeDrive::pastEOF() -- ioctl( MTIOCGET ) failed!\n" );
return FALSE;
}
- return GMT_EOF( tapeStatus.mt_gstat );
+ return GMT_EOF( tapetqStatus.mt_gstat );
}
bool TapeDrive::setBlockSize( int blockSize )
diff --git a/kdat/TapeDrive.h b/kdat/TapeDrive.h
index b777bc0..06a0b82 100644
--- a/kdat/TapeDrive.h
+++ b/kdat/TapeDrive.h
@@ -28,6 +28,7 @@ class Tape;
*/
class TapeDrive : public TQObject {
Q_OBJECT
+ TQ_OBJECT
int _fd;
bool _readOnly;
Tape* _tape;
@@ -241,7 +242,7 @@ signals:
*
* @param msg The informational message.
*/
- void sigStatus( const TQString & msg );
+ void sigtqStatus( const TQString & msg );
};
#endif
diff --git a/kdat/TapeFileInfoWidget.cpp b/kdat/TapeFileInfoWidget.cpp
index 239d7f1..57ba85a 100644
--- a/kdat/TapeFileInfoWidget.cpp
+++ b/kdat/TapeFileInfoWidget.cpp
@@ -30,8 +30,8 @@
#include "TapeFileInfoWidget.moc"
-TapeFileInfoWidget::TapeFileInfoWidget( TQWidget* parent, const char* name )
- : TQWidget( parent, name )
+TapeFileInfoWidget::TapeFileInfoWidget( TQWidget* tqparent, const char* name )
+ : TQWidget( tqparent, name )
{
TQLabel* lbl1 = new TQLabel( i18n( "File name:" ), this );
TQLabel* lbl2 = new TQLabel( i18n( "Last modified:" ), this );
@@ -39,32 +39,32 @@ TapeFileInfoWidget::TapeFileInfoWidget( TQWidget* parent, const char* name )
TQLabel* lbl4 = new TQLabel( i18n( "Start record:" ), this );
TQLabel* lbl5 = new TQLabel( i18n( "End record:" ), this );
- int max = lbl1->sizeHint().width();
- if ( lbl2->sizeHint().width() > max ) max = lbl2->sizeHint().width();
- if ( lbl3->sizeHint().width() > max ) max = lbl3->sizeHint().width();
- if ( lbl4->sizeHint().width() > max ) max = lbl4->sizeHint().width();
- if ( lbl5->sizeHint().width() > max ) max = lbl5->sizeHint().width();
+ int max = lbl1->tqsizeHint().width();
+ if ( lbl2->tqsizeHint().width() > max ) max = lbl2->tqsizeHint().width();
+ if ( lbl3->tqsizeHint().width() > max ) max = lbl3->tqsizeHint().width();
+ if ( lbl4->tqsizeHint().width() > max ) max = lbl4->tqsizeHint().width();
+ if ( lbl5->tqsizeHint().width() > max ) max = lbl5->tqsizeHint().width();
- lbl1->setFixedSize( max, lbl1->sizeHint().height() );
- lbl2->setFixedSize( max, lbl2->sizeHint().height() );
- lbl3->setFixedSize( max, lbl3->sizeHint().height() );
- lbl4->setFixedSize( max, lbl4->sizeHint().height() );
- lbl5->setFixedSize( max, lbl5->sizeHint().height() );
+ lbl1->setFixedSize( max, lbl1->tqsizeHint().height() );
+ lbl2->setFixedSize( max, lbl2->tqsizeHint().height() );
+ lbl3->setFixedSize( max, lbl3->tqsizeHint().height() );
+ lbl4->setFixedSize( max, lbl4->tqsizeHint().height() );
+ lbl5->setFixedSize( max, lbl5->tqsizeHint().height() );
_fileName = new TQLabel( "???", this );
- _fileName->setFixedHeight( _fileName->sizeHint().height() );
+ _fileName->setFixedHeight( _fileName->tqsizeHint().height() );
_mtime = new TQLabel( "???", this );
- _mtime->setFixedHeight( _mtime->sizeHint().height() );
+ _mtime->setFixedHeight( _mtime->tqsizeHint().height() );
_size = new TQLabel( "???", this );
- _size->setFixedHeight( _size->sizeHint().height() );
+ _size->setFixedHeight( _size->tqsizeHint().height() );
_startRecord = new TQLabel( "???", this );
- _startRecord->setFixedHeight( _startRecord->sizeHint().height() );
+ _startRecord->setFixedHeight( _startRecord->tqsizeHint().height() );
_endRecord = new TQLabel( "???", this );
- _endRecord->setFixedHeight( _endRecord->sizeHint().height() );
+ _endRecord->setFixedHeight( _endRecord->tqsizeHint().height() );
TQVBoxLayout* l1 = new TQVBoxLayout( this, 4, 4 );
diff --git a/kdat/TapeFileInfoWidget.h b/kdat/TapeFileInfoWidget.h
index 9098fb0..e6f605e 100644
--- a/kdat/TapeFileInfoWidget.h
+++ b/kdat/TapeFileInfoWidget.h
@@ -30,6 +30,7 @@ class File;
*/
class TapeFileInfoWidget : public TQWidget {
Q_OBJECT
+ TQ_OBJECT
File* _file;
TQLabel* _fileName;
TQLabel* _mtime;
@@ -40,10 +41,10 @@ public:
/**
* Create a new tape file info widget.
*
- * @param parent The parent widget.
+ * @param tqparent The tqparent widget.
* @param name The name of this widget.
*/
- TapeFileInfoWidget( TQWidget* parent = 0, const char* name = 0 );
+ TapeFileInfoWidget( TQWidget* tqparent = 0, const char* name = 0 );
/**
* Destroy the tape file info widget.
diff --git a/kdat/TapeInfoWidget.cpp b/kdat/TapeInfoWidget.cpp
index 1455743..933b504 100644
--- a/kdat/TapeInfoWidget.cpp
+++ b/kdat/TapeInfoWidget.cpp
@@ -37,8 +37,8 @@
#include "TapeInfoWidget.moc"
-TapeInfoWidget::TapeInfoWidget( TQWidget* parent, const char* name )
- : TQWidget( parent, name ),
+TapeInfoWidget::TapeInfoWidget( TQWidget* tqparent, const char* name )
+ : TQWidget( tqparent, name ),
_tape( 0 )
{
TQLabel* lbl1 = new TQLabel( i18n( "Tape name:" ), this );
@@ -49,50 +49,50 @@ TapeInfoWidget::TapeInfoWidget( TQWidget* parent, const char* name )
TQLabel* lbl6 = new TQLabel( i18n( "Archive count:" ), this );
TQLabel* lbl7 = new TQLabel( i18n( "Space used:" ), this );
- int max = lbl1->sizeHint().width();
- if ( lbl2->sizeHint().width() > max ) max = lbl2->sizeHint().width();
- if ( lbl3->sizeHint().width() > max ) max = lbl3->sizeHint().width();
- if ( lbl4->sizeHint().width() > max ) max = lbl4->sizeHint().width();
- if ( lbl5->sizeHint().width() > max ) max = lbl5->sizeHint().width();
- if ( lbl6->sizeHint().width() > max ) max = lbl6->sizeHint().width();
- if ( lbl7->sizeHint().width() > max ) max = lbl7->sizeHint().width();
-
- lbl1->setFixedSize( max, lbl1->sizeHint().height() );
- lbl2->setFixedSize( max, lbl2->sizeHint().height() );
- lbl3->setFixedSize( max, lbl3->sizeHint().height() );
- lbl4->setFixedSize( max, lbl4->sizeHint().height() );
- lbl5->setFixedSize( max, lbl5->sizeHint().height() );
- lbl6->setFixedSize( max, lbl6->sizeHint().height() );
- lbl7->setFixedSize( max, lbl7->sizeHint().height() );
+ int max = lbl1->tqsizeHint().width();
+ if ( lbl2->tqsizeHint().width() > max ) max = lbl2->tqsizeHint().width();
+ if ( lbl3->tqsizeHint().width() > max ) max = lbl3->tqsizeHint().width();
+ if ( lbl4->tqsizeHint().width() > max ) max = lbl4->tqsizeHint().width();
+ if ( lbl5->tqsizeHint().width() > max ) max = lbl5->tqsizeHint().width();
+ if ( lbl6->tqsizeHint().width() > max ) max = lbl6->tqsizeHint().width();
+ if ( lbl7->tqsizeHint().width() > max ) max = lbl7->tqsizeHint().width();
+
+ lbl1->setFixedSize( max, lbl1->tqsizeHint().height() );
+ lbl2->setFixedSize( max, lbl2->tqsizeHint().height() );
+ lbl3->setFixedSize( max, lbl3->tqsizeHint().height() );
+ lbl4->setFixedSize( max, lbl4->tqsizeHint().height() );
+ lbl5->setFixedSize( max, lbl5->tqsizeHint().height() );
+ lbl6->setFixedSize( max, lbl6->tqsizeHint().height() );
+ lbl7->setFixedSize( max, lbl7->tqsizeHint().height() );
_tapeName = new TQLineEdit( this );
- _tapeName->setFixedHeight( _tapeName->sizeHint().height() );
+ _tapeName->setFixedHeight( _tapeName->tqsizeHint().height() );
_tapeSize = new TQLineEdit( this );
- _tapeSize->setFixedSize( 48, _tapeSize->sizeHint().height() );
+ _tapeSize->setFixedSize( 48, _tapeSize->tqsizeHint().height() );
_tapeSizeUnits = new TQComboBox( this );
- _tapeSizeUnits->setFixedSize( 48, _tapeSizeUnits->sizeHint().height() );
+ _tapeSizeUnits->setFixedSize( 48, _tapeSizeUnits->tqsizeHint().height() );
_tapeSizeUnits->insertItem( "MB" );
_tapeSizeUnits->insertItem( "GB" );
_tapeID = new TQLabel( "???", this );
- _tapeID->setFixedHeight( _tapeID->sizeHint().height() );
+ _tapeID->setFixedHeight( _tapeID->tqsizeHint().height() );
_ctime = new TQLabel( "???", this );
- _ctime->setFixedHeight( _ctime->sizeHint().height() );
+ _ctime->setFixedHeight( _ctime->tqsizeHint().height() );
_mtime = new TQLabel( "???", this );
- _mtime->setFixedHeight( _mtime->sizeHint().height() );
+ _mtime->setFixedHeight( _mtime->tqsizeHint().height() );
_archiveCount = new TQLabel( "???", this );
- _archiveCount->setFixedHeight( _archiveCount->sizeHint().height() );
+ _archiveCount->setFixedHeight( _archiveCount->tqsizeHint().height() );
_spaceUsed = new TQLabel( "???", this );
- _spaceUsed->setFixedHeight( _spaceUsed->sizeHint().height() );
+ _spaceUsed->setFixedHeight( _spaceUsed->tqsizeHint().height() );
_apply = new KPushButton( KStdGuiItem::apply(), this );
- _apply->setFixedSize( 80, _apply->sizeHint().height() );
+ _apply->setFixedSize( 80, _apply->tqsizeHint().height() );
_apply->setEnabled( FALSE );
TQVBoxLayout* l1 = new TQVBoxLayout( this, 4, 4 );
@@ -202,10 +202,10 @@ void TapeInfoWidget::setTape( Tape* tape )
used *= blockSize / 1024;
}
if ( _tape->getSize() > 0 ) {
- tmp = TQString::fromLatin1( "%1 / %2 (%3%)")
- .arg(Util::kbytesToString( used ))
- .arg(Util::kbytesToString( _tape->getSize() ))
- .arg(used * 100 / _tape->getSize() );
+ tmp = TQString::tqfromLatin1( "%1 / %2 (%3%)")
+ .tqarg(Util::kbytesToString( used ))
+ .tqarg(Util::kbytesToString( _tape->getSize() ))
+ .tqarg(used * 100 / _tape->getSize() );
} else {
tmp = Util::kbytesToString( used );
}
diff --git a/kdat/TapeInfoWidget.h b/kdat/TapeInfoWidget.h
index 9b16aa9..cf87aa7 100644
--- a/kdat/TapeInfoWidget.h
+++ b/kdat/TapeInfoWidget.h
@@ -33,6 +33,7 @@ class Tape;
*/
class TapeInfoWidget : public TQWidget {
Q_OBJECT
+ TQ_OBJECT
Tape* _tape;
TQLineEdit* _tapeName;
TQLineEdit* _tapeSize;
@@ -53,7 +54,7 @@ public:
/**
* Create a new tape info widget.
*/
- TapeInfoWidget( TQWidget* parent = 0, const char* name = 0 );
+ TapeInfoWidget( TQWidget* tqparent = 0, const char* name = 0 );
/**
* Destroy the tape info widget.
diff --git a/kdat/TapeManager.h b/kdat/TapeManager.h
index b571605..60b1687 100644
--- a/kdat/TapeManager.h
+++ b/kdat/TapeManager.h
@@ -43,6 +43,7 @@
*/
class TapeManager : public TQObject {
Q_OBJECT
+ TQ_OBJECT
static TapeManager* _instance;
diff --git a/kdat/TarParser.h b/kdat/TarParser.h
index 8dd4058..326bab3 100644
--- a/kdat/TarParser.h
+++ b/kdat/TarParser.h
@@ -168,6 +168,7 @@ union record
*/
class TarParser : public TQObject {
Q_OBJECT
+ TQ_OBJECT
char _buf[512];
int _bufIdx;
int _blocksToSkip;
diff --git a/kdat/Util.cpp b/kdat/Util.cpp
index 11e7219..7f1dcd7 100644
--- a/kdat/Util.cpp
+++ b/kdat/Util.cpp
@@ -60,9 +60,9 @@ TQString Util::longestCommonPath( const TQStringList& files )
}
i = filesTmp.begin();
TQString prefix = *i;
- int idx = prefix.findRev( '/', j );
+ int idx = prefix.tqfindRev( '/', j );
if ( idx > -1 ) {
- prefix = prefix.left( prefix.findRev( '/', j ) );
+ prefix = prefix.left( prefix.tqfindRev( '/', j ) );
} else {
prefix = "";
}
diff --git a/kdat/VerifyDlg.cpp b/kdat/VerifyDlg.cpp
index 92fe9cf..93e8a93 100644
--- a/kdat/VerifyDlg.cpp
+++ b/kdat/VerifyDlg.cpp
@@ -45,8 +45,8 @@
VerifyDlg::VerifyDlg( const TQString & workingDir, int fileno, const RangeList& ranges,
- bool restore, TQWidget* parent, const char* name )
- : TQDialog( parent, name, TRUE ),
+ bool restore, TQWidget* tqparent, const char* name )
+ : TQDialog( tqparent, name, TRUE ),
_restore( restore ),
_proc( NULL ),
_workingDir( workingDir ),
@@ -89,46 +89,46 @@ VerifyDlg::VerifyDlg( const TQString & workingDir, int fileno, const RangeList&
f2->setFrameStyle( TQFrame::Panel | TQFrame::Sunken );
TQLabel* lbl1 = new TQLabel( i18n( "Elapsed time:" ), f1 );
- lbl1->setFixedSize( labelWidth, lbl1->sizeHint().height() );
+ lbl1->setFixedSize( labelWidth, lbl1->tqsizeHint().height() );
_elapsedTime = new TQLabel( i18n( "00:00:00" ), f1 );
- _elapsedTime->setFixedHeight( _elapsedTime->sizeHint().height() );
+ _elapsedTime->setFixedHeight( _elapsedTime->tqsizeHint().height() );
TQLabel* lbl2 = new TQLabel( i18n( "Time remaining:" ), f2 );
- lbl2->setFixedSize( labelWidth, lbl2->sizeHint().height() );
+ lbl2->setFixedSize( labelWidth, lbl2->tqsizeHint().height() );
_timeRemaining = new TQLabel( i18n( "00:00:00" ), f2 );
- _timeRemaining->setFixedHeight( _timeRemaining->sizeHint().height() );
+ _timeRemaining->setFixedHeight( _timeRemaining->tqsizeHint().height() );
TQLabel* lbl3 = new TQLabel( i18n( "Total KB:" ), f1 );
- lbl3->setFixedSize( labelWidth, lbl3->sizeHint().height() );
+ lbl3->setFixedSize( labelWidth, lbl3->tqsizeHint().height() );
TQLabel* totalKbytes = new TQLabel( Util::kbytesToString( _archiveSize ), f1 );
- totalKbytes->setFixedHeight( totalKbytes->sizeHint().height() );
+ totalKbytes->setFixedHeight( totalKbytes->tqsizeHint().height() );
TQLabel* lbl4 = new TQLabel( i18n( "KB read:" ), f2 );
- lbl4->setFixedSize( labelWidth, lbl4->sizeHint().height() );
+ lbl4->setFixedSize( labelWidth, lbl4->tqsizeHint().height() );
_kbytesRead = new TQLabel( i18n( "0KB" ), f2 );
- _kbytesRead->setFixedHeight( _kbytesRead->sizeHint().height() );
+ _kbytesRead->setFixedHeight( _kbytesRead->tqsizeHint().height() );
TQLabel* lbl5 = new TQLabel( i18n( "Transfer rate:" ), f1 );
- lbl5->setFixedSize( labelWidth, lbl5->sizeHint().height() );
+ lbl5->setFixedSize( labelWidth, lbl5->tqsizeHint().height() );
_transferRate = new TQLabel( i18n( "0KB/min" ), f1 );
- _transferRate->setFixedHeight( _transferRate->sizeHint().height() );
+ _transferRate->setFixedHeight( _transferRate->tqsizeHint().height() );
TQLabel* lbl6;
if ( _restore ) {
lbl6 = new TQLabel( i18n( "Files:" ), f2 );
- lbl6->setFixedSize( labelWidth, lbl6->sizeHint().height() );
+ lbl6->setFixedSize( labelWidth, lbl6->tqsizeHint().height() );
} else {
lbl6 = new TQLabel( i18n( "Differences:" ), f2 );
- lbl6->setFixedSize( labelWidth, lbl6->sizeHint().height() );
+ lbl6->setFixedSize( labelWidth, lbl6->tqsizeHint().height() );
}
_files = new TQLabel( "0", f2 );
- _files->setFixedHeight( _files->sizeHint().height() );
+ _files->setFixedHeight( _files->tqsizeHint().height() );
if ( _restore ) {
_log = new LoggerWidget( i18n( "Restore log:" ), this );
@@ -137,17 +137,17 @@ VerifyDlg::VerifyDlg( const TQString & workingDir, int fileno, const RangeList&
}
_ok = new KPushButton( KStdGuiItem::ok(), this );
- _ok->setFixedSize( 80, _ok->sizeHint().height() );
+ _ok->setFixedSize( 80, _ok->tqsizeHint().height() );
connect( _ok, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotOK() ) );
_ok->setEnabled( FALSE );
_save = new TQPushButton( i18n( "&Save Log..." ), this );
- _save->setFixedSize( 80, _save->sizeHint().height() );
+ _save->setFixedSize( 80, _save->tqsizeHint().height() );
connect( _save, TQT_SIGNAL( clicked() ), _log, TQT_SLOT( save() ) );
_save->setEnabled( FALSE );
_abort = new TQPushButton( i18n( "&Abort" ), this );
- _abort->setFixedSize( 80, _abort->sizeHint().height() );
+ _abort->setFixedSize( 80, _abort->tqsizeHint().height() );
connect( _abort, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotAbort() ) );
TQVBoxLayout* l1 = new TQVBoxLayout( this, 8, 4 );
@@ -233,7 +233,7 @@ void VerifyDlg::show()
void VerifyDlg::slotProcessExited( KProcess* )
{
- killTimers();
+ TQT_TQOBJECT(this)->killTimers();
delete _proc;
// Set this, or we get caught in a loop.
@@ -248,7 +248,7 @@ void VerifyDlg::slotProcessExited( KProcess* )
void VerifyDlg::slotStdout( KProcess*, char* buf, int len )
{
TQString data;
- data.replace( 0, len, buf );
+ data.tqreplace( 0, len, buf );
/* 2002-02-23 RG */
// data[len] = '\0';
data.truncate( len );
@@ -256,7 +256,7 @@ void VerifyDlg::slotStdout( KProcess*, char* buf, int len )
_leftover += data;
int newlineIndex;
- while ( ( newlineIndex = _leftover.find( '\n' ) ) > -1 ) {
+ while ( ( newlineIndex = _leftover.tqfind( '\n' ) ) > -1 ) {
_log->append( _leftover.left( newlineIndex ) );
// Count differences.
@@ -307,7 +307,7 @@ void VerifyDlg::slotAbort()
void VerifyDlg::timerEvent( TQTimerEvent* )
{
- killTimers();
+ TQT_TQOBJECT(this)->killTimers();
int oldElapsed = 0;
@@ -409,7 +409,7 @@ void VerifyDlg::updateStats()
_kbytesRead->setText( str );
if ( elapsed > 0 ) {
- str = i18n( "%1/min" ).arg(Util::kbytesToString( (int)_totalKBytes * 60 / elapsed ) );
+ str = i18n( "%1/min" ).tqarg(Util::kbytesToString( (int)_totalKBytes * 60 / elapsed ) );
_transferRate->setText( str );
}
}
diff --git a/kdat/VerifyDlg.h b/kdat/VerifyDlg.h
index 0535cd4..bc11524 100644
--- a/kdat/VerifyDlg.h
+++ b/kdat/VerifyDlg.h
@@ -33,10 +33,11 @@ class LoggerWidget;
class TapeDrive;
/**
- * @short Status dialog for verifying/restoring parts of an archive.
+ * @short tqStatus dialog for verifying/restoring parts of an archive.
*/
class VerifyDlg : public TQDialog {
Q_OBJECT
+ TQ_OBJECT
bool _restore;
KProcess* _proc;
TQString _workingDir;
@@ -79,11 +80,11 @@ public:
* @param fileno The tape file number of the archive to verify/restore.
* @param ranges A list of tar block ranges to read.
* @param restore TRUE means restore, FALSE means verify.
- * @param parent The parent widget for the dialog.
+ * @param tqparent The tqparent widget for the dialog.
* @param name The name of this widget.
*/
VerifyDlg( const TQString & workingDir, int fileno, const RangeList& ranges,
- bool restore = FALSE, TQWidget* parent = 0, const char* name = 0 );
+ bool restore = FALSE, TQWidget* tqparent = 0, const char* name = 0 );
/**
* Destroy the verify/restore dialog.
diff --git a/kdat/VerifyOptDlg.cpp b/kdat/VerifyOptDlg.cpp
index f65d41f..119c9f1 100644
--- a/kdat/VerifyOptDlg.cpp
+++ b/kdat/VerifyOptDlg.cpp
@@ -33,8 +33,8 @@
#include "VerifyOptDlg.moc"
-VerifyOptDlg::VerifyOptDlg( const TQString & def, const TQStringList& files, bool restore, TQWidget* parent, const char* name )
- : TQDialog( parent, name, TRUE ),
+VerifyOptDlg::VerifyOptDlg( const TQString & def, const TQStringList& files, bool restore, TQWidget* tqparent, const char* name )
+ : TQDialog( tqparent, name, TRUE ),
_restore( restore )
{
if ( _restore ) {
@@ -51,14 +51,14 @@ VerifyOptDlg::VerifyOptDlg( const TQString & def, const TQStringList& files, boo
} else {
lbl1 = new TQLabel( i18n( "Verify in folder:" ), this );
}
- lbl1->setFixedSize( lbl1->sizeHint() );
+ lbl1->setFixedSize( lbl1->tqsizeHint() );
_entry = new TQLineEdit( this );
_entry->setText( def );
- _entry->setFixedHeight( _entry->sizeHint().height() );
+ _entry->setFixedHeight( _entry->tqsizeHint().height() );
TQPushButton* browse = new TQPushButton( i18n( "..." ), this );
- browse->setFixedSize( browse->sizeHint() );
+ browse->setFixedSize( browse->tqsizeHint() );
TQLabel* lbl2;
if ( _restore ) {
@@ -66,15 +66,15 @@ VerifyOptDlg::VerifyOptDlg( const TQString & def, const TQStringList& files, boo
} else {
lbl2 = new TQLabel( i18n( "Verify files:" ), this );
}
- lbl2->setFixedHeight( lbl2->sizeHint().height() );
+ lbl2->setFixedHeight( lbl2->tqsizeHint().height() );
TQListBox* fileList = new TQListBox( this );
fileList->insertStringList(files);
KPushButton* ok = new KPushButton( KStdGuiItem::ok(), this );
- ok->setFixedSize( 80, ok->sizeHint().height() );
+ ok->setFixedSize( 80, ok->tqsizeHint().height() );
KPushButton* cancel = new KPushButton( KStdGuiItem::cancel(), this );
- cancel->setFixedSize( 80, cancel->sizeHint().height() );
+ cancel->setFixedSize( 80, cancel->tqsizeHint().height() );
TQVBoxLayout* l1 = new TQVBoxLayout( this, 8, 4 );
diff --git a/kdat/VerifyOptDlg.h b/kdat/VerifyOptDlg.h
index 48a3624..faa94a7 100644
--- a/kdat/VerifyOptDlg.h
+++ b/kdat/VerifyOptDlg.h
@@ -32,6 +32,7 @@ class TQLineEdit;
*/
class VerifyOptDlg : public TQDialog {
Q_OBJECT
+ TQ_OBJECT
bool _restore;
TQString _workingDir;
TQLineEdit* _entry;
@@ -45,10 +46,10 @@ public:
* @param def The default working directory.
* @param files The list of files that will be verified/restored.
* @param restore TRUE means we are doing a restore, FALSE means we are doing a verify.
- * @param parent The parent widget for the dialog.
+ * @param tqparent The tqparent widget for the dialog.
* @param name The name for the dialog.
*/
- VerifyOptDlg( const TQString & def, const TQStringList& files, bool restore = FALSE, TQWidget* parent = 0, const char* name = 0 );
+ VerifyOptDlg( const TQString & def, const TQStringList& files, bool restore = FALSE, TQWidget* tqparent = 0, const char* name = 0 );
/**
* Destroy the verify/restore options dialog.
diff --git a/kdat/ktreeview.cpp b/kdat/ktreeview.cpp
index 90d445e..70955e9 100644
--- a/kdat/ktreeview.cpp
+++ b/kdat/ktreeview.cpp
@@ -49,7 +49,7 @@ KTreeViewItem::KTreeViewItem(const TQString& theText) :
doTree(true),
doText(true),
child(0),
- parent(0),
+ tqparent(0),
sibling(0),
deleteChildren(false)
{
@@ -67,7 +67,7 @@ KTreeViewItem::KTreeViewItem(const TQString& theText,
doTree(true),
doText(true),
child(0),
- parent(0),
+ tqparent(0),
sibling(0),
deleteChildren(false)
{
@@ -79,7 +79,7 @@ KTreeViewItem::KTreeViewItem(const TQString& theText,
KTreeViewItem::~KTreeViewItem()
{
if (deleteChildren) {
- // remove the children
+ // remove the tqchildren
KTreeViewItem* i = child;
while (i) {
KTreeViewItem* d = i;
@@ -92,7 +92,7 @@ KTreeViewItem::~KTreeViewItem()
// appends a direct child
void KTreeViewItem::appendChild(KTreeViewItem* newChild)
{
- newChild->parent = this;
+ newChild->tqparent = this;
newChild->owner = owner;
if (!getChild()) {
child = newChild;
@@ -121,7 +121,7 @@ TQRect KTreeViewItem::boundingRect(int indent) const
}
// returns the child item at the specified index
-KTreeViewItem* KTreeViewItem::childAt(int index) const
+KTreeViewItem* KTreeViewItem::tqchildAt(int index) const
{
if (!hasChild())
return 0;
@@ -133,7 +133,7 @@ KTreeViewItem* KTreeViewItem::childAt(int index) const
return item;
}
-// returns the number of children this item has
+// returns the number of tqchildren this item has
uint KTreeViewItem::childCount() const
{
return numChildren;
@@ -155,7 +155,7 @@ int KTreeViewItem::childIndex(KTreeViewItem* searched) const
// indicates whether mouse press is in expand button
inline bool KTreeViewItem::expandButtonClicked(const TQPoint& coord) const
{
- return expandButton.contains(coord);
+ return expandButton.tqcontains(coord);
}
bool KTreeViewItem::mousePressEvent( const TQPoint& )
@@ -169,10 +169,10 @@ KTreeViewItem* KTreeViewItem::getChild() const
return child;
}
-// returns the parent of this item
+// returns the tqparent of this item
KTreeViewItem* KTreeViewItem::getParent() const
{
- return parent;
+ return tqparent;
}
// returns reference to the item pixmap
@@ -193,16 +193,16 @@ const TQString& KTreeViewItem::getText() const
return text;
}
-// indicates whether this item has any children
+// indicates whether this item has any tqchildren
bool KTreeViewItem::hasChild() const
{
return child != 0;
}
-// indicates whether this item has a parent
+// indicates whether this item has a tqparent
bool KTreeViewItem::hasParent() const
{
- return parent != 0;
+ return tqparent != 0;
}
// indicates whether this item has a sibling below it
@@ -234,7 +234,7 @@ void KTreeViewItem::insertChild(int index, KTreeViewItem* newChild)
appendChild(newChild);
return;
}
- newChild->parent = this;
+ newChild->tqparent = this;
newChild->owner = owner;
if (index == 0) {
newChild->sibling = getChild();
@@ -260,7 +260,7 @@ void KTreeViewItem::insertChild(int index, KTreeViewItem* newChild)
// indicates whether this item is displayed expanded
// NOTE: a TRUE response does not necessarily indicate the item
-// has any children
+// has any tqchildren
bool KTreeViewItem::isExpanded() const
{
return expanded;
@@ -314,41 +314,41 @@ void KTreeViewItem::paint(TQPainter* p, int indent, const TQColorGroup& cg,
void KTreeViewItem::paintExpandButton(TQPainter* p, int indent, int cellHeight) const
{
- int parentLeaderX = indent - (22 / 2);
+ int tqparentLeaderX = indent - (22 / 2);
int cellCenterY = cellHeight / 2;
- expandButton.setRect(parentLeaderX - 4, cellCenterY - 4, 9, 9);
- p->setBrush(Qt::white);
+ expandButton.setRect(tqparentLeaderX - 4, cellCenterY - 4, 9, 9);
+ p->setBrush(TQt::white);
p->drawRect(expandButton);
if (expanded) {
- p->drawLine(parentLeaderX - 2, cellCenterY,
- parentLeaderX + 2, cellCenterY);
+ p->drawLine(tqparentLeaderX - 2, cellCenterY,
+ tqparentLeaderX + 2, cellCenterY);
} else {
- p->drawLine(parentLeaderX - 2, cellCenterY,
- parentLeaderX + 2, cellCenterY);
- p->drawLine(parentLeaderX, cellCenterY - 2,
- parentLeaderX, cellCenterY + 2);
+ p->drawLine(tqparentLeaderX - 2, cellCenterY,
+ tqparentLeaderX + 2, cellCenterY);
+ p->drawLine(tqparentLeaderX, cellCenterY - 2,
+ tqparentLeaderX, cellCenterY + 2);
}
- p->setBrush(Qt::NoBrush);
+ p->setBrush(TQt::NoBrush);
}
// paint the highlight
-void KTreeViewItem::paintHighlight(TQPainter* p, int indent, const TQColorGroup& colorGroup,
- bool hasFocus, Qt::GUIStyle style) const
+void KTreeViewItem::paintHighlight(TQPainter* p, int indent, const TQColorGroup& tqcolorGroup,
+ bool hasFocus, TQt::GUIStyle style) const
{
TQColor fc;
- if (style == Qt::WindowsStyle)
- fc = Qt::darkBlue; /* hardcoded in Qt */
+ if (style == TQt::WindowsStyle)
+ fc = TQt::darkBlue; /* hardcoded in TQt */
else
- fc = colorGroup.text();
+ fc = tqcolorGroup.text();
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 */
+ if(style == TQt::WindowsStyle) { /* draw Windows style highlight */
textRect.setCoords(l - 1, t - 1, r + 1, b + 1);
- p->setPen(TQPen(Qt::yellow, 0, Qt::DotLine));
+ p->setPen(TQPen(TQt::yellow, 0, TQt::DotLine));
p->setBackgroundColor(fc);
p->setBackgroundMode(Qt::OpaqueMode);
p->drawRect(textRect);
@@ -372,7 +372,7 @@ void KTreeViewItem::paintText(TQPainter* p, int indent, int cellHeight,
p->fontMetrics().leading()) / 2);
if (highlighted) {
paintHighlight(p, indent, cg, owner->hasFocus(),
- (Qt::GUIStyle)owner->style().styleHint(TQStyle::SH_GUIStyle)); // Qt3 doesn't make this easy ;)
+ (TQt::GUIStyle)owner->tqstyle().tqstyleHint(TQStyle::SH_GUIStyle)); // TQt3 doesn't make this easy ;)
p->setPen(cg.base());
p->setBackgroundColor(cg.text());
}
@@ -386,43 +386,43 @@ void KTreeViewItem::paintText(TQPainter* p, int indent, int cellHeight,
// paint the tree structure
void KTreeViewItem::paintTree(TQPainter* p, int indent, int cellHeight) const
{
- int parentLeaderX = indent - (22 / 2);
+ int tqparentLeaderX = indent - (22 / 2);
int cellCenterY = cellHeight / 2;
int cellBottomY = cellHeight - 1;
int itemLeaderX = indent - 3;
/*
* If this is not the first item in the tree draw the line up
- * towards parent or sibling.
+ * towards tqparent or sibling.
*/
- if (parent->parent != 0 || parent->getChild() != this)
- p->drawLine(parentLeaderX, 0, parentLeaderX, cellCenterY);
+ if (tqparent->tqparent != 0 || tqparent->getChild() != this)
+ p->drawLine(tqparentLeaderX, 0, tqparentLeaderX, cellCenterY);
// draw the line down towards sibling
if (sibling)
- p->drawLine(parentLeaderX, cellCenterY, parentLeaderX, cellBottomY);
+ p->drawLine(tqparentLeaderX, cellCenterY, tqparentLeaderX, cellBottomY);
/*
- * If this item has children or siblings in the tree or is a child of
+ * If this item has tqchildren or siblings in the tree or is a child of
* an item other than the root item then draw the little line from the
* item out to the left.
*/
if (sibling || (doExpandButton && (child || delayedExpanding)) ||
- parent->parent != 0 ||
+ tqparent->tqparent != 0 ||
/*
* The following handles the case of an item at the end of the
- * topmost level which doesn't have children.
+ * topmost level which doesn't have tqchildren.
*/
- parent->getChild() != this)
+ tqparent->getChild() != this)
{
- p->drawLine(parentLeaderX, cellCenterY, itemLeaderX, cellCenterY);
+ p->drawLine(tqparentLeaderX, cellCenterY, itemLeaderX, cellCenterY);
}
/*
* If there are siblings of ancestors below, draw our portion of the
* branches that extend through this cell.
*/
- KTreeViewItem* prevRoot = parent;
+ KTreeViewItem* prevRoot = tqparent;
while (prevRoot->getParent() != 0) { /* while not root item */
if (prevRoot->hasSibling()) {
int sibLeaderX = owner->indentation(prevRoot) - (22 / 2);
@@ -435,7 +435,7 @@ void KTreeViewItem::paintTree(TQPainter* p, int indent, int cellHeight) const
// removes the given (direct) child from the branch
bool KTreeViewItem::removeChild(KTreeViewItem* theChild)
{
- // search item in list of children
+ // search item in list of tqchildren
KTreeViewItem* prevItem = 0;
KTreeViewItem* toRemove = getChild();
while (toRemove && toRemove != theChild) {
@@ -573,10 +573,10 @@ int KTreeViewItem::width(int indent, const TQFontMetrics& fm) const
*/
// constructor
-KTreeView::KTreeView(TQWidget *parent,
+KTreeView::KTreeView(TQWidget *tqparent,
const char *name,
WFlags f) :
- TQGridView(parent, name, f),
+ TQGridView(tqparent, name, f),
clearing(false),
current(-1),
drawExpandButton(true),
@@ -599,7 +599,7 @@ KTreeView::KTreeView(TQWidget *parent,
//case WindowsStyle:
//case MotifStyle:
setFrameStyle(TQFrame::WinPanel | TQFrame::Sunken);
- setBackgroundColor(colorGroup().base());
+ setBackgroundColor(tqcolorGroup().base());
//break;
/*default:
setFrameStyle(TQFrame::Panel | TQFrame::Plain);
@@ -646,25 +646,25 @@ void KTreeView::appendChildItem(const TQString & theText, const TQPixmap& thePix
appendChildItem(item, thePath);
}
-// appends the given item to the children of the item at the given index
+// appends the given item to the tqchildren of the item at the given index
void KTreeView::appendChildItem(KTreeViewItem* newItem, int index)
{
- /* find parent item and append new item to parent's sub tree */
- KTreeViewItem* parentItem = itemAt(index);
- if (!parentItem)
+ /* find tqparent item and append new item to tqparent's sub tree */
+ KTreeViewItem* tqparentItem = itemAt(index);
+ if (!tqparentItem)
return;
- appendChildItem(parentItem, newItem);
+ appendChildItem(tqparentItem, newItem);
}
-// appends the given item to the children of the item at the end of the
+// appends the given item to the tqchildren of the item at the end of the
// given path
void KTreeView::appendChildItem(KTreeViewItem* newItem, const KPath& thePath)
{
- /* find parent item and append new item to parent's sub tree */
- KTreeViewItem* parentItem = itemAt(thePath);
- if (!parentItem)
+ /* find tqparent item and append new item to tqparent's sub tree */
+ KTreeViewItem* tqparentItem = itemAt(thePath);
+ if (!tqparentItem)
return;
- appendChildItem(parentItem, newItem);
+ appendChildItem(tqparentItem, newItem);
}
// indicates whether horizontal scrollbar appears only when needed
@@ -744,7 +744,7 @@ void KTreeView::clear()
if(goingDown || TQApplication::closingDown())
return;
if(autoU && isVisible())
- repaint();
+ tqrepaint();
setAutoUpdate(autoU);
}
@@ -789,7 +789,7 @@ int KTreeView::expandLevel() const
// expands or collapses the subtree rooted at the given item,
// as approptiate
-// if item has no children, does nothing
+// if item has no tqchildren, does nothing
void KTreeView::expandOrCollapseItem(int index)
{
KTreeViewItem *item = itemAt(index);
@@ -813,7 +813,7 @@ bool KTreeView::forEveryItem(KForEvery func, void* user, KTreeViewItem* item)
if ((*func)(item, user)) {
return true;
}
- // visit the children (recursively)
+ // visit the tqchildren (recursively)
if (item->hasChild()) {
if (forEveryItem(func, user, item))
return true;
@@ -833,7 +833,7 @@ bool KTreeView::forEveryVisibleItem(KForEvery func, void *user,
if (item == 0) {
item = treeRoot;
} else {
- // children are invisible (hence, nothing to do)
+ // tqchildren are invisible (hence, nothing to do)
// if item is invisible or collapsed
if (!item->isVisible() || !item->isExpanded()) {
return false;
@@ -847,7 +847,7 @@ bool KTreeView::forEveryVisibleItem(KForEvery func, void *user,
if ((*func)(item, user)) {
return true;
}
- // visit the children (recursively)
+ // visit the tqchildren (recursively)
if (item->hasChild() && item->isExpanded()) {
if (forEveryVisibleItem(func, user, item))
return true;
@@ -994,7 +994,7 @@ int KTreeView::itemRow(KTreeViewItem* item)
/*
* move the subtree at the specified index up one branch level (make root
- * item a sibling of its current parent)
+ * item a sibling of its current tqparent)
*/
void KTreeView::join(int index)
{
@@ -1005,7 +1005,7 @@ void KTreeView::join(int index)
/*
* move the subtree at the specified index up one branch level (make root
- * item a sibling of it's current parent)
+ * item a sibling of it's current tqparent)
*/
void KTreeView::join(const KPath& path)
{
@@ -1014,7 +1014,7 @@ void KTreeView::join(const KPath& path)
join(item);
}
-/* move item at specified index one slot down in its parent's sub tree */
+/* move item at specified index one slot down in its tqparent's sub tree */
void KTreeView::lowerItem(int index)
{
KTreeViewItem *item = itemAt(index);
@@ -1022,7 +1022,7 @@ void KTreeView::lowerItem(int index)
lowerItem(item);
}
-/* move item at specified path one slot down in its parent's sub tree */
+/* move item at specified path one slot down in its tqparent's sub tree */
void KTreeView::lowerItem(const KPath& path)
{
KTreeViewItem* item = itemAt(path);
@@ -1030,7 +1030,7 @@ void KTreeView::lowerItem(const KPath& path)
lowerItem(item);
}
-/* move item at specified index one slot up in its parent's sub tree */
+/* move item at specified index one slot up in its tqparent's sub tree */
void KTreeView::raiseItem(int index)
{
KTreeViewItem* item = itemAt(index);
@@ -1038,7 +1038,7 @@ void KTreeView::raiseItem(int index)
raiseItem(item);
}
-/* move item at specified path one slot up in its parent's sub tree */
+/* move item at specified path one slot up in its tqparent's sub tree */
void KTreeView::raiseItem(const KPath& path)
{
KTreeViewItem* item = itemAt(path);
@@ -1113,7 +1113,7 @@ void KTreeView::setExpandButtonDrawing(bool enable)
drawExpandButton = enable;
forEveryItem(&KTreeView::setItemExpandButtonDrawing, 0);
if(autoUpdate() && isVisible())
- repaint();
+ tqrepaint();
}
// sets depth to which subtrees are automatically expanded, and
@@ -1132,10 +1132,10 @@ void KTreeView::setExpandLevel(int level)
}
setCurrentItem(itemRow(item));
if(autoUpdate() && isVisible())
- repaint();
+ tqrepaint();
}
-// sets the indent margin for all branches and repaints if auto update enabled
+// sets the indent margin for all branches and tqrepaints if auto update enabled
void KTreeView::setIndentSpacing(int spacing)
{
if (itemIndent == spacing)
@@ -1143,7 +1143,7 @@ void KTreeView::setIndentSpacing(int spacing)
itemIndent = spacing;
updateCellWidth();
if (autoUpdate() && isVisible())
- repaint();
+ tqrepaint();
}
// enables/disables vertical scrollbar
@@ -1160,7 +1160,7 @@ void KTreeView::setShowItemText(bool enable)
showText = enable;
forEveryItem(&KTreeView::setItemShowText, 0);
if(autoUpdate() && isVisible())
- repaint();
+ tqrepaint();
}
// indicates whether vertical scrolling is by pixel or row
@@ -1177,7 +1177,7 @@ void KTreeView::setTreeDrawing(bool enable)
drawTree = enable;
forEveryItem(&KTreeView::setItemTreeDrawing, 0);
if(autoUpdate() && isVisible())
- repaint();
+ tqrepaint();
}
// indicates whether item text keys are displayed
@@ -1237,7 +1237,7 @@ bool KTreeView::treeDrawing() const
}
-// appends a child to the specified parent item (note: a child, not a sibling, is added!)
+// appends a child to the specified tqparent item (note: a child, not a sibling, is added!)
void KTreeView::appendChildItem(KTreeViewItem* theParent,
KTreeViewItem* newItem)
{
@@ -1251,18 +1251,18 @@ void KTreeView::appendChildItem(KTreeViewItem* theParent,
newItem->setExpanded(true);
}
- // fix up branch levels of any children that the new item may already have
+ // fix up branch levels of any tqchildren that the new item may already have
if(newItem->hasChild()) {
fixChildren(newItem);
}
- // if necessary, adjust cell width, number of rows and repaint
+ // if necessary, adjust cell width, number of rows and tqrepaint
if (newItem->isVisible() || theParent->childCount() == 1) {
bool autoU = autoUpdate();
setAutoUpdate(false);
updateVisibleItems();
if(autoU && isVisible())
- repaint();
+ tqrepaint();
setAutoUpdate(autoU);
}
}
@@ -1302,7 +1302,7 @@ void KTreeView::collapseSubTree(KTreeViewItem* subRoot)
}
}
// roland
- repaint();
+ tqrepaint();
setAutoUpdate(TRUE);
// roland
}
@@ -1317,21 +1317,21 @@ bool KTreeView::countItem(KTreeViewItem*, void* total)
}
// if item is expanded, collapses it or vice-versa
-void KTreeView::expandOrCollapse(KTreeViewItem* parent)
+void KTreeView::expandOrCollapse(KTreeViewItem* tqparent)
{
bool autoU = autoUpdate();
setAutoUpdate(false);
- int parentIndex = itemRow(parent);
- if (parent->isExpanded()) {
- collapseSubTree(parent);
- emit collapsed(parentIndex);
+ int tqparentIndex = itemRow(tqparent);
+ if (tqparent->isExpanded()) {
+ collapseSubTree(tqparent);
+ emit collapsed(tqparentIndex);
}
else {
- expandSubTree(parent);
- emit expanded(parentIndex);
+ expandSubTree(tqparent);
+ emit expanded(tqparentIndex);
}
if (autoU && isVisible())
- repaint();
+ tqrepaint();
setAutoUpdate(autoU);
}
@@ -1361,28 +1361,28 @@ void KTreeView::expandSubTree(KTreeViewItem* subRoot)
}
}
// roland
- repaint();
+ tqrepaint();
setAutoUpdate(TRUE);
// roland
}
// fix up branch levels out of whack from split/join operations on the tree
-void KTreeView::fixChildren(KTreeViewItem *parentItem)
+void KTreeView::fixChildren(KTreeViewItem *tqparentItem)
{
KTreeViewItem* childItem = 0;
KTreeViewItem* siblingItem = 0;
-// int childBranch = parentItem->getBranch() + 1;
- if(parentItem->hasChild()) {
- childItem = parentItem->getChild();
+// int childBranch = tqparentItem->getBranch() + 1;
+ if(tqparentItem->hasChild()) {
+ childItem = tqparentItem->getChild();
// childItem->setBranch(childBranch);
- childItem->owner = parentItem->owner;
+ childItem->owner = tqparentItem->owner;
fixChildren(childItem);
}
while(childItem && childItem->hasSibling()) {
siblingItem = childItem->getSibling();
// siblingItem->setBranch(childBranch);
- siblingItem->owner = parentItem->owner;
+ siblingItem->owner = tqparentItem->owner;
fixChildren(siblingItem);
childItem = siblingItem;
}
@@ -1483,37 +1483,37 @@ bool KTreeView::insertItem(KTreeViewItem* referenceItem,
{
setCellHeight(newItem->height(fontMetrics()));
}
- KTreeViewItem* parentItem;
+ KTreeViewItem* tqparentItem;
if (referenceItem) {
- parentItem = referenceItem->getParent();
- int insertIndex = parentItem->childIndex(referenceItem);
+ tqparentItem = referenceItem->getParent();
+ int insertIndex = tqparentItem->childIndex(referenceItem);
if (!prefix)
insertIndex++;
- parentItem->insertChild(insertIndex, newItem);
+ tqparentItem->insertChild(insertIndex, newItem);
}
else {
// no reference item, append at end of visible tree
- // need to repaint
- parentItem = treeRoot;
- parentItem->appendChild(newItem);
+ // need to tqrepaint
+ tqparentItem = treeRoot;
+ tqparentItem->appendChild(newItem);
}
// set item expansion
if (level(newItem) < expansion)
newItem->setExpanded(true);
- // fix up branch levels of any children
+ // fix up branch levels of any tqchildren
if (newItem->hasChild())
fixChildren(newItem);
- // if repaint necessary, do it if visible and auto update
+ // if tqrepaint necessary, do it if visible and auto update
// enabled
- if (newItem->isVisible() || parentItem->childCount() == 1) {
+ if (newItem->isVisible() || tqparentItem->childCount() == 1) {
bool autoU = autoUpdate();
setAutoUpdate(FALSE);
updateVisibleItems();
if(autoU && isVisible())
- repaint();
+ tqrepaint();
setAutoUpdate(autoU);
}
return true;
@@ -1534,7 +1534,7 @@ void KTreeView::itemPath(KTreeViewItem* item, KPath& path) const
/*
* joins the item's branch into the tree, making the item a sibling of its
- * parent
+ * tqparent
*/
void KTreeView::join(KTreeViewItem *item)
{
@@ -1545,7 +1545,7 @@ void KTreeView::join(KTreeViewItem *item)
takeItem(item);
insertItem(itemParent, item, FALSE);
if(autoU && isVisible())
- repaint();
+ tqrepaint();
setAutoUpdate(autoU);
}
}
@@ -1587,16 +1587,16 @@ void KTreeView::keyPressEvent(TQKeyEvent *e)
// move highlight one page down and scroll down
- delta = QMAX(1, visibleHeight() / cellHeight());
- setCurrentItem(QMIN(currentItem() + delta, numRows() - 1));
+ delta = TQMAX(1, visibleHeight() / cellHeight());
+ setCurrentItem(TQMIN(currentItem() + delta, numRows() - 1));
ensureCellVisible(currentItem(), 0);
break;
case Key_Prior:
// move highlight one page up and scroll up
- delta = QMAX(1, visibleHeight() / cellHeight());
- setCurrentItem(QMAX(currentItem() - delta, 0));
+ delta = TQMAX(1, visibleHeight() / cellHeight());
+ setCurrentItem(TQMAX(currentItem() - delta, 0));
ensureCellVisible(currentItem(), 0);
break;
case Key_Plus:
@@ -1632,15 +1632,15 @@ int KTreeView::level(KTreeViewItem* item) const
assert(item->owner == this);
assert(item != treeRoot);
int l = 0;
- item = item->parent->parent; /* since item != treeRoot, there is a parent */
+ item = item->tqparent->tqparent; /* since item != treeRoot, there is a tqparent */
while (item != 0) {
- item = item->parent;
+ item = item->tqparent;
l++;
}
return l;
}
-/* move specified item down one slot in parent's subtree */
+/* move specified item down one slot in tqparent's subtree */
void KTreeView::lowerItem(KTreeViewItem *item)
{
KTreeViewItem *itemParent = item->getParent();
@@ -1649,9 +1649,9 @@ void KTreeView::lowerItem(KTreeViewItem *item)
bool autoU = autoUpdate();
setAutoUpdate(FALSE);
takeItem(item);
- insertItem(itemParent->childAt(itemChildIndex), item, FALSE);
+ insertItem(itemParent->tqchildAt(itemChildIndex), item, FALSE);
if(autoU && isVisible())
- repaint();
+ tqrepaint();
setAutoUpdate(autoU);
}
}
@@ -1681,7 +1681,7 @@ void KTreeView::mouseDoubleClickEvent(TQMouseEvent *e)
// hit test item
int indent = indentation(item);
- if(item->boundingRect(indent).contains(cellCoord))
+ if(item->boundingRect(indent).tqcontains(cellCoord))
emit selected(itemClicked);
}
@@ -1701,7 +1701,7 @@ void KTreeView::mousePressEvent(TQMouseEvent *e)
{
// first: check which button was pressed
- if (e->button() == MidButton)
+ if (e->button() == Qt::MidButton)
{
// RB: the MMB is hardcoded to the "rubberband" scroll mode
if (!rubberband_mode) {
@@ -1709,7 +1709,7 @@ void KTreeView::mousePressEvent(TQMouseEvent *e)
}
return;
}
- else if ( ( rubberband_mode ) && ( e->button() != RightButton ) )
+ else if ( ( rubberband_mode ) && ( e->button() != Qt::RightButton ) )
{
// another button was pressed while rubberbanding, stop the move.
// RB: if we allow other buttons while rubberbanding the tree can expand
@@ -1749,9 +1749,9 @@ void KTreeView::mousePressEvent(TQMouseEvent *e)
emit selected(itemClicked);
}
// hit item (to show info on the file/dir label clicked)
- else if (item->boundingRect(indentation(item)).contains(cellCoord)) {
+ else if (item->boundingRect(indentation(item)).tqcontains(cellCoord)) {
setCurrentItem(itemClicked); // highlight item
- if ( e->button() == RightButton ) {
+ if ( e->button() == Qt::RightButton ) {
emit popupMenu( itemClicked, mapToGlobal( TQPoint( e->pos().x(), e->pos().y() ) ) );
}
}
@@ -1761,7 +1761,7 @@ void KTreeView::mousePressEvent(TQMouseEvent *e)
void KTreeView::mouseReleaseEvent(TQMouseEvent *e)
{
/* if it's the MMB end rubberbanding */
- if (rubberband_mode && e->button()==MidButton)
+ if (rubberband_mode && e->button()==Qt::MidButton)
{
end_rubberband();
}
@@ -1859,14 +1859,14 @@ void KTreeView::paintCell(TQPainter* p, int row, int)
return;
p->setClipRect(cellRect(), TQPainter::CoordPainter );
- TQColorGroup cg = colorGroup();
+ TQColorGroup cg = tqcolorGroup();
int indent = indentation(item);
item->paint(p, indent, cg,
current == row); /* highlighted */
p->setClipping(false);
}
-/* raise the specified item up one slot in parent's subtree */
+/* raise the specified item up one slot in tqparent's subtree */
void KTreeView::raiseItem(KTreeViewItem *item)
{
KTreeViewItem *itemParent = item->getParent();
@@ -1875,9 +1875,9 @@ void KTreeView::raiseItem(KTreeViewItem *item)
bool autoU = autoUpdate();
setAutoUpdate(FALSE);
takeItem(item);
- insertItem(itemParent->childAt(--itemChildIndex), item, TRUE);
+ insertItem(itemParent->tqchildAt(--itemChildIndex), item, TRUE);
if(autoU && isVisible())
- repaint();
+ tqrepaint();
setAutoUpdate(autoU);
}
}
@@ -1891,15 +1891,15 @@ KTreeViewItem* KTreeView::recursiveFind(KPath& path)
// get the next key
TQString* searchString = path.pop();
- // find the parent item
- KTreeViewItem* parent = recursiveFind(path);
- if (parent == 0)
+ // find the tqparent item
+ KTreeViewItem* tqparent = recursiveFind(path);
+ if (tqparent == 0)
return 0;
/*
- * Iterate through the parent's children searching for searchString.
+ * Iterate through the tqparent's tqchildren searching for searchString.
*/
- KTreeViewItem* sibling = parent->getChild();
+ KTreeViewItem* sibling = tqparent->getChild();
while (sibling != 0) {
if (*searchString == sibling->getText()) {
break; /* found it! */
@@ -1961,9 +1961,9 @@ void KTreeView::split(KTreeViewItem *item)
bool autoU = autoUpdate();
setAutoUpdate(FALSE);
takeItem(item);
- appendChildItem(itemParent->childAt(--itemChildIndex), item);
+ appendChildItem(itemParent->tqchildAt(--itemChildIndex), item);
if(autoU && isVisible())
- repaint();
+ tqrepaint();
setAutoUpdate(autoU);
}
@@ -1988,22 +1988,22 @@ void KTreeView::takeItem(KTreeViewItem* item)
c = c->getParent();
}
if (c != 0) {
- // move current item to parent
+ // move current item to tqparent
cur = item->getParent();
if (cur == treeRoot)
cur = 0;
}
}
- KTreeViewItem* parentItem = item->getParent();
- parentItem->removeChild(item);
+ KTreeViewItem* tqparentItem = item->getParent();
+ tqparentItem->removeChild(item);
item->sibling = 0;
- if (wasVisible || parentItem->childCount() == 0) {
+ if (wasVisible || tqparentItem->childCount() == 0) {
bool autoU = autoUpdate();
setAutoUpdate(FALSE);
updateVisibleItems();
if (autoU && isVisible())
- repaint();
+ tqrepaint();
setAutoUpdate(autoU);
}
@@ -2012,7 +2012,7 @@ void KTreeView::takeItem(KTreeViewItem* item)
}
// visits each item, calculates the maximum width
-// and updates QGridView
+// and updates TQGridView
void KTreeView::updateCellWidth()
{
// make cells at least 1 pixel wide to avoid singularities (division by zero)
@@ -2041,10 +2041,10 @@ void KTreeView::updateVisibleItemRec(KTreeViewItem* item, int& index, int& count
}
/*
- * Record the children of item in the list of visible items.
+ * Record the tqchildren of item in the list of visible items.
*
* Don't register item itself, it's already in the list. Also only
- * allocate new space for children.
+ * allocate new space for tqchildren.
*/
count += item->childCount();
if (count > itemCapacity) {
@@ -2066,7 +2066,7 @@ void KTreeView::updateVisibleItemRec(KTreeViewItem* item, int& index, int& count
visibleItems = newItems;
itemCapacity = newCapacity;
}
- // insert children
+ // insert tqchildren
for (KTreeViewItem* i = item->getChild(); i != 0; i = i->getSibling()) {
visibleItems[index++] = i;
updateVisibleItemRec(i, index, count);
diff --git a/kdat/ktreeview.h b/kdat/ktreeview.h
index 5c6b52b..724caf5 100644
--- a/kdat/ktreeview.h
+++ b/kdat/ktreeview.h
@@ -43,25 +43,25 @@ public:
* item can be constructed this way, the text has to be non-null when
* the item is added to the tree, or it will not be inserted.
*
- * The constructor sets the delete-children flag to false. This flag
+ * The constructor sets the delete-tqchildren flag to false. This flag
* tells the item whether it shall delete the child items when it is
* itself deleted. By default the creator of the item is responsible to
* also delete the child items. (However, the versions of
* KTreeView::appendChildItem and KTreeView::insertChildItem that do
- * not take a KTreeViewItem set the delete-children flag to true.)
+ * not take a KTreeViewItem set the delete-tqchildren flag to true.)
*/
KTreeViewItem(const TQString& theText = TQString()); // text can not be null when added to the list!
KTreeViewItem(const TQString& theText, const TQPixmap& thePixmap);
/**
- * Destructor. It destroys its children if this item has been marked
+ * Destructor. It destroys its tqchildren if this item has been marked
* with setDeleteChildren(true).
*/
virtual ~KTreeViewItem();
/**
* Appends a new (direct) child item at the end. It does not update
- * administrative data in newChild except for its parent (which is this
+ * administrative data in newChild except for its tqparent (which is this
* item) and owner.
*/
void appendChild(KTreeViewItem* newChild);
@@ -70,7 +70,7 @@ public:
* Returns a pointer to the child item at the given index in this
* item's sub tree, or 0 if not found.
*/
- KTreeViewItem* childAt(int index) const;
+ KTreeViewItem* tqchildAt(int index) const;
/**
* Returns the number of child items in this item's sub tree.
@@ -100,7 +100,7 @@ public:
KTreeViewItem* getChild() const;
/**
- * Returns a pointer to the parent of this item, or 0 if none.
+ * Returns a pointer to the tqparent of this item, or 0 if none.
*/
KTreeViewItem* getParent() const;
@@ -123,12 +123,12 @@ public:
const TQString& getText() const;
/**
- * Indicates whether this item has any children.
+ * Indicates whether this item has any tqchildren.
*/
bool hasChild() const;
/**
- * Indicates whether this item has a parent.
+ * Indicates whether this item has a tqparent.
*/
bool hasParent() const;
@@ -142,7 +142,7 @@ public:
* Inserts the a new (direct) child in this item before the child at
* the specified index (first child is index 0). If there is no child
* at the specified index, the item is appended. It does not update
- * administrative data in newChild except for its parent (which is this
+ * administrative data in newChild except for its tqparent (which is this
* item) and owner.
*/
void insertChild(int index, KTreeViewItem* newChild);
@@ -152,7 +152,7 @@ public:
* items (if any) would be visible if this item were visible.
*
* Note: If this function returns true, it does not necessarily indicate that
- * this item is visible or that this item has any children.
+ * this item is visible or that this item has any tqchildren.
*/
bool isExpanded() const;
@@ -174,12 +174,12 @@ public:
* Sets the delayed-expanding flag. If this flag is true, the expanding
* signal is emitted when the item is about to be expanded. The expand
* button is always painted for this item, even if it doesn't have
- * children.
+ * tqchildren.
*/
void setDelayedExpanding(bool flag);
/**
- * Tells the item whether it should delete its children when it is
+ * Tells the item whether it should delete its tqchildren when it is
* deleted. The default is false, which means that the child items must
* be deleted explicitly.
*/
@@ -224,7 +224,7 @@ protected:
virtual int height(const TQFontMetrics& fm) const;
/**
- * Paints the item: pixmap, text, expand button, parent branches
+ * Paints the item: pixmap, text, expand button, tqparent branches
*/
virtual void paint(TQPainter* p, int indent,
const TQColorGroup& cg, bool highlighted) const;
@@ -239,7 +239,7 @@ protected:
*/
virtual void paintHighlight(TQPainter* p, int indent,
const TQColorGroup& cg, bool hasFocus,
- Qt::GUIStyle style) const;
+ TQt::GUIStyle style) const;
/**
* paints the item's text
@@ -286,7 +286,7 @@ protected:
bool doText;
mutable TQRect expandButton; /* is set in paint() */
KTreeViewItem* child;
- KTreeViewItem* parent;
+ KTreeViewItem* tqparent;
KTreeViewItem* sibling;
TQPixmap pixmap;
TQString text;
@@ -310,7 +310,7 @@ typedef bool (*KForEvery)
1. Introduction
================================================================================
- KTreeView is a class inherited from QTableView in the Qt user interface
+ KTreeView is a class inherited from TQTableView in the TQt user interface
library. It provides a way to display hierarchical data in a single-inheritance
tree, similar to tree controls in Microsoft Windows and other GUI's. It is most
suitable for directory trees or outlines, but I'm sure other uses will come to
@@ -331,7 +331,7 @@ typedef bool (*KForEvery)
by the programmer.
* The list items can be returned by index or logical path and the tree
- navigated by parent, child or sibling references contained in them. Also,
+ navigated by tqparent, child or sibling references contained in them. Also,
item information such as text, pixmap, branch level can be obtained.
* Items can be inserted, changed and removed either by index in the visible
@@ -395,18 +395,19 @@ typedef bool (*KForEvery)
signal void collpased(int) - emitted when an item in the tree is collapsed;
sends the index of the item
*/
-class KTreeView : public QGridView
+class KTreeView : public TQGridView
{
friend class KTreeViewItem;
Q_OBJECT
+ TQ_OBJECT
public:
/**
- * Widget contructor. Passes all parameters on to base QTableView, and
+ * Widget contructor. Passes all parameters on to base TQTableView, and
* does not use them directly. Does internal initialization, sets the
* current item to -1, and sets default values for scroll bars (both
* auto).
*/
- KTreeView(TQWidget* parent = 0, const char* name = 0, WFlags f = 0);
+ KTreeView(TQWidget* tqparent = 0, const char* name = 0, WFlags f = 0);
/*
* Desctructor. Deletes all items from the topmost level that have been
@@ -416,28 +417,28 @@ public:
/**
* Appends a new child item to the item at the specified row. If that
- * item already has children, the new item is appended below these
- * children. A KTreeViewItem is created for which the delete-children
+ * item already has tqchildren, the new item is appended below these
+ * tqchildren. A KTreeViewItem is created for which the delete-tqchildren
* flag is set to true.
*/
void appendChildItem(const TQString & theText, const TQPixmap& thePixmap,
int index);
/**
- * Same as above except that the parent item is specified by a path.
+ * Same as above except that the tqparent item is specified by a path.
*/
void appendChildItem(const TQString & theText, const TQPixmap& thePixmap,
const KPath& thePath);
/**
* Appendss the specified item as a child of the item that is at the
- * specified row. If that item already has children, the new item is
- * appended below these children.
+ * specified row. If that item already has tqchildren, the new item is
+ * appended below these tqchildren.
*/
void appendChildItem(KTreeViewItem* newItem, int index);
/**
- * Same as above except that the parent item is specified by a path.
+ * Same as above except that the tqparent item is specified by a path.
*/
void appendChildItem(KTreeViewItem* newItem, const KPath& thePath);
@@ -514,7 +515,7 @@ public:
void expandItem(int index);
/**
- Returns the depth to which all parent items are automatically
+ Returns the depth to which all tqparent items are automatically
expanded.
*/
int expandLevel() const;
@@ -528,7 +529,7 @@ public:
/**
* Iterates every item in the tree, visible or not, and applies the
* function func with a pointer to each item and user data supplied as
- * parameters. The children of the specified root item are visited
+ * parameters. The tqchildren of the specified root item are visited
* (root itself is not visited!). If root is 0 all items in the tree
* are visited. KForEveryFunc is defined as:
*
@@ -567,7 +568,7 @@ public:
* the value of prefix. The new item is added to the same branch as the
* referenced item. If row is -1, the item is simply appended to the
* tree at the topmost level. A KTreeViewItem is created for which the
- * delete-children flag is set to true. Returns true if the item has
+ * delete-tqchildren flag is set to true. Returns true if the item has
* been successfully inserted in the tree, otherwise false.
*/
bool insertItem(const TQString & theText, const TQPixmap& thePixmap,
@@ -621,7 +622,7 @@ public:
/**
* Outdents the item at the given row one level so that it becomes a
- * sibling of its parent.
+ * sibling of its tqparent.
*/
void join(int index);
@@ -755,7 +756,7 @@ public:
/**
* This function is deprecated. Use numRows() instead.
- * Returns the number of items that are visible (their parents are
+ * Returns the number of items that are visible (their tqparents are
* expanded).
*/
int visibleCount() const { return numRows(); }
@@ -784,7 +785,7 @@ signals:
protected:
/**
* Appends theChild to theParent as a new direct child. All internal
- * state is updated and the widget is repainted as necessary. theChild
+ * state is updated and the widget is tqrepainted as necessary. theChild
* remains invisible if any ancestor of theParent is collapsed.
*/
void appendChildItem(KTreeViewItem* theParent,
@@ -800,13 +801,13 @@ protected:
/** Internal function used for counting items */
bool countItem(KTreeViewItem* item, void* total);
- void expandOrCollapse(KTreeViewItem *parentItem);
+ void expandOrCollapse(KTreeViewItem *tqparentItem);
/**
* Expands the specified subtree and updates the display. subRoot need
* not be visible.
*/
void expandSubTree(KTreeViewItem* subRoot);
- void fixChildren(KTreeViewItem *parentItem);
+ void fixChildren(KTreeViewItem *tqparentItem);
virtual void focusInEvent(TQFocusEvent *e);
void forEveryItem(KForEveryM func,
void *user);
@@ -827,7 +828,7 @@ protected:
* topmost level. If referenceItem is not 0, it must be an item that is
* already in the KTreeView. Internal data is updated and the display
* is refreshed as necessary. The inserted item may still be invisible
- * if any of the parents is collapsed. newItem must not be 0.
+ * if any of the tqparents is collapsed. newItem must not be 0.
*/
bool insertItem(KTreeViewItem* referenceItem, KTreeViewItem* newItem,
bool prefix);
@@ -869,7 +870,7 @@ public:
protected:
virtual void updateCellWidth();
virtual void updateVisibleItems();
- void updateVisibleItemRec(KTreeViewItem* parent, int& count, int& width);
+ void updateVisibleItemRec(KTreeViewItem* tqparent, int& count, int& width);
KTreeViewItem* treeRoot;
bool clearing;