diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-05-27 19:21:21 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-05-27 19:21:21 +0000 |
commit | d8cc8bdfa7fa624a526d5aa1626974e1444cb799 (patch) | |
tree | f295f1c545b319963d5357af79fe08991d8141d9 /src/misc | |
parent | 2a39a080579fb52a2599c02b2939795385b89093 (diff) | |
download | k3b-d8cc8bdfa7fa624a526d5aa1626974e1444cb799.tar.gz k3b-d8cc8bdfa7fa624a526d5aa1626974e1444cb799.zip |
TQt4 port k3b
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/k3b@1233803 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/misc')
-rw-r--r-- | src/misc/k3bblankingdialog.cpp | 102 | ||||
-rw-r--r-- | src/misc/k3bblankingdialog.h | 25 | ||||
-rw-r--r-- | src/misc/k3bcdcopydialog.cpp | 168 | ||||
-rw-r--r-- | src/misc/k3bcdcopydialog.h | 45 | ||||
-rw-r--r-- | src/misc/k3bcdimagewritingdialog.cpp | 282 | ||||
-rw-r--r-- | src/misc/k3bcdimagewritingdialog.h | 47 | ||||
-rw-r--r-- | src/misc/k3bdvdcopydialog.cpp | 96 | ||||
-rw-r--r-- | src/misc/k3bdvdcopydialog.h | 23 | ||||
-rw-r--r-- | src/misc/k3bdvdformattingdialog.cpp | 56 | ||||
-rw-r--r-- | src/misc/k3bdvdformattingdialog.h | 9 | ||||
-rw-r--r-- | src/misc/k3bisoimagewritingdialog.cpp | 170 | ||||
-rw-r--r-- | src/misc/k3bisoimagewritingdialog.h | 35 |
12 files changed, 532 insertions, 526 deletions
diff --git a/src/misc/k3bblankingdialog.cpp b/src/misc/k3bblankingdialog.cpp index 5f4b531..b606fd2 100644 --- a/src/misc/k3bblankingdialog.cpp +++ b/src/misc/k3bblankingdialog.cpp @@ -34,17 +34,17 @@ #include <kstdguiitem.h> #include <kconfig.h> -#include <qgroupbox.h> -#include <qpushbutton.h> -#include <qcheckbox.h> -#include <qlayout.h> -#include <qtextview.h> -#include <qcombobox.h> -#include <qlabel.h> -#include <qheader.h> -#include <qmap.h> -#include <qtooltip.h> -#include <qwhatsthis.h> +#include <tqgroupbox.h> +#include <tqpushbutton.h> +#include <tqcheckbox.h> +#include <tqlayout.h> +#include <tqtextview.h> +#include <tqcombobox.h> +#include <tqlabel.h> +#include <tqheader.h> +#include <tqmap.h> +#include <tqtooltip.h> +#include <tqwhatsthis.h> @@ -60,17 +60,17 @@ public: K3bProgressDialog* erasingDlg; K3bDebuggingOutputDialog* debugDialog; K3bDebuggingOutputFile debugFile; - QMap<int, int> comboTypeMap; - QMap<int, int> typeComboMap; + TQMap<int, int> comboTypeMap; + TQMap<int, int> typeComboMap; bool jobRunning; }; -K3bBlankingDialog::K3bBlankingDialog( QWidget* parent, const char* name ) - : K3bInteractionDialog( parent, name, +K3bBlankingDialog::K3bBlankingDialog( TQWidget* tqparent, const char* name ) + : K3bInteractionDialog( tqparent, name, i18n("Erase CD-RW"), - QString::null, + TQString(), START_BUTTON|CANCEL_BUTTON, START_BUTTON, "CDRW Erasing" ) @@ -80,8 +80,8 @@ K3bBlankingDialog::K3bBlankingDialog( QWidget* parent, const char* name ) setupGui(); - connect( m_writerSelectionWidget, SIGNAL(writerChanged()), this, SLOT(slotWriterChanged()) ); - connect( m_writerSelectionWidget, SIGNAL(writingAppChanged(int)), this, SLOT(slotWritingAppChanged(int)) ); + connect( m_writerSelectionWidget, TQT_SIGNAL(writerChanged()), this, TQT_SLOT(slotWriterChanged()) ); + connect( m_writerSelectionWidget, TQT_SIGNAL(writingAppChanged(int)), this, TQT_SLOT(slotWritingAppChanged(int)) ); slotWriterChanged(); slotWritingAppChanged( m_writerSelectionWidget->writingApp() ); } @@ -101,21 +101,21 @@ void K3bBlankingDialog::setDevice( K3bDevice::Device* dev ) void K3bBlankingDialog::setupGui() { - QWidget* frame = mainWidget(); + TQWidget* frame = mainWidget(); m_writerSelectionWidget = new K3bWriterSelectionWidget( frame ); m_writerSelectionWidget->setWantedMediumType( K3bDevice::MEDIA_CD_RW ); m_writerSelectionWidget->setWantedMediumState( K3bDevice::STATE_COMPLETE|K3bDevice::STATE_INCOMPLETE ); // --- setup the blanking type button group ----------------------------- - QGroupBox* groupBlankType = new QGroupBox( 1, Qt::Vertical, i18n("&Erase Type"), frame ); - groupBlankType->layout()->setSpacing( spacingHint() ); - groupBlankType->layout()->setMargin( marginHint() ); + TQGroupBox* groupBlankType = new TQGroupBox( 1, Qt::Vertical, i18n("&Erase Type"), frame ); + groupBlankType->tqlayout()->setSpacing( spacingHint() ); + groupBlankType->tqlayout()->setMargin( marginHint() ); - m_comboEraseMode = new QComboBox( groupBlankType ); + m_comboEraseMode = new TQComboBox( groupBlankType ); // ---------------------------------------------------------------------- - QGridLayout* grid = new QGridLayout( frame ); + TQGridLayout* grid = new TQGridLayout( frame ); grid->setSpacing( spacingHint() ); grid->setMargin( 0 ); grid->addWidget( m_writerSelectionWidget, 0, 0 ); @@ -131,13 +131,13 @@ void K3bBlankingDialog::slotStartClicked() d->debugFile.open(); if( d->job == 0 ) { - d->job = new K3bBlankingJob( this, this ); - connect( d->job, SIGNAL(debuggingOutput(const QString&, const QString&)), - d->debugDialog, SLOT(addOutput(const QString&, const QString&)) ); - connect( d->job, SIGNAL(debuggingOutput(const QString&, const QString&)), - &d->debugFile, SLOT(addOutput(const QString&, const QString&)) ); - connect( d->job, SIGNAL(finished(bool)), - this, SLOT(slotJobFinished(bool)) ); + d->job = new K3bBlankingJob( this, TQT_TQOBJECT(this) ); + connect( d->job, TQT_SIGNAL(debuggingOutput(const TQString&, const TQString&)), + d->debugDialog, TQT_SLOT(addOutput(const TQString&, const TQString&)) ); + connect( d->job, TQT_SIGNAL(debuggingOutput(const TQString&, const TQString&)), + &d->debugFile, TQT_SLOT(addOutput(const TQString&, const TQString&)) ); + connect( d->job, TQT_SIGNAL(finished(bool)), + this, TQT_SLOT(slotJobFinished(bool)) ); } d->job->setDevice( m_writerSelectionWidget->writerDevice() ); @@ -150,7 +150,7 @@ void K3bBlankingDialog::slotStartClicked() if( !d->erasingDlg ) d->erasingDlg = new K3bProgressDialog( i18n("Erasing CD-RW"), this ); - connect( d->erasingDlg, SIGNAL(cancelClicked()), d->job, SLOT(cancel()) ); + connect( d->erasingDlg, TQT_SIGNAL(cancelClicked()), d->job, TQT_SLOT(cancel()) ); if( !exitLoopOnHide() ) hide(); @@ -200,22 +200,22 @@ void K3bBlankingDialog::slotWriterChanged() setButtonEnabled( START_BUTTON, true ); else { setButtonEnabled( START_BUTTON, false ); - KMessageBox::sorry( this, i18n("%1 does not support CD-RW writing.").arg(dev->devicename()) ); + KMessageBox::sorry( this, i18n("%1 does not support CD-RW writing.").tqarg(dev->devicename()) ); } } void K3bBlankingDialog::slotWritingAppChanged(int app) { - QWhatsThis::remove( m_comboEraseMode ); - QString whatsThisInfo; + TQWhatsThis::remove( m_comboEraseMode ); + TQString whatsThisInfo; - static QString wsComplete = i18n("Erases the complete disk. This takes as long " + static TQString wsComplete = i18n("Erases the complete disk. This takes as long " "as writing the complete CD."); - static QString wsFast = i18n("Erases just the TOC, the PMA, and the pregap."); - static QString wsTrack = i18n("Erases just the last track."); - static QString wsUnclose = i18n("Reopen the last session to make it possible to append " + static TQString wsFast = i18n("Erases just the TOC, the PMA, and the pregap."); + static TQString wsTrack = i18n("Erases just the last track."); + static TQString wsUnclose = i18n("Reopen the last session to make it possible to append " "further data."); - static QString wsSession = i18n("Erases the last session of a multisession CD."); + static TQString wsSession = i18n("Erases the last session of a multisession CD."); int lastMode = d->comboTypeMap[m_comboEraseMode->currentItem()]; @@ -249,10 +249,10 @@ void K3bBlankingDialog::slotWritingAppChanged(int app) whatsThisInfo += "<p><b>" + i18n("Erase Last Session") + "</b><br>" + wsSession; } - QWhatsThis::add( m_comboEraseMode, whatsThisInfo ); + TQWhatsThis::add( m_comboEraseMode, whatsThisInfo ); // try to reset last mode - if( d->typeComboMap.contains( lastMode ) ) + if( d->typeComboMap.tqcontains( lastMode ) ) m_comboEraseMode->setCurrentItem( d->typeComboMap[lastMode] ); else m_comboEraseMode->setCurrentItem( d->typeComboMap[K3bBlankingJob::Fast] ); @@ -270,7 +270,7 @@ void K3bBlankingDialog::loadUserDefaults( KConfigBase* c ) m_writerSelectionWidget->loadConfig( c ); slotWritingAppChanged( m_writerSelectionWidget->writingApp() ); - QString mode = c->readEntry( "erase_mode" ); + TQString mode = c->readEntry( "erase_mode" ); kdDebug() << "(K3bBlankingDialog) slotWritingAppChanged mode: " << mode << endl; m_comboEraseMode->setCurrentItem( d->typeComboMap[K3bBlankingJob::Fast] ); if( mode == "complete" ) @@ -287,7 +287,7 @@ void K3bBlankingDialog::loadUserDefaults( KConfigBase* c ) void K3bBlankingDialog::saveUserDefaults( KConfigBase* c ) { - QString mode; + TQString mode; switch( d->comboTypeMap[m_comboEraseMode->currentItem()] ) { case K3bBlankingJob::Complete: mode = "complete"; @@ -314,17 +314,17 @@ void K3bBlankingDialog::saveUserDefaults( KConfigBase* c ) int K3bBlankingDialog::waitForMedia( K3bDevice::Device* device, int mediaState, int mediaType, - const QString& message ) + const TQString& message ) { // this is only needed for the formatting return K3bEmptyDiscWaiter::wait( device, mediaState, mediaType, message, this ); } -bool K3bBlankingDialog::questionYesNo( const QString& text, - const QString& caption, - const QString& yesText, - const QString& noText ) +bool K3bBlankingDialog::questionYesNo( const TQString& text, + const TQString& caption, + const TQString& yesText, + const TQString& noText ) { return ( KMessageBox::questionYesNo( this, text, @@ -334,8 +334,8 @@ bool K3bBlankingDialog::questionYesNo( const QString& text, } -void K3bBlankingDialog::blockingInformation( const QString& text, - const QString& caption ) +void K3bBlankingDialog::blockingInformation( const TQString& text, + const TQString& caption ) { KMessageBox::information( this, text, caption ); } diff --git a/src/misc/k3bblankingdialog.h b/src/misc/k3bblankingdialog.h index cbd5583..6a0b861 100644 --- a/src/misc/k3bblankingdialog.h +++ b/src/misc/k3bblankingdialog.h @@ -20,9 +20,9 @@ #include "k3binteractiondialog.h" #include <k3bjobhandler.h> -class QGroupBox; -class QComboBox; -class QCloseEvent; +class TQGroupBox; +class TQComboBox; +class TQCloseEvent; class KListView; class K3bWriterSelectionWidget; namespace K3bDevice { @@ -33,9 +33,10 @@ namespace K3bDevice { class K3bBlankingDialog : public K3bInteractionDialog, public K3bJobHandler { Q_OBJECT + TQ_OBJECT public: - K3bBlankingDialog( QWidget*, const char* ); + K3bBlankingDialog( TQWidget*, const char* ); ~K3bBlankingDialog(); /** @@ -44,21 +45,21 @@ Q_OBJECT int waitForMedia( K3bDevice::Device*, int mediaState = K3bDevice::STATE_EMPTY, int mediaType = K3bDevice::MEDIA_WRITABLE_CD, - const QString& message = QString::null ); + const TQString& message = TQString() ); /** * @reimplemented from K3bJobHandler */ - bool questionYesNo( const QString& text, - const QString& caption = QString::null, - const QString& yesText = QString::null, - const QString& noText = QString::null ); + bool questionYesNo( const TQString& text, + const TQString& caption = TQString(), + const TQString& yesText = TQString(), + const TQString& noText = TQString() ); /** * reimplemented from K3bJobHandler */ - void blockingInformation( const QString& text, - const QString& caption = QString::null ); + void blockingInformation( const TQString& text, + const TQString& caption = TQString() ); public slots: void setDevice( K3bDevice::Device* ); @@ -77,7 +78,7 @@ Q_OBJECT K3bWriterSelectionWidget* m_writerSelectionWidget; - QComboBox* m_comboEraseMode; + TQComboBox* m_comboEraseMode; class Private; Private* d; diff --git a/src/misc/k3bcdcopydialog.cpp b/src/misc/k3bcdcopydialog.cpp index 4f1ce3b..66b4171 100644 --- a/src/misc/k3bcdcopydialog.cpp +++ b/src/misc/k3bcdcopydialog.cpp @@ -44,39 +44,39 @@ #include <kapplication.h> #include <kiconloader.h> -#include <qcheckbox.h> -#include <qspinbox.h> -#include <qcombobox.h> -#include <qlayout.h> -#include <qgroupbox.h> -#include <qptrlist.h> -#include <qlabel.h> -#include <qtooltip.h> -#include <qtabwidget.h> -#include <qwhatsthis.h> -#include <qhbox.h> -#include <qpushbutton.h> -#include <qbuttongroup.h> -#include <qradiobutton.h> -#include <qsizepolicy.h> -#include <qfile.h> -#include <qfileinfo.h> - - -K3bCdCopyDialog::K3bCdCopyDialog( QWidget *parent, const char *name, bool modal ) - : K3bInteractionDialog( parent, name, i18n("CD Copy"), i18n("and CD Cloning"), +#include <tqcheckbox.h> +#include <tqspinbox.h> +#include <tqcombobox.h> +#include <tqlayout.h> +#include <tqgroupbox.h> +#include <tqptrlist.h> +#include <tqlabel.h> +#include <tqtooltip.h> +#include <tqtabwidget.h> +#include <tqwhatsthis.h> +#include <tqhbox.h> +#include <tqpushbutton.h> +#include <tqbuttongroup.h> +#include <tqradiobutton.h> +#include <tqsizepolicy.h> +#include <tqfile.h> +#include <tqfileinfo.h> + + +K3bCdCopyDialog::K3bCdCopyDialog( TQWidget *tqparent, const char *name, bool modal ) + : K3bInteractionDialog( tqparent, name, i18n("CD Copy"), i18n("and CD Cloning"), START_BUTTON|CANCEL_BUTTON, START_BUTTON, "CD Copy", modal ) { - QWidget* main = mainWidget(); + TQWidget* main = mainWidget(); - QGridLayout* mainGrid = new QGridLayout( main ); + TQGridLayout* mainGrid = new TQGridLayout( main ); mainGrid->setSpacing( spacingHint() ); mainGrid->setMargin( 0 ); - QGroupBox* groupSource = new QGroupBox( 1, Qt::Vertical, i18n("Source Medium"), main ); + TQGroupBox* groupSource = new TQGroupBox( 1, Qt::Vertical, i18n("Source Medium"), main ); groupSource->setInsideSpacing( spacingHint() ); groupSource->setInsideMargin( marginHint() ); m_comboSourceDevice = new K3bMediaSelectionComboBox( groupSource ); @@ -89,36 +89,36 @@ K3bCdCopyDialog::K3bCdCopyDialog( QWidget *parent, const char *name, bool modal m_writerSelectionWidget->setSupportedWritingApps( K3b::CDRECORD ); // tab widget -------------------- - QTabWidget* tabWidget = new QTabWidget( main ); + TQTabWidget* tabWidget = new TQTabWidget( main ); // // option tab -------------------- // - QWidget* optionTab = new QWidget( tabWidget ); - QGridLayout* optionTabGrid = new QGridLayout( optionTab ); + TQWidget* optionTab = new TQWidget( tabWidget ); + TQGridLayout* optionTabGrid = new TQGridLayout( optionTab ); optionTabGrid->setSpacing( spacingHint() ); optionTabGrid->setMargin( marginHint() ); - QGroupBox* groupCopyMode = new QGroupBox( 1, Qt::Vertical, i18n("Copy Mode"), optionTab ); + TQGroupBox* groupCopyMode = new TQGroupBox( 1, Qt::Vertical, i18n("Copy Mode"), optionTab ); groupCopyMode->setInsideMargin( marginHint() ); groupCopyMode->setInsideSpacing( spacingHint() ); - m_comboCopyMode = new QComboBox( groupCopyMode ); + m_comboCopyMode = new TQComboBox( groupCopyMode ); m_comboCopyMode->insertItem( i18n("Normal Copy") ); m_comboCopyMode->insertItem( i18n("Clone Copy") ); - QGroupBox* groupWritingMode = new QGroupBox( 1, Qt::Vertical, i18n("Writing Mode"), optionTab ); + TQGroupBox* groupWritingMode = new TQGroupBox( 1, Qt::Vertical, i18n("Writing Mode"), optionTab ); groupWritingMode->setInsideMargin( marginHint() ); m_writingModeWidget = new K3bWritingModeWidget( groupWritingMode ); - QGroupBox* groupCopies = new QGroupBox( 2, Qt::Horizontal, i18n("Copies"), optionTab ); + TQGroupBox* groupCopies = new TQGroupBox( 2, Qt::Horizontal, i18n("Copies"), optionTab ); groupCopies->setInsideSpacing( spacingHint() ); groupCopies->setInsideMargin( marginHint() ); - QLabel* pixLabel = new QLabel( groupCopies ); + TQLabel* pixLabel = new TQLabel( groupCopies ); pixLabel->setPixmap( SmallIcon( "cdcopy", KIcon::SizeMedium ) ); pixLabel->setScaledContents( false ); - m_spinCopies = new QSpinBox( 1, 999, 1, groupCopies ); + m_spinCopies = new TQSpinBox( 1, 999, 1, groupCopies ); - QGroupBox* groupOptions = new QGroupBox( 5, Qt::Vertical, i18n("Settings"), optionTab ); + TQGroupBox* groupOptions = new TQGroupBox( 5, Qt::Vertical, i18n("Settings"), optionTab ); groupOptions->setInsideSpacing( spacingHint() ); groupOptions->setInsideMargin( marginHint() ); m_checkSimulate = K3bStdGuiItems::simulateCheckbox( groupOptions ); @@ -139,8 +139,8 @@ K3bCdCopyDialog::K3bCdCopyDialog( QWidget *parent, const char *name, bool modal // // image tab ------------------ // - QWidget* imageTab = new QWidget( tabWidget ); - QGridLayout* imageTabGrid = new QGridLayout( imageTab ); + TQWidget* imageTab = new TQWidget( tabWidget ); + TQGridLayout* imageTabGrid = new TQGridLayout( imageTab ); imageTabGrid->setSpacing( spacingHint() ); imageTabGrid->setMargin( marginHint() ); @@ -154,35 +154,35 @@ K3bCdCopyDialog::K3bCdCopyDialog( QWidget *parent, const char *name, bool modal // // advanced tab ------------------ // - QWidget* advancedTab = new QWidget( tabWidget ); - QGridLayout* advancedTabGrid = new QGridLayout( advancedTab ); + TQWidget* advancedTab = new TQWidget( tabWidget ); + TQGridLayout* advancedTabGrid = new TQGridLayout( advancedTab ); advancedTabGrid->setSpacing( spacingHint() ); advancedTabGrid->setMargin( marginHint() ); - m_groupAdvancedDataOptions = new QGroupBox( 3, Qt::Vertical, i18n("Data"), advancedTab, "data_options" ); + m_groupAdvancedDataOptions = new TQGroupBox( 3, Qt::Vertical, i18n("Data"), advancedTab, "data_options" ); m_groupAdvancedDataOptions->setInsideSpacing( spacingHint() ); m_groupAdvancedDataOptions->setInsideMargin( marginHint() ); - QHBox* box = new QHBox( m_groupAdvancedDataOptions ); + TQHBox* box = new TQHBox( m_groupAdvancedDataOptions ); box->setSpacing( spacingHint() ); - box->setStretchFactor( new QLabel( i18n("Read retries:"), box ), 1 ); - m_spinDataRetries = new QSpinBox( 1, 128, 1, box ); + box->setStretchFactor( new TQLabel( i18n("Read retries:"), box ), 1 ); + m_spinDataRetries = new TQSpinBox( 1, 128, 1, box ); m_checkIgnoreDataReadErrors = K3bStdGuiItems::ignoreAudioReadErrorsCheckBox( m_groupAdvancedDataOptions ); - m_checkNoCorrection = new QCheckBox( i18n("No error correction"), m_groupAdvancedDataOptions ); + m_checkNoCorrection = new TQCheckBox( i18n("No error correction"), m_groupAdvancedDataOptions ); - m_groupAdvancedAudioOptions = new QGroupBox( 5, Qt::Vertical, i18n("Audio"), advancedTab, "audio_options" ); + m_groupAdvancedAudioOptions = new TQGroupBox( 5, Qt::Vertical, i18n("Audio"), advancedTab, "audio_options" ); m_groupAdvancedAudioOptions->setInsideSpacing( spacingHint() ); m_groupAdvancedAudioOptions->setInsideMargin( marginHint() ); - box = new QHBox( m_groupAdvancedAudioOptions ); + box = new TQHBox( m_groupAdvancedAudioOptions ); box->setSpacing( spacingHint() ); - box->setStretchFactor( new QLabel( i18n("Read retries:"), box ), 1 ); - m_spinAudioRetries = new QSpinBox( 1, 128, 1, box ); + box->setStretchFactor( new TQLabel( i18n("Read retries:"), box ), 1 ); + m_spinAudioRetries = new TQSpinBox( 1, 128, 1, box ); m_checkIgnoreAudioReadErrors = K3bStdGuiItems::ignoreAudioReadErrorsCheckBox( m_groupAdvancedAudioOptions ); - box = new QHBox( m_groupAdvancedAudioOptions ); + box = new TQHBox( m_groupAdvancedAudioOptions ); box->setSpacing( spacingHint() ); - box->setStretchFactor(new QLabel( i18n("Paranoia mode:"), box ), 1 ); + box->setStretchFactor(new TQLabel( i18n("Paranoia mode:"), box ), 1 ); m_comboParanoiaMode = K3bStdGuiItems::paranoiaModeComboBox( box ); - m_checkReadCdText = new QCheckBox( i18n("Copy CD-Text"), m_groupAdvancedAudioOptions ); - m_checkPrefereCdText = new QCheckBox( i18n("Prefer CD-Text"), m_groupAdvancedAudioOptions ); + m_checkReadCdText = new TQCheckBox( i18n("Copy CD-Text"), m_groupAdvancedAudioOptions ); + m_checkPrefereCdText = new TQCheckBox( i18n("Prefer CD-Text"), m_groupAdvancedAudioOptions ); advancedTabGrid->addWidget( m_groupAdvancedDataOptions, 0, 1 ); advancedTabGrid->addWidget( m_groupAdvancedAudioOptions, 0, 0 ); @@ -195,38 +195,38 @@ K3bCdCopyDialog::K3bCdCopyDialog( QWidget *parent, const char *name, bool modal mainGrid->setRowStretch( 2, 1 ); - connect( m_comboSourceDevice, SIGNAL(selectionChanged(K3bDevice::Device*)), this, SLOT(slotToggleAll()) ); - connect( m_comboSourceDevice, SIGNAL(selectionChanged(K3bDevice::Device*)), - this, SLOT(slotSourceMediumChanged(K3bDevice::Device*)) ); - connect( m_writerSelectionWidget, SIGNAL(writerChanged()), this, SLOT(slotToggleAll()) ); - connect( m_writerSelectionWidget, SIGNAL(writerChanged(K3bDevice::Device*)), - m_writingModeWidget, SLOT(setDevice(K3bDevice::Device*)) ); - connect( m_writingModeWidget, SIGNAL(writingModeChanged(int)), this, SLOT(slotToggleAll()) ); - connect( m_checkCacheImage, SIGNAL(toggled(bool)), this, SLOT(slotToggleAll()) ); - connect( m_checkSimulate, SIGNAL(toggled(bool)), this, SLOT(slotToggleAll()) ); - connect( m_checkOnlyCreateImage, SIGNAL(toggled(bool)), this, SLOT(slotToggleAll()) ); - connect( m_comboCopyMode, SIGNAL(activated(int)), this, SLOT(slotToggleAll()) ); - connect( m_checkReadCdText, SIGNAL(toggled(bool)), this, SLOT(slotToggleAll()) ); - - QToolTip::add( m_checkIgnoreDataReadErrors, i18n("Skip unreadable data sectors") ); - QToolTip::add( m_checkNoCorrection, i18n("Disable the source drive's error correction") ); - QToolTip::add( m_checkPrefereCdText, i18n("Use CD-Text instead of cddb if available.") ); - QToolTip::add( m_checkReadCdText, i18n("Copy CD-Text from the source CD if available.") ); - - QWhatsThis::add( m_checkNoCorrection, i18n("<p>If this option is checked K3b will disable the " + connect( m_comboSourceDevice, TQT_SIGNAL(selectionChanged(K3bDevice::Device*)), this, TQT_SLOT(slotToggleAll()) ); + connect( m_comboSourceDevice, TQT_SIGNAL(selectionChanged(K3bDevice::Device*)), + this, TQT_SLOT(slotSourceMediumChanged(K3bDevice::Device*)) ); + connect( m_writerSelectionWidget, TQT_SIGNAL(writerChanged()), this, TQT_SLOT(slotToggleAll()) ); + connect( m_writerSelectionWidget, TQT_SIGNAL(writerChanged(K3bDevice::Device*)), + m_writingModeWidget, TQT_SLOT(setDevice(K3bDevice::Device*)) ); + connect( m_writingModeWidget, TQT_SIGNAL(writingModeChanged(int)), this, TQT_SLOT(slotToggleAll()) ); + connect( m_checkCacheImage, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotToggleAll()) ); + connect( m_checkSimulate, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotToggleAll()) ); + connect( m_checkOnlyCreateImage, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotToggleAll()) ); + connect( m_comboCopyMode, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotToggleAll()) ); + connect( m_checkReadCdText, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotToggleAll()) ); + + TQToolTip::add( m_checkIgnoreDataReadErrors, i18n("Skip unreadable data sectors") ); + TQToolTip::add( m_checkNoCorrection, i18n("Disable the source drive's error correction") ); + TQToolTip::add( m_checkPrefereCdText, i18n("Use CD-Text instead of cddb if available.") ); + TQToolTip::add( m_checkReadCdText, i18n("Copy CD-Text from the source CD if available.") ); + + TQWhatsThis::add( m_checkNoCorrection, i18n("<p>If this option is checked K3b will disable the " "source drive's ECC/EDC error correction. This way sectors " "that are unreadable by intention can be read." "<p>This may be useful for cloning CDs with copy " "protection based on corrupted sectors.") ); - QWhatsThis::add( m_checkReadCdText, i18n("<p>If this option is checked K3b will search for CD-Text on the source CD. " + TQWhatsThis::add( m_checkReadCdText, i18n("<p>If this option is checked K3b will search for CD-Text on the source CD. " "Disable it if your CD drive has problems with reading CD-Text or you want " "to stick to Cddb info.") ); - QWhatsThis::add( m_checkPrefereCdText, i18n("<p>If this option is checked and K3b finds CD-Text on the source media it will be " + TQWhatsThis::add( m_checkPrefereCdText, i18n("<p>If this option is checked and K3b finds CD-Text on the source media it will be " "copied to the resulting CD ignoring any potentially existing Cddb entries.") ); - QWhatsThis::add( m_checkIgnoreDataReadErrors, i18n("<p>If this option is checked and K3b is not able to read a data sector from the " + TQWhatsThis::add( m_checkIgnoreDataReadErrors, i18n("<p>If this option is checked and K3b is not able to read a data sector from the " "source CD/DVD it will be replaced with zeros on the resulting copy.") ); - QWhatsThis::add( m_comboCopyMode, + TQWhatsThis::add( m_comboCopyMode, "<p><b>" + i18n("Normal Copy") + "</b>" + i18n("<p>This is the normal copy mode recommended for most CD types. " "It allows copying Audio CDs, multi and single session Data CDs, and " @@ -293,23 +293,23 @@ void K3bCdCopyDialog::slotStartClicked() // check for m_tempDirSelectionWidget->tempPath() and // m_tempDirSelectionWidget-tempPath() + ".toc" // - if( QFileInfo( m_tempDirSelectionWidget->tempPath() ).isFile() ) { + if( TQFileInfo( m_tempDirSelectionWidget->tempPath() ).isFile() ) { if( KMessageBox::warningContinueCancel( this, - i18n("Do you want to overwrite %1?").arg(m_tempDirSelectionWidget->tempPath()), + i18n("Do you want to overwrite %1?").tqarg(m_tempDirSelectionWidget->tempPath()), i18n("File Exists"), i18n("Overwrite") ) != KMessageBox::Continue ) return; } - if( QFileInfo( m_tempDirSelectionWidget->tempPath() + ".toc" ).isFile() ) { + if( TQFileInfo( m_tempDirSelectionWidget->tempPath() + ".toc" ).isFile() ) { if( KMessageBox::warningContinueCancel( this, - i18n("Do you want to overwrite %1?").arg(m_tempDirSelectionWidget->tempPath() + ".toc"), + i18n("Do you want to overwrite %1?").tqarg(m_tempDirSelectionWidget->tempPath() + ".toc"), i18n("File Exists"), i18n("Overwrite") ) != KMessageBox::Continue ) return; } - K3bCloneJob* job = new K3bCloneJob( dlg, this ); + K3bCloneJob* job = new K3bCloneJob( dlg, TQT_TQOBJECT(this) ); job->setWriterDevice( m_writerSelectionWidget->writerDevice() ); job->setReaderDevice( m_comboSourceDevice->selectedDevice() ); @@ -325,7 +325,7 @@ void K3bCdCopyDialog::slotStartClicked() burnJob = job; } else { - K3bCdCopyJob* job = new K3bCdCopyJob( dlg, this ); + K3bCdCopyJob* job = new K3bCdCopyJob( dlg, TQT_TQOBJECT(this) ); job->setWriterDevice( m_writerSelectionWidget->writerDevice() ); job->setReaderDevice( m_comboSourceDevice->selectedDevice() ); @@ -392,7 +392,7 @@ void K3bCdCopyDialog::toggleAll() - static_cast<QWidget*>( child( "audio_options" ) )->setDisabled( m_comboCopyMode->currentItem() == 1 ); + TQT_TQWIDGET( child( "audio_options" ) )->setDisabled( m_comboCopyMode->currentItem() == 1 ); m_checkIgnoreDataReadErrors->setDisabled( m_comboCopyMode->currentItem() == 1 ); @@ -419,7 +419,7 @@ void K3bCdCopyDialog::slotSourceMediumChanged( K3bDevice::Device* dev ) if( k3bappcore->mediaCache()->toc( dev ).contentType() == K3bDevice::DATA ) { m_tempDirSelectionWidget->setSelectionMode( K3bTempDirSelectionWidget::FILE ); m_tempDirSelectionWidget->setDefaultImageFileName( medium.volumeId().lower() - + ( medium.toc().count() == 1 ? QString(".iso") : QString::null ) ); + + ( medium.toc().count() == 1 ? TQString(".iso") : TQString() ) ); } else { m_tempDirSelectionWidget->setSelectionMode( K3bTempDirSelectionWidget::DIR ); @@ -502,7 +502,7 @@ void K3bCdCopyDialog::saveUserDefaults( KConfigBase* c ) m_writerSelectionWidget->saveConfig( c ); m_tempDirSelectionWidget->saveConfig( c ); - c->writeEntry( "source_device", m_comboSourceDevice->selectedDevice() ? m_comboSourceDevice->selectedDevice()->devicename() : QString() ); + c->writeEntry( "source_device", m_comboSourceDevice->selectedDevice() ? m_comboSourceDevice->selectedDevice()->devicename() : TQString() ); c->writeEntry( "copy cdtext", m_checkReadCdText->isChecked() ); c->writeEntry( "prefer cdtext", m_checkPrefereCdText->isChecked() ); @@ -512,7 +512,7 @@ void K3bCdCopyDialog::saveUserDefaults( KConfigBase* c ) c->writeEntry( "data retries", m_spinDataRetries->value() ); c->writeEntry( "audio retries", m_spinAudioRetries->value() ); - QString s; + TQString s; if( m_comboCopyMode->currentItem() == 1 ) s = "clone"; else diff --git a/src/misc/k3bcdcopydialog.h b/src/misc/k3bcdcopydialog.h index b7a4bd2..818966c 100644 --- a/src/misc/k3bcdcopydialog.h +++ b/src/misc/k3bcdcopydialog.h @@ -31,12 +31,12 @@ namespace K3bDevice { class K3bWriterSelectionWidget; class K3bTempDirSelectionWidget; class K3bMediaSelectionComboBox; -class QCheckBox; -class QSpinBox; -class QComboBox; +class TQCheckBox; +class TQSpinBox; +class TQComboBox; class K3bWritingModeWidget; -class QButtonGroup; -class QGroupBox; +class TQButtonGroup; +class TQGroupBox; /** @@ -45,9 +45,10 @@ class QGroupBox; class K3bCdCopyDialog : public K3bInteractionDialog { Q_OBJECT + TQ_OBJECT public: - K3bCdCopyDialog(QWidget *parent = 0, const char *name = 0, bool modal = true ); + K3bCdCopyDialog(TQWidget *tqparent = 0, const char *name = 0, bool modal = true ); ~K3bCdCopyDialog(); void setReadingDevice( K3bDevice::Device* ); @@ -72,25 +73,25 @@ class K3bCdCopyDialog : public K3bInteractionDialog K3bWriterSelectionWidget* m_writerSelectionWidget; K3bTempDirSelectionWidget* m_tempDirSelectionWidget; - QCheckBox* m_checkSimulate; - QCheckBox* m_checkCacheImage; - QCheckBox* m_checkDeleteImages; - QCheckBox* m_checkOnlyCreateImage; - QCheckBox* m_checkReadCdText; - QCheckBox* m_checkPrefereCdText; - QCheckBox* m_checkIgnoreDataReadErrors; - QCheckBox* m_checkIgnoreAudioReadErrors; - QCheckBox* m_checkNoCorrection; + TQCheckBox* m_checkSimulate; + TQCheckBox* m_checkCacheImage; + TQCheckBox* m_checkDeleteImages; + TQCheckBox* m_checkOnlyCreateImage; + TQCheckBox* m_checkReadCdText; + TQCheckBox* m_checkPrefereCdText; + TQCheckBox* m_checkIgnoreDataReadErrors; + TQCheckBox* m_checkIgnoreAudioReadErrors; + TQCheckBox* m_checkNoCorrection; K3bMediaSelectionComboBox* m_comboSourceDevice; - QComboBox* m_comboParanoiaMode; - QSpinBox* m_spinCopies; - QSpinBox* m_spinDataRetries; - QSpinBox* m_spinAudioRetries; + TQComboBox* m_comboParanoiaMode; + TQSpinBox* m_spinCopies; + TQSpinBox* m_spinDataRetries; + TQSpinBox* m_spinAudioRetries; K3bWritingModeWidget* m_writingModeWidget; - QComboBox* m_comboCopyMode; + TQComboBox* m_comboCopyMode; - QGroupBox* m_groupAdvancedDataOptions; - QGroupBox* m_groupAdvancedAudioOptions; + TQGroupBox* m_groupAdvancedDataOptions; + TQGroupBox* m_groupAdvancedAudioOptions; }; #endif diff --git a/src/misc/k3bcdimagewritingdialog.cpp b/src/misc/k3bcdimagewritingdialog.cpp index b071d94..9e3e7e6 100644 --- a/src/misc/k3bcdimagewritingdialog.cpp +++ b/src/misc/k3bcdimagewritingdialog.cpp @@ -55,26 +55,26 @@ #include <kinputdialog.h> #include <kurldrag.h> -#include <qheader.h> -#include <qgroupbox.h> -#include <qcheckbox.h> -#include <qlabel.h> -#include <qcombobox.h> -#include <qlayout.h> -#include <qptrlist.h> -#include <qfile.h> -#include <qfileinfo.h> -#include <qfont.h> -#include <qfontmetrics.h> -#include <qpushbutton.h> -#include <qtabwidget.h> -#include <qtooltip.h> -#include <qwhatsthis.h> -#include <qspinbox.h> -#include <qmap.h> -#include <qptrqueue.h> -#include <qpopupmenu.h> -#include <qclipboard.h> +#include <tqheader.h> +#include <tqgroupbox.h> +#include <tqcheckbox.h> +#include <tqlabel.h> +#include <tqcombobox.h> +#include <tqlayout.h> +#include <tqptrlist.h> +#include <tqfile.h> +#include <tqfileinfo.h> +#include <tqfont.h> +#include <tqfontmetrics.h> +#include <tqpushbutton.h> +#include <tqtabwidget.h> +#include <tqtooltip.h> +#include <tqwhatsthis.h> +#include <tqspinbox.h> +#include <tqmap.h> +#include <tqptrqueue.h> +#include <tqpopupmenu.h> +#include <tqclipboard.h> class K3bCdImageWritingDialog::Private @@ -88,22 +88,22 @@ public: } K3bListViewItem* md5SumItem; - QString lastCheckedFile; + TQString lastCheckedFile; K3bMd5Job* md5Job; bool haveMd5Sum; int foundImageType; - QMap<int,int> imageTypeSelectionMap; - QMap<int,int> imageTypeSelectionMapRev; - QString imageFile; - QString tocFile; + TQMap<int,int> imageTypeSelectionMap; + TQMap<int,int> imageTypeSelectionMapRev; + TQString imageFile; + TQString tocFile; - QTabWidget* optionTabbed; + TQTabWidget* optionTabbed; - QWidget* advancedTab; - QWidget* tempPathTab; + TQWidget* advancedTab; + TQWidget* tempPathTab; bool advancedTabVisible; bool tempPathTabVisible; @@ -111,8 +111,8 @@ public: }; -K3bCdImageWritingDialog::K3bCdImageWritingDialog( QWidget* parent, const char* name, bool modal ) - : K3bInteractionDialog( parent, name, +K3bCdImageWritingDialog::K3bCdImageWritingDialog( TQWidget* tqparent, const char* name, bool modal ) + : K3bInteractionDialog( tqparent, name, i18n("Burn CD Image"), "iso cue toc", START_BUTTON|CANCEL_BUTTON, @@ -126,28 +126,28 @@ K3bCdImageWritingDialog::K3bCdImageWritingDialog( QWidget* parent, const char* n setupGui(); - d->md5Job = new K3bMd5Job( 0, this ); - connect( d->md5Job, SIGNAL(finished(bool)), - this, SLOT(slotMd5JobFinished(bool)) ); - connect( d->md5Job, SIGNAL(percent(int)), - this, SLOT(slotMd5JobPercent(int)) ); - - connect( m_writerSelectionWidget, SIGNAL(writerChanged()), - this, SLOT(slotToggleAll()) ); - connect( m_writerSelectionWidget, SIGNAL(writingAppChanged(int)), - this, SLOT(slotToggleAll()) ); - connect( m_writerSelectionWidget, SIGNAL(writerChanged(K3bDevice::Device*)), - m_writingModeWidget, SLOT(setDevice(K3bDevice::Device*)) ); - connect( m_comboImageType, SIGNAL(activated(int)), - this, SLOT(slotToggleAll()) ); - connect( m_writingModeWidget, SIGNAL(writingModeChanged(int)), - this, SLOT(slotToggleAll()) ); - connect( m_editImagePath, SIGNAL(textChanged(const QString&)), - this, SLOT(slotUpdateImage(const QString&)) ); - connect( m_checkDummy, SIGNAL(toggled(bool)), - this, SLOT(slotToggleAll()) ); - connect( m_checkCacheImage, SIGNAL(toggled(bool)), - this, SLOT(slotToggleAll()) ); + d->md5Job = new K3bMd5Job( 0, TQT_TQOBJECT(this) ); + connect( d->md5Job, TQT_SIGNAL(finished(bool)), + this, TQT_SLOT(slotMd5JobFinished(bool)) ); + connect( d->md5Job, TQT_SIGNAL(percent(int)), + this, TQT_SLOT(slotMd5JobPercent(int)) ); + + connect( m_writerSelectionWidget, TQT_SIGNAL(writerChanged()), + this, TQT_SLOT(slotToggleAll()) ); + connect( m_writerSelectionWidget, TQT_SIGNAL(writingAppChanged(int)), + this, TQT_SLOT(slotToggleAll()) ); + connect( m_writerSelectionWidget, TQT_SIGNAL(writerChanged(K3bDevice::Device*)), + m_writingModeWidget, TQT_SLOT(setDevice(K3bDevice::Device*)) ); + connect( m_comboImageType, TQT_SIGNAL(activated(int)), + this, TQT_SLOT(slotToggleAll()) ); + connect( m_writingModeWidget, TQT_SIGNAL(writingModeChanged(int)), + this, TQT_SLOT(slotToggleAll()) ); + connect( m_editImagePath, TQT_SIGNAL(textChanged(const TQString&)), + this, TQT_SLOT(slotUpdateImage(const TQString&)) ); + connect( m_checkDummy, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(slotToggleAll()) ); + connect( m_checkCacheImage, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(slotToggleAll()) ); } @@ -165,8 +165,8 @@ void K3bCdImageWritingDialog::init() // last written image because that's what most users want KConfig* c = k3bcore->config(); c->setGroup( configGroup() ); - QString image = c->readPathEntry( "last written image" ); - if( QFile::exists( image ) ) + TQString image = c->readPathEntry( "last written image" ); + if( TQFile::exists( image ) ) m_editImagePath->setURL( image ); } } @@ -174,11 +174,11 @@ void K3bCdImageWritingDialog::init() void K3bCdImageWritingDialog::setupGui() { - QWidget* frame = mainWidget(); + TQWidget* frame = mainWidget(); // image // ----------------------------------------------------------------------- - QGroupBox* groupImageUrl = new QGroupBox( 1, Qt::Horizontal, i18n("Image to Burn"), frame ); + TQGroupBox* groupImageUrl = new TQGroupBox( 1, Qt::Horizontal, i18n("Image to Burn"), frame ); m_editImagePath = new KURLRequester( groupImageUrl ); m_editImagePath->setMode( KFile::File|KFile::ExistingOnly ); m_editImagePath->setCaption( i18n("Choose Image File") ); @@ -192,8 +192,8 @@ void K3bCdImageWritingDialog::setupGui() + "\n" + i18n("*|All Files") ); - QGroupBox* groupImageType = new QGroupBox( 1, Qt::Horizontal, i18n("Image Type"), frame ); - m_comboImageType = new QComboBox( groupImageType ); + TQGroupBox* groupImageType = new TQGroupBox( 1, Qt::Horizontal, i18n("Image Type"), frame ); + m_comboImageType = new TQComboBox( groupImageType ); m_comboImageType->insertItem( i18n("Auto Detection") ); m_comboImageType->insertItem( i18n("ISO9660 Image") ); m_comboImageType->insertItem( i18n("Cue/Bin Image") ); @@ -220,12 +220,12 @@ void K3bCdImageWritingDialog::setupGui() m_infoView->header()->hide(); m_infoView->setNoItemText( i18n("No image file selected") ); m_infoView->setSorting( -1 ); - m_infoView->setAlternateBackground( QColor() ); + m_infoView->setAlternateBackground( TQColor() ); m_infoView->setFullWidth(true); - m_infoView->setSelectionMode( QListView::NoSelection ); + m_infoView->setSelectionMode( TQListView::NoSelection ); - connect( m_infoView, SIGNAL(contextMenu(KListView*, QListViewItem*, const QPoint&)), - this, SLOT(slotContextMenu(KListView*, QListViewItem*, const QPoint&)) ); + connect( m_infoView, TQT_SIGNAL(contextMenu(KListView*, TQListViewItem*, const TQPoint&)), + this, TQT_SLOT(slotContextMenu(KListView*, TQListViewItem*, const TQPoint&)) ); m_writerSelectionWidget = new K3bWriterSelectionWidget( frame ); @@ -234,32 +234,32 @@ void K3bCdImageWritingDialog::setupGui() // options // ----------------------------------------------------------------------- - d->optionTabbed = new QTabWidget( frame ); + d->optionTabbed = new TQTabWidget( frame ); - QWidget* optionTab = new QWidget( d->optionTabbed ); - QGridLayout* optionTabLayout = new QGridLayout( optionTab ); - optionTabLayout->setAlignment( Qt::AlignTop ); + TQWidget* optionTab = new TQWidget( d->optionTabbed ); + TQGridLayout* optionTabLayout = new TQGridLayout( optionTab ); + optionTabLayout->tqsetAlignment( TQt::AlignTop ); optionTabLayout->setSpacing( spacingHint() ); optionTabLayout->setMargin( marginHint() ); - QGroupBox* writingModeGroup = new QGroupBox( 1, Vertical, i18n("Writing Mode"), optionTab ); + TQGroupBox* writingModeGroup = new TQGroupBox( 1,Qt::Vertical, i18n("Writing Mode"), optionTab ); writingModeGroup->setInsideMargin( marginHint() ); m_writingModeWidget = new K3bWritingModeWidget( writingModeGroup ); // copies -------- - QGroupBox* groupCopies = new QGroupBox( 2, Qt::Horizontal, i18n("Copies"), optionTab ); + TQGroupBox* groupCopies = new TQGroupBox( 2, Qt::Horizontal, i18n("Copies"), optionTab ); groupCopies->setInsideSpacing( spacingHint() ); groupCopies->setInsideMargin( marginHint() ); - QLabel* pixLabel = new QLabel( groupCopies ); + TQLabel* pixLabel = new TQLabel( groupCopies ); pixLabel->setPixmap( SmallIcon( "cdcopy", KIcon::SizeMedium ) ); pixLabel->setScaledContents( false ); - m_spinCopies = new QSpinBox( groupCopies ); + m_spinCopies = new TQSpinBox( groupCopies ); m_spinCopies->setMinValue( 1 ); m_spinCopies->setMaxValue( 999 ); // -------- copies - QGroupBox* optionGroup = new QGroupBox( 3, Vertical, i18n("Settings"), optionTab ); + TQGroupBox* optionGroup = new TQGroupBox( 3,Qt::Vertical, i18n("Settings"), optionTab ); optionGroup->setInsideMargin( marginHint() ); optionGroup->setInsideSpacing( spacingHint() ); m_checkDummy = K3bStdGuiItems::simulateCheckbox( optionGroup ); @@ -276,8 +276,8 @@ void K3bCdImageWritingDialog::setupGui() // image tab ------------------------------------ - d->tempPathTab = new QWidget( d->optionTabbed ); - QGridLayout* imageTabGrid = new QGridLayout( d->tempPathTab ); + d->tempPathTab = new TQWidget( d->optionTabbed ); + TQGridLayout* imageTabGrid = new TQGridLayout( d->tempPathTab ); imageTabGrid->setSpacing( spacingHint() ); imageTabGrid->setMargin( marginHint() ); @@ -291,16 +291,16 @@ void K3bCdImageWritingDialog::setupGui() // advanced --------------------------------- - d->advancedTab = new QWidget( d->optionTabbed ); - QGridLayout* advancedTabLayout = new QGridLayout( d->advancedTab ); - advancedTabLayout->setAlignment( Qt::AlignTop ); + d->advancedTab = new TQWidget( d->optionTabbed ); + TQGridLayout* advancedTabLayout = new TQGridLayout( d->advancedTab ); + advancedTabLayout->tqsetAlignment( TQt::AlignTop ); advancedTabLayout->setSpacing( spacingHint() ); advancedTabLayout->setMargin( marginHint() ); m_dataModeWidget = new K3bDataModeWidget( d->advancedTab ); m_checkNoFix = K3bStdGuiItems::startMultisessionCheckBox( d->advancedTab ); - advancedTabLayout->addWidget( new QLabel( i18n("Data mode:"), d->advancedTab ), 0, 0 ); + advancedTabLayout->addWidget( new TQLabel( i18n("Data mode:"), d->advancedTab ), 0, 0 ); advancedTabLayout->addWidget( m_dataModeWidget, 0, 1 ); advancedTabLayout->addMultiCellWidget( m_checkNoFix, 1, 1, 0, 2 ); advancedTabLayout->setRowStretch( 2, 1 ); @@ -313,7 +313,7 @@ void K3bCdImageWritingDialog::setupGui() - QGridLayout* grid = new QGridLayout( frame ); + TQGridLayout* grid = new TQGridLayout( frame ); grid->setSpacing( spacingHint() ); grid->setMargin( 0 ); @@ -354,7 +354,7 @@ void K3bCdImageWritingDialog::slotStartClicked() switch( currentImageType() ) { case IMAGE_CDRECORD_CLONE: { - K3bCloneJob* _job = new K3bCloneJob( &dlg, this ); + K3bCloneJob* _job = new K3bCloneJob( &dlg, TQT_TQOBJECT(this) ); _job->setWriterDevice( m_writerSelectionWidget->writerDevice() ); _job->setImagePath( d->imageFile ); _job->setSimulate( m_checkDummy->isChecked() ); @@ -368,7 +368,7 @@ void K3bCdImageWritingDialog::slotStartClicked() case IMAGE_AUDIO_CUE: { - K3bAudioCueFileWritingJob* job_ = new K3bAudioCueFileWritingJob( &dlg, this ); + K3bAudioCueFileWritingJob* job_ = new K3bAudioCueFileWritingJob( &dlg, TQT_TQOBJECT(this) ); job_->setBurnDevice( m_writerSelectionWidget->writerDevice() ); job_->setSpeed( m_writerSelectionWidget->writerSpeed() ); @@ -387,7 +387,7 @@ void K3bCdImageWritingDialog::slotStartClicked() // for now the K3bBinImageWritingJob decides if it's a toc or a cue file case IMAGE_CDRDAO_TOC: { - K3bBinImageWritingJob* job_ = new K3bBinImageWritingJob( &dlg, this ); + K3bBinImageWritingJob* job_ = new K3bBinImageWritingJob( &dlg, TQT_TQOBJECT(this) ); job_->setWriter( m_writerSelectionWidget->writerDevice() ); job_->setSpeed( m_writerSelectionWidget->writerSpeed() ); @@ -456,9 +456,9 @@ void K3bCdImageWritingDialog::slotStartClicked() } -void K3bCdImageWritingDialog::slotUpdateImage( const QString& ) +void K3bCdImageWritingDialog::slotUpdateImage( const TQString& ) { - QString path = imagePath(); + TQString path = imagePath(); // check the image types @@ -471,7 +471,7 @@ void K3bCdImageWritingDialog::slotUpdateImage( const QString& ) d->tocFile.truncate(0); d->imageFile.truncate(0); - QFileInfo info( path ); + TQFileInfo info( path ); if( info.isFile() ) { // ------------------------------------------------ @@ -568,14 +568,14 @@ void K3bCdImageWritingDialog::slotUpdateImage( const QString& ) if( d->foundImageType == IMAGE_UNKNOWN ) { K3bListViewItem* item = new K3bListViewItem( m_infoView, m_infoView->lastItem(), i18n("Seems not to be a usable image") ); - item->setForegroundColor( 0, Qt::red ); + item->setForegroundColor( 0, TQt::red ); item->setPixmap( 0, SmallIcon( "stop") ); } } else { K3bListViewItem* item = new K3bListViewItem( m_infoView, m_infoView->lastItem(), i18n("File not found") ); - item->setForegroundColor( 0, Qt::red ); + item->setForegroundColor( 0, TQt::red ); item->setPixmap( 0, SmallIcon( "stop") ); } @@ -588,117 +588,117 @@ void K3bCdImageWritingDialog::createIso9660InfoItems( K3bIso9660* isoF ) K3bListViewItem* isoRootItem = new K3bListViewItem( m_infoView, m_infoView->lastItem(), i18n("Detected:"), i18n("Iso9660 image") ); - isoRootItem->setForegroundColor( 0, palette().disabled().foreground() ); + isoRootItem->setForegroundColor( 0, tqpalette().disabled().foreground() ); isoRootItem->setPixmap( 0, SmallIcon( "cdimage") ); KIO::filesize_t size = K3b::filesize( KURL::fromPathOrURL(isoF->fileName()) ); K3bListViewItem* item = new K3bListViewItem( isoRootItem, m_infoView->lastItem(), i18n("Filesize:"), KIO::convertSize( size ) ); - item->setForegroundColor( 0, palette().disabled().foreground() ); + item->setForegroundColor( 0, tqpalette().disabled().foreground() ); item = new K3bListViewItem( isoRootItem, m_infoView->lastItem(), i18n("System Id:"), isoF->primaryDescriptor().systemId.isEmpty() - ? QString("-") + ? TQString("-") : isoF->primaryDescriptor().systemId ); - item->setForegroundColor( 0, palette().disabled().foreground() ); + item->setForegroundColor( 0, tqpalette().disabled().foreground() ); item = new K3bListViewItem( isoRootItem, m_infoView->lastItem(), i18n("Volume Id:"), isoF->primaryDescriptor().volumeId.isEmpty() - ? QString("-") + ? TQString("-") : isoF->primaryDescriptor().volumeId ); - item->setForegroundColor( 0, palette().disabled().foreground() ); + item->setForegroundColor( 0, tqpalette().disabled().foreground() ); item = new K3bListViewItem( isoRootItem, m_infoView->lastItem(), i18n("Volume Set Id:"), isoF->primaryDescriptor().volumeSetId.isEmpty() - ? QString("-") + ? TQString("-") : isoF->primaryDescriptor().volumeSetId ); - item->setForegroundColor( 0, palette().disabled().foreground() ); + item->setForegroundColor( 0, tqpalette().disabled().foreground() ); item = new K3bListViewItem( isoRootItem, m_infoView->lastItem(), i18n("Publisher Id:"), isoF->primaryDescriptor().publisherId.isEmpty() - ? QString("-") + ? TQString("-") : isoF->primaryDescriptor().publisherId ); - item->setForegroundColor( 0, palette().disabled().foreground() ); + item->setForegroundColor( 0, tqpalette().disabled().foreground() ); item = new K3bListViewItem( isoRootItem, m_infoView->lastItem(), i18n("Preparer Id:"), isoF->primaryDescriptor().preparerId.isEmpty() - ? QString("-") : isoF->primaryDescriptor().preparerId ); - item->setForegroundColor( 0, palette().disabled().foreground() ); + ? TQString("-") : isoF->primaryDescriptor().preparerId ); + item->setForegroundColor( 0, tqpalette().disabled().foreground() ); item = new K3bListViewItem( isoRootItem, m_infoView->lastItem(), i18n("Application Id:"), isoF->primaryDescriptor().applicationId.isEmpty() - ? QString("-") + ? TQString("-") : isoF->primaryDescriptor().applicationId ); - item->setForegroundColor( 0, palette().disabled().foreground() ); + item->setForegroundColor( 0, tqpalette().disabled().foreground() ); isoRootItem->setOpen( true ); } -void K3bCdImageWritingDialog::createCdrecordCloneItems( const QString& tocFile, const QString& imageFile ) +void K3bCdImageWritingDialog::createCdrecordCloneItems( const TQString& tocFile, const TQString& imageFile ) { K3bListViewItem* isoRootItem = new K3bListViewItem( m_infoView, m_infoView->lastItem(), i18n("Detected:"), i18n("Cdrecord clone image") ); - isoRootItem->setForegroundColor( 0, palette().disabled().foreground() ); + isoRootItem->setForegroundColor( 0, tqpalette().disabled().foreground() ); isoRootItem->setPixmap( 0, SmallIcon( "cdimage") ); K3bListViewItem* item = new K3bListViewItem( isoRootItem, m_infoView->lastItem(), i18n("Filesize:"), KIO::convertSize( K3b::filesize(KURL::fromPathOrURL(imageFile)) ) ); - item->setForegroundColor( 0, palette().disabled().foreground() ); + item->setForegroundColor( 0, tqpalette().disabled().foreground() ); item = new K3bListViewItem( isoRootItem, m_infoView->lastItem(), i18n("Image file:"), imageFile ); - item->setForegroundColor( 0, palette().disabled().foreground() ); + item->setForegroundColor( 0, tqpalette().disabled().foreground() ); item = new K3bListViewItem( isoRootItem, m_infoView->lastItem(), i18n("TOC file:"), tocFile ); - item->setForegroundColor( 0, palette().disabled().foreground() ); + item->setForegroundColor( 0, tqpalette().disabled().foreground() ); isoRootItem->setOpen( true ); } -void K3bCdImageWritingDialog::createCueBinItems( const QString& cueFile, const QString& imageFile ) +void K3bCdImageWritingDialog::createCueBinItems( const TQString& cueFile, const TQString& imageFile ) { K3bListViewItem* isoRootItem = new K3bListViewItem( m_infoView, m_infoView->lastItem(), i18n("Detected:"), i18n("Cue/bin image") ); - isoRootItem->setForegroundColor( 0, palette().disabled().foreground() ); + isoRootItem->setForegroundColor( 0, tqpalette().disabled().foreground() ); isoRootItem->setPixmap( 0, SmallIcon( "cdimage") ); K3bListViewItem* item = new K3bListViewItem( isoRootItem, m_infoView->lastItem(), i18n("Filesize:"), KIO::convertSize( K3b::filesize(KURL::fromPathOrURL(imageFile)) ) ); - item->setForegroundColor( 0, palette().disabled().foreground() ); + item->setForegroundColor( 0, tqpalette().disabled().foreground() ); item = new K3bListViewItem( isoRootItem, m_infoView->lastItem(), i18n("Image file:"), imageFile ); - item->setForegroundColor( 0, palette().disabled().foreground() ); + item->setForegroundColor( 0, tqpalette().disabled().foreground() ); item = new K3bListViewItem( isoRootItem, m_infoView->lastItem(), i18n("Cue file:"), cueFile ); - item->setForegroundColor( 0, palette().disabled().foreground() ); + item->setForegroundColor( 0, tqpalette().disabled().foreground() ); isoRootItem->setOpen( true ); } @@ -709,7 +709,7 @@ void K3bCdImageWritingDialog::createAudioCueItems( const K3bCueFileParser& cp ) K3bListViewItem* rootItem = new K3bListViewItem( m_infoView, m_infoView->lastItem(), i18n("Detected:"), i18n("Audio Cue Image") ); - rootItem->setForegroundColor( 0, palette().disabled().foreground() ); + rootItem->setForegroundColor( 0, tqpalette().disabled().foreground() ); rootItem->setPixmap( 0, SmallIcon( "sound") ); K3bListViewItem* trackParent = new K3bListViewItem( rootItem, @@ -717,10 +717,10 @@ void K3bCdImageWritingDialog::createAudioCueItems( const K3bCueFileParser& cp ) cp.toc().length().toString() ); if( !cp.cdText().isEmpty() ) trackParent->setText( 1, - QString("%1 (%2 - %3)") - .arg(trackParent->text(1)) - .arg(cp.cdText().performer()) - .arg(cp.cdText().title()) ); + TQString("%1 (%2 - %3)") + .tqarg(trackParent->text(1)) + .tqarg(cp.cdText().performer()) + .tqarg(cp.cdText().title()) ); unsigned int i = 1; for( K3bDevice::Toc::const_iterator it = cp.toc().begin(); @@ -728,17 +728,17 @@ void K3bCdImageWritingDialog::createAudioCueItems( const K3bCueFileParser& cp ) K3bListViewItem* trackItem = new K3bListViewItem( trackParent, m_infoView->lastItem(), - i18n("Track") + " " + QString::number(i).rightJustify( 2, '0' ), + i18n("Track") + " " + TQString::number(i).rightJustify( 2, '0' ), " " + ( i < cp.toc().count() ? (*it).length().toString() - : QString("??:??:??") ) ); + : TQString("??:??:??") ) ); if( !cp.cdText().isEmpty() && !cp.cdText()[i-1].isEmpty() ) trackItem->setText( 1, - QString("%1 (%2 - %3)") - .arg(trackItem->text(1)) - .arg(cp.cdText()[i-1].performer()) - .arg(cp.cdText()[i-1].title()) ); + TQString("%1 (%2 - %3)") + .tqarg(trackItem->text(1)) + .tqarg(cp.cdText()[i-1].performer()) + .tqarg(cp.cdText()[i-1].title()) ); ++i; } @@ -753,7 +753,7 @@ void K3bCdImageWritingDialog::toggleAll() // enable the Write-Button if we found a valid image or the user forced an image type setButtonEnabled( START_BUTTON, m_writerSelectionWidget->writerDevice() && currentImageType() != IMAGE_UNKNOWN - && QFile::exists( imagePath() ) ); + && TQFile::exists( imagePath() ) ); // cdrecord clone and cue both need DAO if( m_writerSelectionWidget->writingApp() != K3b::CDRDAO @@ -815,8 +815,8 @@ void K3bCdImageWritingDialog::toggleAll() if( item ) item->setForegroundColor( 1, currentImageType() != d->foundImageType - ? Qt::red - : m_infoView->colorGroup().foreground() ); + ? TQt::red + : m_infoView->tqcolorGroup().foreground() ); } @@ -831,7 +831,7 @@ void K3bCdImageWritingDialog::setImage( const KURL& url ) } -void K3bCdImageWritingDialog::calculateMd5Sum( const QString& file ) +void K3bCdImageWritingDialog::calculateMd5Sum( const TQString& file ) { d->haveMd5Sum = false; @@ -839,7 +839,7 @@ void K3bCdImageWritingDialog::calculateMd5Sum( const QString& file ) d->md5SumItem = new K3bListViewItem( m_infoView, m_infoView->firstChild() ); d->md5SumItem->setText( 0, i18n("Md5 Sum:") ); - d->md5SumItem->setForegroundColor( 0, palette().disabled().foreground() ); + d->md5SumItem->setForegroundColor( 0, tqpalette().disabled().foreground() ); d->md5SumItem->setProgress( 1, 0 ); d->md5SumItem->setPixmap( 0, SmallIcon( "exec") ); @@ -866,7 +866,7 @@ void K3bCdImageWritingDialog::slotMd5JobFinished( bool success ) d->haveMd5Sum = true; } else { - d->md5SumItem->setForegroundColor( 1, Qt::red ); + d->md5SumItem->setForegroundColor( 1, TQt::red ); if( d->md5Job->hasBeenCanceled() ) d->md5SumItem->setText( 1, i18n("Calculation cancelled") ); else @@ -879,12 +879,12 @@ void K3bCdImageWritingDialog::slotMd5JobFinished( bool success ) } -void K3bCdImageWritingDialog::slotContextMenu( KListView*, QListViewItem*, const QPoint& pos ) +void K3bCdImageWritingDialog::slotContextMenu( KListView*, TQListViewItem*, const TQPoint& pos ) { if( !d->haveMd5Sum ) return; - QPopupMenu popup; + TQPopupMenu popup; int copyItem = popup.insertItem( i18n("Copy checksum to clipboard") ); int compareItem = popup.insertItem( i18n("Compare checksum...") ); @@ -892,22 +892,22 @@ void K3bCdImageWritingDialog::slotContextMenu( KListView*, QListViewItem*, const if( r == compareItem ) { bool ok; - QString md5sumToCompare = KInputDialog::getText( i18n("MD5 Sum Check"), + TQString md5sumToCompare = KInputDialog::getText( i18n("MD5 Sum Check"), i18n("Please insert the MD5 Sum to compare:"), - QString::null, + TQString(), &ok, this ); if( ok ) { if( md5sumToCompare.lower().utf8() == d->md5Job->hexDigest().lower() ) - KMessageBox::information( this, i18n("The MD5 Sum of %1 equals the specified.").arg(imagePath()), + KMessageBox::information( this, i18n("The MD5 Sum of %1 equals the specified.").tqarg(imagePath()), i18n("MD5 Sums Equal") ); else - KMessageBox::sorry( this, i18n("The MD5 Sum of %1 differs from the specified.").arg(imagePath()), + KMessageBox::sorry( this, i18n("The MD5 Sum of %1 differs from the specified.").tqarg(imagePath()), i18n("MD5 Sums Differ") ); } } else if( r == copyItem ) { - QApplication::clipboard()->setText( d->md5Job->hexDigest().lower(), QClipboard::Clipboard ); + TQApplication::tqclipboard()->setText( d->md5Job->hexDigest().lower(), TQClipboard::Clipboard ); } } @@ -928,12 +928,12 @@ void K3bCdImageWritingDialog::loadUserDefaults( KConfigBase* c ) m_writerSelectionWidget->loadConfig( c ); if( !d->imageForced ) { - QString image = c->readPathEntry( "image path", c->readPathEntry( "last written image" ) ); - if( QFile::exists( image ) ) + TQString image = c->readPathEntry( "image path", c->readPathEntry( "last written image" ) ); + if( TQFile::exists( image ) ) m_editImagePath->setURL( image ); } - QString imageType = c->readEntry( "image type", "auto" ); + TQString imageType = c->readEntry( "image type", "auto" ); int x = 0; if( imageType == "iso9660" ) x = d->imageTypeSelectionMapRev[IMAGE_ISO]; @@ -970,7 +970,7 @@ void K3bCdImageWritingDialog::saveUserDefaults( KConfigBase* c ) c->writeEntry( "copies", m_spinCopies->value() ); - QString imageType; + TQString imageType; if( m_comboImageType->currentItem() == 0 ) imageType = "auto"; else { @@ -1023,19 +1023,19 @@ int K3bCdImageWritingDialog::currentImageType() } -QString K3bCdImageWritingDialog::imagePath() const +TQString K3bCdImageWritingDialog::imagePath() const { return K3b::convertToLocalUrl( KURL::fromPathOrURL( m_editImagePath->url() ) ).path(); } -void K3bCdImageWritingDialog::dragEnterEvent( QDragEnterEvent* e ) +void K3bCdImageWritingDialog::dragEnterEvent( TQDragEnterEvent* e ) { e->accept( KURLDrag::canDecode(e) ); } -void K3bCdImageWritingDialog::dropEvent( QDropEvent* e ) +void K3bCdImageWritingDialog::dropEvent( TQDropEvent* e ) { KURL::List urls; KURLDrag::decode( e, urls ); diff --git a/src/misc/k3bcdimagewritingdialog.h b/src/misc/k3bcdimagewritingdialog.h index 143f023..773697b 100644 --- a/src/misc/k3bcdimagewritingdialog.h +++ b/src/misc/k3bcdimagewritingdialog.h @@ -20,9 +20,9 @@ #include <k3binteractiondialog.h> -class QCheckBox; +class TQCheckBox; class K3bWriterSelectionWidget; -class QLabel; +class TQLabel; class KURL; class KActiveLabel; class KProgress; @@ -31,15 +31,15 @@ class K3bWritingModeWidget; class K3bTempDirSelectionWidget; class KURLRequester; class K3bListView; -class QSpinBox; -class QComboBox; +class TQSpinBox; +class TQComboBox; class K3bIso9660; class K3bCueFileParser; -class QDragEnterEvent; -class QDropEvent; +class TQDragEnterEvent; +class TQDropEvent; class KListView; -class QListViewItem; -class QPoint; +class TQListViewItem; +class TQPoint; /** @@ -48,9 +48,10 @@ class QPoint; class K3bCdImageWritingDialog : public K3bInteractionDialog { Q_OBJECT + TQ_OBJECT public: - K3bCdImageWritingDialog( QWidget* = 0, const char* = 0, bool = true ); + K3bCdImageWritingDialog( TQWidget* = 0, const char* = 0, bool = true ); ~K3bCdImageWritingDialog(); void setImage( const KURL& url ); @@ -60,18 +61,18 @@ class K3bCdImageWritingDialog : public K3bInteractionDialog void slotMd5JobPercent( int ); void slotMd5JobFinished( bool ); - void slotContextMenu( KListView*, QListViewItem*, const QPoint& pos ); + void slotContextMenu( KListView*, TQListViewItem*, const TQPoint& pos ); - void slotUpdateImage( const QString& ); + void slotUpdateImage( const TQString& ); protected: void loadUserDefaults( KConfigBase* ); void saveUserDefaults( KConfigBase* ); void loadK3bDefaults(); - void calculateMd5Sum( const QString& ); - void dragEnterEvent( QDragEnterEvent* ); - void dropEvent( QDropEvent* ); + void calculateMd5Sum( const TQString& ); + void dragEnterEvent( TQDragEnterEvent* ); + void dropEvent( TQDropEvent* ); void init(); @@ -88,23 +89,23 @@ class K3bCdImageWritingDialog : public K3bInteractionDialog void setupGui(); void createIso9660InfoItems( K3bIso9660* ); - void createCdrecordCloneItems( const QString&, const QString& ); - void createCueBinItems( const QString&, const QString& ); + void createCdrecordCloneItems( const TQString&, const TQString& ); + void createCueBinItems( const TQString&, const TQString& ); void createAudioCueItems( const K3bCueFileParser& cp ); int currentImageType(); - QString imagePath() const; + TQString imagePath() const; K3bWriterSelectionWidget* m_writerSelectionWidget; - QCheckBox* m_checkDummy; - QCheckBox* m_checkNoFix; - QCheckBox* m_checkCacheImage; - QCheckBox* m_checkVerify; + TQCheckBox* m_checkDummy; + TQCheckBox* m_checkNoFix; + TQCheckBox* m_checkCacheImage; + TQCheckBox* m_checkVerify; K3bDataModeWidget* m_dataModeWidget; K3bWritingModeWidget* m_writingModeWidget; - QSpinBox* m_spinCopies; + TQSpinBox* m_spinCopies; KURLRequester* m_editImagePath; - QComboBox* m_comboImageType; + TQComboBox* m_comboImageType; K3bListView* m_infoView; K3bTempDirSelectionWidget* m_tempDirSelectionWidget; diff --git a/src/misc/k3bdvdcopydialog.cpp b/src/misc/k3bdvdcopydialog.cpp index f93abba..999dc3a 100644 --- a/src/misc/k3bdvdcopydialog.cpp +++ b/src/misc/k3bdvdcopydialog.cpp @@ -31,18 +31,18 @@ #include <k3bmediacache.h> #include <k3biso9660.h> -#include <qlayout.h> -#include <qgroupbox.h> -#include <qcheckbox.h> -#include <qlabel.h> -#include <qtabwidget.h> -#include <qspinbox.h> -#include <qptrlist.h> -#include <qfile.h> -#include <qpushbutton.h> -#include <qtooltip.h> -#include <qwhatsthis.h> -#include <qhbox.h> +#include <tqlayout.h> +#include <tqgroupbox.h> +#include <tqcheckbox.h> +#include <tqlabel.h> +#include <tqtabwidget.h> +#include <tqspinbox.h> +#include <tqptrlist.h> +#include <tqfile.h> +#include <tqpushbutton.h> +#include <tqtooltip.h> +#include <tqwhatsthis.h> +#include <tqhbox.h> #include <kdebug.h> #include <klocale.h> @@ -55,8 +55,8 @@ -K3bDvdCopyDialog::K3bDvdCopyDialog( QWidget* parent, const char* name, bool modal ) - : K3bInteractionDialog( parent, name, +K3bDvdCopyDialog::K3bDvdCopyDialog( TQWidget* tqparent, const char* name, bool modal ) + : K3bInteractionDialog( tqparent, name, i18n("DVD Copy"), i18n("No video transcoding!"), START_BUTTON|CANCEL_BUTTON, @@ -64,12 +64,12 @@ K3bDvdCopyDialog::K3bDvdCopyDialog( QWidget* parent, const char* name, bool moda "default dvd copy settings", modal ) { - QWidget* w = mainWidget(); + TQWidget* w = mainWidget(); // // Source group // ////////////////////////////////////////////////////////////////////////// - QGroupBox* groupSource = new QGroupBox( 1, Qt::Vertical, i18n("Source Medium"), w ); + TQGroupBox* groupSource = new TQGroupBox( 1, Qt::Vertical, i18n("Source Medium"), w ); groupSource->setInsideSpacing( spacingHint() ); groupSource->setInsideMargin( marginHint() ); m_comboSourceDevice = new K3bMediaSelectionComboBox( groupSource ); @@ -89,19 +89,19 @@ K3bDvdCopyDialog::K3bDvdCopyDialog( QWidget* parent, const char* name, bool moda // // Option tab // ////////////////////////////////////////////////////////////////////////// - QTabWidget* tabWidget = new QTabWidget( w ); + TQTabWidget* tabWidget = new TQTabWidget( w ); // option tab -------------------- - QWidget* optionTab = new QWidget( tabWidget ); - QGridLayout* optionTabGrid = new QGridLayout( optionTab ); + TQWidget* optionTab = new TQWidget( tabWidget ); + TQGridLayout* optionTabGrid = new TQGridLayout( optionTab ); optionTabGrid->setSpacing( spacingHint() ); optionTabGrid->setMargin( marginHint() ); - QGroupBox* groupWritingMode = new QGroupBox( 1, Qt::Vertical, i18n("Writing Mode"), optionTab ); + TQGroupBox* groupWritingMode = new TQGroupBox( 1, Qt::Vertical, i18n("Writing Mode"), optionTab ); groupWritingMode->setInsideMargin( marginHint() ); m_writingModeWidget = new K3bWritingModeWidget( groupWritingMode ); - QGroupBox* groupOptions = new QGroupBox( 5, Qt::Vertical, i18n("Settings"), optionTab ); + TQGroupBox* groupOptions = new TQGroupBox( 5, Qt::Vertical, i18n("Settings"), optionTab ); groupOptions->setInsideSpacing( spacingHint() ); groupOptions->setInsideMargin( marginHint() ); m_checkSimulate = K3bStdGuiItems::simulateCheckbox( groupOptions ); @@ -110,13 +110,13 @@ K3bDvdCopyDialog::K3bDvdCopyDialog( QWidget* parent, const char* name, bool moda m_checkDeleteImages = K3bStdGuiItems::removeImagesCheckbox( groupOptions ); m_checkVerifyData = K3bStdGuiItems::verifyCheckBox( groupOptions ); - QGroupBox* groupCopies = new QGroupBox( 2, Qt::Horizontal, i18n("Copies"), optionTab ); + TQGroupBox* groupCopies = new TQGroupBox( 2, Qt::Horizontal, i18n("Copies"), optionTab ); groupCopies->setInsideSpacing( spacingHint() ); groupCopies->setInsideMargin( marginHint() ); - QLabel* pixLabel = new QLabel( groupCopies ); + TQLabel* pixLabel = new TQLabel( groupCopies ); pixLabel->setPixmap( SmallIcon( "cdcopy", KIcon::SizeMedium ) ); pixLabel->setScaledContents( false ); - m_spinCopies = new QSpinBox( groupCopies ); + m_spinCopies = new TQSpinBox( groupCopies ); m_spinCopies->setMinValue( 1 ); m_spinCopies->setMaxValue( 999 ); @@ -132,8 +132,8 @@ K3bDvdCopyDialog::K3bDvdCopyDialog( QWidget* parent, const char* name, bool moda // // Image tab // ////////////////////////////////////////////////////////////////////////// - QWidget* imageTab = new QWidget( tabWidget ); - QGridLayout* imageTabGrid = new QGridLayout( imageTab ); + TQWidget* imageTab = new TQWidget( tabWidget ); + TQGridLayout* imageTabGrid = new TQGridLayout( imageTab ); imageTabGrid->setSpacing( spacingHint() ); imageTabGrid->setMargin( marginHint() ); @@ -148,19 +148,19 @@ K3bDvdCopyDialog::K3bDvdCopyDialog( QWidget* parent, const char* name, bool moda // // advanced tab ------------------ // ////////////////////////////////////////////////////////////////////////// - QWidget* advancedTab = new QWidget( tabWidget ); - QGridLayout* advancedTabGrid = new QGridLayout( advancedTab ); + TQWidget* advancedTab = new TQWidget( tabWidget ); + TQGridLayout* advancedTabGrid = new TQGridLayout( advancedTab ); advancedTabGrid->setSpacing( spacingHint() ); advancedTabGrid->setMargin( marginHint() ); - QGroupBox* groupGeneral = new QGroupBox( 2, Qt::Vertical, i18n("General"), advancedTab ); + TQGroupBox* groupGeneral = new TQGroupBox( 2, Qt::Vertical, i18n("General"), advancedTab ); groupGeneral->setInsideSpacing( spacingHint() ); groupGeneral->setInsideMargin( marginHint() ); - QHBox* box = new QHBox( groupGeneral ); + TQHBox* box = new TQHBox( groupGeneral ); box->setSpacing( spacingHint() ); - box->setStretchFactor( new QLabel( i18n("Read retries:"), box ), 1 ); - m_spinRetries = new QSpinBox( 1, 128, 1, box ); - m_checkIgnoreReadErrors = new QCheckBox( i18n("Ignore read errors"), groupGeneral ); + box->setStretchFactor( new TQLabel( i18n("Read retries:"), box ), 1 ); + m_spinRetries = new TQSpinBox( 1, 128, 1, box ); + m_checkIgnoreReadErrors = new TQCheckBox( i18n("Ignore read errors"), groupGeneral ); advancedTabGrid->addWidget( groupGeneral, 0, 0 ); @@ -169,9 +169,9 @@ K3bDvdCopyDialog::K3bDvdCopyDialog( QWidget* parent, const char* name, bool moda // - // setup layout + // setup tqlayout // ////////////////////////////////////////////////////////////////////////// - QGridLayout* grid = new QGridLayout( w ); + TQGridLayout* grid = new TQGridLayout( w ); grid->setMargin( 0 ); grid->setSpacing( spacingHint() ); @@ -190,17 +190,17 @@ K3bDvdCopyDialog::K3bDvdCopyDialog( QWidget* parent, const char* name, bool moda // // setup connections // ////////////////////////////////////////////////////////////////////////// - connect( m_writerSelectionWidget, SIGNAL(writerChanged()), this, SLOT(slotToggleAll()) ); - connect( m_comboSourceDevice, SIGNAL(selectionChanged(K3bDevice::Device*)), this, SLOT(slotToggleAll()) ); - connect( m_comboSourceDevice, SIGNAL(selectionChanged(K3bDevice::Device*)), - this, SLOT(slotSourceMediumChanged(K3bDevice::Device*)) ); - connect( m_checkSimulate, SIGNAL(toggled(bool)), this, SLOT(slotToggleAll()) ); - connect( m_checkCacheImage, SIGNAL(toggled(bool)), this, SLOT(slotToggleAll()) ); - connect( m_checkOnlyCreateImage, SIGNAL(toggled(bool)), this, SLOT(slotToggleAll()) ); - connect( m_writingModeWidget, SIGNAL(writingModeChanged(int)), this, SLOT(slotToggleAll()) ); - - QToolTip::add( m_checkIgnoreReadErrors, i18n("Skip unreadable sectors") ); - QWhatsThis::add( m_checkIgnoreReadErrors, i18n("<p>If this option is checked and K3b is not able to read a sector from the " + connect( m_writerSelectionWidget, TQT_SIGNAL(writerChanged()), this, TQT_SLOT(slotToggleAll()) ); + connect( m_comboSourceDevice, TQT_SIGNAL(selectionChanged(K3bDevice::Device*)), this, TQT_SLOT(slotToggleAll()) ); + connect( m_comboSourceDevice, TQT_SIGNAL(selectionChanged(K3bDevice::Device*)), + this, TQT_SLOT(slotSourceMediumChanged(K3bDevice::Device*)) ); + connect( m_checkSimulate, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotToggleAll()) ); + connect( m_checkCacheImage, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotToggleAll()) ); + connect( m_checkOnlyCreateImage, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotToggleAll()) ); + connect( m_writingModeWidget, TQT_SIGNAL(writingModeChanged(int)), this, TQT_SLOT(slotToggleAll()) ); + + TQToolTip::add( m_checkIgnoreReadErrors, i18n("Skip unreadable sectors") ); + TQWhatsThis::add( m_checkIgnoreReadErrors, i18n("<p>If this option is checked and K3b is not able to read a sector from the " "source CD/DVD it will be replaced with zeros on the resulting copy.") ); } @@ -253,7 +253,7 @@ void K3bDvdCopyDialog::slotStartClicked() dlg = new K3bBurnProgressDialog( kapp->mainWidget() ); } - K3bDvdCopyJob* job = new K3bDvdCopyJob( dlg, this ); + K3bDvdCopyJob* job = new K3bDvdCopyJob( dlg, TQT_TQOBJECT(this) ); job->setWriterDevice( m_writerSelectionWidget->writerDevice() ); job->setReaderDevice( m_comboSourceDevice->selectedDevice() ); @@ -315,7 +315,7 @@ void K3bDvdCopyDialog::saveUserDefaults( KConfigBase* c ) m_writingModeWidget->saveConfig( c ); m_tempDirSelectionWidget->saveConfig( c ); - c->writeEntry( "source_device", m_comboSourceDevice->selectedDevice() ? m_comboSourceDevice->selectedDevice()->devicename() : QString() ); + c->writeEntry( "source_device", m_comboSourceDevice->selectedDevice() ? m_comboSourceDevice->selectedDevice()->devicename() : TQString() ); c->writeEntry( "simulate", m_checkSimulate->isChecked() ); c->writeEntry( "on_the_fly", !m_checkCacheImage->isChecked() ); diff --git a/src/misc/k3bdvdcopydialog.h b/src/misc/k3bdvdcopydialog.h index be696c4..00436cc 100644 --- a/src/misc/k3bdvdcopydialog.h +++ b/src/misc/k3bdvdcopydialog.h @@ -30,17 +30,18 @@ namespace K3bDevice { class K3bTempDirSelectionWidget; class K3bWriterSelectionWidget; class K3bMediaSelectionComboBox; -class QCheckBox; -class QSpinBox; +class TQCheckBox; +class TQSpinBox; class K3bWritingModeWidget; class K3bDvdCopyDialog : public K3bInteractionDialog { Q_OBJECT + TQ_OBJECT public: - K3bDvdCopyDialog( QWidget* parent = 0, const char* name = 0, bool modal = true ); + K3bDvdCopyDialog( TQWidget* tqparent = 0, const char* name = 0, bool modal = true ); ~K3bDvdCopyDialog(); void setReadingDevice( K3bDevice::Device* ); @@ -65,14 +66,14 @@ class K3bDvdCopyDialog : public K3bInteractionDialog K3bWriterSelectionWidget* m_writerSelectionWidget; K3bTempDirSelectionWidget* m_tempDirSelectionWidget; K3bMediaSelectionComboBox* m_comboSourceDevice; - QCheckBox* m_checkSimulate; - QCheckBox* m_checkDeleteImages; - QCheckBox* m_checkOnlyCreateImage; - QCheckBox* m_checkCacheImage; - QCheckBox* m_checkVerifyData; - QSpinBox* m_spinCopies; - QSpinBox* m_spinRetries; - QCheckBox* m_checkIgnoreReadErrors; + TQCheckBox* m_checkSimulate; + TQCheckBox* m_checkDeleteImages; + TQCheckBox* m_checkOnlyCreateImage; + TQCheckBox* m_checkCacheImage; + TQCheckBox* m_checkVerifyData; + TQSpinBox* m_spinCopies; + TQSpinBox* m_spinRetries; + TQCheckBox* m_checkIgnoreReadErrors; K3bWritingModeWidget* m_writingModeWidget; }; diff --git a/src/misc/k3bdvdformattingdialog.cpp b/src/misc/k3bdvdformattingdialog.cpp index d84c4fc..5289089 100644 --- a/src/misc/k3bdvdformattingdialog.cpp +++ b/src/misc/k3bdvdformattingdialog.cpp @@ -29,25 +29,25 @@ #include <kconfig.h> #include <kapplication.h> -#include <qgroupbox.h> -#include <qlayout.h> -#include <qcheckbox.h> -#include <qframe.h> -#include <qpushbutton.h> -#include <qtooltip.h> -#include <qwhatsthis.h> +#include <tqgroupbox.h> +#include <tqlayout.h> +#include <tqcheckbox.h> +#include <tqframe.h> +#include <tqpushbutton.h> +#include <tqtooltip.h> +#include <tqwhatsthis.h> -K3bDvdFormattingDialog::K3bDvdFormattingDialog( QWidget* parent, const char* name, bool modal ) - : K3bInteractionDialog( parent, name, +K3bDvdFormattingDialog::K3bDvdFormattingDialog( TQWidget* tqparent, const char* name, bool modal ) + : K3bInteractionDialog( tqparent, name, i18n("DVD Formatting"), - i18n("DVD%1RW").arg("±"), + i18n("DVD%1RW").tqarg("�"), START_BUTTON|CANCEL_BUTTON, START_BUTTON, "DVD Formatting", // config group modal ) { - QWidget* frame = mainWidget(); + TQWidget* frame = mainWidget(); m_writerSelectionWidget = new K3bWriterSelectionWidget( frame ); m_writerSelectionWidget->setWantedMediumType( K3bDevice::MEDIA_REWRITABLE_DVD ); @@ -58,20 +58,20 @@ K3bDvdFormattingDialog::K3bDvdFormattingDialog( QWidget* parent, const char* nam m_writerSelectionWidget->setSupportedWritingApps( K3b::DVD_RW_FORMAT ); m_writerSelectionWidget->setForceAutoSpeed(true); - QGroupBox* groupWritingMode = new QGroupBox( 1, Qt::Vertical, i18n("Writing Mode"), frame ); - groupWritingMode->layout()->setMargin( marginHint() ); - groupWritingMode->layout()->setSpacing( spacingHint() ); + TQGroupBox* groupWritingMode = new TQGroupBox( 1, Qt::Vertical, i18n("Writing Mode"), frame ); + groupWritingMode->tqlayout()->setMargin( marginHint() ); + groupWritingMode->tqlayout()->setSpacing( spacingHint() ); m_writingModeWidget = new K3bWritingModeWidget( K3b::WRITING_MODE_INCR_SEQ|K3b::WRITING_MODE_RES_OVWR, groupWritingMode ); - QGroupBox* groupOptions = new QGroupBox( 2, Qt::Vertical, i18n("Settings"), frame ); - groupOptions->layout()->setMargin( marginHint() ); - groupOptions->layout()->setSpacing( spacingHint() ); - m_checkForce = new QCheckBox( i18n("Force"), groupOptions ); - m_checkQuickFormat = new QCheckBox( i18n("Quick format"), groupOptions ); + TQGroupBox* groupOptions = new TQGroupBox( 2, Qt::Vertical, i18n("Settings"), frame ); + groupOptions->tqlayout()->setMargin( marginHint() ); + groupOptions->tqlayout()->setSpacing( spacingHint() ); + m_checkForce = new TQCheckBox( i18n("Force"), groupOptions ); + m_checkQuickFormat = new TQCheckBox( i18n("Quick format"), groupOptions ); - QGridLayout* grid = new QGridLayout( frame ); + TQGridLayout* grid = new TQGridLayout( frame ); grid->setMargin( 0 ); grid->setSpacing( spacingHint() ); @@ -81,8 +81,8 @@ K3bDvdFormattingDialog::K3bDvdFormattingDialog( QWidget* parent, const char* nam grid->setRowStretch( 1, 1 ); - QToolTip::add( m_checkForce, i18n("Force formatting of empty DVDs") ); - QWhatsThis::add( m_checkForce, i18n("<p>If this option is checked K3b will format a " + TQToolTip::add( m_checkForce, i18n("Force formatting of empty DVDs") ); + TQWhatsThis::add( m_checkForce, i18n("<p>If this option is checked K3b will format a " "DVD-RW even if it is empty. It may also be used to " "force K3b to format a DVD+RW or a DVD-RW in restricted " "overwrite mode." @@ -92,16 +92,16 @@ K3bDvdFormattingDialog::K3bDvdFormattingDialog( QWidget* parent, const char* nam "just needs to be overwritten. The same applies to DVD-RW in " "restricted overwrite mode.") ); - QToolTip::add( m_checkQuickFormat, i18n("Try to perform quick formatting") ); - QWhatsThis::add( m_checkQuickFormat, i18n("<p>If this option is checked K3b will tell the writer " + TQToolTip::add( m_checkQuickFormat, i18n("Try to perform quick formatting") ); + TQWhatsThis::add( m_checkQuickFormat, i18n("<p>If this option is checked K3b will tell the writer " "to perform a quick format." "<p>Formatting a DVD-RW completely can take a very long " "time and some DVD writers perform a full format even if " "quick format is enabled." ) ); - connect( m_writerSelectionWidget, SIGNAL(writerChanged()), this, SLOT(slotWriterChanged()) ); - connect( m_writerSelectionWidget, SIGNAL(writerChanged(K3bDevice::Device*)), - m_writingModeWidget, SLOT(determineSupportedModesFromMedium(K3bDevice::Device*)) ); + connect( m_writerSelectionWidget, TQT_SIGNAL(writerChanged()), this, TQT_SLOT(slotWriterChanged()) ); + connect( m_writerSelectionWidget, TQT_SIGNAL(writerChanged(K3bDevice::Device*)), + m_writingModeWidget, TQT_SLOT(determineSupportedModesFromMedium(K3bDevice::Device*)) ); slotWriterChanged(); } @@ -128,7 +128,7 @@ void K3bDvdFormattingDialog::slotStartClicked() K3bJobProgressDialog d( kapp->mainWidget(), "formattingProgress", false ); - K3bDvdFormattingJob* job = new K3bDvdFormattingJob( &d, this ); + K3bDvdFormattingJob* job = new K3bDvdFormattingJob( &d, TQT_TQOBJECT(this) ); job->setDevice( m_writerSelectionWidget->writerDevice() ); job->setMode( m_writingModeWidget->writingMode() ); job->setForce( m_checkForce->isChecked() ); diff --git a/src/misc/k3bdvdformattingdialog.h b/src/misc/k3bdvdformattingdialog.h index 1314ae1..e5d306c 100644 --- a/src/misc/k3bdvdformattingdialog.h +++ b/src/misc/k3bdvdformattingdialog.h @@ -19,7 +19,7 @@ #include <k3binteractiondialog.h> -class QCheckBox; +class TQCheckBox; class K3bWritingModeWidget; class K3bWriterSelectionWidget; namespace K3bDevice { @@ -29,9 +29,10 @@ namespace K3bDevice { class K3bDvdFormattingDialog : public K3bInteractionDialog { Q_OBJECT + TQ_OBJECT public: - K3bDvdFormattingDialog( QWidget* = 0, const char* = 0, bool modal = true ); + K3bDvdFormattingDialog( TQWidget* = 0, const char* = 0, bool modal = true ); ~K3bDvdFormattingDialog(); public slots: @@ -48,8 +49,8 @@ class K3bDvdFormattingDialog : public K3bInteractionDialog K3bWriterSelectionWidget* m_writerSelectionWidget; K3bWritingModeWidget* m_writingModeWidget; - QCheckBox* m_checkForce; - QCheckBox* m_checkQuickFormat; + TQCheckBox* m_checkForce; + TQCheckBox* m_checkQuickFormat; }; #endif diff --git a/src/misc/k3bisoimagewritingdialog.cpp b/src/misc/k3bisoimagewritingdialog.cpp index 1832ee5..2c9a2c8 100644 --- a/src/misc/k3bisoimagewritingdialog.cpp +++ b/src/misc/k3bisoimagewritingdialog.cpp @@ -47,22 +47,22 @@ #include <kurldrag.h> #include <klineedit.h> -#include <qheader.h> -#include <qgroupbox.h> -#include <qcheckbox.h> -#include <qlabel.h> -#include <qcombobox.h> -#include <qlayout.h> -#include <qfile.h> -#include <qfileinfo.h> -#include <qpushbutton.h> -#include <qtabwidget.h> -#include <qtooltip.h> -#include <qwhatsthis.h> -#include <qspinbox.h> -#include <qevent.h> -#include <qpopupmenu.h> -#include <qclipboard.h> +#include <tqheader.h> +#include <tqgroupbox.h> +#include <tqcheckbox.h> +#include <tqlabel.h> +#include <tqcombobox.h> +#include <tqlayout.h> +#include <tqfile.h> +#include <tqfileinfo.h> +#include <tqpushbutton.h> +#include <tqtabwidget.h> +#include <tqtooltip.h> +#include <tqwhatsthis.h> +#include <tqspinbox.h> +#include <tqevent.h> +#include <tqpopupmenu.h> +#include <tqclipboard.h> class K3bIsoImageWritingDialog::Private @@ -76,15 +76,15 @@ public: K3bListViewItem* md5SumItem; bool haveMd5Sum; - QString lastCheckedFile; + TQString lastCheckedFile; bool isIsoImage; bool imageForced; }; -K3bIsoImageWritingDialog::K3bIsoImageWritingDialog( QWidget* parent, const char* name, bool modal ) - : K3bInteractionDialog( parent, name, +K3bIsoImageWritingDialog::K3bIsoImageWritingDialog( TQWidget* tqparent, const char* name, bool modal ) + : K3bInteractionDialog( tqparent, name, i18n("Burn Iso9660 Image"), i18n("to DVD"), START_BUTTON|CANCEL_BUTTON, @@ -102,24 +102,24 @@ K3bIsoImageWritingDialog::K3bIsoImageWritingDialog( QWidget* parent, const char* m_writerSelectionWidget->setSupportedWritingApps( K3b::GROWISOFS ); m_writingModeWidget->setSupportedModes( K3b::DAO|K3b::WRITING_MODE_INCR_SEQ|K3b::WRITING_MODE_RES_OVWR ); - m_md5Job = new K3bMd5Job( 0, this ); - connect( m_md5Job, SIGNAL(finished(bool)), - this, SLOT(slotMd5JobFinished(bool)) ); - connect( m_md5Job, SIGNAL(percent(int)), - this, SLOT(slotMd5JobPercent(int)) ); + m_md5Job = new K3bMd5Job( 0, TQT_TQOBJECT(this) ); + connect( m_md5Job, TQT_SIGNAL(finished(bool)), + this, TQT_SLOT(slotMd5JobFinished(bool)) ); + connect( m_md5Job, TQT_SIGNAL(percent(int)), + this, TQT_SLOT(slotMd5JobPercent(int)) ); updateImageSize( imagePath() ); - connect( m_writerSelectionWidget, SIGNAL(writerChanged()), - this, SLOT(slotWriterChanged()) ); - connect( m_writerSelectionWidget, SIGNAL(writingAppChanged(int)), - this, SLOT(slotWriterChanged()) ); - connect( m_writingModeWidget, SIGNAL(writingModeChanged(int)), - this, SLOT(slotWriterChanged()) ); - connect( m_editImagePath, SIGNAL(textChanged(const QString&)), - this, SLOT(updateImageSize(const QString&)) ); - connect( m_checkDummy, SIGNAL(toggled(bool)), - this, SLOT(slotWriterChanged()) ); + connect( m_writerSelectionWidget, TQT_SIGNAL(writerChanged()), + this, TQT_SLOT(slotWriterChanged()) ); + connect( m_writerSelectionWidget, TQT_SIGNAL(writingAppChanged(int)), + this, TQT_SLOT(slotWriterChanged()) ); + connect( m_writingModeWidget, TQT_SIGNAL(writingModeChanged(int)), + this, TQT_SLOT(slotWriterChanged()) ); + connect( m_editImagePath, TQT_SIGNAL(textChanged(const TQString&)), + this, TQT_SLOT(updateImageSize(const TQString&)) ); + connect( m_checkDummy, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(slotWriterChanged()) ); } @@ -136,8 +136,8 @@ void K3bIsoImageWritingDialog::init() // last written image because that's what most users want KConfig* c = k3bcore->config(); c->setGroup( configGroup() ); - QString image = c->readPathEntry( "last written image" ); - if( QFile::exists( image ) ) + TQString image = c->readPathEntry( "last written image" ); + if( TQFile::exists( image ) ) m_editImagePath->setURL( image ); } } @@ -145,18 +145,18 @@ void K3bIsoImageWritingDialog::init() void K3bIsoImageWritingDialog::setupGui() { - QWidget* frame = mainWidget(); + TQWidget* frame = mainWidget(); // image // ----------------------------------------------------------------------- - QGroupBox* groupImageUrl = new QGroupBox( 1, Qt::Horizontal, i18n("Image to Burn"), frame ); + TQGroupBox* groupImageUrl = new TQGroupBox( 1, Qt::Horizontal, i18n("Image to Burn"), frame ); m_editImagePath = new KURLRequester( groupImageUrl ); m_editImagePath->setMode( KFile::File|KFile::ExistingOnly ); m_editImagePath->setCaption( i18n("Choose Image File") ); m_editImagePath->setFilter( i18n("*.iso *.ISO|ISO9660 Image Files") + "\n" + i18n("*|All Files") ); - connect( m_editImagePath->lineEdit(), SIGNAL( textChanged ( const QString & ) ), this, SLOT( slotWriterChanged() ) ); + connect( m_editImagePath->lineEdit(), TQT_SIGNAL( textChanged ( const TQString & ) ), this, TQT_SLOT( slotWriterChanged() ) ); // image info // ----------------------------------------------------------------------- @@ -166,43 +166,43 @@ void K3bIsoImageWritingDialog::setupGui() m_infoView->header()->hide(); m_infoView->setNoItemText( i18n("No image file selected") ); m_infoView->setSorting( -1 ); - m_infoView->setAlternateBackground( QColor() ); + m_infoView->setAlternateBackground( TQColor() ); m_infoView->setFullWidth(true); - m_infoView->setSelectionMode( QListView::NoSelection ); + m_infoView->setSelectionMode( TQListView::NoSelection ); - connect( m_infoView, SIGNAL(contextMenu(KListView*, QListViewItem*, const QPoint&)), - this, SLOT(slotContextMenu(KListView*, QListViewItem*, const QPoint&)) ); + connect( m_infoView, TQT_SIGNAL(contextMenu(KListView*, TQListViewItem*, const TQPoint&)), + this, TQT_SLOT(slotContextMenu(KListView*, TQListViewItem*, const TQPoint&)) ); m_writerSelectionWidget = new K3bWriterSelectionWidget( frame ); // options // ----------------------------------------------------------------------- - QTabWidget* optionTabbed = new QTabWidget( frame ); + TQTabWidget* optionTabbed = new TQTabWidget( frame ); - QWidget* optionTab = new QWidget( optionTabbed ); - QGridLayout* optionTabLayout = new QGridLayout( optionTab ); - optionTabLayout->setAlignment( Qt::AlignTop ); + TQWidget* optionTab = new TQWidget( optionTabbed ); + TQGridLayout* optionTabLayout = new TQGridLayout( optionTab ); + optionTabLayout->tqsetAlignment( TQt::AlignTop ); optionTabLayout->setSpacing( spacingHint() ); optionTabLayout->setMargin( marginHint() ); - QGroupBox* writingModeGroup = new QGroupBox( 1, Vertical, i18n("Writing Mode"), optionTab ); + TQGroupBox* writingModeGroup = new TQGroupBox( 1,Qt::Vertical, i18n("Writing Mode"), optionTab ); writingModeGroup->setInsideMargin( marginHint() ); m_writingModeWidget = new K3bWritingModeWidget( writingModeGroup ); // copies -------- - QGroupBox* groupCopies = new QGroupBox( 2, Qt::Horizontal, i18n("Copies"), optionTab ); + TQGroupBox* groupCopies = new TQGroupBox( 2, Qt::Horizontal, i18n("Copies"), optionTab ); groupCopies->setInsideSpacing( spacingHint() ); groupCopies->setInsideMargin( marginHint() ); - QLabel* pixLabel = new QLabel( groupCopies ); + TQLabel* pixLabel = new TQLabel( groupCopies ); pixLabel->setPixmap( SmallIcon( "cdcopy", KIcon::SizeMedium ) ); pixLabel->setScaledContents( false ); - m_spinCopies = new QSpinBox( groupCopies ); + m_spinCopies = new TQSpinBox( groupCopies ); m_spinCopies->setMinValue( 1 ); m_spinCopies->setMaxValue( 999 ); // -------- copies - QGroupBox* optionGroup = new QGroupBox( 3, Vertical, i18n("Settings"), optionTab ); + TQGroupBox* optionGroup = new TQGroupBox( 3,Qt::Vertical, i18n("Settings"), optionTab ); optionGroup->setInsideMargin( marginHint() ); optionGroup->setInsideSpacing( spacingHint() ); m_checkDummy = K3bStdGuiItems::simulateCheckbox( optionGroup ); @@ -218,7 +218,7 @@ void K3bIsoImageWritingDialog::setupGui() optionTabbed->addTab( optionTab, i18n("Settings") ); - QGridLayout* grid = new QGridLayout( frame ); + TQGridLayout* grid = new TQGridLayout( frame ); grid->setSpacing( spacingHint() ); grid->setMargin( 0 ); @@ -296,7 +296,7 @@ void K3bIsoImageWritingDialog::slotStartClicked() } -void K3bIsoImageWritingDialog::updateImageSize( const QString& path ) +void K3bIsoImageWritingDialog::updateImageSize( const TQString& path ) { m_md5Job->cancel(); m_infoView->clear(); @@ -304,7 +304,7 @@ void K3bIsoImageWritingDialog::updateImageSize( const QString& path ) d->haveMd5Sum = false; d->isIsoImage = false; - QFileInfo info( path ); + TQFileInfo info( path ); if( info.isFile() ) { KIO::filesize_t imageSize = K3b::filesize( KURL::fromPathOrURL(path) ); @@ -319,59 +319,59 @@ void K3bIsoImageWritingDialog::updateImageSize( const QString& path ) K3bListViewItem* isoRootItem = new K3bListViewItem( m_infoView, m_infoView->lastItem(), i18n("Iso9660 image") ); - isoRootItem->setForegroundColor( 0, palette().disabled().foreground() ); + isoRootItem->setForegroundColor( 0, tqpalette().disabled().foreground() ); isoRootItem->setPixmap( 0, SmallIcon( "cdimage") ); K3bListViewItem* item = new K3bListViewItem( isoRootItem, m_infoView->lastItem(), i18n("Filesize:"), KIO::convertSize( imageSize ) ); - item->setForegroundColor( 0, palette().disabled().foreground() ); + item->setForegroundColor( 0, tqpalette().disabled().foreground() ); item = new K3bListViewItem( isoRootItem, m_infoView->lastItem(), i18n("System Id:"), isoF.primaryDescriptor().systemId.isEmpty() - ? QString("-") + ? TQString("-") : isoF.primaryDescriptor().systemId ); - item->setForegroundColor( 0, palette().disabled().foreground() ); + item->setForegroundColor( 0, tqpalette().disabled().foreground() ); item = new K3bListViewItem( isoRootItem, m_infoView->lastItem(), i18n("Volume Id:"), isoF.primaryDescriptor().volumeId.isEmpty() - ? QString("-") + ? TQString("-") : isoF.primaryDescriptor().volumeId ); - item->setForegroundColor( 0, palette().disabled().foreground() ); + item->setForegroundColor( 0, tqpalette().disabled().foreground() ); item = new K3bListViewItem( isoRootItem, m_infoView->lastItem(), i18n("Volume Set Id:"), isoF.primaryDescriptor().volumeSetId.isEmpty() - ? QString("-") + ? TQString("-") : isoF.primaryDescriptor().volumeSetId ); - item->setForegroundColor( 0, palette().disabled().foreground() ); + item->setForegroundColor( 0, tqpalette().disabled().foreground() ); item = new K3bListViewItem( isoRootItem, m_infoView->lastItem(), i18n("Publisher Id:"), isoF.primaryDescriptor().publisherId.isEmpty() - ? QString("-") + ? TQString("-") : isoF.primaryDescriptor().publisherId ); - item->setForegroundColor( 0, palette().disabled().foreground() ); + item->setForegroundColor( 0, tqpalette().disabled().foreground() ); item = new K3bListViewItem( isoRootItem, m_infoView->lastItem(), i18n("Preparer Id:"), isoF.primaryDescriptor().preparerId.isEmpty() - ? QString("-") : isoF.primaryDescriptor().preparerId ); - item->setForegroundColor( 0, palette().disabled().foreground() ); + ? TQString("-") : isoF.primaryDescriptor().preparerId ); + item->setForegroundColor( 0, tqpalette().disabled().foreground() ); item = new K3bListViewItem( isoRootItem, m_infoView->lastItem(), i18n("Application Id:"), isoF.primaryDescriptor().applicationId.isEmpty() - ? QString("-") + ? TQString("-") : isoF.primaryDescriptor().applicationId ); - item->setForegroundColor( 0, palette().disabled().foreground() ); + item->setForegroundColor( 0, tqpalette().disabled().foreground() ); isoRootItem->setOpen( true ); @@ -380,7 +380,7 @@ void K3bIsoImageWritingDialog::updateImageSize( const QString& path ) else { K3bListViewItem* item = new K3bListViewItem( m_infoView, m_infoView->lastItem(), i18n("Not an Iso9660 image") ); - item->setForegroundColor( 0, Qt::red ); + item->setForegroundColor( 0, TQt::red ); item->setPixmap( 0, SmallIcon( "stop") ); } @@ -433,7 +433,7 @@ void K3bIsoImageWritingDialog::setImage( const KURL& url ) } -void K3bIsoImageWritingDialog::calculateMd5Sum( const QString& file ) +void K3bIsoImageWritingDialog::calculateMd5Sum( const TQString& file ) { d->haveMd5Sum = false; @@ -441,7 +441,7 @@ void K3bIsoImageWritingDialog::calculateMd5Sum( const QString& file ) d->md5SumItem = new K3bListViewItem( m_infoView, m_infoView->firstChild() ); d->md5SumItem->setText( 0, i18n("Md5 Sum:") ); - d->md5SumItem->setForegroundColor( 0, palette().disabled().foreground() ); + d->md5SumItem->setForegroundColor( 0, tqpalette().disabled().foreground() ); d->md5SumItem->setProgress( 1, 0 ); d->md5SumItem->setPixmap( 0, SmallIcon( "exec") ); @@ -468,7 +468,7 @@ void K3bIsoImageWritingDialog::slotMd5JobFinished( bool success ) d->haveMd5Sum = true; } else { - d->md5SumItem->setForegroundColor( 1, Qt::red ); + d->md5SumItem->setForegroundColor( 1, TQt::red ); if( m_md5Job->hasBeenCanceled() ) d->md5SumItem->setText( 1, i18n("Calculation cancelled") ); else @@ -481,12 +481,12 @@ void K3bIsoImageWritingDialog::slotMd5JobFinished( bool success ) } -void K3bIsoImageWritingDialog::slotContextMenu( KListView*, QListViewItem*, const QPoint& pos ) +void K3bIsoImageWritingDialog::slotContextMenu( KListView*, TQListViewItem*, const TQPoint& pos ) { if( !d->haveMd5Sum ) return; - QPopupMenu popup; + TQPopupMenu popup; int copyItem = popup.insertItem( i18n("Copy checksum to clipboard") ); int compareItem = popup.insertItem( i18n("Compare checksum...") ); @@ -494,22 +494,22 @@ void K3bIsoImageWritingDialog::slotContextMenu( KListView*, QListViewItem*, cons if( r == compareItem ) { bool ok; - QString md5sumToCompare = KInputDialog::getText( i18n("MD5 Sum Check"), + TQString md5sumToCompare = KInputDialog::getText( i18n("MD5 Sum Check"), i18n("Please insert the MD5 Sum to compare:"), - QString::null, + TQString(), &ok, this ); if( ok ) { if( md5sumToCompare.lower().utf8() == m_md5Job->hexDigest().lower() ) - KMessageBox::information( this, i18n("The MD5 Sum of %1 equals the specified.").arg(imagePath()), + KMessageBox::information( this, i18n("The MD5 Sum of %1 equals the specified.").tqarg(imagePath()), i18n("MD5 Sums Equal") ); else - KMessageBox::sorry( this, i18n("The MD5 Sum of %1 differs from the specified.").arg(imagePath()), + KMessageBox::sorry( this, i18n("The MD5 Sum of %1 differs from the specified.").tqarg(imagePath()), i18n("MD5 Sums Differ") ); } } else if( r == copyItem ) { - QApplication::clipboard()->setText( m_md5Job->hexDigest().lower(), QClipboard::Clipboard ); + TQApplication::tqclipboard()->setText( m_md5Job->hexDigest().lower(), TQClipboard::Clipboard ); } } @@ -524,8 +524,8 @@ void K3bIsoImageWritingDialog::loadUserDefaults( KConfigBase* c ) m_writerSelectionWidget->loadConfig( c ); if( !d->imageForced ) { - QString image = c->readPathEntry( "image path", c->readPathEntry( "last written image" ) ); - if( QFile::exists( image ) ) + TQString image = c->readPathEntry( "image path", c->readPathEntry( "last written image" ) ); + if( TQFile::exists( image ) ) m_editImagePath->setURL( image ); } } @@ -554,19 +554,19 @@ void K3bIsoImageWritingDialog::loadK3bDefaults() } -QString K3bIsoImageWritingDialog::imagePath() const +TQString K3bIsoImageWritingDialog::imagePath() const { return K3b::convertToLocalUrl( KURL::fromPathOrURL( m_editImagePath->url() ) ).path(); } -void K3bIsoImageWritingDialog::dragEnterEvent( QDragEnterEvent* e ) +void K3bIsoImageWritingDialog::dragEnterEvent( TQDragEnterEvent* e ) { e->accept( KURLDrag::canDecode(e) ); } -void K3bIsoImageWritingDialog::dropEvent( QDropEvent* e ) +void K3bIsoImageWritingDialog::dropEvent( TQDropEvent* e ) { KURL::List urls; KURLDrag::decode( e, urls ); diff --git a/src/misc/k3bisoimagewritingdialog.h b/src/misc/k3bisoimagewritingdialog.h index caf0f4f..bf629ad 100644 --- a/src/misc/k3bisoimagewritingdialog.h +++ b/src/misc/k3bisoimagewritingdialog.h @@ -20,20 +20,20 @@ #include <k3binteractiondialog.h> -class QCheckBox; +class TQCheckBox; class K3bWriterSelectionWidget; -class QLabel; +class TQLabel; class KURL; class K3bMd5Job; class K3bWritingModeWidget; class KURLRequester; class K3bListView; -class QSpinBox; -class QDragEnterEvent; -class QDropEvent; +class TQSpinBox; +class TQDragEnterEvent; +class TQDropEvent; class KListView; -class QListViewItem; -class QPoint; +class TQListViewItem; +class TQPoint; /** @@ -42,42 +42,43 @@ class QPoint; class K3bIsoImageWritingDialog : public K3bInteractionDialog { Q_OBJECT + TQ_OBJECT public: - K3bIsoImageWritingDialog( QWidget* = 0, const char* = 0, bool = true ); + K3bIsoImageWritingDialog( TQWidget* = 0, const char* = 0, bool = true ); ~K3bIsoImageWritingDialog(); void setImage( const KURL& url ); protected slots: void slotStartClicked(); - void updateImageSize( const QString& ); + void updateImageSize( const TQString& ); void slotWriterChanged(); void slotMd5JobPercent( int ); void slotMd5JobFinished( bool ); - void slotContextMenu( KListView*, QListViewItem*, const QPoint& pos ); + void slotContextMenu( KListView*, TQListViewItem*, const TQPoint& pos ); protected: void loadUserDefaults( KConfigBase* ); void saveUserDefaults( KConfigBase* ); void loadK3bDefaults(); - void calculateMd5Sum( const QString& ); - void dragEnterEvent( QDragEnterEvent* ); - void dropEvent( QDropEvent* ); + void calculateMd5Sum( const TQString& ); + void dragEnterEvent( TQDragEnterEvent* ); + void dropEvent( TQDropEvent* ); void init(); private: void setupGui(); - QString imagePath() const; + TQString imagePath() const; K3bMd5Job* m_md5Job; K3bWriterSelectionWidget* m_writerSelectionWidget; - QCheckBox* m_checkDummy; - QCheckBox* m_checkVerify; - QSpinBox* m_spinCopies; + TQCheckBox* m_checkDummy; + TQCheckBox* m_checkVerify; + TQSpinBox* m_spinCopies; K3bWritingModeWidget* m_writingModeWidget; KURLRequester* m_editImagePath; |