summaryrefslogtreecommitdiffstats
path: root/src/cdopener.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/cdopener.cpp')
-rwxr-xr-xsrc/cdopener.cpp272
1 files changed, 136 insertions, 136 deletions
diff --git a/src/cdopener.cpp b/src/cdopener.cpp
index acabbc8..7737638 100755
--- a/src/cdopener.cpp
+++ b/src/cdopener.cpp
@@ -17,18 +17,18 @@
#include <kfiledialog.h>
#include <kmessagebox.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qgroupbox.h>
-#include <qdatetime.h>
-#include <qcolor.h>
-#include <qdir.h>
-#include <qfile.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqgroupbox.h>
+#include <tqdatetime.h>
+#include <tqcolor.h>
+#include <tqdir.h>
+#include <tqfile.h>
// ### soundkonverter 0.4: implement cd info text
-CDOpener::CDOpener( Config* _config, CDManager* _cdManager, TagEngine* _tagEngine, const QString& _device, QWidget* parent, const char* name, /*Mode default_mode, const QString& default_text,*/ bool modal, WFlags f )
- : KDialog( parent, name, modal, f )
+CDOpener::CDOpener( Config* _config, CDManager* _cdManager, TagEngine* _tagEngine, const TQString& _device, TQWidget* tqparent, const char* name, /*Mode default_mode, const TQString& default_text,*/ bool modal, WFlags f )
+ : KDialog( tqparent, name, modal, f )
{
cdManager = _cdManager;
tagEngine = _tagEngine;
@@ -42,37 +42,37 @@ CDOpener::CDOpener( Config* _config, CDManager* _cdManager, TagEngine* _tagEngin
setIcon( iconLoader->loadIcon("cdaudio_unmount",KIcon::Small) );
// the grid for all widgets in the dialog
- QGridLayout* gridLayout = new QGridLayout( this, 1, 1, 11, 6, "gridLayout" );
+ TQGridLayout* gridLayout = new TQGridLayout( this, 1, 1, 11, 6, "gridLayout" );
// the grid for the artist and album input
- QGridLayout* topGridLayout = new QGridLayout( this, 1, 1, 0, 6, "topGridLayout" );
+ TQGridLayout* topGridLayout = new TQGridLayout( this, 1, 1, 0, 6, "topGridLayout" );
gridLayout->addLayout( topGridLayout, 0, 0 );
// set up the first row at the top
- QLabel* lArtistLabel = new QLabel( i18n("Artist:"), this, "lArtistLabel" );
+ TQLabel* lArtistLabel = new TQLabel( i18n("Artist:"), this, "lArtistLabel" );
topGridLayout->addWidget( lArtistLabel, 0, 0 );
cArtist = new KComboBox( true, this, "cArtist" );
topGridLayout->addWidget( cArtist, 0, 1 );
cArtist->setMinimumWidth( 200 );
cArtist->insertItem( i18n("Various Artists") );
cArtist->setCurrentText( "" );
- connect( cArtist, SIGNAL(textChanged(const QString&)),
- this, SLOT(artistChanged(const QString&))
+ connect( cArtist, TQT_SIGNAL(textChanged(const TQString&)),
+ this, TQT_SLOT(artistChanged(const TQString&))
);
- // add a horizontal box layout for the composer
- QHBoxLayout* artistBox = new QHBoxLayout( -1, "artistBox" );
+ // add a horizontal box tqlayout for the composer
+ TQHBoxLayout* artistBox = new TQHBoxLayout( -1, "artistBox" );
topGridLayout->addLayout( artistBox, 0, 3 );
// and fill it up
- QLabel* lComposerLabel = new QLabel( i18n("Composer:"), this, "lComposerLabel" );
- lComposerLabel->setAlignment( Qt::AlignRight | Qt::AlignVCenter );
+ TQLabel* lComposerLabel = new TQLabel( i18n("Composer:"), this, "lComposerLabel" );
+ lComposerLabel->tqsetAlignment( TQt::AlignRight | TQt::AlignVCenter );
topGridLayout->addWidget( lComposerLabel, 0, 2 );
cComposer = new KComboBox( true, this, "cComposer" );
artistBox->addWidget( cComposer );
cComposer->insertItem( i18n("Various Composer") );
cComposer->setCurrentText( "" );
- //cComposer->setSizePolicy( QSizePolicy::Maximum );
- connect( cComposer, SIGNAL(textChanged(const QString&)),
- this, SLOT(composerChanged(const QString&))
+ //cComposer->tqsetSizePolicy( TQSizePolicy::Maximum );
+ connect( cComposer, TQT_SIGNAL(textChanged(const TQString&)),
+ this, TQT_SLOT(composerChanged(const TQString&))
);
//artistBox->addStretch();
artistBox->addSpacing( 130 );
@@ -80,24 +80,24 @@ CDOpener::CDOpener( Config* _config, CDManager* _cdManager, TagEngine* _tagEngin
// topGridLayout->addWidget( pCDDB, 0, 8 );
// set up the second row at the top
- QLabel* lAlbumLabel = new QLabel( i18n("Album:"), this, "lAlbumLabel" );
+ TQLabel* lAlbumLabel = new TQLabel( i18n("Album:"), this, "lAlbumLabel" );
topGridLayout->addWidget( lAlbumLabel, 1, 0 );
lAlbum = new KLineEdit( this, "lAlbum" );
topGridLayout->addWidget( lAlbum, 1, 1 );
- // add a horizontal box layout for the disc number, year and genre
- QHBoxLayout* albumBox = new QHBoxLayout( -1, "albumBox" );
+ // add a horizontal box tqlayout for the disc number, year and genre
+ TQHBoxLayout* albumBox = new TQHBoxLayout( -1, "albumBox" );
topGridLayout->addLayout( albumBox, 1, 3 );
// and fill it up
- QLabel* lDiscLabel = new QLabel( i18n("Disc No.:"), this, "lDiscLabel" );
- lDiscLabel->setAlignment( Qt::AlignRight | Qt::AlignVCenter );
+ TQLabel* lDiscLabel = new TQLabel( i18n("Disc No.:"), this, "lDiscLabel" );
+ lDiscLabel->tqsetAlignment( TQt::AlignRight | TQt::AlignVCenter );
topGridLayout->addWidget( lDiscLabel, 1, 2 );
iDisc = new KIntSpinBox( 1, 99, 1, 1, 10, this, "iDisc" );
albumBox->addWidget( iDisc );
- QLabel* lYearLabel = new QLabel( i18n("Year:"), this, "lYearLabel" );
+ TQLabel* lYearLabel = new TQLabel( i18n("Year:"), this, "lYearLabel" );
albumBox->addWidget( lYearLabel );
- iYear = new KIntSpinBox( 0, 99999, 1, QDate::currentDate().year(), 10, this, "iYear" );
+ iYear = new KIntSpinBox( 0, 99999, 1, TQDate::tqcurrentDate().year(), 10, this, "iYear" );
albumBox->addWidget( iYear );
- QLabel* lGenreLabel = new QLabel( i18n("Genre:"), this, "lGenreLabel" );
+ TQLabel* lGenreLabel = new TQLabel( i18n("Genre:"), this, "lGenreLabel" );
albumBox->addWidget( lGenreLabel );
cGenre = new KComboBox( true, this, "cGenre" );
cGenre->insertStringList( tagEngine->genreList );
@@ -116,133 +116,133 @@ CDOpener::CDOpener( Config* _config, CDManager* _cdManager, TagEngine* _tagEngin
trackList->addColumn( i18n("Composer"), 0 );
trackList->addColumn( i18n("Title") );
trackList->addColumn( i18n("Time") );
- trackList->setSelectionMode( QListView::Extended );
+ trackList->setSelectionMode( TQListView::Extended );
trackList->setAllColumnsShowFocus( true );
- trackList->setResizeMode( QListView::LastColumn );
- connect( trackList, SIGNAL(selectionChanged()),
- this, SLOT(trackChanged())
+ trackList->setResizeMode( TQListView::LastColumn );
+ connect( trackList, TQT_SIGNAL(selectionChanged()),
+ this, TQT_SLOT(trackChanged())
);
- connect( trackList, SIGNAL(doubleClicked(QListViewItem*,const QPoint&,int)),
- this, SLOT(addClicked())
+ connect( trackList, TQT_SIGNAL(doubleClicked(TQListViewItem*,const TQPoint&,int)),
+ this, TQT_SLOT(addClicked())
);
gridLayout->setRowStretch( 1, 1 );
// create the box at the bottom for editing the tags
- tagGroupBox = new QGroupBox( i18n("No track selected"), this, "tagGroupBox" );
+ tagGroupBox = new TQGroupBox( i18n("No track selected"), this, "tagGroupBox" );
gridLayout->addWidget( tagGroupBox, 2, 0 );
tagGroupBox->setColumnLayout( 0, Qt::Vertical );
- tagGroupBox->layout()->setSpacing( 6 );
- tagGroupBox->layout()->setMargin( 6 );
- QGridLayout* tagGridLayout = new QGridLayout( tagGroupBox->layout(), 1, 1, -1, "tagGridLayout" );
+ tagGroupBox->tqlayout()->setSpacing( 6 );
+ tagGroupBox->tqlayout()->setMargin( 6 );
+ TQGridLayout* tagGridLayout = new TQGridLayout( tagGroupBox->tqlayout(), 1, 1, -1, "tagGridLayout" );
// add the up and down buttons
pTrackUp = new KPushButton( " ", tagGroupBox, "pTrackUp" );
pTrackUp->setPixmap( iconLoader->loadIcon("up",KIcon::Toolbar) );
pTrackUp->setAutoRepeat( true );
- connect( pTrackUp, SIGNAL(clicked()),
- this, SLOT(trackUpPressed())
+ connect( pTrackUp, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(trackUpPressed())
);
tagGridLayout->addWidget( pTrackUp, 0, 0 );
pTrackDown = new KPushButton( " ", tagGroupBox, "pTrackDown" );
pTrackDown->setPixmap( iconLoader->loadIcon("down",KIcon::Toolbar) );
pTrackDown->setAutoRepeat( true );
- connect( pTrackDown, SIGNAL(clicked()),
- this, SLOT(trackDownPressed())
+ connect( pTrackDown, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(trackDownPressed())
);
tagGridLayout->addWidget( pTrackDown, 1, 0 );
// add the inputs
- // add a horizontal box layout for the title
- QHBoxLayout* trackTitleBox = new QHBoxLayout( -1, "trackTitleBox" );
+ // add a horizontal box tqlayout for the title
+ TQHBoxLayout* trackTitleBox = new TQHBoxLayout( -1, "trackTitleBox" );
tagGridLayout->addLayout( trackTitleBox, 0, 2 );
// and fill it up
- QLabel *lTrackTitleLabel = new QLabel( i18n("Title:"), tagGroupBox, "lTrackTitleLabel" );
+ TQLabel *lTrackTitleLabel = new TQLabel( i18n("Title:"), tagGroupBox, "lTrackTitleLabel" );
tagGridLayout->addWidget( lTrackTitleLabel, 0, 1 );
lTrackTitle = new KLineEdit( tagGroupBox, "lTrackTitle" );
trackTitleBox->addWidget( lTrackTitle );
- connect( lTrackTitle, SIGNAL(textChanged(const QString&)),
- this, SLOT(trackTitleChanged(const QString&))
+ connect( lTrackTitle, TQT_SIGNAL(textChanged(const TQString&)),
+ this, TQT_SLOT(trackTitleChanged(const TQString&))
);
pTrackTitleEdit = new KPushButton( " ", tagGroupBox, "pTrackTitleEdit" );
pTrackTitleEdit->setPixmap( iconLoader->loadIcon("kwrite",KIcon::Small) );
- pTrackTitleEdit->setFixedSize( lTrackTitle->sizeHint().height(), lTrackTitle->sizeHint().height() );
+ pTrackTitleEdit->setFixedSize( lTrackTitle->tqsizeHint().height(), lTrackTitle->tqsizeHint().height() );
pTrackTitleEdit->hide();
trackTitleBox->addWidget( pTrackTitleEdit );
- connect( pTrackTitleEdit, SIGNAL(clicked()),
- this, SLOT(editTrackTitleClicked())
+ connect( pTrackTitleEdit, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(editTrackTitleClicked())
);
- // add a horizontal box layout for the composer
- QHBoxLayout* trackArtistBox = new QHBoxLayout( -1, "trackArtistBox" );
+ // add a horizontal box tqlayout for the composer
+ TQHBoxLayout* trackArtistBox = new TQHBoxLayout( -1, "trackArtistBox" );
tagGridLayout->addLayout( trackArtistBox, 1, 2 );
// and fill it up
- QLabel* lTrackArtistLabel = new QLabel( i18n("Artist:"), tagGroupBox, "lTrackArtistLabel" );
+ TQLabel* lTrackArtistLabel = new TQLabel( i18n("Artist:"), tagGroupBox, "lTrackArtistLabel" );
tagGridLayout->addWidget( lTrackArtistLabel, 1, 1 );
lTrackArtist = new KLineEdit( tagGroupBox, "lTrackArtist" );
trackArtistBox->addWidget( lTrackArtist );
- connect( lTrackArtist, SIGNAL(textChanged(const QString&)),
- this, SLOT(trackArtistChanged(const QString&))
+ connect( lTrackArtist, TQT_SIGNAL(textChanged(const TQString&)),
+ this, TQT_SLOT(trackArtistChanged(const TQString&))
);
pTrackArtistEdit = new KPushButton( " ", tagGroupBox, "pTrackArtistEdit" );
pTrackArtistEdit->setPixmap( iconLoader->loadIcon("kwrite",KIcon::Small) );
- pTrackArtistEdit->setFixedSize( lTrackArtist->sizeHint().height(), lTrackArtist->sizeHint().height() );
+ pTrackArtistEdit->setFixedSize( lTrackArtist->tqsizeHint().height(), lTrackArtist->tqsizeHint().height() );
pTrackArtistEdit->hide();
trackArtistBox->addWidget( pTrackArtistEdit );
- connect( pTrackArtistEdit, SIGNAL(clicked()),
- this, SLOT(editTrackArtistClicked())
+ connect( pTrackArtistEdit, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(editTrackArtistClicked())
);
- QLabel* lTrackComposerLabel = new QLabel( i18n("Composer:"), tagGroupBox, "lTrackComposerLabel" );
+ TQLabel* lTrackComposerLabel = new TQLabel( i18n("Composer:"), tagGroupBox, "lTrackComposerLabel" );
trackArtistBox->addWidget( lTrackComposerLabel );
lTrackComposer = new KLineEdit( tagGroupBox, "lTrackComposer" );
trackArtistBox->addWidget( lTrackComposer );
- connect( lTrackComposer, SIGNAL(textChanged(const QString&)),
- this, SLOT(trackComposerChanged(const QString&))
+ connect( lTrackComposer, TQT_SIGNAL(textChanged(const TQString&)),
+ this, TQT_SLOT(trackComposerChanged(const TQString&))
);
pTrackComposerEdit = new KPushButton( " ", tagGroupBox, "pTrackComposerEdit" );
pTrackComposerEdit->setPixmap( iconLoader->loadIcon("kwrite",KIcon::Small) );
- pTrackComposerEdit->setFixedSize( lTrackComposer->sizeHint().height(), lTrackComposer->sizeHint().height() );
+ pTrackComposerEdit->setFixedSize( lTrackComposer->tqsizeHint().height(), lTrackComposer->tqsizeHint().height() );
pTrackComposerEdit->hide();
trackArtistBox->addWidget( pTrackComposerEdit );
- connect( pTrackComposerEdit, SIGNAL(clicked()),
- this, SLOT(editTrackComposerClicked())
+ connect( pTrackComposerEdit, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(editTrackComposerClicked())
);
- // add a horizontal box layout for the comment
- QHBoxLayout* trackCommentBox = new QHBoxLayout( -1, "trackCommentBox" );
+ // add a horizontal box tqlayout for the comment
+ TQHBoxLayout* trackCommentBox = new TQHBoxLayout( -1, "trackCommentBox" );
tagGridLayout->addLayout( trackCommentBox, 2, 2 );
// and fill it up
- QLabel* lTrackCommentLabel = new QLabel( i18n("Comment:"), tagGroupBox, "lTrackCommentLabel" );
+ TQLabel* lTrackCommentLabel = new TQLabel( i18n("Comment:"), tagGroupBox, "lTrackCommentLabel" );
tagGridLayout->addWidget( lTrackCommentLabel, 2, 1 );
tTrackComment = new KTextEdit( tagGroupBox, "tTrackComment" );
trackCommentBox->addWidget( tTrackComment );
tTrackComment->setFixedHeight( 65 );
- connect( tTrackComment, SIGNAL(textChanged()),
- this, SLOT(trackCommentChanged())
+ connect( tTrackComment, TQT_SIGNAL(textChanged()),
+ this, TQT_SLOT(trackCommentChanged())
);
pTrackCommentEdit = new KPushButton( " ", tagGroupBox, "pTrackCommentEdit" );
pTrackCommentEdit->setPixmap( iconLoader->loadIcon("kwrite",KIcon::Small) );
- pTrackCommentEdit->setFixedSize( lTrackTitle->sizeHint().height(), lTrackTitle->sizeHint().height() );
+ pTrackCommentEdit->setFixedSize( lTrackTitle->tqsizeHint().height(), lTrackTitle->tqsizeHint().height() );
pTrackCommentEdit->hide();
trackCommentBox->addWidget( pTrackCommentEdit );
- connect( pTrackCommentEdit, SIGNAL(clicked()),
- this, SLOT(editTrackCommentClicked())
+ connect( pTrackCommentEdit, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(editTrackCommentClicked())
);
// draw a horizontal line
- QFrame* lineFrame = new QFrame( this, "lineFrame" );
- lineFrame->setFrameShape( QFrame::HLine );
- lineFrame->setFrameShadow( QFrame::Sunken );
- lineFrame->setFrameShape( QFrame::HLine );
+ TQFrame* lineFrame = new TQFrame( this, "lineFrame" );
+ lineFrame->setFrameShape( TQFrame::HLine );
+ lineFrame->setFrameShadow( TQFrame::Sunken );
+ lineFrame->setFrameShape( TQFrame::HLine );
gridLayout->addWidget( lineFrame, 3, 0 );
gridLayout->setRowSpacing( 3, 16 );
- // add a horizontal box layout for the control elements
- QHBoxLayout* controlBox = new QHBoxLayout( -1, "controlBox" );
+ // add a horizontal box tqlayout for the control elements
+ TQHBoxLayout* controlBox = new TQHBoxLayout( -1, "controlBox" );
gridLayout->addLayout( controlBox, 4, 0 );
// add the control elements
pSaveCue = new KPushButton( iconLoader->loadIcon("filesave",KIcon::Small), i18n("Save cuesheet ..."), this, "pSaveCue" );
controlBox->addWidget( pSaveCue );
- connect( pSaveCue, SIGNAL(clicked()),
- this, SLOT(saveCuesheetClicked())
+ connect( pSaveCue, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(saveCuesheetClicked())
);
controlBox->addStretch();
@@ -253,13 +253,13 @@ CDOpener::CDOpener( Config* _config, CDManager* _cdManager, TagEngine* _tagEngin
if( plugin != 0 && plugin->rip.full_disc.enabled ) cAdd->insertItem( iconLoader->loadIcon("cdaudio_unmount",KIcon::Small),i18n("Add full CD as one file") );
//cAdd->setSizeMode( ComboButton::Min );
controlBox->addWidget( cAdd );
- connect( cAdd, SIGNAL(clicked(int)),
- this, SLOT(addClicked(int))
+ connect( cAdd, TQT_SIGNAL(clicked(int)),
+ this, TQT_SLOT(addClicked(int))
);
pCancel = new KPushButton( iconLoader->loadIcon("cancel",KIcon::Small), i18n("Cancel"), this, "pCancel" );
controlBox->addWidget( pCancel );
- connect( pCancel, SIGNAL(clicked()),
- this, SLOT(reject())
+ connect( pCancel, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(reject())
);
// delete the icon loader object
@@ -267,19 +267,19 @@ CDOpener::CDOpener( Config* _config, CDManager* _cdManager, TagEngine* _tagEngin
bool various_artists = false;
bool various_composer = false;
- QString artist = "";
- QString composer = "";
- QString album = "";
+ TQString artist = "";
+ TQString composer = "";
+ TQString album = "";
int disc = 0;
int year = 0;
- QString genre = "";
+ TQString genre = "";
device = cdManager->newCDDevice( _device );
// don't execute the dialog, if no audio cd was found
noCD = device.isEmpty();
- QValueList<TagData*> tags = cdManager->getTrackList( device );
- for( QValueList<TagData*>::Iterator it = tags.begin(); it != tags.end(); ++it ) {
+ TQValueList<TagData*> tags = cdManager->getTrackList( device );
+ for( TQValueList<TagData*>::Iterator it = tags.begin(); it != tags.end(); ++it ) {
if( artist == "" ) artist = (*it)->artist;
else if( artist != (*it)->artist ) various_artists = true;
@@ -291,7 +291,7 @@ CDOpener::CDOpener( Config* _config, CDManager* _cdManager, TagEngine* _tagEngin
if( year == 0 ) year = (*it)->year;
if( genre == "" ) genre = (*it)->genre;
- new KListViewItem( trackList, QString().sprintf("%02i",(*it)->track), (*it)->artist, (*it)->composer, (*it)->title, QString().sprintf("%i:%02i",(*it)->length/60,(*it)->length%60) );
+ new KListViewItem( trackList, TQString().sprintf("%02i",(*it)->track), (*it)->artist, (*it)->composer, (*it)->title, TQString().sprintf("%i:%02i",(*it)->length/60,(*it)->length%60) );
}
trackList->setSorting( -1 );
@@ -329,7 +329,7 @@ CDOpener::CDOpener( Config* _config, CDManager* _cdManager, TagEngine* _tagEngin
CDOpener::~CDOpener()
{}
-int CDOpener::columnByName( const QString& name )
+int CDOpener::columnByName( const TQString& name )
{
for( int i = 0; i < trackList->columns(); ++i ) {
if( trackList->columnText( i ) == name ) return i;
@@ -339,20 +339,20 @@ int CDOpener::columnByName( const QString& name )
void CDOpener::trackUpPressed()
{
- QListViewItem* item = selectedItems.first()->itemAbove();
+ TQListViewItem* item = selectedItems.first()->itemAbove();
if( item != 0 ) {
item->setSelected( true );
- trackList->repaintItem( item );
+ trackList->tqrepaintItem( item );
trackList->ensureItemVisible( item );
}
else {
return; // NULL pointer (cannot be)
}
- for( QValueList<QListViewItem*>::Iterator it = selectedItems.begin(); it != selectedItems.end(); ++it ) {
+ for( TQValueList<TQListViewItem*>::Iterator it = selectedItems.begin(); it != selectedItems.end(); ++it ) {
(*it)->setSelected( false );
- trackList->repaintItem( *it );
+ trackList->tqrepaintItem( *it );
}
if( item->itemAbove() == 0 ) {
@@ -366,20 +366,20 @@ void CDOpener::trackUpPressed()
void CDOpener::trackDownPressed()
{
- QListViewItem* item = selectedItems.last()->itemBelow();
+ TQListViewItem* item = selectedItems.last()->itemBelow();
if( item != 0 ) {
item->setSelected( true );
- trackList->repaintItem( item );
+ trackList->tqrepaintItem( item );
trackList->ensureItemVisible( item );
}
else {
return; // NULL pointer (cannot be)
}
- for( QValueList<QListViewItem*>::Iterator it = selectedItems.begin(); it != selectedItems.end(); ++it ) {
+ for( TQValueList<TQListViewItem*>::Iterator it = selectedItems.begin(); it != selectedItems.end(); ++it ) {
(*it)->setSelected( false );
- trackList->repaintItem( *it );
+ trackList->tqrepaintItem( *it );
}
pTrackUp->setEnabled( true );
@@ -399,7 +399,7 @@ void CDOpener::trackChanged()
// rebuild the list of the selected tracks
selectedTracks.clear();
selectedItems.clear();
- for( QListViewItem *item = trackList->firstChild(); item != NULL; item = item->nextSibling() ) {
+ for( TQListViewItem *item = trackList->firstChild(); item != NULL; item = item->nextSibling() ) {
i++;
if( item->isSelected() ) {
selectedTracks.append( i );
@@ -435,29 +435,29 @@ void CDOpener::trackChanged()
if( selectedItems.last()->itemBelow() != 0 ) pTrackDown->setEnabled( true );
else pTrackDown->setEnabled( false );
- QString trackListString = "";
+ TQString trackListString = "";
if( selectedTracks.count() == trackList->childCount() ) {
trackListString = i18n("All tracks");
}
else {
- trackListString = i18n("Tracks") + QString().sprintf(" %02i",selectedTracks.first());
- QValueList<int>::Iterator track = selectedTracks.begin();
+ trackListString = i18n("Tracks") + TQString().sprintf(" %02i",selectedTracks.first());
+ TQValueList<int>::Iterator track = selectedTracks.begin();
track++;
for( ; track != selectedTracks.end(); ++track ) {
- trackListString += QString().sprintf(", %02i",*track);
+ trackListString += TQString().sprintf(", %02i",*track);
}
}
tagGroupBox->setTitle( trackListString );
- QString title = cdManager->getTags( device, selectedTracks.first() )->title;
+ TQString title = cdManager->getTags( device, selectedTracks.first() )->title;
bool equalTitles = true;
- QString artist = cdManager->getTags( device, selectedTracks.first() )->artist;
+ TQString artist = cdManager->getTags( device, selectedTracks.first() )->artist;
bool equalArtists = true;
- QString composer = cdManager->getTags( device, selectedTracks.first() )->composer;
+ TQString composer = cdManager->getTags( device, selectedTracks.first() )->composer;
bool equalComposers = true;
- QString comment = cdManager->getTags( device, selectedTracks.first() )->comment;
+ TQString comment = cdManager->getTags( device, selectedTracks.first() )->comment;
bool equalComments = true;
- for( QValueList<int>::Iterator track = selectedTracks.begin(); track != selectedTracks.end(); ++track ) {
+ for( TQValueList<int>::Iterator track = selectedTracks.begin(); track != selectedTracks.end(); ++track ) {
TagData* tags = cdManager->getTags( device, *track );
if( title != tags->title ) equalTitles = false;
@@ -529,7 +529,7 @@ void CDOpener::trackChanged()
if( selectedItems.first()->itemBelow() != 0 ) pTrackDown->setEnabled( true );
else pTrackDown->setEnabled( false );
- tagGroupBox->setTitle( i18n("Track") + QString().sprintf(" %02i",selectedTracks.first()) );
+ tagGroupBox->setTitle( i18n("Track") + TQString().sprintf(" %02i",selectedTracks.first()) );
TagData* tags = cdManager->getTags( device, selectedTracks.first() );
lTrackTitle->setEnabled( true );
@@ -562,7 +562,7 @@ void CDOpener::trackChanged()
}
}
-void CDOpener::artistChanged( const QString& text )
+void CDOpener::artistChanged( const TQString& text )
{
if( text == i18n("Various Artists") ) {
trackList->adjustColumn( columnByName( i18n("Artist") ) );
@@ -574,7 +574,7 @@ void CDOpener::artistChanged( const QString& text )
trackChanged();
}
-void CDOpener::composerChanged( const QString& text )
+void CDOpener::composerChanged( const TQString& text )
{
if( text == i18n("Various Composer") ) {
trackList->adjustColumn( columnByName( i18n("Composer") ) );
@@ -586,40 +586,40 @@ void CDOpener::composerChanged( const QString& text )
trackChanged();
}
-void CDOpener::trackTitleChanged( const QString& text )
+void CDOpener::trackTitleChanged( const TQString& text )
{
if( !lTrackTitle->isEnabled() ) return;
- for( QValueList<QListViewItem*>::Iterator it = selectedItems.begin(); it != selectedItems.end(); ++it ) {
+ for( TQValueList<TQListViewItem*>::Iterator it = selectedItems.begin(); it != selectedItems.end(); ++it ) {
(*it)->setText( columnByName( i18n("Title") ), text );
}
- for( QValueList<int>::Iterator it = selectedTracks.begin(); it != selectedTracks.end(); ++it ) {
+ for( TQValueList<int>::Iterator it = selectedTracks.begin(); it != selectedTracks.end(); ++it ) {
TagData* tags = cdManager->getTags( device, *it );
tags->title = text;
}
}
-void CDOpener::trackArtistChanged( const QString& text )
+void CDOpener::trackArtistChanged( const TQString& text )
{
if( !lTrackArtist->isEnabled() ) return;
- for( QValueList<QListViewItem*>::Iterator it = selectedItems.begin(); it != selectedItems.end(); ++it ) {
+ for( TQValueList<TQListViewItem*>::Iterator it = selectedItems.begin(); it != selectedItems.end(); ++it ) {
(*it)->setText( columnByName( i18n("Artist") ), text );
}
- for( QValueList<int>::Iterator it = selectedTracks.begin(); it != selectedTracks.end(); ++it ) {
+ for( TQValueList<int>::Iterator it = selectedTracks.begin(); it != selectedTracks.end(); ++it ) {
TagData* tags = cdManager->getTags( device, *it );
tags->artist = text;
}
}
-void CDOpener::trackComposerChanged( const QString& text )
+void CDOpener::trackComposerChanged( const TQString& text )
{
if( !lTrackComposer->isEnabled() ) return;
- for( QValueList<QListViewItem*>::Iterator it = selectedItems.begin(); it != selectedItems.end(); ++it ) {
+ for( TQValueList<TQListViewItem*>::Iterator it = selectedItems.begin(); it != selectedItems.end(); ++it ) {
(*it)->setText( columnByName( i18n("Composer") ), text );
}
- for( QValueList<int>::Iterator it = selectedTracks.begin(); it != selectedTracks.end(); ++it ) {
+ for( TQValueList<int>::Iterator it = selectedTracks.begin(); it != selectedTracks.end(); ++it ) {
TagData* tags = cdManager->getTags( device, *it );
tags->composer = text;
}
@@ -627,11 +627,11 @@ void CDOpener::trackComposerChanged( const QString& text )
void CDOpener::trackCommentChanged()
{
- QString text = tTrackComment->text();
+ TQString text = tTrackComment->text();
if( !tTrackComment->isEnabled() ) return;
- for( QValueList<int>::Iterator it = selectedTracks.begin(); it != selectedTracks.end(); ++it ) {
+ for( TQValueList<int>::Iterator it = selectedTracks.begin(); it != selectedTracks.end(); ++it ) {
TagData* tags = cdManager->getTags( device, *it );
tags->comment = text;
}
@@ -674,7 +674,7 @@ void CDOpener::addClicked( int index )
{
if( index == 0 )
{
- QValueList<int> allTracks;
+ TQValueList<int> allTracks;
// TODO save all options (album artist, disc, genre, etc.)
for( int it = 1; it <= cdManager->getTrackCount(device); ++it ) {
@@ -692,7 +692,7 @@ void CDOpener::addClicked( int index )
else if( index == 1 )
{
// TODO save all options (album artist, disc, genre, etc.)
- for( QValueList<int>::Iterator it = selectedTracks.begin(); it != selectedTracks.end(); ++it ) {
+ for( TQValueList<int>::Iterator it = selectedTracks.begin(); it != selectedTracks.end(); ++it ) {
TagData* tags = cdManager->getTags( device, *it );
if( cArtist->currentText() != i18n("Various Artists") ) tags->artist = cArtist->currentText();
if( cComposer->currentText() != i18n("Various Composer") ) tags->composer = cComposer->currentText();
@@ -733,10 +733,10 @@ void CDOpener::addClicked( int index )
void CDOpener::saveCuesheetClicked()
{
- QString filename = KFileDialog::getSaveFileName( QDir::homeDirPath(), "*.cue" );
+ TQString filename = KFileDialog::getSaveFileName( TQDir::homeDirPath(), "*.cue" );
if( filename.isEmpty() ) return;
- QFile cueFile( filename );
+ TQFile cueFile( filename );
if( cueFile.exists() ) {
int ret = KMessageBox::questionYesNo( this,
i18n("A file with this name already exists.\n\nDo you want to overwrite the existing one?"),
@@ -745,7 +745,7 @@ void CDOpener::saveCuesheetClicked()
}
if( !cueFile.open( IO_WriteOnly ) ) return;
- QString content;
+ TQString content;
content.append( "TITLE \"" + lAlbum->text() + "\"\n" );
content.append( "PERFORMER \"" + cArtist->currentText() + "\"\n" );
@@ -753,25 +753,25 @@ void CDOpener::saveCuesheetClicked()
int INDEX = 0;
bool addFrames = false;
- QValueList<TagData*> tags = cdManager->getTrackList( device );
- for( QValueList<TagData*>::Iterator it = tags.begin(); it != tags.end(); ++it ) {
- content.append( QString().sprintf(" TRACK %02i AUDIO\n",(*it)->track ) );
+ TQValueList<TagData*> tags = cdManager->getTrackList( device );
+ for( TQValueList<TagData*>::Iterator it = tags.begin(); it != tags.end(); ++it ) {
+ content.append( TQString().sprintf(" TRACK %02i AUDIO\n",(*it)->track ) );
content.append( " TITLE \"" + (*it)->title + "\"\n" );
content.append( " PERFORMER \"" + (*it)->artist + "\"\n" );
if( addFrames ) {
- content.append( QString().sprintf(" INDEX 01 %02i:%02i:37\n",INDEX/60,INDEX%60) );
+ content.append( TQString().sprintf(" INDEX 01 %02i:%02i:37\n",INDEX/60,INDEX%60) );
INDEX++;
addFrames = false;
}
else {
- content.append( QString().sprintf(" INDEX 01 %02i:%02i:00\n",INDEX/60,INDEX%60) );
+ content.append( TQString().sprintf(" INDEX 01 %02i:%02i:00\n",INDEX/60,INDEX%60) );
addFrames = true;
}
INDEX += (*it)->length;
}
- QTextStream ts( &cueFile );
+ TQTextStream ts( &cueFile );
ts << content;
cueFile.close();