summaryrefslogtreecommitdiffstats
path: root/src/languages/picprogrammer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/languages/picprogrammer.cpp')
-rw-r--r--src/languages/picprogrammer.cpp104
1 files changed, 52 insertions, 52 deletions
diff --git a/src/languages/picprogrammer.cpp b/src/languages/picprogrammer.cpp
index 6f5e76f..882622e 100644
--- a/src/languages/picprogrammer.cpp
+++ b/src/languages/picprogrammer.cpp
@@ -18,12 +18,12 @@
#include <klocale.h>
#include <kmessagebox.h>
-#include <qapplication.h>
-#include <qfile.h>
+#include <tqapplication.h>
+#include <tqfile.h>
#include <kprocess.h>
-#include <qregexp.h>
-#include <qtextstream.h>
-#include <qdatetime.h>
+#include <tqregexp.h>
+#include <tqtextstream.h>
+#include <tqdatetime.h>
#include <stdio.h>
@@ -35,12 +35,12 @@ ProgrammerConfig::ProgrammerConfig()
void ProgrammerConfig::reset()
{
- initCommand = QString::null;
- readCommand = QString::null;
- writeCommand = QString::null;
- verifyCommand = QString::null;
- blankCheckCommand = QString::null;
- eraseCommand = QString::null;
+ initCommand = TQString();
+ readCommand = TQString();
+ writeCommand = TQString();
+ verifyCommand = TQString();
+ blankCheckCommand = TQString();
+ eraseCommand = TQString();
}
//END class ProgrammerConfig
@@ -63,7 +63,7 @@ void PicProgrammerSettings::initStaticConfigs()
m_bDoneStaticConfigsInit = true;
ProgrammerConfig config;
- config.description = i18n("Supported programmers: %1").arg("JuPic, PICStart Plus, Warp-13");
+ config.description = i18n("Supported programmers: %1").tqarg("JuPic, PICStart Plus, Warp-13");
config.description += i18n("<br>Interface: Serial Port");
config.initCommand = "";
config.readCommand = "picp %port %device -rp %file";
@@ -75,7 +75,7 @@ void PicProgrammerSettings::initStaticConfigs()
m_staticConfigs[ "PICP" ] = config;
- config.description = i18n("Supported programmers: %1").arg("Epic Plus");
+ config.description = i18n("Supported programmers: %1").tqarg("Epic Plus");
config.description += i18n("<br>Interface: Parallel Port");
config.initCommand = "odyssey init";
config.readCommand = "odyssey %device read %file";
@@ -87,7 +87,7 @@ void PicProgrammerSettings::initStaticConfigs()
m_staticConfigs[ "Odyssey" ] = config;
- config.description = i18n("Supported programmers: %1").arg("JDM PIC-Programmer 2, PIC-PG2C");
+ config.description = i18n("Supported programmers: %1").tqarg("JDM PIC-Programmer 2, PIC-PG2C");
config.description += i18n("<br>Interface: Serial Port");
config.initCommand = "";
config.readCommand = "picprog --output %file --pic %port";
@@ -98,7 +98,7 @@ void PicProgrammerSettings::initStaticConfigs()
m_staticConfigs[ "PICProg" ] = config;
- config.description = i18n("Supported programmers: %1").arg("Epic Plus");
+ config.description = i18n("Supported programmers: %1").tqarg("Epic Plus");
config.description += i18n("<br>Interface: Parallel Port");
config.initCommand = "";
config.readCommand = "dump84 --dump-all --output=%file";
@@ -109,7 +109,7 @@ void PicProgrammerSettings::initStaticConfigs()
m_staticConfigs[ "prog84" ] = config;
- config.description = i18n("Supported programmers: %1").arg("Kit 149, Kit 150");
+ config.description = i18n("Supported programmers: %1").tqarg("Kit 149, Kit 150");
config.description += i18n("<br>Interface: USB Port");
config.initCommand = "";
config.readCommand = "pp -d %device -r %file";
@@ -120,7 +120,7 @@ void PicProgrammerSettings::initStaticConfigs()
m_staticConfigs[ "PP" ] = config;
- config.description = i18n("Supported programmers: %1").arg("Wisp628");
+ config.description = i18n("Supported programmers: %1").tqarg("Wisp628");
config.description += i18n("<br>Interface: Serial Port");
config.initCommand = "";
config.readCommand = "xwisp ID %device PORT %device DUMP";
@@ -132,7 +132,7 @@ void PicProgrammerSettings::initStaticConfigs()
#if 0
- config.description = i18n("Supported programmers: %1").arg("Epic Plus, JDM PIC-Programmer 2, PICCOLO, PICCOLO Grande, Trivial HVP Programmer");
+ config.description = i18n("Supported programmers: %1").tqarg("Epic Plus, JDM PIC-Programmer 2, PICCOLO, PICCOLO Grande, Trivial HVP Programmer");
config.description += i18n("<br>Interface: Serial Port and Parallel Port");
config.initCommand = "";
config.readCommand = "";
@@ -145,7 +145,7 @@ void PicProgrammerSettings::initStaticConfigs()
config.executable = "";
- config.description = i18n("Supported programmers: %1").arg("Trivial LVP programmer, Trivial HVP Programmer");
+ config.description = i18n("Supported programmers: %1").tqarg("Trivial LVP programmer, Trivial HVP Programmer");
config.description += i18n("<br>Interface: Parallel Port");
config.initCommand = "";
config.readCommand = "";
@@ -156,7 +156,7 @@ void PicProgrammerSettings::initStaticConfigs()
m_staticConfigs[ "PicPrg2" ] = config;
- config.description = i18n("Supported programmers: %1").arg("El Cheapo");
+ config.description = i18n("Supported programmers: %1").tqarg("El Cheapo");
config.description += i18n("<br>Interface: Parallel Port");
config.initCommand = "";
config.readCommand = "";
@@ -167,7 +167,7 @@ void PicProgrammerSettings::initStaticConfigs()
m_staticConfigs[ "PP06" ] = config;
- config.description = i18n("Supported programmers: %1").arg("NOPPP");
+ config.description = i18n("Supported programmers: %1").tqarg("NOPPP");
config.description += i18n("<br>Interface: Parallel Port");
config.initCommand = "";
config.readCommand = "";
@@ -178,7 +178,7 @@ void PicProgrammerSettings::initStaticConfigs()
m_staticConfigs[ "NOPPP" ] = config;
- config.description = i18n("Supported programmers: %1").arg("SNOPPP");
+ config.description = i18n("Supported programmers: %1").tqarg("SNOPPP");
config.description += i18n("<br>Interface: Parallel Port");
config.initCommand = "";
config.readCommand = "";
@@ -193,9 +193,9 @@ void PicProgrammerSettings::initStaticConfigs()
void PicProgrammerSettings::load( KConfig * config )
{
- QStringList oldCustomProgrammers = config->groupList().grep("CustomProgrammer_");
- QStringList::iterator ocpEnd = oldCustomProgrammers.end();
- for ( QStringList::iterator it = oldCustomProgrammers.begin(); it != ocpEnd; ++it )
+ TQStringList oldCustomProgrammers = config->groupList().grep("CustomProgrammer_");
+ TQStringList::iterator ocpEnd = oldCustomProgrammers.end();
+ for ( TQStringList::iterator it = oldCustomProgrammers.begin(); it != ocpEnd; ++it )
{
// The CustomProgrammer_ string we searched for might appear half way through... (don't want)
if ( (*it).startsWith("CustomProgrammer_") )
@@ -210,7 +210,7 @@ void PicProgrammerSettings::load( KConfig * config )
pc.blankCheckCommand = config->readEntry( "BlankCheckCommand" );
pc.eraseCommand = config->readEntry( "EraseCommand" );
- QString name = config->readEntry( "Name" );
+ TQString name = config->readEntry( "Name" );
m_customConfigs[name] = pc;
}
}
@@ -219,9 +219,9 @@ void PicProgrammerSettings::load( KConfig * config )
void PicProgrammerSettings::save( KConfig * config )
{
- QStringList oldCustomProgrammers = config->groupList().grep("CustomProgrammer_");
- QStringList::iterator ocpEnd = oldCustomProgrammers.end();
- for ( QStringList::iterator it = oldCustomProgrammers.begin(); it != ocpEnd; ++it )
+ TQStringList oldCustomProgrammers = config->groupList().grep("CustomProgrammer_");
+ TQStringList::iterator ocpEnd = oldCustomProgrammers.end();
+ for ( TQStringList::iterator it = oldCustomProgrammers.begin(); it != ocpEnd; ++it )
{
// The CustomProgrammer_ string we searched for might appear half way through... (don't want)
if ( (*it).startsWith("CustomProgrammer_") )
@@ -232,7 +232,7 @@ void PicProgrammerSettings::save( KConfig * config )
ProgrammerConfigMap::iterator end = m_customConfigs.end();
for ( ProgrammerConfigMap::iterator it = m_customConfigs.begin(); it != end; ++it )
{
- config->setGroup( QString("CustomProgrammer_%1").arg(at++) );
+ config->setGroup( TQString("CustomProgrammer_%1").tqarg(at++) );
config->writeEntry( "Name", it.key() );
config->writeEntry( "InitCommand", it.data().initCommand );
@@ -245,12 +245,12 @@ void PicProgrammerSettings::save( KConfig * config )
}
-ProgrammerConfig PicProgrammerSettings::config( const QString & name )
+ProgrammerConfig PicProgrammerSettings::config( const TQString & name )
{
if ( name.isEmpty() )
return ProgrammerConfig();
- QString l = name.lower();
+ TQString l = name.lower();
ProgrammerConfigMap::const_iterator end = m_customConfigs.end();
for ( ProgrammerConfigMap::const_iterator it = m_customConfigs.begin(); it != end; ++it )
@@ -270,7 +270,7 @@ ProgrammerConfig PicProgrammerSettings::config( const QString & name )
}
-void PicProgrammerSettings::removeConfig( const QString & name )
+void PicProgrammerSettings::removeConfig( const TQString & name )
{
if ( isPredefined( name ) )
{
@@ -278,7 +278,7 @@ void PicProgrammerSettings::removeConfig( const QString & name )
return;
}
- QString l = name.lower();
+ TQString l = name.lower();
ProgrammerConfigMap::iterator end = m_customConfigs.end();
for ( ProgrammerConfigMap::iterator it = m_customConfigs.begin(); it != end; ++it )
@@ -292,7 +292,7 @@ void PicProgrammerSettings::removeConfig( const QString & name )
}
-void PicProgrammerSettings::saveConfig( const QString & name, const ProgrammerConfig & config )
+void PicProgrammerSettings::saveConfig( const TQString & name, const ProgrammerConfig & config )
{
if ( isPredefined( name ) )
{
@@ -300,7 +300,7 @@ void PicProgrammerSettings::saveConfig( const QString & name, const ProgrammerCo
return;
}
- QString l = name.lower();
+ TQString l = name.lower();
ProgrammerConfigMap::iterator end = m_customConfigs.end();
for ( ProgrammerConfigMap::iterator it = m_customConfigs.begin(); it != end; ++it )
@@ -316,12 +316,12 @@ void PicProgrammerSettings::saveConfig( const QString & name, const ProgrammerCo
}
-QStringList PicProgrammerSettings::configNames( bool makeLowercase ) const
+TQStringList PicProgrammerSettings::configNames( bool makeLowercase ) const
{
if ( !makeLowercase )
return m_customConfigs.keys() + m_staticConfigs.keys();
- QStringList names;
+ TQStringList names;
ProgrammerConfigMap::const_iterator end = m_customConfigs.end();
for ( ProgrammerConfigMap::const_iterator it = m_customConfigs.begin(); it != end; ++it )
@@ -335,9 +335,9 @@ QStringList PicProgrammerSettings::configNames( bool makeLowercase ) const
}
-bool PicProgrammerSettings::isPredefined( const QString & name ) const
+bool PicProgrammerSettings::isPredefined( const TQString & name ) const
{
- QString l = name.lower();
+ TQString l = name.lower();
ProgrammerConfigMap::const_iterator end = m_staticConfigs.end();
for ( ProgrammerConfigMap::const_iterator it = m_staticConfigs.begin(); it != end; ++it )
@@ -353,8 +353,8 @@ bool PicProgrammerSettings::isPredefined( const QString & name ) const
//BEGIN class PicProgrammer
-PicProgrammer::PicProgrammer( ProcessChain *processChain, KTechlab * parent )
- : ExternalLanguage( processChain, parent, "PicProgrammer" )
+PicProgrammer::PicProgrammer( ProcessChain *processChain, KTechlab * tqparent )
+ : ExternalLanguage( processChain, tqparent, "PicProgrammer" )
{
m_successfulMessage = i18n("*** Programming successful ***");
m_failedMessage = i18n("*** Programming failed ***");
@@ -374,8 +374,8 @@ void PicProgrammer::processInput( ProcessOptions options )
PicProgrammerSettings settings;
settings.load( kapp->config() );
- QString program = options.m_program;
- if ( !settings.configNames( true ).contains( program.lower() ) )
+ TQString program = options.m_program;
+ if ( !settings.configNames( true ).tqcontains( program.lower() ) )
{
kdError() << k_funcinfo << "Invalid program" << endl;
finish( false );
@@ -384,10 +384,10 @@ void PicProgrammer::processInput( ProcessOptions options )
ProgrammerConfig config = settings.config( program );
- QString command = config.writeCommand;
- command.replace( "%port", options.m_port );
- command.replace( "%device", QString( options.m_picID ).remove("P") );
- command.replace( "%file", KProcess::quote( options.inputFiles().first() ) );
+ TQString command = config.writeCommand;
+ command.tqreplace( "%port", options.m_port );
+ command.tqreplace( "%device", TQString( options.m_picID ).remove("P") );
+ command.tqreplace( "%file", KProcess::quote( options.inputFiles().first() ) );
m_languageProcess->setUseShell( true );
*m_languageProcess << command;
@@ -401,15 +401,15 @@ void PicProgrammer::processInput( ProcessOptions options )
}
-bool PicProgrammer::isError( const QString &message ) const
+bool PicProgrammer::isError( const TQString &message ) const
{
- return message.contains( "Error", false );
+ return message.tqcontains( "Error", false );
}
-bool PicProgrammer::isWarning( const QString &message ) const
+bool PicProgrammer::isWarning( const TQString &message ) const
{
- return message.contains( "Warning", false );
+ return message.tqcontains( "Warning", false );
}