diff options
Diffstat (limited to 'src/rip/k3bvideocdrippingdialog.cpp')
-rw-r--r-- | src/rip/k3bvideocdrippingdialog.cpp | 118 |
1 files changed, 59 insertions, 59 deletions
diff --git a/src/rip/k3bvideocdrippingdialog.cpp b/src/rip/k3bvideocdrippingdialog.cpp index 490f531..24e3d2e 100644 --- a/src/rip/k3bvideocdrippingdialog.cpp +++ b/src/rip/k3bvideocdrippingdialog.cpp @@ -24,17 +24,17 @@ #include <kstandarddirs.h> // qt includes -#include <qgroupbox.h> -#include <qcheckbox.h> -#include <qlabel.h> -#include <qtimer.h> -#include <qlayout.h> -#include <qtooltip.h> -#include <qwhatsthis.h> -#include <qdir.h> -#include <qfileinfo.h> -#include <qstringlist.h> -#include <qhbox.h> +#include <tqgroupbox.h> +#include <tqcheckbox.h> +#include <tqlabel.h> +#include <tqtimer.h> +#include <tqlayout.h> +#include <tqtooltip.h> +#include <tqwhatsthis.h> +#include <tqdir.h> +#include <tqfileinfo.h> +#include <tqstringlist.h> +#include <tqhbox.h> // k3b includes #include "k3bvideocdrippingdialog.h" @@ -45,10 +45,10 @@ #include <k3bglobals.h> #include <k3bstdguiitems.h> -K3bVideoCdRippingDialog::K3bVideoCdRippingDialog( K3bVideoCdRippingOptions* options, QWidget* parent, const char* name ) - : K3bInteractionDialog( parent, name, +K3bVideoCdRippingDialog::K3bVideoCdRippingDialog( K3bVideoCdRippingOptions* options, TQWidget* tqparent, const char* name ) + : K3bInteractionDialog( tqparent, name, i18n( "Video CD Ripping" ), - QString::null, + TQString(), START_BUTTON|CANCEL_BUTTON, START_BUTTON, "Video CD Ripping" ), // config group @@ -66,37 +66,37 @@ K3bVideoCdRippingDialog::~K3bVideoCdRippingDialog() void K3bVideoCdRippingDialog::setupGui() { - QWidget * frame = mainWidget(); - QGridLayout* MainLayout = new QGridLayout( frame ); + TQWidget * frame = mainWidget(); + TQGridLayout* MainLayout = new TQGridLayout( frame ); MainLayout->setSpacing( KDialog::spacingHint() ); MainLayout->setMargin( 0 ); // ---------------------------------------------------- Directory group --- - QGroupBox* groupDirectory = new QGroupBox( 0, Qt::Vertical, i18n( "Destination Directory" ), frame ); - groupDirectory->layout() ->setSpacing( KDialog::spacingHint() ); - groupDirectory->layout() ->setMargin( KDialog::marginHint() ); + TQGroupBox* groupDirectory = new TQGroupBox( 0, Qt::Vertical, i18n( "Destination Directory" ), frame ); + groupDirectory->tqlayout() ->setSpacing( KDialog::spacingHint() ); + groupDirectory->tqlayout() ->setMargin( KDialog::marginHint() ); - QGridLayout* groupDirectoryLayout = new QGridLayout( groupDirectory->layout() ); - groupDirectoryLayout->setAlignment( Qt::AlignTop ); + TQGridLayout* groupDirectoryLayout = new TQGridLayout( groupDirectory->tqlayout() ); + groupDirectoryLayout->tqsetAlignment( TQt::AlignTop ); - QLabel* rippathLabel = new QLabel( i18n( "Rip files to:" ), groupDirectory ); + TQLabel* rippathLabel = new TQLabel( i18n( "Rip files to:" ), groupDirectory ); m_editDirectory = new KURLRequester( groupDirectory, "m_editDirectory" ); - m_editDirectory->setURL( QDir::homeDirPath() ); + m_editDirectory->setURL( TQDir::homeDirPath() ); m_editDirectory->setMode( KFile::Directory | KFile::ExistingOnly | KFile::LocalOnly ); rippathLabel->setBuddy( m_editDirectory ); - QHBox* freeSpaceBox = new QHBox( groupDirectory ); + TQHBox* freeSpaceBox = new TQHBox( groupDirectory ); freeSpaceBox->setSpacing( KDialog::spacingHint() ); - ( void ) new QLabel( i18n( "Free space in directory:" ), freeSpaceBox, "FreeSpaceLabel" ); - m_labelFreeSpace = new QLabel( " ", freeSpaceBox, "m_labelFreeSpace" ); - m_labelFreeSpace->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) ); + ( void ) new TQLabel( i18n( "Free space in directory:" ), freeSpaceBox, "FreeSpaceLabel" ); + m_labelFreeSpace = new TQLabel( " ", freeSpaceBox, "m_labelFreeSpace" ); + m_labelFreeSpace->tqsetAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) ); - QHBox* necessarySizeBox = new QHBox( groupDirectory ); + TQHBox* necessarySizeBox = new TQHBox( groupDirectory ); necessarySizeBox->setSpacing( KDialog::spacingHint() ); - ( void ) new QLabel( i18n( "Necessary storage size:" ), necessarySizeBox, "StorSize" ); - m_labelNecessarySize = new QLabel( " ", necessarySizeBox, "m_labelNecessarySize" ); - m_labelNecessarySize->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) ); + ( void ) new TQLabel( i18n( "Necessary storage size:" ), necessarySizeBox, "StorSize" ); + m_labelNecessarySize = new TQLabel( " ", necessarySizeBox, "m_labelNecessarySize" ); + m_labelNecessarySize->tqsetAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) ); groupDirectoryLayout->addWidget( rippathLabel, 0, 0 ); @@ -105,16 +105,16 @@ void K3bVideoCdRippingDialog::setupGui() groupDirectoryLayout->addWidget( necessarySizeBox, 2, 1 ); // ---------------------------------------------------- Options group --- - QGroupBox* groupOptions = new QGroupBox( 4, Qt::Vertical, i18n( "Settings" ), frame ); + TQGroupBox* groupOptions = new TQGroupBox( 4, Qt::Vertical, i18n( "Settings" ), frame ); - m_ignoreExt = new QCheckBox( i18n( "Ignore /EXT/PSD_X.VCD" ), groupOptions ); + m_ignoreExt = new TQCheckBox( i18n( "Ignore /EXT/PSD_X.VCD" ), groupOptions ); - m_sector2336 = new QCheckBox( i18n( "Use 2336 byte sector mode for image file" ), groupOptions ); + m_sector2336 = new TQCheckBox( i18n( "Use 2336 byte sector mode for image file" ), groupOptions ); // Only available for image file ripping m_sector2336->setEnabled( false ); m_sector2336->setChecked( false ); - m_extractXML = new QCheckBox( i18n( "Extract XML structure" ), groupOptions ); + m_extractXML = new TQCheckBox( i18n( "Extract XML structure" ), groupOptions ); MainLayout->addWidget( groupDirectory, 0, 0 ); @@ -124,7 +124,7 @@ void K3bVideoCdRippingDialog::setupGui() setStartButtonText( i18n( "Start Ripping" ), i18n( "Starts extracting the selected VideoCd tracks" ) ); // ---------------------------------------------------------------------------------- - connect( m_editDirectory, SIGNAL(textChanged(const QString&)), this, SLOT(slotUpdateFreeSpace()) ); + connect( m_editDirectory, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotUpdateFreeSpace()) ); m_labelNecessarySize ->setText( KIO::convertSize( m_videooptions ->getVideoCdSize() ) ); } @@ -132,19 +132,19 @@ void K3bVideoCdRippingDialog::setupGui() void K3bVideoCdRippingDialog::setupContextHelp() { - QToolTip::add( m_labelFreeSpace, i18n("Free space on destination directory: %1").arg( m_editDirectory ->url() ) ); + TQToolTip::add( m_labelFreeSpace, i18n("Free space on destination directory: %1").tqarg( m_editDirectory ->url() ) ); - QToolTip::add( m_labelNecessarySize, i18n("Necessary space for extracted files") ); + TQToolTip::add( m_labelNecessarySize, i18n("Necessary space for extracted files") ); - QToolTip::add( m_ignoreExt, i18n("Ignore extended PSD") ); - QWhatsThis::add( m_ignoreExt, i18n("<p>Ignore extended PSD (located in the ISO-9660 filesystem under `/EXT/PSD_X.VCD') and use the <em>standard</em> PSD.</p>") ); + TQToolTip::add( m_ignoreExt, i18n("Ignore extended PSD") ); + TQWhatsThis::add( m_ignoreExt, i18n("<p>Ignore extended PSD (located in the ISO-9660 filesystem under `/EXT/PSD_X.VCD') and use the <em>standard</em> PSD.</p>") ); - QToolTip::add( m_sector2336, i18n("Assume a 2336-byte sector mode") ); - QWhatsThis::add( m_sector2336, i18n("<p>This option only makes sense if you are reading from a BIN CD disk image. This indicates to `vcdxrip' to assume a 2336-byte sector mode for image file.</p>" + TQToolTip::add( m_sector2336, i18n("Assume a 2336-byte sector mode") ); + TQWhatsThis::add( m_sector2336, i18n("<p>This option only makes sense if you are reading from a BIN CD disk image. This indicates to `vcdxrip' to assume a 2336-byte sector mode for image file.</p>" "<b>Note: This option is slated to disappear.</b>") ); - QToolTip::add( m_extractXML, i18n("Create XML description file.") ); - QWhatsThis::add( m_extractXML, i18n("<p>This option creates an XML description file with all video CD information.</p>" + TQToolTip::add( m_extractXML, i18n("Create XML description file.") ); + TQWhatsThis::add( m_extractXML, i18n("<p>This option creates an XML description file with all video CD information.</p>" "<p>This file will always contain all of the information.</p>" "<p>Example: If you only extract sequences, the description file will also hold the information for files and segments.</p>" "<p>The filename is the same as the video CD name, with a .xml extension. The default is VIDEOCD.xml.</p>") ); @@ -153,24 +153,24 @@ void K3bVideoCdRippingDialog::setupContextHelp() void K3bVideoCdRippingDialog::slotStartClicked() { - QStringList filesExists; - QDir d; + TQStringList filesExists; + TQDir d; d.setPath( m_editDirectory ->url() ); if( !d.exists() ) { - if( KMessageBox::warningYesNo( this, i18n("Image folder '%1' does not exist. Do you want K3b to create it?").arg( m_editDirectory->url() ) ) + if( KMessageBox::warningYesNo( this, i18n("Image folder '%1' does not exist. Do you want K3b to create it?").tqarg( m_editDirectory->url() ) ) == KMessageBox::Yes ) { if( !KStandardDirs::makeDir( m_editDirectory->url() ) ) { - KMessageBox::error( this, i18n("Failed to create folder '%1'.").arg( m_editDirectory->url() ) ); + KMessageBox::error( this, i18n("Failed to create folder '%1'.").tqarg( m_editDirectory->url() ) ); return; } } } - const QFileInfoList* list = d.entryInfoList(); - QFileInfoListIterator it( *list ); - QFileInfo* fi; + const TQFileInfoList* list = d.entryInfoList(); + TQFileInfoListIterator it( *list ); + TQFileInfo* fi; while ( ( fi = it.current() ) != 0 ) { if ( fi ->fileName() != "." && fi ->fileName() != ".." ) - filesExists.append( QString( "%1 (%2)" ).arg( QFile::encodeName( fi ->fileName() ) ).arg( KIO::convertSize( fi ->size() ) ) ); + filesExists.append( TQString( "%1 (%2)" ).tqarg( TQFile::encodeName( fi ->fileName() ).data() ).tqarg( KIO::convertSize( fi ->size() ) ) ); ++it; } @@ -197,7 +197,7 @@ void K3bVideoCdRippingDialog::slotStartClicked() close(); } -void K3bVideoCdRippingDialog::slotFreeSpace(const QString&, +void K3bVideoCdRippingDialog::slotFreeSpace(const TQString&, unsigned long, unsigned long, unsigned long kbAvail) @@ -211,16 +211,16 @@ void K3bVideoCdRippingDialog::slotFreeSpace(const QString&, else m_labelNecessarySize->setPaletteForegroundColor( m_labelFreeSpace->paletteForegroundColor() ); - QTimer::singleShot( 1000, this, SLOT(slotUpdateFreeSpace()) ); + TQTimer::singleShot( 1000, this, TQT_SLOT(slotUpdateFreeSpace()) ); } void K3bVideoCdRippingDialog::slotUpdateFreeSpace() { - QString path = m_editDirectory->url(); + TQString path = m_editDirectory->url(); - if( !QFile::exists( path ) ) - path.truncate( path.findRev('/') ); + if( !TQFile::exists( path ) ) + path.truncate( path.tqfindRev('/') ); unsigned long size, avail; if( K3b::kbFreeOnFs( path, size, avail ) ) @@ -231,7 +231,7 @@ void K3bVideoCdRippingDialog::slotUpdateFreeSpace() void K3bVideoCdRippingDialog::loadK3bDefaults() { - m_editDirectory->setURL( QDir::homeDirPath() ); + m_editDirectory->setURL( TQDir::homeDirPath() ); m_ignoreExt ->setChecked( false ); m_sector2336 ->setChecked( false ); m_extractXML ->setChecked( false ); @@ -241,7 +241,7 @@ void K3bVideoCdRippingDialog::loadK3bDefaults() void K3bVideoCdRippingDialog::loadUserDefaults( KConfigBase* c ) { - m_editDirectory ->setURL( c->readPathEntry( "last ripping directory", QDir::homeDirPath() ) ); + m_editDirectory ->setURL( c->readPathEntry( "last ripping directory", TQDir::homeDirPath() ) ); m_ignoreExt ->setChecked( c->readBoolEntry( "ignore ext", false ) ); m_sector2336 ->setChecked( c->readBoolEntry( "sector 2336", false ) ); m_extractXML ->setChecked( c->readBoolEntry( "extract xml", false ) ); |