diff options
Diffstat (limited to 'src/rip')
46 files changed, 1284 insertions, 1266 deletions
diff --git a/src/rip/base_k3baudiorippingoptionwidget.ui b/src/rip/base_k3baudiorippingoptionwidget.ui index 04355b4..db1848a 100644 --- a/src/rip/base_k3baudiorippingoptionwidget.ui +++ b/src/rip/base_k3baudiorippingoptionwidget.ui @@ -1,11 +1,11 @@ <!DOCTYPE UI><UI version="3.2" stdsetdef="1"> <class>base_K3bAudioRippingOptionWidget</class> <author>Sebastian Trueg</author> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>Form1</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>0</x> <y>0</y> @@ -17,7 +17,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QGroupBox" row="0" column="0"> + <widget class="TQGroupBox" row="0" column="0"> <property name="name"> <cstring>groupBox2</cstring> </property> @@ -41,7 +41,7 @@ </sizepolicy> </property> </widget> - <widget class="QToolButton"> + <widget class="TQToolButton"> <property name="name"> <cstring>m_buttonConfigurePlugin</cstring> </property> @@ -54,7 +54,7 @@ </widget> </hbox> </widget> - <widget class="QGroupBox" row="0" column="1" rowspan="2" colspan="1"> + <widget class="TQGroupBox" row="0" column="1" rowspan="2" colspan="1"> <property name="name"> <cstring>groupBox3</cstring> </property> @@ -65,7 +65,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>m_checkCreatePlaylist</cstring> </property> @@ -81,9 +81,9 @@ which can be used with programs like xmms or noatun. <p>You may use the special strings to give the playlist a unique filename.</string> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout6</cstring> + <cstring>tqlayout6</cstring> </property> <hbox> <property name="name"> @@ -99,14 +99,14 @@ which can be used with programs like xmms or noatun. <property name="sizeType"> <enum>Fixed</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>16</height> </size> </property> </spacer> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>m_checkPlaylistRelative</cstring> </property> @@ -128,7 +128,7 @@ playlist will look something like: <em>cool/track1.ogg</em>.</string </widget> </hbox> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>m_checkSingleFile</cstring> </property> @@ -146,9 +146,9 @@ file will contain all tracks one after the other. <p><b>Caution:</b> The file will have the name of the first track.</string> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout6_2</cstring> + <cstring>tqlayout6_2</cstring> </property> <hbox> <property name="name"> @@ -164,14 +164,14 @@ file will contain all tracks one after the other. <property name="sizeType"> <enum>Fixed</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>16</height> </size> </property> </spacer> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>m_checkWriteCueFile</cstring> </property> @@ -192,7 +192,7 @@ file will contain all tracks one after the other. </widget> </vbox> </widget> - <widget class="QGroupBox" row="1" column="0"> + <widget class="TQGroupBox" row="1" column="0"> <property name="name"> <cstring>groupBox1</cstring> </property> @@ -211,7 +211,7 @@ file will contain all tracks one after the other. <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -224,18 +224,18 @@ file will contain all tracks one after the other. <cstring>m_editBaseDir</cstring> </property> </widget> - <widget class="QLabel" row="1" column="1"> + <widget class="TQLabel" row="1" column="1"> <property name="name"> <cstring>m_labelFreeSpace</cstring> </property> <property name="text"> <string>-</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> </widget> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>textLabel1_2</cstring> </property> @@ -243,14 +243,14 @@ file will contain all tracks one after the other. <string>Space needed:</string> </property> </widget> - <widget class="QLabel" row="2" column="1"> + <widget class="TQLabel" row="2" column="1"> <property name="name"> <cstring>m_labelNeededSpace</cstring> </property> <property name="text"> <string>-</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> </widget> @@ -274,7 +274,7 @@ file will contain all tracks one after the other. <slot>setEnabled(bool)</slot> </connection> </connections> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>kurlrequester.h</includehint> <includehint>kpushbutton.h</includehint> diff --git a/src/rip/base_k3bcddbpatternwidget.ui b/src/rip/base_k3bcddbpatternwidget.ui index cafaa5d..2a1f617 100644 --- a/src/rip/base_k3bcddbpatternwidget.ui +++ b/src/rip/base_k3bcddbpatternwidget.ui @@ -1,10 +1,10 @@ <!DOCTYPE UI><UI version="3.2" stdsetdef="1"> <class>base_K3bCddbPatternWidget</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>base_K3bPatternOptionTab</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>0</x> <y>0</y> @@ -25,15 +25,15 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QLayoutWidget" row="3" column="0" rowspan="1" colspan="2"> + <widget class="TQLayoutWidget" row="3" column="0" rowspan="1" colspan="2"> <property name="name"> - <cstring>layout8</cstring> + <cstring>tqlayout8</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>m_checkBlankReplace</cstring> </property> @@ -54,7 +54,7 @@ </widget> </hbox> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>textLabel2</cstring> </property> @@ -78,7 +78,7 @@ <bool>true</bool> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -105,9 +105,9 @@ <string>Insert your custom pattern here</string> </property> </widget> - <widget class="QLayoutWidget" row="2" column="0" rowspan="1" colspan="2"> + <widget class="TQLayoutWidget" row="2" column="0" rowspan="1" colspan="2"> <property name="name"> - <cstring>layout2</cstring> + <cstring>tqlayout2</cstring> </property> <hbox> <property name="name"> @@ -123,7 +123,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>31</width> <height>2</height> @@ -137,7 +137,7 @@ <property name="text"> <string>See special strings</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> </widget> @@ -148,7 +148,7 @@ <property name="text"> <string>About conditional inclusion</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> </widget> @@ -172,7 +172,7 @@ <tabstop>m_checkBlankReplace</tabstop> <tabstop>m_editBlankReplace</tabstop> </tabstops> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>kurllabel.h</includehint> <includehint>kurllabel.h</includehint> diff --git a/src/rip/k3baudiocdlistview.cpp b/src/rip/k3baudiocdlistview.cpp index b5f8566..fe7fcde 100644 --- a/src/rip/k3baudiocdlistview.cpp +++ b/src/rip/k3baudiocdlistview.cpp @@ -18,12 +18,12 @@ #include <klocale.h> -#include <qheader.h> -#include <qtooltip.h> +#include <tqheader.h> +#include <tqtooltip.h> -K3bAudioCdListView::K3bAudioCdListView( K3bAudioCdView* view, QWidget* parent, const char* name ) - : K3bListView( parent, name ), +K3bAudioCdListView::K3bAudioCdListView( K3bAudioCdView* view, TQWidget* tqparent, const char* name ) + : K3bListView( tqparent, name ), m_view(view) { setFullWidth(true); @@ -41,13 +41,13 @@ K3bAudioCdListView::K3bAudioCdListView( K3bAudioCdView* view, QWidget* parent, c setDoubleClickForEdit( true ); header()->setClickEnabled(false); - setColumnWidthMode( 0, QListView::Manual ); + setColumnWidthMode( 0, TQListView::Manual ); setColumnWidth( 0, 20 ); header()->setResizeEnabled( false,0 ); - setColumnAlignment( 4, Qt::AlignHCenter ); + setColumnAlignment( 4, TQt::AlignHCenter ); - QToolTip::add( viewport(), i18n("Check the tracks that should be ripped") ); + TQToolTip::add( viewport(), i18n("Check the tracks that should be ripped") ); } @@ -56,7 +56,7 @@ K3bAudioCdListView::~K3bAudioCdListView() } -QDragObject* K3bAudioCdListView::dragObject() +TQDragObject* K3bAudioCdListView::dragObject() { return m_view->dragObject(); } diff --git a/src/rip/k3baudiocdlistview.h b/src/rip/k3baudiocdlistview.h index 1ce4a90..dccdc20 100644 --- a/src/rip/k3baudiocdlistview.h +++ b/src/rip/k3baudiocdlistview.h @@ -18,7 +18,7 @@ #include <k3blistview.h> -class QDragObject; +class TQDragObject; class K3bAudioCdView; /** @@ -27,16 +27,17 @@ class K3bAudioCdView; class K3bAudioCdListView : public K3bListView { Q_OBJECT + TQ_OBJECT public: - K3bAudioCdListView( K3bAudioCdView*, QWidget* parent = 0, const char* name = 0 ); + K3bAudioCdListView( K3bAudioCdView*, TQWidget* tqparent = 0, const char* name = 0 ); ~K3bAudioCdListView(); protected: /** * @reimpl from KListView */ - QDragObject* dragObject(); + TQDragObject* dragObject(); private: K3bAudioCdView* m_view; diff --git a/src/rip/k3baudiocdview.cpp b/src/rip/k3baudiocdview.cpp index d225922..f8e5c0a 100644 --- a/src/rip/k3baudiocdview.cpp +++ b/src/rip/k3baudiocdview.cpp @@ -46,13 +46,13 @@ #include <kstandarddirs.h> #include <kdialogbase.h> -#include <qlayout.h> -#include <qheader.h> -#include <qlabel.h> -#include <qframe.h> -#include <qspinbox.h> -#include <qfont.h> -#include <qdragobject.h> +#include <tqlayout.h> +#include <tqheader.h> +#include <tqlabel.h> +#include <tqframe.h> +#include <tqspinbox.h> +#include <tqfont.h> +#include <tqdragobject.h> @@ -60,14 +60,14 @@ class K3bAudioCdView::AudioTrackViewItem : public K3bCheckListViewItem { public: - AudioTrackViewItem( QListView* parent, - QListViewItem* after, + AudioTrackViewItem( TQListView* tqparent, + TQListViewItem* after, int _trackNumber, const K3b::Msf& length) - : K3bCheckListViewItem( parent, after ) { + : K3bCheckListViewItem( tqparent, after ) { - setText( 1, QString::number(_trackNumber).rightJustify( 2, ' ' ) ); - setText( 3, i18n("Track %1").arg(_trackNumber) ); + setText( 1, TQString::number(_trackNumber).rightJustify( 2, ' ' ) ); + setText( 3, i18n("Track %1").tqarg(_trackNumber) ); setText( 4, " " + length.toString() + " " ); setText( 5, " " + KIO::convertSize( length.audioBytes() ) + " " ); @@ -94,24 +94,24 @@ public: }; -K3bAudioCdView::K3bAudioCdView( QWidget* parent, const char *name ) +K3bAudioCdView::K3bAudioCdView( TQWidget* tqparent, const char *name ) : K3bMediaContentsView( true, K3bMedium::CONTENT_AUDIO, K3bDevice::MEDIA_CD_ALL, K3bDevice::STATE_INCOMPLETE|K3bDevice::STATE_COMPLETE, - parent, name ) + tqparent, name ) { - QGridLayout* mainGrid = new QGridLayout( mainWidget() ); + TQGridLayout* mainGrid = new TQGridLayout( mainWidget() ); // toolbox // ---------------------------------------------------------------------------------- - QHBoxLayout* toolBoxLayout = new QHBoxLayout( 0, 0, 0, "toolBoxLayout" ); + TQHBoxLayout* toolBoxLayout = new TQHBoxLayout( 0, 0, 0, "toolBoxLayout" ); m_toolBox = new K3bToolBox( mainWidget() ); toolBoxLayout->addWidget( m_toolBox ); - QSpacerItem* spacer = new QSpacerItem( 10, 10, QSizePolicy::Expanding, QSizePolicy::Minimum ); + TQSpacerItem* spacer = new TQSpacerItem( 10, 10, TQSizePolicy::Expanding, TQSizePolicy::Minimum ); toolBoxLayout->addItem( spacer ); - m_labelLength = new QLabel( mainWidget() ); - m_labelLength->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) ); + m_labelLength = new TQLabel( mainWidget() ); + m_labelLength->tqsetAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) ); toolBoxLayout->addWidget( m_labelLength ); @@ -119,21 +119,21 @@ K3bAudioCdView::K3bAudioCdView( QWidget* parent, const char *name ) // ---------------------------------------------------------------------------------- m_trackView = new K3bAudioCdListView( this, mainWidget() ); - connect( m_trackView, SIGNAL(itemRenamed(QListViewItem*, const QString&, int)), - this, SLOT(slotItemRenamed(QListViewItem*, const QString&, int)) ); - connect( m_trackView, SIGNAL(contextMenu(KListView*, QListViewItem*, const QPoint&)), - this, SLOT(slotContextMenu(KListView*, QListViewItem*, const QPoint&)) ); -// connect( m_trackView, SIGNAL(selectionChanged(QListViewItem*)), -// this, SLOT(slotTrackSelectionChanged(QListViewItem*)) ); + connect( m_trackView, TQT_SIGNAL(itemRenamed(TQListViewItem*, const TQString&, int)), + this, TQT_SLOT(slotItemRenamed(TQListViewItem*, const TQString&, int)) ); + connect( m_trackView, TQT_SIGNAL(contextMenu(KListView*, TQListViewItem*, const TQPoint&)), + this, TQT_SLOT(slotContextMenu(KListView*, TQListViewItem*, const TQPoint&)) ); +// connect( m_trackView, TQT_SIGNAL(selectionChanged(TQListViewItem*)), +// this, TQT_SLOT(slotTrackSelectionChanged(TQListViewItem*)) ); mainGrid->addLayout( toolBoxLayout, 0, 0 ); mainGrid->addWidget( m_trackView, 1, 0 ); - m_cddb = new K3bCddb( this ); + m_cddb = new K3bCddb( TQT_TQOBJECT(this) ); - connect( m_cddb, SIGNAL(queryFinished(int)), - this, SLOT(slotCddbQueryFinished(int)) ); + connect( m_cddb, TQT_SIGNAL(queryFinished(int)), + this, TQT_SLOT(slotCddbQueryFinished(int)) ); initActions(); // slotTrackSelectionChanged(0); @@ -142,7 +142,7 @@ K3bAudioCdView::K3bAudioCdView( QWidget* parent, const char *name ) setRightPixmap( K3bTheme::MEDIA_AUDIO ); m_busyInfoLabel = new K3bThemedLabel( i18n("Searching for Artist information..."), this ); - m_busyInfoLabel->setFrameStyle( QFrame::Box|QFrame::Plain ); + m_busyInfoLabel->setFrameStyle( TQFrame::Box|TQFrame::Plain ); m_busyInfoLabel->setMargin( 6 ); m_busyInfoLabel->hide(); } @@ -160,7 +160,7 @@ void K3bAudioCdView::reloadMedium() // initialize cddb info for editing m_cddbInfo = K3bCddbResultEntry(); - m_cddbInfo.discid = QString::number( medium().toc().discId(), 16 ); + m_cddbInfo.discid = TQString::number( medium().toc().discId(), 16 ); for( int i = 0; i < (int)m_toc.count(); ++i ) { m_cddbInfo.titles.append(""); @@ -226,33 +226,33 @@ void K3bAudioCdView::initActions() { m_actionCollection = new KActionCollection( this ); - KAction* actionSelectAll = new KAction( i18n("Check All"), 0, 0, this, - SLOT(slotCheckAll()), actionCollection(), + KAction* actionSelectAll = new KAction( i18n("Check All"), 0, 0, TQT_TQOBJECT(this), + TQT_SLOT(slotCheckAll()), actionCollection(), "check_all" ); - KAction* actionDeselectAll = new KAction( i18n("Uncheck All"), 0, 0, this, - SLOT(slotUncheckAll()), actionCollection(), + KAction* actionDeselectAll = new KAction( i18n("Uncheck All"), 0, 0, TQT_TQOBJECT(this), + TQT_SLOT(slotUncheckAll()), actionCollection(), "uncheck_all" ); - KAction* actionSelect = new KAction( i18n("Check Track"), 0, 0, this, - SLOT(slotSelect()), actionCollection(), + KAction* actionSelect = new KAction( i18n("Check Track"), 0, 0, TQT_TQOBJECT(this), + TQT_SLOT(slotSelect()), actionCollection(), "select_track" ); - KAction* actionDeselect = new KAction( i18n("Uncheck Track"), 0, 0, this, - SLOT(slotDeselect()), actionCollection(), + KAction* actionDeselect = new KAction( i18n("Uncheck Track"), 0, 0, TQT_TQOBJECT(this), + TQT_SLOT(slotDeselect()), actionCollection(), "deselect_track" ); - KAction* actionEditTrackCddbInfo = new KAction( i18n("Edit Track cddb Info"), "edit", 0, this, - SLOT(slotEditTrackCddb()), actionCollection(), + KAction* actionEditTrackCddbInfo = new KAction( i18n("Edit Track cddb Info"), "edit", 0, TQT_TQOBJECT(this), + TQT_SLOT(slotEditTrackCddb()), actionCollection(), "edit_track_cddb" ); - KAction* actionEditAlbumCddbInfo = new KAction( i18n("Edit Album cddb Info"), "edit", 0, this, - SLOT(slotEditAlbumCddb()), actionCollection(), + KAction* actionEditAlbumCddbInfo = new KAction( i18n("Edit Album cddb Info"), "edit", 0, TQT_TQOBJECT(this), + TQT_SLOT(slotEditAlbumCddb()), actionCollection(), "edit_album_cddb" ); - KAction* actionStartRip = new KAction( i18n("Start Ripping"), "cddarip", 0, this, - SLOT(startRip()), actionCollection(), "start_rip" ); + KAction* actionStartRip = new KAction( i18n("Start Ripping"), "cddarip", 0, TQT_TQOBJECT(this), + TQT_SLOT(startRip()), actionCollection(), "start_rip" ); - KAction* actionQueryCddb = new KAction( i18n("Query cddb"), "reload", 0, this, - SLOT(queryCddb()), actionCollection(), "query_cddb" ); + KAction* actionQueryCddb = new KAction( i18n("Query cddb"), "reload", 0, TQT_TQOBJECT(this), + TQT_SLOT(queryCddb()), actionCollection(), "query_cddb" ); - KAction* actionSaveCddbLocally = new KAction( i18n("Save Cddb Entry Locally"), "filesave", 0, this, - SLOT(slotSaveCddbLocally()), actionCollection(), "save_cddb_local" ); + KAction* actionSaveCddbLocally = new KAction( i18n("Save Cddb Entry Locally"), "filesave", 0, TQT_TQOBJECT(this), + TQT_SLOT(slotSaveCddbLocally()), actionCollection(), "save_cddb_local" ); // TODO: set the actions tooltips and whatsthis infos @@ -279,13 +279,13 @@ void K3bAudioCdView::initActions() } -void K3bAudioCdView::slotContextMenu( KListView*, QListViewItem*, const QPoint& p ) +void K3bAudioCdView::slotContextMenu( KListView*, TQListViewItem*, const TQPoint& p ) { m_popupMenu->popup(p); } -void K3bAudioCdView::slotItemRenamed( QListViewItem* item, const QString& str, int col ) +void K3bAudioCdView::slotItemRenamed( TQListViewItem* item, const TQString& str, int col ) { AudioTrackViewItem* a = (AudioTrackViewItem*)item; if( col == 2 ) @@ -297,7 +297,7 @@ void K3bAudioCdView::slotItemRenamed( QListViewItem* item, const QString& str, i } -void K3bAudioCdView::slotTrackSelectionChanged( QListViewItem* item ) +void K3bAudioCdView::slotTrackSelectionChanged( TQListViewItem* item ) { actionCollection()->action("edit_track_cddb")->setEnabled( item != 0 ); actionCollection()->action("select_track")->setEnabled( item != 0 ); @@ -307,8 +307,8 @@ void K3bAudioCdView::slotTrackSelectionChanged( QListViewItem* item ) void K3bAudioCdView::startRip() { - QValueList<int> trackNumbers; - for( QListViewItemIterator it( m_trackView ); it.current(); ++it ) { + TQValueList<int> trackNumbers; + for( TQListViewItemIterator it( m_trackView ); it.current(); ++it ) { AudioTrackViewItem* a = (AudioTrackViewItem*)it.current(); if( a->isChecked() ) trackNumbers.append( a->trackNumber ); @@ -331,37 +331,37 @@ void K3bAudioCdView::startRip() void K3bAudioCdView::slotEditTrackCddb() { - QPtrList<QListViewItem> items( m_trackView->selectedItems() ); + TQPtrList<TQListViewItem> items( m_trackView->selectedItems() ); if( !items.isEmpty() ) { AudioTrackViewItem* a = static_cast<AudioTrackViewItem*>(items.first()); - KDialogBase d( this, "trackCddbDialog", true, i18n("Cddb Track %1").arg(a->trackNumber), + KDialogBase d( this, "trackCddbDialog", true, i18n("Cddb Track %1").tqarg(a->trackNumber), KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Ok, true); - QWidget* w = new QWidget( &d ); + TQWidget* w = new TQWidget( &d ); KLineEdit* editTitle = new KLineEdit( m_cddbInfo.titles[a->trackNumber-1], w ); KLineEdit* editArtist = new KLineEdit( m_cddbInfo.artists[a->trackNumber-1], w ); KLineEdit* editExtInfo = new KLineEdit( m_cddbInfo.extInfos[a->trackNumber-1], w ); - QFrame* line = new QFrame( w ); - line->setFrameShape( QFrame::HLine ); - line->setFrameShadow( QFrame::Sunken ); + TQFrame* line = new TQFrame( w ); + line->setFrameShape( TQFrame::HLine ); + line->setFrameShadow( TQFrame::Sunken ); - QGridLayout* grid = new QGridLayout( w ); + TQGridLayout* grid = new TQGridLayout( w ); grid->setSpacing( KDialog::spacingHint() ); - grid->addWidget( new QLabel( i18n("Title:"), w ), 0, 0 ); + grid->addWidget( new TQLabel( i18n("Title:"), w ), 0, 0 ); grid->addWidget( editTitle, 0, 1 ); grid->addMultiCellWidget( line, 1, 1, 0, 1 ); - grid->addWidget( new QLabel( i18n("Artist:"), w ), 2, 0 ); + grid->addWidget( new TQLabel( i18n("Artist:"), w ), 2, 0 ); grid->addWidget( editArtist, 2, 1 ); - grid->addWidget( new QLabel( i18n("Extra info:"), w ), 3, 0 ); + grid->addWidget( new TQLabel( i18n("Extra info:"), w ), 3, 0 ); grid->addWidget( editExtInfo, 3, 1 ); grid->setRowStretch( 4, 1 ); d.setMainWidget(w); - d.resize( QMAX( QMAX(d.sizeHint().height(), d.sizeHint().width()), 300), d.sizeHint().height() ); + d.resize( TQMAX( TQMAX(d.tqsizeHint().height(), d.tqsizeHint().width()), 300), d.tqsizeHint().height() ); - if( d.exec() == QDialog::Accepted ) { + if( d.exec() == TQDialog::Accepted ) { m_cddbInfo.titles[a->trackNumber-1] = editTitle->text(); m_cddbInfo.artists[a->trackNumber-1] = editArtist->text(); m_cddbInfo.extInfos[a->trackNumber-1] = editExtInfo->text(); @@ -375,17 +375,17 @@ void K3bAudioCdView::slotEditAlbumCddb() { KDialogBase d( this, "trackCddbDialog", true, i18n("Album Cddb"), KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Ok, true); - QWidget* w = new QWidget( &d ); + TQWidget* w = new TQWidget( &d ); KLineEdit* editTitle = new KLineEdit( m_cddbInfo.cdTitle, w ); KLineEdit* editArtist = new KLineEdit( m_cddbInfo.cdArtist, w ); KLineEdit* editExtInfo = new KLineEdit( m_cddbInfo.cdExtInfo, w ); KLineEdit* editGenre = new KLineEdit( m_cddbInfo.genre, w ); - QSpinBox* spinYear = new QSpinBox( 0, 9999, 1, w ); + TQSpinBox* spinYear = new TQSpinBox( 0, 9999, 1, w ); spinYear->setValue( m_cddbInfo.year ); - QFrame* line = new QFrame( w ); - line->setFrameShape( QFrame::HLine ); - line->setFrameShadow( QFrame::Sunken ); + TQFrame* line = new TQFrame( w ); + line->setFrameShape( TQFrame::HLine ); + line->setFrameShadow( TQFrame::Sunken ); KComboBox* comboCat = new KComboBox( w ); comboCat->insertStringList( K3bCddbQuery::categories() ); @@ -396,28 +396,28 @@ void K3bAudioCdView::slotEditAlbumCddb() break; } - QGridLayout* grid = new QGridLayout( w ); + TQGridLayout* grid = new TQGridLayout( w ); grid->setSpacing( KDialog::spacingHint() ); - grid->addWidget( new QLabel( i18n("Title:"), w ), 0, 0 ); + grid->addWidget( new TQLabel( i18n("Title:"), w ), 0, 0 ); grid->addWidget( editTitle, 0, 1 ); grid->addMultiCellWidget( line, 1, 1, 0, 1 ); - grid->addWidget( new QLabel( i18n("Artist:"), w ), 2, 0 ); + grid->addWidget( new TQLabel( i18n("Artist:"), w ), 2, 0 ); grid->addWidget( editArtist, 2, 1 ); - grid->addWidget( new QLabel( i18n("Extra info:"), w ), 3, 0 ); + grid->addWidget( new TQLabel( i18n("Extra info:"), w ), 3, 0 ); grid->addWidget( editExtInfo, 3, 1 ); - grid->addWidget( new QLabel( i18n("Genre:"), w ), 4, 0 ); + grid->addWidget( new TQLabel( i18n("Genre:"), w ), 4, 0 ); grid->addWidget( editGenre, 4, 1 ); - grid->addWidget( new QLabel( i18n("Year:"), w ), 5, 0 ); + grid->addWidget( new TQLabel( i18n("Year:"), w ), 5, 0 ); grid->addWidget( spinYear, 5, 1 ); - grid->addWidget( new QLabel( i18n("Category:"), w ), 6, 0 ); + grid->addWidget( new TQLabel( i18n("Category:"), w ), 6, 0 ); grid->addWidget( comboCat, 6, 1 ); grid->setRowStretch( 7, 1 ); d.setMainWidget(w); - d.resize( QMAX( QMAX(d.sizeHint().height(), d.sizeHint().width()), 300), d.sizeHint().height() ); + d.resize( TQMAX( TQMAX(d.tqsizeHint().height(), d.tqsizeHint().width()), 300), d.tqsizeHint().height() ); - if( d.exec() == QDialog::Accepted ) { + if( d.exec() == TQDialog::Accepted ) { m_cddbInfo.cdTitle = editTitle->text(); m_cddbInfo.cdArtist = editArtist->text(); m_cddbInfo.cdExtInfo = editExtInfo->text(); @@ -516,36 +516,36 @@ void K3bAudioCdView::slotSaveCddbLocally() m_cddb->saveEntry( m_cddbInfo ); K3bPassivePopup::showPopup( i18n("Saved entry (%1) in category %2.") - .arg(m_cddbInfo.discid) - .arg(m_cddbInfo.category), + .tqarg(m_cddbInfo.discid) + .tqarg(m_cddbInfo.category), i18n("CDDB") ); } void K3bAudioCdView::slotCheckAll() { - for( QListViewItemIterator it( m_trackView ); it.current(); ++it ) + for( TQListViewItemIterator it( m_trackView ); it.current(); ++it ) ((AudioTrackViewItem*)it.current())->setChecked(true); } void K3bAudioCdView::slotUncheckAll() { - for( QListViewItemIterator it( m_trackView ); it.current(); ++it ) + for( TQListViewItemIterator it( m_trackView ); it.current(); ++it ) ((AudioTrackViewItem*)it.current())->setChecked(false); } void K3bAudioCdView::slotSelect() { - QPtrList<QListViewItem> items( m_trackView->selectedItems() ); - for( QPtrListIterator<QListViewItem> it( items ); + TQPtrList<TQListViewItem> items( m_trackView->selectedItems() ); + for( TQPtrListIterator<TQListViewItem> it( items ); it.current(); ++it ) static_cast<AudioTrackViewItem*>(it.current())->setChecked(true); } void K3bAudioCdView::slotDeselect() { - QPtrList<QListViewItem> items( m_trackView->selectedItems() ); - for( QPtrListIterator<QListViewItem> it( items ); + TQPtrList<TQListViewItem> items( m_trackView->selectedItems() ); + for( TQPtrListIterator<TQListViewItem> it( items ); it.current(); ++it ) static_cast<AudioTrackViewItem*>(it.current())->setChecked(false); } @@ -553,13 +553,13 @@ void K3bAudioCdView::slotDeselect() void K3bAudioCdView::updateDisplay() { // update the listview - for( QListViewItemIterator it( m_trackView ); it.current(); ++it ) { + for( TQListViewItemIterator it( m_trackView ); it.current(); ++it ) { AudioTrackViewItem* item = (AudioTrackViewItem*)it.current(); item->updateCddbData( m_cddbInfo ); } if( !m_cddbInfo.cdTitle.isEmpty() ) { - QString s = m_cddbInfo.cdTitle; + TQString s = m_cddbInfo.cdTitle; if( !m_cddbInfo.cdArtist.isEmpty() ) s += " (" + m_cddbInfo.cdArtist + ")"; setTitle( s ); @@ -569,7 +569,7 @@ void K3bAudioCdView::updateDisplay() m_labelLength->setText( i18n("1 track (%1)", "%n tracks (%1)", - m_toc.count()).arg(K3b::Msf(m_toc.length()).toString()) ); + m_toc.count()).tqarg(K3b::Msf(m_toc.length()).toString()) ); } @@ -584,10 +584,10 @@ void K3bAudioCdView::showBusyLabel( bool b ) // the themed label is a cut label, thus its size hint is // based on the cut text, we force it to be full m_busyInfoLabel->resize( width(), height() ); - m_busyInfoLabel->resize( m_busyInfoLabel->sizeHint() ); + m_busyInfoLabel->resize( m_busyInfoLabel->tqsizeHint() ); int x = (width() - m_busyInfoLabel->width())/2; int y = (height() - m_busyInfoLabel->height())/2; - QRect r( QPoint( x, y ), m_busyInfoLabel->size() ); + TQRect r( TQPoint( x, y ), m_busyInfoLabel->size() ); m_busyInfoLabel->setGeometry( r ); m_busyInfoLabel->show(); @@ -607,16 +607,16 @@ void K3bAudioCdView::enableInteraction( bool b ) } -QDragObject* K3bAudioCdView::dragObject() +TQDragObject* K3bAudioCdView::dragObject() { - QPtrList<QListViewItem> items = m_trackView->selectedItems(); - QValueList<int> tracks; - for( QPtrListIterator<QListViewItem> it( items ); + TQPtrList<TQListViewItem> items = m_trackView->selectedItems(); + TQValueList<int> tracks; + for( TQPtrListIterator<TQListViewItem> it( items ); it.current(); ++it ) tracks.append( static_cast<AudioTrackViewItem*>(it.current())->trackNumber ); if( !items.isEmpty() ) { - QDragObject* drag = new K3bAudioCdTrackDrag( m_toc, + TQDragObject* drag = new K3bAudioCdTrackDrag( m_toc, tracks, m_cddbInfo, m_device, diff --git a/src/rip/k3baudiocdview.h b/src/rip/k3baudiocdview.h index 257a0f5..f28e3a9 100644 --- a/src/rip/k3baudiocdview.h +++ b/src/rip/k3baudiocdview.h @@ -26,14 +26,14 @@ class K3bListView; class KListView; -class QListViewItem; -class QPoint; +class TQListViewItem; +class TQPoint; class KActionCollection; class KActionMenu; class K3bCddb; -class QLabel; +class TQLabel; class K3bToolBox; -class QDragObject; +class TQDragObject; namespace K3bDevice { @@ -44,9 +44,10 @@ namespace K3bDevice { class K3bAudioCdView : public K3bMediaContentsView { Q_OBJECT + TQ_OBJECT public: - K3bAudioCdView( QWidget* parent = 0, const char * name = 0 ); + K3bAudioCdView( TQWidget* tqparent = 0, const char * name = 0 ); ~K3bAudioCdView(); KActionCollection* actionCollection() const { return m_actionCollection; } @@ -54,16 +55,16 @@ class K3bAudioCdView : public K3bMediaContentsView /** * internal */ - QDragObject* dragObject(); + TQDragObject* dragObject(); public slots: void queryCddb(); private slots: - void slotContextMenu( KListView*, QListViewItem*, const QPoint& ); - void slotItemRenamed( QListViewItem*, const QString&, int ); + void slotContextMenu( KListView*, TQListViewItem*, const TQPoint& ); + void slotItemRenamed( TQListViewItem*, const TQString&, int ); void slotCddbQueryFinished( int ); - void slotTrackSelectionChanged( QListViewItem* ); + void slotTrackSelectionChanged( TQListViewItem* ); void slotSaveCddbLocally(); void slotEditTrackCddb(); @@ -92,7 +93,7 @@ class K3bAudioCdView : public K3bMediaContentsView K3bListView* m_trackView; K3bToolBox* m_toolBox; - QLabel* m_labelLength; + TQLabel* m_labelLength; class AudioTrackViewItem; @@ -100,7 +101,7 @@ class K3bAudioCdView : public K3bMediaContentsView K3bDevice::CdText m_cdText; - QLabel* m_busyInfoLabel; + TQLabel* m_busyInfoLabel; }; diff --git a/src/rip/k3baudioconvertingoptionwidget.cpp b/src/rip/k3baudioconvertingoptionwidget.cpp index a044dc5..5c8070c 100644 --- a/src/rip/k3baudioconvertingoptionwidget.cpp +++ b/src/rip/k3baudioconvertingoptionwidget.cpp @@ -27,22 +27,22 @@ #include <klocale.h> #include <kiconloader.h> -#include <qintdict.h> -#include <qmap.h> -#include <qlabel.h> -#include <qtimer.h> -#include <qtoolbutton.h> -#include <qcheckbox.h> +#include <tqintdict.h> +#include <tqmap.h> +#include <tqlabel.h> +#include <tqtimer.h> +#include <tqtoolbutton.h> +#include <tqcheckbox.h> class K3bAudioConvertingOptionWidget::Private { public: - QIntDict<K3bAudioEncoder> encoderMap; - QMap<int, QString> extensionMap; + TQIntDict<K3bAudioEncoder> encoderMap; + TQMap<int, TQString> extensionMap; - QTimer freeSpaceUpdateTimer; + TQTimer freeSpaceUpdateTimer; KIO::filesize_t neededSize; @@ -55,7 +55,7 @@ public: int ogg = -1; int mp3 = -1; int flac = -1; - for( QMap<int, QString>::const_iterator it = extensionMap.constBegin(); + for( TQMap<int, TQString>::const_iterator it = extensionMap.constBegin(); it != extensionMap.constEnd(); ++it ) { if( it.data() == "ogg" ) ogg = it.key(); @@ -77,23 +77,23 @@ public: }; -K3bAudioConvertingOptionWidget::K3bAudioConvertingOptionWidget( QWidget* parent, const char* name ) - : base_K3bAudioRippingOptionWidget( parent, name ) +K3bAudioConvertingOptionWidget::K3bAudioConvertingOptionWidget( TQWidget* tqparent, const char* name ) + : base_K3bAudioRippingOptionWidget( tqparent, name ) { d = new Private(); - connect( m_editBaseDir, SIGNAL(textChanged(const QString&)), - this, SLOT(slotUpdateFreeTempSpace()) ); - connect( m_comboFileType, SIGNAL(activated(int)), - this, SLOT(slotEncoderChanged()) ); - connect( &d->freeSpaceUpdateTimer, SIGNAL(timeout()), - this, SLOT(slotUpdateFreeTempSpace()) ); - connect( m_checkCreatePlaylist, SIGNAL(toggled(bool)), this, SIGNAL(changed()) ); - connect( m_checkSingleFile, SIGNAL(toggled(bool)), this, SIGNAL(changed()) ); - connect( m_checkWriteCueFile, SIGNAL(toggled(bool)), this, SIGNAL(changed()) ); - connect( m_comboFileType, SIGNAL(activated(int)), this, SIGNAL(changed()) ); - connect( m_editBaseDir, SIGNAL(textChanged(const QString&)), this, SIGNAL(changed()) ); - connect( m_buttonConfigurePlugin, SIGNAL(clicked()), this, SLOT(slotConfigurePlugin()) ); + connect( m_editBaseDir, TQT_SIGNAL(textChanged(const TQString&)), + this, TQT_SLOT(slotUpdateFreeTempSpace()) ); + connect( m_comboFileType, TQT_SIGNAL(activated(int)), + this, TQT_SLOT(slotEncoderChanged()) ); + connect( &d->freeSpaceUpdateTimer, TQT_SIGNAL(timeout()), + this, TQT_SLOT(slotUpdateFreeTempSpace()) ); + connect( m_checkCreatePlaylist, TQT_SIGNAL(toggled(bool)), this, TQT_SIGNAL(changed()) ); + connect( m_checkSingleFile, TQT_SIGNAL(toggled(bool)), this, TQT_SIGNAL(changed()) ); + connect( m_checkWriteCueFile, TQT_SIGNAL(toggled(bool)), this, TQT_SIGNAL(changed()) ); + connect( m_comboFileType, TQT_SIGNAL(activated(int)), this, TQT_SIGNAL(changed()) ); + connect( m_editBaseDir, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SIGNAL(changed()) ); + connect( m_buttonConfigurePlugin, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotConfigurePlugin()) ); m_editBaseDir->setMode( KFile::Directory | KFile::ExistingOnly | KFile::LocalOnly ); m_buttonConfigurePlugin->setIconSet( SmallIconSet( "gear" ) ); @@ -108,12 +108,12 @@ K3bAudioConvertingOptionWidget::K3bAudioConvertingOptionWidget( QWidget* parent, d->extensionMap[0] = "wav"; // check the available encoding plugins - QPtrList<K3bPlugin> fl = k3bcore->pluginManager()->plugins( "AudioEncoder" ); - for( QPtrListIterator<K3bPlugin> it( fl ); it.current(); ++it ) { + TQPtrList<K3bPlugin> fl = k3bcore->pluginManager()->plugins( "AudioEncoder" ); + for( TQPtrListIterator<K3bPlugin> it( fl ); it.current(); ++it ) { K3bAudioEncoder* f = (K3bAudioEncoder*)it.current(); - QStringList exL = f->extensions(); + TQStringList exL = f->extensions(); - for( QStringList::const_iterator exIt = exL.begin(); + for( TQStringList::const_iterator exIt = exL.begin(); exIt != exL.end(); ++exIt ) { d->extensionMap.insert( m_comboFileType->count(), *exIt ); d->encoderMap.insert( m_comboFileType->count(), f ); @@ -133,13 +133,13 @@ K3bAudioConvertingOptionWidget::~K3bAudioConvertingOptionWidget() } -QString K3bAudioConvertingOptionWidget::baseDir() const +TQString K3bAudioConvertingOptionWidget::baseDir() const { return m_editBaseDir->url(); } -void K3bAudioConvertingOptionWidget::setBaseDir( const QString& path ) +void K3bAudioConvertingOptionWidget::setBaseDir( const TQString& path ) { m_editBaseDir->setURL( path ); } @@ -168,16 +168,16 @@ void K3bAudioConvertingOptionWidget::slotConfigurePlugin() void K3bAudioConvertingOptionWidget::slotUpdateFreeTempSpace() { - QString path = m_editBaseDir->url(); + TQString path = m_editBaseDir->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 ) ) { m_labelFreeSpace->setText( KIO::convertSizeFromKB(avail) ); if( avail < d->neededSize/1024 ) - m_labelNeededSpace->setPaletteForegroundColor( Qt::red ); + m_labelNeededSpace->setPaletteForegroundColor( TQt::red ); else m_labelNeededSpace->setPaletteForegroundColor( paletteForegroundColor() ); } @@ -201,7 +201,7 @@ K3bAudioEncoder* K3bAudioConvertingOptionWidget::encoder() const } -QString K3bAudioConvertingOptionWidget::extension() const +TQString K3bAudioConvertingOptionWidget::extension() const { return d->extensionMap[m_comboFileType->currentItem()]; } @@ -209,7 +209,7 @@ QString K3bAudioConvertingOptionWidget::extension() const void K3bAudioConvertingOptionWidget::loadDefaults() { - m_editBaseDir->setURL( QDir::homeDirPath() ); + m_editBaseDir->setURL( TQDir::homeDirPath() ); m_checkSingleFile->setChecked( false ); m_checkWriteCueFile->setChecked( false ); m_comboFileType->setCurrentItem( d->getDefaultFormat() ); @@ -222,7 +222,7 @@ void K3bAudioConvertingOptionWidget::loadDefaults() void K3bAudioConvertingOptionWidget::loadConfig( KConfigBase* c ) { - m_editBaseDir->setURL( c->readPathEntry( "last ripping directory", QDir::homeDirPath() ) ); + m_editBaseDir->setURL( c->readPathEntry( "last ripping directory", TQDir::homeDirPath() ) ); m_checkSingleFile->setChecked( c->readBoolEntry( "single_file", false ) ); m_checkWriteCueFile->setChecked( c->readBoolEntry( "write_cue_file", false ) ); @@ -230,11 +230,11 @@ void K3bAudioConvertingOptionWidget::loadConfig( KConfigBase* c ) m_checkCreatePlaylist->setChecked( c->readBoolEntry( "create_playlist", false ) ); m_checkPlaylistRelative->setChecked( c->readBoolEntry( "relative_path_in_playlist", false ) ); - QString filetype = c->readEntry( "filetype", d->extensionMap[d->getDefaultFormat()] ); + TQString filetype = c->readEntry( "filetype", d->extensionMap[d->getDefaultFormat()] ); if( filetype == "wav" ) m_comboFileType->setCurrentItem(0); else { - for( QMap<int, QString>::iterator it = d->extensionMap.begin(); + for( TQMap<int, TQString>::iterator it = d->extensionMap.begin(); it != d->extensionMap.end(); ++it ) { if( it.data() == filetype ) { m_comboFileType->setCurrentItem( it.key() ); @@ -257,7 +257,7 @@ void K3bAudioConvertingOptionWidget::saveConfig( KConfigBase* c ) c->writeEntry( "create_playlist", m_checkCreatePlaylist->isChecked() ); c->writeEntry( "relative_path_in_playlist", m_checkPlaylistRelative->isChecked() ); - if( d->extensionMap.contains(m_comboFileType->currentItem()) ) + if( d->extensionMap.tqcontains(m_comboFileType->currentItem()) ) c->writeEntry( "filetype", d->extensionMap[m_comboFileType->currentItem()] ); else c->writeEntry( "filetype", "wav" ); diff --git a/src/rip/k3baudioconvertingoptionwidget.h b/src/rip/k3baudioconvertingoptionwidget.h index ff4cd45..5ef51a7 100644 --- a/src/rip/k3baudioconvertingoptionwidget.h +++ b/src/rip/k3baudioconvertingoptionwidget.h @@ -18,7 +18,7 @@ #include "base_k3baudiorippingoptionwidget.h" -#include <qcheckbox.h> +#include <tqcheckbox.h> #include <kio/global.h> class K3bAudioEncoder; @@ -31,12 +31,13 @@ class KConfigBase; class K3bAudioConvertingOptionWidget : public base_K3bAudioRippingOptionWidget { Q_OBJECT + TQ_OBJECT public: - K3bAudioConvertingOptionWidget( QWidget* parent, const char* name = 0 ); + K3bAudioConvertingOptionWidget( TQWidget* tqparent, const char* name = 0 ); ~K3bAudioConvertingOptionWidget(); - void setBaseDir( const QString& path ); + void setBaseDir( const TQString& path ); void setNeededSize( KIO::filesize_t ); @@ -44,9 +45,9 @@ class K3bAudioConvertingOptionWidget : public base_K3bAudioRippingOptionWidget * @returns 0 if wave is selected */ K3bAudioEncoder* encoder() const; - QString extension() const; + TQString extension() const; - QString baseDir() const; + TQString baseDir() const; bool createPlaylist() const { return m_checkCreatePlaylist->isChecked(); } bool playlistRelativePath() const { return m_checkPlaylistRelative->isChecked(); } diff --git a/src/rip/k3baudioprojectconvertingdialog.cpp b/src/rip/k3baudioprojectconvertingdialog.cpp index 8a3eadc..d0fe302 100644 --- a/src/rip/k3baudioprojectconvertingdialog.cpp +++ b/src/rip/k3baudioprojectconvertingdialog.cpp @@ -41,14 +41,14 @@ #include <kdebug.h> #include <kmessagebox.h> -#include <qgroupbox.h> -#include <qheader.h> -#include <qcheckbox.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qdir.h> -#include <qstringlist.h> -#include <qtabwidget.h> +#include <tqgroupbox.h> +#include <tqheader.h> +#include <tqcheckbox.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqdir.h> +#include <tqstringlist.h> +#include <tqtabwidget.h> @@ -58,16 +58,16 @@ public: Private() { } - QValueVector<QString> filenames; - QString playlistFilename; - QString cueFilename; + TQValueVector<TQString> filenames; + TQString playlistFilename; + TQString cueFilename; }; -K3bAudioProjectConvertingDialog::K3bAudioProjectConvertingDialog( K3bAudioDoc* doc, QWidget *parent, const char *name ) - : K3bInteractionDialog( parent, name, - QString::null, - QString::null, +K3bAudioProjectConvertingDialog::K3bAudioProjectConvertingDialog( K3bAudioDoc* doc, TQWidget *tqparent, const char *name ) + : K3bInteractionDialog( tqparent, name, + TQString(), + TQString(), START_BUTTON|CANCEL_BUTTON, START_BUTTON, "Audio Project Converting" ), // config group @@ -79,7 +79,7 @@ K3bAudioProjectConvertingDialog::K3bAudioProjectConvertingDialog( K3bAudioDoc* d setTitle( i18n("Audio Project Conversion"), i18n("1 track (%1)", "%n tracks (%1)", - m_doc->numOfTracks()).arg(m_doc->length().toString()) ); + m_doc->numOfTracks()).tqarg(m_doc->length().toString()) ); refresh(); } @@ -93,8 +93,8 @@ K3bAudioProjectConvertingDialog::~K3bAudioProjectConvertingDialog() void K3bAudioProjectConvertingDialog::setupGui() { - QWidget *frame = mainWidget(); - QGridLayout* Form1Layout = new QGridLayout( frame ); + TQWidget *frame = mainWidget(); + TQGridLayout* Form1Layout = new TQGridLayout( frame ); Form1Layout->setSpacing( KDialog::spacingHint() ); Form1Layout->setMargin( 0 ); @@ -106,7 +106,7 @@ void K3bAudioProjectConvertingDialog::setupGui() m_viewTracks->setAllColumnsShowFocus(true); m_viewTracks->setFullWidth(true); - QTabWidget* mainTab = new QTabWidget( frame ); + TQTabWidget* mainTab = new TQTabWidget( frame ); m_optionWidget = new K3bAudioConvertingOptionWidget( mainTab ); mainTab->addTab( m_optionWidget, i18n("Settings") ); @@ -116,13 +116,13 @@ void K3bAudioProjectConvertingDialog::setupGui() // ------------------------------------------------------------------------------------------- m_patternWidget = new K3bCddbPatternWidget( mainTab ); mainTab->addTab( m_patternWidget, i18n("File Naming") ); - connect( m_patternWidget, SIGNAL(changed()), this, SLOT(refresh()) ); + connect( m_patternWidget, TQT_SIGNAL(changed()), this, TQT_SLOT(refresh()) ); Form1Layout->addWidget( m_viewTracks, 0, 0 ); Form1Layout->addWidget( mainTab, 1, 0 ); Form1Layout->setRowStretch( 0, 1 ); - connect( m_optionWidget, SIGNAL(changed()), this, SLOT(refresh()) ); + connect( m_optionWidget, TQT_SIGNAL(changed()), this, TQT_SLOT(refresh()) ); } @@ -151,14 +151,14 @@ void K3bAudioProjectConvertingDialog::slotStartClicked() } // check if we need to overwrite some files... - QListViewItemIterator it( m_viewTracks ); - QStringList filesToOverwrite; + TQListViewItemIterator it( m_viewTracks ); + TQStringList filesToOverwrite; for( unsigned int i = 0; i < d->filenames.count(); ++i ) { - if( QFile::exists( d->filenames[i] ) ) + if( TQFile::exists( d->filenames[i] ) ) filesToOverwrite.append( d->filenames[i] ); } - if( m_optionWidget->createPlaylist() && QFile::exists( d->playlistFilename ) ) + if( m_optionWidget->createPlaylist() && TQFile::exists( d->playlistFilename ) ) filesToOverwrite.append( d->playlistFilename ); if( !filesToOverwrite.isEmpty() ) @@ -171,11 +171,11 @@ void K3bAudioProjectConvertingDialog::slotStartClicked() // just generate a fake m_tracks list for now so we can keep most of the methods // like they are in K3bAudioRipThread. This way future combination is easier - QValueVector<QPair<int, QString> > tracksToRip; + TQValueVector<TQPair<int, TQString> > tracksToRip; int i = 0; K3bAudioTrack* track = m_doc->firstTrack(); while( track ) { - tracksToRip.append( qMakePair( i+1, d->filenames[(m_optionWidget->createSingleFile() ? 0 : i)] ) ); + tracksToRip.append( tqMakePair( i+1, d->filenames[(m_optionWidget->createSingleFile() ? 0 : i)] ) ); ++i; track = track->next(); } @@ -194,9 +194,9 @@ void K3bAudioProjectConvertingDialog::slotStartClicked() if( encoder ) thread->setFileType( m_optionWidget->extension() ); - K3bJobProgressDialog progressDialog( parentWidget() ); + K3bJobProgressDialog progressDialog( tqparentWidget() ); - K3bThreadJob job( thread, &progressDialog, this ); + K3bThreadJob job( thread, &progressDialog, TQT_TQOBJECT(this) ); hide(); progressDialog.startJob(&job); @@ -216,14 +216,14 @@ void K3bAudioProjectConvertingDialog::refresh() // create a cddb entry from the doc to use in the patternparser K3bCddbResultEntry cddbEntry = createCddbEntryFromDoc( m_doc ); - QString baseDir = K3b::prepareDir( m_optionWidget->baseDir() ); + TQString baseDir = K3b::prepareDir( m_optionWidget->baseDir() ); - QString extension = m_optionWidget->extension(); + TQString extension = m_optionWidget->extension(); KIO::filesize_t overallSize = 0; if( m_optionWidget->createSingleFile() ) { - QString filename; + TQString filename; long long filesize = 0; if( m_optionWidget->encoder() == 0 ) { filesize = m_doc->length().audioBytes() + 44; @@ -274,7 +274,7 @@ void K3bAudioProjectConvertingDialog::refresh() if( filesize > 0 ) overallSize += filesize; - QString filename = K3bPatternParser::parsePattern( cddbEntry, i, + TQString filename = K3bPatternParser::parsePattern( cddbEntry, i, m_patternWidget->filenamePattern(), m_patternWidget->replaceBlanks(), m_patternWidget->blankReplaceString() ) + "." + extension; @@ -294,7 +294,7 @@ void K3bAudioProjectConvertingDialog::refresh() // create playlist item if( m_optionWidget->createPlaylist() ) { - QString filename = K3bPatternParser::parsePattern( cddbEntry, 1, + TQString filename = K3bPatternParser::parsePattern( cddbEntry, 1, m_patternWidget->playlistPattern(), m_patternWidget->replaceBlanks(), m_patternWidget->blankReplaceString() ) + ".m3u"; @@ -316,7 +316,7 @@ void K3bAudioProjectConvertingDialog::refresh() } -void K3bAudioProjectConvertingDialog::setBaseDir( const QString& path ) +void K3bAudioProjectConvertingDialog::setBaseDir( const TQString& path ) { m_optionWidget->setBaseDir( path ); } diff --git a/src/rip/k3baudioprojectconvertingdialog.h b/src/rip/k3baudioprojectconvertingdialog.h index 1816ea2..f9956ff 100644 --- a/src/rip/k3baudioprojectconvertingdialog.h +++ b/src/rip/k3baudioprojectconvertingdialog.h @@ -20,15 +20,15 @@ #include <k3binteractiondialog.h> #include <k3bmsf.h> -#include <qstringlist.h> +#include <tqstringlist.h> class K3bListView; -class QCheckBox; -class QSpinBox; -class QComboBox; +class TQCheckBox; +class TQSpinBox; +class TQComboBox; class K3bCddbPatternWidget; -class QToolButton; +class TQToolButton; class K3bAudioConvertingOptionWidget; class K3bCddbResultEntry; class K3bAudioConvertingJob; @@ -42,12 +42,13 @@ class K3bAudioDoc; class K3bAudioProjectConvertingDialog : public K3bInteractionDialog { Q_OBJECT + TQ_OBJECT public: - K3bAudioProjectConvertingDialog( K3bAudioDoc*, QWidget *parent = 0, const char *name = 0 ); + K3bAudioProjectConvertingDialog( K3bAudioDoc*, TQWidget *tqparent = 0, const char *name = 0 ); ~K3bAudioProjectConvertingDialog(); - void setBaseDir( const QString& path ); + void setBaseDir( const TQString& path ); public slots: void refresh(); diff --git a/src/rip/k3baudioprojectconvertingthread.cpp b/src/rip/k3baudioprojectconvertingthread.cpp index 8c175fb..6d5cdf5 100644 --- a/src/rip/k3baudioprojectconvertingthread.cpp +++ b/src/rip/k3baudioprojectconvertingthread.cpp @@ -26,8 +26,8 @@ #include <k3bglobals.h> -#include <qfile.h> -#include <qtimer.h> +#include <tqfile.h> +#include <tqtimer.h> #include <kdebug.h> #include <klocale.h> @@ -55,7 +55,7 @@ public: bool canceled; - QString fileType; + TQString fileType; }; @@ -74,7 +74,7 @@ K3bAudioProjectConvertingThread::~K3bAudioProjectConvertingThread() } -void K3bAudioProjectConvertingThread::setFileType( const QString& t ) +void K3bAudioProjectConvertingThread::setFileType( const TQString& t ) { d->fileType = t; } @@ -106,11 +106,11 @@ void K3bAudioProjectConvertingThread::run() d->overallBytesToRead = m_doc->length().audioBytes(); if( m_singleFile ) { - QString& filename = m_tracks[0].second; + TQString& filename = m_tracks[0].second; - QString dir = filename.left( filename.findRev("/") ); + TQString dir = filename.left( filename.tqfindRev("/") ); if( !KStandardDirs::makeDir( dir ) ) { - emitInfoMessage( i18n("Unable to create directory %1").arg(dir), K3bJob::ERROR ); + emitInfoMessage( i18n("Unable to create directory %1").tqarg(dir), K3bJob::ERROR ); emitFinished(false); return; } @@ -126,7 +126,7 @@ void K3bAudioProjectConvertingThread::run() d->encoder->setMetaData( K3bAudioEncoder::META_ALBUM_ARTIST, m_cddbEntry.cdArtist ); d->encoder->setMetaData( K3bAudioEncoder::META_ALBUM_TITLE, m_cddbEntry.cdTitle ); d->encoder->setMetaData( K3bAudioEncoder::META_ALBUM_COMMENT, m_cddbEntry.cdExtInfo ); - d->encoder->setMetaData( K3bAudioEncoder::META_YEAR, QString::number(m_cddbEntry.year) ); + d->encoder->setMetaData( K3bAudioEncoder::META_YEAR, TQString::number(m_cddbEntry.year) ); d->encoder->setMetaData( K3bAudioEncoder::META_GENRE, m_cddbEntry.genre ); } else @@ -137,12 +137,12 @@ void K3bAudioProjectConvertingThread::run() } if( !isOpen ) { - emitInfoMessage( i18n("Unable to open '%1' for writing.").arg(filename), K3bJob::ERROR ); + emitInfoMessage( i18n("Unable to open '%1' for writing.").tqarg(filename), K3bJob::ERROR ); emitFinished(false); return; } - emitInfoMessage( i18n("Converting to single file '%1'.").arg(filename), K3bJob::INFO ); + emitInfoMessage( i18n("Converting to single file '%1'.").tqarg(filename), K3bJob::INFO ); } bool success = true; @@ -155,7 +155,7 @@ void K3bAudioProjectConvertingThread::run() break; } - emitInfoMessage( i18n("Successfully converted track %1.").arg(i+1), K3bJob::INFO ); + emitInfoMessage( i18n("Successfully converted track %1.").tqarg(i+1), K3bJob::INFO ); track = track->next(); ++i; @@ -178,9 +178,9 @@ void K3bAudioProjectConvertingThread::run() if( d->canceled ) { if( d->currentTrackIndex >= 0 && d->currentTrackIndex < (int)m_tracks.count() ) { - if( QFile::exists( m_tracks[d->currentTrackIndex].second ) ) { - QFile::remove( m_tracks[d->currentTrackIndex].second ); - emitInfoMessage( i18n("Removed partial file '%1'.").arg(m_tracks[d->currentTrackIndex].second), K3bJob::INFO ); + if( TQFile::exists( m_tracks[d->currentTrackIndex].second ) ) { + TQFile::remove( m_tracks[d->currentTrackIndex].second ); + emitInfoMessage( i18n("Removed partial file '%1'.").tqarg(m_tracks[d->currentTrackIndex].second), K3bJob::INFO ); } } @@ -192,11 +192,11 @@ void K3bAudioProjectConvertingThread::run() } -bool K3bAudioProjectConvertingThread::convertTrack( K3bAudioTrack* track, const QString& filename ) +bool K3bAudioProjectConvertingThread::convertTrack( K3bAudioTrack* track, const TQString& filename ) { - QString dir = filename.left( filename.findRev("/") ); + TQString dir = filename.left( filename.tqfindRev("/") ); if( !KStandardDirs::makeDir( dir ) ) { - emitInfoMessage( i18n("Unable to create directory %1").arg(dir), K3bJob::ERROR ); + emitInfoMessage( i18n("Unable to create directory %1").tqarg(dir), K3bJob::ERROR ); return false; } @@ -211,11 +211,11 @@ bool K3bAudioProjectConvertingThread::convertTrack( K3bAudioTrack* track, const d->encoder->setMetaData( K3bAudioEncoder::META_TRACK_ARTIST, m_cddbEntry.artists[d->currentTrackIndex] ); d->encoder->setMetaData( K3bAudioEncoder::META_TRACK_TITLE, m_cddbEntry.titles[d->currentTrackIndex] ); d->encoder->setMetaData( K3bAudioEncoder::META_TRACK_COMMENT, m_cddbEntry.extInfos[d->currentTrackIndex] ); - d->encoder->setMetaData( K3bAudioEncoder::META_TRACK_NUMBER, QString::number(d->currentTrackIndex+1).rightJustify( 2, '0' ) ); + d->encoder->setMetaData( K3bAudioEncoder::META_TRACK_NUMBER, TQString::number(d->currentTrackIndex+1).rightJustify( 2, '0' ) ); d->encoder->setMetaData( K3bAudioEncoder::META_ALBUM_ARTIST, m_cddbEntry.cdArtist ); d->encoder->setMetaData( K3bAudioEncoder::META_ALBUM_TITLE, m_cddbEntry.cdTitle ); d->encoder->setMetaData( K3bAudioEncoder::META_ALBUM_COMMENT, m_cddbEntry.cdExtInfo ); - d->encoder->setMetaData( K3bAudioEncoder::META_YEAR, QString::number(m_cddbEntry.year) ); + d->encoder->setMetaData( K3bAudioEncoder::META_YEAR, TQString::number(m_cddbEntry.year) ); d->encoder->setMetaData( K3bAudioEncoder::META_GENRE, m_cddbEntry.genre ); } else @@ -226,7 +226,7 @@ bool K3bAudioProjectConvertingThread::convertTrack( K3bAudioTrack* track, const } if( !isOpen ) { - emitInfoMessage( i18n("Unable to open '%1' for writing.").arg(filename), K3bJob::ERROR ); + emitInfoMessage( i18n("Unable to open '%1' for writing.").tqarg(filename), K3bJob::ERROR ); return false; } } @@ -235,11 +235,11 @@ bool K3bAudioProjectConvertingThread::convertTrack( K3bAudioTrack* track, const if( !m_cddbEntry.artists[d->currentTrackIndex].isEmpty() && !m_cddbEntry.titles[d->currentTrackIndex].isEmpty() ) emitNewSubTask( i18n("Converting track %1 (%2 - %3)") - .arg(d->currentTrackIndex+1) - .arg(m_cddbEntry.artists[d->currentTrackIndex]) - .arg(m_cddbEntry.titles[d->currentTrackIndex]) ); + .tqarg(d->currentTrackIndex+1) + .tqarg(m_cddbEntry.artists[d->currentTrackIndex]) + .tqarg(m_cddbEntry.titles[d->currentTrackIndex]) ); else - emitNewSubTask( i18n("Converting track %1").arg(d->currentTrackIndex+1) ); + emitNewSubTask( i18n("Converting track %1").tqarg(d->currentTrackIndex+1) ); // do the conversion @@ -265,7 +265,7 @@ bool K3bAudioProjectConvertingThread::convertTrack( K3bAudioTrack* track, const if( d->encoder->encode( buffer, readLength ) < 0 ) { kdDebug() << "(K3bAudioProjectConvertingThread) error while encoding." << endl; emitInfoMessage( d->encoder->lastErrorString(), K3bJob::ERROR ); - emitInfoMessage( i18n("Error while encoding track %1.").arg(d->currentTrackIndex+1), K3bJob::ERROR ); + emitInfoMessage( i18n("Error while encoding track %1.").tqarg(d->currentTrackIndex+1), K3bJob::ERROR ); return false; } } @@ -301,18 +301,18 @@ void K3bAudioProjectConvertingThread::cancel() bool K3bAudioProjectConvertingThread::writePlaylist() { // this is an absolut path so there is always a "/" - QString playlistDir = m_playlistFilename.left( m_playlistFilename.findRev( "/" ) ); + TQString playlistDir = m_playlistFilename.left( m_playlistFilename.tqfindRev( "/" ) ); if( !KStandardDirs::makeDir( playlistDir ) ) { - emitInfoMessage( i18n("Unable to create directory %1").arg(playlistDir), K3bJob::ERROR ); + emitInfoMessage( i18n("Unable to create directory %1").tqarg(playlistDir), K3bJob::ERROR ); return false; } - emitInfoMessage( i18n("Writing playlist to %1.").arg( m_playlistFilename ), K3bJob::INFO ); + emitInfoMessage( i18n("Writing playlist to %1.").tqarg( m_playlistFilename ), K3bJob::INFO ); - QFile f( m_playlistFilename ); + TQFile f( m_playlistFilename ); if( f.open( IO_WriteOnly ) ) { - QTextStream t( &f ); + TQTextStream t( &f ); // format descriptor t << "#EXTM3U" << endl; @@ -324,8 +324,8 @@ bool K3bAudioProjectConvertingThread::writePlaylist() if( !m_cddbEntry.cdArtist.isEmpty() && !m_cddbEntry.cdTitle.isEmpty() ) t << m_cddbEntry.cdArtist << " - " << m_cddbEntry.cdTitle << endl; else - t << m_tracks[0].second.mid(m_tracks[0].second.findRev("/") + 1, - m_tracks[0].second.length() - m_tracks[0].second.findRev("/") - 5) + t << m_tracks[0].second.mid(m_tracks[0].second.tqfindRev("/") + 1, + m_tracks[0].second.length() - m_tracks[0].second.tqfindRev("/") - 5) << endl; // filename without extension // filename @@ -345,9 +345,9 @@ bool K3bAudioProjectConvertingThread::writePlaylist() if( !m_cddbEntry.artists[trackIndex].isEmpty() && !m_cddbEntry.titles[trackIndex].isEmpty() ) t << m_cddbEntry.artists[trackIndex] << " - " << m_cddbEntry.titles[trackIndex] << endl; else - t << m_tracks[i].second.mid(m_tracks[i].second.findRev("/") + 1, + t << m_tracks[i].second.mid(m_tracks[i].second.tqfindRev("/") + 1, m_tracks[i].second.length() - - m_tracks[i].second.findRev("/") - 5) + - m_tracks[i].second.tqfindRev("/") - 5) << endl; // filename without extension // filename @@ -359,10 +359,10 @@ bool K3bAudioProjectConvertingThread::writePlaylist() } } - return ( t.device()->status() == IO_Ok ); + return ( t.tqdevice()->status() == IO_Ok ); } else { - emitInfoMessage( i18n("Unable to open '%1' for writing.").arg(m_playlistFilename), K3bJob::ERROR ); + emitInfoMessage( i18n("Unable to open '%1' for writing.").tqarg(m_playlistFilename), K3bJob::ERROR ); kdDebug() << "(K3bAudioProjectConvertingThread) could not open file " << m_playlistFilename << " for writing." << endl; return false; } @@ -401,37 +401,37 @@ bool K3bAudioProjectConvertingThread::writeCueFile() // we always use a relative filename here - QString imageFile = m_tracks[0].second.section( '/', -1 ); - cueWriter.setImage( imageFile, ( d->fileType.isEmpty() ? QString("WAVE") : d->fileType ) ); + TQString imageFile = m_tracks[0].second.section( '/', -1 ); + cueWriter.setImage( imageFile, ( d->fileType.isEmpty() ? TQString("WAVE") : d->fileType ) ); // use the same base name as the image file - QString cueFile = m_tracks[0].second; - cueFile.truncate( cueFile.findRev(".") ); + TQString cueFile = m_tracks[0].second; + cueFile.truncate( cueFile.tqfindRev(".") ); cueFile += ".cue"; - emitInfoMessage( i18n("Writing cue file to %1.").arg(cueFile), K3bJob::INFO ); + emitInfoMessage( i18n("Writing cue file to %1.").tqarg(cueFile), K3bJob::INFO ); return cueWriter.save( cueFile ); } -QString K3bAudioProjectConvertingThread::findRelativePath( const QString& absPath, const QString& baseDir ) +TQString K3bAudioProjectConvertingThread::findRelativePath( const TQString& absPath, const TQString& baseDir ) { - QString baseDir_ = K3b::prepareDir( K3b::fixupPath(baseDir) ); - QString path = K3b::fixupPath( absPath ); + TQString baseDir_ = K3b::prepareDir( K3b::fixupPath(baseDir) ); + TQString path = K3b::fixupPath( absPath ); // both paths have an equal beginning. That's just how it's configured by K3b - int pos = baseDir_.find( "/" ); + int pos = baseDir_.tqfind( "/" ); int oldPos = pos; while( pos != -1 && path.left( pos+1 ) == baseDir_.left( pos+1 ) ) { oldPos = pos; - pos = baseDir_.find( "/", pos+1 ); + pos = baseDir_.tqfind( "/", pos+1 ); } // now the paths are equal up to oldPos, so that's how "deep" we go path = path.mid( oldPos+1 ); baseDir_ = baseDir_.mid( oldPos+1 ); - int numberOfDirs = baseDir_.contains( '/' ); + int numberOfDirs = baseDir_.tqcontains( '/' ); for( int i = 0; i < numberOfDirs; ++i ) path.prepend( "../" ); @@ -439,20 +439,20 @@ QString K3bAudioProjectConvertingThread::findRelativePath( const QString& absPat } -QString K3bAudioProjectConvertingThread::jobDescription() const +TQString K3bAudioProjectConvertingThread::jobDescription() const { if( m_cddbEntry.cdTitle.isEmpty() ) return i18n("Converting Audio Tracks"); else - return i18n("Converting Audio Tracks From '%1'").arg(m_cddbEntry.cdTitle); + return i18n("Converting Audio Tracks From '%1'").tqarg(m_cddbEntry.cdTitle); } -QString K3bAudioProjectConvertingThread::jobDetails() const +TQString K3bAudioProjectConvertingThread::jobDetails() const { if( d->encoder ) return i18n("1 track (encoding to %1)", "%n tracks (encoding to %1)", - m_tracks.count() ).arg(d->encoder->fileTypeComment(d->fileType)); + m_tracks.count() ).tqarg(d->encoder->fileTypeComment(d->fileType)); else return i18n("1 track", "%n tracks", m_doc->numOfTracks() ); } diff --git a/src/rip/k3baudioprojectconvertingthread.h b/src/rip/k3baudioprojectconvertingthread.h index aeda217..63b8895 100644 --- a/src/rip/k3baudioprojectconvertingthread.h +++ b/src/rip/k3baudioprojectconvertingthread.h @@ -18,9 +18,9 @@ #define K3B_AUDIO_PROJECT_CONVERTING_THREAD_H #include <k3bthread.h> -#include <qobject.h> -#include <qvaluevector.h> -#include <qpair.h> +#include <tqobject.h> +#include <tqvaluevector.h> +#include <tqpair.h> #include <k3bcddbresult.h> @@ -36,8 +36,8 @@ class K3bAudioProjectConvertingThread : public K3bThread K3bAudioProjectConvertingThread( K3bAudioDoc* ); ~K3bAudioProjectConvertingThread(); - QString jobDescription() const; - QString jobDetails() const; + TQString jobDescription() const; + TQString jobDetails() const; void setSingleFile( bool b ) { m_singleFile = b; } @@ -49,15 +49,15 @@ class K3bAudioProjectConvertingThread : public K3bThread /** * Used for encoders that support multiple formats */ - void setFileType( const QString& ); + void setFileType( const TQString& ); /** * 1 is the first track */ - void setTracksToRip( const QValueVector<QPair<int, QString> >& t ) { m_tracks = t; } + void setTracksToRip( const TQValueVector<TQPair<int, TQString> >& t ) { m_tracks = t; } void setWritePlaylist( bool b ) { m_writePlaylist = b; } - void setPlaylistFilename( const QString& s ) { m_playlistFilename = s; } + void setPlaylistFilename( const TQString& s ) { m_playlistFilename = s; } void setUseRelativePathInPlaylist( bool b ) { m_relativePathInPlaylist = b; } void setWriteCueFile( bool b ) { m_writeCueFile = b; } @@ -69,28 +69,28 @@ class K3bAudioProjectConvertingThread : public K3bThread void cancel(); private: - /** reimplemented from QThread. Does the work */ + /** reimplemented from TQThread. Does the work */ void run(); - bool convertTrack( K3bAudioTrack*, const QString& filename ); + bool convertTrack( K3bAudioTrack*, const TQString& filename ); bool writePlaylist(); bool writeCueFile(); /** * Finds a relative path from baseDir to absPath */ - QString findRelativePath( const QString& absPath, const QString& baseDir ); + TQString findRelativePath( const TQString& absPath, const TQString& baseDir ); K3bCddbResultEntry m_cddbEntry; bool m_singleFile; bool m_writePlaylist; bool m_relativePathInPlaylist; - QString m_playlistFilename; + TQString m_playlistFilename; bool m_writeCueFile; - QValueVector<QPair<int, QString> > m_tracks; + TQValueVector<TQPair<int, TQString> > m_tracks; K3bAudioDoc* m_doc; diff --git a/src/rip/k3baudioripjob.cpp b/src/rip/k3baudioripjob.cpp index ef520e1..ac53c38 100644 --- a/src/rip/k3baudioripjob.cpp +++ b/src/rip/k3baudioripjob.cpp @@ -23,17 +23,17 @@ #include <klocale.h> -K3bAudioRipJob::K3bAudioRipJob( K3bJobHandler* hdl, QObject* parent ) - : K3bJob( hdl, parent ) +K3bAudioRipJob::K3bAudioRipJob( K3bJobHandler* hdl, TQObject* tqparent ) + : K3bJob( hdl, tqparent ) { m_thread = new K3bAudioRipThread(); m_threadJob = new K3bThreadJob( m_thread, this, this ); connectSubJob( m_threadJob, - SLOT(slotRippingFinished(bool)), - SIGNAL(newTask(const QString&)), - SIGNAL(newSubTask(const QString&)), - SIGNAL(percent(int)), - SIGNAL(subPercent(int)) ); + TQT_SLOT(slotRippingFinished(bool)), + TQT_SIGNAL(newTask(const TQString&)), + TQT_SIGNAL(newSubTask(const TQString&)), + TQT_SIGNAL(percent(int)), + TQT_SIGNAL(subPercent(int)) ); } @@ -42,13 +42,13 @@ K3bAudioRipJob::~K3bAudioRipJob() } -QString K3bAudioRipJob::jobDescription() const +TQString K3bAudioRipJob::jobDescription() const { return m_thread->jobDescription(); } -QString K3bAudioRipJob::jobDetails() const +TQString K3bAudioRipJob::jobDetails() const { return m_thread->jobDetails(); } diff --git a/src/rip/k3baudioripjob.h b/src/rip/k3baudioripjob.h index adf47f3..691af34 100644 --- a/src/rip/k3baudioripjob.h +++ b/src/rip/k3baudioripjob.h @@ -23,7 +23,7 @@ #include <k3bcddbresult.h> #include <k3baudioencoder.h> -#include <qvaluevector.h> +#include <tqvaluevector.h> class K3bInterferingSystemsHandler; class K3bThreadJob; @@ -32,13 +32,14 @@ class K3bThreadJob; class K3bAudioRipJob : public K3bJob { Q_OBJECT + TQ_OBJECT public: - K3bAudioRipJob( K3bJobHandler* hdl, QObject* parent ); + K3bAudioRipJob( K3bJobHandler* hdl, TQObject* tqparent ); ~K3bAudioRipJob(); - QString jobDescription() const; - QString jobDetails() const; + TQString jobDescription() const; + TQString jobDetails() const; public slots: void start(); @@ -46,7 +47,7 @@ class K3bAudioRipJob : public K3bJob void setDevice( K3bDevice::Device* dev ) { m_thread->setDevice( dev ); } void setCddbEntry( const K3bCddbResultEntry& entry ) { m_thread->setCddbEntry( entry ); } - void setTracksToRip( const QValueVector<QPair<int, QString> >& tracksToRip ) { m_thread->setTracksToRip( tracksToRip ); } + void setTracksToRip( const TQValueVector<TQPair<int, TQString> >& tracksToRip ) { m_thread->setTracksToRip( tracksToRip ); } void setParanoiaMode( int mode ) { m_thread->setParanoiaMode( mode ); } void setMaxRetries( int retries ) { m_thread->setMaxRetries( retries ); } void setNeverSkip( bool neverSkip ) { m_thread->setNeverSkip( neverSkip ); } @@ -54,10 +55,10 @@ class K3bAudioRipJob : public K3bJob void setWriteCueFile( bool cue ) { m_thread->setWriteCueFile( cue ); } void setEncoder( K3bAudioEncoder* encoder ) { m_thread->setEncoder( encoder ); } void setWritePlaylist( bool playlist ) { m_thread->setWritePlaylist( playlist ); } - void setPlaylistFilename( const QString& filename ) { m_thread->setPlaylistFilename( filename ); } + void setPlaylistFilename( const TQString& filename ) { m_thread->setPlaylistFilename( filename ); } void setUseRelativePathInPlaylist( bool relative ) { m_thread->setUseRelativePathInPlaylist( relative ); } void setUseIndex0( bool index0 ) { m_thread->setUseIndex0( index0 ); } - void setFileType( const QString& filetype ) { m_thread->setFileType( filetype ); } + void setFileType( const TQString& filetype ) { m_thread->setFileType( filetype ); } private slots: void slotRippingFinished( bool ); diff --git a/src/rip/k3baudiorippingdialog.cpp b/src/rip/k3baudiorippingdialog.cpp index 693230f..1592198 100644 --- a/src/rip/k3baudiorippingdialog.cpp +++ b/src/rip/k3baudiorippingdialog.cpp @@ -43,27 +43,27 @@ #include <kmessagebox.h> #include <kurllabel.h> -#include <qgroupbox.h> -#include <qheader.h> -#include <qcheckbox.h> -#include <qlabel.h> -#include <qpushbutton.h> -#include <qlayout.h> -#include <qvariant.h> -#include <qtooltip.h> -#include <qwhatsthis.h> -#include <qdir.h> -#include <qstringlist.h> -#include <qmessagebox.h> -#include <qfont.h> -#include <qhbox.h> -#include <qtoolbutton.h> -#include <qtabwidget.h> -#include <qspinbox.h> -#include <qptrlist.h> -#include <qintdict.h> -#include <qpair.h> -#include <qvalidator.h> +#include <tqgroupbox.h> +#include <tqheader.h> +#include <tqcheckbox.h> +#include <tqlabel.h> +#include <tqpushbutton.h> +#include <tqlayout.h> +#include <tqvariant.h> +#include <tqtooltip.h> +#include <tqwhatsthis.h> +#include <tqdir.h> +#include <tqstringlist.h> +#include <tqmessagebox.h> +#include <tqfont.h> +#include <tqhbox.h> +#include <tqtoolbutton.h> +#include <tqtabwidget.h> +#include <tqspinbox.h> +#include <tqptrlist.h> +#include <tqintdict.h> +#include <tqpair.h> +#include <tqvalidator.h> class K3bAudioRippingDialog::Private @@ -72,8 +72,8 @@ public: Private() { } - QValueVector<QString> filenames; - QString playlistFilename; + TQValueVector<TQString> filenames; + TQString playlistFilename; K3bFileSystemInfo fsInfo; }; @@ -81,11 +81,11 @@ public: K3bAudioRippingDialog::K3bAudioRippingDialog(const K3bDevice::Toc& toc, K3bDevice::Device* device, const K3bCddbResultEntry& entry, - const QValueList<int>& tracks, - QWidget *parent, const char *name ) - : K3bInteractionDialog( parent, name, - QString::null, - QString::null, + const TQValueList<int>& tracks, + TQWidget *tqparent, const char *name ) + : K3bInteractionDialog( tqparent, name, + TQString(), + TQString(), START_BUTTON|CANCEL_BUTTON, START_BUTTON, "Audio Ripping" ), // config group @@ -100,13 +100,13 @@ K3bAudioRippingDialog::K3bAudioRippingDialog(const K3bDevice::Toc& toc, setupContextHelp(); K3b::Msf length; - for( QValueList<int>::const_iterator it = m_trackNumbers.begin(); + for( TQValueList<int>::const_iterator it = m_trackNumbers.begin(); it != m_trackNumbers.end(); ++it ) { length += m_toc[*it-1].length(); } setTitle( i18n("CD Ripping"), i18n("1 track (%1)", "%n tracks (%1)", - m_trackNumbers.count()).arg(length.toString()) ); + m_trackNumbers.count()).tqarg(length.toString()) ); } @@ -118,8 +118,8 @@ K3bAudioRippingDialog::~K3bAudioRippingDialog() void K3bAudioRippingDialog::setupGui() { - QWidget *frame = mainWidget(); - QGridLayout* Form1Layout = new QGridLayout( frame ); + TQWidget *frame = mainWidget(); + TQGridLayout* Form1Layout = new TQGridLayout( frame ); Form1Layout->setSpacing( KDialog::spacingHint() ); Form1Layout->setMargin( 0 ); @@ -132,7 +132,7 @@ void K3bAudioRippingDialog::setupGui() m_viewTracks->setAllColumnsShowFocus(true); m_viewTracks->setFullWidth(true); - QTabWidget* mainTab = new QTabWidget( frame ); + TQTabWidget* mainTab = new TQTabWidget( frame ); m_optionWidget = new K3bAudioConvertingOptionWidget( mainTab ); mainTab->addTab( m_optionWidget, i18n("Settings") ); @@ -142,25 +142,25 @@ void K3bAudioRippingDialog::setupGui() // ------------------------------------------------------------------------------------------- m_patternWidget = new K3bCddbPatternWidget( mainTab ); mainTab->addTab( m_patternWidget, i18n("File Naming") ); - connect( m_patternWidget, SIGNAL(changed()), this, SLOT(refresh()) ); + connect( m_patternWidget, TQT_SIGNAL(changed()), this, TQT_SLOT(refresh()) ); // setup advanced page // ------------------------------------------------------------------------------------------- - QWidget* advancedPage = new QWidget( mainTab ); - QGridLayout* advancedPageLayout = new QGridLayout( advancedPage ); + TQWidget* advancedPage = new TQWidget( mainTab ); + TQGridLayout* advancedPageLayout = new TQGridLayout( advancedPage ); advancedPageLayout->setMargin( marginHint() ); advancedPageLayout->setSpacing( spacingHint() ); mainTab->addTab( advancedPage, i18n("Advanced") ); m_comboParanoiaMode = K3bStdGuiItems::paranoiaModeComboBox( advancedPage ); - m_spinRetries = new QSpinBox( advancedPage ); - m_checkIgnoreReadErrors = new QCheckBox( i18n("Ignore read errors"), advancedPage ); - m_checkUseIndex0 = new QCheckBox( i18n("Don't read pregaps"), advancedPage ); + m_spinRetries = new TQSpinBox( advancedPage ); + m_checkIgnoreReadErrors = new TQCheckBox( i18n("Ignore read errors"), advancedPage ); + m_checkUseIndex0 = new TQCheckBox( i18n("Don't read pregaps"), advancedPage ); - advancedPageLayout->addWidget( new QLabel( i18n("Paranoia mode:"), advancedPage ), 0, 0 ); + advancedPageLayout->addWidget( new TQLabel( i18n("Paranoia mode:"), advancedPage ), 0, 0 ); advancedPageLayout->addWidget( m_comboParanoiaMode, 0, 1 ); - advancedPageLayout->addWidget( new QLabel( i18n("Read retries:"), advancedPage ), 1, 0 ); + advancedPageLayout->addWidget( new TQLabel( i18n("Read retries:"), advancedPage ), 1, 0 ); advancedPageLayout->addWidget( m_spinRetries, 1, 1 ); advancedPageLayout->addMultiCellWidget( m_checkIgnoreReadErrors, 2, 2, 0, 1 ); advancedPageLayout->addMultiCellWidget( m_checkUseIndex0, 3, 3, 0, 1 ); @@ -176,20 +176,20 @@ void K3bAudioRippingDialog::setupGui() setStartButtonText( i18n( "Start Ripping" ), i18n( "Starts copying the selected tracks") ); - connect( m_checkUseIndex0, SIGNAL(toggled(bool)), this, SLOT(refresh()) ); - connect( m_optionWidget, SIGNAL(changed()), this, SLOT(refresh()) ); + connect( m_checkUseIndex0, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(refresh()) ); + connect( m_optionWidget, TQT_SIGNAL(changed()), this, TQT_SLOT(refresh()) ); } void K3bAudioRippingDialog::setupContextHelp() { - QToolTip::add( m_spinRetries, i18n("Maximal number of read retries") ); - QWhatsThis::add( m_spinRetries, i18n("<p>This specifies the maximum number of retries to " + TQToolTip::add( m_spinRetries, i18n("Maximal number of read retries") ); + TQWhatsThis::add( m_spinRetries, i18n("<p>This specifies the maximum number of retries to " "read a sector of audio data from the cd. After that " "K3b will either skip the sector if the <em>Ignore Read Errors</em> " "option is enabled or stop the process.") ); - QToolTip::add( m_checkUseIndex0, i18n("Do not read the pregaps at the end of every track") ); - QWhatsThis::add( m_checkUseIndex0, i18n("<p>If this option is checked K3b will not rip the audio " + TQToolTip::add( m_checkUseIndex0, i18n("Do not read the pregaps at the end of every track") ); + TQWhatsThis::add( m_checkUseIndex0, i18n("<p>If this option is checked K3b will not rip the audio " "data in the pregaps. Most audio tracks contain an empty " "pregap which does not belong to the track itself.</p>" "<p>Although the default behaviour of nearly all ripping " @@ -227,14 +227,14 @@ void K3bAudioRippingDialog::slotStartClicked() } // check if we need to overwrite some files... - QListViewItemIterator it( m_viewTracks ); - QStringList filesToOverwrite; + TQListViewItemIterator it( m_viewTracks ); + TQStringList filesToOverwrite; for( unsigned int i = 0; i < d->filenames.count(); ++i ) { - if( QFile::exists( d->filenames[i] ) ) + if( TQFile::exists( d->filenames[i] ) ) filesToOverwrite.append( d->filenames[i] ); } - if( m_optionWidget->createPlaylist() && QFile::exists( d->playlistFilename ) ) + if( m_optionWidget->createPlaylist() && TQFile::exists( d->playlistFilename ) ) filesToOverwrite.append( d->playlistFilename ); if( !filesToOverwrite.isEmpty() ) @@ -246,18 +246,18 @@ void K3bAudioRippingDialog::slotStartClicked() // prepare list of tracks to rip - QValueVector<QPair<int, QString> > tracksToRip; + TQValueVector<TQPair<int, TQString> > tracksToRip; unsigned int i = 0; - for( QValueList<int>::const_iterator trackIt = m_trackNumbers.begin(); + for( TQValueList<int>::const_iterator trackIt = m_trackNumbers.begin(); trackIt != m_trackNumbers.end(); ++trackIt ) { - tracksToRip.append( qMakePair( *trackIt, d->filenames[(m_optionWidget->createSingleFile() ? 0 : i)] ) ); + tracksToRip.append( tqMakePair( *trackIt, d->filenames[(m_optionWidget->createSingleFile() ? 0 : i)] ) ); ++i; } - K3bJobProgressDialog ripDialog( parentWidget(), "Ripping" ); + K3bJobProgressDialog ripDialog( tqparentWidget(), "Ripping" ); K3bAudioEncoder* encoder = m_optionWidget->encoder(); - K3bAudioRipJob* job = new K3bAudioRipJob( &ripDialog, this ); + K3bAudioRipJob* job = new K3bAudioRipJob( &ripDialog, TQT_TQOBJECT(this) ); job->setDevice( m_device ); job->setCddbEntry( m_cddbEntry ); job->setTracksToRip( tracksToRip ); @@ -289,22 +289,22 @@ void K3bAudioRippingDialog::refresh() m_viewTracks->clear(); d->filenames.clear(); - QString baseDir = K3b::prepareDir( m_optionWidget->baseDir() ); + TQString baseDir = K3b::prepareDir( m_optionWidget->baseDir() ); d->fsInfo.setPath( baseDir ); KIO::filesize_t overallSize = 0; if( m_optionWidget->createSingleFile() ) { long length = 0; - for( QValueList<int>::const_iterator it = m_trackNumbers.begin(); + for( TQValueList<int>::const_iterator it = m_trackNumbers.begin(); it != m_trackNumbers.end(); ++it ) { length += ( m_checkUseIndex0->isChecked() ? m_toc[*it-1].realAudioLength().lba() : m_toc[*it-1].length().lba() ); } - QString filename; - QString extension; + TQString filename; + TQString extension; long long fileSize = 0; if( m_optionWidget->encoder() == 0 ) { extension = "wav"; @@ -347,11 +347,11 @@ void K3bAudioRippingDialog::refresh() i18n("Cue-file") ); } else { - for( QValueList<int>::const_iterator it = m_trackNumbers.begin(); + for( TQValueList<int>::const_iterator it = m_trackNumbers.begin(); it != m_trackNumbers.end(); ++it ) { int index = *it - 1; - QString extension; + TQString extension; long long fileSize = 0; K3b::Msf trackLength = ( m_checkUseIndex0->isChecked() ? m_toc[index].realAudioLength() @@ -374,7 +374,7 @@ void K3bAudioRippingDialog::refresh() } - QString filename; + TQString filename; if( (int)m_cddbEntry.titles.count() >= *it ) { filename = K3bPatternParser::parsePattern( m_cddbEntry, *it, @@ -383,7 +383,7 @@ void K3bAudioRippingDialog::refresh() m_patternWidget->blankReplaceString() ) + "." + extension; } else { - filename = i18n("Track%1").arg( QString::number( *it ).rightJustify( 2, '0' ) ) + "." + extension; + filename = i18n("Track%1").tqarg( TQString::number( *it ).rightJustify( 2, '0' ) ) + "." + extension; } filename = d->fsInfo.fixupPath( filename ); @@ -401,7 +401,7 @@ void K3bAudioRippingDialog::refresh() // create playlist item if( m_optionWidget->createPlaylist() ) { - QString filename = K3bPatternParser::parsePattern( m_cddbEntry, 1, + TQString filename = K3bPatternParser::parsePattern( m_cddbEntry, 1, m_patternWidget->playlistPattern(), m_patternWidget->replaceBlanks(), m_patternWidget->blankReplaceString() ) + ".m3u"; @@ -423,7 +423,7 @@ void K3bAudioRippingDialog::refresh() } -void K3bAudioRippingDialog::setStaticDir( const QString& path ) +void K3bAudioRippingDialog::setStaticDir( const TQString& path ) { m_optionWidget->setBaseDir( path ); } diff --git a/src/rip/k3baudiorippingdialog.h b/src/rip/k3baudiorippingdialog.h index 83fe0dc..2a0304b 100644 --- a/src/rip/k3baudiorippingdialog.h +++ b/src/rip/k3baudiorippingdialog.h @@ -19,7 +19,7 @@ #include <k3binteractiondialog.h> -#include <qstringlist.h> +#include <tqstringlist.h> #include <k3bcddbquery.h> @@ -30,11 +30,11 @@ namespace K3bDevice { class KListView; -class QCheckBox; -class QSpinBox; -class QComboBox; +class TQCheckBox; +class TQSpinBox; +class TQComboBox; class K3bCddbPatternWidget; -class QToolButton; +class TQToolButton; class K3bAudioConvertingOptionWidget; @@ -44,16 +44,17 @@ class K3bAudioConvertingOptionWidget; class K3bAudioRippingDialog : public K3bInteractionDialog { Q_OBJECT + TQ_OBJECT public: K3bAudioRippingDialog( const K3bDevice::Toc&, K3bDevice::Device*, const K3bCddbResultEntry&, - const QValueList<int>&, - QWidget *parent = 0, const char *name = 0 ); + const TQValueList<int>&, + TQWidget *tqparent = 0, const char *name = 0 ); ~K3bAudioRippingDialog(); - void setStaticDir( const QString& path ); + void setStaticDir( const TQString& path ); public slots: void refresh(); @@ -63,14 +64,14 @@ class K3bAudioRippingDialog : public K3bInteractionDialog K3bDevice::Toc m_toc; K3bDevice::Device* m_device; K3bCddbResultEntry m_cddbEntry; - QValueList<int> m_trackNumbers; + TQValueList<int> m_trackNumbers; KListView* m_viewTracks; - QComboBox* m_comboParanoiaMode; - QSpinBox* m_spinRetries; - QCheckBox* m_checkIgnoreReadErrors; - QCheckBox* m_checkUseIndex0; + TQComboBox* m_comboParanoiaMode; + TQSpinBox* m_spinRetries; + TQCheckBox* m_checkIgnoreReadErrors; + TQCheckBox* m_checkUseIndex0; K3bCddbPatternWidget* m_patternWidget; K3bAudioConvertingOptionWidget* m_optionWidget; diff --git a/src/rip/k3baudioripthread.cpp b/src/rip/k3baudioripthread.cpp index 8a5a6e9..48e8780 100644 --- a/src/rip/k3baudioripthread.cpp +++ b/src/rip/k3baudioripthread.cpp @@ -30,9 +30,9 @@ #include <k3btrack.h> #include <k3bglobals.h> -#include <qfile.h> -#include <qfileinfo.h> -#include <qtimer.h> +#include <tqfile.h> +#include <tqfileinfo.h> +#include <tqtimer.h> #include <kdebug.h> #include <klocale.h> @@ -71,12 +71,12 @@ public: K3bDevice::Toc toc; - QString fileType; + TQString fileType; }; K3bAudioRipThread::K3bAudioRipThread() - : QObject(), + : TQObject(), K3bThread(), m_device(0), m_useIndex0(false) @@ -93,7 +93,7 @@ K3bAudioRipThread::~K3bAudioRipThread() } -void K3bAudioRipThread::setFileType( const QString& t ) +void K3bAudioRipThread::setFileType( const TQString& t ) { d->fileType = t; } @@ -150,15 +150,15 @@ void K3bAudioRipThread::run() d->toc = m_device->readToc(); if( !d->paranoiaLib->initParanoia( m_device, d->toc ) ) { - emitInfoMessage( i18n("Could not open device %1").arg(m_device->blockDeviceName()), + emitInfoMessage( i18n("Could not open device %1").tqarg(m_device->blockDeviceName()), K3bJob::ERROR ); m_device->block(false); // check if we have write access to the generic device if( m_device->interfaceType() == K3bDevice::SCSI && !m_device->genericDevice().isEmpty() && - !QFileInfo( m_device->genericDevice() ).isWritable() ) - emitInfoMessage( i18n("You need write access to %1").arg( m_device->genericDevice() ), K3bJob::ERROR ); + !TQFileInfo( m_device->genericDevice() ).isWritable() ) + emitInfoMessage( i18n("You need write access to %1").tqarg( m_device->genericDevice() ), K3bJob::ERROR ); emitFinished(false); return; @@ -192,12 +192,12 @@ void K3bAudioRipThread::run() if( m_singleFile ) { - QString& filename = m_tracks[0].second; + TQString& filename = m_tracks[0].second; - QString dir = filename.left( filename.findRev("/") ); + TQString dir = filename.left( filename.tqfindRev("/") ); if( !KStandardDirs::makeDir( dir, 0777 ) ) { d->paranoiaLib->close(); - emitInfoMessage( i18n("Unable to create directory %1").arg(dir), K3bJob::ERROR ); + emitInfoMessage( i18n("Unable to create directory %1").tqarg(dir), K3bJob::ERROR ); m_device->block(false); emitFinished(false); return; @@ -214,7 +214,7 @@ void K3bAudioRipThread::run() d->encoder->setMetaData( K3bAudioEncoder::META_ALBUM_ARTIST, m_cddbEntry.cdArtist ); d->encoder->setMetaData( K3bAudioEncoder::META_ALBUM_TITLE, m_cddbEntry.cdTitle ); d->encoder->setMetaData( K3bAudioEncoder::META_ALBUM_COMMENT, m_cddbEntry.cdExtInfo ); - d->encoder->setMetaData( K3bAudioEncoder::META_YEAR, QString::number(m_cddbEntry.year) ); + d->encoder->setMetaData( K3bAudioEncoder::META_YEAR, TQString::number(m_cddbEntry.year) ); d->encoder->setMetaData( K3bAudioEncoder::META_GENRE, m_cddbEntry.genre ); } else @@ -226,13 +226,13 @@ void K3bAudioRipThread::run() if( !isOpen ) { d->paranoiaLib->close(); - emitInfoMessage( i18n("Unable to open '%1' for writing.").arg(filename), K3bJob::ERROR ); + emitInfoMessage( i18n("Unable to open '%1' for writing.").tqarg(filename), K3bJob::ERROR ); m_device->block(false); emitFinished(false); return; } - emitInfoMessage( i18n("Ripping to single file '%1'.").arg(filename), K3bJob::INFO ); + emitInfoMessage( i18n("Ripping to single file '%1'.").tqarg(filename), K3bJob::INFO ); } emitInfoMessage( i18n("Starting digital audio extraction (ripping)."), K3bJob::INFO ); @@ -253,8 +253,8 @@ void K3bAudioRipThread::run() d->waveFileWriter->close(); if( success && !d->canceled ) { - QString& filename = m_tracks[0].second; - emitInfoMessage( i18n("Successfully ripped to %2.").arg(filename), K3bJob::INFO ); + TQString& filename = m_tracks[0].second; + emitInfoMessage( i18n("Successfully ripped to %2.").tqarg(filename), K3bJob::INFO ); } } @@ -286,7 +286,7 @@ void K3bAudioRipThread::run() } -bool K3bAudioRipThread::ripTrack( int track, const QString& filename ) +bool K3bAudioRipThread::ripTrack( int track, const TQString& filename ) { const K3bTrack& tt = d->toc[track-1]; @@ -298,9 +298,9 @@ bool K3bAudioRipThread::ripTrack( int track, const QString& filename ) long trackSectorsRead = 0; - QString dir = filename.left( filename.findRev("/") ); + TQString dir = filename.left( filename.tqfindRev("/") ); if( !KStandardDirs::makeDir( dir, 0777 ) ) { - emitInfoMessage( i18n("Unable to create directory %1").arg(dir), K3bJob::ERROR ); + emitInfoMessage( i18n("Unable to create directory %1").tqarg(dir), K3bJob::ERROR ); return false; } @@ -315,11 +315,11 @@ bool K3bAudioRipThread::ripTrack( int track, const QString& filename ) d->encoder->setMetaData( K3bAudioEncoder::META_TRACK_ARTIST, m_cddbEntry.artists[track-1] ); d->encoder->setMetaData( K3bAudioEncoder::META_TRACK_TITLE, m_cddbEntry.titles[track-1] ); d->encoder->setMetaData( K3bAudioEncoder::META_TRACK_COMMENT, m_cddbEntry.extInfos[track-1] ); - d->encoder->setMetaData( K3bAudioEncoder::META_TRACK_NUMBER, QString::number(track).rightJustify( 2, '0' ) ); + d->encoder->setMetaData( K3bAudioEncoder::META_TRACK_NUMBER, TQString::number(track).rightJustify( 2, '0' ) ); d->encoder->setMetaData( K3bAudioEncoder::META_ALBUM_ARTIST, m_cddbEntry.cdArtist ); d->encoder->setMetaData( K3bAudioEncoder::META_ALBUM_TITLE, m_cddbEntry.cdTitle ); d->encoder->setMetaData( K3bAudioEncoder::META_ALBUM_COMMENT, m_cddbEntry.cdExtInfo ); - d->encoder->setMetaData( K3bAudioEncoder::META_YEAR, QString::number(m_cddbEntry.year) ); + d->encoder->setMetaData( K3bAudioEncoder::META_YEAR, TQString::number(m_cddbEntry.year) ); d->encoder->setMetaData( K3bAudioEncoder::META_GENRE, m_cddbEntry.genre ); } else @@ -330,16 +330,16 @@ bool K3bAudioRipThread::ripTrack( int track, const QString& filename ) } if( !isOpen ) { - emitInfoMessage( i18n("Unable to open '%1' for writing.").arg(filename), K3bJob::ERROR ); + emitInfoMessage( i18n("Unable to open '%1' for writing.").tqarg(filename), K3bJob::ERROR ); return false; } } if( !m_cddbEntry.artists[track-1].isEmpty() && !m_cddbEntry.titles[track-1].isEmpty() ) - emitNewSubTask( i18n("Ripping track %1 (%2 - %3)").arg(track).arg(m_cddbEntry.artists[track-1]).arg(m_cddbEntry.titles[track-1]) ); + emitNewSubTask( i18n("Ripping track %1 (%2 - %3)").tqarg(track).tqarg(m_cddbEntry.artists[track-1]).tqarg(m_cddbEntry.titles[track-1]) ); else - emitNewSubTask( i18n("Ripping track %1").arg(track) ); + emitNewSubTask( i18n("Ripping track %1").tqarg(track) ); int status; while( 1 ) { @@ -352,9 +352,9 @@ bool K3bAudioRipThread::ripTrack( int track, const QString& filename ) if( status == K3bCdparanoiaLib::S_OK ) { if( buf == 0 ) { if( m_singleFile ) - emitInfoMessage( i18n("Successfully ripped track %1.").arg(track), K3bJob::INFO ); + emitInfoMessage( i18n("Successfully ripped track %1.").tqarg(track), K3bJob::INFO ); else - emitInfoMessage( i18n("Successfully ripped track %1 to %2.").arg(track).arg(filename), K3bJob::INFO ); + emitInfoMessage( i18n("Successfully ripped track %1 to %2.").tqarg(track).tqarg(filename), K3bJob::INFO ); if( !m_singleFile ) { if( d->encoder ) @@ -371,7 +371,7 @@ bool K3bAudioRipThread::ripTrack( int track, const QString& filename ) CD_FRAMESIZE_RAW ) < 0 ) { kdDebug() << "(K3bAudioRipThread) error while encoding." << endl; emitInfoMessage( d->encoder->lastErrorString(), K3bJob::ERROR ); - emitInfoMessage( i18n("Error while encoding track %1.").arg(track), K3bJob::ERROR ); + emitInfoMessage( i18n("Error while encoding track %1.").tqarg(track), K3bJob::ERROR ); return false; } } @@ -387,7 +387,7 @@ bool K3bAudioRipThread::ripTrack( int track, const QString& filename ) } } else { - emitInfoMessage( i18n("Unrecoverable error while ripping track %1.").arg(track), K3bJob::ERROR ); + emitInfoMessage( i18n("Unrecoverable error while ripping track %1.").tqarg(track), K3bJob::ERROR ); return false; } } @@ -409,7 +409,7 @@ void K3bAudioRipThread::cancel() // wait for 1 second. I the thread still is working terminate it // and trigger the finished slot manually emitInfoMessage( i18n("Cancellation could take a while..."), K3bJob::INFO ); - QTimer::singleShot( 1000, this, SLOT(slotCheckIfThreadStillRunning()) ); + TQTimer::singleShot( 1000, this, TQT_SLOT(slotCheckIfThreadStillRunning()) ); } @@ -433,9 +433,9 @@ void K3bAudioRipThread::slotCheckIfThreadStillRunning() void K3bAudioRipThread::cleanupAfterCancellation() { if( d->currentTrackIndex >= 0 && d->currentTrackIndex < (int)m_tracks.count() ) { - if( QFile::exists( m_tracks[d->currentTrackIndex].second ) ) { - QFile::remove( m_tracks[d->currentTrackIndex].second ); - emitInfoMessage( i18n("Removed partial file '%1'.").arg(m_tracks[d->currentTrackIndex].second), K3bJob::INFO ); + if( TQFile::exists( m_tracks[d->currentTrackIndex].second ) ) { + TQFile::remove( m_tracks[d->currentTrackIndex].second ); + emitInfoMessage( i18n("Removed partial file '%1'.").tqarg(m_tracks[d->currentTrackIndex].second), K3bJob::INFO ); } } } @@ -444,18 +444,18 @@ void K3bAudioRipThread::cleanupAfterCancellation() bool K3bAudioRipThread::writePlaylist() { // this is an absolut path so there is always a "/" - QString playlistDir = m_playlistFilename.left( m_playlistFilename.findRev( "/" ) ); + TQString playlistDir = m_playlistFilename.left( m_playlistFilename.tqfindRev( "/" ) ); if( !KStandardDirs::makeDir( playlistDir ) ) { - emitInfoMessage( i18n("Unable to create directory %1").arg(playlistDir), K3bJob::ERROR ); + emitInfoMessage( i18n("Unable to create directory %1").tqarg(playlistDir), K3bJob::ERROR ); return false; } - emitInfoMessage( i18n("Writing playlist to %1.").arg( m_playlistFilename ), K3bJob::INFO ); + emitInfoMessage( i18n("Writing playlist to %1.").tqarg( m_playlistFilename ), K3bJob::INFO ); - QFile f( m_playlistFilename ); + TQFile f( m_playlistFilename ); if( f.open( IO_WriteOnly ) ) { - QTextStream t( &f ); + TQTextStream t( &f ); // format descriptor t << "#EXTM3U" << endl; @@ -467,8 +467,8 @@ bool K3bAudioRipThread::writePlaylist() if( !m_cddbEntry.cdArtist.isEmpty() && !m_cddbEntry.cdTitle.isEmpty() ) t << m_cddbEntry.cdArtist << " - " << m_cddbEntry.cdTitle << endl; else - t << m_tracks[0].second.mid(m_tracks[0].second.findRev("/") + 1, - m_tracks[0].second.length() - m_tracks[0].second.findRev("/") - 5) + t << m_tracks[0].second.mid(m_tracks[0].second.tqfindRev("/") + 1, + m_tracks[0].second.length() - m_tracks[0].second.tqfindRev("/") - 5) << endl; // filename without extension // filename @@ -488,9 +488,9 @@ bool K3bAudioRipThread::writePlaylist() if( !m_cddbEntry.artists[trackIndex].isEmpty() && !m_cddbEntry.titles[trackIndex].isEmpty() ) t << m_cddbEntry.artists[trackIndex] << " - " << m_cddbEntry.titles[trackIndex] << endl; else - t << m_tracks[i].second.mid(m_tracks[i].second.findRev("/") + 1, + t << m_tracks[i].second.mid(m_tracks[i].second.tqfindRev("/") + 1, m_tracks[i].second.length() - - m_tracks[i].second.findRev("/") - 5) + - m_tracks[i].second.tqfindRev("/") - 5) << endl; // filename without extension // filename @@ -502,10 +502,10 @@ bool K3bAudioRipThread::writePlaylist() } } - return ( t.device()->status() == IO_Ok ); + return ( t.tqdevice()->status() == IO_Ok ); } else { - emitInfoMessage( i18n("Unable to open '%1' for writing.").arg(m_playlistFilename), K3bJob::ERROR ); + emitInfoMessage( i18n("Unable to open '%1' for writing.").tqarg(m_playlistFilename), K3bJob::ERROR ); kdDebug() << "(K3bAudioRipThread) could not open file " << m_playlistFilename << " for writing." << endl; return false; } @@ -543,37 +543,37 @@ bool K3bAudioRipThread::writeCueFile() // we always use a relative filename here - QString imageFile = m_tracks[0].second.section( '/', -1 ); - cueWriter.setImage( imageFile, ( d->fileType.isEmpty() ? QString("WAVE") : d->fileType ) ); + TQString imageFile = m_tracks[0].second.section( '/', -1 ); + cueWriter.setImage( imageFile, ( d->fileType.isEmpty() ? TQString("WAVE") : d->fileType ) ); // use the same base name as the image file - QString cueFile = m_tracks[0].second; - cueFile.truncate( cueFile.findRev(".") ); + TQString cueFile = m_tracks[0].second; + cueFile.truncate( cueFile.tqfindRev(".") ); cueFile += ".cue"; - emitInfoMessage( i18n("Writing cue file to %1.").arg(cueFile), K3bJob::INFO ); + emitInfoMessage( i18n("Writing cue file to %1.").tqarg(cueFile), K3bJob::INFO ); return cueWriter.save( cueFile ); } -QString K3bAudioRipThread::findRelativePath( const QString& absPath, const QString& baseDir ) +TQString K3bAudioRipThread::findRelativePath( const TQString& absPath, const TQString& baseDir ) { - QString baseDir_ = K3b::prepareDir( K3b::fixupPath(baseDir) ); - QString path = K3b::fixupPath( absPath ); + TQString baseDir_ = K3b::prepareDir( K3b::fixupPath(baseDir) ); + TQString path = K3b::fixupPath( absPath ); // both paths have an equal beginning. That's just how it's configured by K3b - int pos = baseDir_.find( "/" ); + int pos = baseDir_.tqfind( "/" ); int oldPos = pos; while( pos != -1 && path.left( pos+1 ) == baseDir_.left( pos+1 ) ) { oldPos = pos; - pos = baseDir_.find( "/", pos+1 ); + pos = baseDir_.tqfind( "/", pos+1 ); } // now the paths are equal up to oldPos, so that's how "deep" we go path = path.mid( oldPos+1 ); baseDir_ = baseDir_.mid( oldPos+1 ); - int numberOfDirs = baseDir_.contains( '/' ); + int numberOfDirs = baseDir_.tqcontains( '/' ); for( int i = 0; i < numberOfDirs; ++i ) path.prepend( "../" ); @@ -581,20 +581,20 @@ QString K3bAudioRipThread::findRelativePath( const QString& absPath, const QStri } -QString K3bAudioRipThread::jobDescription() const +TQString K3bAudioRipThread::jobDescription() const { if( m_cddbEntry.cdTitle.isEmpty() ) return i18n("Ripping Audio Tracks"); else - return i18n("Ripping Audio Tracks From '%1'").arg(m_cddbEntry.cdTitle); + return i18n("Ripping Audio Tracks From '%1'").tqarg(m_cddbEntry.cdTitle); } -QString K3bAudioRipThread::jobDetails() const +TQString K3bAudioRipThread::jobDetails() const { if( d->encoder ) return i18n("1 track (encoding to %1)", "%n tracks (encoding to %1)", - m_tracks.count() ).arg(d->encoder->fileTypeComment(d->fileType)); + m_tracks.count() ).tqarg(d->encoder->fileTypeComment(d->fileType)); else return i18n("1 track", "%n tracks", m_tracks.count() ); } diff --git a/src/rip/k3baudioripthread.h b/src/rip/k3baudioripthread.h index 93d600f..cb3ce53 100644 --- a/src/rip/k3baudioripthread.h +++ b/src/rip/k3baudioripthread.h @@ -18,9 +18,9 @@ #define K3B_AUDIO_RIP_THREAD_H #include <k3bthread.h> -#include <qobject.h> -#include <qvaluevector.h> -#include <qpair.h> +#include <tqobject.h> +#include <tqvaluevector.h> +#include <tqpair.h> #include <k3bcddbquery.h> @@ -32,16 +32,17 @@ namespace K3bDevice { } -class K3bAudioRipThread : public QObject, public K3bThread +class K3bAudioRipThread : public TQObject, public K3bThread { Q_OBJECT + TQ_OBJECT public: K3bAudioRipThread(); ~K3bAudioRipThread(); - QString jobDescription() const; - QString jobDetails() const; + TQString jobDescription() const; + TQString jobDetails() const; // paranoia settings void setParanoiaMode( int mode ); @@ -62,15 +63,15 @@ class K3bAudioRipThread : public QObject, public K3bThread /** * Used for encoders that support multiple formats */ - void setFileType( const QString& ); + void setFileType( const TQString& ); /** * 1 is the first track */ - void setTracksToRip( const QValueVector<QPair<int, QString> >& t ) { m_tracks = t; } + void setTracksToRip( const TQValueVector<TQPair<int, TQString> >& t ) { m_tracks = t; } void setWritePlaylist( bool b ) { m_writePlaylist = b; } - void setPlaylistFilename( const QString& s ) { m_playlistFilename = s; } + void setPlaylistFilename( const TQString& s ) { m_playlistFilename = s; } void setUseRelativePathInPlaylist( bool b ) { m_relativePathInPlaylist = b; } void setWriteCueFile( bool b ) { m_writeCueFile = b; } @@ -80,10 +81,10 @@ class K3bAudioRipThread : public QObject, public K3bThread void slotCheckIfThreadStillRunning(); private: - /** reimplemented from QThread. Does the work */ + /** reimplemented from TQThread. Does the work */ void run(); - bool ripTrack( int track, const QString& filename ); + bool ripTrack( int track, const TQString& filename ); void cleanupAfterCancellation(); bool writePlaylist(); bool writeCueFile(); @@ -91,7 +92,7 @@ class K3bAudioRipThread : public QObject, public K3bThread /** * Finds a relative path from baseDir to absPath */ - QString findRelativePath( const QString& absPath, const QString& baseDir ); + TQString findRelativePath( const TQString& absPath, const TQString& baseDir ); K3bCddbResultEntry m_cddbEntry; K3bDevice::Device* m_device; @@ -102,11 +103,11 @@ class K3bAudioRipThread : public QObject, public K3bThread bool m_writePlaylist; bool m_relativePathInPlaylist; - QString m_playlistFilename; + TQString m_playlistFilename; bool m_writeCueFile; - QValueVector<QPair<int, QString> > m_tracks; + TQValueVector<TQPair<int, TQString> > m_tracks; friend class K3bAudioRipJob; diff --git a/src/rip/k3bcddbpatternwidget.cpp b/src/rip/k3bcddbpatternwidget.cpp index 9cea4d5..ba5427a 100644 --- a/src/rip/k3bcddbpatternwidget.cpp +++ b/src/rip/k3bcddbpatternwidget.cpp @@ -22,18 +22,18 @@ #include <kurllabel.h> #include <kdebug.h> -#include <qregexp.h> -#include <qvalidator.h> -#include <qwhatsthis.h> -#include <qcheckbox.h> -#include <qlayout.h> +#include <tqregexp.h> +#include <tqvalidator.h> +#include <tqwhatsthis.h> +#include <tqcheckbox.h> +#include <tqlayout.h> -K3bCddbPatternWidget::K3bCddbPatternWidget( QWidget* parent, const char* name ) - : base_K3bCddbPatternWidget( parent, name ) +K3bCddbPatternWidget::K3bCddbPatternWidget( TQWidget* tqparent, const char* name ) + : base_K3bCddbPatternWidget( tqparent, name ) { - // fix the layout - ((QGridLayout*)layout())->setRowStretch( 4, 1 ); + // fix the tqlayout + ((TQGridLayout*)tqlayout())->setRowStretch( 4, 1 ); // setup validators // there can never be one of the following characters in both dir and filename: @@ -41,7 +41,7 @@ K3bCddbPatternWidget::K3bCddbPatternWidget( QWidget* parent, const char* name ) // additional the filename can never contain a slash / // and the dir should never start with a slash since it should always be a relative path - QRegExpValidator* dirValidator = new QRegExpValidator( QRegExp( "[^/][^?\\*\\\"]*" ), this ); + TQRegExpValidator* dirValidator = new TQRegExpValidator( TQRegExp( "[^/][^?\\*\\\"]*" ), TQT_TQOBJECT(this) ); m_comboFilenamePattern->setValidator( dirValidator ); m_comboPlaylistPattern->setValidator( dirValidator ); m_editBlankReplace->setValidator( dirValidator ); @@ -56,18 +56,18 @@ K3bCddbPatternWidget::K3bCddbPatternWidget( QWidget* parent, const char* name ) m_comboPlaylistPattern->insertItem( i18n( "Playlist" ) ); m_comboPlaylistPattern->insertItem( i18n( "playlists/%{albumartist}/%{albumtitle }" ) ); - connect( m_comboFilenamePattern, SIGNAL(textChanged(const QString&)), - this, SIGNAL(changed()) ); - connect( m_comboPlaylistPattern, SIGNAL(textChanged(const QString&)), - this, SIGNAL(changed()) ); - connect( m_editBlankReplace, SIGNAL(textChanged(const QString&)), - this, SIGNAL(changed()) ); - connect( m_checkBlankReplace, SIGNAL(toggled(bool)), - this, SIGNAL(changed()) ); - connect( m_specialStringsLabel, SIGNAL(leftClickedURL()), - this, SLOT(slotSeeSpecialStrings()) ); - connect( m_conditionalInclusionLabel, SIGNAL(leftClickedURL()), - this, SLOT(slotSeeConditionalInclusion()) ); + connect( m_comboFilenamePattern, TQT_SIGNAL(textChanged(const TQString&)), + this, TQT_SIGNAL(changed()) ); + connect( m_comboPlaylistPattern, TQT_SIGNAL(textChanged(const TQString&)), + this, TQT_SIGNAL(changed()) ); + connect( m_editBlankReplace, TQT_SIGNAL(textChanged(const TQString&)), + this, TQT_SIGNAL(changed()) ); + connect( m_checkBlankReplace, TQT_SIGNAL(toggled(bool)), + this, TQT_SIGNAL(changed()) ); + connect( m_specialStringsLabel, TQT_SIGNAL(leftClickedURL()), + this, TQT_SLOT(slotSeeSpecialStrings()) ); + connect( m_conditionalInclusionLabel, TQT_SIGNAL(leftClickedURL()), + this, TQT_SLOT(slotSeeConditionalInclusion()) ); } @@ -76,19 +76,19 @@ K3bCddbPatternWidget::~K3bCddbPatternWidget() } -QString K3bCddbPatternWidget::filenamePattern() const +TQString K3bCddbPatternWidget::filenamePattern() const { return m_comboFilenamePattern->currentText(); } -QString K3bCddbPatternWidget::playlistPattern() const +TQString K3bCddbPatternWidget::playlistPattern() const { return m_comboPlaylistPattern->currentText(); } -QString K3bCddbPatternWidget::blankReplaceString() const +TQString K3bCddbPatternWidget::blankReplaceString() const { return m_editBlankReplace->text(); } @@ -129,7 +129,7 @@ void K3bCddbPatternWidget::loadDefaults() void K3bCddbPatternWidget::slotSeeSpecialStrings() { - QWhatsThis::display( i18n( "<p><b>Pattern special strings:</b>" + TQWhatsThis::display( i18n( "<p><b>Pattern special strings:</b>" "<p>The following strings will be replaced with their respective meaning in every " "track name.<br>" "<em>Hint:</em> %A differs from %a only on soundtracks or compilations." @@ -150,7 +150,7 @@ void K3bCddbPatternWidget::slotSeeSpecialStrings() void K3bCddbPatternWidget::slotSeeConditionalInclusion() { - QWhatsThis::display( i18n( "<p><b>Conditional inclusion:</b>" + TQWhatsThis::display( i18n( "<p><b>Conditional inclusion:</b>" "<p>These patterns make it possible to selectively include texts, " "depending on the value of CDDB entries. You can choose only to " "include or exclude texts if one of the entries is empty, " diff --git a/src/rip/k3bcddbpatternwidget.h b/src/rip/k3bcddbpatternwidget.h index 928b95b..ef15ae7 100644 --- a/src/rip/k3bcddbpatternwidget.h +++ b/src/rip/k3bcddbpatternwidget.h @@ -25,14 +25,15 @@ class KConfigBase; class K3bCddbPatternWidget : public base_K3bCddbPatternWidget { Q_OBJECT + TQ_OBJECT public: - K3bCddbPatternWidget( QWidget* parent = 0, const char* name = 0 ); + K3bCddbPatternWidget( TQWidget* tqparent = 0, const char* name = 0 ); ~K3bCddbPatternWidget(); - QString filenamePattern() const; - QString playlistPattern() const; - QString blankReplaceString() const; + TQString filenamePattern() const; + TQString playlistPattern() const; + TQString blankReplaceString() const; bool replaceBlanks() const; signals: diff --git a/src/rip/k3bcuefilewriter.cpp b/src/rip/k3bcuefilewriter.cpp index 087002d..2303926 100644 --- a/src/rip/k3bcuefilewriter.cpp +++ b/src/rip/k3bcuefilewriter.cpp @@ -20,9 +20,9 @@ #include <k3bcore.h> #include <k3bversion.h> -#include <qfile.h> -#include <qtextstream.h> -#include <qdatetime.h> +#include <tqfile.h> +#include <tqtextstream.h> +#include <tqdatetime.h> K3bCueFileWriter::K3bCueFileWriter() @@ -30,22 +30,22 @@ K3bCueFileWriter::K3bCueFileWriter() } -bool K3bCueFileWriter::save( const QString& filename ) +bool K3bCueFileWriter::save( const TQString& filename ) { - QFile f( filename ); + TQFile f( filename ); if( !f.open( IO_WriteOnly ) ) { kdDebug() << "(K3bCueFileWriter) could not open file " << f.name() << endl; return false; } - QTextStream s( &f ); + TQTextStream s( &f ); return save( s ); } -bool K3bCueFileWriter::save( QTextStream& t ) +bool K3bCueFileWriter::save( TQTextStream& t ) { t << "REM Cue file written by K3b " << k3bcore->version() << endl << endl; @@ -64,7 +64,7 @@ bool K3bCueFileWriter::save( QTextStream& t ) const K3bDevice::Track& track = *it; - t << " TRACK " << QString::number(i+1).rightJustify( 2, '0' ) << " AUDIO" << endl; + t << " TRACK " << TQString::number(i+1).rightJustify( 2, '0' ) << " AUDIO" << endl; if( m_cdText.count() > i && !m_cdText[i].isEmpty() ) { t << " PERFORMER \"" << m_cdText[i].performer() << "\"" << endl; @@ -87,5 +87,5 @@ bool K3bCueFileWriter::save( QTextStream& t ) i++; } - return ( t.device()->status() == IO_Ok ); + return ( t.tqdevice()->status() == IO_Ok ); } diff --git a/src/rip/k3bcuefilewriter.h b/src/rip/k3bcuefilewriter.h index 88f7ffe..cee821d 100644 --- a/src/rip/k3bcuefilewriter.h +++ b/src/rip/k3bcuefilewriter.h @@ -16,8 +16,8 @@ #ifndef _K3B_CUE_FILE_WRITER_H_ #define _K3B_CUE_FILE_WRITER_H_ -#include <qtextstream.h> -#include <qstringlist.h> +#include <tqtextstream.h> +#include <tqstringlist.h> #include <k3btoc.h> #include <k3bcdtext.h> @@ -37,18 +37,18 @@ class K3bCueFileWriter public: K3bCueFileWriter(); - bool save( QTextStream& ); - bool save( const QString& filename ); + bool save( TQTextStream& ); + bool save( const TQString& filename ); void setData( const K3bDevice::Toc& toc ) { m_toc = toc; } void setCdText( const K3bDevice::CdText& text ) { m_cdText = text; } - void setImage( const QString& name, const QString& type ) { m_image = name; m_dataType = type; } + void setImage( const TQString& name, const TQString& type ) { m_image = name; m_dataType = type; } private: K3bDevice::Toc m_toc; K3bDevice::CdText m_cdText; - QString m_image; - QString m_dataType; + TQString m_image; + TQString m_dataType; }; #endif diff --git a/src/rip/k3bpatternparser.cpp b/src/rip/k3bpatternparser.cpp index 8ba04e6..4d25ad2 100644 --- a/src/rip/k3bpatternparser.cpp +++ b/src/rip/k3bpatternparser.cpp @@ -17,24 +17,24 @@ #include "k3bpatternparser.h" -#include <qregexp.h> -#include <qdatetime.h> -#include <qvaluestack.h> +#include <tqregexp.h> +#include <tqdatetime.h> +#include <tqvaluestack.h> #include <kglobal.h> #include <klocale.h> -QString K3bPatternParser::parsePattern( const K3bCddbResultEntry& entry, +TQString K3bPatternParser::parsePattern( const K3bCddbResultEntry& entry, unsigned int trackNumber, - const QString& pattern, - bool replace, - const QString& replaceString ) + const TQString& pattern, + bool tqreplace, + const TQString& replaceString ) { if( entry.titles.count() < trackNumber ) return ""; - QString dir, s; + TQString dir, s; char c = ' '; // contains the character representation of a special string unsigned int len; // length of the current special string @@ -115,40 +115,40 @@ QString K3bPatternParser::parsePattern( const K3bCddbResultEntry& entry, switch( c ) { case ARTIST: s = entry.artists[trackNumber-1]; - s.replace( '/', '_' ); - s.replace( '*', '_' ); - s.replace( '}', '*' ); // for conditional inclusion + s.tqreplace( '/', '_' ); + s.tqreplace( '*', '_' ); + s.tqreplace( '}', '*' ); // for conditional inclusion dir.append( s.isEmpty() - ? i18n("unknown") + QString(" %1").arg(trackNumber) + ? i18n("unknown") + TQString(" %1").tqarg(trackNumber) : s ); break; case TITLE: s = entry.titles[trackNumber-1]; - s.replace( '/', '_' ); - s.replace( '*', '_' ); - s.replace( '}', '*' ); + s.tqreplace( '/', '_' ); + s.tqreplace( '*', '_' ); + s.tqreplace( '}', '*' ); dir.append( s.isEmpty() - ? i18n("Track %1").arg(trackNumber) + ? i18n("Track %1").tqarg(trackNumber) : s ); break; case NUMBER: - dir.append( QString::number(trackNumber).rightJustify( 2, '0' ) ); + dir.append( TQString::number(trackNumber).rightJustify( 2, '0' ) ); break; case YEAR: - dir.append( QString::number( entry.year ) ); + dir.append( TQString::number( entry.year ) ); break; case COMMENT: s = entry.extInfos[trackNumber-1]; - s.replace( '/', '_' ); - s.replace( '*', '_' ); - s.replace( '}', '*' ); + s.tqreplace( '/', '_' ); + s.tqreplace( '*', '_' ); + s.tqreplace( '}', '*' ); dir.append( s ); break; case GENRE: s = ( entry.genre.isEmpty() ? entry.category : entry.genre ); - s.replace( '/', '_' ); - s.replace( '*', '_' ); - s.replace( '}', '*' ); + s.tqreplace( '/', '_' ); + s.tqreplace( '*', '_' ); + s.tqreplace( '}', '*' ); dir.append( s ); break; case ALBUMARTIST: @@ -157,21 +157,21 @@ QString K3bPatternParser::parsePattern( const K3bCddbResultEntry& entry, break; case ALBUMTITLE: s = entry.cdTitle; - s.replace( '/', '_' ); - s.replace( '*', '_' ); - s.replace( '}', '*' ); + s.tqreplace( '/', '_' ); + s.tqreplace( '*', '_' ); + s.tqreplace( '}', '*' ); dir.append( s.isEmpty() ? i18n("unknown") : s ); break; case ALBUMCOMMENT: s = entry.cdExtInfo; - s.replace( '/', '_' ); - s.replace( '*', '_' ); - s.replace( '}', '*' ); + s.tqreplace( '/', '_' ); + s.tqreplace( '*', '_' ); + s.tqreplace( '}', '*' ); dir.append( s ); // I think it makes more sense to allow empty comments break; case DATE: - dir.append( KGlobal::locale()->formatDate( QDate::currentDate() ) ); + dir.append( KGlobal::locale()->formatDate( TQDate::tqcurrentDate() ) ); break; default: dir.append( pattern.mid(i, len) ); @@ -193,17 +193,17 @@ QString K3bPatternParser::parsePattern( const K3bCddbResultEntry& entry, // /* delete line comment to comment out // the following part: Conditional Inclusion - QValueStack<int> offsetStack; - QString inclusion; + TQValueStack<int> offsetStack; + TQString inclusion; bool isIncluded; - static QRegExp conditionrx( "^[@|!][atyegrmx](?:='.*')?\\{" ); + static TQRegExp conditionrx( "^[@|!][atyegrmx](?:='.*')?\\{" ); conditionrx.setMinimal( TRUE ); for( unsigned int i = 0; i < dir.length(); ++i ) { offsetStack.push( - conditionrx.search(dir, i, QRegExp::CaretAtOffset) ); + conditionrx.search(dir, i, TQRegExp::CaretAtOffset) ); if( offsetStack.top() == -1 ) { offsetStack.pop(); @@ -218,7 +218,7 @@ QString K3bPatternParser::parsePattern( const K3bCddbResultEntry& entry, int offset = offsetStack.pop(); int length = i - offset + 1; - switch( (QChar) dir[offset+1] ) { + switch( (TQChar) dir[offset+1] ) { case ARTIST: s = entry.artists[trackNumber-1]; break; @@ -226,10 +226,10 @@ QString K3bPatternParser::parsePattern( const K3bCddbResultEntry& entry, s = entry.titles[trackNumber-1]; break; case NUMBER: - s = QString::number( trackNumber ); + s = TQString::number( trackNumber ); break; case YEAR: - s = QString::number( entry.year ); + s = TQString::number( entry.year ); break; case COMMENT: s = entry.extInfos[trackNumber-1]; @@ -247,14 +247,14 @@ QString K3bPatternParser::parsePattern( const K3bCddbResultEntry& entry, s = entry.cdExtInfo; break; case DATE: - s = KGlobal::locale()->formatDate( QDate::currentDate() ); + s = KGlobal::locale()->formatDate( TQDate::tqcurrentDate() ); break; default: // we must never get here, break; // all choices should be covered } if( dir[offset+2] == '{' ) { // no string matching, e.g. ?y{text} - switch( (QChar) dir[offset+1] ) { + switch( (TQChar) dir[offset+1] ) { case YEAR: isIncluded = (s != "0"); break; @@ -267,8 +267,8 @@ QString K3bPatternParser::parsePattern( const K3bCddbResultEntry& entry, else { // with string matching, e.g. ?y='2004'{text} // Be aware that there might be ' in the condition text - int endOfCondition = dir.find( '{', offset+4 )-1; - QString condition = dir.mid( offset+4, + int endOfCondition = dir.tqfind( '{', offset+4 )-1; + TQString condition = dir.mid( offset+4, endOfCondition - (offset+4) ); isIncluded = (s == condition); @@ -280,7 +280,7 @@ QString K3bPatternParser::parsePattern( const K3bCddbResultEntry& entry, isIncluded = !isIncluded; // Leave it when it's '@'. - dir.replace( offset, length, ( isIncluded ? inclusion : QString("") ) ); + dir.tqreplace( offset, length, ( isIncluded ? inclusion : TQString("") ) ); if( isIncluded == TRUE ) i -= length - inclusion.length(); @@ -289,17 +289,17 @@ QString K3bPatternParser::parsePattern( const K3bCddbResultEntry& entry, continue; - } // end of replace (at closing bracket '}') + } // end of tqreplace (at closing bracket '}') } // end of conditional inclusion for(...) // end of Conditional Inclusion */ - dir.replace( '*', '}' ); // bring the brackets back, if there were any + dir.tqreplace( '*', '}' ); // bring the brackets back, if there were any - if( replace ) - dir.replace( QRegExp( "\\s" ), replaceString ); + if( tqreplace ) + dir.tqreplace( TQRegExp( "\\s" ), replaceString ); return dir; } diff --git a/src/rip/k3bpatternparser.h b/src/rip/k3bpatternparser.h index 88a725d..1f2cf86 100644 --- a/src/rip/k3bpatternparser.h +++ b/src/rip/k3bpatternparser.h @@ -17,7 +17,7 @@ #ifndef K3BPATTERNPARSER_H #define K3BPATTERNPARSER_H -#include <qstring.h> +#include <tqstring.h> #include <k3bcddbquery.h> @@ -28,11 +28,11 @@ class K3bPatternParser { public: - static QString parsePattern( const K3bCddbResultEntry& entry, + static TQString parsePattern( const K3bCddbResultEntry& entry, unsigned int trackNumber, - const QString& pattern, - bool replace = false, - const QString& replaceString = "_" ); + const TQString& pattern, + bool tqreplace = false, + const TQString& replaceString = "_" ); private: enum { diff --git a/src/rip/k3bvideocdinfo.cpp b/src/rip/k3bvideocdinfo.cpp index ac30d40..9d6e8bc 100644 --- a/src/rip/k3bvideocdinfo.cpp +++ b/src/rip/k3bvideocdinfo.cpp @@ -15,11 +15,11 @@ -#include <qstring.h> -#include <qvaluelist.h> -#include <qstringlist.h> -#include <qtimer.h> -#include <qdom.h> +#include <tqstring.h> +#include <tqvaluelist.h> +#include <tqstringlist.h> +#include <tqtimer.h> +#include <tqdom.h> #include <klocale.h> #include <kconfig.h> @@ -31,8 +31,8 @@ #include <k3bexternalbinmanager.h> -K3bVideoCdInfo::K3bVideoCdInfo( QObject* parent, const char* name ) - : QObject( parent, name ) +K3bVideoCdInfo::K3bVideoCdInfo( TQObject* tqparent, const char* name ) + : TQObject( tqparent, name ) { m_process = 0L; m_isXml = false; @@ -52,7 +52,7 @@ void K3bVideoCdInfo::cancelAll() } } -void K3bVideoCdInfo::info( const QString& device ) +void K3bVideoCdInfo::info( const TQString& device ) { if ( !k3bcore ->externalBinManager() ->foundBin( "vcdxrip" ) ) { kdDebug() << "(K3bVideoCdInfo::info) could not find vcdxrip executable" << endl; @@ -67,12 +67,12 @@ void K3bVideoCdInfo::info( const QString& device ) *m_process << "-q" << "--norip" << "-i" << device << "-o" << "-"; - connect( m_process, SIGNAL( receivedStderr( KProcess*, char*, int ) ), - this, SLOT( slotParseOutput( KProcess*, char*, int ) ) ); - connect( m_process, SIGNAL( receivedStdout( KProcess*, char*, int ) ), - this, SLOT( slotParseOutput( KProcess*, char*, int ) ) ); - connect( m_process, SIGNAL( processExited( KProcess* ) ), - this, SLOT( slotInfoFinished() ) ); + connect( m_process, TQT_SIGNAL( receivedStderr( KProcess*, char*, int ) ), + this, TQT_SLOT( slotParseOutput( KProcess*, char*, int ) ) ); + connect( m_process, TQT_SIGNAL( receivedStdout( KProcess*, char*, int ) ), + this, TQT_SLOT( slotParseOutput( KProcess*, char*, int ) ) ); + connect( m_process, TQT_SIGNAL( processExited( KProcess* ) ), + this, TQT_SLOT( slotInfoFinished() ) ); if ( !m_process->start( KProcess::NotifyOnExit, KProcess::AllOutput ) ) { kdDebug() << "(K3bVideoCdInfo::info) could not start vcdxrip" << endl; @@ -83,14 +83,14 @@ void K3bVideoCdInfo::info( const QString& device ) void K3bVideoCdInfo::slotParseOutput( KProcess*, char* output, int len ) { - QString buffer = QString::fromLocal8Bit( output, len ); + TQString buffer = TQString::fromLocal8Bit( output, len ); // split to lines - QStringList lines = QStringList::split( "\n", buffer ); - QStringList::Iterator end( lines.end()); - for ( QStringList::Iterator str = lines.begin(); str != end; ++str ) { + TQStringList lines = TQStringList::split( "\n", buffer ); + TQStringList::Iterator end( lines.end()); + for ( TQStringList::Iterator str = lines.begin(); str != end; ++str ) { - if ( ( *str ).contains( "<?xml" ) ) + if ( ( *str ).tqcontains( "<?xml" ) ) m_isXml = true; if ( m_isXml ) @@ -98,7 +98,7 @@ void K3bVideoCdInfo::slotParseOutput( KProcess*, char* output, int len ) else kdDebug() << "(K3bVideoCdInfo::slotParseOutput) " << *str << endl; - if ( ( *str ).contains( "</videocd>" ) ) + if ( ( *str ).tqcontains( "</videocd>" ) ) m_isXml = false; } } @@ -132,8 +132,8 @@ void K3bVideoCdInfo::slotInfoFinished() void K3bVideoCdInfo::parseXmlData() { - QDomDocument xml_doc; - QDomElement xml_root; + TQDomDocument xml_doc; + TQDomElement xml_root; m_Result.xmlData = m_xmlData; @@ -143,23 +143,23 @@ void K3bVideoCdInfo::parseXmlData() m_Result.type = xml_root.attribute( "class" ); m_Result.version = xml_root.attribute( "version" ); - for ( QDomNode node = xml_root.firstChild(); !node.isNull(); node = node.nextSibling() ) { - QDomElement el = node.toElement(); - QString tagName = el.tagName().lower(); + for ( TQDomNode node = xml_root.firstChild(); !node.isNull(); node = node.nextSibling() ) { + TQDomElement el = node.toElement(); + TQString tagName = el.tagName().lower(); if ( tagName == "pvd" ) { - for ( QDomNode snode = node.firstChild(); !snode.isNull(); snode = snode.nextSibling() ) { - QDomElement sel = snode.toElement(); - QString pvdElement = sel.tagName().lower(); - QString pvdElementText = sel.text(); + for ( TQDomNode snode = node.firstChild(); !snode.isNull(); snode = snode.nextSibling() ) { + TQDomElement sel = snode.toElement(); + TQString pvdElement = sel.tagName().lower(); + TQString pvdElementText = sel.text(); if ( pvdElement == "volume-id" ) m_Result.volumeId = pvdElementText; } } else if ( tagName == "sequence-items" ) { - for ( QDomNode snode = node.firstChild(); !snode.isNull(); snode = snode.nextSibling() ) { - QDomElement sel = snode.toElement(); - QString seqElement = sel.tagName().lower(); + for ( TQDomNode snode = node.firstChild(); !snode.isNull(); snode = snode.nextSibling() ) { + TQDomElement sel = snode.toElement(); + TQString seqElement = sel.tagName().lower(); m_Result.addEntry( K3bVideoCdInfoResultEntry( sel.attribute( "src" ), sel.attribute( "id" ) ), @@ -167,9 +167,9 @@ void K3bVideoCdInfo::parseXmlData() ); } } else if ( tagName == "segment-items" ) { - for ( QDomNode snode = node.firstChild(); !snode.isNull(); snode = snode.nextSibling() ) { - QDomElement sel = snode.toElement(); - QString seqElement = sel.tagName().lower(); + for ( TQDomNode snode = node.firstChild(); !snode.isNull(); snode = snode.nextSibling() ) { + TQDomElement sel = snode.toElement(); + TQString seqElement = sel.tagName().lower(); m_Result.addEntry( K3bVideoCdInfoResultEntry( sel.attribute( "src" ), sel.attribute( "id" ) ), @@ -177,7 +177,7 @@ void K3bVideoCdInfo::parseXmlData() ); } } else { - kdDebug() << QString( "(K3bVideoCdInfo::parseXmlData) tagName '%1' not used" ).arg( tagName ) << endl; + kdDebug() << TQString( "(K3bVideoCdInfo::parseXmlData) tagName '%1' not used" ).tqarg( tagName ) << endl; } } } diff --git a/src/rip/k3bvideocdinfo.h b/src/rip/k3bvideocdinfo.h index 0b295e6..c5acebe 100644 --- a/src/rip/k3bvideocdinfo.h +++ b/src/rip/k3bvideocdinfo.h @@ -17,9 +17,9 @@ #ifndef K3BVIDEOCDINFO_H #define K3BVIDEOCDINFO_H -#include <qstring.h> -#include <qstringlist.h> -#include <qobject.h> +#include <tqstring.h> +#include <tqstringlist.h> +#include <tqobject.h> #include <k3btoc.h> #include <k3bcore.h> @@ -32,12 +32,12 @@ class K3bVideoCdInfoResultEntry K3bVideoCdInfoResultEntry() : name( 0 ), id( 0 ) {} - K3bVideoCdInfoResultEntry( const QString& name, const QString& id ) + K3bVideoCdInfoResultEntry( const TQString& name, const TQString& id ) : name( name ), id( id ) {} - QString name; - QString id; + TQString name; + TQString id; long size; }; @@ -54,26 +54,27 @@ class K3bVideoCdInfoResult const K3bVideoCdInfoResultEntry& entry( unsigned int number = 0 , int type = K3bVideoCdInfoResult::SEQUENCE ) const; int foundEntries( int type = K3bVideoCdInfoResult::SEQUENCE ) const; - QString volumeId; - QString type; - QString version; + TQString volumeId; + TQString type; + TQString version; - QString xmlData; + TQString xmlData; private: - QValueList<K3bVideoCdInfoResultEntry> m_fileEntry; - QValueList<K3bVideoCdInfoResultEntry> m_segmentEntry; - QValueList<K3bVideoCdInfoResultEntry> m_sequenceEntry; + TQValueList<K3bVideoCdInfoResultEntry> m_fileEntry; + TQValueList<K3bVideoCdInfoResultEntry> m_segmentEntry; + TQValueList<K3bVideoCdInfoResultEntry> m_sequenceEntry; K3bVideoCdInfoResultEntry m_emptyEntry; }; -class K3bVideoCdInfo : public QObject +class K3bVideoCdInfo : public TQObject { Q_OBJECT + TQ_OBJECT public: - K3bVideoCdInfo( QObject* parent = 0, const char* name = 0 ); + K3bVideoCdInfo( TQObject* tqparent = 0, const char* name = 0 ); ~K3bVideoCdInfo(); /** @@ -82,7 +83,7 @@ class K3bVideoCdInfo : public QObject */ const K3bVideoCdInfoResult& result() const; - void info( const QString& ); + void info( const TQString& ); signals: void infoFinished( bool success ); @@ -99,7 +100,7 @@ class K3bVideoCdInfo : public QObject KProcess* m_process; - QString m_xmlData; + TQString m_xmlData; bool m_isXml; }; diff --git a/src/rip/k3bvideocdrip.cpp b/src/rip/k3bvideocdrip.cpp index a7467c9..a649e6e 100644 --- a/src/rip/k3bvideocdrip.cpp +++ b/src/rip/k3bvideocdrip.cpp @@ -21,13 +21,13 @@ #include <ktempfile.h> #include <kurl.h> -#include <qdatetime.h> -#include <qdom.h> -#include <qfile.h> -#include <qstring.h> -#include <qregexp.h> -#include <qtimer.h> -#include <qurl.h> +#include <tqdatetime.h> +#include <tqdom.h> +#include <tqfile.h> +#include <tqstring.h> +#include <tqregexp.h> +#include <tqtimer.h> +#include <tqurl.h> // K3b Includes #include "k3bvideocdrip.h" @@ -36,8 +36,8 @@ #include <k3bglobals.h> #include <k3bprocess.h> -K3bVideoCdRip::K3bVideoCdRip( K3bJobHandler* hdl, K3bVideoCdRippingOptions* options, QObject* parent, const char* name ) - : K3bJob( hdl, parent, name ), +K3bVideoCdRip::K3bVideoCdRip( K3bJobHandler* hdl, K3bVideoCdRippingOptions* options, TQObject* tqparent, const char* name ) + : K3bJob( hdl, tqparent, name ), m_ripsourceType( 0 ), m_subPosition ( 0 ), m_videooptions( options ), @@ -97,8 +97,8 @@ void K3bVideoCdRip::vcdxRip() if ( !bin ) { kdDebug() << "(K3bVideoCdRip) could not find vcdxrip executable" << endl; - emit infoMessage( i18n( "Could not find %1 executable." ).arg( "vcdxrip" ), K3bJob::ERROR ); - emit infoMessage( i18n( "To rip VideoCD's you must install VcdImager Version %1." ).arg( ">= 0.7.12" ), K3bJob::INFO ); + emit infoMessage( i18n( "Could not tqfind %1 executable." ).tqarg( "vcdxrip" ), K3bJob::ERROR ); + emit infoMessage( i18n( "To rip VideoCD's you must install VcdImager Version %1." ).tqarg( ">= 0.7.12" ), K3bJob::INFO ); emit infoMessage( i18n( "You can find this on your distribution disks or download it from http://www.vcdimager.org" ), K3bJob::INFO ); cancelAll(); jobFinished( false ); @@ -107,7 +107,7 @@ void K3bVideoCdRip::vcdxRip() if( bin->version < K3bVersion("0.7.12") ) { kdDebug() << "(K3bVideoCdRip) vcdxrip executable too old!" << endl; - emit infoMessage( i18n( "%1 executable too old! Need version %2 or greater" ).arg( "Vcdxrip" ).arg( "0.7.12" ), K3bJob::ERROR ); + emit infoMessage( i18n( "%1 executable too old! Need version %2 or greater" ).tqarg( "Vcdxrip" ).tqarg( "0.7.12" ), K3bJob::ERROR ); emit infoMessage( i18n( "You can find this on your distribution disks or download it from http://www.vcdimager.org" ), K3bJob::INFO ); cancelAll(); jobFinished( false ); @@ -115,14 +115,14 @@ void K3bVideoCdRip::vcdxRip() } if ( !bin->copyright.isEmpty() ) - emit infoMessage( i18n( "Using %1 %2 - Copyright (C) %3" ).arg( bin->name() ).arg( bin->version ).arg( bin->copyright ), INFO ); + emit infoMessage( i18n( "Using %1 %2 - Copyright (C) %3" ).tqarg( bin->name() ).tqarg( bin->version ).tqarg( bin->copyright ), INFO ); *m_process << k3bcore ->externalBinManager() ->binPath( "vcdxrip" ); // additional user parameters from config - const QStringList& params = k3bcore->externalBinManager() ->program( "vcdxrip" ) ->userParameters(); - for ( QStringList::const_iterator it = params.begin(); it != params.end(); ++it ) + const TQStringList& params = k3bcore->externalBinManager() ->program( "vcdxrip" ) ->userParameters(); + for ( TQStringList::const_iterator it = params.begin(); it != params.end(); ++it ) *m_process << *it; *m_process << "--gui" << "--progress"; @@ -142,29 +142,29 @@ void K3bVideoCdRip::vcdxRip() if ( m_videooptions ->getVideoCdSector2336() ) *m_process << "--sector-2336"; - *m_process << "-i" << QString( "%1" ).arg( QFile::encodeName( m_videooptions ->getVideoCdSource() ) ); + *m_process << "-i" << TQString( "%1" ).tqarg( TQFile::encodeName( m_videooptions ->getVideoCdSource() ).data() ); if ( m_videooptions ->getVideoCdExtractXml() ) - *m_process << "-o" << QString( "%1" ).arg( QFile::encodeName( m_videooptions ->getVideoCdDescription() + ".xml" ) ); + *m_process << "-o" << TQString( "%1" ).tqarg( TQFile::encodeName( m_videooptions ->getVideoCdDescription() + ".xml" ).data() ); else *m_process << "-o" << "/dev/null"; - connect( m_process, SIGNAL( receivedStderr( KProcess*, char*, int ) ), - this, SLOT( slotParseVcdXRipOutput( KProcess*, char*, int ) ) ); - connect( m_process, SIGNAL( receivedStdout( KProcess*, char*, int ) ), - this, SLOT( slotParseVcdXRipOutput( KProcess*, char*, int ) ) ); - connect( m_process, SIGNAL( processExited( KProcess* ) ), - this, SLOT( slotVcdXRipFinished() ) ); + connect( m_process, TQT_SIGNAL( receivedStderr( KProcess*, char*, int ) ), + this, TQT_SLOT( slotParseVcdXRipOutput( KProcess*, char*, int ) ) ); + connect( m_process, TQT_SIGNAL( receivedStdout( KProcess*, char*, int ) ), + this, TQT_SLOT( slotParseVcdXRipOutput( KProcess*, char*, int ) ) ); + connect( m_process, TQT_SIGNAL( processExited( KProcess* ) ), + this, TQT_SLOT( slotVcdXRipFinished() ) ); - m_process->setWorkingDirectory( QUrl( m_videooptions ->getVideoCdDestination() ).dirPath() ); + m_process->setWorkingDirectory( TQUrl( m_videooptions ->getVideoCdDestination() ).dirPath() ); // vcdxrip commandline parameters kdDebug() << "***** vcdxrip parameters:" << endl; ; - const QValueList<QCString>& args = m_process->args(); - QString s; - for ( QValueList<QCString>::const_iterator it = args.begin(); it != args.end(); ++it ) { + const TQValueList<TQCString>& args = m_process->args(); + TQString s; + for ( TQValueList<TQCString>::const_iterator it = args.begin(); it != args.end(); ++it ) { s += *it + " "; } kdDebug() << s << flush << endl; @@ -172,11 +172,11 @@ void K3bVideoCdRip::vcdxRip() emit newTask( i18n( "Extracting" ) ); emit infoMessage( i18n( "Start extracting." ), K3bJob::INFO ); - emit infoMessage( i18n( "Extract files from %1 to %2." ).arg( m_videooptions ->getVideoCdSource() ).arg( m_videooptions ->getVideoCdDestination() ), K3bJob::INFO ); + emit infoMessage( i18n( "Extract files from %1 to %2." ).tqarg( m_videooptions ->getVideoCdSource() ).tqarg( m_videooptions ->getVideoCdDestination() ), K3bJob::INFO ); if ( !m_process->start( KProcess::NotifyOnExit, KProcess::AllOutput ) ) { kdDebug() << "(K3bVideoCdRip) could not start vcdxrip" << endl; - emit infoMessage( i18n( "Could not start %1." ).arg( "vcdxrip" ), K3bJob::ERROR ); + emit infoMessage( i18n( "Could not start %1." ).tqarg( "vcdxrip" ), K3bJob::ERROR ); cancelAll(); jobFinished( false ); } @@ -184,34 +184,34 @@ void K3bVideoCdRip::vcdxRip() void K3bVideoCdRip::slotParseVcdXRipOutput( KProcess*, char* output, int len ) { - QString buffer = QString::fromLocal8Bit( output, len ); + TQString buffer = TQString::fromLocal8Bit( output, len ); // split to lines - QStringList lines = QStringList::split( "\n", buffer ); + TQStringList lines = TQStringList::split( "\n", buffer ); - QDomDocument xml_doc; - QDomElement xml_root; + TQDomDocument xml_doc; + TQDomElement xml_root; // do every line - QStringList::Iterator end( lines.end()); - for ( QStringList::Iterator str = lines.begin(); str != end; ++str ) { + TQStringList::Iterator end( lines.end()); + for ( TQStringList::Iterator str = lines.begin(); str != end; ++str ) { *str = ( *str ).stripWhiteSpace(); emit debuggingOutput( "vcdxrip", *str ); - xml_doc.setContent( QString( "<?xml version='1.0'?><vcdxrip>" ) + *str + "</vcdxrip>" ); + xml_doc.setContent( TQString( "<?xml version='1.0'?><vcdxrip>" ) + *str + "</vcdxrip>" ); xml_root = xml_doc.documentElement(); - for ( QDomNode node = xml_root.firstChild(); !node.isNull(); node = node.nextSibling() ) { - QDomElement el = node.toElement(); + for ( TQDomNode node = xml_root.firstChild(); !node.isNull(); node = node.nextSibling() ) { + TQDomElement el = node.toElement(); if ( el.isNull() ) continue; - const QString tagName = el.tagName().lower(); + const TQString tagName = el.tagName().lower(); if ( tagName == "progress" ) { - const QString oper = el.attribute( "operation" ).lower(); + const TQString oper = el.attribute( "operation" ).lower(); const unsigned long long overallPos = el.attribute( "position" ).toLong(); const unsigned long long pos = overallPos - m_subPosition; const unsigned long long size = el.attribute( "size" ).toLong() - m_subPosition; @@ -236,20 +236,20 @@ void K3bVideoCdRip::slotParseVcdXRipOutput( KProcess*, char* output, int len ) } } else if ( tagName == "log" ) { - QDomText tel = el.firstChild().toText(); - const QString level = el.attribute( "level" ).lower(); + TQDomText tel = el.firstChild().toText(); + const TQString level = el.attribute( "level" ).lower(); if ( tel.isText() ) { - const QString text = tel.data(); + const TQString text = tel.data(); if ( level == "information" ) { - kdDebug() << QString( "(K3bVideoCdRip) vcdxrip information, %1" ).arg( text ) << endl; + kdDebug() << TQString( "(K3bVideoCdRip) vcdxrip information, %1" ).tqarg( text ) << endl; parseInformation( text ); } else { if ( level != "error" ) { - kdDebug() << QString( "(K3bVideoCdRip) vcdxrip warning, %1" ).arg( text ) << endl; + kdDebug() << TQString( "(K3bVideoCdRip) vcdxrip warning, %1" ).tqarg( text ) << endl; emit debuggingOutput( "vcdxrip", text ); parseInformation( text ); } else { - kdDebug() << QString( "(K3bVideoCdRip) vcdxrip error, %1" ).arg( text ) << endl; + kdDebug() << TQString( "(K3bVideoCdRip) vcdxrip error, %1" ).tqarg( text ) << endl; emit infoMessage( text, K3bJob::ERROR ); } } @@ -269,14 +269,14 @@ void K3bVideoCdRip::slotVcdXRipFinished() emit infoMessage( i18n( "Files successfully extracted." ), K3bJob::SUCCESS ); break; default: - emit infoMessage( i18n( "%1 returned an unknown error (code %2)." ).arg( "vcdxrip" ).arg( m_process->exitStatus() ), K3bJob::ERROR ); + emit infoMessage( i18n( "%1 returned an unknown error (code %2)." ).tqarg( "vcdxrip" ).tqarg( m_process->exitStatus() ), K3bJob::ERROR ); emit infoMessage( i18n( "Please send me an email with the last output..." ), K3bJob::ERROR ); cancelAll(); jobFinished( false ); return ; } } else { - emit infoMessage( i18n( "%1 did not exit cleanly." ).arg( "Vcdxrip" ), K3bJob::ERROR ); + emit infoMessage( i18n( "%1 did not exit cleanly." ).tqarg( "Vcdxrip" ), K3bJob::ERROR ); cancelAll(); jobFinished( false ); return ; @@ -285,12 +285,12 @@ void K3bVideoCdRip::slotVcdXRipFinished() jobFinished( true ); } -void K3bVideoCdRip::parseInformation( QString text ) +void K3bVideoCdRip::parseInformation( TQString text ) { // parse warning - if ( text.contains( "encountered non-form2 sector" ) ) { + if ( text.tqcontains( "encountered non-form2 sector" ) ) { // I think this is an error not a warning. Finish ripping with invalid mpegs. - emit infoMessage( i18n( "%1 encountered non-form2 sector" ).arg("Vcdxrip"), K3bJob::ERROR ); + emit infoMessage( i18n( "%1 encountered non-form2 sector" ).tqarg("Vcdxrip"), K3bJob::ERROR ); emit infoMessage( i18n( "leaving loop" ), K3bJob::ERROR ); cancelAll(); jobFinished( false ); @@ -298,22 +298,22 @@ void K3bVideoCdRip::parseInformation( QString text ) } // parse extra info - else if ( text.contains( "detected extended VCD2.0 PBC files" ) ) + else if ( text.tqcontains( "detected extended VCD2.0 PBC files" ) ) emit infoMessage( i18n( "detected extended VCD2.0 PBC files" ), K3bJob::INFO ); // parse startposition and extracting sequence info // extracting avseq05.mpg... (start lsn 32603 (+28514)) else if ( text.startsWith( "extracting" ) ) { - if ( text.contains( "(start lsn" ) ) { - int index = text.find( "(start lsn" ); - int end = text.find( " (+" ); + if ( text.tqcontains( "(start lsn" ) ) { + int index = text.tqfind( "(start lsn" ); + int end = text.tqfind( " (+" ); if ( end > 0) { m_subPosition = text.mid( index + 11, end - index - 11 ).stripWhiteSpace().toLong(); } else { // found segment here we can get only the start lsn :) // extracting item0001.mpg... (start lsn 225, 1 segments) - int end = text.find( ",", index ); + int end = text.tqfind( ",", index ); int overallPos = text.mid( index + 11, end - index - 11 ).stripWhiteSpace().toLong(); double relOverallWritten = ( ( double ) overallPos * 2352 ) / ( double ) m_videooptions ->getVideoCdSize() ; int newpercent = ( int ) ( 100 * relOverallWritten ); @@ -325,31 +325,31 @@ void K3bVideoCdRip::parseInformation( QString text ) index = 11; - end = text.find( "(start lsn" ); - emit newSubTask( i18n( "Extracting %1" ).arg( text.mid( index, end - index ).stripWhiteSpace() ) ); + end = text.tqfind( "(start lsn" ); + emit newSubTask( i18n( "Extracting %1" ).tqarg( text.mid( index, end - index ).stripWhiteSpace() ) ); } // parse extracting files info // extracting CDI/CDI_IMAG.RTF to _cdi_cdi_imag.rtf (lsn 258, size 1315168, raw 1) - else if ( text.contains( "(lsn" ) && text.contains( "size" ) ) { + else if ( text.tqcontains( "(lsn" ) && text.tqcontains( "size" ) ) { int index = 11; - int end = text.find( "to" ); - QString extractFileName = text.mid( index, end - index ).stripWhiteSpace(); - index = text.find( " to " ); - end = text.find( " (lsn" ); - QString toFileName = text.mid( index + 4, end - index - 4 ).stripWhiteSpace(); - emit newSubTask( i18n( "Extracting %1 to %2" ).arg( extractFileName ).arg( toFileName ) ); + int end = text.tqfind( "to" ); + TQString extractFileName = text.mid( index, end - index ).stripWhiteSpace(); + index = text.tqfind( " to " ); + end = text.tqfind( " (lsn" ); + TQString toFileName = text.mid( index + 4, end - index - 4 ).stripWhiteSpace(); + emit newSubTask( i18n( "Extracting %1 to %2" ).tqarg( extractFileName ).tqarg( toFileName ) ); } } } -QString K3bVideoCdRip::jobDescription() const +TQString K3bVideoCdRip::jobDescription() const { - return i18n( "Extracting %1" ).arg( m_videooptions ->getVideoCdDescription() ); + return i18n( "Extracting %1" ).tqarg( m_videooptions ->getVideoCdDescription() ); } -QString K3bVideoCdRip::jobDetails() const +TQString K3bVideoCdRip::jobDetails() const { - return QString( "(%1)" ).arg ( KIO::convertSize( m_videooptions ->getVideoCdSize() ) ); + return TQString( "(%1)" ).arg ( KIO::convertSize( m_videooptions ->getVideoCdSize() ) ); } #include "k3bvideocdrip.moc" diff --git a/src/rip/k3bvideocdrip.h b/src/rip/k3bvideocdrip.h index fe0d6f9..a47f1d0 100644 --- a/src/rip/k3bvideocdrip.h +++ b/src/rip/k3bvideocdrip.h @@ -20,22 +20,23 @@ #include <k3bdiskinfo.h> #include "k3bvideocdrippingoptions.h" -class QString; +class TQString; class KProcess; -class QDataStream; +class TQDataStream; class K3bVideoCdRip : public K3bJob { Q_OBJECT + TQ_OBJECT public: - K3bVideoCdRip( K3bJobHandler*, K3bVideoCdRippingOptions* options, QObject* parent = 0, const char* name = 0 ); + K3bVideoCdRip( K3bJobHandler*, K3bVideoCdRippingOptions* options, TQObject* tqparent = 0, const char* name = 0 ); ~K3bVideoCdRip(); enum { CDROM, BIN_IMAGE, NRG_IMAGE }; - QString jobDescription() const; - QString jobDetails() const; + TQString jobDescription() const; + TQString jobDetails() const; public slots: void start(); @@ -50,7 +51,7 @@ class K3bVideoCdRip : public K3bJob private: void vcdxRip(); - void parseInformation( QString ); + void parseInformation( TQString ); enum { stageUnknown, stageScan, stageFinished, _stage_max }; @@ -61,7 +62,7 @@ class K3bVideoCdRip : public K3bJob long m_subPosition; - QString m_collectedOutput; + TQString m_collectedOutput; K3bVideoCdRippingOptions * m_videooptions; 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 ) ); diff --git a/src/rip/k3bvideocdrippingdialog.h b/src/rip/k3bvideocdrippingdialog.h index 98d16f6..6b7e565 100644 --- a/src/rip/k3bvideocdrippingdialog.h +++ b/src/rip/k3bvideocdrippingdialog.h @@ -17,27 +17,28 @@ #ifndef _K3B_VIDEOCD_RIPPING_DIALOG_H_ #define _K3B_VIDEOCD_RIPPING_DIALOG_H_ -#include <qstringlist.h> +#include <tqstringlist.h> #include <k3binteractiondialog.h> #include <k3bdiskinfo.h> #include "k3bvideocdrippingoptions.h" class KListView; -class QCheckBox; -class QLabel; -class QSpinBox; -class QComboBox; -class QToolButton; +class TQCheckBox; +class TQLabel; +class TQSpinBox; +class TQComboBox; +class TQToolButton; class KURLRequester; class K3bTempDirSelectionWidget; class K3bVideoCdRippingDialog : public K3bInteractionDialog { Q_OBJECT + TQ_OBJECT public: - K3bVideoCdRippingDialog( K3bVideoCdRippingOptions* options, QWidget* parent = 0, const char* name = 0 ); + K3bVideoCdRippingDialog( K3bVideoCdRippingOptions* options, TQWidget* tqparent = 0, const char* name = 0 ); ~K3bVideoCdRippingDialog(); private: @@ -52,11 +53,11 @@ class K3bVideoCdRippingDialog : public K3bInteractionDialog KURLRequester* m_editDirectory; - QLabel* m_labelFreeSpace; - QLabel* m_labelNecessarySize; - QCheckBox* m_ignoreExt; - QCheckBox* m_sector2336; - QCheckBox* m_extractXML; + TQLabel* m_labelFreeSpace; + TQLabel* m_labelNecessarySize; + TQCheckBox* m_ignoreExt; + TQCheckBox* m_sector2336; + TQCheckBox* m_extractXML; K3bVideoCdRippingOptions* m_videooptions; @@ -66,7 +67,7 @@ class K3bVideoCdRippingDialog : public K3bInteractionDialog void slotStartClicked(); void slotUpdateFreeSpace(); - void slotFreeSpace(const QString&, unsigned long, unsigned long, unsigned long); + void slotFreeSpace(const TQString&, unsigned long, unsigned long, unsigned long); }; diff --git a/src/rip/k3bvideocdrippingoptions.h b/src/rip/k3bvideocdrippingoptions.h index bd8aea9..7ccdde2 100644 --- a/src/rip/k3bvideocdrippingoptions.h +++ b/src/rip/k3bvideocdrippingoptions.h @@ -16,7 +16,7 @@ #ifndef _K3B_VIDEOCD_OPTIONS_H_ #define _K3B_VIDEOCD_OPTIONS_H_ -#include <qstring.h> +#include <tqstring.h> class K3bVideoCdRippingOptions { @@ -35,9 +35,9 @@ class K3bVideoCdRippingOptions {} void setVideoCdSize( unsigned long size ) { m_videocdsize = size;} - void setVideoCdSource( const QString& source ) { m_videocdsource = source;} - void setVideoCdDestination( const QString& destination ) { m_videocddestination = destination;} - void setVideoCdDescription( const QString& description ) { m_videocddescription = description;} + void setVideoCdSource( const TQString& source ) { m_videocdsource = source;} + void setVideoCdDestination( const TQString& destination ) { m_videocddestination = destination;} + void setVideoCdDescription( const TQString& description ) { m_videocddescription = description;} void setVideoCdRipFiles( bool ripfiles ) { m_videocdripfiles = ripfiles;} void setVideoCdRipSegments( bool ripsegments ) { m_videocdripsegments = ripsegments;} void setVideoCdRipSequences( bool ripsequences ) { m_videocdripsequences = ripsequences;} @@ -46,9 +46,9 @@ class K3bVideoCdRippingOptions void setVideoCdExtractXml( bool extractxml ) { m_extractXML = extractxml;} unsigned long getVideoCdSize( ) { return m_videocdsize;} - QString getVideoCdSource( ) { return m_videocdsource;} - QString getVideoCdDestination( ) { return m_videocddestination;} - QString getVideoCdDescription( ) { return m_videocddescription;} + TQString getVideoCdSource( ) { return m_videocdsource;} + TQString getVideoCdDestination( ) { return m_videocddestination;} + TQString getVideoCdDescription( ) { return m_videocddescription;} bool getVideoCdRipFiles( ) { return m_videocdripfiles;} bool getVideoCdRipSegments( ) { return m_videocdripsegments;} bool getVideoCdRipSequences( ) { return m_videocdripsequences;} @@ -59,9 +59,9 @@ class K3bVideoCdRippingOptions private: unsigned long m_videocdsize; - QString m_videocdsource; - QString m_videocddestination; - QString m_videocddescription; + TQString m_videocdsource; + TQString m_videocddestination; + TQString m_videocddescription; bool m_videocdripfiles; bool m_videocdripsegments; diff --git a/src/rip/k3bvideocdview.cpp b/src/rip/k3bvideocdview.cpp index c0f5ae2..bc47c62 100644 --- a/src/rip/k3bvideocdview.cpp +++ b/src/rip/k3bvideocdview.cpp @@ -25,13 +25,13 @@ #include <kstdaction.h> // qt includes -#include <qfont.h> -#include <qframe.h> -#include <qheader.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qcursor.h> -#include <qapplication.h> +#include <tqfont.h> +#include <tqframe.h> +#include <tqheader.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqcursor.h> +#include <tqapplication.h> // k3b includes #include "k3bvideocdview.h" @@ -46,29 +46,29 @@ #include <k3btoolbox.h> -class K3bVideoCdView::VideoTrackViewItem : public QListViewItem +class K3bVideoCdView::VideoTrackViewItem : public TQListViewItem { public: - VideoTrackViewItem( QListViewItem* parent, QListViewItem* after ) - : QListViewItem( parent, after ) + VideoTrackViewItem( TQListViewItem* tqparent, TQListViewItem* after ) + : TQListViewItem( tqparent, after ) { setSelectable( false ); } - VideoTrackViewItem( QListView* parent, QListViewItem* after ) - : QListViewItem( parent, after ) + VideoTrackViewItem( TQListView* tqparent, TQListViewItem* after ) + : TQListViewItem( tqparent, after ) { setSelectable( false ); } - VideoTrackViewItem( QListViewItem* parent, - const QString& name, - const QString& id, + VideoTrackViewItem( TQListViewItem* tqparent, + const TQString& name, + const TQString& id, int _trackNumber, const K3b::Msf& length ) - : QListViewItem( parent ) + : TQListViewItem( tqparent ) { - setText( 0, QString( "%1. %2" ).arg( _trackNumber ).arg( id ) ); + setText( 0, TQString( "%1. %2" ).tqarg( _trackNumber ).tqarg( id ) ); setText( 1, name ); if ( length > 0 ) { setText( 2, length.toString() ); @@ -83,42 +83,42 @@ class K3bVideoCdView::VideoTrackViewItem : public QListViewItem void updateData( const K3bVideoCdInfoResultEntry& resultEntry ) { - setText( 0, QString( "%1. %2" ).arg( trackNumber ).arg( resultEntry.id ) ); + setText( 0, TQString( "%1. %2" ).tqarg( trackNumber ).tqarg( resultEntry.id ) ); setText( 1, resultEntry.name ); } }; -class K3bVideoCdView::VideoTrackViewCheckItem : public QCheckListItem +class K3bVideoCdView::VideoTrackViewCheckItem : public TQCheckListItem { public: - VideoTrackViewCheckItem( QListViewItem* parent, - const QString& desc ) - : QCheckListItem( parent, - QString::null, - QCheckListItem::CheckBox ) + VideoTrackViewCheckItem( TQListViewItem* tqparent, + const TQString& desc ) + : TQCheckListItem( tqparent, + TQString(), + TQCheckListItem::CheckBox ) { setText( 0, desc ); setOn( true ); } - VideoTrackViewCheckItem( QListView* parent, - const QString& desc ) - : QCheckListItem( parent, - QString::null, - QCheckListItem::CheckBox ) + VideoTrackViewCheckItem( TQListView* tqparent, + const TQString& desc ) + : TQCheckListItem( tqparent, + TQString(), + TQCheckListItem::CheckBox ) { setText( 0, desc ); setOn( true ); } - VideoTrackViewCheckItem( VideoTrackViewCheckItem* parent, - const QString& desc ) - : QCheckListItem( parent, - QString::null, - QCheckListItem::CheckBox ) + VideoTrackViewCheckItem( VideoTrackViewCheckItem* tqparent, + const TQString& desc ) + : TQCheckListItem( tqparent, + TQString(), + TQCheckListItem::CheckBox ) { setText( 0, desc ); @@ -136,24 +136,24 @@ class K3bVideoCdView::VideoTrackViewCheckItem : public QCheckListItem }; -K3bVideoCdView::K3bVideoCdView( QWidget* parent, const char *name ) +K3bVideoCdView::K3bVideoCdView( TQWidget* tqparent, const char *name ) : K3bMediaContentsView( true, K3bMedium::CONTENT_VIDEO_CD, K3bDevice::MEDIA_CD_ALL, K3bDevice::STATE_INCOMPLETE|K3bDevice::STATE_COMPLETE, - parent, name ) + tqparent, name ) { - QGridLayout * mainGrid = new QGridLayout( mainWidget() ); + TQGridLayout * mainGrid = new TQGridLayout( mainWidget() ); // toolbox // ---------------------------------------------------------------------------------- - QHBoxLayout* toolBoxLayout = new QHBoxLayout( 0, 0, 0, "toolBoxLayout" ); + TQHBoxLayout* toolBoxLayout = new TQHBoxLayout( 0, 0, 0, "toolBoxLayout" ); m_toolBox = new K3bToolBox( mainWidget() ); toolBoxLayout->addWidget( m_toolBox ); - QSpacerItem* spacer = new QSpacerItem( 10, 10, QSizePolicy::Expanding, QSizePolicy::Minimum ); + TQSpacerItem* spacer = new TQSpacerItem( 10, 10, TQSizePolicy::Expanding, TQSizePolicy::Minimum ); toolBoxLayout->addItem( spacer ); - m_labelLength = new QLabel( mainWidget() ); - m_labelLength->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) ); + m_labelLength = new TQLabel( mainWidget() ); + m_labelLength->tqsetAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) ); toolBoxLayout->addWidget( m_labelLength ); // the track view @@ -161,7 +161,7 @@ K3bVideoCdView::K3bVideoCdView( QWidget* parent, const char *name ) m_trackView = new K3bListView( mainWidget() ); m_trackView->setFullWidth( true ); m_trackView->setAllColumnsShowFocus( true ); - m_trackView->setSelectionMode( QListView::Single ); + m_trackView->setSelectionMode( TQListView::Single ); m_trackView->setDragEnabled( true ); m_trackView->addColumn( i18n( "Item Name" ) ); m_trackView->addColumn( i18n( "Extracted Name" ) ); @@ -173,14 +173,14 @@ K3bVideoCdView::K3bVideoCdView( QWidget* parent, const char *name ) m_trackView->setItemsRenameable( false ); m_trackView->setRootIsDecorated( true ); - connect( m_trackView, SIGNAL( contextMenu( KListView*, QListViewItem*, const QPoint& ) ), - this, SLOT( slotContextMenu( KListView*, QListViewItem*, const QPoint& ) ) ); - connect( m_trackView, SIGNAL( selectionChanged( QListViewItem* ) ), - this, SLOT( slotTrackSelectionChanged( QListViewItem* ) ) ); - connect( m_trackView, SIGNAL( clicked( QListViewItem* ) ), - this, SLOT( slotStateChanged( QListViewItem* ) ) ); - connect( m_trackView, SIGNAL( spacePressed( QListViewItem* ) ), - this, SLOT( slotStateChanged( QListViewItem* ) ) ); + connect( m_trackView, TQT_SIGNAL( contextMenu( KListView*, TQListViewItem*, const TQPoint& ) ), + this, TQT_SLOT( slotContextMenu( KListView*, TQListViewItem*, const TQPoint& ) ) ); + connect( m_trackView, TQT_SIGNAL( selectionChanged( TQListViewItem* ) ), + this, TQT_SLOT( slotTrackSelectionChanged( TQListViewItem* ) ) ); + connect( m_trackView, TQT_SIGNAL( clicked( TQListViewItem* ) ), + this, TQT_SLOT( slotStateChanged( TQListViewItem* ) ) ); + connect( m_trackView, TQT_SIGNAL( spacePressed( TQListViewItem* ) ), + this, TQT_SLOT( slotStateChanged( TQListViewItem* ) ) ); mainGrid->addLayout( toolBoxLayout, 0, 0 ); @@ -211,7 +211,7 @@ void K3bVideoCdView::reloadMedium() m_trackView->setEnabled( false ); m_toolBox->setEnabled( false ); - QApplication::setOverrideCursor( QCursor(Qt::WaitCursor) ); + TQApplication::setOverrideCursor( TQCursor(TQt::WaitCursor) ); m_contentList.append( new VideoTrackViewCheckItem( m_trackView, i18n("Video CD MPEG tracks") ) ); m_contentList.append( new VideoTrackViewCheckItem( m_trackView, i18n("Video CD DATA track" ) ) ); @@ -232,7 +232,7 @@ void K3bVideoCdView::reloadMedium() K3b::Msf length( ( *it ).length() ); sequenceSize += length; m_videocdmpegsize += length.mode2Form2Bytes(); - ( void ) new VideoTrackViewItem( ( VideoTrackViewCheckItem* ) m_contentList[ 0 ], i18n( "Sequence-%1" ).arg( index ), "", index, length ); + ( void ) new VideoTrackViewItem( ( VideoTrackViewCheckItem* ) m_contentList[ 0 ], i18n( "Sequence-%1" ).tqarg( index ), "", index, length ); } else { K3b::Msf length( ( *it ).length() ); m_videocddatasize += length.mode2Form1Bytes(); @@ -248,11 +248,11 @@ void K3bVideoCdView::reloadMedium() m_videooptions ->setVideoCdSource( device()->devicename() ); - m_videocdinfo = new K3bVideoCdInfo( this ); + m_videocdinfo = new K3bVideoCdInfo( TQT_TQOBJECT(this) ); m_videocdinfo->info( device()->devicename() ); - connect( m_videocdinfo, SIGNAL( infoFinished( bool ) ), - this, SLOT( slotVideoCdInfoFinished( bool ) ) ); + connect( m_videocdinfo, TQT_SIGNAL( infoFinished( bool ) ), + this, TQT_SLOT( slotVideoCdInfoFinished( bool ) ) ); } @@ -265,7 +265,7 @@ void K3bVideoCdView::slotVideoCdInfoFinished( bool success ) m_trackView->setEnabled( true ); m_toolBox->setEnabled( true ); - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); } @@ -286,12 +286,12 @@ void K3bVideoCdView::updateDisplay() if ( check_item->key( 0, false ).compare( i18n( "Files" ) ) == 0 ) { if ( domTree.setContent( m_videocdinfoResult.xmlData ) ) { - QDomElement root = domTree.documentElement(); - QDomNode node; + TQDomElement root = domTree.documentElement(); + TQDomNode node; node = root.firstChild(); while ( !node.isNull() ) { if ( node.isElement() && node.nodeName() == "filesystem" ) { - QDomElement body = node.toElement(); + TQDomElement body = node.toElement(); buildTree( check_item, body ); break; } @@ -307,14 +307,14 @@ void K3bVideoCdView::updateDisplay() } if ( !m_videocdinfoResult.volumeId.isEmpty() ) { - QString description = m_videocdinfoResult.volumeId + " (" + m_videocdinfoResult.type + " " + m_videocdinfoResult.version + ")" ; + TQString description = m_videocdinfoResult.volumeId + " (" + m_videocdinfoResult.type + " " + m_videocdinfoResult.version + ")" ; setTitle( description ); m_videooptions ->setVideoCdDescription( description ); } else setTitle( i18n( "Video CD" ) ); - m_labelLength->setText( i18n( "1 track (%1)", "%n tracks (%1)", m_toc.count() ).arg( K3b::Msf( m_toc.length() ).toString() ) ); + m_labelLength->setText( i18n( "1 track (%1)", "%n tracks (%1)", m_toc.count() ).tqarg( K3b::Msf( m_toc.length() ).toString() ) ); } @@ -322,20 +322,20 @@ void K3bVideoCdView::initActions() { m_actionCollection = new KActionCollection( this ); - KAction* actionSelectAll = KStdAction::selectAll( this, SLOT( slotSelectAll() ), + KAction* actionSelectAll = KStdAction::selectAll( TQT_TQOBJECT(this), TQT_SLOT( slotSelectAll() ), m_actionCollection, "select_all" ); - KAction* actionDeselectAll = KStdAction::deselect( this, SLOT( slotDeselectAll() ), + KAction* actionDeselectAll = KStdAction::deselect( TQT_TQOBJECT(this), TQT_SLOT( slotDeselectAll() ), m_actionCollection, "deselect_all" ); actionDeselectAll->setText( i18n( "Dese&lect All" ) ); - KAction* actionSelect = new KAction( i18n( "Select Track" ), 0, 0, this, - SLOT( slotSelect() ), actionCollection(), + KAction* actionSelect = new KAction( i18n( "Select Track" ), 0, 0, TQT_TQOBJECT(this), + TQT_SLOT( slotSelect() ), actionCollection(), "select_track" ); - KAction* actionDeselect = new KAction( i18n( "Deselect Track" ), 0, 0, this, - SLOT( slotDeselect() ), actionCollection(), + KAction* actionDeselect = new KAction( i18n( "Deselect Track" ), 0, 0, TQT_TQOBJECT(this), + TQT_SLOT( slotDeselect() ), actionCollection(), "deselect_track" ); - KAction* actionStartRip = new KAction( i18n( "Start Ripping" ), "run", 0, this, - SLOT( startRip() ), actionCollection(), "start_rip" ); + KAction* actionStartRip = new KAction( i18n( "Start Ripping" ), "run", 0, TQT_TQOBJECT(this), + TQT_SLOT( startRip() ), actionCollection(), "start_rip" ); // TODO: set the actions tooltips and whatsthis infos @@ -354,25 +354,25 @@ void K3bVideoCdView::initActions() } -void K3bVideoCdView::slotContextMenu( KListView*, QListViewItem*, const QPoint& p ) +void K3bVideoCdView::slotContextMenu( KListView*, TQListViewItem*, const TQPoint& p ) { m_popupMenu->popup( p ); } -void K3bVideoCdView::slotTrackSelectionChanged( QListViewItem* item ) +void K3bVideoCdView::slotTrackSelectionChanged( TQListViewItem* item ) { actionCollection() ->action( "select_track" ) ->setEnabled( item != 0 ); actionCollection() ->action( "deselect_track" ) ->setEnabled( item != 0 ); } -void K3bVideoCdView::slotStateChanged( QListViewItem* item ) +void K3bVideoCdView::slotStateChanged( TQListViewItem* item ) { /* > QT 3.1 if ( !item == 0 && item ->isSelectable() ) { - if ( ( ( VideoTrackViewCheckItem* ) item) ->state() == QCheckListItem::On) + if ( ( ( VideoTrackViewCheckItem* ) item) ->state() == TQCheckListItem::On) slotSelect(); - else if ( ( ( VideoTrackViewCheckItem* ) item) ->state() == QCheckListItem::Off) + else if ( ( ( VideoTrackViewCheckItem* ) item) ->state() == TQCheckListItem::Off) slotDeselect(); } */ @@ -388,7 +388,7 @@ void K3bVideoCdView::startRip() { int selectedItems = 0; - for ( QListViewItemIterator it( m_trackView ); it.current(); ++it ) { + for ( TQListViewItemIterator it( m_trackView ); it.current(); ++it ) { if ( it.current() ->isSelectable() ) { if ( ( ( ( VideoTrackViewCheckItem* ) it.current()) ->key( 0, false ).compare( i18n("Video CD MPEG tracks" ) ) == 0 ) && ( ( VideoTrackViewCheckItem* ) it.current() ) ->isOn() ) { m_videooptions ->setVideoCdRipSequences( true ); @@ -416,7 +416,7 @@ void K3bVideoCdView::startRip() if ( m_videooptions ->getVideoCdRipSequences() ) videocdsize += m_videocdmpegsize; - kdDebug() << QString("(K3bVideoCdView::startRip()) m_videooptions ->setVideoCdSize( %1)").arg( videocdsize ) << endl; + kdDebug() << TQString("(K3bVideoCdView::startRip()) m_videooptions ->setVideoCdSize( %1)").tqarg( videocdsize ) << endl; m_videooptions ->setVideoCdSize( videocdsize ); K3bVideoCdRippingDialog rip( m_videooptions, this ); rip.exec(); @@ -425,23 +425,23 @@ void K3bVideoCdView::startRip() void K3bVideoCdView::slotSelectAll() { - for ( QListViewItemIterator it( m_trackView ); it.current(); ++it ) + for ( TQListViewItemIterator it( m_trackView ); it.current(); ++it ) if ( it.current() ->isSelectable() ) ( ( VideoTrackViewCheckItem* ) it.current() ) ->setOn( true ); } void K3bVideoCdView::slotDeselectAll() { - for ( QListViewItemIterator it( m_trackView ); it.current(); ++it ) + for ( TQListViewItemIterator it( m_trackView ); it.current(); ++it ) if ( it.current() ->isSelectable() ) ( ( VideoTrackViewCheckItem* ) it.current() ) ->setOn( false ); } void K3bVideoCdView::slotSelect() { - if ( QListViewItem * sel = m_trackView->selectedItem() ) { + if ( TQListViewItem * sel = m_trackView->selectedItem() ) { ( ( VideoTrackViewCheckItem* ) sel) ->setOn( true ); - QListViewItem * item = sel ->firstChild(); + TQListViewItem * item = sel ->firstChild(); while ( item ) { if ( item ->isSelectable() ) ( ( VideoTrackViewCheckItem* ) item) ->setOn( true ); @@ -453,9 +453,9 @@ void K3bVideoCdView::slotSelect() void K3bVideoCdView::slotDeselect() { - if ( QListViewItem * sel = m_trackView->selectedItem() ) { + if ( TQListViewItem * sel = m_trackView->selectedItem() ) { ( ( VideoTrackViewCheckItem* ) sel) ->setOn( false ); - QListViewItem * item = sel ->firstChild(); + TQListViewItem * item = sel ->firstChild(); while ( item ) { if ( item ->isSelectable() ) ( ( VideoTrackViewCheckItem* ) item) ->setOn( false ); @@ -470,19 +470,19 @@ void K3bVideoCdView::enableInteraction( bool b ) actionCollection()->action( "start_rip" )->setEnabled( b ); } -void K3bVideoCdView::buildTree( QListViewItem *parentItem, const QDomElement &parentElement, const QString& pname ) +void K3bVideoCdView::buildTree( TQListViewItem *tqparentItem, const TQDomElement &tqparentElement, const TQString& pname ) { VideoTrackViewItem * thisItem = 0; - QDomNode node = parentElement.firstChild(); + TQDomNode node = tqparentElement.firstChild(); while ( !node.isNull() ) { if ( node.isElement() && node.nodeName() == "folder" || node.nodeName() == "file" ) { - if ( parentItem == 0 ) + if ( tqparentItem == 0 ) thisItem = new VideoTrackViewItem( m_trackView, thisItem ); else - thisItem = new VideoTrackViewItem( parentItem, thisItem ); + thisItem = new VideoTrackViewItem( tqparentItem, thisItem ); - QString txt = node.firstChild().toElement().text(); + TQString txt = node.firstChild().toElement().text(); thisItem->setText( 0, txt); if ( node.nodeName() == "folder" ) { buildTree( thisItem, node.toElement(), pname + "_" + txt.lower() ); @@ -492,10 +492,10 @@ void K3bVideoCdView::buildTree( QListViewItem *parentItem, const QDomElement &pa buildTree( thisItem, node.toElement(), pname ); } } else if ( node.isElement() && node.nodeName() == "segment-item" || node.nodeName() == "sequence-item" ) { - if ( parentItem == 0 ) + if ( tqparentItem == 0 ) thisItem = new VideoTrackViewItem( m_trackView, thisItem ); else - thisItem = new VideoTrackViewItem( parentItem, thisItem ); + thisItem = new VideoTrackViewItem( tqparentItem, thisItem ); thisItem->setText( 0, node.toElement().attribute( "src" ) ); diff --git a/src/rip/k3bvideocdview.h b/src/rip/k3bvideocdview.h index cb3e7a6..65b2f8a 100644 --- a/src/rip/k3bvideocdview.h +++ b/src/rip/k3bvideocdview.h @@ -17,7 +17,7 @@ #ifndef _K3B_VIDEOCDVIEW_H_ #define _K3B_VIDEOCDVIEW_H_ -#include <qdom.h> +#include <tqdom.h> #include <k3bmediacontentsview.h> #include <k3bmedium.h> @@ -28,8 +28,8 @@ class KActionCollection; class KActionMenu; class KListView; -class QLabel; -class QListViewItem; +class TQLabel; +class TQListViewItem; class K3bListView; class K3bToolBox; @@ -46,9 +46,10 @@ namespace K3bDevice class K3bVideoCdView : public K3bMediaContentsView { Q_OBJECT + TQ_OBJECT public: - K3bVideoCdView( QWidget* parent = 0, const char * name = 0 ); + K3bVideoCdView( TQWidget* tqparent = 0, const char * name = 0 ); ~K3bVideoCdView(); KActionCollection* actionCollection() const @@ -57,9 +58,9 @@ class K3bVideoCdView : public K3bMediaContentsView } private slots: - void slotContextMenu( KListView*, QListViewItem*, const QPoint& ); - void slotTrackSelectionChanged( QListViewItem* ); - void slotStateChanged( QListViewItem* ); + void slotContextMenu( KListView*, TQListViewItem*, const TQPoint& ); + void slotTrackSelectionChanged( TQListViewItem* ); + void slotStateChanged( TQListViewItem* ); void slotVideoCdInfoFinished( bool ); void startRip(); @@ -78,7 +79,7 @@ class K3bVideoCdView : public K3bMediaContentsView void initActions(); void updateDisplay(); void enableInteraction( bool ); - void buildTree( QListViewItem *parentItem, const QDomElement &parentElement, const QString& pname = QString::null ); + void buildTree( TQListViewItem *tqparentItem, const TQDomElement &tqparentElement, const TQString& pname = TQString() ); K3bDevice::Toc m_toc; @@ -91,11 +92,11 @@ class K3bVideoCdView : public K3bMediaContentsView K3bListView* m_trackView; K3bToolBox* m_toolBox; - QLabel* m_labelLength; + TQLabel* m_labelLength; - QDomDocument domTree; + TQDomDocument domTree; - QValueList<VideoTrackViewCheckItem *> m_contentList; + TQValueList<VideoTrackViewCheckItem *> m_contentList; unsigned long m_videocddatasize; unsigned long m_videocdmpegsize; diff --git a/src/rip/videodvd/base_k3bvideodvdrippingwidget.ui b/src/rip/videodvd/base_k3bvideodvdrippingwidget.ui index 72b03b4..5d2ffdd 100644 --- a/src/rip/videodvd/base_k3bvideodvdrippingwidget.ui +++ b/src/rip/videodvd/base_k3bvideodvdrippingwidget.ui @@ -1,11 +1,11 @@ <!DOCTYPE UI><UI version="3.2" stdsetdef="1"> <class>base_K3bVideoDVDRippingWidget</class> <author>Seastian Trueg</author> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>Form1</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>0</x> <y>0</y> @@ -20,7 +20,7 @@ <property name="margin"> <number>0</number> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel4</cstring> </property> @@ -39,11 +39,11 @@ <bool>true</bool> </property> </widget> - <widget class="QTabWidget"> + <widget class="TQTabWidget"> <property name="name"> <cstring>tabWidget2</cstring> </property> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>tab</cstring> </property> @@ -54,7 +54,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QGroupBox" row="0" column="1"> + <widget class="TQGroupBox" row="0" column="1"> <property name="name"> <cstring>groupBox6</cstring> </property> @@ -65,15 +65,15 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout9</cstring> + <cstring>tqlayout9</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel2_2</cstring> </property> @@ -81,7 +81,7 @@ <string>Video Size:</string> </property> </widget> - <widget class="QComboBox"> + <widget class="TQComboBox"> <property name="name"> <cstring>m_comboVideoSize</cstring> </property> @@ -94,7 +94,7 @@ </sizepolicy> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>m_buttonCustomPictureSize</cstring> </property> @@ -104,15 +104,15 @@ </widget> </hbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout9</cstring> + <cstring>tqlayout9</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel2_3</cstring> </property> @@ -120,7 +120,7 @@ <string>Video Bitrate:</string> </property> </widget> - <widget class="QSpinBox"> + <widget class="TQSpinBox"> <property name="name"> <cstring>m_spinVideoBitrate</cstring> </property> @@ -149,7 +149,7 @@ </widget> </vbox> </widget> - <widget class="QGroupBox" row="1" column="0"> + <widget class="TQGroupBox" row="1" column="0"> <property name="name"> <cstring>groupBox1_2</cstring> </property> @@ -168,7 +168,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>textLabel1_2</cstring> </property> @@ -181,18 +181,18 @@ <cstring>m_editBaseDir</cstring> </property> </widget> - <widget class="QLabel" row="1" column="1"> + <widget class="TQLabel" row="1" column="1"> <property name="name"> <cstring>m_labelFreeSpace</cstring> </property> <property name="text"> <string>-</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> </widget> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>textLabel1_2_2</cstring> </property> @@ -200,20 +200,20 @@ <string>Space needed:</string> </property> </widget> - <widget class="QLabel" row="2" column="1"> + <widget class="TQLabel" row="2" column="1"> <property name="name"> <cstring>m_labelNeededSpace</cstring> </property> <property name="text"> <string>-</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> </widget> </grid> </widget> - <widget class="QGroupBox" row="1" column="1"> + <widget class="TQGroupBox" row="1" column="1"> <property name="name"> <cstring>groupBox4</cstring> </property> @@ -224,11 +224,11 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QWidgetStack"> + <widget class="TQWidgetStack"> <property name="name"> <cstring>m_stackAudioQuality</cstring> </property> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>m_stackPageAudioQualityMp3</cstring> </property> @@ -242,7 +242,7 @@ <property name="margin"> <number>0</number> </property> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>m_checkAudioVBR</cstring> </property> @@ -250,15 +250,15 @@ <string>Variable &Bitrate</string> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout4</cstring> + <cstring>tqlayout4</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>m_labelAudioBitrate</cstring> </property> @@ -266,7 +266,7 @@ <string>Audio Bitrate:</string> </property> </widget> - <widget class="QComboBox"> + <widget class="TQComboBox"> <property name="name"> <cstring>m_comboAudioBitrate</cstring> </property> @@ -278,7 +278,7 @@ </widget> </vbox> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>m_stackPageAudioQualityAC3Pt</cstring> </property> @@ -310,7 +310,7 @@ </widget> </hbox> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>m_stackPageAudioQualityAC3</cstring> </property> @@ -324,15 +324,15 @@ <property name="margin"> <number>0</number> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout8</cstring> + <cstring>tqlayout8</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1_3</cstring> </property> @@ -340,7 +340,7 @@ <string>Audio Bitrate:</string> </property> </widget> - <widget class="QSpinBox"> + <widget class="TQSpinBox"> <property name="name"> <cstring>m_spinAudioBitrate</cstring> </property> @@ -372,7 +372,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>0</height> @@ -384,7 +384,7 @@ </widget> </vbox> </widget> - <widget class="QGroupBox" row="0" column="0"> + <widget class="TQGroupBox" row="0" column="0"> <property name="name"> <cstring>groupBox1</cstring> </property> @@ -395,15 +395,15 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout10</cstring> + <cstring>tqlayout10</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -421,15 +421,15 @@ </widget> </hbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout9</cstring> + <cstring>tqlayout9</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel2</cstring> </property> @@ -451,7 +451,7 @@ </widget> </grid> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>TabPage</cstring> </property> @@ -462,15 +462,15 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout14</cstring> + <cstring>tqlayout14</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1_4</cstring> </property> @@ -478,7 +478,7 @@ <string>Ripped files pattern:</string> </property> </widget> - <widget class="QComboBox"> + <widget class="TQComboBox"> <property name="name"> <cstring>m_comboFilenamePattern</cstring> </property> @@ -509,19 +509,19 @@ <property name="text"> <string>See special strings</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout8</cstring> + <cstring>tqlayout8</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>m_checkBlankReplace</cstring> </property> @@ -560,7 +560,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>5</width> <height>1</height> @@ -569,7 +569,7 @@ </spacer> </vbox> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>tab</cstring> </property> @@ -580,7 +580,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>m_checkTwoPassEncoding</cstring> </property> @@ -602,7 +602,7 @@ <p>2-pass encoding results in a doubled encoding time.</string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>m_checkAutoClipping</cstring> </property> @@ -621,7 +621,7 @@ <p>Although this method is very reliable there may be problems if the source material is exceptionally short or dark.</string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>m_checkAudioResampling</cstring> </property> @@ -642,7 +642,7 @@ <p>If this option is checked K3b will change the sampling rate of the audio stream to 44100 Hz.</string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>m_checkLowPriority</cstring> </property> @@ -663,7 +663,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>1</height> @@ -706,7 +706,7 @@ <slot>setEnabled(bool)</slot> </connection> </connections> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>klistview.h</includehint> <includehint>kurlrequester.h</includehint> diff --git a/src/rip/videodvd/k3bvideodvdrippingdialog.cpp b/src/rip/videodvd/k3bvideodvdrippingdialog.cpp index ddb5ff2..57f6426 100644 --- a/src/rip/videodvd/k3bvideodvdrippingdialog.cpp +++ b/src/rip/videodvd/k3bvideodvdrippingdialog.cpp @@ -34,14 +34,14 @@ #include <kconfig.h> #include <kmessagebox.h> -#include <qlayout.h> -#include <qcheckbox.h> -#include <qspinbox.h> -#include <qstyle.h> -#include <qfontmetrics.h> +#include <tqlayout.h> +#include <tqcheckbox.h> +#include <tqspinbox.h> +#include <tqstyle.h> +#include <tqfontmetrics.h> -static QString videoCodecId( K3bVideoDVDTitleTranscodingJob::VideoCodec codec ) +static TQString videoCodecId( K3bVideoDVDTitleTranscodingJob::VideoCodec codec ) { switch( codec ) { case K3bVideoDVDTitleTranscodingJob::VIDEO_CODEC_FFMPEG_MPEG4: @@ -54,7 +54,7 @@ static QString videoCodecId( K3bVideoDVDTitleTranscodingJob::VideoCodec codec ) } -static QString audioCodecId( K3bVideoDVDTitleTranscodingJob::AudioCodec codec ) +static TQString audioCodecId( K3bVideoDVDTitleTranscodingJob::AudioCodec codec ) { switch( codec ) { case K3bVideoDVDTitleTranscodingJob::AUDIO_CODEC_MP3: @@ -69,7 +69,7 @@ static QString audioCodecId( K3bVideoDVDTitleTranscodingJob::AudioCodec codec ) } -static K3bVideoDVDTitleTranscodingJob::VideoCodec videoCodecFromId( const QString& codec ) +static K3bVideoDVDTitleTranscodingJob::VideoCodec videoCodecFromId( const TQString& codec ) { if( codec == "xvid" ) return K3bVideoDVDTitleTranscodingJob::VIDEO_CODEC_XVID; @@ -78,7 +78,7 @@ static K3bVideoDVDTitleTranscodingJob::VideoCodec videoCodecFromId( const QStrin } -static K3bVideoDVDTitleTranscodingJob::AudioCodec audioCodecFromId( const QString& codec ) +static K3bVideoDVDTitleTranscodingJob::AudioCodec audioCodecFromId( const TQString& codec ) { if( codec == "ac3_stereo" ) return K3bVideoDVDTitleTranscodingJob::AUDIO_CODEC_AC3_STEREO; @@ -90,7 +90,7 @@ static K3bVideoDVDTitleTranscodingJob::AudioCodec audioCodecFromId( const QStrin // resize according to aspect ratio -static QSize resizeTitle( const K3bVideoDVD::VideoStream& title, const QSize& size ) +static TQSize resizeTitle( const K3bVideoDVD::VideoStream& title, const TQSize& size ) { int w = size.width(); int h = size.height(); @@ -108,18 +108,18 @@ static QSize resizeTitle( const K3bVideoDVD::VideoStream& title, const QSize& si h = w * rh / rw; } - return QSize(w,h); + return TQSize(w,h); } -class K3bVideoDVDRippingDialog::AudioStreamViewItem : public QCheckListItem +class K3bVideoDVDRippingDialog::AudioStreamViewItem : public TQCheckListItem { public: AudioStreamViewItem( K3bVideoDVDRippingDialog* dlg, - QCheckListItem* parent, QListViewItem* after, const QString& text, + TQCheckListItem* tqparent, TQListViewItem* after, const TQString& text, int audioStream ) - : QCheckListItem( parent, after, text, RadioButton ), + : TQCheckListItem( tqparent, after, text, RadioButton ), m_audioStream( audioStream ), m_dlg( dlg ) { } @@ -127,7 +127,7 @@ public: private: void stateChange( bool ) { if( state() == On ) { - m_dlg->m_titleRipInfos[static_cast<QCheckListItem*>(parent())].audioStream = m_audioStream; + m_dlg->m_titleRipInfos[static_cast<TQCheckListItem*>(tqparent())].audioStream = m_audioStream; m_dlg->slotUpdateFilenames(); } } @@ -145,11 +145,11 @@ public: K3bVideoDVDRippingDialog::K3bVideoDVDRippingDialog( const K3bVideoDVD::VideoDVD& dvd, - const QValueList<int>& titles, - QWidget* parent, const char* name ) - : K3bInteractionDialog( parent, name, + const TQValueList<int>& titles, + TQWidget* tqparent, const char* name ) + : K3bInteractionDialog( tqparent, name, i18n("Video DVD Ripping"), - QString::null, + TQString(), START_BUTTON|CANCEL_BUTTON, START_BUTTON, "VideoDVD Ripping" ), // config group @@ -157,22 +157,22 @@ K3bVideoDVDRippingDialog::K3bVideoDVDRippingDialog( const K3bVideoDVD::VideoDVD& { d = new Private; - QWidget* frame = mainWidget(); - QHBoxLayout* frameLayout = new QHBoxLayout( frame ); + TQWidget* frame = mainWidget(); + TQHBoxLayout* frameLayout = new TQHBoxLayout( frame ); frameLayout->setMargin( 0 ); frameLayout->setAutoAdd( true ); m_w = new K3bVideoDVDRippingWidget( frame ); - connect( m_w, SIGNAL(changed()), - this, SLOT(slotUpdateFilesizes()) ); - connect( m_w, SIGNAL(changed()), - this, SLOT(slotUpdateFilenames()) ); - connect( m_w, SIGNAL(changed()), - this, SLOT(slotUpdateVideoSizes()) ); + connect( m_w, TQT_SIGNAL(changed()), + this, TQT_SLOT(slotUpdateFilesizes()) ); + connect( m_w, TQT_SIGNAL(changed()), + this, TQT_SLOT(slotUpdateFilenames()) ); + connect( m_w, TQT_SIGNAL(changed()), + this, TQT_SLOT(slotUpdateVideoSizes()) ); setTitle( i18n("Video DVD Ripping"), i18n("1 title from %1", "%n titles from %1", titles.count()) - .arg( k3bappcore->mediaCache()->medium(m_dvd.device()).beautifiedVolumeId() ) ); + .tqarg( k3bappcore->mediaCache()->medium(m_dvd.device()).beautifiedVolumeId() ) ); // populate list map populateTitleView( titles ); @@ -185,23 +185,23 @@ K3bVideoDVDRippingDialog::~K3bVideoDVDRippingDialog() } -void K3bVideoDVDRippingDialog::populateTitleView( const QValueList<int>& titles ) +void K3bVideoDVDRippingDialog::populateTitleView( const TQValueList<int>& titles ) { m_w->m_titleView->clear(); m_titleRipInfos.clear(); - QCheckListItem* titleItem = 0; - for( QValueList<int>::const_iterator it = titles.begin(); it != titles.end(); ++it ) { - titleItem = new QCheckListItem( m_w->m_titleView, + TQCheckListItem* titleItem = 0; + for( TQValueList<int>::const_iterator it = titles.begin(); it != titles.end(); ++it ) { + titleItem = new TQCheckListItem( m_w->m_titleView, titleItem, i18n("Title %1 (%2)") - .arg(*it) - .arg(m_dvd[*it-1].playbackTime().toString()), - QCheckListItem::RadioButtonController ); - titleItem->setText( 1, QString("%1x%2") - .arg(m_dvd[*it-1].videoStream().realPictureWidth()) - .arg(m_dvd[*it-1].videoStream().realPictureHeight()) ); - titleItem->setText( 3, QString("%1 Title %2.avi").arg(m_dvd.volumeIdentifier()).arg(*it) ); + .tqarg(*it) + .tqarg(m_dvd[*it-1].playbackTime().toString()), + TQCheckListItem::RadioButtonController ); + titleItem->setText( 1, TQString("%1x%2") + .tqarg(m_dvd[*it-1].videoStream().realPictureWidth()) + .tqarg(m_dvd[*it-1].videoStream().realPictureHeight()) ); + titleItem->setText( 3, TQString("%1 Title %2.avi").tqarg(m_dvd.volumeIdentifier()).tqarg(*it) ); // now for the rip info K3bVideoDVDRippingJob::TitleRipInfo ri( *it ); @@ -219,30 +219,30 @@ void K3bVideoDVDRippingDialog::populateTitleView( const QValueList<int>& titles } } - QListViewItem* asI = 0; + TQListViewItem* asI = 0; for( unsigned int i = 0; i < m_dvd[*it-1].numAudioStreams(); ++i ) { - QString text = i18n("%1 %2Ch (%3%4)") - .arg( K3bVideoDVD::audioFormatString( m_dvd[*it-1].audioStream(i).format() ) ) - .arg( m_dvd[*it-1].audioStream(i).channels() ) - .arg( m_dvd[*it-1].audioStream(i).langCode().isEmpty() + TQString text = i18n("%1 %2Ch (%3%4)") + .tqarg( K3bVideoDVD::audioFormatString( m_dvd[*it-1].audioStream(i).format() ) ) + .tqarg( m_dvd[*it-1].audioStream(i).channels() ) + .tqarg( m_dvd[*it-1].audioStream(i).langCode().isEmpty() ? i18n("unknown language") : KGlobal::locale()->twoAlphaToLanguageName( m_dvd[*it-1].audioStream(i).langCode() ) ) - .arg( m_dvd[*it-1].audioStream(i).codeExtension() != K3bVideoDVD::AUDIO_CODE_EXT_UNSPECIFIED - ? QString(" ") + K3bVideoDVD::audioCodeExtensionString( m_dvd[*it-1].audioStream(i).codeExtension() ) - : QString::null ); + .tqarg( m_dvd[*it-1].audioStream(i).codeExtension() != K3bVideoDVD::AUDIO_CODE_EXT_UNSPECIFIED + ? TQString(" ") + K3bVideoDVD::audioCodeExtensionString( m_dvd[*it-1].audioStream(i).codeExtension() ) + : TQString() ); if( m_dvd[*it-1].audioStream(i).format() == K3bVideoDVD::AUDIO_FORMAT_DTS ) { - // width of the radio button from QCheckListItem::paintCell - int buttonSize = style().pixelMetric( QStyle::PM_CheckListButtonSize, m_w->m_titleView ) + 4; + // width of the radio button from TQCheckListItem::paintCell + int buttonSize = style().tqpixelMetric( TQStyle::PM_CheckListButtonSize, m_w->m_titleView ) + 4; int spaceWidth = fontMetrics().width( ' ' ); int numSpaces = buttonSize/spaceWidth; - asI = new QListViewItem( titleItem, asI, QString().fill( ' ', numSpaces ) + text + " (" + i18n("not supported") + ")" ); + asI = new TQListViewItem( titleItem, asI, TQString().fill( ' ', numSpaces ) + text + " (" + i18n("not supported") + ")" ); } else { asI = new AudioStreamViewItem( this, titleItem, asI, text, i ); if( ri.audioStream == (int)i ) - ((AudioStreamViewItem*)asI)->setState( QCheckListItem::On ); + ((AudioStreamViewItem*)asI)->setState( TQCheckListItem::On ); } } @@ -255,14 +255,14 @@ void K3bVideoDVDRippingDialog::populateTitleView( const QValueList<int>& titles void K3bVideoDVDRippingDialog::slotUpdateFilenames() { - QString baseDir = K3b::prepareDir( m_w->m_editBaseDir->url() ); + TQString baseDir = K3b::prepareDir( m_w->m_editBaseDir->url() ); d->fsInfo.setPath( baseDir ); - for( QMap<QCheckListItem*, K3bVideoDVDRippingJob::TitleRipInfo>::iterator it = m_titleRipInfos.begin(); + for( TQMap<TQCheckListItem*, K3bVideoDVDRippingJob::TitleRipInfo>::iterator it = m_titleRipInfos.begin(); it != m_titleRipInfos.end(); ++it ) { - QString f = d->fsInfo.fixupPath( createFilename( it.data(), m_w->m_comboFilenamePattern->currentText() ) ); + TQString f = d->fsInfo.fixupPath( createFilename( it.data(), m_w->m_comboFilenamePattern->currentText() ) ); if( m_w->m_checkBlankReplace->isChecked() ) - f.replace( QRegExp( "\\s" ), m_w->m_editBlankReplace->text() ); + f.tqreplace( TQRegExp( "\\s" ), m_w->m_editBlankReplace->text() ); it.data().filename = baseDir + f; it.key()->setText( 3, f ); } @@ -275,7 +275,7 @@ void K3bVideoDVDRippingDialog::slotUpdateFilesizes() KIO::filesize_t overallSize = 0ULL; // update file sizes - for( QMap<QCheckListItem*, K3bVideoDVDRippingJob::TitleRipInfo>::iterator it = m_titleRipInfos.begin(); + for( TQMap<TQCheckListItem*, K3bVideoDVDRippingJob::TitleRipInfo>::iterator it = m_titleRipInfos.begin(); it != m_titleRipInfos.end(); ++it ) { double sec = m_dvd[it.data().title-1].playbackTime().totalSeconds(); @@ -298,24 +298,24 @@ void K3bVideoDVDRippingDialog::slotUpdateFilesizes() void K3bVideoDVDRippingDialog::slotUpdateVideoSizes() { - QSize size = m_w->selectedPictureSize(); - for( QMap<QCheckListItem*, K3bVideoDVDRippingJob::TitleRipInfo>::iterator it = m_titleRipInfos.begin(); + TQSize size = m_w->selectedPictureSize(); + for( TQMap<TQCheckListItem*, K3bVideoDVDRippingJob::TitleRipInfo>::iterator it = m_titleRipInfos.begin(); it != m_titleRipInfos.end(); ++it ) { - QSize s( resizeTitle( m_dvd[it.data().title-1].videoStream(), size ) ); - it.key()->setText( 1, QString("%1x%2").arg(s.width()).arg(s.height()) ); + TQSize s( resizeTitle( m_dvd[it.data().title-1].videoStream(), size ) ); + it.key()->setText( 1, TQString("%1x%2").tqarg(s.width()).tqarg(s.height()) ); } } -void K3bVideoDVDRippingDialog::setBaseDir( const QString& path ) +void K3bVideoDVDRippingDialog::setBaseDir( const TQString& path ) { m_w->m_editBaseDir->setURL( path ); } -QString K3bVideoDVDRippingDialog::createFilename( const K3bVideoDVDRippingJob::TitleRipInfo& info, const QString& pattern ) const +TQString K3bVideoDVDRippingDialog::createFilename( const K3bVideoDVDRippingJob::TitleRipInfo& info, const TQString& pattern ) const { - QString f; + TQString f; const K3bVideoDVD::Title& title = m_dvd[info.title-1]; @@ -325,17 +325,17 @@ QString K3bVideoDVDRippingDialog::createFilename( const K3bVideoDVDRippingJob::T // if( pattern[i] == '%' ) { ++i; // skip the % - QChar c = pattern[i]; + TQChar c = pattern[i]; // // first check if we have a long keyword instead of a one-char // if( pattern[i] == '{' ) { - int j = pattern.find( '}', i ); + int j = pattern.tqfind( '}', i ); if( j < 0 ) // no closing bracket -> no valid pattern c = '*'; else { - QString keyword = pattern.mid( i+1, j-i-1 ); + TQString keyword = pattern.mid( i+1, j-i-1 ); if( keyword == "titlenumber" || keyword == "title_number" || keyword == "title" ) { @@ -422,7 +422,7 @@ QString K3bVideoDVDRippingDialog::createFilename( const K3bVideoDVDRippingJob::T switch( c ) { case PATTERN_TITLE_NUMBER: - f.append( QString::number(info.title).rightJustify( 2, '0' ) ); + f.append( TQString::number(info.title).rightJustify( 2, '0' ) ); break; case PATTERN_VOLUME_ID: f.append( m_dvd.volumeIdentifier() ); @@ -455,13 +455,13 @@ QString K3bVideoDVDRippingDialog::createFilename( const K3bVideoDVDRippingJob::T : 2 ) ); break; case PATTERN_ORIG_VIDEO_SIZE: - f.append( QString("%1x%2") - .arg(title.videoStream().pictureWidth()) - .arg(title.videoStream().pictureHeight()) ); + f.append( TQString("%1x%2") + .tqarg(title.videoStream().pictureWidth()) + .tqarg(title.videoStream().pictureHeight()) ); break; case PATTERN_VIDEO_SIZE: { - QSize s( resizeTitle( m_dvd[info.title-1].videoStream(), m_w->selectedPictureSize() ) ); - f.append( QString("%1x%2").arg(s.width()).arg(s.height()) ); + TQSize s( resizeTitle( m_dvd[info.title-1].videoStream(), m_w->selectedPictureSize() ) ); + f.append( TQString("%1x%2").tqarg(s.width()).tqarg(s.height()) ); break; } case PATTERN_ASPECT_RATIO: @@ -471,7 +471,7 @@ QString K3bVideoDVDRippingDialog::createFilename( const K3bVideoDVDRippingJob::T f.append( "16:9" ); break; case PATTERN_CURRENT_DATE: - f.append( KGlobal::locale()->formatDate( QDate::currentDate() ) ); + f.append( KGlobal::locale()->formatDate( TQDate::tqcurrentDate() ) ); break; default: f.append( pattern[i-1] ); @@ -557,7 +557,7 @@ void K3bVideoDVDRippingDialog::slotStartClicked() // We can only use the AC3 pass-through mode for AC3 streams // if( m_w->selectedAudioCodec() == K3bVideoDVDTitleTranscodingJob::AUDIO_CODEC_AC3_PASSTHROUGH ) { - for( QMap<QCheckListItem*, K3bVideoDVDRippingJob::TitleRipInfo>::iterator it = m_titleRipInfos.begin(); + for( TQMap<TQCheckListItem*, K3bVideoDVDRippingJob::TitleRipInfo>::iterator it = m_titleRipInfos.begin(); it != m_titleRipInfos.end(); ++it ) { if( m_dvd[it.data().title-1].numAudioStreams() > 0 && m_dvd[it.data().title-1].audioStream(it.data().audioStream).format() != K3bVideoDVD::AUDIO_FORMAT_AC3 ) { @@ -571,10 +571,10 @@ void K3bVideoDVDRippingDialog::slotStartClicked() } // check if we need to overwrite some files... - QStringList filesToOverwrite; - for( QMap<QCheckListItem*, K3bVideoDVDRippingJob::TitleRipInfo>::iterator it = m_titleRipInfos.begin(); + TQStringList filesToOverwrite; + for( TQMap<TQCheckListItem*, K3bVideoDVDRippingJob::TitleRipInfo>::iterator it = m_titleRipInfos.begin(); it != m_titleRipInfos.end(); ++it ) { - if( QFile::exists( it.data().filename ) ) + if( TQFile::exists( it.data().filename ) ) filesToOverwrite.append( it.data().filename ); } @@ -586,10 +586,10 @@ void K3bVideoDVDRippingDialog::slotStartClicked() return; - QSize videoSize = m_w->selectedPictureSize(); + TQSize videoSize = m_w->selectedPictureSize(); int i = 0; - QValueVector<K3bVideoDVDRippingJob::TitleRipInfo> titles( m_titleRipInfos.count() ); - for( QMapConstIterator<QCheckListItem*, K3bVideoDVDRippingJob::TitleRipInfo> it = m_titleRipInfos.begin(); + TQValueVector<K3bVideoDVDRippingJob::TitleRipInfo> titles( m_titleRipInfos.count() ); + for( TQMapConstIterator<TQCheckListItem*, K3bVideoDVDRippingJob::TitleRipInfo> it = m_titleRipInfos.begin(); it != m_titleRipInfos.end(); ++it ) { titles[i] = it.data(); titles[i].videoBitrate = 0; // use the global bitrate set below @@ -611,7 +611,7 @@ void K3bVideoDVDRippingDialog::slotStartClicked() } // start the job - K3bJobProgressDialog dlg( parentWidget() ); + K3bJobProgressDialog dlg( tqparentWidget() ); K3bVideoDVDRippingJob* job = new K3bVideoDVDRippingJob( &dlg, &dlg ); job->setVideoDVD( m_dvd ); job->setTitles( titles ); diff --git a/src/rip/videodvd/k3bvideodvdrippingdialog.h b/src/rip/videodvd/k3bvideodvdrippingdialog.h index 1acad53..bd8b7a0 100644 --- a/src/rip/videodvd/k3bvideodvdrippingdialog.h +++ b/src/rip/videodvd/k3bvideodvdrippingdialog.h @@ -20,24 +20,25 @@ #include <k3bvideodvd.h> #include "k3bvideodvdrippingjob.h" -#include <qvaluelist.h> -#include <qmap.h> +#include <tqvaluelist.h> +#include <tqmap.h> class K3bVideoDVDRippingWidget; -class QCheckListItem; +class TQCheckListItem; class K3bVideoDVDRippingDialog : public K3bInteractionDialog { Q_OBJECT + TQ_OBJECT public: K3bVideoDVDRippingDialog( const K3bVideoDVD::VideoDVD& dvd, - const QValueList<int>& titles, - QWidget *parent = 0, const char *name = 0 ); + const TQValueList<int>& titles, + TQWidget *tqparent = 0, const char *name = 0 ); ~K3bVideoDVDRippingDialog(); - void setBaseDir( const QString& path ); + void setBaseDir( const TQString& path ); enum FileNamingPattern { PATTERN_TITLE_NUMBER = 't', @@ -60,9 +61,9 @@ class K3bVideoDVDRippingDialog : public K3bInteractionDialog void slotUpdateVideoSizes(); private: - void populateTitleView( const QValueList<int>& titles ); + void populateTitleView( const TQValueList<int>& titles ); - QString createFilename( const K3bVideoDVDRippingJob::TitleRipInfo& info, const QString& pattern ) const; + TQString createFilename( const K3bVideoDVDRippingJob::TitleRipInfo& info, const TQString& pattern ) const; void loadK3bDefaults(); void loadUserDefaults( KConfigBase* ); @@ -71,7 +72,7 @@ class K3bVideoDVDRippingDialog : public K3bInteractionDialog K3bVideoDVDRippingWidget* m_w; K3bVideoDVD::VideoDVD m_dvd; - QMap<QCheckListItem*, K3bVideoDVDRippingJob::TitleRipInfo> m_titleRipInfos; + TQMap<TQCheckListItem*, K3bVideoDVDRippingJob::TitleRipInfo> m_titleRipInfos; class AudioStreamViewItem; diff --git a/src/rip/videodvd/k3bvideodvdrippingjob.cpp b/src/rip/videodvd/k3bvideodvdrippingjob.cpp index c10c127..1cc9e9e 100644 --- a/src/rip/videodvd/k3bvideodvdrippingjob.cpp +++ b/src/rip/videodvd/k3bvideodvdrippingjob.cpp @@ -38,7 +38,7 @@ K3bVideoDVDRippingJob::TitleRipInfo::TitleRipInfo() K3bVideoDVDRippingJob::TitleRipInfo::TitleRipInfo( int _title, int _audioStream, - const QString& fn, + const TQString& fn, int _width, int _height, int _videoBitrate, @@ -76,24 +76,24 @@ public: int failedTitles; - QValueVector<double> titleProgressParts; - QValueVector<double> titleClippingProgressParts; + TQValueVector<double> titleProgressParts; + TQValueVector<double> titleClippingProgressParts; }; -K3bVideoDVDRippingJob::K3bVideoDVDRippingJob( K3bJobHandler* hdl, QObject* parent ) - : K3bJob( hdl, parent ) +K3bVideoDVDRippingJob::K3bVideoDVDRippingJob( K3bJobHandler* hdl, TQObject* tqparent ) + : K3bJob( hdl, tqparent ) { d = new Private(); m_transcodingJob = new K3bVideoDVDTitleTranscodingJob( this, this ); connectSubJob( m_transcodingJob, - SLOT(slotTranscodingJobFinished(bool)), - SIGNAL(newTask(const QString&)), - SIGNAL(newSubTask(const QString&)), - SLOT(slotTranscodingProgress(int)), - SIGNAL(subPercent(int)), + TQT_SLOT(slotTranscodingJobFinished(bool)), + TQT_SIGNAL(newTask(const TQString&)), + TQT_SIGNAL(newSubTask(const TQString&)), + TQT_SLOT(slotTranscodingProgress(int)), + TQT_SIGNAL(subPercent(int)), 0, 0 ); m_detectClippingJob = 0; @@ -106,17 +106,17 @@ K3bVideoDVDRippingJob::~K3bVideoDVDRippingJob() } -QString K3bVideoDVDRippingJob::jobDescription() const +TQString K3bVideoDVDRippingJob::jobDescription() const { return i18n("Ripping Video DVD Titles"); } -QString K3bVideoDVDRippingJob::jobDetails() const +TQString K3bVideoDVDRippingJob::jobDetails() const { return i18n("Transcoding %n title to %1/%2", "Transcoding %n titles to %1/%2", m_titleRipInfos.count() ) - .arg( K3bVideoDVDTitleTranscodingJob::videoCodecString( m_transcodingJob->videoCodec() ) ) - .arg( K3bVideoDVDTitleTranscodingJob::audioCodecString( m_transcodingJob->audioCodec() ) ); + .tqarg( K3bVideoDVDTitleTranscodingJob::videoCodecString( m_transcodingJob->videoCodec() ) ) + .tqarg( K3bVideoDVDTitleTranscodingJob::audioCodecString( m_transcodingJob->audioCodec() ) ); } @@ -143,10 +143,10 @@ void K3bVideoDVDRippingJob::slotTranscodingJobFinished( bool success ) } else { if( success ) - emit infoMessage( i18n("Successfully ripped title %1").arg(m_titleRipInfos[d->currentTitleInfoIndex].title), SUCCESS ); + emit infoMessage( i18n("Successfully ripped title %1").tqarg(m_titleRipInfos[d->currentTitleInfoIndex].title), SUCCESS ); else { d->failedTitles++; - emit infoMessage( i18n("Failed to rip title %1").arg(m_titleRipInfos[d->currentTitleInfoIndex].title), ERROR ); + emit infoMessage( i18n("Failed to rip title %1").tqarg(m_titleRipInfos[d->currentTitleInfoIndex].title), ERROR ); } ++d->currentTitleInfoIndex ; @@ -176,11 +176,11 @@ void K3bVideoDVDRippingJob::slotDetectClippingJobFinished( bool success ) m_titleRipInfos[d->currentTitleInfoIndex].clipRight = 0; if( success ) { - emit infoMessage( i18n("Determined clipping values for title %1").arg(m_titleRipInfos[d->currentTitleInfoIndex].title), SUCCESS ); + emit infoMessage( i18n("Determined clipping values for title %1").tqarg(m_titleRipInfos[d->currentTitleInfoIndex].title), SUCCESS ); emit infoMessage( i18n("Top: %1, Bottom: %2") - .arg(m_detectClippingJob->clippingTop()).arg(m_detectClippingJob->clippingBottom()), INFO ); + .tqarg(m_detectClippingJob->clippingTop()).tqarg(m_detectClippingJob->clippingBottom()), INFO ); emit infoMessage( i18n("Left: %1, Right: %2") - .arg(m_detectClippingJob->clippingLeft()).arg(m_detectClippingJob->clippingRight()), INFO ); + .tqarg(m_detectClippingJob->clippingLeft()).tqarg(m_detectClippingJob->clippingRight()), INFO ); // let's see if the clipping values make sense if( m_detectClippingJob->clippingTop() + m_detectClippingJob->clippingBottom() @@ -197,7 +197,7 @@ void K3bVideoDVDRippingJob::slotDetectClippingJobFinished( bool success ) } } else - emit infoMessage( i18n("Failed to determine clipping values for title %1").arg(m_titleRipInfos[d->currentTitleInfoIndex].title), ERROR ); + emit infoMessage( i18n("Failed to determine clipping values for title %1").tqarg(m_titleRipInfos[d->currentTitleInfoIndex].title), ERROR ); startTranscoding( d->currentTitleInfoIndex ); } @@ -234,11 +234,11 @@ void K3bVideoDVDRippingJob::startDetectClipping( int ripInfoIndex ) if( !m_detectClippingJob ) { m_detectClippingJob = new K3bVideoDVDTitleDetectClippingJob( this, this ); connectSubJob( m_detectClippingJob, - SLOT(slotDetectClippingJobFinished(bool)), - SIGNAL(newTask(const QString&)), - SIGNAL(newSubTask(const QString&)), - SLOT(slotDetectClippingProgress(int)), - SIGNAL(subPercent(int)), + TQT_SLOT(slotDetectClippingJobFinished(bool)), + TQT_SIGNAL(newTask(const TQString&)), + TQT_SIGNAL(newSubTask(const TQString&)), + TQT_SLOT(slotDetectClippingProgress(int)), + TQT_SIGNAL(subPercent(int)), 0, 0 ); } diff --git a/src/rip/videodvd/k3bvideodvdrippingjob.h b/src/rip/videodvd/k3bvideodvdrippingjob.h index 7c9f4d2..93ec1b0 100644 --- a/src/rip/videodvd/k3bvideodvdrippingjob.h +++ b/src/rip/videodvd/k3bvideodvdrippingjob.h @@ -20,7 +20,7 @@ #include <k3bvideodvd.h> #include <k3bvideodvdtitletranscodingjob.h> -#include <qvaluevector.h> +#include <tqvaluevector.h> class K3bVideoDVDTitleDetectClippingJob; @@ -32,9 +32,10 @@ class K3bVideoDVDTitleDetectClippingJob; class K3bVideoDVDRippingJob : public K3bJob { Q_OBJECT + TQ_OBJECT public: - K3bVideoDVDRippingJob( K3bJobHandler* hdl, QObject* parent ); + K3bVideoDVDRippingJob( K3bJobHandler* hdl, TQObject* tqparent ); ~K3bVideoDVDRippingJob(); class TitleRipInfo { @@ -42,7 +43,7 @@ class K3bVideoDVDRippingJob : public K3bJob TitleRipInfo(); TitleRipInfo( int title, int audioStream = 0, - const QString& fn = QString::null, + const TQString& fn = TQString(), int width = 0, // 0 -> no resize int height = 0, // 0 -> no resize int videoBitrate = 0, // 0 -> use default from job settings @@ -52,7 +53,7 @@ class K3bVideoDVDRippingJob : public K3bJob int clipRight = 0 ); int title; int audioStream; - QString filename; + TQString filename; int width; int height; int videoBitrate; @@ -62,15 +63,15 @@ class K3bVideoDVDRippingJob : public K3bJob int clipRight; }; - QString jobDescription() const; - QString jobDetails() const; + TQString jobDescription() const; + TQString jobDetails() const; public slots: void start(); void cancel(); void setVideoDVD( const K3bVideoDVD::VideoDVD& dvd ) { m_dvd = dvd; } - void setTitles( const QValueVector<TitleRipInfo>& titles ) { m_titleRipInfos = titles; } + void setTitles( const TQValueVector<TitleRipInfo>& titles ) { m_titleRipInfos = titles; } void setVideoCodec( K3bVideoDVDTitleTranscodingJob::VideoCodec codec ); void setVideoBitrate( int bitrate ); @@ -94,7 +95,7 @@ class K3bVideoDVDRippingJob : public K3bJob void initProgressInfo(); K3bVideoDVD::VideoDVD m_dvd; - QValueVector<TitleRipInfo> m_titleRipInfos; + TQValueVector<TitleRipInfo> m_titleRipInfos; K3bVideoDVDTitleTranscodingJob* m_transcodingJob; K3bVideoDVDTitleDetectClippingJob* m_detectClippingJob; diff --git a/src/rip/videodvd/k3bvideodvdrippingpreview.cpp b/src/rip/videodvd/k3bvideodvdrippingpreview.cpp index 3ba7582..a08ba51 100644 --- a/src/rip/videodvd/k3bvideodvdrippingpreview.cpp +++ b/src/rip/videodvd/k3bvideodvdrippingpreview.cpp @@ -23,12 +23,12 @@ #include <ktempdir.h> #include <kdebug.h> -#include <qdir.h> +#include <tqdir.h> -K3bVideoDVDRippingPreview::K3bVideoDVDRippingPreview( QObject* parent ) - : QObject( parent ), +K3bVideoDVDRippingPreview::K3bVideoDVDRippingPreview( TQObject* tqparent ) + : TQObject( tqparent ), m_tempDir( 0 ), m_process( 0 ) { @@ -60,7 +60,7 @@ void K3bVideoDVDRippingPreview::generatePreview( const K3bVideoDVD::VideoDVD& dv // auto-select a chapter // choose the center chapter, but not the first or last if possible if( chapter == 0 ) - chapter = QMIN( QMAX( dvd[title-1].numChapters()/2, 2 ), QMAX( dvd[title-1].numChapters() - 1, 1 ) ); + chapter = TQMIN( TQMAX( dvd[title-1].numChapters()/2, 2 ), TQMAX( dvd[title-1].numChapters() - 1, 1 ) ); // select a frame number unsigned int frame = 30; @@ -77,16 +77,16 @@ void K3bVideoDVDRippingPreview::generatePreview( const K3bVideoDVD::VideoDVD& dv m_process = new KProcess(); *m_process << bin->path; *m_process << "-i" << dvd.device()->blockDeviceName(); - *m_process << "-T" << QString("%1,%2").arg(title).arg(chapter); + *m_process << "-T" << TQString("%1,%2").tqarg(title).tqarg(chapter); *m_process << "-x" << "dvd,null"; *m_process << "--dvd_access_delay" << "0"; *m_process << "-y" << "ppm,null"; - *m_process << "-c" << QString("%1-%2").arg( frame ).arg( frame+1 ); + *m_process << "-c" << TQString("%1-%2").tqarg( frame ).tqarg( frame+1 ); *m_process << "-Z" << "x200"; *m_process << "-o" << m_tempDir->name(); - connect( m_process, SIGNAL(processExited(KProcess*)), - this, SLOT(slotTranscodeFinished(KProcess*)) ); + connect( m_process, TQT_SIGNAL(processExited(KProcess*)), + this, TQT_SLOT(slotTranscodeFinished(KProcess*)) ); if( !m_process->start( KProcess::NotifyOnExit, KProcess::AllOutput ) ) { // we use AllOutput to not pollute stdout // something went wrong when starting the program // it "should" be the executable @@ -112,9 +112,9 @@ void K3bVideoDVDRippingPreview::cancel() void K3bVideoDVDRippingPreview::slotTranscodeFinished( KProcess* ) { // read the image - QString filename = m_tempDir->name() + "000000.ppm";// + tempQDir->entryList( QDir::Files ).first(); + TQString filename = m_tempDir->name() + "000000.ppm";// + tempTQDir->entryList( TQDir::Files ).first(); kdDebug() << "(K3bVideoDVDRippingPreview) reading from file " << filename << endl; - m_preview = QImage( filename ); + m_preview = TQImage( filename ); bool success = !m_preview.isNull() && !m_canceled; // remove temp files diff --git a/src/rip/videodvd/k3bvideodvdrippingpreview.h b/src/rip/videodvd/k3bvideodvdrippingpreview.h index f5beb69..ab7b994 100644 --- a/src/rip/videodvd/k3bvideodvdrippingpreview.h +++ b/src/rip/videodvd/k3bvideodvdrippingpreview.h @@ -16,8 +16,8 @@ #ifndef _K3B_VIDEODVD_RIPPING_PREVIEW_H_ #define _K3B_VIDEODVD_RIPPING_PREVIEW_H_ -#include <qobject.h> -#include <qimage.h> +#include <tqobject.h> +#include <tqimage.h> #include <k3bvideodvd.h> @@ -25,15 +25,16 @@ class KTempDir; class KProcess; -class K3bVideoDVDRippingPreview : public QObject +class K3bVideoDVDRippingPreview : public TQObject { Q_OBJECT + TQ_OBJECT public: - K3bVideoDVDRippingPreview( QObject* parent = 0 ); + K3bVideoDVDRippingPreview( TQObject* tqparent = 0 ); ~K3bVideoDVDRippingPreview(); - const QImage& preview() const { return m_preview; } + const TQImage& preview() const { return m_preview; } public slots: /** @@ -53,7 +54,7 @@ class K3bVideoDVDRippingPreview : public QObject void slotTranscodeFinished( KProcess* ); private: - QImage m_preview; + TQImage m_preview; KTempDir* m_tempDir; KProcess* m_process; int m_title; diff --git a/src/rip/videodvd/k3bvideodvdrippingtitlelistview.cpp b/src/rip/videodvd/k3bvideodvdrippingtitlelistview.cpp index 85379dc..244de2c 100644 --- a/src/rip/videodvd/k3bvideodvdrippingtitlelistview.cpp +++ b/src/rip/videodvd/k3bvideodvdrippingtitlelistview.cpp @@ -25,11 +25,11 @@ #include <k3bvideodvdvideostream.h> #include <k3bvideodvdsubpicturestream.h> -#include <qsimplerichtext.h> -#include <qfontmetrics.h> -#include <qpainter.h> -#include <qheader.h> -#include <qtooltip.h> +#include <tqsimplerichtext.h> +#include <tqfontmetrics.h> +#include <tqpainter.h> +#include <tqheader.h> +#include <tqtooltip.h> #include <klocale.h> #include <kglobal.h> @@ -37,22 +37,22 @@ #include <kapplication.h> -static QString audioStreamString( const K3bVideoDVD::Title& title, unsigned int maxLines = 9999, bool includeExtInfo = true ) +static TQString audioStreamString( const K3bVideoDVD::Title& title, unsigned int maxLines = 9999, bool includeExtInfo = true ) { - QString s = "<p>"; - for( unsigned int i = 0; i < QMIN( title.numAudioStreams(), maxLines ); ++i ) { + TQString s = "<p>"; + for( unsigned int i = 0; i < TQMIN( title.numAudioStreams(), maxLines ); ++i ) { if( i > 0 ) s += "<br>"; - s += QString::number(i+1) + ": " + s += TQString::number(i+1) + ": " + i18n("%1 %2Ch (%3<em>%4</em>)") - .arg( K3bVideoDVD::audioFormatString( title.audioStream(i).format() ) ) - .arg( title.audioStream(i).channels() ) - .arg( title.audioStream(i).langCode().isEmpty() + .tqarg( K3bVideoDVD::audioFormatString( title.audioStream(i).format() ) ) + .tqarg( title.audioStream(i).channels() ) + .tqarg( title.audioStream(i).langCode().isEmpty() ? i18n("unknown language") : KGlobal::locale()->twoAlphaToLanguageName( title.audioStream(i).langCode() ) ) - .arg( includeExtInfo && title.audioStream(i).codeExtension() != K3bVideoDVD::AUDIO_CODE_EXT_UNSPECIFIED - ? QString(" ") + K3bVideoDVD::audioCodeExtensionString( title.audioStream(i).codeExtension() ) - : QString::null ); + .tqarg( includeExtInfo && title.audioStream(i).codeExtension() != K3bVideoDVD::AUDIO_CODE_EXT_UNSPECIFIED + ? TQString(" ") + K3bVideoDVD::audioCodeExtensionString( title.audioStream(i).codeExtension() ) + : TQString() ); } if( title.numAudioStreams() > maxLines ) s += "..."; @@ -61,23 +61,23 @@ static QString audioStreamString( const K3bVideoDVD::Title& title, unsigned int } -static QString subpictureStreamString( const K3bVideoDVD::Title& title, unsigned int maxLines = 9999, bool includeExtInfo = true ) +static TQString subpictureStreamString( const K3bVideoDVD::Title& title, unsigned int maxLines = 9999, bool includeExtInfo = true ) { - QString s = "<p>"; - for( unsigned int i = 0; i < QMIN( title.numSubPictureStreams(), maxLines ); ++i ) { + TQString s = "<p>"; + for( unsigned int i = 0; i < TQMIN( title.numSubPictureStreams(), maxLines ); ++i ) { if( i > 0 ) s += "<br>"; - s += QString::number(i+1) + ": " - + QString("%1 (%2<em>%3</em>)") - .arg( title.subPictureStream(i).codeMode() == K3bVideoDVD::SUBPIC_CODE_MODE_RLE + s += TQString::number(i+1) + ": " + + TQString("%1 (%2<em>%3</em>)") + .tqarg( title.subPictureStream(i).codeMode() == K3bVideoDVD::SUBPIC_CODE_MODE_RLE ? i18n("RLE") : i18n("Extended") ) - .arg( title.subPictureStream(i).langCode().isEmpty() + .tqarg( title.subPictureStream(i).langCode().isEmpty() ? i18n("unknown language") : KGlobal::locale()->twoAlphaToLanguageName( title.subPictureStream(i).langCode() ) ) - .arg( includeExtInfo && title.subPictureStream(i).codeExtension() != K3bVideoDVD::SUBPIC_CODE_EXT_UNSPECIFIED - ? QString(" ") + K3bVideoDVD::subPictureCodeExtensionString( title.subPictureStream(i).codeExtension() ) - : QString::null ); + .tqarg( includeExtInfo && title.subPictureStream(i).codeExtension() != K3bVideoDVD::SUBPIC_CODE_EXT_UNSPECIFIED + ? TQString(" ") + K3bVideoDVD::subPictureCodeExtensionString( title.subPictureStream(i).codeExtension() ) + : TQString() ); } if( title.numSubPictureStreams() > maxLines ) s += "..."; @@ -90,8 +90,8 @@ static QString subpictureStreamString( const K3bVideoDVD::Title& title, unsigned class K3bVideoDVDRippingTitleListView::TitleViewItem : public K3bCheckListViewItem { public: - TitleViewItem( K3bVideoDVDRippingTitleListView* parent, QListViewItem* after, const K3bVideoDVD::Title& title ) - : K3bCheckListViewItem( parent, after ), + TitleViewItem( K3bVideoDVDRippingTitleListView* tqparent, TQListViewItem* after, const K3bVideoDVD::Title& title ) + : K3bCheckListViewItem( tqparent, after ), m_title( title ) { setMarginVertical( 4 ); @@ -113,39 +113,39 @@ public: // set a valid height int maxH = 0; for( int c = 1; c <= 4; ++c ) { - QSimpleRichText rt( text(c), listView()->font() ); + TQSimpleRichText rt( text(c), listView()->font() ); rt.setWidth( 600 ); // way to big to avoid line breaks - maxH = QMAX( maxH, rt.height() ); + maxH = TQMAX( maxH, rt.height() ); } setHeight( maxH + 2*marginVertical() ); } - int width( const QFontMetrics& fm, const QListView* lv, int c ) const { + int width( const TQFontMetrics& fm, const TQListView* lv, int c ) const { if( c == 0 ) return K3bCheckListViewItem::width( fm, lv, c ); else { - QSimpleRichText rt( text(c), lv->font() ); + TQSimpleRichText rt( text(c), lv->font() ); rt.setWidth( 600 ); // way to big to avoid line breaks return rt.widthUsed() + 2*marginHorizontal( c ); } } - void setPreview( const QImage& preview ) { + void setPreview( const TQImage& preview ) { m_preview = preview; - m_scaledPreview = QPixmap(); + m_scaledPreview = TQPixmap(); m_previewSet = true; - repaint(); + tqrepaint(); } - const QImage& preview() const { + const TQImage& preview() const { return m_preview; } protected: - void paintK3bCell( QPainter* p, const QColorGroup& cg, int col, int w, int align ) { + void paintK3bCell( TQPainter* p, const TQColorGroup& cg, int col, int w, int align ) { p->save(); if( col == 0 ) { @@ -155,7 +155,7 @@ protected: else if( col == 2 ) { if( isSelected() ) { p->fillRect( 0, 0, w, height(), - cg.brush( QColorGroup::Highlight ) ); + cg.brush( TQColorGroup::Highlight ) ); p->setPen( cg.highlightedText() ); } else { @@ -193,35 +193,35 @@ protected: preW = h*16/9; p->drawRect( ( w - preW ) / 2, ( height() - h ) / 2, preW, h ); - QPixmap noIcon = KApplication::kApplication()->iconLoader()->loadIcon( "no", KIcon::NoGroup, KIcon::SizeSmall, KIcon::DefaultState, 0, true ); + TQPixmap noIcon = KApplication::kApplication()->iconLoader()->loadIcon( "no", KIcon::NoGroup, KIcon::SizeSmall, KIcon::DefaultState, 0, true ); p->drawPixmap( ( w - noIcon.width() ) / 2, ( height() - noIcon.height() ) / 2, noIcon ); } else { - p->drawText( 0, 0, w, height(), Qt::AlignCenter, "..." ); + p->drawText( 0, 0, w, height(), TQt::AlignCenter, "..." ); } } else { - QString s = text( col ); + TQString s = text( col ); if( s.isEmpty() ) K3bCheckListViewItem::paintK3bCell( p, cg, col, w, align ); else { - QColorGroup cg1( cg ); + TQColorGroup cg1( cg ); if( isSelected() ) { p->fillRect( 0, 0, w, height(), - cg.brush( QColorGroup::Highlight ) ); - cg1.setColor( QColorGroup::Text, cg.highlightedText() ); + cg.brush( TQColorGroup::Highlight ) ); + cg1.setColor( TQColorGroup::Text, cg.highlightedText() ); } else { p->fillRect( 0, 0, w, height(), cg.base() ); } - // paint using QSimpleRichText - QSimpleRichText rt( text(col), listView()->font() ); + // paint using TQSimpleRichText + TQSimpleRichText rt( text(col), listView()->font() ); rt.setWidth( 600 ); // way to big to avoid line breaks // normally we would have to clip the height to height()-2*marginVertical(). But if we do that - // some characters are cut (such as p or q). It seems as if QSimpleRichText does not properly + // some characters are cut (such as p or q). It seems as if TQSimpleRichText does not properly // calculate it's height... - rt.draw( p, 0, marginVertical(), QRect( 0, 0, w, height() ), cg1 ); + rt.draw( p, 0, marginVertical(), TQRect( 0, 0, w, height() ), cg1 ); } } @@ -229,7 +229,7 @@ protected: if( listView()->firstChild() != this ) { p->translate( -1*marginHorizontal(col), 0 ); // FIXME: modify the value from palette().disabled().foreground() to be lighter (or darker, depending on the background color ) - p->setPen( Qt::lightGray ); + p->setPen( TQt::lightGray ); p->drawLine( 0, 0, w+2*marginHorizontal(col), 0 ); } @@ -237,26 +237,26 @@ protected: } private: - QString text( int col ) const { + TQString text( int col ) const { switch( col ) { case 1: // Title X + length return i18n("<p><b>Title %1 (%2)</b><br>" "%3") - .arg( m_title.titleNumber(), 2 ) - .arg( m_title.playbackTime().toString( false ) ) - .arg( i18n("%n chapter", "%n chapters", m_title.numPTTs() ) ); + .tqarg( m_title.titleNumber(), 2 ) + .tqarg( m_title.playbackTime().toString( false ) ) + .tqarg( i18n("%n chapter", "%n chapters", m_title.numPTTs() ) ); case 3: // video stream info - return QString("<p>%1 %2x%3<br>%4%5") - .arg( m_title.videoStream().mpegVersion() == 0 ? i18n("MPEG1") : i18n("MPEG2") ) - .arg( m_title.videoStream().pictureWidth() ) - .arg( m_title.videoStream().pictureHeight() ) - .arg( m_title.videoStream().displayAspectRatio() == K3bVideoDVD::VIDEO_ASPECT_RATIO_4_3 ? "4:3" : "16:9" ) - .arg( m_title.videoStream().letterboxed() ? QString(" - <em>") + i18n("letterboxed") + QString("</em>"): + return TQString("<p>%1 %2x%3<br>%4%5") + .tqarg( m_title.videoStream().mpegVersion() == 0 ? i18n("MPEG1") : i18n("MPEG2") ) + .tqarg( m_title.videoStream().pictureWidth() ) + .tqarg( m_title.videoStream().pictureHeight() ) + .tqarg( m_title.videoStream().displayAspectRatio() == K3bVideoDVD::VIDEO_ASPECT_RATIO_4_3 ? "4:3" : "16:9" ) + .tqarg( m_title.videoStream().letterboxed() ? TQString(" - <em>") + i18n("letterboxed") + TQString("</em>"): m_title.videoStream().permittedDf() == K3bVideoDVD::VIDEO_PERMITTED_DF_LETTERBOXED - ? QString(" - <em>") + i18n("anamorph") + QString("</em>") : QString::null ); + ? TQString(" - <em>") + i18n("anamorph") + TQString("</em>") : TQString() ); case 4: // audio streams info @@ -280,8 +280,8 @@ private: K3bVideoDVD::Title m_title; bool m_previewSet; - QImage m_preview; - QPixmap m_scaledPreview; + TQImage m_preview; + TQPixmap m_scaledPreview; }; @@ -293,14 +293,14 @@ public: m_view( view ) { } - void maybeTip( const QPoint& pos ) { + void maybeTip( const TQPoint& pos ) { TitleViewItem* item = static_cast<TitleViewItem*>( m_view->itemAt( pos ) ); - QPoint contentsPos = m_view->viewportToContents( pos ); + TQPoint contentsPos = m_view->viewportToContents( pos ); if( !item ) return; int col = m_view->header()->sectionAt( contentsPos.x() ); - QRect r = m_view->itemRect( item ); + TQRect r = m_view->tqitemRect( item ); int headerPos = m_view->header()->sectionPos( col ); r.setLeft( headerPos ); r.setRight( headerPos + m_view->header()->sectionSize( col ) ); @@ -308,7 +308,7 @@ public: switch( col ) { case 2: if( !item->preview().isNull() ) { - QPixmap previewPix; + TQPixmap previewPix; if( previewPix.convertFromImage( item->preview() ) ) tip( r, previewPix, 0 ); } @@ -330,8 +330,8 @@ private: -K3bVideoDVDRippingTitleListView::K3bVideoDVDRippingTitleListView( QWidget* parent ) - : K3bListView( parent ) +K3bVideoDVDRippingTitleListView::K3bVideoDVDRippingTitleListView( TQWidget* tqparent ) + : K3bListView( tqparent ) { setFullWidth(true); setSorting(-1); @@ -346,15 +346,15 @@ K3bVideoDVDRippingTitleListView::K3bVideoDVDRippingTitleListView( QWidget* paren addColumn( i18n("Subpicture") ); header()->setClickEnabled( false ); - setColumnWidthMode( 0, QListView::Manual ); + setColumnWidthMode( 0, TQListView::Manual ); setColumnWidth( 0, 20 ); header()->setResizeEnabled( false, 0 ); m_toolTip = new TitleToolTip( this ); m_previewGen = new K3bVideoDVDRippingPreview( this ); - connect( m_previewGen, SIGNAL(previewDone(bool)), - this, SLOT(slotPreviewDone(bool)) ); + connect( m_previewGen, TQT_SIGNAL(previewDone(bool)), + this, TQT_SLOT(slotPreviewDone(bool)) ); } @@ -385,7 +385,7 @@ void K3bVideoDVDRippingTitleListView::slotPreviewDone( bool success ) if( success ) m_itemMap[m_currentPreviewTitle-1]->setPreview( m_previewGen->preview() ); else - m_itemMap[m_currentPreviewTitle-1]->setPreview( QImage() ); + m_itemMap[m_currentPreviewTitle-1]->setPreview( TQImage() ); // cancel if we got hidden or if the medium changed. if( isVisible() && m_medium == k3bappcore->mediaCache()->medium( m_dvd.device() ) ) { @@ -396,7 +396,7 @@ void K3bVideoDVDRippingTitleListView::slotPreviewDone( bool success ) } -void K3bVideoDVDRippingTitleListView::hideEvent( QHideEvent* e ) +void K3bVideoDVDRippingTitleListView::hideEvent( TQHideEvent* e ) { // // For now we do it the easy way: just stop the preview generation diff --git a/src/rip/videodvd/k3bvideodvdrippingtitlelistview.h b/src/rip/videodvd/k3bvideodvdrippingtitlelistview.h index 7c21815..2aa0dbc 100644 --- a/src/rip/videodvd/k3bvideodvdrippingtitlelistview.h +++ b/src/rip/videodvd/k3bvideodvdrippingtitlelistview.h @@ -20,18 +20,19 @@ #include <k3bvideodvd.h> #include <k3bmedium.h> -#include <qvaluevector.h> +#include <tqvaluevector.h> class K3bVideoDVDRippingPreview; -class QHideEvent; +class TQHideEvent; class K3bVideoDVDRippingTitleListView : public K3bListView { Q_OBJECT + TQ_OBJECT public: - K3bVideoDVDRippingTitleListView( QWidget* parent ); + K3bVideoDVDRippingTitleListView( TQWidget* tqparent ); ~K3bVideoDVDRippingTitleListView(); void setVideoDVD( const K3bVideoDVD::VideoDVD& dvd ); @@ -40,14 +41,14 @@ class K3bVideoDVDRippingTitleListView : public K3bListView void slotPreviewDone( bool ); private: - void hideEvent( QHideEvent* ); + void hideEvent( TQHideEvent* ); class TitleViewItem; class TitleToolTip; TitleToolTip* m_toolTip; - QValueVector<TitleViewItem*> m_itemMap; + TQValueVector<TitleViewItem*> m_itemMap; K3bVideoDVDRippingPreview* m_previewGen; unsigned int m_currentPreviewTitle; diff --git a/src/rip/videodvd/k3bvideodvdrippingview.cpp b/src/rip/videodvd/k3bvideodvdrippingview.cpp index f6c8c8d..6753305 100644 --- a/src/rip/videodvd/k3bvideodvdrippingview.cpp +++ b/src/rip/videodvd/k3bvideodvdrippingview.cpp @@ -26,9 +26,9 @@ #include <k3bcore.h> #include <k3bexternalbinmanager.h> -#include <qcursor.h> -#include <qlayout.h> -#include <qlabel.h> +#include <tqcursor.h> +#include <tqlayout.h> +#include <tqlabel.h> #include <kapplication.h> #include <kmessagebox.h> @@ -37,24 +37,24 @@ #include <kconfig.h> -K3bVideoDVDRippingView::K3bVideoDVDRippingView( QWidget* parent, const char * name ) +K3bVideoDVDRippingView::K3bVideoDVDRippingView( TQWidget* tqparent, const char * name ) : K3bMediaContentsView( true, K3bMedium::CONTENT_VIDEO_DVD, K3bDevice::MEDIA_DVD_ALL, K3bDevice::STATE_INCOMPLETE|K3bDevice::STATE_COMPLETE, - parent, name ) + tqparent, name ) { - QGridLayout* mainGrid = new QGridLayout( mainWidget() ); + TQGridLayout* mainGrid = new TQGridLayout( mainWidget() ); // toolbox // ---------------------------------------------------------------------------------- - QHBoxLayout* toolBoxLayout = new QHBoxLayout( 0, 0, 0, "toolBoxLayout" ); + TQHBoxLayout* toolBoxLayout = new TQHBoxLayout( 0, 0, 0, "toolBoxLayout" ); m_toolBox = new K3bToolBox( mainWidget() ); toolBoxLayout->addWidget( m_toolBox ); - QSpacerItem* spacer = new QSpacerItem( 10, 10, QSizePolicy::Expanding, QSizePolicy::Minimum ); + TQSpacerItem* spacer = new TQSpacerItem( 10, 10, TQSizePolicy::Expanding, TQSizePolicy::Minimum ); toolBoxLayout->addItem( spacer ); - m_labelLength = new QLabel( mainWidget() ); - m_labelLength->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) ); + m_labelLength = new TQLabel( mainWidget() ); + m_labelLength->tqsetAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) ); toolBoxLayout->addWidget( m_labelLength ); @@ -62,10 +62,10 @@ K3bVideoDVDRippingView::K3bVideoDVDRippingView( QWidget* parent, const char * na // ---------------------------------------------------------------------------------- m_titleView = new K3bVideoDVDRippingTitleListView( mainWidget() ); - connect( m_titleView, SIGNAL(contextMenu(KListView*, QListViewItem*, const QPoint&)), - this, SLOT(slotContextMenu(KListView*, QListViewItem*, const QPoint&)) ); + connect( m_titleView, TQT_SIGNAL(contextMenu(KListView*, TQListViewItem*, const TQPoint&)), + this, TQT_SLOT(slotContextMenu(KListView*, TQListViewItem*, const TQPoint&)) ); - // general layout + // general tqlayout // ---------------------------------------------------------------------------------- mainGrid->addLayout( toolBoxLayout, 0, 0 ); mainGrid->addWidget( m_titleView, 1, 0 ); @@ -113,13 +113,13 @@ void K3bVideoDVDRippingView::reloadMedium() delete css; } - QApplication::setOverrideCursor( QCursor(Qt::WaitCursor) ); + TQApplication::setOverrideCursor( TQCursor(TQt::WaitCursor) ); if( m_dvd.open( device() ) ) { setTitle( medium().beautifiedVolumeId() + " (" + i18n("Video DVD") + ")" ); m_labelLength->setText( i18n("%n title", "%n titles", m_dvd.numTitles() ) ); m_titleView->setVideoDVD( m_dvd ); - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); bool transcodeUsable = true; @@ -150,7 +150,7 @@ void K3bVideoDVDRippingView::reloadMedium() actionCollection()->action("start_rip")->setEnabled( transcodeUsable ); } else { - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); KMessageBox::error( this, i18n("Unable to read Video DVD contents.") ); } @@ -159,9 +159,9 @@ void K3bVideoDVDRippingView::reloadMedium() void K3bVideoDVDRippingView::slotStartRipping() { - QValueList<int> titles; + TQValueList<int> titles; int i = 1; - for( QListViewItemIterator it( m_titleView ); *it; ++it, ++i ) + for( TQListViewItemIterator it( m_titleView ); *it; ++it, ++i ) if( static_cast<K3bCheckListViewItem*>( *it )->isChecked() ) titles.append( i ); @@ -176,7 +176,7 @@ void K3bVideoDVDRippingView::slotStartRipping() } -void K3bVideoDVDRippingView::slotContextMenu( KListView*, QListViewItem*, const QPoint& p ) +void K3bVideoDVDRippingView::slotContextMenu( KListView*, TQListViewItem*, const TQPoint& p ) { m_popupMenu->popup(p); } @@ -184,22 +184,22 @@ void K3bVideoDVDRippingView::slotContextMenu( KListView*, QListViewItem*, const void K3bVideoDVDRippingView::slotCheckAll() { - for( QListViewItemIterator it( m_titleView ); it.current(); ++it ) + for( TQListViewItemIterator it( m_titleView ); it.current(); ++it ) dynamic_cast<K3bCheckListViewItem*>(it.current())->setChecked(true); } void K3bVideoDVDRippingView::slotUncheckAll() { - for( QListViewItemIterator it( m_titleView ); it.current(); ++it ) + for( TQListViewItemIterator it( m_titleView ); it.current(); ++it ) dynamic_cast<K3bCheckListViewItem*>(it.current())->setChecked(false); } void K3bVideoDVDRippingView::slotCheck() { - QPtrList<QListViewItem> items( m_titleView->selectedItems() ); - for( QPtrListIterator<QListViewItem> it( items ); + TQPtrList<TQListViewItem> items( m_titleView->selectedItems() ); + for( TQPtrListIterator<TQListViewItem> it( items ); it.current(); ++it ) dynamic_cast<K3bCheckListViewItem*>(it.current())->setChecked(true); } @@ -207,8 +207,8 @@ void K3bVideoDVDRippingView::slotCheck() void K3bVideoDVDRippingView::slotUncheck() { - QPtrList<QListViewItem> items( m_titleView->selectedItems() ); - for( QPtrListIterator<QListViewItem> it( items ); + TQPtrList<TQListViewItem> items( m_titleView->selectedItems() ); + for( TQPtrListIterator<TQListViewItem> it( items ); it.current(); ++it ) dynamic_cast<K3bCheckListViewItem*>(it.current())->setChecked(false); } @@ -219,19 +219,19 @@ void K3bVideoDVDRippingView::initActions() m_actionCollection = new KActionCollection( this ); KAction* actionSelectAll = new KAction( i18n("Check All"), 0, 0, this, - SLOT(slotCheckAll()), actionCollection(), + TQT_SLOT(slotCheckAll()), actionCollection(), "check_all" ); KAction* actionDeselectAll = new KAction( i18n("Uncheck All"), 0, 0, this, - SLOT(slotUncheckAll()), actionCollection(), + TQT_SLOT(slotUncheckAll()), actionCollection(), "uncheck_all" ); KAction* actionSelect = new KAction( i18n("Check Track"), 0, 0, this, - SLOT(slotCheck()), actionCollection(), + TQT_SLOT(slotCheck()), actionCollection(), "select_track" ); KAction* actionDeselect = new KAction( i18n("Uncheck Track"), 0, 0, this, - SLOT(slotUncheck()), actionCollection(), + TQT_SLOT(slotUncheck()), actionCollection(), "deselect_track" ); KAction* actionStartRip = new KAction( i18n("Start Ripping"), "gear", 0, this, - SLOT(slotStartRipping()), m_actionCollection, "start_rip" ); + TQT_SLOT(slotStartRipping()), m_actionCollection, "start_rip" ); actionStartRip->setToolTip( i18n("Open the Video DVD ripping dialog") ); diff --git a/src/rip/videodvd/k3bvideodvdrippingview.h b/src/rip/videodvd/k3bvideodvdrippingview.h index 679ea09..1bf58f3 100644 --- a/src/rip/videodvd/k3bvideodvdrippingview.h +++ b/src/rip/videodvd/k3bvideodvdrippingview.h @@ -22,18 +22,19 @@ class K3bVideoDVDRippingTitleListView; class K3bToolBox; -class QLabel; +class TQLabel; class KActionCollection; class KActionMenu; class KListView; -class QListViewItem; +class TQListViewItem; class K3bVideoDVDRippingView : public K3bMediaContentsView { Q_OBJECT + TQ_OBJECT public: - K3bVideoDVDRippingView( QWidget* parent = 0, const char * name = 0 ); + K3bVideoDVDRippingView( TQWidget* tqparent = 0, const char * name = 0 ); ~K3bVideoDVDRippingView(); KActionCollection* actionCollection() const { return m_actionCollection; } @@ -41,7 +42,7 @@ class K3bVideoDVDRippingView : public K3bMediaContentsView private slots: void slotStartRipping(); - void slotContextMenu( KListView*, QListViewItem*, const QPoint& ); + void slotContextMenu( KListView*, TQListViewItem*, const TQPoint& ); void slotCheckAll(); void slotUncheckAll(); @@ -57,7 +58,7 @@ class K3bVideoDVDRippingView : public K3bMediaContentsView KActionMenu* m_popupMenu; K3bToolBox* m_toolBox; - QLabel* m_labelLength; + TQLabel* m_labelLength; K3bVideoDVDRippingTitleListView* m_titleView; K3bVideoDVD::VideoDVD m_dvd; diff --git a/src/rip/videodvd/k3bvideodvdrippingwidget.cpp b/src/rip/videodvd/k3bvideodvdrippingwidget.cpp index 721d191..06214a0 100644 --- a/src/rip/videodvd/k3bvideodvdrippingwidget.cpp +++ b/src/rip/videodvd/k3bvideodvdrippingwidget.cpp @@ -28,15 +28,15 @@ #include <kdialogbase.h> #include <klineedit.h> -#include <qcombobox.h> -#include <qspinbox.h> -#include <qlabel.h> -#include <qtimer.h> -#include <qwhatsthis.h> -#include <qwidgetstack.h> -#include <qpushbutton.h> -#include <qcheckbox.h> -#include <qlayout.h> +#include <tqcombobox.h> +#include <tqspinbox.h> +#include <tqlabel.h> +#include <tqtimer.h> +#include <tqwhatsthis.h> +#include <tqwidgetstack.h> +#include <tqpushbutton.h> +#include <tqcheckbox.h> +#include <tqlayout.h> static const int s_mp3Bitrates[] = { @@ -72,8 +72,8 @@ static const char* s_pictureSizeNames[] = { }; -K3bVideoDVDRippingWidget::K3bVideoDVDRippingWidget( QWidget* parent ) - : base_K3bVideoDVDRippingWidget( parent ) +K3bVideoDVDRippingWidget::K3bVideoDVDRippingWidget( TQWidget* tqparent ) + : base_K3bVideoDVDRippingWidget( tqparent ) { m_editBaseDir->setMode( KFile::Directory | KFile::ExistingOnly | KFile::LocalOnly ); @@ -86,15 +86,15 @@ K3bVideoDVDRippingWidget::K3bVideoDVDRippingWidget( QWidget* parent ) // // Example filename pattern // - m_comboFilenamePattern->insertItem( QString( "%b - %1 %t (%n %a %c)" ).arg(i18n("Title") ) ); - m_comboFilenamePattern->insertItem( QString( "%{volumeid} (%{title})" ) ); + m_comboFilenamePattern->insertItem( TQString( "%b - %1 %t (%n %a %c)" ).tqarg(i18n("Title") ) ); + m_comboFilenamePattern->insertItem( TQString( "%{volumeid} (%{title})" ) ); // // Add the Audio bitrates // for( int i = 0; s_mp3Bitrates[i]; ++i ) - m_comboAudioBitrate->insertItem( i18n("%1 kbps" ).arg(s_mp3Bitrates[i]) ); + m_comboAudioBitrate->insertItem( i18n("%1 kbps" ).tqarg(s_mp3Bitrates[i]) ); for( int i = 0; i < K3bVideoDVDTitleTranscodingJob::VIDEO_CODEC_NUM_ENTRIES; ++i ) { @@ -118,32 +118,32 @@ K3bVideoDVDRippingWidget::K3bVideoDVDRippingWidget( QWidget* parent ) slotAudioCodecChanged( m_comboAudioCodec->selectedValue() ); - connect( m_comboAudioBitrate, SIGNAL(textChanged(const QString&)), - this, SIGNAL(changed()) ); - connect( m_spinVideoBitrate, SIGNAL(valueChanged(int)), - this, SIGNAL(changed()) ); - connect( m_checkBlankReplace, SIGNAL(toggled(bool)), - this, SIGNAL(changed()) ); - connect( m_editBlankReplace, SIGNAL(textChanged(const QString&)), - this, SIGNAL(changed()) ); - connect( m_comboFilenamePattern, SIGNAL(textChanged(const QString&)), - this, SIGNAL(changed()) ); - connect( m_editBaseDir, SIGNAL(textChanged(const QString&)), - this, SIGNAL(changed()) ); - - connect( m_comboAudioCodec, SIGNAL(valueChanged(int)), - this, SLOT(slotAudioCodecChanged(int)) ); - connect( m_specialStringsLabel, SIGNAL(leftClickedURL()), - this, SLOT(slotSeeSpecialStrings()) ); - connect( m_buttonCustomPictureSize, SIGNAL(clicked()), - this, SLOT(slotCustomPictureSize()) ); - connect( m_comboVideoSize, SIGNAL(activated(int)), - this, SLOT(slotVideoSizeChanged(int)) ); + connect( m_comboAudioBitrate, TQT_SIGNAL(textChanged(const TQString&)), + this, TQT_SIGNAL(changed()) ); + connect( m_spinVideoBitrate, TQT_SIGNAL(valueChanged(int)), + this, TQT_SIGNAL(changed()) ); + connect( m_checkBlankReplace, TQT_SIGNAL(toggled(bool)), + this, TQT_SIGNAL(changed()) ); + connect( m_editBlankReplace, TQT_SIGNAL(textChanged(const TQString&)), + this, TQT_SIGNAL(changed()) ); + connect( m_comboFilenamePattern, TQT_SIGNAL(textChanged(const TQString&)), + this, TQT_SIGNAL(changed()) ); + connect( m_editBaseDir, TQT_SIGNAL(textChanged(const TQString&)), + this, TQT_SIGNAL(changed()) ); + + connect( m_comboAudioCodec, TQT_SIGNAL(valueChanged(int)), + this, TQT_SLOT(slotAudioCodecChanged(int)) ); + connect( m_specialStringsLabel, TQT_SIGNAL(leftClickedURL()), + this, TQT_SLOT(slotSeeSpecialStrings()) ); + connect( m_buttonCustomPictureSize, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotCustomPictureSize()) ); + connect( m_comboVideoSize, TQT_SIGNAL(activated(int)), + this, TQT_SLOT(slotVideoSizeChanged(int)) ); // refresh every 2 seconds - m_freeSpaceUpdateTimer = new QTimer( this ); - connect( m_freeSpaceUpdateTimer, SIGNAL(timeout()), - this, SLOT(slotUpdateFreeTempSpace()) ); + m_freeSpaceUpdateTimer = new TQTimer( this ); + connect( m_freeSpaceUpdateTimer, TQT_SIGNAL(timeout()), + this, TQT_SLOT(slotUpdateFreeTempSpace()) ); m_freeSpaceUpdateTimer->start(2000); slotUpdateFreeTempSpace(); } @@ -160,35 +160,35 @@ K3bVideoDVDTitleTranscodingJob::VideoCodec K3bVideoDVDRippingWidget::selectedVid } -QSize K3bVideoDVDRippingWidget::selectedPictureSize() const +TQSize K3bVideoDVDRippingWidget::selectedPictureSize() const { switch( m_comboVideoSize->currentItem() ) { case PICTURE_SIZE_ORIGINAL: - return QSize(0,0); + return TQSize(0,0); case PICTURE_SIZE_640: - return QSize(640,0); + return TQSize(640,0); case PICTURE_SIZE_320: - return QSize(320,0); + return TQSize(320,0); default: return m_customVideoSize; } } -void K3bVideoDVDRippingWidget::setSelectedPictureSize( const QSize& size ) +void K3bVideoDVDRippingWidget::setSelectedPictureSize( const TQSize& size ) { m_customVideoSize = size; - if( size == QSize(0,0) ) + if( size == TQSize(0,0) ) m_comboVideoSize->setCurrentItem( PICTURE_SIZE_ORIGINAL ); - else if( size == QSize(640,0) ) + else if( size == TQSize(640,0) ) m_comboVideoSize->setCurrentItem( PICTURE_SIZE_640 ); - else if( size == QSize(320,0) ) + else if( size == TQSize(320,0) ) m_comboVideoSize->setCurrentItem( PICTURE_SIZE_320 ); else { m_comboVideoSize->changeItem( i18n(s_pictureSizeNames[PICTURE_SIZE_CUSTOM]) - + QString(" (%1x%2)") - .arg(size.width() == 0 ? i18n("auto") : QString::number(size.width())) - .arg(size.height() == 0 ? i18n("auto") : QString::number(size.height())), + + TQString(" (%1x%2)") + .tqarg(size.width() == 0 ? i18n("auto") : TQString::number(size.width())) + .tqarg(size.height() == 0 ? i18n("auto") : TQString::number(size.height())), PICTURE_SIZE_CUSTOM ); m_comboVideoSize->setCurrentItem( PICTURE_SIZE_CUSTOM ); } @@ -246,16 +246,16 @@ void K3bVideoDVDRippingWidget::setSelectedAudioBitrate( int bitrate ) void K3bVideoDVDRippingWidget::slotUpdateFreeTempSpace() { - QString path = m_editBaseDir->url(); + TQString path = m_editBaseDir->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 ) ) { m_labelFreeSpace->setText( KIO::convertSizeFromKB(avail) ); if( avail < m_neededSize/1024 ) - m_labelNeededSpace->setPaletteForegroundColor( Qt::red ); + m_labelNeededSpace->setPaletteForegroundColor( TQt::red ); else m_labelNeededSpace->setPaletteForegroundColor( paletteForegroundColor() ); } @@ -280,7 +280,7 @@ void K3bVideoDVDRippingWidget::setNeededSize( KIO::filesize_t size ) void K3bVideoDVDRippingWidget::slotSeeSpecialStrings() { - QWhatsThis::display( i18n( "<p><b>Pattern special strings:</b>" + TQWhatsThis::display( i18n( "<p><b>Pattern special strings:</b>" "<p>The following strings will be replaced with their respective meaning in every " "track name.<br>" "<p><table border=\"0\">" @@ -345,16 +345,16 @@ void K3bVideoDVDRippingWidget::slotCustomPictureSize() "Be aware that setting both the width and the height to fixed values " "will result in no aspect ratio correction to be performed."), dlg.plainPage() ); - QSpinBox* spinWidth = new QSpinBox( 0, 20000, 16, dlg.plainPage() ); - QSpinBox* spinHeight = new QSpinBox( 0, 20000, 16, dlg.plainPage() ); + TQSpinBox* spinWidth = new TQSpinBox( 0, 20000, 16, dlg.plainPage() ); + TQSpinBox* spinHeight = new TQSpinBox( 0, 20000, 16, dlg.plainPage() ); spinWidth->setSpecialValueText( i18n("Auto") ); spinHeight->setSpecialValueText( i18n("Auto") ); - QLabel* labelW = new QLabel( spinWidth, i18n("Width") + ':', dlg.plainPage() ); - QLabel* labelH = new QLabel( spinHeight, i18n("Height") + ':', dlg.plainPage() ); - labelW->setAlignment( Qt::AlignRight|Qt::AlignVCenter ); - labelH->setAlignment( Qt::AlignRight|Qt::AlignVCenter ); + TQLabel* labelW = new TQLabel( spinWidth, i18n("Width") + ':', dlg.plainPage() ); + TQLabel* labelH = new TQLabel( spinHeight, i18n("Height") + ':', dlg.plainPage() ); + labelW->tqsetAlignment( TQt::AlignRight|TQt::AlignVCenter ); + labelH->tqsetAlignment( TQt::AlignRight|TQt::AlignVCenter ); - QGridLayout* grid = new QGridLayout( dlg.plainPage() ); + TQGridLayout* grid = new TQGridLayout( dlg.plainPage() ); grid->setMargin( 0 ); grid->setSpacing( KDialog::spacingHint() ); grid->addMultiCellWidget( label, 0, 0, 0, 3 ); @@ -367,7 +367,7 @@ void K3bVideoDVDRippingWidget::slotCustomPictureSize() spinHeight->setValue( m_customVideoSize.height() ); if( dlg.exec() ) { - setSelectedPictureSize( QSize( spinWidth->value(), spinHeight->value() ) ); + setSelectedPictureSize( TQSize( spinWidth->value(), spinHeight->value() ) ); emit changed(); } } diff --git a/src/rip/videodvd/k3bvideodvdrippingwidget.h b/src/rip/videodvd/k3bvideodvdrippingwidget.h index 2d10da7..5335b7c 100644 --- a/src/rip/videodvd/k3bvideodvdrippingwidget.h +++ b/src/rip/videodvd/k3bvideodvdrippingwidget.h @@ -20,30 +20,31 @@ #include <k3bvideodvdtitletranscodingjob.h> -#include <qvaluevector.h> -#include <qmap.h> +#include <tqvaluevector.h> +#include <tqmap.h> #include <kio/global.h> -class QTimer; +class TQTimer; class K3bVideoDVDRippingWidget : public base_K3bVideoDVDRippingWidget { Q_OBJECT + TQ_OBJECT public: - K3bVideoDVDRippingWidget( QWidget* parent ); + K3bVideoDVDRippingWidget( TQWidget* tqparent ); ~K3bVideoDVDRippingWidget(); K3bVideoDVDTitleTranscodingJob::VideoCodec selectedVideoCodec() const; K3bVideoDVDTitleTranscodingJob::AudioCodec selectedAudioCodec() const; int selectedAudioBitrate() const; - QSize selectedPictureSize() const; + TQSize selectedPictureSize() const; void setSelectedVideoCodec( K3bVideoDVDTitleTranscodingJob::VideoCodec codec ); void setSelectedAudioCodec( K3bVideoDVDTitleTranscodingJob::AudioCodec codec ); void setSelectedAudioBitrate( int bitrate ); - void setSelectedPictureSize( const QSize& ); + void setSelectedPictureSize( const TQSize& ); void setNeededSize( KIO::filesize_t ); @@ -58,10 +59,10 @@ class K3bVideoDVDRippingWidget : public base_K3bVideoDVDRippingWidget void slotCustomPictureSize(); private: - QTimer* m_freeSpaceUpdateTimer; + TQTimer* m_freeSpaceUpdateTimer; KIO::filesize_t m_neededSize; - QSize m_customVideoSize; + TQSize m_customVideoSize; }; #endif |