diff options
Diffstat (limited to 'kdat/BackupProfileWidget.cpp')
-rw-r--r-- | kdat/BackupProfileWidget.cpp | 98 |
1 files changed, 49 insertions, 49 deletions
diff --git a/kdat/BackupProfileWidget.cpp b/kdat/BackupProfileWidget.cpp index 0b4dfa0..45acb56 100644 --- a/kdat/BackupProfileWidget.cpp +++ b/kdat/BackupProfileWidget.cpp @@ -16,13 +16,13 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -#include <qcheckbox.h> -#include <qcombobox.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qlineedit.h> -#include <qlistbox.h> -#include <qpushbutton.h> +#include <tqcheckbox.h> +#include <tqcombobox.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqlineedit.h> +#include <tqlistbox.h> +#include <tqpushbutton.h> #include <kapplication.h> @@ -33,58 +33,58 @@ #include "BackupProfileWidget.moc" -BackupProfileWidget::BackupProfileWidget( QWidget* parent, const char* name ) +BackupProfileWidget::BackupProfileWidget( TQWidget* parent, const char* name ) : KTabCtl( parent, name ) { - QWidget* one = new QWidget( this ); + TQWidget* one = new TQWidget( this ); addTab( one, i18n( "Backup" ) ); - QLabel* lbl1 = new QLabel( i18n( "Archive name:" ), one ); + TQLabel* lbl1 = new TQLabel( i18n( "Archive name:" ), one ); lbl1->setFixedSize( lbl1->sizeHint() ); - _archiveName = new QLineEdit( one ); + _archiveName = new TQLineEdit( one ); _archiveName->setFixedHeight( _archiveName->sizeHint().height() ); - QLabel* lbl2 = new QLabel( i18n( "Working folder:" ), one ); + TQLabel* lbl2 = new TQLabel( i18n( "Working folder:" ), one ); lbl2->setFixedSize( lbl2->sizeHint() ); - _workingDir = new QComboBox( FALSE, one ); + _workingDir = new TQComboBox( FALSE, one ); _workingDir->setFixedHeight( _workingDir->sizeHint().height() ); - QLabel* lbl3 = new QLabel( i18n( "Backup files:" ), one ); + TQLabel* lbl3 = new TQLabel( i18n( "Backup files:" ), one ); lbl3->setFixedHeight( lbl3->sizeHint().height() ); - _files = new QListBox( one ); + _files = new TQListBox( one ); - QWidget* two = new QWidget( this ); + TQWidget* two = new TQWidget( this ); addTab( two, i18n( "Tar Options" ) ); - _oneFilesystem = new QCheckBox( i18n( "Stay on one filesystem" ), two ); + _oneFilesystem = new TQCheckBox( i18n( "Stay on one filesystem" ), two ); _oneFilesystem->setFixedHeight( _oneFilesystem->sizeHint().height() ); - _incremental = new QCheckBox( i18n( "GNU listed incremental" ), two ); + _incremental = new TQCheckBox( i18n( "GNU listed incremental" ), two ); _incremental->setFixedHeight( _incremental->sizeHint().height() ); - connect( _incremental, SIGNAL( toggled( bool ) ), this, SLOT( slotIncrementalToggled( bool ) ) ); + connect( _incremental, TQT_SIGNAL( toggled( bool ) ), this, TQT_SLOT( slotIncrementalToggled( bool ) ) ); - _snapshotLabel = new QLabel( i18n( "Snapshot file:" ), two ); + _snapshotLabel = new TQLabel( i18n( "Snapshot file:" ), two ); _snapshotLabel->setFixedSize( _snapshotLabel->sizeHint() ); - _snapshotFile = new QLineEdit( two ); + _snapshotFile = new TQLineEdit( two ); _snapshotFile->setFixedHeight( _snapshotFile->sizeHint().height() ); - _removeSnapshot = new QCheckBox( i18n( "Remove snapshot file before backup" ), two ); + _removeSnapshot = new TQCheckBox( i18n( "Remove snapshot file before backup" ), two ); _removeSnapshot->setFixedHeight( _removeSnapshot->sizeHint().height() ); slotIncrementalToggled( FALSE ); - QVBoxLayout* l1 = new QVBoxLayout( one, 8, 4 ); + TQVBoxLayout* l1 = new TQVBoxLayout( one, 8, 4 ); - QHBoxLayout* l1_1 = new QHBoxLayout(); + TQHBoxLayout* l1_1 = new TQHBoxLayout(); l1->addLayout( l1_1 ); l1_1->addWidget( lbl1 ); l1_1->addWidget( _archiveName, 1 ); - QHBoxLayout* l1_2 = new QHBoxLayout(); + TQHBoxLayout* l1_2 = new TQHBoxLayout(); l1->addLayout( l1_2 ); l1_2->addWidget( lbl2 ); l1_2->addWidget( _workingDir, 1 ); @@ -92,36 +92,36 @@ BackupProfileWidget::BackupProfileWidget( QWidget* parent, const char* name ) l1->addWidget( lbl3 ); l1->addWidget( _files, 1 ); - QVBoxLayout* l2 = new QVBoxLayout( two, 8, 4 ); + TQVBoxLayout* l2 = new TQVBoxLayout( two, 8, 4 ); l2->addWidget( _oneFilesystem ); l2->addWidget( _incremental ); - QHBoxLayout* l2_1 = new QHBoxLayout(); + TQHBoxLayout* l2_1 = new TQHBoxLayout(); l2->addLayout( l2_1 ); l2_1->addSpacing( 20 ); l2_1->addWidget( _snapshotLabel ); l2_1->addWidget( _snapshotFile, 1 ); - QHBoxLayout* l2_2 = new QHBoxLayout(); + TQHBoxLayout* l2_2 = new TQHBoxLayout(); l2->addLayout( l2_2 ); l2_2->addSpacing( 20 ); l2_2->addWidget( _removeSnapshot ); l2->addStretch( 1 ); - connect( _archiveName , SIGNAL( textChanged( const QString & ) ), this, SLOT( slotTextChanged( const QString & ) ) ); - connect( _workingDir , SIGNAL( activated( const QString & ) ) , this, SLOT( slotWorkingDirActivated( const QString & ) ) ); - connect( _oneFilesystem , SIGNAL( toggled( bool ) ) , this, SLOT( slotToggled( bool ) ) ); - connect( _incremental , SIGNAL( toggled( bool ) ) , this, SLOT( slotIncrementalToggled( bool ) ) ); - connect( _snapshotFile , SIGNAL( textChanged( const QString & ) ), this, SLOT( slotTextChanged( const QString & ) ) ); - connect( _removeSnapshot, SIGNAL( toggled( bool ) ) , this, SLOT( slotToggled( bool ) ) ); + connect( _archiveName , TQT_SIGNAL( textChanged( const TQString & ) ), this, TQT_SLOT( slotTextChanged( const TQString & ) ) ); + connect( _workingDir , TQT_SIGNAL( activated( const TQString & ) ) , this, TQT_SLOT( slotWorkingDirActivated( const TQString & ) ) ); + connect( _oneFilesystem , TQT_SIGNAL( toggled( bool ) ) , this, TQT_SLOT( slotToggled( bool ) ) ); + connect( _incremental , TQT_SIGNAL( toggled( bool ) ) , this, TQT_SLOT( slotIncrementalToggled( bool ) ) ); + connect( _snapshotFile , TQT_SIGNAL( textChanged( const TQString & ) ), this, TQT_SLOT( slotTextChanged( const TQString & ) ) ); + connect( _removeSnapshot, TQT_SIGNAL( toggled( bool ) ) , this, TQT_SLOT( slotToggled( bool ) ) ); } BackupProfileWidget::~BackupProfileWidget() { } -void BackupProfileWidget::slotTextChanged( const QString & ) +void BackupProfileWidget::slotTextChanged( const TQString & ) { emit sigSomethingChanged(); } @@ -140,21 +140,21 @@ void BackupProfileWidget::slotIncrementalToggled( bool set ) emit sigSomethingChanged(); } -void BackupProfileWidget::slotWorkingDirActivated( const QString & text ) +void BackupProfileWidget::slotWorkingDirActivated( const TQString & text ) { while ( FALSE == _relativeFiles.isEmpty() ) { - QString my_first = _relativeFiles.first(); + TQString my_first = _relativeFiles.first(); _relativeFiles.remove( my_first ); } _files->clear(); - QStringList::Iterator i = _absoluteFiles.begin(); + TQStringList::Iterator i = _absoluteFiles.begin(); int remove = text.length(); if ( remove > 1 ) { remove++; } for ( ; i != _absoluteFiles.end(); ++i ) { - QString fn = *i; + TQString fn = *i; fn.remove( 0, remove ); if ( fn.isEmpty() ) { fn = "."; @@ -175,8 +175,8 @@ void BackupProfileWidget::setBackupProfile( BackupProfile* backupProfile ) if ( !backupProfile->getWorkingDirectory().isNull() ) { for ( int ii = 0; ii < _workingDir->count(); ii++ ) { - QString one = _workingDir->text( ii ); - QString two = backupProfile->getWorkingDirectory(); + TQString one = _workingDir->text( ii ); + TQString two = backupProfile->getWorkingDirectory(); // if ( _workingDir->text( ii ) == backupProfile->getWorkingDirectory() ) { if( one == two ){ _workingDir->setCurrentItem( ii ); @@ -186,7 +186,7 @@ void BackupProfileWidget::setBackupProfile( BackupProfile* backupProfile ) } // slotWorkingDirActivated( _workingDir->currentText() ); - QString one = _workingDir->currentText(); + TQString one = _workingDir->currentText(); slotWorkingDirActivated( one ); _oneFilesystem->setChecked( backupProfile->isOneFilesystem() ); @@ -197,12 +197,12 @@ void BackupProfileWidget::setBackupProfile( BackupProfile* backupProfile ) slotIncrementalToggled( backupProfile->isIncremental() ); } -void BackupProfileWidget::setAbsoluteFiles( const QStringList& files ) +void BackupProfileWidget::setAbsoluteFiles( const TQStringList& files ) { // Copy the string list. _absoluteFiles = files; - QString prefix = Util::longestCommonPath( files ); + TQString prefix = Util::longestCommonPath( files ); _workingDir->clear(); for ( int pos = prefix.length(); pos > 0; pos = prefix.findRev( '/', pos - 1 ) ) { @@ -214,12 +214,12 @@ void BackupProfileWidget::setAbsoluteFiles( const QStringList& files ) slotWorkingDirActivated( _workingDir->currentText() ); } -QString BackupProfileWidget::getArchiveName() +TQString BackupProfileWidget::getArchiveName() { return _archiveName->text(); } -QString BackupProfileWidget::getWorkingDirectory() +TQString BackupProfileWidget::getWorkingDirectory() { if ( _workingDir->count() > 0 ) { return _workingDir->currentText(); @@ -228,12 +228,12 @@ QString BackupProfileWidget::getWorkingDirectory() } } -const QStringList& BackupProfileWidget::getRelativeFiles() +const TQStringList& BackupProfileWidget::getRelativeFiles() { return _relativeFiles; } -const QStringList& BackupProfileWidget::getAbsoluteFiles() +const TQStringList& BackupProfileWidget::getAbsoluteFiles() { return _absoluteFiles; } @@ -248,7 +248,7 @@ bool BackupProfileWidget::isIncremental() return _incremental->isChecked(); } -QString BackupProfileWidget::getSnapshotFile() +TQString BackupProfileWidget::getSnapshotFile() { return _snapshotFile->text(); } |