summaryrefslogtreecommitdiffstats
path: root/amarok/src/directorylist.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'amarok/src/directorylist.cpp')
-rw-r--r--amarok/src/directorylist.cpp90
1 files changed, 45 insertions, 45 deletions
diff --git a/amarok/src/directorylist.cpp b/amarok/src/directorylist.cpp
index 30ae5bf5..930f597c 100644
--- a/amarok/src/directorylist.cpp
+++ b/amarok/src/directorylist.cpp
@@ -23,30 +23,30 @@
#include <kfileitem.h>
#include <klocale.h>
-#include <qfile.h>
-#include <qlabel.h>
-#include <qpainter.h>
-#include <qtooltip.h>
+#include <tqfile.h>
+#include <tqlabel.h>
+#include <tqpainter.h>
+#include <tqtooltip.h>
CollectionSetup* CollectionSetup::s_instance;
-CollectionSetup::CollectionSetup( QWidget *parent )
- : QVBox( parent, "CollectionSetup" )
+CollectionSetup::CollectionSetup( TQWidget *parent )
+ : TQVBox( parent, "CollectionSetup" )
{
s_instance = this;
- (new QLabel( i18n(
+ (new TQLabel( i18n(
"These folders will be scanned for "
"media to make up your collection:"), this ))->setAlignment( Qt::WordBreak );
m_view = new QFixedListView( this );
- m_recursive = new QCheckBox( i18n("&Scan folders recursively"), this );
- m_monitor = new QCheckBox( i18n("&Watch folders for changes"), this );
+ m_recursive = new TQCheckBox( i18n("&Scan folders recursively"), this );
+ m_monitor = new TQCheckBox( i18n("&Watch folders for changes"), this );
- QToolTip::add( m_recursive, i18n( "If selected, Amarok will read all subfolders." ) );
- QToolTip::add( m_monitor, i18n( "If selected, folders will automatically get rescanned when the content is modified, e.g. when a new file was added." ) );
+ TQToolTip::add( m_recursive, i18n( "If selected, Amarok will read all subfolders." ) );
+ TQToolTip::add( m_monitor, i18n( "If selected, folders will automatically get rescanned when the content is modified, e.g. when a new file was added." ) );
// Read config values
//we have to detect if this is the actual first run and not get the collectionFolders in that case
@@ -59,12 +59,12 @@ CollectionSetup::CollectionSetup( QWidget *parent )
m_recursive->setChecked( AmarokConfig::scanRecursively() );
m_monitor->setChecked( AmarokConfig::monitorChanges() );
- m_view->addColumn( QString::null );
+ m_view->addColumn( TQString::null );
m_view->setRootIsDecorated( true );
- m_view->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding );
- m_view->setResizeMode( QListView::LastColumn );
+ m_view->setSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Expanding );
+ m_view->setResizeMode( TQListView::LastColumn );
- reinterpret_cast<QWidget*>(m_view->header())->hide();
+ reinterpret_cast<TQWidget*>(m_view->header())->hide();
new Collection::Item( m_view );
setSpacing( 6 );
@@ -78,9 +78,9 @@ CollectionSetup::writeConfig()
//subdirectories of the selected directories
if ( recursive() )
{
- for ( QStringList::iterator it=m_dirs.begin(); it!=m_dirs.end(); ++it )
+ for ( TQStringList::iterator it=m_dirs.begin(); it!=m_dirs.end(); ++it )
{
- QStringList::iterator jt=m_dirs.begin();
+ TQStringList::iterator jt=m_dirs.begin();
while ( jt!=m_dirs.end() )
{
if ( it==jt )
@@ -112,8 +112,8 @@ CollectionSetup::writeConfig()
namespace Collection {
-Item::Item( QListView *parent )
- : QCheckListItem( parent, "/", QCheckListItem::CheckBox )
+Item::Item( TQListView *parent )
+ : TQCheckListItem( parent, "/", TQCheckListItem::CheckBox )
, m_lister( true )
, m_url( "file:/" )
, m_listed( false )
@@ -121,16 +121,16 @@ Item::Item( QListView *parent )
{
//Since we create the "/" checklistitem here, we need to enable it if needed
if ( CollectionSetup::instance()->m_dirs.contains( "/" ) )
- static_cast<QCheckListItem*>( this )->setOn(true);
+ static_cast<TQCheckListItem*>( this )->setOn(true);
m_lister.setDirOnlyMode( true );
- connect( &m_lister, SIGNAL(newItems( const KFileItemList& )), SLOT(newItems( const KFileItemList& )) );
+ connect( &m_lister, TQT_SIGNAL(newItems( const KFileItemList& )), TQT_SLOT(newItems( const KFileItemList& )) );
setOpen( true );
setVisible( true );
}
-Item::Item( QListViewItem *parent, const KURL &url , bool full_disable /* default=false */ )
- : QCheckListItem( parent, url.fileName(), QCheckListItem::CheckBox )
+Item::Item( TQListViewItem *parent, const KURL &url , bool full_disable /* default=false */ )
+ : TQCheckListItem( parent, url.fileName(), TQCheckListItem::CheckBox )
, m_lister( true )
, m_url( url )
, m_listed( false )
@@ -138,18 +138,18 @@ Item::Item( QListViewItem *parent, const KURL &url , bool full_disable /* defaul
{
m_lister.setDirOnlyMode( true );
setExpandable( true );
- connect( &m_lister, SIGNAL(newItems( const KFileItemList& )), SLOT(newItems( const KFileItemList& )) );
- connect( &m_lister, SIGNAL(completed()), SLOT(completed()) );
- connect( &m_lister, SIGNAL(canceled()), SLOT(completed()) );
+ connect( &m_lister, TQT_SIGNAL(newItems( const KFileItemList& )), TQT_SLOT(newItems( const KFileItemList& )) );
+ connect( &m_lister, TQT_SIGNAL(completed()), TQT_SLOT(completed()) );
+ connect( &m_lister, TQT_SIGNAL(canceled()), TQT_SLOT(completed()) );
}
QString
Item::fullPath() const
{
- QString path;
+ TQString path;
- for( const QListViewItem *item = this; item != listView()->firstChild(); item = item->parent() )
+ for( const TQListViewItem *item = this; item != listView()->firstChild(); item = item->parent() )
{
path.prepend( item->text( 0 ) );
path.prepend( '/' );
@@ -168,22 +168,22 @@ Item::setOpen( bool b )
m_listed = true;
}
- QListViewItem::setOpen( b );
+ TQListViewItem::setOpen( b );
}
void
Item::stateChange( bool b )
{
- QStringList &cs_m_dirs = CollectionSetup::instance()->m_dirs;
+ TQStringList &cs_m_dirs = CollectionSetup::instance()->m_dirs;
if ( isFullyDisabled() )
return;
if( CollectionSetup::instance()->recursive() )
- for( QListViewItem *item = firstChild(); item; item = item->nextSibling() )
+ for( TQListViewItem *item = firstChild(); item; item = item->nextSibling() )
if ( dynamic_cast<Item*>( item ) && !dynamic_cast<Item*>( item )->isFullyDisabled() )
- static_cast<QCheckListItem*>(item)->QCheckListItem::setOn( b );
+ static_cast<TQCheckListItem*>(item)->TQCheckListItem::setOn( b );
//If it is disabled, allow us to change its appearance (above code) but not add it
//to the list of folders (code below)
@@ -191,7 +191,7 @@ Item::stateChange( bool b )
return;
// Update folder list
- QStringList::Iterator it = cs_m_dirs.find( m_url.path() );
+ TQStringList::Iterator it = cs_m_dirs.find( m_url.path() );
if ( isOn() ) {
if ( it == cs_m_dirs.end() )
cs_m_dirs << m_url.path();
@@ -199,7 +199,7 @@ Item::stateChange( bool b )
// Deselect subdirectories if we are in recursive mode as they are redundant
if ( CollectionSetup::instance()->recursive() )
{
- QStringList::Iterator diriter = cs_m_dirs.begin();
+ TQStringList::Iterator diriter = cs_m_dirs.begin();
while ( diriter != cs_m_dirs.end() )
{
// Since the dir "/" starts with '/', we need a hack to stop it removing
@@ -221,13 +221,13 @@ Item::stateChange( bool b )
//special case
if ( it != cs_m_dirs.end() )
cs_m_dirs.erase( it );
- QStringList::Iterator diriter = cs_m_dirs.begin();
+ TQStringList::Iterator diriter = cs_m_dirs.begin();
while ( diriter != cs_m_dirs.end() )
{
if ( (*diriter).startsWith( m_url.path(1) ) ) //path(1) adds a trailing '/'
{
if ( CollectionSetup::instance()->recursive() ||
- !QFile::exists( *diriter ) )
+ !TQFile::exists( *diriter ) )
{
diriter = cs_m_dirs.erase(diriter);
}
@@ -248,7 +248,7 @@ void
Item::activate()
{
if( !isDisabled() )
- QCheckListItem::activate();
+ TQCheckListItem::activate();
}
@@ -286,30 +286,30 @@ Item::newItems( const KFileItemList &list ) //SLOT
void
-Item::paintCell( QPainter * p, const QColorGroup & cg, int column, int width, int align )
+Item::paintCell( TQPainter * p, const TQColorGroup & cg, int column, int width, int align )
{
bool dirty = false;
- QStringList &cs_m_dirs = CollectionSetup::instance()->m_dirs;
+ TQStringList &cs_m_dirs = CollectionSetup::instance()->m_dirs;
// Figure out if a child folder is activated
- for ( QStringList::const_iterator iter = cs_m_dirs.begin(); iter != cs_m_dirs.end();
+ for ( TQStringList::const_iterator iter = cs_m_dirs.begin(); iter != cs_m_dirs.end();
++iter )
if ( ( *iter ).startsWith( m_url.path(1) ) )
if ( *iter != "/" ) // "/" should not match as a child of "/"
dirty = true;
// Use a different color if this folder has an activated child folder
- const QFont f = p->font();
- QColorGroup _cg = cg;
+ const TQFont f = p->font();
+ TQColorGroup _cg = cg;
if ( dirty )
{
- _cg.setColor( QColorGroup::Text, listView()->colorGroup().link() );
- QFont font = p->font();
+ _cg.setColor( TQColorGroup::Text, listView()->colorGroup().link() );
+ TQFont font = p->font();
font.setBold( !font.bold() );
p->setFont( font );
}
- QCheckListItem::paintCell( p, isDisabled() ? listView()->palette().disabled() : _cg, column, width, align );
+ TQCheckListItem::paintCell( p, isDisabled() ? listView()->palette().disabled() : _cg, column, width, align );
p->setFont( f );
}