summaryrefslogtreecommitdiffstats
path: root/krename/fileplugin.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'krename/fileplugin.cpp')
-rw-r--r--krename/fileplugin.cpp60
1 files changed, 30 insertions, 30 deletions
diff --git a/krename/fileplugin.cpp b/krename/fileplugin.cpp
index 535b8bb..6c43053 100644
--- a/krename/fileplugin.cpp
+++ b/krename/fileplugin.cpp
@@ -17,11 +17,11 @@
#include "fileplugin.h"
-// Qt includes
-#include <qcheckbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qregexp.h>
+// TQt includes
+#include <tqcheckbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqregexp.h>
// KDE includes
#include <kapplication.h>
@@ -42,7 +42,7 @@ FilePlugin::FilePlugin( KService* service )
KFileMetaInfoProvider* mip = KFileMetaInfoProvider::self();
m_name = service->name();
m_comment = service->comment();
- QStringList options = service->serviceTypes();
+ TQStringList options = service->serviceTypes();
for( unsigned int i = 0; i < options.count(); i++ ) {
if( options[i] != "KFilePlugin" ) {
m_mimetype = options[i];
@@ -53,7 +53,7 @@ FilePlugin::FilePlugin( KService* service )
fileplugin = mip->plugin( m_mimetype );
KMimeType::Ptr mime = KMimeType::mimeType( m_mimetype );
- m_icon = mime->icon( QString::null, true ); // arguments are unused
+ m_icon = mime->icon( TQString(), true ); // arguments are unused
setPattern( mime );
}
@@ -65,7 +65,7 @@ FilePlugin::~FilePlugin()
void FilePlugin::setPattern( KMimeType::Ptr mime )
{
- QStringList pattern = mime->patterns();
+ TQStringList pattern = mime->patterns();
if( pattern.count() ) {
m_pattern = pattern[0];
if( m_pattern.startsWith( "*." ) )
@@ -76,11 +76,11 @@ void FilePlugin::setPattern( KMimeType::Ptr mime )
// We need a pattern
if( m_pattern.isEmpty() ) {
int a = 0;
- a = m_name.find( "-" );
+ a = m_name.tqfind( "-" );
if( a > -1 )
m_pattern = m_name.left( a ).lower();
else {
- a = m_pattern.find( " " );
+ a = m_pattern.tqfind( " " );
if( a > -1 )
m_pattern = m_name.left( a ).lower();
else
@@ -97,17 +97,17 @@ void FilePlugin::setupKeys()
keys[i] = getPattern() + keys[i];
}
-const QString FilePlugin::getName() const
+const TQString FilePlugin::getName() const
{
return m_name;
}
-const QString FilePlugin::getAccelName() const
+const TQString FilePlugin::getAccelName() const
{
return "&" + getName();
}
-const QString FilePlugin::getPattern() const
+const TQString FilePlugin::getPattern() const
{
return m_pattern;
}
@@ -122,22 +122,22 @@ bool FilePlugin::checkError()
return true;
}
-void FilePlugin::drawInterface( QWidget* w, QVBoxLayout* l )
+void FilePlugin::drawInterface( TQWidget* w, TQVBoxLayout* l )
{
- QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Expanding );
+ TQSpacerItem* spacer = new TQSpacerItem( 20, 20, TQSizePolicy::Expanding, TQSizePolicy::Expanding );
- QHBoxLayout* hbox = new QHBoxLayout( 0, 6, 6 );
+ TQHBoxLayout* hbox = new TQHBoxLayout( 0, 6, 6 );
- QLabel* pix = new QLabel( w );
+ TQLabel* pix = new TQLabel( w );
pix->setPixmap( kapp->iconLoader()->loadIcon( m_icon, KIcon::Desktop ) );
hbox->addWidget( pix );
- hbox->addWidget( new QLabel( "<qt><b>"+getName()+"</b></qt>", w ) );
+ hbox->addWidget( new TQLabel( "<qt><b>"+getName()+"</b></qt>", w ) );
hbox->addItem( spacer );
l->addLayout( hbox );
- l->addWidget( new QLabel( m_comment, w ) );
- l->addWidget( new QLabel( i18n("Supported tokens:"), w ) );
+ l->addWidget( new TQLabel( m_comment, w ) );
+ l->addWidget( new TQLabel( i18n("Supported tokens:"), w ) );
KListBox* list = new KListBox( w );
list->setColumnMode( KListBox::FitToWidth );
@@ -149,27 +149,27 @@ void FilePlugin::drawInterface( QWidget* w, QVBoxLayout* l )
l->setStretchFactor( list, 2 );
}
-QString FilePlugin::processFile( BatchRenamer* b, int i, QString token, int )
+TQString FilePlugin::processFile( BatchRenamer* b, int i, TQString token, int )
{
- QString filename = BatchRenamer::buildFilename( &b->files()[i].src );
+ TQString filename = BatchRenamer::buildFilename( &b->files()[i].src );
token = token.lower();
/*
* Check if we have something cached for this file
*/
- if( cache.contains( filename + "::" + token ) )
+ if( cache.tqcontains( filename + "::" + token ) )
return cache[filename + "::" + token ];
for( unsigned int i = 0; i < keys.count(); i++ ) {
if( token.lower() == keys[i].lower() ) {
KFileMetaInfo meta( filename );
if( meta.isValid() ) {
- QString k = keys[i];
+ TQString k = keys[i];
if( k.startsWith( getPattern() ) )
k = k.mid( getPattern().length(), k.length() - getPattern().length() );
- QString ret = meta.item( k ).string( true ).stripWhiteSpace();
+ TQString ret = meta.item( k ).string( true ).stripWhiteSpace();
if( cache.count() >= CACHE_MAX )
cache.remove( cache.begin() );
@@ -181,27 +181,27 @@ QString FilePlugin::processFile( BatchRenamer* b, int i, QString token, int )
}
}
- return QString::null;
+ return TQString();
}
void FilePlugin::addHelp( HelpDialogData* data )
{
- QStringList list;
+ TQStringList list;
for( unsigned int i = 0; i < keys.count(); i++ )
list.append( "[" + keys[i] + "]" + ";;" + keys[i] );
data->add( getName(), &list, getIcon() );
}
-const QPixmap FilePlugin::getIcon() const
+const TQPixmap FilePlugin::getIcon() const
{
return kapp->iconLoader()->loadIcon( m_icon, KIcon::Small );
}
-bool FilePlugin::supports( const QString & token )
+bool FilePlugin::supports( const TQString & token )
{
for( unsigned int i = 0; i < keys.count(); i++ )
- if( QRegExp( keys[i].lower() ).exactMatch( token.lower() ) )
+ if( TQRegExp( keys[i].lower() ).exactMatch( token.lower() ) )
return true;
return false;