summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-08-10 06:08:18 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-08-10 06:08:18 +0000
commit33038ab0e8b8e7fb05093f953e4f6f724c6e2482 (patch)
tree6a5f53930c5919157cb0f1e928500f97ff8dde95
parent7a4cd8d44ee83c7de058bb0da8ae6676166e9325 (diff)
downloadkbarcode-33038ab0.tar.gz
kbarcode-33038ab0.zip
rename the following methods:
tqfind find tqreplace replace tqcontains contains git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kbarcode@1246075 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
-rw-r--r--kbarcode/barcodeitem.cpp2
-rw-r--r--kbarcode/barkode.cpp8
-rw-r--r--kbarcode/batchwizard.cpp6
-rw-r--r--kbarcode/databasebrowser.cpp16
-rw-r--r--kbarcode/databasebrowser.h4
-rw-r--r--kbarcode/definition.cpp12
-rw-r--r--kbarcode/dsrichtext.cpp30
-rw-r--r--kbarcode/dsrichtext.h2
-rw-r--r--kbarcode/dstextedit.cpp12
-rw-r--r--kbarcode/kactionmap.cpp2
-rw-r--r--kbarcode/kactionmap.h2
-rw-r--r--kbarcode/label.cpp4
-rw-r--r--kbarcode/labeleditor.cpp8
-rw-r--r--kbarcode/labelutils.cpp4
-rw-r--r--kbarcode/main.cpp6
-rw-r--r--kbarcode/mybarcode.cpp8
-rw-r--r--kbarcode/mycanvasview.cpp2
-rw-r--r--kbarcode/purepostscript.cpp4
-rw-r--r--kbarcode/sqltables.cpp2
-rw-r--r--kbarcode/sqltables.h2
-rw-r--r--kbarcode/tec.cpp118
-rw-r--r--kbarcode/textitem.cpp6
-rw-r--r--kbarcode/textlineitem.cpp6
-rw-r--r--kbarcode/tokenprovider.cpp28
-rw-r--r--kbarcode/tokenprovider.h2
-rw-r--r--kbarcode/xmlutils.cpp4
26 files changed, 150 insertions, 150 deletions
diff --git a/kbarcode/barcodeitem.cpp b/kbarcode/barcodeitem.cpp
index e5d58cf..39af930 100644
--- a/kbarcode/barcodeitem.cpp
+++ b/kbarcode/barcodeitem.cpp
@@ -84,7 +84,7 @@ void BarcodeItem::loadXML (TQDomElement* element)
/*
* check for encoding types saved by kbarcode <= 1.2.0
*/
- if( legacy.tqcontains( type() ) )
+ if( legacy.contains( type() ) )
setType( legacy[type()] );
setTextVisible( element->attribute("text", "0" ).toInt() );
diff --git a/kbarcode/barkode.cpp b/kbarcode/barkode.cpp
index f9c6510..9e460a1 100644
--- a/kbarcode/barkode.cpp
+++ b/kbarcode/barkode.cpp
@@ -248,19 +248,19 @@ const TQString Barkode::parsedValue()
if( !sequenceEnabled() )
return text;
- if( m_value.tqcontains( '#' ) <= 0 )
+ if( m_value.contains( '#' ) <= 0 )
return text;
int pos = 0, counter = 1;
- pos = text.tqfind("#", pos);
+ pos = text.find("#", pos);
pos++;
while( text[pos] == '#' ) {
text.remove(pos, 1);
counter++;
}
- pos = text.tqfind("#", 0);
+ pos = text.find("#", 0);
TQString temp;
if( sequenceMode() == NUM ) {
@@ -298,7 +298,7 @@ const TQString Barkode::parsedValue()
}
}
- text.tqreplace( pos, 1, temp);
+ text.replace( pos, 1, temp);
return text;
}
diff --git a/kbarcode/batchwizard.cpp b/kbarcode/batchwizard.cpp
index 7ae3b04..153aa81 100644
--- a/kbarcode/batchwizard.cpp
+++ b/kbarcode/batchwizard.cpp
@@ -251,8 +251,8 @@ void BatchWizard::setupPage10()
TQStringList formats = KImageIO::types( KImageIO::Writing );
comboFormat = new KComboBox( false, formatBox );
comboFormat->insertStringList( formats );
- if( formats.tqcontains( PNG_FORMAT ) )
- comboFormat->setCurrentItem( formats.tqfindIndex( PNG_FORMAT ) );
+ if( formats.contains( PNG_FORMAT ) )
+ comboFormat->setCurrentItem( formats.findIndex( PNG_FORMAT ) );
label->setBuddy( comboFormat );
TQVButtonGroup* imageNameGroup = new TQVButtonGroup( i18n("&Filename:"), imageBox );
@@ -762,7 +762,7 @@ void BatchWizard::addGroupCompletion( const TQString & group )
if( !group.isEmpty() )
{
TQStringList slist = compGroup->items();
- if(!slist.tqcontains( group ) )
+ if(!slist.contains( group ) )
compGroup->addItem( group );
}
}
diff --git a/kbarcode/databasebrowser.cpp b/kbarcode/databasebrowser.cpp
index e4e5ef1..ecbae53 100644
--- a/kbarcode/databasebrowser.cpp
+++ b/kbarcode/databasebrowser.cpp
@@ -84,7 +84,7 @@ void DatabaseBrowser::setupActions()
KAction* acut = KStdAction::cut( TQT_TQOBJECT(this), TQT_SLOT( cut() ), actionCollection() );
KAction* acopy = KStdAction::copy( TQT_TQOBJECT(this), TQT_SLOT( copy() ), actionCollection() );
KAction* apaste = KStdAction::paste( TQT_TQOBJECT(this), TQT_SLOT( paste() ), actionCollection() );
- KAction* atqfind = KStdAction::find( TQT_TQOBJECT(this), TQT_SLOT( find() ), actionCollection() );
+ KAction* afind = KStdAction::find( TQT_TQOBJECT(this), TQT_SLOT( find() ), actionCollection() );
menuBar()->insertItem( i18n("&Edit"), editMenu, -1, 1 );
acut->plug( editMenu );
@@ -92,7 +92,7 @@ void DatabaseBrowser::setupActions()
apaste->plug( editMenu );
editMenu->insertSeparator();
- atqfind->plug( editMenu );
+ afind->plug( editMenu );
KStdAction::findNext( TQT_TQOBJECT(this), TQT_SLOT( findNext() ), actionCollection() )->plug( editMenu );
editMenu->insertSeparator();
KAction* aimport = new KAction( i18n("&Import CSV File..."), "",
@@ -104,7 +104,7 @@ void DatabaseBrowser::setupActions()
apaste->plug( toolBar() );
toolBar()->insertSeparator();
- atqfind->plug( toolBar() );
+ afind->plug( toolBar() );
DSMainWindow::loadConfig();
}
@@ -133,12 +133,12 @@ void DatabaseBrowser::setupSql()
table->refresh( TQDataTable::RefreshAll );
}
-void DatabaseBrowser::tqfind()
+void DatabaseBrowser::find()
{
if( !findDlg )
findDlg = new KEdFind( this, "findDlg", false );
- findDlg->setText( m_tqfind );
+ findDlg->setText( m_find );
findDlg->setDirection( m_direction );
findDlg->setCaseSensitive( m_case );
connect( findDlg, TQT_SIGNAL( search() ), this, TQT_SLOT( findNext() ) );
@@ -150,13 +150,13 @@ void DatabaseBrowser::tqfind()
void DatabaseBrowser::findNext()
{
if( findDlg ) {
- m_tqfind = findDlg->getText();
+ m_find = findDlg->getText();
m_direction = findDlg->get_direction();
m_case = findDlg->case_sensitive();
} else
- tqfind();
+ find();
- table->tqfind( m_tqfind, m_case, m_direction );
+ table->find( m_find, m_case, m_direction );
}
void DatabaseBrowser::cut()
diff --git a/kbarcode/databasebrowser.h b/kbarcode/databasebrowser.h
index ca196b1..28afc0b 100644
--- a/kbarcode/databasebrowser.h
+++ b/kbarcode/databasebrowser.h
@@ -47,7 +47,7 @@ class DatabaseBrowser : public DSMainWindow{
void copy();
void paste();
- void tqfind();
+ void find();
void findNext();
void import();
@@ -62,7 +62,7 @@ class DatabaseBrowser : public DSMainWindow{
KEdFind* findDlg;
- TQString m_tqfind;
+ TQString m_find;
bool m_direction;
bool m_case;
};
diff --git a/kbarcode/definition.cpp b/kbarcode/definition.cpp
index 1ca3713..5f849f9 100644
--- a/kbarcode/definition.cpp
+++ b/kbarcode/definition.cpp
@@ -81,7 +81,7 @@ class PrivateParser {
PrivateParser::PrivateParser( TQString line, bool all )
{
line = line.stripWhiteSpace();
- int pos = line.tqfind("(");
+ int pos = line.find("(");
line = line.mid( pos + 1, line.length() - pos - 1 );
m_label_def_id = TQString(line.section( ",", 0, 0 )).stripWhiteSpace();
@@ -353,7 +353,7 @@ const TQStringList Definition::getProducers()
increaseProgress();
PrivateParser p( s, false );
- if( !listProducers->tqcontains( p.getProducer() ) )
+ if( !listProducers->contains( p.getProducer() ) )
listProducers->append( p.getProducer() );
}
@@ -365,7 +365,7 @@ const TQStringList Definition::getProducers()
const TQStringList Definition::getTypes( TQString producer )
{
- if( mapTypes.tqcontains( producer ) ) {
+ if( mapTypes.contains( producer ) ) {
return mapTypes[producer];
}
@@ -374,7 +374,7 @@ const TQStringList Definition::getTypes( TQString producer )
if( SqlTables::isConnected() ) {
TQSqlQuery query("SELECT type FROM " TABLE_LABEL_DEF " WHERE manufacture='" + producer + "'" );
while( query.next() )
- if( !list.tqcontains( query.value( 0 ).toString() ) )
+ if( !list.contains( query.value( 0 ).toString() ) )
list.append( query.value( 0 ).toString() );
} else {
if(!openFile())
@@ -392,7 +392,7 @@ const TQStringList Definition::getTypes( TQString producer )
PrivateParser p( s, false );
if( p.getProducer() == producer )
- if( !list.tqcontains( p.getType() ) )
+ if( !list.contains( p.getType() ) )
list.append( p.getType() );
}
@@ -486,7 +486,7 @@ int Definition::writeFile( const Measurements & c, TQString type, TQString produ
TQTextStream t( file );
for( unsigned int i = 0; i < data.count(); i++ )
- t << data[i].tqreplace( TQRegExp("\\n"), "" ) << "\n";
+ t << data[i].replace( TQRegExp("\\n"), "" ) << "\n";
// get the file back to the normal stage
file->close();
diff --git a/kbarcode/dsrichtext.cpp b/kbarcode/dsrichtext.cpp
index 15d08fe..2898f1d 100644
--- a/kbarcode/dsrichtext.cpp
+++ b/kbarcode/dsrichtext.cpp
@@ -47,7 +47,7 @@ Another example
DSRichText::DSRichText( const TQString & t )
: text( t )
{
- if( text.tqfind("<html>") == -1 )
+ if( text.find("<html>") == -1 )
text = "<html><head><meta name=\"qrichtext\" content=\"1\" /></head><body style=\"font-size:10pt;font-family:Nimbus Sans l\"><p>"
+ t + "</p></body></html>";
@@ -66,7 +66,7 @@ DSRichText::DSRichText( const TQString & t )
m_base = parseStyle( parse( tmp, "style=\"", "\"", pos ), &m_color );
}
- pos = text.tqfind( "<p", 0 ); // initalize pos correctly
+ pos = text.find( "<p", 0 ); // initalize pos correctly
while( parseParagraph() ); // empty while loop
}
@@ -246,7 +246,7 @@ bool DSRichText::parseParagraph()
break;
if( d[i] == '<' ) {
- TQString span = d.mid( i, d.tqfind( ">", i ) - i + 1 );
+ TQString span = d.mid( i, d.find( ">", i ) - i + 1 );
i += span.length();
if( span.startsWith( "<span " ) ) {
@@ -275,7 +275,7 @@ TQFont DSRichText::parseStyle( const TQString & s, TQColor* color )
TQFont f = m_base;
*color = m_color;
- for ( int i = 0; i < style.tqcontains(';')+1; i++ ) {
+ for ( int i = 0; i < style.contains(';')+1; i++ ) {
TQString s = style.section( ';', i, i );
if( s.isEmpty() )
continue;
@@ -311,17 +311,17 @@ TQFont DSRichText::parseStyle( const TQString & s, TQColor* color )
return f;
}
-TQString DSRichText::parse( const TQString & t, const TQString & tqfind, const TQString & tqfind2, int start )
+TQString DSRichText::parse( const TQString & t, const TQString & find, const TQString & find2, int start )
{
- int s = t.tqfind( tqfind, start );
+ int s = t.find( find, start );
if( s == -1 || s < start )
return TQString();
- int pend = t.tqfind( tqfind2, s + tqfind.length() );
- if( pend == -1 || pend < (signed int)(s + tqfind.length()) )
+ int pend = t.find( find2, s + find.length() );
+ if( pend == -1 || pend < (signed int)(s + find.length()) )
return TQString();
- TQString text = t.mid( s, pend - s + tqfind2.length() );
+ TQString text = t.mid( s, pend - s + find2.length() );
return text;
}
@@ -396,10 +396,10 @@ inline int DSRichText::yDeviation( const formated_line* line )
TQString DSRichText::replaceEscapeSequences( const TQString & t )
{
TQString tmp = TQString( t );
- tmp = tmp.tqreplace( DSREPLACE( "&lt;" ), "<" );
- tmp = tmp.tqreplace( DSREPLACE( "&gt;" ), ">" );
- tmp = tmp.tqreplace( DSREPLACE( "&amp;" ), "&" );
- tmp = tmp.tqreplace( DSREPLACE( "&quot;" ), "\"" );
+ tmp = tmp.replace( DSREPLACE( "&lt;" ), "<" );
+ tmp = tmp.replace( DSREPLACE( "&gt;" ), ">" );
+ tmp = tmp.replace( DSREPLACE( "&amp;" ), "&" );
+ tmp = tmp.replace( DSREPLACE( "&quot;" ), "\"" );
return tmp;
}
@@ -410,8 +410,8 @@ TQString DSRichText::parseParagraphTag( const TQString &t, int* tqalignment )
d = d.mid( 3, d.length() - 3 );
} else if( d.startsWith("<p ") ) {
*tqalignment = parseAlignment( parse( d, "align=\"", "\"", 0 ) );
- if( d.tqcontains( ">" ) ) {
- int x = d.tqfind(">" ) + 1;
+ if( d.contains( ">" ) ) {
+ int x = d.find(">" ) + 1;
d = d.mid( x, d.length() - x );
}
}
diff --git a/kbarcode/dsrichtext.h b/kbarcode/dsrichtext.h
index dcd9c60..8381419 100644
--- a/kbarcode/dsrichtext.h
+++ b/kbarcode/dsrichtext.h
@@ -148,7 +148,7 @@ class DSRichText {
* style. The font color is saved in the TQColor* @p color.
*/
TQFont parseStyle( const TQString & s, TQColor* color );
- TQString parse( const TQString & t, const TQString & tqfind, const TQString & end, int start );
+ TQString parse( const TQString & t, const TQString & find, const TQString & end, int start );
void parseWords( const TQString & t, formated_word* w, WordList* words );
void initFormat( formated_word* f, int tqalignment );
void initLine( TQValueList<formated_line>* l );
diff --git a/kbarcode/dstextedit.cpp b/kbarcode/dstextedit.cpp
index 370d88c..13d9e07 100644
--- a/kbarcode/dstextedit.cpp
+++ b/kbarcode/dstextedit.cpp
@@ -85,13 +85,13 @@ void DSTextEdit::fixParagraphs()
while( pos != -1 )
{
- pos = t.tqfindRev( "</p>", pos );
+ pos = t.findRev( "</p>", pos );
if( pos != -1 )
{
++count;
if( count > 1 ) //&& pos != -1 )
- t = t.tqreplace( pos, 4, "<br />" );
+ t = t.replace( pos, 4, "<br />" );
else
pos -= 4;
}
@@ -128,14 +128,14 @@ bool DSTextEdit::cursorIsInToken()
qDebug("data=" + data );
--index;
- firstopen = data.tqfindRev( "[", index );
- firstclose = data.tqfindRev( "]", index );
+ firstopen = data.findRev( "[", index );
+ firstclose = data.findRev( "]", index );
++index;
if( firstopen != -1 && firstopen > firstclose )
{
- firstopen = data.tqfind( "[", index );
- firstclose = data.tqfind( "]", index );
+ firstopen = data.find( "[", index );
+ firstclose = data.find( "]", index );
if( ( firstclose != -1 && firstopen != -1 && firstclose < firstopen ) ||
( firstclose != -1 && firstopen == -1 ) )
return true;
diff --git a/kbarcode/kactionmap.cpp b/kbarcode/kactionmap.cpp
index f5dcc2a..7ece029 100644
--- a/kbarcode/kactionmap.cpp
+++ b/kbarcode/kactionmap.cpp
@@ -62,7 +62,7 @@ public:
setText( 0, m_action->plainText() );
setText( 1, m_action->shortcutText() );
// replace HTML tags in What's this help
- setText( 2, m_action->whatsThis().tqreplace( regtag, "" ) );
+ setText( 2, m_action->whatsThis().replace( regtag, "" ) );
setPixmap( 0, pix );
}
diff --git a/kbarcode/kactionmap.h b/kbarcode/kactionmap.h
index 2ec3401..7245237 100644
--- a/kbarcode/kactionmap.h
+++ b/kbarcode/kactionmap.h
@@ -53,7 +53,7 @@ class KActionMapDlg : public KDialogBase {
* What is an Action Map?
*
* Almost every web page has a site map. According to Wikipedia,
- * a site map "helps visitors, and search engine robots, to tqfind
+ * a site map "helps visitors, and search engine robots, to find
* pages on the site". Similar an Action Map should help the
* user to find actions (i.e. functions or menu items) in an application.
*
diff --git a/kbarcode/label.cpp b/kbarcode/label.cpp
index f565c77..07dfb0e 100644
--- a/kbarcode/label.cpp
+++ b/kbarcode/label.cpp
@@ -50,7 +50,7 @@ Label::Label( Definition* _def, TQIODevice* device, TQString labelname, TQPaintD
setCustomerNo( customer_id );
setArticleNo( _article_no );
setGroup( _group );
- setLabelName( labelname.right( labelname.length() - labelname.tqfindRev( "/" ) - 1 ) );
+ setLabelName( labelname.right( labelname.length() - labelname.findRev( "/" ) - 1 ) );
d = _def;
@@ -63,7 +63,7 @@ Label::Label( Definition* _def, TQIODevice* device, TQString labelname, TQPaintD
m_sequence = false;
m_printer = _printer;
- setLabelName( labelname.right( labelname.length() - labelname.tqfindRev( "/" ) - 1 ) );
+ setLabelName( labelname.right( labelname.length() - labelname.findRev( "/" ) - 1 ) );
d = _def;
diff --git a/kbarcode/labeleditor.cpp b/kbarcode/labeleditor.cpp
index 0b399d3..582b9e5 100644
--- a/kbarcode/labeleditor.cpp
+++ b/kbarcode/labeleditor.cpp
@@ -305,7 +305,7 @@ bool LabelEditor::save( TQString name )
save( TQT_TQIODEVICE(&f) );
- m_token->setLabelName( filename.right( filename.length() - filename.tqfindRev( "/" ) - 1 ) );
+ m_token->setLabelName( filename.right( filename.length() - filename.findRev( "/" ) - 1 ) );
// maybe we should redraw all items on the canvas now.
// if there is a label with [filename], the filename might not
// get updated if the label gets saved with another filename.
@@ -359,7 +359,7 @@ bool LabelEditor::openUrl( const TQString & url )
filename = url;
setCaption( filename, false );
- m_token->setLabelName( filename.right( filename.length() - filename.tqfindRev( "/" ) - 1 ) );
+ m_token->setLabelName( filename.right( filename.length() - filename.findRev( "/" ) - 1 ) );
TQFile f( filename );
if ( !f.open( IO_ReadOnly ) )
@@ -428,7 +428,7 @@ bool LabelEditor::newLabel()
delete nl;
filename = TQString();
- m_token->setLabelName( filename.right( filename.length() - filename.tqfindRev( "/" ) - 1 ) );
+ m_token->setLabelName( filename.right( filename.length() - filename.findRev( "/" ) - 1 ) );
setCaption( filename, false );
enableActions();
@@ -938,7 +938,7 @@ void LabelEditor::backCurrent()
const TQString LabelEditor::fileName() const
{
- return filename.right( filename.length() - filename.tqfindRev( "/" ) - 1 );
+ return filename.right( filename.length() - filename.findRev( "/" ) - 1 );
}
void LabelEditor::preview()
diff --git a/kbarcode/labelutils.cpp b/kbarcode/labelutils.cpp
index 515f54b..74ca158 100644
--- a/kbarcode/labelutils.cpp
+++ b/kbarcode/labelutils.cpp
@@ -89,13 +89,13 @@ double LabelUtils::pixelToPixelY( double unit, const TQPaintDevice* src, const T
const TQString LabelUtils::getTypeFromCaption( const TQString & cap )
{
// TODO: remove this function
- TQString search = cap.right( cap.length() - cap.tqfind(":") - 1 ).lower().stripWhiteSpace();
+ TQString search = cap.right( cap.length() - cap.find(":") - 1 ).lower().stripWhiteSpace();
return search;
}
const TQString LabelUtils::getModeFromCaption( const TQString & cap )
{
- return cap.left( cap.tqfind(":") ).lower().stripWhiteSpace();
+ return cap.left( cap.find(":") ).lower().stripWhiteSpace();
}
TQSize LabelUtils::stringSize( const TQString & t )
diff --git a/kbarcode/main.cpp b/kbarcode/main.cpp
index d851b76..ed962d3 100644
--- a/kbarcode/main.cpp
+++ b/kbarcode/main.cpp
@@ -57,13 +57,13 @@ void setupDirs()
KStandardDirs* dirs = KGlobal::dirs();
TQString kdedir = dirs->kfsstnd_prefixes();
- if( !kdedir.tqcontains( "/usr/local/" ) )
+ if( !kdedir.contains( "/usr/local/" ) )
dirs->addPrefix( "/usr/local/" );
- if( !kdedir.tqcontains( "/usr/local/kde/" ) )
+ if( !kdedir.contains( "/usr/local/kde/" ) )
dirs->addPrefix( "/usr/local/kde/" );
- if( !kdedir.tqcontains( "/usr/" ) )
+ if( !kdedir.contains( "/usr/" ) )
dirs->addPrefix( "/usr/" );
qDebug("WARNING: Prefix changed: %s", dirs->kfsstnd_prefixes().latin1() );
diff --git a/kbarcode/mybarcode.cpp b/kbarcode/mybarcode.cpp
index 74eb5f8..e5c3db3 100644
--- a/kbarcode/mybarcode.cpp
+++ b/kbarcode/mybarcode.cpp
@@ -416,20 +416,20 @@ TQString BarCode::createSequence( const TQString & value )
if( !barcode.sequence.enabled )
return value;
- if( value.tqcontains( '#' ) <= 0 )
+ if( value.contains( '#' ) <= 0 )
return value;
TQString text = value;
int pos = 0, counter = 1;
- pos = text.tqfind("#", pos);
+ pos = text.find("#", pos);
pos++;
while( text[pos] == '#' ) {
text.remove(pos, 1);
counter++;
}
- pos = text.tqfind("#", 0);
+ pos = text.find("#", 0);
TQString temp;
if( barcode.sequence.mode == NUM ) {
@@ -467,7 +467,7 @@ TQString BarCode::createSequence( const TQString & value )
}
}
- text.tqreplace( pos, 1, temp);
+ text.replace( pos, 1, temp);
return text;
}
diff --git a/kbarcode/mycanvasview.cpp b/kbarcode/mycanvasview.cpp
index 7cbe7c1..6de0e58 100644
--- a/kbarcode/mycanvasview.cpp
+++ b/kbarcode/mycanvasview.cpp
@@ -301,7 +301,7 @@ bool MyCanvasView::isInside( TQPoint p, TQCanvasItem* item )
if( !item->isVisible() )
return false;
- return item->boundingRect().tqcontains( p );
+ return item->boundingRect().contains( p );
}
int MyCanvasView::isEdge( TQPoint p, TQCanvasItem* item )
diff --git a/kbarcode/purepostscript.cpp b/kbarcode/purepostscript.cpp
index e2f80f6..cdbf1e9 100644
--- a/kbarcode/purepostscript.cpp
+++ b/kbarcode/purepostscript.cpp
@@ -82,13 +82,13 @@ PurePostscriptBarcode::PurePostscriptBarcode()
{
if( append )
{
- if( line.tqcontains( END_TEMPLATE ) )
+ if( line.contains( END_TEMPLATE ) )
break;
m_program.append( line );
}
- if( !append && line.tqcontains( BEGIN_TEMPLATE ) )
+ if( !append && line.contains( BEGIN_TEMPLATE ) )
append = true;
}
pureFile.close();
diff --git a/kbarcode/sqltables.cpp b/kbarcode/sqltables.cpp
index 87fc8b3..1d8d8c3 100644
--- a/kbarcode/sqltables.cpp
+++ b/kbarcode/sqltables.cpp
@@ -421,7 +421,7 @@ void SqlTables::updateTables()
update << "gap_top" << "gap_left" << "height" << "width" << "gap_v" << "gap_h";
TQSqlQuery query4("SHOW FIELDS FROM " TABLE_LABEL_DEF );
while( query4.next() )
- if( update.tqcontains( query4.value( 0 ).toString() ) && query4.value(1).toString() == "decimal(10,0)" ) {
+ if( update.contains( query4.value( 0 ).toString() ) && query4.value(1).toString() == "decimal(10,0)" ) {
TQSqlQuery q;
q.exec( TQString("ALTER TABLE " TABLE_LABEL_DEF " CHANGE ") +
query4.value( 0 ).toString() + " " + query4.value( 0 ).toString() + " NUMERIC(10,4)" );
diff --git a/kbarcode/sqltables.h b/kbarcode/sqltables.h
index ba4029c..f665583 100644
--- a/kbarcode/sqltables.h
+++ b/kbarcode/sqltables.h
@@ -30,7 +30,7 @@
#define TABLE_BASIC "barcode_basic"
/* -------- */
-// a macro to support TQString::tqreplace( TQString, TQString )
+// a macro to support TQString::replace( TQString, TQString )
// also on QT 3.0.x
#define DSREPLACE( x ) x
diff --git a/kbarcode/tec.cpp b/kbarcode/tec.cpp
index b4b53ff..f0b6ba2 100644
--- a/kbarcode/tec.cpp
+++ b/kbarcode/tec.cpp
@@ -222,7 +222,7 @@ return str;
TQString posConv( TQString str, int zeros )
{
-int point=str.tqfind(".",0);
+int point=str.find(".",0);
TQString dec= TQString("%1").tqarg(str.mid(point+1,1));
str = str.mid(0,point);
str = TQString("%1%2").tqarg(str).tqarg(dec);
@@ -439,7 +439,7 @@ temp = TQString(buf);
// LF = = 10
// CR = \r = 13
-if (temp.tqfind(TQString("\r"),0,1)==-1) result+= temp;
+if (temp.find(TQString("\r"),0,1)==-1) result+= temp;
else {
result+= temp;
exit=0;
@@ -489,138 +489,138 @@ TQString getData(const TQString &etext, const TQString &art, const TQString &gro
TQString temp;
-if (etext.tqcontains("[serial_watch]") ) etext.tqreplace( "[serial_watch]" , serialWatch() );
-if (etext.tqcontains("[customer_no]") ) etext.tqreplace( "[customer_no]" , id );
-if (etext.tqcontains("[customer_name]") ) etext.tqreplace( "[customer_name]" , name );
-if (etext.tqcontains("[group]") ) etext.tqreplace( "[group]" , group );
-if (etext.tqcontains("[article_no]") ) etext.tqreplace( "[article_no]" , art );
-if (etext.tqcontains("[line1]") ) {
+if (etext.contains("[serial_watch]") ) etext.replace( "[serial_watch]" , serialWatch() );
+if (etext.contains("[customer_no]") ) etext.replace( "[customer_no]" , id );
+if (etext.contains("[customer_name]") ) etext.replace( "[customer_name]" , name );
+if (etext.contains("[group]") ) etext.replace( "[group]" , group );
+if (etext.contains("[article_no]") ) etext.replace( "[article_no]" , art );
+if (etext.contains("[line1]") ) {
TQSqlQuery query("SELECT line1 FROM customer_text where customer_no='" + id + "'" );
while( query.next() ) temp = TQString (query.value( 0 ).toString());
- etext.tqreplace( "[line1]" , temp );
+ etext.replace( "[line1]" , temp );
}
-if (etext.tqcontains("[line0]") ) {
+if (etext.contains("[line0]") ) {
TQSqlQuery query("SELECT line0 FROM customer_text where customer_no='" + id + "'" );
while( query.next() ) temp = TQString (query.value( 0 ).toString());
- etext.tqreplace( "[line0]" , temp );
+ etext.replace( "[line0]" , temp );
}
-if (etext.tqcontains("[line2]") ) {
+if (etext.contains("[line2]") ) {
TQSqlQuery query("SELECT line2 FROM customer_text where customer_no='" + id + "'" );
while( query.next() ) temp = TQString (query.value( 0 ).toString());
- etext.tqreplace( "[line2]" , temp );
+ etext.replace( "[line2]" , temp );
}
-if (etext.tqcontains("[line3]") ) {
+if (etext.contains("[line3]") ) {
TQSqlQuery query("SELECT line3 FROM customer_text where customer_no='" + id + "'" );
while( query.next() ) temp = TQString (query.value( 0 ).toString());
- etext.tqreplace( "[line3]" , temp );
+ etext.replace( "[line3]" , temp );
}
-if (etext.tqcontains("[line4]") ) {
+if (etext.contains("[line4]") ) {
TQSqlQuery query("SELECT line4 FROM customer_text where customer_no='" + id + "'" );
while( query.next() ) temp = TQString (query.value( 0 ).toString());
- etext.tqreplace( "[line4]" , temp );
+ etext.replace( "[line4]" , temp );
}
-if (etext.tqcontains("[line5]") ) {
+if (etext.contains("[line5]") ) {
TQSqlQuery query("SELECT line5 FROM customer_text where customer_no='" + id + "'" );
while( query.next() ) temp = TQString (query.value( 0 ).toString());
- etext.tqreplace( "[line5]" , temp );
+ etext.replace( "[line5]" , temp );
}
-if (etext.tqcontains("[line6]") ) {
+if (etext.contains("[line6]") ) {
TQSqlQuery query("SELECT line6 FROM customer_text where customer_no='" + id + "'" );
while( query.next() ) temp = TQString (query.value( 0 ).toString());
- etext.tqreplace( "[line6]" , temp );
+ etext.replace( "[line6]" , temp );
}
-if (etext.tqcontains("[line7]") ) {
+if (etext.contains("[line7]") ) {
TQSqlQuery query("SELECT line7 FROM customer_text where customer_no='" + id + "'" );
while( query.next() ) temp = TQString (query.value( 0 ).toString());
- etext.tqreplace( "[line7]" , temp );
+ etext.replace( "[line7]" , temp );
}
-if (etext.tqcontains("[line8]") ) {
+if (etext.contains("[line8]") ) {
TQSqlQuery query("SELECT line8 FROM customer_text where customer_no='" + id + "'" );
while( query.next() ) temp = TQString (query.value( 0 ).toString());
- etext.tqreplace( "[line8]" , temp );
+ etext.replace( "[line8]" , temp );
}
-if (etext.tqcontains("[line9]") ) {
+if (etext.contains("[line9]") ) {
TQSqlQuery query("SELECT line9 FROM customer_text where customer_no='" + id + "'" );
while( query.next() ) temp = TQString (query.value( 0 ).toString());
- etext.tqreplace( "[line9]" , temp );
+ etext.replace( "[line9]" , temp );
}
-if (etext.tqcontains("[field0]") ) {
+if (etext.contains("[field0]") ) {
TQSqlQuery query("SELECT field0 FROM barcode_basic where article_no='" + art + "'" );
while( query.next() ) temp = TQString (query.value( 0 ).toString());
- etext.tqreplace( "[field0]" , temp );
+ etext.replace( "[field0]" , temp );
}
-if (etext.tqcontains("[field1]") ) {
+if (etext.contains("[field1]") ) {
TQSqlQuery query("SELECT field1 FROM barcode_basic where article_no='" + art + "'" );
while( query.next() ) temp = TQString (query.value( 0 ).toString());
- etext.tqreplace( "[field1]" , temp );
+ etext.replace( "[field1]" , temp );
}
-if (etext.tqcontains("[field2]") ) {
+if (etext.contains("[field2]") ) {
TQSqlQuery query("SELECT field2 FROM barcode_basic where article_no='" + art + "'" );
while( query.next() ) temp = TQString (query.value( 0 ).toString());
- etext.tqreplace( "[field2]" , temp );
+ etext.replace( "[field2]" , temp );
}
-if (etext.tqcontains("[field3]") ) {
+if (etext.contains("[field3]") ) {
TQSqlQuery query("SELECT field3 FROM barcode_basic where article_no='" + art + "'" );
while( query.next() ) temp = TQString (query.value( 0 ).toString());
- etext.tqreplace( "[field3]" , temp );
+ etext.replace( "[field3]" , temp );
}
-if (etext.tqcontains("[field4]") ) {
+if (etext.contains("[field4]") ) {
TQSqlQuery query("SELECT field4 FROM barcode_basic where article_no='" + art + "'" );
while( query.next() ) temp = TQString (query.value( 0 ).toString());
- etext.tqreplace( "[field4]" , temp );
+ etext.replace( "[field4]" , temp );
}
-if (etext.tqcontains("[field5]") ) {
+if (etext.contains("[field5]") ) {
TQSqlQuery query("SELECT field5 FROM barcode_basic where article_no='" + art + "'" );
while( query.next() ) temp = TQString (query.value( 0 ).toString());
- etext.tqreplace( "[field5]" , temp );
+ etext.replace( "[field5]" , temp );
}
-if (etext.tqcontains("[field6]") ) {
+if (etext.contains("[field6]") ) {
TQSqlQuery query("SELECT field6 FROM barcode_basic where article_no='" + art + "'" );
while( query.next() ) temp = TQString (query.value( 0 ).toString());
- etext.tqreplace( "[field6]" , temp );
+ etext.replace( "[field6]" , temp );
}
-if (etext.tqcontains("[field7]") ) {
+if (etext.contains("[field7]") ) {
TQSqlQuery query("SELECT field7 FROM barcode_basic where article_no='" + art + "'" );
while( query.next() ) temp = TQString (query.value( 0 ).toString());
- etext.tqreplace( "[field7]" , temp );
+ etext.replace( "[field7]" , temp );
}
-if (etext.tqcontains("[field8]") ) {
+if (etext.contains("[field8]") ) {
TQSqlQuery query("SELECT field8 FROM barcode_basic where article_no='" + art + "'" );
while( query.next() ) temp = TQString (query.value( 0 ).toString());
- etext.tqreplace( "[field8]" , temp );
+ etext.replace( "[field8]" , temp );
}
-if (etext.tqcontains("[field9]") ) {
+if (etext.contains("[field9]") ) {
TQSqlQuery query("SELECT field9 FROM barcode_basic where article_no='" + art + "'" );
while( query.next() ) temp = TQString (query.value( 0 ).toString());
- etext.tqreplace( "[field9]" , temp );
+ etext.replace( "[field9]" , temp );
}
-if (etext.tqcontains("[article_desc]") ) {
+if (etext.contains("[article_desc]") ) {
TQSqlQuery query("SELECT article_desc FROM barcode_basic where article_no='" + art + "'" );
while( query.next() ) temp = TQString (query.value( 0 ).toString());
- etext.tqreplace( "[article_desc]" , temp );
+ etext.replace( "[article_desc]" , temp );
}
-if (etext.tqcontains("[barcode_no]") ) {
+if (etext.contains("[barcode_no]") ) {
TQSqlQuery query("SELECT barcode_no FROM barcode_basic where article_no='" + art + "'" );
while( query.next() ) temp = TQString (query.value( 0 ).toString());
- etext.tqreplace( "[barcode_no]" , temp );
+ etext.replace( "[barcode_no]" , temp );
}
-if (etext.tqcontains("[field9]") ) {
+if (etext.contains("[field9]") ) {
TQSqlQuery query("SELECT field9 FROM barcode_basic where article_no='" + art + "'" );
while( query.next() ) temp = TQString (query.value( 0 ).toString());
- etext.tqreplace( "[field9]" , temp );
+ etext.replace( "[field9]" , temp );
}
-if (etext.tqcontains("[article_no_customer]") ) {
+if (etext.contains("[article_no_customer]") ) {
TQSqlQuery query("SELECT article_no_customer FROM customer_text where customer_no='" + id + "'" );
while( query.next() ) temp = TQString (query.value( 0 ).toString());
- etext.tqreplace( "[article_no_customer]" , temp );
+ etext.replace( "[article_no_customer]" , temp );
}
-if (etext.tqcontains("[barcode_no_customer]") ){
+if (etext.contains("[barcode_no_customer]") ){
TQSqlQuery query("SELECT barcode_no FROM customer_text where customer_no='" + id + "'" );
while( query.next() ) temp = TQString (query.value( 0 ).toString());
- etext.tqreplace("[barcode_no_customer]" , temp );
+ etext.replace("[barcode_no_customer]" , temp );
}
-if (etext.tqcontains("[date]") ) etext.tqreplace( "[date]" ,TQDateTime::tqcurrentDateTime().toString( KBarcodeSettings::getDateFormat() ));
-if (etext.tqcontains("[time]") ) etext.tqreplace( "[time]" ,TQTime::currentTime().toString());
+if (etext.contains("[date]") ) etext.replace( "[date]" ,TQDateTime::tqcurrentDateTime().toString( KBarcodeSettings::getDateFormat() ));
+if (etext.contains("[time]") ) etext.replace( "[time]" ,TQTime::currentTime().toString());
return etext;*/
}
diff --git a/kbarcode/textitem.cpp b/kbarcode/textitem.cpp
index 16578e3..61b792e 100644
--- a/kbarcode/textitem.cpp
+++ b/kbarcode/textitem.cpp
@@ -122,7 +122,7 @@ void TextItem::draw(TQPainter* painter)
void TextItem::drawZpl( TQTextStream* stream )
{
// simply remove all html tags....
- TQString data = m_text.tqreplace( TQRegExp("<[^>]*>"), "" );
+ TQString data = m_text.replace( TQRegExp("<[^>]*>"), "" );
*stream << ZPLUtils::fieldOrigin( rect().x(), rect().y() );
*stream << ZPLUtils::font( TQFont() ); // todo: select a valid font
}
@@ -132,7 +132,7 @@ void TextItem::drawIpl( TQTextStream* stream, IPLUtils* utils )
int counter = utils->counter();
// simply remove all html tags....
- TQString data = m_text.tqreplace( TQRegExp("<[^>]*>"), "" );
+ TQString data = m_text.replace( TQRegExp("<[^>]*>"), "" );
TQString s = TQString("H%1;").tqarg( counter ); // field number
@@ -155,7 +155,7 @@ void TextItem::drawEPcl( TQTextStream* stream )
//
// break string into lines
- TQString t = m_text.tqreplace( TQRegExp("<[^>]*>"), "" );
+ TQString t = m_text.replace( TQRegExp("<[^>]*>"), "" );
// @DOM:
// TODO:
// provide an API which simplifies wordwrapping for
diff --git a/kbarcode/textlineitem.cpp b/kbarcode/textlineitem.cpp
index c87bbf1..c387bc2 100644
--- a/kbarcode/textlineitem.cpp
+++ b/kbarcode/textlineitem.cpp
@@ -87,7 +87,7 @@ void TextLineItem::draw(TQPainter* painter)
void TextLineItem::drawZpl( TQTextStream* stream )
{
// simply remove all html tags....
- TQString data = m_text.tqreplace( TQRegExp("<[^>]*>"), "" );
+ TQString data = m_text.replace( TQRegExp("<[^>]*>"), "" );
*stream << ZPLUtils::fieldOrigin( rect().x(), rect().y() );
*stream << ZPLUtils::font( TQFont() ); // todo: select a valid font
}
@@ -97,7 +97,7 @@ void TextLineItem::drawIpl( TQTextStream* stream, IPLUtils* utils )
int counter = utils->counter();
// simply remove all html tags....
- TQString data = m_text.tqreplace( TQRegExp("<[^>]*>"), "" );
+ TQString data = m_text.replace( TQRegExp("<[^>]*>"), "" );
TQString s = TQString("H%1;").tqarg( counter ); // field number
@@ -120,7 +120,7 @@ void TextLineItem::drawEPcl( TQTextStream* stream )
//
// break string into lines
- TQString t = m_text.tqreplace( TQRegExp("<[^>]*>"), "" );
+ TQString t = m_text.replace( TQRegExp("<[^>]*>"), "" );
// @DOM:
// TODO:
// provide an API which simplifies wordwrapping for
diff --git a/kbarcode/tokenprovider.cpp b/kbarcode/tokenprovider.cpp
index f782503..ca3cc02 100644
--- a/kbarcode/tokenprovider.cpp
+++ b/kbarcode/tokenprovider.cpp
@@ -343,15 +343,15 @@ void TokenProvider::findBrackets( TQString & text, TQString (TokenProvider::*par
int num, pos = -1, a;
TQString token;
- if( text.tqcontains("]", FALSE) <= 0 || text.isEmpty() )
+ if( text.contains("]", FALSE) <= 0 || text.isEmpty() )
return;
- num = text.tqcontains("[", FALSE);
+ num = text.contains("[", FALSE);
if(num <= 0 )
return;
- pos = text.tqfindRev("[", pos);
- a = text.tqfind("]", pos );
+ pos = text.findRev("[", pos);
+ a = text.find("]", pos );
if( a < 0 && pos >= 0 )
return;
@@ -581,7 +581,7 @@ TQString TokenProvider::process( const TQString & t )
if( !m_uservardata.isEmpty() )
{
TQString tok = t.right( t.length() - 1 );
- if( m_uservardata.tqcontains( tok ) )
+ if( m_uservardata.contains( tok ) )
{
ret = m_uservardata[tok];
if( ret.isNull() )
@@ -915,10 +915,10 @@ const TQString TokenProvider::createSerial()
TQString TokenProvider::unescapeText( const TQString & t )
{
TQString tmp = t;
- tmp = tmp.tqreplace( DSREPLACE( "&lt;" ), "<" );
- tmp = tmp.tqreplace( DSREPLACE( "&gt;" ), ">" );
- tmp = tmp.tqreplace( DSREPLACE( "&amp;" ), "&" );
- tmp = tmp.tqreplace( DSREPLACE( "&quot;" ), "\"" );
+ tmp = tmp.replace( DSREPLACE( "&lt;" ), "<" );
+ tmp = tmp.replace( DSREPLACE( "&gt;" ), ">" );
+ tmp = tmp.replace( DSREPLACE( "&amp;" ), "&" );
+ tmp = tmp.replace( DSREPLACE( "&quot;" ), "\"" );
return tmp;
}
@@ -926,11 +926,11 @@ TQString TokenProvider::unescapeText( const TQString & t )
TQString TokenProvider::escapeText( const TQString & t )
{
TQString tmp = t;
- tmp = tmp.tqreplace( DSREPLACE( "<" ), "&lt;" );
- tmp = tmp.tqreplace( DSREPLACE( ">" ), "&gt;" );
- tmp = tmp.tqreplace( DSREPLACE( "&" ), "&amp;" );
- tmp = tmp.tqreplace( DSREPLACE( "\"" ), "&quot;" );
- tmp = tmp.tqreplace( DSREPLACE( "\n" ), "<br />" );
+ tmp = tmp.replace( DSREPLACE( "<" ), "&lt;" );
+ tmp = tmp.replace( DSREPLACE( ">" ), "&gt;" );
+ tmp = tmp.replace( DSREPLACE( "&" ), "&amp;" );
+ tmp = tmp.replace( DSREPLACE( "\"" ), "&quot;" );
+ tmp = tmp.replace( DSREPLACE( "\n" ), "<br />" );
return tmp;
}
diff --git a/kbarcode/tokenprovider.h b/kbarcode/tokenprovider.h
index 566fbb3..f144d6b 100644
--- a/kbarcode/tokenprovider.h
+++ b/kbarcode/tokenprovider.h
@@ -146,7 +146,7 @@ class TokenProvider {
/**
* parse the given text for tokens and return a
* string with all tokens replaced correctly.
- * @param text TQString look in this text for tokens to tqreplace
+ * @param text TQString look in this text for tokens to replace
*/
TQString parse( const TQString & text );
diff --git a/kbarcode/xmlutils.cpp b/kbarcode/xmlutils.cpp
index 7dc548c..27cbfb8 100644
--- a/kbarcode/xmlutils.cpp
+++ b/kbarcode/xmlutils.cpp
@@ -359,7 +359,7 @@ Definition* XMLUtils::readDefinition( TQDomElement* tag )
int id = label_def_id;
TQStringList p = Definition::getProducers();
- if( !p.tqcontains( producer ) ) {
+ if( !p.contains( producer ) ) {
for( unsigned int i = 0; i < p.count(); i++ ) {
id = Definition::getClosest( p[i], type );
if( id >= 0 )
@@ -457,7 +457,7 @@ void XMLUtils::readBarcode( TQDomElement* tag, Barkode* bcode )
/*
* check for encoding types saved by kbarcode <= 1.2.0
*/
- if( legacy.tqcontains( bcode->type() ) )
+ if( legacy.contains( bcode->type() ) )
bcode->setType( legacy[bcode->type()] );
bcode->setTextVisible( tag->attribute("text", "0" ).toInt() );