summaryrefslogtreecommitdiffstats
path: root/src/filelist.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <[email protected]>2011-12-15 15:33:54 -0600
committerTimothy Pearson <[email protected]>2011-12-15 15:33:54 -0600
commit4614cf2e7bce250f5b9cdef409cb89330d60bb1d (patch)
tree630297f3af9c048e22b4a376bb89f8f73e582983 /src/filelist.cpp
parent4e8c56f8ce07340aadde2098d909a71c645a8000 (diff)
downloadsoundkonverter-4614cf2e7bce250f5b9cdef409cb89330d60bb1d.tar.gz
soundkonverter-4614cf2e7bce250f5b9cdef409cb89330d60bb1d.zip
Rename a number of old tq methods that are no longer tq specific
Diffstat (limited to 'src/filelist.cpp')
-rwxr-xr-xsrc/filelist.cpp62
1 files changed, 31 insertions, 31 deletions
diff --git a/src/filelist.cpp b/src/filelist.cpp
index de6e46e..ecb9e68 100755
--- a/src/filelist.cpp
+++ b/src/filelist.cpp
@@ -21,7 +21,7 @@
#include <kurldrag.h>
#include <kapplication.h>
-#include <tqlayout.h>
+#include <layout.h>
#include <tqfileinfo.h>
#include <tqsimplerichtext.h>
#include <tqpainter.h>
@@ -59,7 +59,7 @@ FileListItem::FileListItem( KListView* parent )
FileListItem::~FileListItem()
{}
-void FileListItem::paintCell( TQPainter *p, const TQColorGroup &cg, int column, int width, int tqalignment )
+void FileListItem::paintCell( TQPainter *p, const TQColorGroup &cg, int column, int width, int alignment )
{
// NOTE speed up this function
// NOTE calculate the red color
@@ -72,14 +72,14 @@ void FileListItem::paintCell( TQPainter *p, const TQColorGroup &cg, int column,
int margin = listView()->itemMargin();
int w = width - 2*margin;
int h = height();
- TQRect textRect = p->boundingRect( margin, 0, w, h, tqalignment, text(column) );
+ TQRect textRect = p->boundingRect( margin, 0, w, h, alignment, text(column) );
if( textRect.width() > w ) {
- tqalignment = TQt::AlignRight | TQt::SingleLine;
+ alignment = TQt::AlignRight | TQt::SingleLine;
}
/*if ( textRect.width() <= w ) {
- p->drawText( margin, 0, w, h, tqalignment | TQt::SingleLine | TQt::ExpandTabs, text(column), -1 );
+ p->drawText( margin, 0, w, h, alignment | TQt::SingleLine | TQt::ExpandTabs, text(column), -1 );
}
else {
textRect = p->boundingRect( margin, 0, w, h, TQt::AlignLeft, "... " );
@@ -90,21 +90,21 @@ void FileListItem::paintCell( TQPainter *p, const TQColorGroup &cg, int column,
if( isSelected() && converting ) {
_cg.setColor( TQColorGroup::Highlight, TQColor( 215, 62, 62 ) );
- TQListViewItem::paintCell( p, _cg, column, width, tqalignment );
+ TQListViewItem::paintCell( p, _cg, column, width, alignment );
return;
}
else if( converting && column != listView()->sortColumn() ) {
_cg.setColor( TQColorGroup::Base, TQColor( 255, 234, 234 ) );
- TQListViewItem::paintCell( p, _cg, column, width, tqalignment );
+ TQListViewItem::paintCell( p, _cg, column, width, alignment );
return;
}
else if( converting && column == listView()->sortColumn() ) {
_cg.setColor( TQColorGroup::Base, TQColor( 247, 227, 227 ) );
- TQListViewItem::paintCell( p, _cg, column, width, tqalignment );
+ TQListViewItem::paintCell( p, _cg, column, width, alignment );
return;
}
- KListViewItem::paintCell( p, _cg, column, width, tqalignment );
+ KListViewItem::paintCell( p, _cg, column, width, alignment );
}
/*void FileListItem::updateOutputCell()
@@ -152,11 +152,11 @@ FileList::FileList( CDManager* _cdManager, TagEngine* _tagEngine, Config* _confi
grid->setRowStretch( 2, 1 );
grid->setColStretch( 0, 1 );
grid->setColStretch( 2, 1 );
- pScantqStatus = new KProgress( this, "pScanStatus" );
- pScantqStatus->setMinimumHeight( pScantqStatus->height() );
- pScantqStatus->setFormat( "%v / %m" );
- pScantqStatus->hide();
- grid->addWidget( pScantqStatus, 1, 1 );
+ pScanStatus = new KProgress( this, "pScanStatus" );
+ pScanStatus->setMinimumHeight( pScanStatus->height() );
+ pScanStatus->setFormat( "%v / %m" );
+ pScanStatus->hide();
+ grid->addWidget( pScanStatus, 1, 1 );
grid->setColStretch( 1, 2 );
contextMenu = new KPopupMenu( this );
@@ -226,9 +226,9 @@ void FileList::viewportPaintEvent( TQPaintEvent* e )
const uint w = bubble->width() + 20;
const uint h = bubble->height() + 20;
- p.setBrush( tqcolorGroup().background() );
+ p.setBrush( colorGroup().background() );
p.drawRoundRect( 15, 15, w, h, (8*200)/w, (8*200)/h );
- bubble->draw( &p, 20, 20, TQRect(), tqcolorGroup() );
+ bubble->draw( &p, 20, 20, TQRect(), colorGroup() );
}
}
@@ -379,15 +379,15 @@ int FileList::listDir( const TQString& directory, TQStringList filter, bool recu
else if( !fileInfo.isDir() || !recursive ) { // NOTE checking for isFile may not work with all file names
// NOTE filter feature
for( TQStringList::Iterator jt = filter.begin(); jt != filter.end(); ++jt ) {
- if( (*it).tqendsWith("."+(*jt),false) ) {
+ if( (*it).endsWith("."+(*jt),false) ) {
count++;
- pScantqStatus->setTotalSteps( count );
+ pScanStatus->setTotalSteps( count );
break;
}
}
if( filter.first() == "" ) {
count++;
- pScantqStatus->setTotalSteps( count );
+ pScanStatus->setTotalSteps( count );
}
}
}
@@ -398,17 +398,17 @@ int FileList::listDir( const TQString& directory, TQStringList filter, bool recu
else if( !fileInfo.isDir() || !recursive ) { // NOTE checking for isFile may not work with all file names
// NOTE filter feature
for( TQStringList::Iterator jt = filter.begin(); jt != filter.end(); ++jt ) {
- if( (*it).tqendsWith("."+(*jt),false) ) {
+ if( (*it).endsWith("."+(*jt),false) ) {
addFiles( KURL::encode_string(directory + "/" + *it) );
count++;
- pScantqStatus->setProgress( count );
+ pScanStatus->setProgress( count );
break;
}
}
if( filter.first() == "" ) {
addFiles( KURL::encode_string(directory + "/" + *it) );
count++;
- pScantqStatus->setProgress( count );
+ pScanStatus->setProgress( count );
}
}
}
@@ -567,15 +567,15 @@ void FileList::addFiles( TQStringList fileList, FileListItem* after, bool enable
void FileList::addDir( const TQString& directory, const TQStringList& filter, bool recursive )
{
- pScantqStatus->setProgress( 0 );
- pScantqStatus->setTotalSteps( 0 );
- pScantqStatus->show(); // show the status while scanning the directories
+ pScanStatus->setProgress( 0 );
+ pScanStatus->setTotalSteps( 0 );
+ pScanStatus->show(); // show the status while scanning the directories
kapp->processEvents();
int count = listDir( directory, filter, recursive, true );
listDir( directory, filter, recursive );
- pScantqStatus->hide(); // hide the status bar, when the scan is done
+ pScanStatus->hide(); // hide the status bar, when the scan is done
}
void FileList::addTracks( const TQString& device, TQValueList<int> trackList )
@@ -587,7 +587,7 @@ void FileList::addTracks( const TQString& device, TQValueList<int> trackList )
// if( newItem->options.outputOptions.mode != OutputDirectory::Specify ) newItem->options.outputOptions.mode = OutputDirectory::MetaData;
newItem->notify = notify;
newItem->track = (*it);
- newItem->fileName = i18n("Audio CD (%1)").tqarg(device) + ": " + i18n("Track") + TQString().sprintf(" %02i",newItem->track);
+ newItem->fileName = i18n("Audio CD (%1)").arg(device) + ": " + i18n("Track") + TQString().sprintf(" %02i",newItem->track);
newItem->mimeType = "application/x-cda";
newItem->fileFormat = "cda";
newItem->local = true;
@@ -602,7 +602,7 @@ void FileList::addTracks( const TQString& device, TQValueList<int> trackList )
// logger->log( 1000, " " + i18n("Tags successfully read") );
newItem->time = newItem->tags->length;
newItem->options.filePathName = TQDir::homeDirPath() + "/" + TQString().sprintf("%02i - ",newItem->track) + newItem->tags->title + "." + newItem->fileFormat;
- newItem->fileName = i18n("Audio CD (%1)").tqarg(device) + ": " + TQString().sprintf("%02i - ",newItem->track) + newItem->tags->title;
+ newItem->fileName = i18n("Audio CD (%1)").arg(device) + ": " + TQString().sprintf("%02i - ",newItem->track) + newItem->tags->title;
}
updateItem( newItem );
emit increaseTime( newItem->time );
@@ -612,13 +612,13 @@ void FileList::addTracks( const TQString& device, TQValueList<int> trackList )
void FileList::addDisc( const TQString& device )
{
-// logger->log( 1000, i18n("Adding full audio CD (%1)").tqarg(device) );
+// logger->log( 1000, i18n("Adding full audio CD (%1)").arg(device) );
FileListItem* newItem = new FileListItem( this, lastItem() );
newItem->options = options->getCurrentOptions();
// if( newItem->options.outputOptions.mode != OutputDirectory::Specify ) newItem->options.outputOptions.mode = OutputDirectory::MetaData;
newItem->notify = notify;
newItem->track = 0;
- newItem->fileName = i18n("Full audio CD (%1)").tqarg(device);
+ newItem->fileName = i18n("Full audio CD (%1)").arg(device);
newItem->mimeType = "application/x-cda";
newItem->fileFormat = "cda";
newItem->local = true;
@@ -633,7 +633,7 @@ void FileList::addDisc( const TQString& device )
// logger->log( 1000, " " + i18n("Tags successfully read") );
newItem->time = newItem->tags->length;
newItem->options.filePathName = TQDir::homeDirPath() + newItem->tags->title + "." + newItem->fileFormat;
- newItem->fileName = i18n("Full audio CD (%1)").tqarg(device) + ": " + newItem->tags->title;
+ newItem->fileName = i18n("Full audio CD (%1)").arg(device) + ": " + newItem->tags->title;
}
updateItem( newItem );
emit increaseTime( newItem->time );