summaryrefslogtreecommitdiffstats
path: root/kbarcode
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2014-08-27 11:33:29 -0500
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2014-08-27 11:33:29 -0500
commitd265f2381c62364ad08b9fdc47659dfc773bf528 (patch)
tree9197e1692d85bdf5c54f33320dc68f26345ffa92 /kbarcode
parent978254801353c7bfcc84aa3a3a7e9fac6aeae0e2 (diff)
downloadkbarcode-d265f2381c62364ad08b9fdc47659dfc773bf528.tar.gz
kbarcode-d265f2381c62364ad08b9fdc47659dfc773bf528.zip
Merge latest version of KBarCode with the TDE sources
This relates to Bug 2095 Note that a handful of translation strings did not merge properly
Diffstat (limited to 'kbarcode')
-rw-r--r--kbarcode/Makefile.am56
-rw-r--r--kbarcode/barcodecombo.h2
-rw-r--r--kbarcode/barcodedialogs.cpp6
-rw-r--r--kbarcode/barkode.h2
-rw-r--r--kbarcode/dsmainwindow.cpp29
-rw-r--r--kbarcode/dsmainwindow.h4
-rw-r--r--kbarcode/dsrichtext.cpp427
-rw-r--r--kbarcode/dsrichtext.h193
-rw-r--r--kbarcode/dstextedit.cpp2
-rw-r--r--kbarcode/dstextedit.h12
-rw-r--r--kbarcode/labelutils.cpp96
-rw-r--r--kbarcode/labelutils.h1
-rw-r--r--kbarcode/main.cpp4
-rw-r--r--kbarcode/multilineeditdlg.cpp5
-rw-r--r--kbarcode/mybarcode.cpp620
-rw-r--r--kbarcode/mybarcode.h304
-rw-r--r--kbarcode/referencecounted.cpp23
-rw-r--r--kbarcode/semantic.cache39
-rw-r--r--kbarcode/sqltables.h4
-rw-r--r--kbarcode/tdeactionmap.cpp188
-rw-r--r--kbarcode/tdeactionmap.h102
-rw-r--r--kbarcode/textitem.cpp60
-rw-r--r--kbarcode/textitem.h6
-rw-r--r--kbarcode/textlineedit.cpp12
-rw-r--r--kbarcode/textlineitem.cpp50
-rw-r--r--kbarcode/textlineitem.h6
-rw-r--r--kbarcode/tokenprovider.cpp18
27 files changed, 119 insertions, 2152 deletions
diff --git a/kbarcode/Makefile.am b/kbarcode/Makefile.am
index a6a22bc..999f370 100644
--- a/kbarcode/Makefile.am
+++ b/kbarcode/Makefile.am
@@ -13,7 +13,7 @@ METASOURCES = AUTO
KDE_ICON = AUTO
messages: rc.cpp
- $(XGETTEXT) *.cpp -o $(podir)/kdedcoptest.pot
+ $(XGETTEXT) *.cpp -o $(podir)/kbarcode.pot
# this is the program that gets installed. it's name is used for all
# of the other Makefile.am variables
@@ -25,34 +25,32 @@ kbarcode_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE)
kbarcode_LDADD = $(LIB_TDEABC) $(LIB_TDESPELL) $(LIB_TDEPRINT) \
$(LIB_TDEUI) -lkjs -lpcre
-noinst_HEADERS = barcodecombo.h barcodedialog.h barcodedialogs.h \
- commands.h configdialog.h confwizard.h csvimportdlg.h databasebrowser.h \
- definition.h definitiondialog.h dsmainwindow.h dsrichtext.h kbarcode.h label.h \
- labeleditor.h labelutils.h mimesources.h multilineeditdlg.h \
- mycanvasitem.h mycanvasview.h mydatatable.h newlabel.h previewdialog.h \
- printersettings.h printlabeldlg.h rectsettingsdlg.h smalldialogs.h sqltables.h \
- tokenprovider.h xmlutils.h zplutils.h measurements.h editoriface.h kbarcodeiface.h \
- batchiface.h kbarcodesettings.h batchprinter.h barcodeitem.h documentitem.h \
- lineitem.h rectitem.h tcanvasitem.h textitem.h imageitem.h documentitemdlg.h \
- propertywidget.h tec.h barcodeprinterdlg.h textlineitem.h textlineedit.h tokendialog.h \
- barkode.h gnubarcode.h barkodeengine.h pixmapbarcode.h batchwizard.h csvfile.h \
- referencecounted.h dstextedit.h encodingcombo.h purepostscript.h tbarcode2.h \
- tdeactionmap.h
-
-kbarcode_SOURCES = barcodecombo.cpp barcodedialog.cpp \
- barcodedialogs.cpp commands.cpp configdialog.cpp confwizard.cpp csvimportdlg.cpp \
- databasebrowser.cpp definition.cpp definitiondialog.cpp dsmainwindow.cpp dsrichtext.cpp \
- kbarcode.cpp label.cpp labeleditor.cpp labelutils.cpp main.cpp \
- mimesources.cpp multilineeditdlg.cpp mycanvasitem.cpp mycanvasview.cpp mydatatable.cpp \
- newlabel.cpp previewdialog.cpp printersettings.cpp printlabeldlg.cpp \
- rectsettingsdlg.cpp smalldialogs.cpp sqltables.cpp tokenprovider.cpp xmlutils.cpp \
- zplutils.cpp measurements.cpp editoriface.skel kbarcodeiface.skel batchiface.skel \
- kbarcodesettings.cpp batchprinter.cpp barcodeitem.cpp documentitem.cpp lineitem.cpp \
- rectitem.cpp tcanvasitem.cpp textitem.cpp imageitem.cpp documentitemdlg.cpp \
- propertywidget.cpp tec.cpp barcodeprinterdlg.cpp textlineitem.cpp textlineedit.cpp \
- tokendialog.cpp barkode.cpp gnubarcode.cpp barkodeengine.cpp pixmapbarcode.cpp batchwizard.cpp \
- csvfile.cpp referencecounted.cpp dstextedit.cpp encodingcombo.cpp purepostscript.cpp tbarcode2.cpp \
- tdeactionmap.cpp
+noinst_HEADERS = barcodecombo.h barcodedialog.h barcodedialogs.h commands.h \
+ configdialog.h confwizard.h csvimportdlg.h databasebrowser.h definition.h \
+ definitiondialog.h dsmainwindow.h kbarcode.h label.h labeleditor.h labelutils.h \
+ mimesources.h multilineeditdlg.h mycanvasitem.h mycanvasview.h mydatatable.h \
+ newlabel.h previewdialog.h printersettings.h printlabeldlg.h rectsettingsdlg.h \
+ smalldialogs.h sqltables.h tokenprovider.h xmlutils.h zplutils.h measurements.h \
+ editoriface.h kbarcodeiface.h batchiface.h kbarcodesettings.h batchprinter.h \
+ barcodeitem.h documentitem.h lineitem.h rectitem.h tcanvasitem.h textitem.h \
+ imageitem.h documentitemdlg.h propertywidget.h tec.h barcodeprinterdlg.h \
+ textlineitem.h textlineedit.h tokendialog.h barkode.h gnubarcode.h barkodeengine.h \
+ pixmapbarcode.h batchwizard.h csvfile.h referencecounted.h dstextedit.h encodingcombo.h \
+ purepostscript.h tbarcode2.h
+
+kbarcode_SOURCES = barcodecombo.cpp barcodedialog.cpp barcodedialogs.cpp \
+ commands.cpp configdialog.cpp confwizard.cpp csvimportdlg.cpp databasebrowser.cpp \
+ definition.cpp definitiondialog.cpp dsmainwindow.cpp kbarcode.cpp label.cpp \
+ labeleditor.cpp labelutils.cpp main.cpp mimesources.cpp multilineeditdlg.cpp \
+ mycanvasitem.cpp mycanvasview.cpp mydatatable.cpp newlabel.cpp previewdialog.cpp \
+ printersettings.cpp printlabeldlg.cpp rectsettingsdlg.cpp smalldialogs.cpp sqltables.cpp \
+ tokenprovider.cpp xmlutils.cpp zplutils.cpp measurements.cpp editoriface.skel \
+ kbarcodeiface.skel batchiface.skel kbarcodesettings.cpp batchprinter.cpp barcodeitem.cpp \
+ documentitem.cpp lineitem.cpp rectitem.cpp tcanvasitem.cpp textitem.cpp imageitem.cpp \
+ documentitemdlg.cpp propertywidget.cpp tec.cpp barcodeprinterdlg.cpp textlineitem.cpp \
+ textlineedit.cpp tokendialog.cpp barkode.cpp gnubarcode.cpp barkodeengine.cpp \
+ pixmapbarcode.cpp batchwizard.cpp csvfile.cpp dstextedit.cpp encodingcombo.cpp \
+ purepostscript.cpp tbarcode2.cpp
xdg_apps_DATA = kbarcode.desktop kbarcode-batch.desktop kbarcode-editor.desktop kbarcode-single.desktop
diff --git a/kbarcode/barcodecombo.h b/kbarcode/barcodecombo.h
index 4b0c645..cfc260e 100644
--- a/kbarcode/barcodecombo.h
+++ b/kbarcode/barcodecombo.h
@@ -25,7 +25,7 @@
#include "barkode.h"
/** A validator that takes to TQRegExp's to check
- * wether a barcode is valid or not.
+ * whether a barcode is valid or not.
*/
class BarcodeValidator : public TQValidator {
public:
diff --git a/kbarcode/barcodedialogs.cpp b/kbarcode/barcodedialogs.cpp
index 9ac754b..22411c5 100644
--- a/kbarcode/barcodedialogs.cpp
+++ b/kbarcode/barcodedialogs.cpp
@@ -224,11 +224,7 @@ void TBarcodeDlg::setData( Barkode* b )
TQMap<TQString,int>::Iterator it;
for ( it = map.begin(); it != map.end(); ++it ) {
if( it.data() == options->checksum() ) {
- for( int i = 0; i < comboCheckSum->count(); i++ )
- if( comboCheckSum->text( i ) == it.key() ) {
- comboCheckSum->setCurrentItem( i );
- break;
- }
+ comboCheckSum->setCurrentItem(it.key());
break;
}
}
diff --git a/kbarcode/barkode.h b/kbarcode/barkode.h
index 57d21d5..9c4bfd9 100644
--- a/kbarcode/barkode.h
+++ b/kbarcode/barkode.h
@@ -202,7 +202,7 @@ class Barkode {
*/
void drawInvalid( TQPainter & painter, int x = 0, int y = 0 );
- /** returns wether barcode functionallity
+ /** returns whether barcode functionallity
* is available
*/
static bool haveBarcode() {
diff --git a/kbarcode/dsmainwindow.cpp b/kbarcode/dsmainwindow.cpp
index 3808de5..51585f6 100644
--- a/kbarcode/dsmainwindow.cpp
+++ b/kbarcode/dsmainwindow.cpp
@@ -20,7 +20,6 @@
#include "confwizard.h"
#include "printersettings.h"
#include "kbarcodesettings.h"
-#include "tdeactionmap.h"
#include "barkode.h"
// TQt includes
@@ -71,6 +70,7 @@ void DSMainWindow::setupActions()
TDEAction* configureAct = KStdAction::preferences( KBarcodeSettings::getInstance(), TQT_SLOT(configure()), actionCollection() );
TDEAction* wizardAct = new TDEAction( i18n("&Start Configuration Wizard..."), BarIcon("wizard"), 0, TQT_TQOBJECT(this),
TQT_SLOT(wizard()), actionCollection(), "wizard" );
+
connectAct = new TDEAction(i18n("&Connect to Database"), BarIcon("connect_no"), 0, TQT_TQOBJECT(this), TQT_SLOT(connectMySQL()),
actionCollection(),"connect" );
@@ -91,13 +91,11 @@ void DSMainWindow::setupActions()
hlpMenu->removeItem( helpid );
hlpMenu->insertItem( SmallIconSet("contents"), i18n("&Help"),
this, TQT_SLOT(appHelpActivated()), Key_F1, -1, 0 );
- hlpMenu->insertSeparator(-1);
- hlpMenu->insertItem( i18n("&Action Map..."), TQT_TQOBJECT(this), TQT_SLOT( slotFunctionMap() ), 0, -1, 0 );
- hlpMenu->insertSeparator(-2);
- hlpMenu->insertItem( SmallIconSet("system"), i18n("&System Check..."), TQT_TQOBJECT(this), TQT_SLOT(showCheck() ), 0, -1, 0 );
- hlpMenu->insertItem( SmallIconSet("barcode"), i18n("&Barcode Help..."), TQT_TQOBJECT(this), TQT_SLOT( startInfo() ), 0, -1, 0 );
- hlpMenu->insertItem( i18n("&Donate..."), TQT_TQOBJECT(this), TQT_SLOT( donations() ), 0, -1, 0 );
-
+ hlpMenu->insertItem( SmallIconSet("barcode"), i18n("&Barcode Help..."), this, TQT_SLOT( startInfo() ), 0, -1, 1 );
+ hlpMenu->insertSeparator(3);
+ hlpMenu->insertItem( i18n("&Donate..."), this, TQT_SLOT( donations() ), 0, -1, 4 );
+ hlpMenu->insertSeparator(5);
+ hlpMenu->insertItem( SmallIconSet("system"), i18n("&System Check..."), this, TQT_SLOT(showCheck() ), 0, -1, 6 );
menuBar()->insertItem( i18n("&File"), file );
menuBar()->insertItem( i18n("&Settings"), settings );
menuBar()->insertItem( i18n("&Help"), hlpMenu );
@@ -207,13 +205,11 @@ bool DSMainWindow::newTables()
void DSMainWindow::donations()
{
- // orig =https://www.paypal.com/xclick/business=domseichter%40web.de&item_name=Support+KBarcode+Development&item_number=0&image_url=http%3A//www.kbarcode.net/themes/DeepBlue/images/logo.gif&no_shipping=1&return=http%3A//www.kbarcode.net&cancel_return=http%3A//www.kbarcode.net&cn=Suggestions%2C+Comments%3F&tax=0&currency_code=EUR
- TQString url = "https://www.paypal.com/xclick/business=domseichter@web.de&item_name=Support+KBarcode+Development&item_number=0&image_url=www.kbarcode.net/themes/DeepBlue/images/logo.gif&no_shipping=1&return=www.kbarcode.net&cancel_return=www.kbarcode.net&cn=Suggestions,+Comments,&tax=0&currency_code=EUR";
-
+ TQString url = "https://trinitydesktop.org/donate.php";
+
KMessageBox::information( this, i18n(
- "<qt>It is possible to support the further development of KBarcode through donations. "
- "PayPal will be used for processing the donation.<br><br>" ) +
- "<a href=\"" + url + "\">" +
+ "<qt>It is possible to support the further development of KBarcode through donations.<br><br>" ) +
+ "<a href=\"" + url + "\">" +
i18n("Donate Now") + "</a></qt>", TQString(), TQString(), KMessageBox::AllowLink );
}
@@ -260,9 +256,4 @@ TQString DSMainWindow::systemCheck()
return text;
}
-void DSMainWindow::slotFunctionMap()
-{
- new TDEActionMapDlg( actionCollection(), this );
-}
-
#include "dsmainwindow.moc"
diff --git a/kbarcode/dsmainwindow.h b/kbarcode/dsmainwindow.h
index 9c3da0b..94e342b 100644
--- a/kbarcode/dsmainwindow.h
+++ b/kbarcode/dsmainwindow.h
@@ -27,7 +27,7 @@ class TDEPopupMenu;
* for database connections, preferences, help, the first start wizard and donations.
* It checks also if this is the first start of KBarcode and if the configuration wizard
* should be started.
- *
+ *MessageBox
* @author Dominik Seichter
*/
class DSMainWindow : public TDEMainWindow {
@@ -66,7 +66,6 @@ class DSMainWindow : public TDEMainWindow {
bool newTables();
void donations();
void showCheck();
- void slotFunctionMap();
protected slots:
void loadConfig();
@@ -77,6 +76,7 @@ class DSMainWindow : public TDEMainWindow {
static bool autoconnect;
static bool startwizard;
+ void slotFunctionMap();
bool first;
diff --git a/kbarcode/dsrichtext.cpp b/kbarcode/dsrichtext.cpp
deleted file mode 100644
index 2224f2f..0000000
--- a/kbarcode/dsrichtext.cpp
+++ /dev/null
@@ -1,427 +0,0 @@
-/***************************************************************************
- dsrichtext.cpp - description
- -------------------
- begin : Fre Okt 17 2003
- copyright : (C) 2003 by Dominik Seichter
- email : domseichter@web.de
- ***************************************************************************/
-
-/***************************************************************************
- * *
- * This program is free software; you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation; either version 2 of the License, or *
- * (at your option) any later version. *
- * *
- ***************************************************************************/
-
-#include "dsrichtext.h"
-
-#ifdef TQT_TEXT_BUG
-
-// TQt includes
-#include <tqfontmetrics.h>
-#include <tqpainter.h>
-#include <tqregexp.h>
-
-// for DSREPLACE
-#include "sqltables.h"
-
-/*
-EXAMPLE TEXT:
- "<html><head><meta name=\"qrichtext\" content=\"1\" /></head><body style=\"font-size:10pt;font-family:Nimbus Sans l\">"
- "<p>A little bit <span style=\"font-style:italic;font-weight:600\">formated</span><span style=\"color:#4400ff\"> "
- "richtext</span> which should be printed to a <span style=\"font-weight:600\">TQPrinter</span> with <span style=\"text-decoration:underline\">TQSimpleRichText</span>. </p>"
- "<p><span style=\"font-family:Times New Roman;font-size:16pt\">Printing should work in ScreenResolution as well as in HighResolution, but as you can see it will only work in ScreenResolution.</span></p>"
- "</body></html>";
-
-Another example
-<html><head><meta name="qrichtext" content="1" /></head><body style="font-size:10pt;font-family:Nimbus Sans l">
-<p align="center"><span style="font-size:12pt;font-weight:600;text-decoration:underline">Text test </span><span style="font-size:12pt;font-weight:600;text-decoration:underline;color:#ff0000">label</span></p>
-<p>Resolution <span style="font-weight:600">formated</span> 108dpi. This text &amp; text should now overlap with the first line. 4 &lt; 6a</p>
-<p><span style="font-family:Nimbus Sans L;font-weight:600">A</span><span style="font-family:Nimbus Sans L"> longer paragraph with some text, so that I can test wether wordwrap is working. Another &quot;line&quot; to test line spacing without a bigger font (like the one found in the next sentence) messing up the spacing.</span><span style="font-family:Courier [Adobe];font-size:16pt"> Some text &quot;in&quot; a bigger courier font.</span><span style="font-family:Nimbus Sans L"> Also this paragraph should be justified as blockquote.</span><span style="font-family:Nimbus Sans L;color:#ff0004"> I hope it works</span><span style="font-family:Nimbus Sans L"> and KBarcodes text redering will be better than the one found in TQt.</span></p>
-</body></html>
-
-*/
-
-DSRichText::DSRichText( const TQString & t )
- : text( t )
-{
- 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>";
-
- //tqDebug( text );
-
- start = end = pos = 0;
- x = y = 0;
- sx = sy = 1.0;
- m_base = TQFont();
-
- TQString tmp = parse( text, "<body ", ">", 0 );
- if( !tmp.isNull() ) {
- pos += tmp.length();
- tmp = tmp.left( tmp.length() - 1 );
- tmp = tmp.mid( 5, tmp.length() - 5 );
- m_base = parseStyle( parse( tmp, "style=\"", "\"", pos ), &m_color );
- }
-
- pos = text.find( "<p", 0 ); // initalize pos correctly
- while( parseParagraph() ); // empty while loop
-}
-
-DSRichText::~DSRichText()
-{
-}
-
-void DSRichText::initFormat( formated_word* f, int alignment )
-{
- f->text = TQString();
- f->line = false;
- f->alignment = alignment;
- f->font = m_base;
- f->color = m_color;
-}
-
-void DSRichText::initLine( TQValueList<formated_line>* l )
-{
- formated_line li;
- li.width = 0;
- li.ascent = 0;
- li.leading = 0;
- li.lineSpacing = 0;
- li.line = false;
- l->append( li );
-}
-
-void DSRichText::updateSpacing( TQValueList<formated_line>* l, TQFontMetrics* fm )
-{
- l->last().lineSpacing = (l->last().lineSpacing < fm->lineSpacing()) ? fm->lineSpacing() : l->last().lineSpacing;
- l->last().ascent = (l->last().ascent < fm->ascent()) ? fm->ascent() : l->last().ascent;
- l->last().leading = (l->last().leading < fm->leading()) ? fm->leading() : l->last().leading;
-}
-
-void DSRichText::fillLines()
-{
- for( unsigned int z = 0; z < word_p.count(); z++ ) {
- WordList words = word_p[z];
- LineList lines;
- initLine( &lines );
- for( unsigned int i = 0; i < words.count(); i++ ) {
- formated_word word = words[i];
- lines.last().line = lines.last().line | word.line;
-
- TQFontMetrics fm( word.font );
- updateSpacing( &lines, &fm );
-
- int tw = fm.width( word.text );
- // word does not fit in the current line, create a new one
- if( lines.last().width + tw >= w )
- initLine( &lines );
-
- // TODO: check here for words longer than one line
- lines.last().formats.append( word );
- lines.last().width += tw;
- }
- line_p.append( lines );
- }
-}
-
-void DSRichText::draw( TQPainter* p )
-{
- /* don't try to draw if there is no space to draw */
- if( !w || !h )
- return;
-
- fillLines();
-
- painter = p;
- painter->save();
- painter->setClipRect( xpos, ypos, int(w*sx), int(h*sy), TQPainter::CoordPainter );
-
- for( unsigned int z = 0; z < line_p.count(); z++ ) {
- LineList lines = line_p[z];
- if( lines.count() && z )
- y += int( lines[0].lineSpacing * 0.5);
-
- for( unsigned int i = 0; i < lines.count(); i++ ) {
- formated_line l = lines[i];
-
- if( l.formats.count() && l.formats[0].alignment == TQt::AlignJustify && i != lines.count() - 1 ) {
- // last line in a paragraph is not justified (in blocksatz mode)!
- drawJustified( &l );
- } else {
- for( unsigned int z = 0; z < l.formats.count(); z++ ) {
- formated_word f = l.formats[z];
-
- painter->setFont( f.font );
- painter->setPen( TQPen( f.color ) );
-
- int a = f.alignment;
- if( a == TQt::AlignRight ) {
- a = TQt::AlignLeft;
- if( !x )
- x = w - l.width;
- } else if( a == TQt::AlignHCenter ) {
- a = TQt::AlignLeft;
- if( !x )
- x = ( w - l.width ) / 2;
- }
-
- int ya = yDeviation( &l );
- painter->drawText( xpos + int(x*sx), ypos + int((y+ya)*sy), int(l.width*sx), int(l.lineSpacing * sy), a, f.text );
- x += painter->fontMetrics().width( f.text );
- }
- }
-
- x = 0;
- y += l.lineSpacing;
- }
- }
-
- painter->restore();
-}
-
-void DSRichText::drawJustified( formated_line* line )
-{
- int all = 0;
- for( unsigned int z = 0; z < line->formats.count(); z++ ) {
- line->formats[z].text = line->formats[z].text.stripWhiteSpace();
- TQFontMetrics fm( line->formats[z].font );
- all += fm.width( line->formats[z].text );
- }
-
- int x = 0;
- int space = (w - all) / (line->formats.count() - 1);
- for( unsigned int z = 0; z < line->formats.count(); z++ ) {
- painter->setFont( line->formats[z].font );
- painter->setPen( TQPen( line->formats[z].color ) );
-
- int ya = yDeviation( line );
- int tw = painter->fontMetrics().width(line->formats[z].text);
- painter->drawText( int(x*sx), int((y+ya)*sy), int(tw*sx), int(line->lineSpacing * sy), TQt::AlignAuto, line->formats[z].text );
- x += tw;
- x += space;
- }
-
-}
-
-bool DSRichText::parseParagraph()
-{
- int alignment = 0;
- formated_word f;
- TQString d = parse( text, "<p", "</p>", pos );
- //tqDebug("D=" + d );
- //tqDebug("POS=%i", pos );
-
- pos += d.length();
- if( d.isNull() )
- return false;
-
- d = parseParagraphTag( d, &alignment );
-
- WordList words;
- TQString data;
- initFormat( &f, alignment );
-
- if( d.isEmpty() ) {
- // found empty paragraph
- words.append( f );
- word_p.append( words );
- return true;
- }
-
- for( unsigned int i = 0; i < d.length(); ) {
- if( d[i] == '<' || i == (d.length() - 1) ) {
- if( i == (d.length() - 1) )
- data.append( d[i] );
-
- parseWords( data, &f, &words );
- initFormat( &f, alignment );
- data = TQString();
-
- // bail out now, otherwise there is
- // and endless loop for e.g. <p>a</p>
- if( i == (d.length() - 1) )
- break;
-
- if( d[i] == '<' ) {
- TQString span = d.mid( i, d.find( ">", i ) - i + 1 );
- i += span.length();
-
- if( span.startsWith( "<span " ) ) {
- initFormat( &f, alignment );
- f.font = parseStyle( parse( span, "style=\"", "\"", 0 ), &f.color );
- }
- }
- } else {
- data.append( d[i] );
- i++;
- }
- }
-
- word_p.append( words );
- return true;
-}
-
-TQFont DSRichText::parseStyle( const TQString & s, TQColor* color )
-{
- TQString style = TQString( s );
-
- style = style.left( style.length() - 1 );
- if( style.startsWith("style=\"" ) )
- style = style.mid( 7, style.length() - 7 );
-
- TQFont f = m_base;
- *color = m_color;
-
- for ( int i = 0; i < style.contains(';')+1; i++ ) {
- TQString s = style.section( ';', i, i );
- if( s.isEmpty() )
- continue;
-
- if ( s.startsWith("font-size:" ) ) {
- f.setPointSize( s.mid(10, s.length() - 12).toInt() );
- } else if ( s.startsWith("font-family:" ) ) {
- f.setFamily( s.right( s.length() - 12 ) );
- } else if( s.startsWith( "color:" ) ) {
- color->setNamedColor( s.right( s.length() - 6 ) );
- } else if( s.startsWith("text-decoration:") ) {
- if( s.endsWith( "underline" ) )
- f.setUnderline( true );
-/*#if [[[TQT_VERSION IS DEPRECATED]]] >= 0x030200
- else if( s.endsWith( "overline" ) )
- f.setOverline( true );
-#endif */
- else if( s.endsWith( "line-through" ) )
- f.setStrikeOut( true );
- } else if( s.startsWith( "font-style:") ) {
- if( s.endsWith( "italic" ) || s.endsWith( "oblique" ) )
- f.setItalic( true );
- } else if( s.startsWith( "font-weight:" ) ) {
- bool ok = false;
- int n = s.right( s.length() - 12 ).toInt( &ok );
- if( s.endsWith( "bold" ) )
- f.setBold( true );
- else if( ok )
- f.setWeight( n / 8 ); // convert CSS values to TQt values
- }
- }
-
- return f;
-}
-
-TQString DSRichText::parse( const TQString & t, const TQString & find, const TQString & find2, int start )
-{
- int s = t.find( find, start );
- if( s == -1 || s < start )
- return TQString();
-
- 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 + find2.length() );
- return text;
-}
-
-void DSRichText::setX( int x )
-{
- xpos = x;
-}
-
-void DSRichText::setY( int y )
-{
- ypos = y;
-}
-
-void DSRichText::setWidth( int width )
-{
- w = width;
-}
-
-void DSRichText::setHeight( int height )
-{
- h = height;
-}
-
-int DSRichText::parseAlignment( const TQString & align )
-{
- TQString a = TQString( align );
- if( a.endsWith("\"") )
- a = a.left( a.length() - 1 );
-
- if( a.startsWith("align=\"") )
- a = a.mid( 7, a.length() - 7 );
-
- if( a == "left" )
- return TQt::AlignLeft;
- else if( a == "center" )
- return TQt::AlignHCenter;
- else if( a == "right" )
- return TQt::AlignRight;
- else if( a == "justify" )
- return TQt::AlignJustify;
-
- return 0;
-}
-
-void DSRichText::parseWords( const TQString & t, formated_word* w, WordList* words )
-{
- unsigned int p = 0;
- for( unsigned int i = 0; i < t.length(); i++ ) {
- if( (t[i].isSpace() && p != i) || i == t.length() - 1 ) {
- formated_word word = *w;
-
- word.text = replaceEscapeSequences( t.mid( p, i + 1 - p ) );
-
- p = i + 1;
- words->append( word );
- }
- }
-}
-
-inline int DSRichText::yDeviation( const formated_line* line )
-{
- // leading = 1 (almost ever)
- // linespacing = leading + height
- // height = ascent + descent + 1
- if( line->lineSpacing != painter->fontMetrics().lineSpacing() ) {
- return line->ascent + line->leading - painter->fontMetrics().ascent() - painter->fontMetrics().leading();
- } else {
- return 0;
- }
-}
-
-TQString DSRichText::replaceEscapeSequences( const TQString & t )
-{
- TQString tmp = TQString( t );
- tmp = tmp.replace( DSREPLACE( "&lt;" ), "<" );
- tmp = tmp.replace( DSREPLACE( "&gt;" ), ">" );
- tmp = tmp.replace( DSREPLACE( "&amp;" ), "&" );
- tmp = tmp.replace( DSREPLACE( "&quot;" ), "\"" );
- return tmp;
-}
-
-TQString DSRichText::parseParagraphTag( const TQString &t, int* alignment )
-{
- TQString d = TQString( t );
- if( d.startsWith("<p>") ) {
- d = d.mid( 3, d.length() - 3 );
- } else if( d.startsWith("<p ") ) {
- *alignment = parseAlignment( parse( d, "align=\"", "\"", 0 ) );
- if( d.contains( ">" ) ) {
- int x = d.find(">" ) + 1;
- d = d.mid( x, d.length() - x );
- }
- }
-
- if( d.endsWith("</p>") )
- d = d.left( d.length() - 4 ); // strlen("</p>");
-
- return d;
-}
-
-#endif // TQT_TEXT_BUG
-
-
diff --git a/kbarcode/dsrichtext.h b/kbarcode/dsrichtext.h
deleted file mode 100644
index 8c56b56..0000000
--- a/kbarcode/dsrichtext.h
+++ /dev/null
@@ -1,193 +0,0 @@
-/***************************************************************************
- dsrichtext.h - description
- -------------------
- begin : Fre Okt 17 2003
- copyright : (C) 2003 by Dominik Seichter
- email : domseichter@web.de
- ***************************************************************************/
-
-/***************************************************************************
- * *
- * This program is free software; you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation; either version 2 of the License, or *
- * (at your option) any later version. *
- * *
- ***************************************************************************/
-
-#ifndef DSRICHTEXT_H
-#define DSRICHTEXT_H
-
-#define TQT_TEXT_BUG
-/*#undef TQT_TEXT_BUG*/
-#ifdef TQT_TEXT_BUG
-
-#include <tqcolor.h>
-#include <tqfont.h>
-#include <tqstring.h>
-#include <tqvaluelist.h>
-
-class DSRichText;
-
-/** This class represents one word,
- * formated with a font, a color and an
- * alignment.
- */
-struct formated_word {
- TQString text;
- TQFont font;
- TQColor color;
- int alignment;
- bool line;
-};
-
-typedef TQValueList<formated_word> WordList;
-
-/** This structure represents a single line.
- * Every line contains a list of formated_words.
- * Wordwrapping has been applied before the line
- * was created.
- * lineSpacing, ascent and leading come from the
- * biggest font in the line.
- */
-struct formated_line {
- int width;
- int lineSpacing;
- int ascent;
- int leading;
- bool line;
-
- WordList formats;
-};
-typedef TQValueList<formated_line> LineList;
-
-class TQColor;
-class TQPainter;
-
-/** A richtext rendering class, which draws a piece
- * of HTML formated richtext on any TQPainter.
- * This class works with all printer resolutions compared
- * to the buggy TQSimpleRichText
- *
- * rendering the richtext happens in 3 steps:
- * <ul>
- * <li> the HTML data is parsed into text_format structures. Each
- * of these text_format structures may represend multiple lines, but
- * also single words. This depends on how long a formated text is.
- * this step happens in the constructor and in parseParagraph()</li>
- * <li> the text_format structures are parsed into line structures.
- * In this step the wordwrapping is calculated. Each line structure
- * has again text_format structures. This is necessary because a line
- * of text may of course contain different formattings. A line struct is always
- * a single line of drawn text, not more and not less.
- * happens in draw() and fillLines()</li>
- * <li> the line structure is drawn line by line using TQPainter.
- * happens in draw()</li>
- * </ul>
- *
- * Printing to the screen is easy and the usage does not differ from
- * TQSimpleRichText. Drawing on TQPrinter is a little bit more complicated.
- * The most important thing is that you may not use TQPainter::scale().
- * A small example on how to print on a TQPrinter:
- * <pre>
- * TQPrinter printer( TQPrinter::HighResolution );
- * TQPainter painter( &printer );
- * TQPaintDeviceMetrics metrics( &printer );
- * double scalex = (double)metrics.logicalDpiX() / (double)TQPaintDevice::x11AppDpiX();
- * double scaley = (double)metrics.logicalDpiY() / (double)TQPaintDevice::x11AppDpiY();
- *
- * DSRichText dsr( "&lt;html&gt;&lt;p&gt;Hallo World&lt;/p&gt;&lt;/html&gt;" );
- * dsr.setWidth( 200 ); // in screenresolution coordinates
- * dsr.setHeight( 80 ); // in screenresolution coordinates
- * painter.translate( 10 * scalex, 10 * scaley ); // draw at 10, 10 instead of 0, 0
- * dsr.scale( scalex, scaley );
- * dsr.draw( &painter );
- * </pre>
- *
- *@author Dominik Seichter
- */
-class DSRichText {
- public:
- /** construct a DSRichText object. @p t is formated text as produces by TQTextEdit.
- */
- DSRichText( const TQString & t );
- ~DSRichText();
-
- void setX( int x );
- void setY( int y );
-
- /** draw the formated text on the TQPainter* @p p
- */
- void draw( TQPainter* p );
- /** set the width of the clipping rectangle
- */
- void setWidth( int width );
- /** set the height of the clipping rectangle
- */
- void setHeight( int height );
- /** scale everything. This is necessary to print on devices
- * with another resolution than the screen. TQPainter::scale() won't work.
- */
- void setScale( double x, double y ) {
- sx = x; sy = y;
- };
-
- private:
- /** parse a single pare of <p></p> elements
- */
- bool parseParagraph();
- /** remove <p> and </p> from the TQString @p t and return it.
- * This function is also responsible for getting the
- * correct alignment of the paragraph.
- */
- TQString parseParagraphTag( const TQString & t, int* alignment );
- /** parse the align attribute of a <p> tag and return the corresponding TQt alignment value.
- */
- int parseAlignment( const TQString & align );
- /** parse the css style attribute of a <span> tag and return a matching TQFont for these
- * 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 & find, const TQString & end, int start );
- void parseWords( const TQString & t, formated_word* w, WordList* words );
- void initFormat( formated_word* f, int alignment );
- void initLine( TQValueList<formated_line>* l );
- void updateSpacing( TQValueList<formated_line>* l, TQFontMetrics* fm );
- /** draw the line @p line justified as blockquote
- */
- void drawJustified( formated_line* line );
- /** calculate the y-deviation needed, because of different font sizes in this line
- */
- inline int yDeviation( const formated_line* line );
- /** replace HTML escape sequences such as &lt; to their real character meaning (i.e. < )
- */
- TQString replaceEscapeSequences( const TQString & t );
-
- /** fill the line structures with data
- */
- void fillLines();
-
- int pos; // current position in text
- int start; // start of a tag
- int end; // end of a tag
- int x; // x position
- int y; // y position
- int w; // width of the text element
- int h; // height of the text element
- int xpos; // x position at the beginning
- int ypos; // y position at the beginning
-
- double sx;
- double sy;
-
- TQString text;
- TQFont m_base;
- TQColor m_color;
- TQPainter* painter;
-
- TQValueList<LineList> line_p;
- TQValueList<WordList> word_p;
-};
-
-#endif // TQT_TEXT_BUG
-#endif
diff --git a/kbarcode/dstextedit.cpp b/kbarcode/dstextedit.cpp
index 87f93d7..9a51d8f 100644
--- a/kbarcode/dstextedit.cpp
+++ b/kbarcode/dstextedit.cpp
@@ -20,7 +20,7 @@
#include <tqregexp.h>
DSTextEdit::DSTextEdit( TQWidget* parent, const char* name )
- : TextEditBase( parent, name )
+ : KTextEdit( parent, name )
{
connect( this, TQT_SIGNAL( textChanged() ), this, TQT_SLOT( fixParagraphs() ) );
}
diff --git a/kbarcode/dstextedit.h b/kbarcode/dstextedit.h
index 0e4b1dd..75a0903 100644
--- a/kbarcode/dstextedit.h
+++ b/kbarcode/dstextedit.h
@@ -18,26 +18,26 @@
#ifndef _DS_TEXT_EDIT_H_
#define _DS_TEXT_EDIT_H_
-#include <tqnamespace.h>
+#include <tqnamespace.h>
#include <ktextedit.h>
// Otherwise moc will complain
#define TextEditBase KTextEdit
-class DSTextEdit : public TextEditBase {
+class DSTextEdit : public KTextEdit {
Q_OBJECT
-
-
+
+
public:
DSTextEdit( TQWidget* parent, const char* name = 0 );
//virtual void moveCursor( CursorAction action, bool select );
private slots:
void fixParagraphs();
-
+
private:
- /**
+ /**
* returns true if the cursor is currently inside
* of a token of the form [value].
*/
diff --git a/kbarcode/labelutils.cpp b/kbarcode/labelutils.cpp
index b83cb9e..73f5a3b 100644
--- a/kbarcode/labelutils.cpp
+++ b/kbarcode/labelutils.cpp
@@ -16,7 +16,6 @@
***************************************************************************/
#include "labelutils.h"
-#include "dsrichtext.h"
// TQt includes
#include <tqbitmap.h>
@@ -108,81 +107,70 @@ TQSize LabelUtils::stringSize( const TQString & t )
return s;
}
-void LabelUtils::renderString( TQPainter* painter, const TQString & t, const TQRect & rect, double scalex, double scaley )
+TQPixmap* LabelUtils::drawString(const TQString & t, int w, int h, double rot)
{
- // DSRichText cannot calculate the width on its own
- TQSimpleRichText srt( t, TDEApplication::font() );
- int width = (rect.width() > 0) ? rect.width() : srt.widthUsed();
- int height = (rect.height() > 0) ? rect.height() : srt.height();
-
- DSRichText r( t );
- r.setX( rect.x() );
- r.setY( rect.y() );
- r.setWidth( width );
- r.setHeight( height );
- r.setScale( scalex, scaley );
- r.draw( painter );
-}
-
-TQPixmap* LabelUtils::drawString( const TQString & t, int w, int h, double rot )
-{
- TQSimpleRichText srt( t, TDEApplication::font() );
+ TQSimpleRichText srt(t, TDEApplication::font());
int width = (w > 0) ? w : srt.widthUsed();
int height = (h > 0) ? h : srt.height();
srt.setWidth( width );
-
+
TQPixmap* pix;
TQPainter painter;
- if( rot == 0.0 ) {
- TQBitmap bm( width, height );
- bm.fill( TQt::color0 ); //transparent
- painter.begin( &bm );
-
- painter.save();
- painter.setPen( TQt::color1 );
- TQColorGroup cg;
- cg.setColor( TQColorGroup::Foreground, TQt::color1 );
- cg.setColor( TQColorGroup::Text, TQt::color1 );
- cg.setColor( TQColorGroup::Base, TQt::color0 );
-
- srt.draw( &painter, 0, 0, bm.rect(), cg );
- painter.restore();
+
+ if (rot == 0.0)
+ {
+ TQBitmap bm(width, height);
+ bm.fill(TQt::color0); //transtqparent
+ painter.begin(&bm);
+
+ painter.save();
+ painter.setPen(TQt::color1);
+ TQColorGroup cg;
+ cg.setColor(TQColorGroup::Foreground, TQt::color1);
+ cg.setColor(TQColorGroup::Text, TQt::color1);
+ cg.setColor(TQColorGroup::Base, TQt::color0);
+
+ srt.draw(&painter, 0, 0, bm.rect(), cg);
+ painter.restore();
painter.end();
-
- pix = new TQPixmap( width, height );
- pix->fill( TQt::white );
- pix->setMask( bm );
-
- if( !pix->isNull() ) {
- painter.begin( pix );
- painter.setPen( TQt::black );
+
+ pix = new TQPixmap(width, height);
+ pix->fill(TQt::white);
+ pix->setMask(bm);
+
+ if (!pix->isNull())
+ {
+ painter.begin(pix);
+ painter.setPen(TQt::black);
TQColorGroup cg;
- srt.draw( &painter, 0, 0, pix->rect(), cg );
+ srt.draw(&painter, 0, 0, pix->rect(), cg);
painter.end();
- }
- } else {
+ }
+ }
+ else
+ {
int w2 = (w > 0) ? w : srt.widthUsed();
int h2 = (h > 0) ? h : srt.height();
TQWMatrix wm;
- wm.rotate( rot );
+ wm.rotate(rot);
- TQSize s = LabelUtils::stringSize( t );
- TQPixmap* tmp = LabelUtils::drawString( t, s.width(), s.height() );
+ TQSize s = LabelUtils::stringSize(t);
+ TQPixmap* tmp = LabelUtils::drawString(t, s.width(), s.height());
- TQPixmap* p = new TQPixmap( w2, h2 );
- p->fill( TQt::white );
- painter.begin( p );
- painter.drawPixmap( 0, 0, tmp->xForm( wm ) );
+ TQPixmap* p = new TQPixmap(w2, h2);
+ p->fill(TQt::white);
+ painter.begin(p);
+ painter.drawPixmap(0, 0, tmp->xForm(wm));
painter.end();
- p->setMask( p->createHeuristicMask() );
+ p->setMask(p->createHeuristicMask());
pix = p;
delete tmp;
}
-
+
return pix;
}
diff --git a/kbarcode/labelutils.h b/kbarcode/labelutils.h
index 777a0af..88e352e 100644
--- a/kbarcode/labelutils.h
+++ b/kbarcode/labelutils.h
@@ -52,7 +52,6 @@ class LabelUtils {
static TQPixmap* drawString( const TQString & t ) {
return LabelUtils::drawString( t, 0, 0, 0 );
}
- static void renderString( TQPainter* painter, const TQString & t, const TQRect & r, double scalex, double scaley );
const TQString getTypeFromCaption( const TQString & cap );
const TQString getModeFromCaption( const TQString & cap );
diff --git a/kbarcode/main.cpp b/kbarcode/main.cpp
index 9663059..60cb981 100644
--- a/kbarcode/main.cpp
+++ b/kbarcode/main.cpp
@@ -108,6 +108,8 @@ int main(int argc, char *argv[])
aboutData.addCredit("John Volpe", I18N_NOOP("Added lot's of useful data fields to kbarcode"), "jtvolpe@cape.com" );
aboutData.addCredit("Nyssa s.r.l.", I18N_NOOP("Added TEC barcode printer support"), "imorrison@nyssa.com.ar", "http://www.nyssa.com.ar" );
aboutData.addCredit("Brian Glass", I18N_NOOP("Added EPCL barcode printer support"), "brian@glassbrian.com", "http://www.glassbrian.com" );
+ aboutData.addCredit("Váradi Zsolt Gyula", I18N_NOOP("Wrote bugfixes."), "vzsolt@users.sf.net");
+ aboutData.addCredit("Timothy Pearson", I18N_NOOP("Maintainer (TDE project)"), "kb9vqf@pearsoncomputing.net");
TDECmdLineArgs::init( argc, argv, &aboutData );
TDECmdLineArgs::addCmdLineOptions( options );
@@ -119,7 +121,7 @@ int main(int argc, char *argv[])
a.connect( &a, TQT_SIGNAL(lastWindowClosed()), &a, TQT_SLOT(quit()));
KBarcode* kbc = new KBarcode( 0, "KBarcodeMainWindow" );
-
+
if( kbc->parseCmdLine() )
return 0;
else
diff --git a/kbarcode/multilineeditdlg.cpp b/kbarcode/multilineeditdlg.cpp
index 65ead7b..18a7acf 100644
--- a/kbarcode/multilineeditdlg.cpp
+++ b/kbarcode/multilineeditdlg.cpp
@@ -20,7 +20,6 @@
// KDE includes
#include <tdeaction.h>
-#include <tdeversion.h>
#include <kcolordialog.h>
#include <tdefiledialog.h>
#include <tdelocale.h>
@@ -149,9 +148,6 @@ void MultiLineEditor::setupActions()
action_italic->plug( toolBar );
action_underline->plug( toolBar );
toolBar->insertSeparator();
-//#if KDE_IS_VERSION( 3, 1, 90 )
-// action_spell->plug( toolBar );
-//#endif
action_font->plug( tool2Bar );
action_font_size->plug( tool2Bar );
@@ -271,6 +267,7 @@ void MultiLineEditor::insertNewField()
void MultiLineEditor::checkSpelling()
{
+// FIXME: check and clean up spellchecking (Zsolt, 2008-04-07)
/*
#if KDE_IS_VERSION( 3, 1, 90 )
TQString s;
diff --git a/kbarcode/mybarcode.cpp b/kbarcode/mybarcode.cpp
deleted file mode 100644
index 48d6735..0000000
--- a/kbarcode/mybarcode.cpp
+++ /dev/null
@@ -1,620 +0,0 @@
-f/***************************************************************************
- barcode.cpp - description
- -------------------
- begin : Die Apr 23 2002
- copyright : (C) 2002 by Dominik Seichter
- email : domseichter@web.de
- ***************************************************************************/
-
-/***************************************************************************
- * *
- * This program is free software; you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation; either version 2 of the License, or *
- * (at your option) any later version. *
- * *
- ***************************************************************************/
-
-#include "sqltables.h"
-#include "barcodecache.h"
-
-#include "mybarcode.h"
-#include <stdio.h>
-
-// TQt includes
-#include <tqdir.h>
-#include <tqpainter.h>
-#include <tqpaintdevicemetrics.h>
-#include <tqsqlquery.h>
-
-// KDE includes
-#include <tdeapplication.h>
-#include <tdeconfig.h>
-#include <tdelocale.h>
-#include <tdemessagebox.h>
-#include <kprocess.h>
-#include <kstandarddirs.h>
-#include <tdetempfile.h>
-
-#define BARCODE_MARGIN 10 /* Margin added by GNU Barcode to the barcodes */
-
-TQValueList<barcodeFormat> codes;
-
-void init() {
- BarCode::setHaveBarcode();
-}
-
-bool barcodeData::operator==( const struct barcodeData d ) const {
- bool b = ( value == d.value && type == d.type &&
- scale == d.scale && text == d.text );
-
- if( BarCode::hasFeature( type, TBARCODEADV ) )
- b = ( b && tbarcode == d.tbarcode );
-
- if( BarCode::hasFeature( type, DATAMATRIX ) )
- b = ( b && datamatrix == d.datamatrix );
-
- if( BarCode::hasFeature( type, PDF417BARCODE ) )
- b = ( b && pdf417 == d.pdf417 );
-
- return b;
-};
-
-BarCode::BarCode( const barcodeData* data )
-{
- barcode = *data;
- m_index = 0;
-}
-
-BarCode::BarCode()
-{
- fillDefault( &barcode );
- m_index = 0;
-}
-
-BarCode::~BarCode()
-{
-}
-
-const TQPixmap BarCode::pixmap()
-{
- if( p.isNull() )
- createBarcode( &p, TDEApplication::desktop() );
-
- if( p.isNull() ) {
- KMessageBox::error( 0, "<qt>" + i18n("Barcode not valid!") + "<br>" + barcode.value + "</qt>" );
- barcode.valid = false;
- }
-
- return p;
-}
-
-bool BarCode::createPixmap( TQPixmap* target, int resx, int resy )
-{
- KTempFile* output = new KTempFile( TQString(), ".ps" );;
- output->file()->close();
-
- KTempFile* input = new KTempFile( TQString(), ".pbm" );
- input->file()->close();
-
- m_value = createSequence( barcode.value );
-
- if( BarCode::hasFeature( barcode.type, PDF417 ) ) {
- if(!createPdf417( output )) {
- cleanUp( output, input, target );
- return false;
- }
- } else if( BarCode::hasFeature( barcode.type, TBARCODE ) ) {
- if(!createTBarcode( output )) {
- cleanUp( output, input, target );
- return false;
- }
- } else { // if( BarCode::hasFeature( barcode.type, GNU_BARCODE ) ) {
- TQString flag = barcode.text ? "" : "-n";
-
- KShellProcess proc;
- proc << "barcode" << "-E"
- << "-b" << KShellProcess::quote( m_value ) << flag
- << "-e" << barcode.type << "-o" << output->name();
-
- proc.start( TDEProcess::Block, TDEProcess::NoCommunication );
- proc.resume();
-
- if( proc.exitStatus() ) {
- cleanUp( output, input, target );
- return false;
- }
- }
-
- TQFileInfo fi( output->name() );
- // if file size = 0, error in generation
- if( !fi.size() ) {
- cleanUp( output, input, target );
- return false;
- }
-
- TQSize s = getBoundingBox( output->name() );
- double sw = (double)s.width()/72 * resx;
- double sh = (double)s.height()/72 * resy;
-
- KShellProcess proc2;
- proc2 << "gs" << TQString("-g%1x%2").arg(int(sw*(double)barcode.scale)).arg(int(sh*(double)barcode.scale))
- << "-r" + TQString::number( resx*(double)barcode.scale ) + "x" + TQString::number( resy*(double)barcode.scale )
- << "-sDEVICE=pbmraw" << "-sOutputFile=" + input->name() << "-sNOPAUSE"
- << "-q " + output->name() << "-c showpage" << "-c quit";
-
- proc2.start( TDEProcess::Block, TDEProcess::NoCommunication );
- proc2.resume();
-
- if( proc2.exitStatus() ) {
- cleanUp( output, input, target );
- return false;
- }
-
- target->load( input->name(), "PBM" );
-// BarcodeCache::instance()->write( barcode, resx, resy, target, m_value );
-
- input->unlink();
- output->unlink();
-
- delete output;
- delete input;
-
- return true;
-}
-
-void BarCode::createBarcode( TQPixmap* target, TQPaintDevice* device )
-{
- TQPaintDeviceMetrics pdm( device );
- int resx = pdm.logicalDpiX();
- int resy = pdm.logicalDpiY();
-
- TQString value = createSequence( barcode.value );
- TQPixmap* cached = 0;//BarcodeCache::instance()->read( barcode, resx, resy, value );
-
- // no matching barcode found in cache
- if( !cached ) {
- if( !createPixmap( target, resx, resy ) )
- return;
- } else {
- *target = *cached;
- delete cached;
- }
-
- if( BarCode::hasFeature( barcode.type, PDF417 ) ) {
- // we have to scale to the correct resolution.
- // we scale already here and not at the end,
- // so that the addMargin function does not get a scaled margin.
- TQPaintDeviceMetrics pdm( TDEApplication::desktop() );
- int screenresx = pdm.logicalDpiX();
- int screenresy = pdm.logicalDpiY();
-
- TQWMatrix m;
- double scalex = (resx/screenresx)*barcode.scale;
- double scaley = (resy/screenresy)*barcode.scale;
- m.scale( scalex, scaley );
- *target = target->xForm( m );
- }
- *target = cut( target, barcode.cut );
- *target = addMargin( target, barcode.margin );
-
- // Rotate
- TQWMatrix m;
- m.rotate( (double)barcode.rotation );
- *target = target->xForm( m );
-
- barcode.valid = true;
-}
-
-bool BarCode::createPdf417( KTempFile* output )
-{
- KTempFile text( TQString(), ".txt" );
- TQTextStream t( text.file() );
- t << m_value;
- text.file()->close();
-
- // ps does not work use pbm!
- KShellProcess proc;
- proc << "pdf417_enc" << "-tps" << text.name() << output->name()
- << barcode.pdf417.row
- << barcode.pdf417.col
- << barcode.pdf417.err;
-
- proc.start( TDEProcess::Block, TDEProcess::NoCommunication );
- proc.resume();
-
- if( proc.exitStatus() ) {
- text.unlink();
- return false;
- }
-
- text.unlink();
- return true;
-}
-
-bool BarCode::createTBarcode( KTempFile* output )
-{
- // print text
- TQString flag = barcode.text ? "" : "n";
- // escape text
- flag.append( barcode.tbarcode.escape ? " son" : " soff" );
- // autocorrection
- flag.append( barcode.tbarcode.autocorrect ? " Aon" : " Aoff" );
- // text above
- flag.append( barcode.tbarcode.above ? " a" : "" );
-
- KShellProcess proc;
- proc << "tbarcodeclient" << "-f" + output->name();
- if( !BarCode::hasFeature( barcode.type, BARCODE2D ) )
- proc << TQString( "m%1" ).arg( barcode.tbarcode.modulewidth * 1000 );
-
- if( BarCode::hasFeature( barcode.type, DATAMATRIX ) )
- proc << TQString( "Ds%1" ).arg( barcode.datamatrix.size );
-
- if( BarCode::hasFeature( barcode.type, PDF417BARCODE ) )
- proc << TQString( "Pr%1 Pc%2 Pe%3" ).arg( barcode.pdf417.row )
- .arg( barcode.pdf417.col )
- .arg( barcode.pdf417.err );
-
- proc << barcode.type << "tPS" << TQString("c%1").arg( barcode.tbarcode.checksum ) << flag << "d" + KShellProcess::quote( m_value );
- proc.start( TDEProcess::Block, TDEProcess::NoCommunication );
- proc.resume();
-
- if( proc.exitStatus() )
- return false;
-
- return true;
-}
-
-const TQPixmap BarCode::printerPixmap( TQPaintDevice* device )
-{
- if( pp.isNull() )
- createBarcode( &pp, device );
-
- return pp;
-}
-
-void BarCode::fillDefault( barcodeData* data )
-{
- data->margin = 10;
- data->text = true;
- data->value = "1234567890";
- data->type = "code39";
- data->scale = 1.0;
- data->cut = 1.0;
- data->rotation = 0;
- data->valid = false;
-
- data->pdf417.row = 24;
- data->pdf417.col = 8;
- data->pdf417.err = 5;
-
- data->datamatrix.size = 0;
-
- data->tbarcode.modulewidth = 0.353;
- data->tbarcode.escape = false;
- data->tbarcode.above = false;
- data->tbarcode.autocorrect = false;
- data->tbarcode.checksum = 0;
-
- data->xml.caption = "Static";
- data->xml.x = 0;
- data->xml.y = 0;
-
- data->sequence.enabled = false;
- data->sequence.mode = NUM;
- data->sequence.step = 1;
- data->sequence.start = 1;
-}
-
-void BarCode::redrawBarcode()
-{
- p.resize( 0, 0 );
- pp.resize( 0, 0 );
-}
-
-TQPixmap BarCode::cut( TQPixmap* pic, double cut)
-{
- if( cut == 1.0 )
- return (*pic);
-
- TQPixmap pcut( pic->width(), int((double)pic->height() * cut) );
- pcut.fill( TQt::white ); // barcode.bg
-
- TQWMatrix m;
- /*
- * if text is above the barcode cut from
- * below the barcode.
- */
-
- // TODO: put this into one if, I am to stupid today.....
- if( BarCode::hasFeature( barcode.type, TBARCODEADV ) ) {
- if( !barcode.tbarcode.above )
- m.rotate( 180 );
- } else
- m.rotate( 180 );
-
- TQPainter painter( &pcut );
- painter.drawPixmap( 0, 0, pic->xForm( m ) );
-
- return pcut.xForm( m );
-}
-
-TQPixmap BarCode::addMargin( TQPixmap* pic, int margin )
-{
- TQPixmap p;
-
- /* We have to handle UPC special because of the checksum character
- * which is printed on the right margin.
- * The samve goes for ISBN codes.
- * Any other formats??
- */
-
- bool gnubarcode = BarCode::hasFeature( barcode.type, GNU_BARCODE );
- double barm = gnubarcode ? BARCODE_MARGIN * barcode.scale : 0;
-
- // Add margin
- double sx = barm;
- double sy = barm;
- double sw = pic->width() - barm * 2;
- double sh = pic->height() - barm * 2;
-
- if( gnubarcode && (barcode.type == "upc" || barcode.type == "isbn") ) {
- sw = pic->width() - barm;
-
- p.resize( pic->width() + int(margin*2 - barm), pic->height() + int(margin * 2 - barm * 2) );
- } else
- p.resize( pic->width() + int(margin*2 - barm * 2), pic->height() + int(margin * 2 - barm * 2) );
-
- p.fill( TQt::white ); // barcode.bg
- TQPainter painter( &p );
- painter.drawPixmap( margin, margin, *pic, (int)sx, (int)sy, (int)sw, (int)sh );
- painter.end();
-
- return p;
-}
-
-const TQString BarCode::getMaxLength( const TQString & name )
-{
- TQSqlQuery query("select uid, (length(barcode_no)) as LEN from " TABLE_BASIC
- " where encoding_type = '" + name +"' ORDER by LEN DESC LIMIT 1" );
-
- while( query.next() ) {
- TQSqlQuery queryuid("select barcode_no from barcode_basic where uid = '"
- + query.value( 0 ).toString() + "'" );
- while( queryuid.next() )
- if(!queryuid.value( 0 ).toString().isEmpty())
- return queryuid.value( 0 ).toString();
- }
-
- TQSqlQuery query1("select uid, (length(barcode_no)) as LEN from " TABLE_CUSTOMER_TEXT
- " where encoding_type = '" + name +"' ORDER by LEN DESC LIMIT 1" );
-
- while( query1.next() ) {
- TQSqlQuery queryuid("select barcode_no from customer_text where uid = '"
- + query1.value( 0 ).toString() + "'" );
- while( queryuid.next() )
- if(!queryuid.value( 0 ).toString().isEmpty())
- return queryuid.value( 0 ).toString();
- }
-
- return "1234567";
-}
-
-void BarCode::cleanUp( KTempFile* file, KTempFile* file2, TQPixmap* target )
-{
- target->resize( 0, 0 );
-
- file->unlink();
- file2->unlink();
- delete file;
- delete file2;
-}
-
-TQString BarCode::createSequence( const TQString & value )
-{
- if( !barcode.sequence.enabled )
- return value;
-
- if( value.contains( '#' ) <= 0 )
- return value;
-
- TQString text = value;
- int pos = 0, counter = 1;
-
- pos = text.find("#", pos);
- pos++;
- while( text[pos] == '#' ) {
- text.remove(pos, 1);
- counter++;
- }
-
- pos = text.find("#", 0);
- TQString temp;
-
- if( barcode.sequence.mode == NUM ) {
- int v = barcode.sequence.start + m_index*barcode.sequence.step;
- temp.sprintf("%0*i", counter, v );
- } else {
- for( int i = 0; i < counter; i++ )
- temp.append( "A" );
-
- unsigned int z = 0;
- for( int p = temp.length(); p >= 0; p--, z++ ) {
- if( barcode.sequence.mode == ALPHA ) {
- int v = 'A' + m_index*barcode.sequence.step;
- v -= z*('Z'-'A');
-
- if( v <= 'Z' ) {
- temp[p] = TQChar(v);
- break;
- } else if( v > 'Z' )
- v = 'Z';
- temp[p] = TQChar(v);
- } else if( barcode.sequence.mode == ALPHANUM ) {
- tqDebug("NOT IMPLEMENTED");
-/* char array[36];
- for( unsigned int i = 'A'; i <= 'Z'; i++ )
- array[i-'A'] = i;
- for( unsigned int i = '0'; i <= '9'; i++ )
- array['Z'-'A'+i-'0'] = i;
-
- int z = m_index*barcode.sequence.step;
- if( z < sizeof(array) )
- temp[]
- int v = array[ ]*/
- }
- }
- }
-
- text.replace( pos, 1, temp);
-
- return text;
-}
-
-TQString BarCode::sequenceValue()
-{
- return createSequence( barcode.value );
-}
-
-bool BarCode::hasFeature( const TQString & type, unsigned int feature )
-{
- for( unsigned int i = 0; i < codes.count(); i++ )
- if( codes[i].name == type )
- return (codes[i].features & feature) == feature;
-
- return false;
-}
-
-TQSize BarCode::getBoundingBox( const TQString & filename )
-{
- TQSize s(0,0);
- TQFile f( filename );
- if( !f.open( IO_ReadOnly ) )
- return s;
-
- TQString t;
- while( f.readLine( t, 1000 ) != -1 )
- {
- if( t.startsWith( "%%BoundingBox:") )
- {
- int x = 0;
- int y = 0;
- int w = 0;
- int h = 0;
- t = t.right( t.length() - 14 );
- sscanf( (const char*)t, "%d %d %d %d", &x, &y, &w, &h );
- s = TQSize( w, h );
- break;
- }
- }
-
- f.close();
- return s;
-}
-
-bool BarCode::m_haveGnuBarcode = false;
-bool BarCode::m_havePdfEncode = false;
-bool BarCode::m_haveTBarcode = false;
-
-barcodeFormat BarCode::fillStruct( const TQString & name, const TQString & text, const int feature )
-{
- barcodeFormat t;
- t.name = name;
- t.text = text;
- t.features = feature;
- return t;
-}
-
-void BarCode::setHaveBarcode()
-{
- m_haveGnuBarcode = !TDEStandardDirs::findExe( "barcode" ).isNull();
- m_havePdfEncode = !TDEStandardDirs::findExe( "pdf417_enc" ).isNull();
- m_haveTBarcode = !TDEStandardDirs::findExe( "tbarcodeclient" ).isNull();
-
- if( codes.count() == 0 ) {
- if( m_haveGnuBarcode ) {
- codes.append( fillStruct( "ean", i18n("EAN (EAN 8 or EAN 13)"), GNU_BARCODE ) );
- codes.append( fillStruct( "upc", i18n("UPC (12-digit EAN; UPCA and UPCB)"), GNU_BARCODE ) );
- codes.append( fillStruct( "isbn", i18n("ISBN (still EAN13)"), GNU_BARCODE | NOCUT ) );
- codes.append( fillStruct( "code39", i18n("Code 39"), GNU_BARCODE ) );
- codes.append( fillStruct( "code39 -c", i18n("Code 39 (no checksum)"), GNU_BARCODE ) );
- codes.append( fillStruct( "code128", i18n("Code 128 (a,b,c: autoselection)"), GNU_BARCODE ) );
- codes.append( fillStruct( "code128c", i18n("Code 128C (compact form digits)"), GNU_BARCODE ) );
- codes.append( fillStruct( "code128b", i18n("Code 128B, full printable ascii"), GNU_BARCODE ) );
- codes.append( fillStruct( "i25", i18n("interleaved 2 of 5 (only digits)"), GNU_BARCODE ) );
- codes.append( fillStruct( "i25 -c", i18n("interleaved 2 of 5 (only digits, no checksum)"), GNU_BARCODE ) );
- codes.append( fillStruct( "128raw", i18n("Raw code 128"), GNU_BARCODE ) );
- codes.append( fillStruct( "cbr", i18n("Codabar"), GNU_BARCODE ) );
- codes.append( fillStruct( "cbr -c", i18n("Codabar (no checksum)"), GNU_BARCODE ) );
- codes.append( fillStruct( "msi", i18n("MSI"), GNU_BARCODE ) );
- codes.append( fillStruct( "pls", i18n("Plessey"), GNU_BARCODE ) );
- codes.append( fillStruct( "code93", i18n("Code 93"), GNU_BARCODE ) );
- }
-
- if( m_havePdfEncode ) {
- codes.append( fillStruct( "pdf417", i18n("pdf 417 2D Barcode"), BARCODE2D | PDF417 | PDF417BARCODE ) );
- }
-
- if( m_haveTBarcode ) {
- codes.append( fillStruct( "b1", "Code 11", TBARCODE | TBARCODEADV | MODULO10CHECK ) );
- codes.append( fillStruct( "b2", "Code 2 of 5 (Standard)", TBARCODE | TBARCODEADV | MODULO10CHECK ) );
- codes.append( fillStruct( "b3", "Interleaved 2 of 5 Standard", TBARCODE | TBARCODEADV ) );
- codes.append( fillStruct( "b4", "Code 2 of 5 IATA", TBARCODE | TBARCODEADV | MODULO10CHECK ) );
- codes.append( fillStruct( "b5", "Code 2 of 5 Matrix", TBARCODE | TBARCODEADV | MODULO10CHECK ) );
- codes.append( fillStruct( "b6", "Code 2 of 5 Data Logic", TBARCODE | TBARCODEADV | MODULO10CHECK ) );
- codes.append( fillStruct( "b7", "Code 2 of 5 Industrial", TBARCODE | TBARCODEADV | MODULO10CHECK ) );
- codes.append( fillStruct( "b8", "Code 3 of 9 (Code 39)", TBARCODE | TBARCODEADV | MODULOALLCHECK ) );
- codes.append( fillStruct( "b9", "Code 3 of 9 (Code 39) ASCII", TBARCODE | TBARCODEADV | MODULOALLCHECK ) );
- codes.append( fillStruct( "b10", "EAN8", TBARCODE | TBARCODEADV | EAN8CHECK | MODULO10CHECK ) );
- codes.append( fillStruct( "b11", "EAN8 - 2 digits add on", TBARCODE | NOCUT | TBARCODEADV | EAN8CHECK | MODULO10CHECK ) );
- codes.append( fillStruct( "b12", "EAN8 - 5 digits add on", TBARCODE | NOCUT | TBARCODEADV | EAN8CHECK | MODULO10CHECK ) );
- codes.append( fillStruct( "b13", "EAN13", TBARCODE | TBARCODEADV | EAN13CHECK | MODULO10CHECK ) );
- codes.append( fillStruct( "b14", "EAN13 - 2 digits add on", TBARCODE | NOCUT | TBARCODEADV | EAN13CHECK | MODULO10CHECK ) );
- codes.append( fillStruct( "b15", "EAN13 - 5 digits add on", TBARCODE | NOCUT | TBARCODEADV | EAN13CHECK | MODULO10CHECK ) );
- codes.append( fillStruct( "b16", "EAN128 (supports AIS)", TBARCODE | TBARCODEADV | MODULOALLCHECK ) );
- codes.append( fillStruct( "b17", "UPC 12 Digits", TBARCODE | TBARCODEADV | MODULOALLCHECK ) );
- codes.append( fillStruct( "b18", "CodaBar (2 width)", TBARCODE | TBARCODEADV | MODULO10CHECK ) );
- codes.append( fillStruct( "b19", "CodaBar (18 widths)", TBARCODE | TBARCODEADV ) );
- codes.append( fillStruct( "b20", "Code128", TBARCODE | TBARCODEADV ) );
- codes.append( fillStruct( "b21", "Deutsche Post Leitcode", TBARCODE | TBARCODEADV ) );
- codes.append( fillStruct( "b22", "Deutsche Post Identcode", TBARCODE | TBARCODEADV ) );
- codes.append( fillStruct( "b25", "Code 93", TBARCODE | TBARCODEADV ) );
- codes.append( fillStruct( "b26", "Identical to eBC_UPCA", TBARCODE | TBARCODEADV ) );
- codes.append( fillStruct( "b33", "UCC128 (= EAN128)", TBARCODE | TBARCODEADV ) );
- codes.append( fillStruct( "b34", "UPC A", TBARCODE | TBARCODEADV | TBARCODEADV | UPCACHECK ) );
- codes.append( fillStruct( "b35", "UPC A - 2 digit add on", TBARCODE | TBARCODEADV | UPCACHECK ) );
- codes.append( fillStruct( "b36", "UPC A - 5 digit add on", TBARCODE | TBARCODEADV | UPCACHECK ) );
- codes.append( fillStruct( "b37", "UPC E", TBARCODE | TBARCODEADV | UPCECHECK ) );
- codes.append( fillStruct( "b38", "UPC E - 2 digit add on", TBARCODE | TBARCODEADV | UPCECHECK ) );
- codes.append( fillStruct( "b39", "UPC E - 5 digit add on", TBARCODE | TBARCODEADV | UPCECHECK ) );
- codes.append( fillStruct( "b40", "PostNet ZIP (5d.)", TBARCODE | NOCUT | TBARCODEADV | POSTNETCHECK ) );
- codes.append( fillStruct( "b41", "PostNet ZIP (5d.+CD)", TBARCODE | NOCUT | TBARCODEADV | POSTNETCHECK ) );
- codes.append( fillStruct( "b42", "PostNet ZIP (8d.)", TBARCODE | NOCUT | TBARCODEADV | POSTNETCHECK ) );
- codes.append( fillStruct( "b43", "PostNet ZIP+4 (5d.+4d.+CD)", TBARCODE | NOCUT | TBARCODEADV | POSTNETCHECK ) );
- codes.append( fillStruct( "b44", "PostNet DPBC (5d.+4d.+2d.)", TBARCODE | NOCUT | TBARCODEADV | POSTNETCHECK ) );
- codes.append( fillStruct( "b45", "PostNet DPBC (5d.+4d.+2d.+CD)", TBARCODE | NOCUT | TBARCODEADV | POSTNETCHECK ) );
- codes.append( fillStruct( "b46", "Plessey Code", TBARCODE | TBARCODEADV ) );
- codes.append( fillStruct( "b47", "MSI Code", TBARCODE | TBARCODEADV | MODULO10CHECK ) );
- codes.append( fillStruct( "b50", "LOGMARS", TBARCODE | TBARCODEADV | MODULOALLCHECK ) );
- codes.append( fillStruct( "b55", "PDF417 - 2D bar code", TBARCODE | BARCODE2D | PDF417BARCODE ) );
- codes.append( fillStruct( "b56", "PDF417 Truncated - 2D bar code", TBARCODE | BARCODE2D | PDF417BARCODE ) );
- codes.append( fillStruct( "b57", "MaxiCode - 2D-bar code (Postscript only)", TBARCODE | BARCODE2D ) );
- codes.append( fillStruct( "b58", "QR-Code", TBARCODE | BARCODE2D ) );
- codes.append( fillStruct( "b59", "Code128 (CharSet A)", TBARCODE | TBARCODEADV | CODE128CHECK | MODULOALLCHECK ) );
- codes.append( fillStruct( "b60", "Code128 (CharSet B)", TBARCODE | TBARCODEADV | CODE128CHECK | MODULOALLCHECK ) );
- codes.append( fillStruct( "b61", "Code128 (CharSet C)", TBARCODE | TBARCODEADV | CODE128CHECK | MODULOALLCHECK ) );
- codes.append( fillStruct( "b62", "Code 93 Ascii", TBARCODE | TBARCODEADV | MODULOALLCHECK ) );
- codes.append( fillStruct( "b63", "Australian Post Standard Customer", TBARCODE | NOCUT | TBARCODEADV ) );
- codes.append( fillStruct( "b64", "Australian Post Customer 2", TBARCODE | NOCUT | TBARCODEADV ) );
- codes.append( fillStruct( "b65", "Australian Post Customer 3", TBARCODE | NOCUT | TBARCODEADV ) );
- codes.append( fillStruct( "b66", "Australian Post Reply Paid", TBARCODE | NOCUT | TBARCODEADV ) );
- codes.append( fillStruct( "b67", "Australian Post Routing", TBARCODE | NOCUT | TBARCODEADV ) );
- codes.append( fillStruct( "b68", "Australian Post Redirection", TBARCODE | NOCUT | TBARCODEADV ) );
- codes.append( fillStruct( "b69", "ISBN Code (=EAN13P5)", TBARCODE | TBARCODEADV ) );
- codes.append( fillStruct( "b70", "Royal Mail 4 State (RM4SCC)", TBARCODE | NOCUT | TBARCODEADV ) );
- codes.append( fillStruct( "b71", "Data Matrix", DATAMATRIX | TBARCODE | BARCODE2D | NOSCALE ) );
- }
- }
-}
-
diff --git a/kbarcode/mybarcode.h b/kbarcode/mybarcode.h
deleted file mode 100644
index ae12782..0000000
--- a/kbarcode/mybarcode.h
+++ /dev/null
@@ -1,304 +0,0 @@
-/***************************************************************************
- mybarcode.h - description
- -------------------
- begin : Die Apr 23 2002
- copyright : (C) 2002 by Dominik Seichter
- email : domseichter@web.de
- ***************************************************************************/
-
-/***************************************************************************
- * *
- * This program is free software; you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation; either version 2 of the License, or *
- * (at your option) any later version. *
- * *
- ***************************************************************************/
-
-#ifndef MY_BARCODE_H
-#define MY_BARCODE_H
-
-#include <tqpixmap.h>
-#include <tqobject.h>
-
-#include <tqvaluelist.h>
-#include "barkode.h"
-void init();
-
-typedef union u_settings {
- struct {
- int row;
- int col;
- int err;
- } pdf417;
-
- struct {
- int size;
- } datamatrix;
-
- struct {
- double modulewidth;
- bool escape;
- } tbarcode;
-};
-
-class TQColor;
-class TQString;
-typedef struct barcodeData {
- TQString value;
- TQString type;
- int margin;
- int rotation;
- double scale;
- double cut;
- bool text;
- bool valid;
-
- struct _pdf417 {
- int row;
- int col;
- int err;
-
- bool operator==( const struct _pdf417 p ) const {
- return row == p.row && col == p.col && err == p.err;
- };
-
- } pdf417;
-
- struct _datamatrix {
- int size;
-
- bool operator==( const struct _datamatrix d ) const {
- return size == d.size;
- };
-
- } datamatrix;
-
- struct _tbarcode {
- double modulewidth;
- bool escape;
- bool above;
- bool autocorrect;
- int checksum;
-
- bool operator==( const struct _tbarcode t ) const {
- return modulewidth == t.modulewidth && escape == t.escape && above == t.above && checksum == t.checksum && autocorrect == t.autocorrect;
- };
-
- } tbarcode;
-
- struct {
- // only important
- // when this struct
- // is read from XML
- TQString caption;
- int x;
- int y;
- } xml;
-
- /**
- * Compare to barcodeData structs,
- * but only the fields which are used
- * as commandline parameters for
- * the genaration backends.
- * E.g. margin is not compared, because
- * the margin is created by KBarcode internally.
- */
- bool operator==( const struct barcodeData d ) const;
-
- struct {
- bool enabled;
- int mode;
- int step;
- int start;
- } sequence;
-};
-
-#if 0
-enum { NOCUT = 0x00001, MULTILINE = 0x00002, NOTEXT = 0x00004, NOSCALE = 0x00008,
- /**
- * The different Generator Backends
- */
- GNU_BARCODE = 0x00010, PDF417 = 0x00020, TBARCODE = 0x00040,
- /**
- * Different advanced option modes.
- */
- DATAMATRIX = 0x00080, PDF417BARCODE = 0x00100, TBARCODEADV = 0x00200,
- /**
- * Checksum ID's
- */
- POSTNETCHECK = 0x01000, CODE128CHECK = 0x02000, EAN8CHECK = 0x04000, EAN13CHECK = 0x08000,
- UPCACHECK = 0x10000, UPCECHECK = 0x20000, MODULOALLCHECK = 0x40000, MODULO10CHECK = 0x80000,
- /**
- * Short cut's
- */
- BARCODE2D = NOCUT | MULTILINE | NOTEXT };
-#endif
-
-typedef struct barcodeFormat {
- TQString name;
- TQString text;
- unsigned int features;
-};
-
-class TDEProcess;
-class KTempFile;
-class TQPaintDevice;
-/**
- * This class creates a TQPixmap from a barcodeData struct.
- * Several backends are supported to generate the pixmap.
- * GNU Barcode
- * pdf417_enc
- * TBarcode (http://www.tec-it.com)
- *
- * This tools generate a postscript file. The ps file is
- * transformed to a PBM file scaled to the requested resolution
- * or screen resolution using ghostscript.
- *
- * The generated barcodes are cached using BarcodeCache.
- * To fill a barcodeData struct with data from the user, you
- * might want to use BarcodeWidget.
- *
- * A small example, of how to generate a valid Barcode in your application
- * without the use of BarcodeWidget:
- * <pre>
- * barcodeData data;
- * BarCode::fillDefault( &data ); // setup a barcode object with valid data
- * data.value = "KBARCODE";
- * data.type = "code39";
- * BarCode b( &data ); // create a barcode object
- * TQPixmap p = b.pixmap(); // get a pixmap of the barcode
- * </pre>
- *
- * @see BarcodeCache @see BarcodeWidget
- * @author Dominik Seichter
- */
-class BarCode {
- public:
- /** Create a BarCode object from the data const barcodeData* @p data.
- * You may delete @p data afterwards. Be sure to call at least once
- * BarCode::fillDefault() on @p data. Otherwise you rsik invalid barcode data.
- */
- BarCode( const barcodeData* data );
- /** Create a BarCode object filled with default data.
- */
- BarCode();
- ~BarCode();
-
- /** Get a TQPixmap of the current barcodeData in
- * screen resolution-
- */
- const TQPixmap pixmap();
- /** Get a TQPixmap of the barcode in the same resolution as the
- * TQPaintDevice* @p device. This is necessary if you want to print
- * your barcodes, as they won't be scanable in screen resolution.
- */
- const TQPixmap printerPixmap( TQPaintDevice* device );
-
- /** Set the index of the barcodes for barcode sequences.
- */
- void setIndex( int i ) { m_index = i; }
- /** Change the barcodeData to @p d, call redraw() afterwards.
- */
- void setData( barcodeData* d ) { barcode = *d; }
- bool validBarcode() {return !p.isNull();}
-
- barcodeData data() const { return barcode; }
-
- TQString sequenceValue();
-
- /** Fill @p barcodeData* data with its default parameters.
- * Always call this function, after you have created a new
- * barcodeData struct.
- */
- static void fillDefault( barcodeData* data );
-
- /** Test if the encodingType @p type has a certain
- * @p feature, as defined in the codes TQValueList.
- */
- static bool hasFeature( const TQString & type, unsigned int feature );
-
- /** get the meximum length of value for the encoding type @p name
- * from the SQL databases.
- */
- static const TQString getMaxLength( const TQString & name );
-
- /** This function has to be called befor barcode support is avaible.
- * It searches for the barcode generation backends
- * (gnu barcode, tbarcode and pdf417) and fills the TQValueList codes
- * with data and information about the avaible barcode encoding types.
- * You only have to call this function once.
- * The results can be retrieved with the following functions:
- * @see haveBarcode()
- * @see haveTBarcode()
- * @see havePDFBarcode()
- */
- static void setHaveBarcode();
- static bool haveBarcode() {
- return ( m_haveGnuBarcode || m_havePdfEncode || m_haveTBarcode );
- }
- static bool haveGNUBarcode() {
- return m_haveGnuBarcode;
- }
- static bool haveTBarcode() {
- return m_haveTBarcode;
- }
- static bool havePDFBarcode() {
- return m_havePdfEncode;
- }
-
- /** call this, always after you changed the barcodeData using setData,
- * so that the pixmaps are recreated.
- */
- void redrawBarcode();
- private:
- bool createPixmap( TQPixmap* target, int resx, int resy );
- void createBarcode( TQPixmap* target, TQPaintDevice* device );
- bool createPdf417( KTempFile* output );
- bool createTBarcode( KTempFile* output );
- TQString createSequence( const TQString & value );
- /** reads the bounding box information from a postscript file
- */
- TQSize getBoundingBox( const TQString & filename );
-
- void cleanUp( KTempFile* file, KTempFile* file2, TQPixmap* target );
- static barcodeFormat fillStruct( const TQString & name, const TQString & text, const int feature );
-
- /**
- * Cut the barcode either on the top or
- * on the bottom, depending on the text position.
- *
- * @param pic the TQPixmap that will be cutted
- * @param cut a value between 0.0 and 1.0. If cut = 1.0
- * then no cut will happen, if cut = 0.5, half of
- * the barcode is going to be cutted away.
- */
- TQPixmap cut( TQPixmap* pic, double cut );
-
- /**
- * Add a margin to the TQPixmap pic.
- * @param pic the TQPixmap pic which should get a margin
- * @param margin the margin size in pixels.
- */
- TQPixmap addMargin( TQPixmap* pic, int margin );
-
-
- /**
- * The barcode is generated from this value.
- * This is necessary so that sequences will work.
- */
- TQString m_value;
-
- /** index for barcode sequences;
- */
- int m_index;
-
- TQPixmap p;
- TQPixmap pp;
- barcodeData barcode;
- static bool m_haveGnuBarcode;
- static bool m_havePdfEncode;
- static bool m_haveTBarcode;
-};
-
-#endif
diff --git a/kbarcode/referencecounted.cpp b/kbarcode/referencecounted.cpp
deleted file mode 100644
index 8759ffc..0000000
--- a/kbarcode/referencecounted.cpp
+++ /dev/null
@@ -1,23 +0,0 @@
-
-/***************************************************************************
- referencecounted.cpp - description
- -------------------
- begin : Mo Apr 18 2005
- copyright : (C) 2005 by Dominik Seichter
- email : domseichter@web.de
- ***************************************************************************/
-
-/***************************************************************************
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- ***************************************************************************/
-
-#include "referencecounted.h"
-
-
-
-
diff --git a/kbarcode/semantic.cache b/kbarcode/semantic.cache
deleted file mode 100644
index 3f72018..0000000
--- a/kbarcode/semantic.cache
+++ /dev/null
@@ -1,39 +0,0 @@
-;; Object kbarcode/
-;; SEMANTICDB Tags save file
-(semanticdb-project-database-file "kbarcode/"
- :tables (list
- (semanticdb-table "barkode.cpp"
- :major-mode 'c++-mode
- :tags '(("barkode.h" include nil nil [830 850]) ("barkodeengine.h" include nil nil [851 877]) ("gnubarcode.h" include nil nil [878 901]) ("pixmapbarcode.h" include nil nil [902 928]) ("purepostscript.h" include nil nil [929 956]) ("tbarcode2.h" include nil nil [957 979]) ("tokenprovider.h" include nil nil [980 1006]) ("barcode.h" include (:system-flag t) nil [1042 1064]) ("BARCODE_DEFAULT_FLAGS" variable (:constant-flag t :default-value (nil)) nil [1071 1111]) ("BARCODE_ENCODING_MASK" variable (:constant-flag t :default-value (nil)) nil [1113 1153]) ("BARCODE_NO_ASCII" variable (:constant-flag t :default-value (nil)) nil [1182 1222]) ("BARCODE_NO_CHECKSUM" variable (:constant-flag t :default-value (nil)) nil [1252 1292]) ("BARCODE_OUTPUT_MASK" variable (:constant-flag t :default-value (nil)) nil [1327 1367]) ("BARCODE_OUT_EPS" variable (:constant-flag t :default-value (nil)) nil [1393 1433]) ("BARCODE_OUT_PS" variable (:constant-flag t :default-value (nil)) nil [1434 1474]) ("BARCODE_OUT_PCL" variable (:constant-flag t :default-value (nil)) nil [1475 1515]) ("BARCODE_OUT_PCL_III" variable (:constant-flag t :default-value (nil)) nil [1588 1628]) ("BARCODE_OUT_NOHEADERS" variable (:constant-flag t :default-value (nil)) nil [1629 1669]) ("" type (:members (("BARCODE_ANY" variable (:constant-flag t :default-value (1767 1768) :type "int") (reparse-symbol enumsubparts) [1753 1768]) ("BARCODE_EAN" variable (:constant-flag t :type "int") (reparse-symbol enumsubparts) [1800 1812]) ("BARCODE_UPC" variable (:constant-flag t :type "int") (reparse-symbol enumsubparts) [1817 1829]) ("BARCODE_ISBN" variable (:constant-flag t :type "int") (reparse-symbol enumsubparts) [1867 1880]) ("BARCODE_39" variable (:constant-flag t :type "int") (reparse-symbol enumsubparts) [1924 1935]) ("BARCODE_128" variable (:constant-flag t :type "int") (reparse-symbol enumsubparts) [1962 1974]) ("BARCODE_128C" variable (:constant-flag t :type "int") (reparse-symbol enumsubparts) [2024 2037]) ("BARCODE_128B" variable (:constant-flag t :type "int") (reparse-symbol enumsubparts) [2089 2102]) ("BARCODE_I25" variable (:constant-flag t :type "int") (reparse-symbol enumsubparts) [2150 2162]) ("BARCODE_128RAW" variable (:constant-flag t :type "int") (reparse-symbol enumsubparts) [2213 2228]) ("BARCODE_CBR" variable (:constant-flag t :type "int") (reparse-symbol enumsubparts) [2280 2292]) ("BARCODE_MSI" variable (:constant-flag t :type "int") (reparse-symbol enumsubparts) [2342 2354]) ("BARCODE_PLS" variable (:constant-flag t :type "int") (reparse-symbol enumsubparts) [2400 2412]) ("BARCODE_93" variable (:constant-flag t :type "int") (reparse-symbol enumsubparts) [2462 2519])) :type "enum") nil [1742 2520]) ("qdom.h" include (:system-flag t) nil [2559 2576]) ("qfile.h" include (:system-flag t) nil [2577 2595]) ("qpainter.h" include (:system-flag t) nil [2596 2617]) ("qpicture.h" include (:system-flag t) nil [2618 2639]) ("qpixmap.h" include (:system-flag t) nil [2640 2660]) ("qsize.h" include (:system-flag t) nil [2661 2679]) ("tdelocale.h" include (:system-flag t) nil [2681 2701]) ("kstandarddirs.h" include (:system-flag t) nil [2702 2728]) ("Barkode::s_info" variable (:type ("QValueList" type (:type "class") nil nil)) nil [2730 2771]) ("Barkode::s_encoding" variable (:pointer 1 :default-value "NULL;" :type ("QStringList" type (:type "class") nil nil)) nil [2772 2814]) ("Barkode::s_haveGnuBarcode" variable (:default-value "false;" :type ("bool" type (:type "class") nil nil)) nil [2815 2858]) ("Barkode::s_havePdfEncode" variable (:default-value "false;" :type ("bool" type (:type "class") nil nil)) nil [2859 2902]) ("Barkode::s_haveTBarcode" variable (:default-value "false;" :type ("bool" type (:type "class") nil nil)) nil [2903 2946]) ("Barkode::s_haveTBarcode2" variable (:default-value "false;" :type ("bool" type (:type "class") nil nil)) nil [2947 2990]) ("Barkode::s_havePurePostscript" variable (:default-value "false;" :type ("bool" type (:type "class") nil nil)) nil [2991 3034]) ("Barkode" function (:constructor-flag t :parent "Barkode" :type ("Barkode" type "class")) nil [3036 3136]) ("Barkode" function (:constructor-flag t :parent "Barkode" :arguments (("barkode" variable (:constant-flag t :type ("Barkode" type (:type "class") nil nil)) (reparse-symbol arg-sub-list) [3156 3181])) :type ("Barkode" type "class")) nil [3138 3268]) ("Barkode" function (:destructor-flag t :parent "Barkode" :type "void") nil [3270 3337]) ("setTokenProvider" function (:parent "Barkode" :arguments (("token" variable (:pointer 1 :type ("TokenProvider" type (:type "class") nil nil)) (reparse-symbol arg-sub-list) [3371 3393])) :type "void") nil [3339 3418]) ("defaults" function (:parent "Barkode" :type "void") nil [3420 4097]) ("setData" function (:parent "Barkode" :arguments (("barkode" variable (:constant-flag t :type ("Barkode" type (:type "class") nil nil)) (reparse-symbol arg-sub-list) [4122 4147])) :type "void") nil [4099 5122]) ("==" function (:parent "Barkode" :arguments (("barkode" variable (:constant-flag t :type ("Barkode" type (:type "class") nil nil)) (reparse-symbol arg-sub-list) [5230 5255])) :type ("bool" type (:type "class") nil nil)) nil [5204 5723]) ("picture" function (:parent "Barkode" :constant-flag t :type ("QPicture" type (:type "class") nil nil)) nil [5725 5973]) ("drawInvalid" function (:parent "Barkode" :arguments (("painter" variable (:type ("QPainter" type (:type "class") nil nil)) (reparse-symbol arg-sub-list) [6002 6021]) ("x" variable (:type "int") (reparse-symbol arg-sub-list) [6022 6028]) ("y" variable (:type "int") (reparse-symbol arg-sub-list) [6029 6036])) :type "void") nil [5975 6395]) ("size" function (:parent "Barkode" :constant-flag t :type ("QSize" type (:type "class") nil nil)) nil [6397 6490]) ("pixmap" function (:parent "Barkode" :constant-flag t :arguments (("scalex" variable (:type "double") (reparse-symbol arg-sub-list) [6523 6537]) ("scaley" variable (:type "double") (reparse-symbol arg-sub-list) [6538 6553])) :type ("QPixmap" type (:type "class") nil nil)) nil [6492 6898]) ("parsedValue" function (:parent "Barkode" :constant-flag t :type ("QString" type (:type "class") nil nil)) nil [6900 8603]) ("engineForType" function (:parent "Barkode" :arguments (("type" variable (:constant-flag t :type ("QString" type (:type "class") nil nil)) (reparse-symbol arg-sub-list) [8637 8659])) :type ("EEngine" type (:type "class") nil nil)) nil [8605 8877]) ("updateEngine" function (:parent "Barkode" :type "void") nil [8879 9790]) ("drawBarcode" function (:parent "Barkode" :arguments (("painter" variable (:type ("QPainter" type (:type "class") nil nil)) (reparse-symbol arg-sub-list) [9820 9839]) ("x" variable (:type "int") (reparse-symbol arg-sub-list) [9840 9846]) ("y" variable (:type "int") (reparse-symbol arg-sub-list) [9847 9854])) :type "void") nil [9792 9927]) ("update" function (:parent "Barkode" :arguments (("device" variable (:pointer 1 :constant-flag t :type ("QPaintDevice" type (:type "class") nil nil)) (reparse-symbol arg-sub-list) [9951 9979])) :type "void") nil [9929 10038]) ("isValid" function (:parent "Barkode" :type ("bool" type (:type "class") nil nil)) nil [10224 10277]) ("background" function (:parent "Barkode" :constant-flag t :type ("QColor" type (:type "class") nil nil)) nil [10279 10350]) ("foreground" function (:parent "Barkode" :constant-flag t :type ("QColor" type (:type "class") nil nil)) nil [10352 10423]) ("textColor" function (:parent "Barkode" :constant-flag t :type ("QColor" type (:type "class") nil nil)) nil [10425 10494]) ("fontsize" function (:parent "Barkode" :constant-flag t :type "unsigned int") nil [10496 10567]) ("quietZone" function (:parent "Barkode" :constant-flag t :type "unsigned int") nil [10569 10642]) ("barHeight" function (:parent "Barkode" :constant-flag t :type "unsigned int") nil [10644 10718]) ("type" function (:parent "Barkode" :constant-flag t :type ("QString" type (:type "class") nil nil)) nil [10720 10780]) ("value" function (:parent "Barkode" :constant-flag t :type ("QString" type (:type "class") nil nil)) nil [10782 10844]) ("index" function (:parent "Barkode" :constant-flag t :type "unsigned int") nil [10846 10911]) ("sequenceEnabled" function (:parent "Barkode" :constant-flag t :type ("bool" type (:type "class") nil nil)) nil [10913 10983]) ("sequenceMode" function (:parent "Barkode" :constant-flag t :type ("ESequence" type (:type "class") nil nil)) nil [10985 11058]) ("sequenceStart" function (:parent "Barkode" :constant-flag t :type "int") nil [11060 11133]) ("sequenceStep" function (:parent "Barkode" :constant-flag t :type "int") nil [11135 11206]) ("databaseMode" function (:parent "Barkode" :constant-flag t :type ("QString" type (:type "class") nil nil)) nil [11208 11285]) ("textVisible" function (:parent "Barkode" :constant-flag t :type ("bool" type (:type "class") nil nil)) nil [11287 11357]) ("rotation" function (:parent "Barkode" :constant-flag t :type "int") nil [11359 11421]) ("scaling" function (:parent "Barkode" :constant-flag t :type "double") nil [11423 11486]) ("cut" function (:parent "Barkode" :constant-flag t :type "double") nil [11488 11543]) ("datamatrixSize" function (:parent "Barkode" :constant-flag t :type "int") nil [11545 11620]) ("setBackground" function (:parent "Barkode" :arguments (("c" variable (:constant-flag t :type ("QColor" type (:type "class") nil nil)) (reparse-symbol arg-sub-list) [11835 11853])) :type "void") nil [11806 11879]) ("setForeground" function (:parent "Barkode" :arguments (("c" variable (:constant-flag t :type ("QColor" type (:type "class") nil nil)) (reparse-symbol arg-sub-list) [11910 11928])) :type "void") nil [11881 11954]) ("setTextColor" function (:parent "Barkode" :arguments (("c" variable (:constant-flag t :type ("QColor" type (:type "class") nil nil)) (reparse-symbol arg-sub-list) [11984 12002])) :type "void") nil [11956 12027]) ("setFontsize" function (:parent "Barkode" :arguments (("f" variable (:type "unsigned int") (reparse-symbol arg-sub-list) [12056 12072])) :type "void") nil [12029 12096]) ("setQuietZone" function (:parent "Barkode" :arguments (("q" variable (:constant-flag t :type "unsigned int") (reparse-symbol arg-sub-list) [12126 12148])) :type "void") nil [12098 12173]) ("setBarHeight" function (:parent "Barkode" :arguments (("h" variable (:type "unsigned int") (reparse-symbol arg-sub-list) [12203 12219])) :type "void") nil [12175 12245]) ("setType" function (:parent "Barkode" :arguments (("type" variable (:constant-flag t :type ("QString" type (:type "class") nil nil)) (reparse-symbol arg-sub-list) [12270 12292])) :type "void") nil [12247 12343]) ("setValue" function (:parent "Barkode" :arguments (("value" variable (:constant-flag t :type ("QString" type (:type "class") nil nil)) (reparse-symbol arg-sub-list) [12369 12392])) :type "void") nil [12345 12417]) ("setIndex" function (:parent "Barkode" :arguments (("i" variable (:constant-flag t :type "unsigned int") (reparse-symbol arg-sub-list) [12443 12465])) :type "void") nil [12419 12486]) ("setSequenceEnabled" function (:parent "Barkode" :arguments (("b" variable (:type ("bool" type (:type "class") nil nil)) (reparse-symbol arg-sub-list) [12522 12530])) :type "void") nil [12488 12554]) ("setSequenceMode" function (:parent "Barkode" :arguments (("e" variable (:type ("ESequence" type (:type "class") nil nil)) (reparse-symbol arg-sub-list) [12587 12600])) :type "void") nil [12556 12625]) ("setSequenceStart" function (:parent "Barkode" :arguments (("s" variable (:type "int") (reparse-symbol arg-sub-list) [12659 12666])) :type "void") nil [12627 12696]) ("setSequenceStep" function (:parent "Barkode" :arguments (("s" variable (:type "int") (reparse-symbol arg-sub-list) [12729 12736])) :type "void") nil [12698 12765]) ("setDatabaseMode" function (:parent "Barkode" :arguments (("mode" variable (:constant-flag t :type ("QString" type (:type "class") nil nil)) (reparse-symbol arg-sub-list) [12798 12820])) :type "void") nil [12767 12852]) ("setTextVisible" function (:parent "Barkode" :arguments (("b" variable (:constant-flag t :type ("bool" type (:type "class") nil nil)) (reparse-symbol arg-sub-list) [12884 12898])) :type "void") nil [12854 12926]) ("setRotation" function (:parent "Barkode" :arguments (("r" variable (:constant-flag t :type "int") (reparse-symbol arg-sub-list) [12955 12968])) :type "void") nil [12928 12992]) ("setScaling" function (:parent "Barkode" :arguments (("d" variable (:constant-flag t :type "double") (reparse-symbol arg-sub-list) [13020 13036])) :type "void") nil [12994 13059]) ("setCut" function (:parent "Barkode" :arguments (("c" variable (:constant-flag t :type "double") (reparse-symbol arg-sub-list) [13083 13099])) :type "void") nil [13061 13118]) ("setDatamatrixSize" function (:parent "Barkode" :arguments (("s" variable (:type "int") (reparse-symbol arg-sub-list) [13153 13160])) :type "void") nil [13120 13191]) ("hasFeature" function (:parent "Barkode" :arguments (("type" variable (:constant-flag t :type ("QString" type (:type "class") nil nil)) (reparse-symbol arg-sub-list) [13371 13392]) ("feature" variable (:type "unsigned int") (reparse-symbol arg-sub-list) [13393 13415])) :type ("bool" type (:type "class") nil nil)) nil [13345 13603]) ("internalType" function (:parent "Barkode" :arguments (("type" variable (:constant-flag t :type ("QString" type (:type "class") nil nil)) (reparse-symbol arg-sub-list) [13632 13654])) :type "int") nil [13605 13819]) ("encodingTypes" function (:pointer 1 :parent "Barkode" :constant-flag t :type ("QStringList" type (:type "class") nil nil)) nil [13821 14107]) ("typeFromName" function (:pointer 1 :parent "Barkode" :constant-flag t :arguments (("name" variable (:constant-flag t :type ("QString" type (:type "class") nil nil)) (reparse-symbol arg-sub-list) [14144 14166])) :type "char") nil [14109 14326]) ("nameFromType" function (:pointer 1 :parent "Barkode" :constant-flag t :arguments (("type" variable (:constant-flag t :type ("QString" type (:type "class") nil nil)) (reparse-symbol arg-sub-list) [14363 14385])) :type "char") nil [14328 14545]) ("validatorFromType" function (:pointer 1 :parent "Barkode" :arguments (("type" variable (:constant-flag t :type ("QString" type (:type "class") nil nil)) (reparse-symbol arg-sub-list) [14584 14606])) :type ("QString" type (:type "class") nil nil)) nil [14547 14762]) ("validatorNotFromType" function (:pointer 1 :parent "Barkode" :arguments (("type" variable (:constant-flag t :type ("QString" type (:type "class") nil nil)) (reparse-symbol arg-sub-list) [14804 14826])) :type ("QString" type (:type "class") nil nil)) nil [14764 14985]) ("createInfo" function (:parent "Barkode" :arguments (("xml" variable (:pointer 1 :constant-flag t :type "char") (reparse-symbol arg-sub-list) [15021 15037]) ("name" variable (:constant-flag t :type ("QString" type (:type "class") nil nil)) (reparse-symbol arg-sub-list) [15038 15059]) ("engine" variable (:constant-flag t :type ("EEngine" type (:type "class") nil nil)) (reparse-symbol arg-sub-list) [15060 15081]) ("features" variable (:constant-flag t :type "unsigned int") (reparse-symbol arg-sub-list) [15115 15143]) ("internal" variable (:constant-flag t :type "int") (reparse-symbol arg-sub-list) [15144 15164])) :type ("tBarcodeInfo" type (:type "class") nil nil)) nil [14987 16059]) ("initInfo" function (:parent "Barkode" :type "void") nil [16061 35789]) ("initValidators" function (:parent "Barkode" :type "void") nil [35791 37608]))
- :file "barkode.cpp"
- :pointmax 37610
- )
- (semanticdb-table "purepostscript.cpp"
- :major-mode 'c++-mode
- :tags '(("purepostscript.h" include nil nil [1029 1056]) ("barkode.h" include nil nil [1057 1077]) ("stdlib.h" include (:system-flag t) nil [1079 1098]) ("qdom.h" include (:system-flag t) nil [1100 1117]) ("qfile.h" include (:system-flag t) nil [1118 1136]) ("qtextstream.h" include (:system-flag t) nil [1137 1161]) ("kstandarddirs.h" include (:system-flag t) nil [1163 1189]) ("tdetempfile.h" include (:system-flag t) nil [1190 1212]) ("MAX_LINE_LENGTH" variable (:constant-flag t :default-value (nil)) nil [1214 1241]) ("BEGIN_TEMPLATE" variable (:constant-flag t :default-value (nil)) nil [1242 1285]) ("END_TEMPLATE" variable (:constant-flag t :default-value (nil)) nil [1286 1325]) ("PurePostscriptBarcode::s_path" variable (:default-value "QString::null;" :type ("QString" type (:type "class") nil nil)) nil [1327 1381]) ("PurePostscriptOptions" function (:constructor-flag t :parent "PurePostscriptOptions" :type ("PurePostscriptOptions" type "class")) nil [1383 1478]) ("defaults" function (:parent "PurePostscriptOptions" :type "void") nil [1718 1781]) ("load" function (:parent "PurePostscriptOptions" :arguments (("tag" variable (:pointer 1 :constant-flag t :type ("QDomElement" type (:type "class") nil nil)) (reparse-symbol arg-sub-list) [1817 1841])) :type "void") nil [1783 1910]) ("save" function (:parent "PurePostscriptOptions" :arguments (("tag" variable (:pointer 1 :type ("QDomElement" type (:type "class") nil nil)) (reparse-symbol arg-sub-list) [1946 1964])) :type "void") nil [1912 2021]) ("PurePostscriptBarcode" function (:constructor-flag t :parent "PurePostscriptBarcode" :type ("PurePostscriptBarcode" type "class")) nil [2023 2746]) ("PurePostscriptBarcode" function (:destructor-flag t :parent "PurePostscriptBarcode" :type "void") nil [2748 2799]) ("init" function (:parent "PurePostscriptBarcode" :type "void") nil [2801 3235]) ("START_TOKEN" variable (:constant-flag t :default-value (nil)) nil [3237 3263]) ("BEGIN_ENCODER" variable (:constant-flag t :default-value (nil)) nil [3264 3302]) ("DESCRIPTION" variable (:constant-flag t :default-value (nil)) nil [3303 3331]) ("EXAMPLE" variable (:constant-flag t :default-value (nil)) nil [3332 3356]) ("initInfo" function (:parent "PurePostscriptBarcode" :arguments (("info" variable (:pointer 1 :type ("TBarcodeInfoList" type (:type "class") nil nil)) (reparse-symbol arg-sub-list) [3396 3420])) :type "void") nil [3358 5039]) ("hasPurePostscriptBarcode" function (:parent "PurePostscriptBarcode" :type ("bool" type (:type "class") nil nil)) nil [5041 5128]) ("createProgram" function (:parent "PurePostscriptBarcode" :arguments (("prg" variable (:type ("QString" type (:type "class") nil nil)) (reparse-symbol arg-sub-list) [5173 5188])) :type "void") nil [5130 6215]) ("bbox" function (:parent "PurePostscriptBarcode" :arguments (("postscript" variable (:pointer 1 :constant-flag t :type "char") (reparse-symbol arg-sub-list) [6252 6275]) ("postscript_size" variable (:type "long") (reparse-symbol arg-sub-list) [6276 6298])) :type ("QRect" type (:type "class") nil nil)) nil [6217 6895]) ("createPostscript" function (:parent "PurePostscriptBarcode" :arguments (("postscript" variable (:pointer 2 :type "char") (reparse-symbol arg-sub-list) [6943 6961]) ("postscript_size" variable (:pointer 1 :type "long") (reparse-symbol arg-sub-list) [6962 6985])) :type ("bool" type (:type "class") nil nil)) nil [6897 7316]))
- :file "purepostscript.cpp"
- :pointmax 7317
- )
- (semanticdb-table "barkode.h"
- :major-mode 'c-mode
- :tags '(("BARKODE_H" variable (:constant-flag t) nil [889 910]) ("qcolor.h" include (:system-flag t) nil [909 928]) ("qstring.h" include (:system-flag t) nil [929 949]) ("barkodeengine.h" include nil nil [951 977]) ("ESequence" type (:typedef (nil type (:members (("NUM" variable (:constant-flag t :type "int") (reparse-symbol enumsubparts) [1045 1049]) ("ALPHA" variable (:constant-flag t :type "int") (reparse-symbol enumsubparts) [1050 1056]) ("ALPHANUM" variable (:constant-flag t :type "int") (reparse-symbol enumsubparts) [1057 1067])) :type "enum") nil nil) :type "typedef") nil [1030 1078]) ("" type (:members (("NOCUT" variable (:constant-flag t :default-value (1193 1200) :type "int") (reparse-symbol enumsubparts) [1185 1200]) ("MULTILINE" variable (:constant-flag t :default-value (1214 1221) :type "int") (reparse-symbol enumsubparts) [1202 1221]) ("NOTEXT" variable (:constant-flag t :default-value (1232 1239) :type "int") (reparse-symbol enumsubparts) [1223 1239]) ("NOSCALE" variable (:constant-flag t :default-value (1251 1258) :type "int") (reparse-symbol enumsubparts) [1241 1258]) ("PDF417BARCODE" variable (:constant-flag t :default-value (1350 1357) :type "int") (reparse-symbol enumsubparts) [1334 1357]) ("TBARCODEADV" variable (:constant-flag t :default-value (1373 1380) :type "int") (reparse-symbol enumsubparts) [1359 1380]) ("PUREADV" variable (:constant-flag t :default-value (1392 1399) :type "int") (reparse-symbol enumsubparts) [1382 1399]) ("DATAMATRIX" variable (:constant-flag t :default-value (1414 1421) :type "int") (reparse-symbol enumsubparts) [1401 1421]) ("COLORED" variable (:constant-flag t :default-value (1441 1448) :type "int") (reparse-symbol enumsubparts) [1431 1448]) ("POSTNETCHECK" variable (:constant-flag t :default-value (1521 1528) :type "int") (reparse-symbol enumsubparts) [1506 1528]) ("CODE128CHECK" variable (:constant-flag t :default-value (1545 1552) :type "int") (reparse-symbol enumsubparts) [1530 1552]) ("EAN8CHECK" variable (:constant-flag t :default-value (1566 1573) :type "int") (reparse-symbol enumsubparts) [1554 1573]) ("EAN13CHECK" variable (:constant-flag t :default-value (1588 1595) :type "int") (reparse-symbol enumsubparts) [1575 1595]) ("UPCACHECK" variable (:constant-flag t :default-value (1616 1623) :type "int") (reparse-symbol enumsubparts) [1604 1623]) ("UPCECHECK" variable (:constant-flag t :default-value (1637 1644) :type "int") (reparse-symbol enumsubparts) [1625 1644]) ("MODULOALLCHECK" variable (:constant-flag t :default-value (1663 1670) :type "int") (reparse-symbol enumsubparts) [1646 1670]) ("MODULO10CHECK" variable (:constant-flag t :default-value (1688 1695) :type "int") (reparse-symbol enumsubparts) [1672 1695]) ("BARCODE2D" variable (:constant-flag t :default-value (1764 1771) :type "int") (reparse-symbol enumsubparts) [1751 1771]) ("MULTILINE" variable (:constant-flag t :type "int") (reparse-symbol enumsubparts) [1772 1783]) ("NOTEXT" variable (:constant-flag t :type "int") (reparse-symbol enumsubparts) [1784 1792])) :type "enum") nil [1178 1793]) ("tBarcodeInfo" type (:members (("xml" variable (:type ("QString" type (:type "class") nil nil)) (reparse-symbol classsubparts) [2053 2065]) ("name" variable (:type ("QString" type (:type "class") nil nil)) (reparse-symbol classsubparts) [2125 2138]) ("engine" variable (:type ("EEngine" type (:type "class") nil nil)) (reparse-symbol classsubparts) [2186 2201]) ("features" variable (:type "unsigned int") (reparse-symbol classsubparts) [2270 2292]) ("internal" variable (:type "int") (reparse-symbol classsubparts) [2363 2376]) ("validator" variable (:type ("QString" type (:type "class") nil nil)) (reparse-symbol classsubparts) [2468 2486]) ("validatorNot" variable (:type ("QString" type (:type "class") nil nil)) (reparse-symbol classsubparts) [2491 2512])) :type "struct") nil [1888 2515]) ("TBarcodeInfoList" type (:typedef ("QValueList" type (:type "class") nil nil) :superclasses "QValueList" :type "typedef") nil [2517 2567]) ("BarkodeEngine" type (:type "class") nil [2569 2589]) ("QPainter" type (:type "class") nil [2590 2605]) ("QPicture" type (:type "class") nil [2606 2621]) ("QSize" type (:type "class") nil [2622 2634]) ("QPaintDevice" type (:type "class") nil [2635 2654]) ("TokenProvider" type (:type "class") nil [2655 2675]) ("Barkode" type (:members (("public" label nil (reparse-symbol classsubparts) [2694 2701]) ("Barkode" function (:prototype-flag t :constructor-flag t :type ("Barkode" type "class")) (reparse-symbol classsubparts) [2706 2716]) ("Barkode" function (:prototype-flag t :constructor-flag t :arguments (("barkode" variable (:constant-flag t :type ("Barkode" type (:type "class") nil nil)) (reparse-symbol arg-sub-list) [2730 2755])) :type ("Barkode" type "class")) (reparse-symbol classsubparts) [2721 2756]) ("Barkode" function (:prototype-flag t :destructor-flag t :typemodifiers ("virtual") :type "void") (reparse-symbol classsubparts) [2761 2780]) ("setTokenProvider" function (:prototype-flag t :arguments (("token" variable (:pointer 1 :type ("TokenProvider" type (:type "class") nil nil)) (reparse-symbol arg-sub-list) [2869 2891])) :type "void") (reparse-symbol classsubparts) [2846 2892]) ("defaults" function (:prototype-flag t :type "void") (reparse-symbol classsubparts) [2939 2955]) ("update" function (:prototype-flag t :arguments (("device" variable (:pointer 1 :constant-flag t :type ("QPaintDevice" type (:type "class") nil nil)) (reparse-symbol arg-sub-list) [3079 3107])) :type "void") (reparse-symbol classsubparts) [3066 3108]) ("parsedValue" function (:prototype-flag t :constant-flag t :type ("QString" type (:type "class") nil nil)) (reparse-symbol classsubparts) [3217 3245]) ("pixmap" function (:prototype-flag t :constant-flag t :arguments (("scalex" variable (:default-value "1.0" :type "double") (reparse-symbol arg-sub-list) [3274 3293]) ("scaley" variable (:default-value "1.0" :type "double") (reparse-symbol arg-sub-list) [3295 3314])) :type ("QPixmap" type (:type "class") nil nil)) (reparse-symbol classsubparts) [3252 3317]) ("picture" function (:prototype-flag t :constant-flag t :type ("QPicture" type (:type "class") nil nil)) (reparse-symbol classsubparts) [3322 3347]) ("size" function (:prototype-flag t :constant-flag t :type ("QSize" type (:type "class") nil nil)) (reparse-symbol classsubparts) [3352 3377]) ("isValid" function (:prototype-flag t :type ("bool" type (:type "class") nil nil)) (reparse-symbol classsubparts) [3382 3403]) ("background" function (:prototype-flag t :constant-flag t :type ("QColor" type (:type "class") nil nil)) (reparse-symbol classsubparts) [3409 3443]) ("foreground" function (:prototype-flag t :constant-flag t :type ("QColor" type (:type "class") nil nil)) (reparse-symbol classsubparts) [3448 3482]) ("textColor" function (:prototype-flag t :constant-flag t :type ("QColor" type (:type "class") nil nil)) (reparse-symbol classsubparts) [3487 3520]) ("fontsize" function (:prototype-flag t :constant-flag t :type "unsigned int") (reparse-symbol classsubparts) [3525 3561]) ("quietZone" function (:prototype-flag t :constant-flag t :type "unsigned int") (reparse-symbol classsubparts) [3566 3603]) ("barHeight" function (:prototype-flag t :constant-flag t :type "unsigned int") (reparse-symbol classsubparts) [3608 3645]) ("type" function (:prototype-flag t :constant-flag t :type ("QString" type (:type "class") nil nil)) (reparse-symbol classsubparts) [3650 3679]) ("value" function (:prototype-flag t :constant-flag t :type ("QString" type (:type "class") nil nil)) (reparse-symbol classsubparts) [3684 3714]) ("sequenceEnabled" function (:prototype-flag t :constant-flag t :type ("bool" type (:type "class") nil nil)) (reparse-symbol classsubparts) [3719 3754]) ("sequenceMode" function (:prototype-flag t :constant-flag t :type ("ESequence" type (:type "class") nil nil)) (reparse-symbol classsubparts) [3759 3796]) ("sequenceStart" function (:prototype-flag t :constant-flag t :type "int") (reparse-symbol classsubparts) [3801 3833]) ("sequenceStep" function (:prototype-flag t :constant-flag t :type "int") (reparse-symbol classsubparts) [3838 3869]) ("databaseMode" function (:prototype-flag t :constant-flag t :type ("QString" type (:type "class") nil nil)) (reparse-symbol classsubparts) [3874 3911]) ("textVisible" function (:prototype-flag t :constant-flag t :type ("bool" type (:type "class") nil nil)) (reparse-symbol classsubparts) [3916 3947]) ("rotation" function (:prototype-flag t :constant-flag t :type "int") (reparse-symbol classsubparts) [3952 3979]) ("scaling" function (:prototype-flag t :constant-flag t :type "double") (reparse-symbol classsubparts) [3984 4013]) ("index" function (:prototype-flag t :constant-flag t :type "unsigned int") (reparse-symbol classsubparts) [4018 4051]) ("cut" function (:prototype-flag t :constant-flag t :type "double") (reparse-symbol classsubparts) [4056 4081]) ("datamatrixSize" function (:prototype-flag t :constant-flag t :type "int") (reparse-symbol classsubparts) [4086 4119]) ("setBackground" function (:prototype-flag t :arguments (("c" variable (:constant-flag t :type ("QColor" type (:type "class") nil nil)) (reparse-symbol arg-sub-list) [4149 4167])) :type "void") (reparse-symbol classsubparts) [4129 4168]) ("setForeground" function (:prototype-flag t :arguments (("c" variable (:constant-flag t :type ("QColor" type (:type "class") nil nil)) (reparse-symbol arg-sub-list) [4193 4211])) :type "void") (reparse-symbol classsubparts) [4173 4212]) ("setTextColor" function (:prototype-flag t :arguments (("c" variable (:constant-flag t :type ("QColor" type (:type "class") nil nil)) (reparse-symbol arg-sub-list) [4236 4254])) :type "void") (reparse-symbol classsubparts) [4217 4255]) ("setFontsize" function (:prototype-flag t :arguments (("f" variable (:type "unsigned int") (reparse-symbol arg-sub-list) [4279 4295])) :type "void") (reparse-symbol classsubparts) [4260 4296]) ("setQuietZone" function (:prototype-flag t :arguments (("q" variable (:type "unsigned int") (reparse-symbol arg-sub-list) [4320 4336])) :type "void") (reparse-symbol classsubparts) [4301 4337]) ("setBarHeight" function (:prototype-flag t :arguments (("h" variable (:type "unsigned int") (reparse-symbol arg-sub-list) [4361 4377])) :type "void") (reparse-symbol classsubparts) [4342 4378]) ("setType" function (:prototype-flag t :arguments (("type" variable (:constant-flag t :type ("QString" type (:type "class") nil nil)) (reparse-symbol arg-sub-list) [4397 4419])) :type "void") (reparse-symbol classsubparts) [4383 4420]) ("setValue" function (:prototype-flag t :arguments (("value" variable (:constant-flag t :type ("QString" type (:type "class") nil nil)) (reparse-symbol arg-sub-list) [4440 4463])) :type "void") (reparse-symbol classsubparts) [4425 4464]) ("setTextVisible" function (:prototype-flag t :arguments (("b" variable (:constant-flag t :type ("bool" type (:type "class") nil nil)) (reparse-symbol arg-sub-list) [4490 4504])) :type "void") (reparse-symbol classsubparts) [4469 4505]) ("setIndex" function (:prototype-flag t :arguments (("i" variable (:type "unsigned int") (reparse-symbol arg-sub-list) [4595 4611])) :type "void") (reparse-symbol classsubparts) [4580 4612]) ("setSequenceEnabled" function (:prototype-flag t :arguments (("b" variable (:type ("bool" type (:type "class") nil nil)) (reparse-symbol arg-sub-list) [4642 4650])) :type "void") (reparse-symbol classsubparts) [4617 4651]) ("setSequenceMode" function (:prototype-flag t :arguments (("e" variable (:type ("ESequence" type (:type "class") nil nil)) (reparse-symbol arg-sub-list) [4678 4691])) :type "void") (reparse-symbol classsubparts) [4656 4692]) ("setSequenceStart" function (:prototype-flag t :arguments (("s" variable (:type "int") (reparse-symbol arg-sub-list) [4720 4727])) :type "void") (reparse-symbol classsubparts) [4697 4728]) ("setSequenceStep" function (:prototype-flag t :arguments (("s" variable (:type "int") (reparse-symbol arg-sub-list) [4755 4762])) :type "void") (reparse-symbol classsubparts) [4733 4763]) ("setDatabaseMode" function (:prototype-flag t :arguments (("mode" variable (:constant-flag t :type ("QString" type (:type "class") nil nil)) (reparse-symbol arg-sub-list) [4790 4812])) :type "void") (reparse-symbol classsubparts) [4768 4813]) ("setRotation" function (:prototype-flag t :arguments (("r" variable (:constant-flag t :type "int") (reparse-symbol arg-sub-list) [4836 4849])) :type "void") (reparse-symbol classsubparts) [4818 4850]) ("setScaling" function (:prototype-flag t :arguments (("d" variable (:constant-flag t :type "double") (reparse-symbol arg-sub-list) [4872 4888])) :type "void") (reparse-symbol classsubparts) [4855 4889]) ("setCut" function (:prototype-flag t :arguments (("c" variable (:constant-flag t :type "double") (reparse-symbol arg-sub-list) [4907 4923])) :type "void") (reparse-symbol classsubparts) [4894 4924]) ("setDatamatrixSize" function (:prototype-flag t :arguments (("s" variable (:type "int") (reparse-symbol arg-sub-list) [4953 4960])) :type "void") (reparse-symbol classsubparts) [4929 4961]) ("setData" function (:prototype-flag t :arguments (("barkode" variable (:constant-flag t :type ("Barkode" type (:type "class") nil nil)) (reparse-symbol arg-sub-list) [5067 5092])) :type "void") (reparse-symbol classsubparts) [5053 5093]) ("==" function (:prototype-flag t :arguments (("barkode" variable (:constant-flag t :type ("Barkode" type (:type "class") nil nil)) (reparse-symbol arg-sub-list) [5162 5187])) :type ("bool" type (:type "class") nil nil)) (reparse-symbol classsubparts) [5145 5194]) ("engine" function (:prototype-flag t :pointer 1 :typemodifiers ("inline") :type ("BarkodeEngine" type (:type "class") nil nil)) (reparse-symbol classsubparts) [5200 5231]) ("engine" function (:prototype-flag t :pointer 1 :typemodifiers ("inline") :constant-flag t :type ("BarkodeEngine" type (:type "class") nil nil)) (reparse-symbol classsubparts) [5236 5279]) ("hasFeature" function (:prototype-flag t :typemodifiers ("static") :arguments (("type" variable (:constant-flag t :type ("QString" type (:type "class") nil nil)) (reparse-symbol arg-sub-list) [5430 5451]) ("feature" variable (:type "unsigned int") (reparse-symbol arg-sub-list) [5452 5474])) :type ("bool" type (:type "class") nil nil)) (reparse-symbol classsubparts) [5406 5475]) ("internalType" function (:prototype-flag t :typemodifiers ("static") :arguments (("type" variable (:constant-flag t :type ("QString" type (:type "class") nil nil)) (reparse-symbol arg-sub-list) [5582 5604])) :type "int") (reparse-symbol classsubparts) [5557 5605]) ("encodingTypes" function (:prototype-flag t :pointer 1 :typemodifiers ("static") :constant-flag t :type ("QStringList" type (:type "class") nil nil)) (reparse-symbol classsubparts) [5710 5752]) ("typeFromName" function (:prototype-flag t :pointer 1 :typemodifiers ("static") :constant-flag t :arguments (("name" variable (:constant-flag t :type ("QString" type (:type "class") nil nil)) (reparse-symbol arg-sub-list) [5888 5910])) :type "char") (reparse-symbol classsubparts) [5855 5911]) ("nameFromType" function (:prototype-flag t :pointer 1 :typemodifiers ("static") :constant-flag t :arguments (("type" variable (:constant-flag t :type ("QString" type (:type "class") nil nil)) (reparse-symbol arg-sub-list) [6049 6071])) :type "char") (reparse-symbol classsubparts) [6016 6072]) ("validatorFromType" function (:prototype-flag t :pointer 1 :typemodifiers ("static") :arguments (("type" variable (:constant-flag t :type ("QString" type (:type "class") nil nil)) (reparse-symbol arg-sub-list) [6113 6135])) :type ("QString" type (:type "class") nil nil)) (reparse-symbol classsubparts) [6078 6136]) ("validatorNotFromType" function (:prototype-flag t :pointer 1 :typemodifiers ("static") :arguments (("type" variable (:constant-flag t :type ("QString" type (:type "class") nil nil)) (reparse-symbol arg-sub-list) [6179 6201])) :type ("QString" type (:type "class") nil nil)) (reparse-symbol classsubparts) [6141 6202]) ("engineForType" function (:prototype-flag t :typemodifiers ("static") :arguments (("type" variable (:constant-flag t :type ("QString" type (:type "class") nil nil)) (reparse-symbol arg-sub-list) [6313 6335])) :type ("EEngine" type (:type "class") nil nil)) (reparse-symbol classsubparts) [6283 6336]) ("drawInvalid" function (:prototype-flag t :arguments (("painter" variable (:type ("QPainter" type (:type "class") nil nil)) (reparse-symbol arg-sub-list) [6432 6451]) ("x" variable (:default-value "0" :type "int") (reparse-symbol arg-sub-list) [6452 6461]) ("y" variable (:default-value "0" :type "int") (reparse-symbol arg-sub-list) [6463 6472])) :type "void") (reparse-symbol classsubparts) [6414 6475]) ("haveBarcode" function (:typemodifiers ("static") :type ("bool" type (:type "class") nil nil)) (reparse-symbol classsubparts) [6561 6721]) ("haveGNUBarcode" function (:typemodifiers ("static") :type ("bool" type (:type "class") nil nil)) (reparse-symbol classsubparts) [6726 6824]) ("haveTBarcode" function (:typemodifiers ("static") :type ("bool" type (:type "class") nil nil)) (reparse-symbol classsubparts) [6829 6923]) ("haveTBarcode2" function (:typemodifiers ("static") :type ("bool" type (:type "class") nil nil)) (reparse-symbol classsubparts) [6928 7024]) ("havePDFBarcode" function (:typemodifiers ("static") :type ("bool" type (:type "class") nil nil)) (reparse-symbol classsubparts) [7029 7126]) ("havePurePostscriptBarcode" function (:typemodifiers ("static") :type ("bool" type (:type "class") nil nil)) (reparse-symbol classsubparts) [7131 7244]) ("createInfo" function (:prototype-flag t :typemodifiers ("static") :arguments (("xml" variable (:pointer 1 :constant-flag t :type "char") (reparse-symbol arg-sub-list) [7282 7298]) ("name" variable (:constant-flag t :type ("QString" type (:type "class") nil nil)) (reparse-symbol arg-sub-list) [7299 7320]) ("engine" variable (:constant-flag t :type ("EEngine" type (:type "class") nil nil)) (reparse-symbol arg-sub-list) [7321 7342]) ("features" variable (:constant-flag t :default-value "0" :type "unsigned int") (reparse-symbol arg-sub-list) [7380 7411]) ("internal" variable (:constant-flag t :default-value "0" :type "int") (reparse-symbol arg-sub-list) [7413 7435])) :type ("tBarcodeInfo" type (:type "class") nil nil)) (reparse-symbol classsubparts) [7250 7438]) ("protected" label nil (reparse-symbol classsubparts) [7441 7451]) ("drawBarcode" function (:prototype-flag t :arguments (("painter" variable (:type ("QPainter" type (:type "class") nil nil)) (reparse-symbol arg-sub-list) [7475 7494]) ("x" variable (:default-value "0" :type "int") (reparse-symbol arg-sub-list) [7495 7504]) ("y" variable (:default-value "0" :type "int") (reparse-symbol arg-sub-list) [7506 7515])) :type "void") (reparse-symbol classsubparts) [7456 7518]) ("private" label nil (reparse-symbol classsubparts) [7521 7529]) ("initInfo" function (:prototype-flag t :typemodifiers ("static") :type "void") (reparse-symbol classsubparts) [7534 7557]) ("initValidators" function (:prototype-flag t :typemodifiers ("static") :type "void") (reparse-symbol classsubparts) [7562 7591]) ("updateEngine" function (:prototype-flag t :type "void") (reparse-symbol classsubparts) [7597 7617]) ("protected" label nil (reparse-symbol classsubparts) [7620 7630]) ("m_engine" variable (:pointer 1 :type ("BarkodeEngine" type (:type "class") nil nil)) (reparse-symbol classsubparts) [7635 7659]) ("m_token" variable (:pointer 1 :type ("TokenProvider" type (:type "class") nil nil)) (reparse-symbol classsubparts) [7664 7687]) ("m_valid" variable (:type ("bool" type (:type "class") nil nil)) (reparse-symbol classsubparts) [7693 7706]) ("m_sequence" variable (:type ("bool" type (:type "class") nil nil)) (reparse-symbol classsubparts) [7711 7727]) ("m_esequence" variable (:type ("ESequence" type (:type "class") nil nil)) (reparse-symbol classsubparts) [7732 7754]) ("m_sequence_start" variable (:type "int") (reparse-symbol classsubparts) [7759 7780]) ("m_sequence_step" variable (:type "int") (reparse-symbol classsubparts) [7785 7805]) ("m_text_visible" variable (:type ("bool" type (:type "class") nil nil)) (reparse-symbol classsubparts) [7810 7830]) ("m_background" variable (:type ("QColor" type (:type "class") nil nil)) (reparse-symbol classsubparts) [7840 7860]) ("m_foreground" variable (:type ("QColor" type (:type "class") nil nil)) (reparse-symbol classsubparts) [7865 7885]) ("m_textcolor" variable (:type ("QColor" type (:type "class") nil nil)) (reparse-symbol classsubparts) [7890 7909]) ("m_quietzone" variable (:type "unsigned int") (reparse-symbol classsubparts) [7915 7940]) ("m_bar_height" variable (:type "unsigned int") (reparse-symbol classsubparts) [7945 7971]) ("m_fontsize" variable (:type "unsigned int") (reparse-symbol classsubparts) [7976 8000]) ("m_index" variable (:type "unsigned int") (reparse-symbol classsubparts) [8005 8026]) ("m_datamatrix_size" variable (:type "int") (reparse-symbol classsubparts) [8031 8053]) ("m_rotation" variable (:type "int") (reparse-symbol classsubparts) [8058 8073]) ("m_scaling" variable (:type "double") (reparse-symbol classsubparts) [8083 8100]) ("m_cut" variable (:type "double") (reparse-symbol classsubparts) [8105 8118]) ("m_type" variable (:type ("QString" type (:type "class") nil nil)) (reparse-symbol classsubparts) [8234 8249]) ("m_value" variable (:type ("QString" type (:type "class") nil nil)) (reparse-symbol classsubparts) [8254 8270]) ("m_database_mode" variable (:type ("QString" type (:type "class") nil nil)) (reparse-symbol classsubparts) [8275 8299]) ("s_info" variable (:typemodifiers ("static") :type ("TBarcodeInfoList" type (:type "class") nil nil)) (reparse-symbol classsubparts) [8309 8340]) ("s_encoding" variable (:pointer 1 :typemodifiers ("static") :type ("QStringList" type (:type "class") nil nil)) (reparse-symbol classsubparts) [8345 8376]) ("s_haveGnuBarcode" variable (:typemodifiers ("static") :type ("bool" type (:type "class") nil nil)) (reparse-symbol classsubparts) [8382 8411]) ("s_haveTBarcode" variable (:typemodifiers ("static") :type ("bool" type (:type "class") nil nil)) (reparse-symbol classsubparts) [8416 8443]) ("s_haveTBarcode2" variable (:typemodifiers ("static") :type ("bool" type (:type "class") nil nil)) (reparse-symbol classsubparts) [8448 8476]) ("s_havePdfEncode" variable (:typemodifiers ("static") :type ("bool" type (:type "class") nil nil)) (reparse-symbol classsubparts) [8481 8509]) ("s_havePurePostscript" variable (:typemodifiers ("static") :type ("bool" type (:type "class") nil nil)) (reparse-symbol classsubparts) [8514 8547])) :type "class") nil [2677 8550]) ("engine" function (:pointer 1 :parent "Barkode" :type ("BarkodeEngine" type (:type "class") nil nil)) nil [8552 8609]) ("engine" function (:pointer 1 :parent "Barkode" :constant-flag t :type ("BarkodeEngine" type (:type "class") nil nil)) nil [8611 8680]))
- :file "barkode.h"
- :pointmax 8704
- )
- (semanticdb-table "purepostscript.h"
- :major-mode 'c-mode
- :tags '(("PURE_POSTSCRIPT_H" variable (:constant-flag t) nil [1054 1082]) ("pixmapbarcode.h" include nil nil [1081 1107]) ("barkode.h" include nil nil [1108 1128]) ("qcstring.h" include (:system-flag t) nil [1130 1151]) ("PurePostscriptOptions" type (:superclasses ("BarkodeEngineOptions") :members (("public" label nil (reparse-symbol classsubparts) [1217 1224]) ("PurePostscriptOptions" function (:prototype-flag t :constructor-flag t :type ("PurePostscriptOptions" type "class")) (reparse-symbol classsubparts) [1233 1257]) ("defaults" function (:prototype-flag t :type "void") (reparse-symbol classsubparts) [1349 1365]) ("load" function (:prototype-flag t :arguments (("tag" variable (:pointer 1 :constant-flag t :type ("QDomElement" type (:type "class") nil nil)) (reparse-symbol arg-sub-list) [1386 1410])) :type "void") (reparse-symbol classsubparts) [1375 1411]) ("save" function (:prototype-flag t :arguments (("tag" variable (:pointer 1 :type ("QDomElement" type (:type "class") nil nil)) (reparse-symbol arg-sub-list) [1431 1449])) :type "void") (reparse-symbol classsubparts) [1420 1450]) ("checksum" function (:typemodifiers ("inline") :type ("bool" type (:type "class") nil nil)) (reparse-symbol classsubparts) [1462 1510]) ("setChecksum" function (:typemodifiers ("inline") :arguments (("b" variable (:type ("bool" type (:type "class") nil nil)) (reparse-symbol arg-sub-list) [1544 1552])) :type "void") (reparse-symbol classsubparts) [1519 1569]) ("private" label nil (reparse-symbol classsubparts) [1575 1583]) ("m_check" variable (:type ("bool" type (:type "class") nil nil)) (reparse-symbol classsubparts) [1593 1606])) :type "class") nil [1153 1609]) ("PurePostscriptBarcode" type (:superclasses ("PixmapBarcode") :members (("public" label nil (reparse-symbol classsubparts) [1665 1672]) ("PurePostscriptBarcode" function (:prototype-flag t :constructor-flag t :type ("PurePostscriptBarcode" type "class")) (reparse-symbol classsubparts) [1677 1701]) ("PurePostscriptBarcode" function (:prototype-flag t :destructor-flag t :type "void") (reparse-symbol classsubparts) [1706 1731]) ("init" function (:prototype-flag t :typemodifiers ("static") :type "void") (reparse-symbol classsubparts) [1884 1903]) ("initInfo" function (:prototype-flag t :typemodifiers ("static") :arguments (("info" variable (:pointer 1 :type ("TBarcodeInfoList" type (:type "class") nil nil)) (reparse-symbol arg-sub-list) [1932 1956])) :type "void") (reparse-symbol classsubparts) [1910 1957]) ("hasPurePostscriptBarcode" function (:prototype-flag t :typemodifiers ("static") :type ("bool" type (:type "class") nil nil)) (reparse-symbol classsubparts) [1963 2002]) ("engine" function (:prototype-flag t :typemodifiers ("inline") :type ("EEngine" type (:type "class") nil nil)) (reparse-symbol classsubparts) [2008 2038]) ("options" function (:prototype-flag t :pointer 1 :typemodifiers ("inline") :type ("BarkodeEngineOptions" type (:type "class") nil nil)) (reparse-symbol classsubparts) [2044 2083]) ("private" label nil (reparse-symbol classsubparts) [2086 2094]) ("createPostscript" function (:prototype-flag t :typemodifiers ("virtual") :arguments (("postscript" variable (:pointer 2 :type "char") (reparse-symbol arg-sub-list) [2130 2148]) ("postscript_size" variable (:pointer 1 :type "long") (reparse-symbol arg-sub-list) [2149 2172])) :type ("bool" type (:type "class") nil nil)) (reparse-symbol classsubparts) [2099 2173]) ("bbox" function (:prototype-flag t :typemodifiers ("virtual") :arguments (("postscript" variable (:pointer 1 :constant-flag t :type "char") (reparse-symbol arg-sub-list) [2198 2221]) ("postscript_size" variable (:type "long") (reparse-symbol arg-sub-list) [2222 2244])) :type ("QRect" type (:type "class") nil nil)) (reparse-symbol classsubparts) [2178 2245]) ("createProgram" function (:prototype-flag t :arguments (("prg" variable (:type ("QString" type (:type "class") nil nil)) (reparse-symbol arg-sub-list) [2449 2464])) :type "void") (reparse-symbol classsubparts) [2429 2465]) ("private" label nil (reparse-symbol classsubparts) [2468 2476]) ("m_options" variable (:type ("PurePostscriptOptions" type (:type "class") nil nil)) (reparse-symbol classsubparts) [2481 2513]) ("m_program" variable (:type ("QString" type (:type "class") nil nil)) (reparse-symbol classsubparts) [2519 2537]) ("s_path" variable (:typemodifiers ("static") :type ("QString" type (:type "class") nil nil)) (reparse-symbol classsubparts) [2543 2565])) :type "class") nil [1611 2568]) ("engine" function (:parent "PurePostscriptBarcode" :type ("EEngine" type (:type "class") nil nil)) nil [2570 2647]) ("options" function (:pointer 1 :parent "PurePostscriptBarcode" :type ("BarkodeEngineOptions" type (:type "class") nil nil)) nil [2649 2730]))
- :file "purepostscript.h"
- :pointmax 2763
- )
- (semanticdb-table "tokenprovider.cpp"
- :major-mode 'c++-mode
- :tags '(("tokenprovider.h" include nil nil [1029 1055]) ("sqltables.h" include nil nil [1056 1078]) ("kbarcodesettings.h" include nil nil [1079 1108]) ("barcodeitem.h" include nil nil [1110 1134]) ("textitem.h" include nil nil [1135 1156]) ("textlineitem.h" include nil nil [1157 1182]) ("qdatetime.h" include (:system-flag t) nil [1199 1221]) ("qpaintdevicemetrics.h" include (:system-flag t) nil [1222 1254]) ("qsqlquery.h" include (:system-flag t) nil [1255 1277]) ("qregexp.h" include (:system-flag t) nil [1278 1298]) ("qvaluelist.h" include (:system-flag t) nil [1299 1322]) ("time.h" include (:system-flag t) nil [1323 1340]) ("tdelocale.h" include (:system-flag t) nil [1342 1362]) ("tdeabc/addressee.h" include (:system-flag t) nil [1363 1390]) ("kjs/interpreter.h" include (:system-flag t) nil [1434 1462]) ("kjsembed/kjsembedpart.h" include (:system-flag t) nil [1469 1503]) ("NUM_FIELDS" variable (:constant-flag t :default-value (nil)) nil [1553 1574]) ("TOK_ARTICLE_NO_CUSTOMER" variable (:pointer 1 :constant-flag t :default-value "\"article_no_customer\"" :type "char") nil [1576 1636]) ("TOK_BARCODE_NO_CUSTOMER" variable (:pointer 1 :constant-flag t :default-value "\"barcode_no_customer\"" :type "char") nil [1637 1697]) ("TOK_ARTICLE_DESC" variable (:pointer 1 :constant-flag t :default-value "\"article_desc\"" :type "char") nil [1698 1744]) ("TOK_ARTICLE_NO" variable (:pointer 1 :constant-flag t :default-value "\"article_no\"" :type "char") nil [1745 1787]) ("TOK_CUSTOMER_NO" variable (:pointer 1 :constant-flag t :default-value "\"customer_no\"" :type "char") nil [1788 1832]) ("TOK_CUSTOEMR_NAME" variable (:pointer 1 :constant-flag t :default-value "\"customer_name\"" :type "char") nil [1833 1881]) ("TOK_BARCODE_NO" variable (:pointer 1 :constant-flag t :default-value "\"barcode_no\"" :type "char") nil [1882 1924]) ("TOK_BARCODE_NO_BASIC" variable (:pointer 1 :constant-flag t :default-value "\"barcode_no_basic\"" :type "char") nil [1925 1979]) ("TOK_GROUP" variable (:pointer 1 :constant-flag t :default-value "\"group\"" :type "char") nil [1980 2012]) ("TOK_ENCODING_TYPE" variable (:pointer 1 :constant-flag t :default-value "\"encoding_type\"" :type "char") nil [2013 2061]) ("TOK_ENCODING_TYPE_NAME" variable (:pointer 1 :constant-flag t :default-value "\"encoding_type_name\"" :type "char") nil [2062 2120]) ("TOK_LINE" variable (:pointer 1 :constant-flag t :default-value "\"line%1\"" :type "char") nil [2121 2153]) ("TOK_FIELD" variable (:pointer 1 :constant-flag t :default-value "\"field%1\"" :type "char") nil [2154 2188]) ("TOK_FILENAME" variable (:pointer 1 :constant-flag t :default-value "\"filename\"" :type "char") nil [2190 2228]) ("TOK_INDEX" variable (:pointer 1 :constant-flag t :default-value "\"index\"" :type "char") nil [2229 2261]) ("TOK_COL" variable (:pointer 1 :constant-flag t :default-value "\"col\"" :type "char") nil [2262 2290]) ("TOK_ROW" variable (:pointer 1 :constant-flag t :default-value "\"row\"" :type "char") nil [2291 2319]) ("TOK_PAGE" variable (:pointer 1 :constant-flag t :default-value "\"page\"" :type "char") nil [2320 2350]) ("TOK_RESOLUTION" variable (:pointer 1 :constant-flag t :default-value "\"resolution\"" :type "char") nil [2351 2393]) ("TOK_SERIAL" variable (:pointer 1 :constant-flag t :default-value "\"serial\"" :type "char") nil [2394 2428]) ("TOK_JS" variable (:pointer 1 :constant-flag t :default-value "\"js:\"" :type "char") nil [2430 2457]) ("TOK_SQL" variable (:pointer 1 :constant-flag t :default-value "\"sqlquery:\"" :type "char") nil [2458 2492]) ("TOK_VAR" variable (:pointer 1 :constant-flag t :default-value "\"$\"" :type "char") nil [2493 2519]) ("TOK_DATE" variable (:pointer 1 :constant-flag t :default-value "\"date\"" :type "char") nil [2521 2551]) ("TOK_DATE_a" variable (:pointer 1 :constant-flag t :default-value "\"date:%a\"" :type "char") nil [2552 2587]) ("TOK_DATE_A" variable (:pointer 1 :constant-flag t :default-value "\"date:%A\"" :type "char") nil [2588 2623]) ("TOK_DATE_b" variable (:pointer 1 :constant-flag t :default-value "\"date:%b\"" :type "char") nil [2624 2659]) ("TOK_DATE_B" variable (:pointer 1 :constant-flag t :default-value "\"date:%B\"" :type "char") nil [2660 2695]) ("TOK_DATE_c" variable (:pointer 1 :constant-flag t :default-value "\"date:%c\"" :type "char") nil [2696 2731]) ("TOK_DATE_C" variable (:pointer 1 :constant-flag t :default-value "\"date:%C\"" :type "char") nil [2732 2767]) ("TOK_DATE_d" variable (:pointer 1 :constant-flag t :default-value "\"date:%d\"" :type "char") nil [2768 2803]) ("TOK_DATE_D" variable (:pointer 1 :constant-flag t :default-value "\"date:%D\"" :type "char") nil [2804 2839]) ("TOK_DATE_e" variable (:pointer 1 :constant-flag t :default-value "\"date:%e\"" :type "char") nil [2840 2875]) ("TOK_DATE_F" variable (:pointer 1 :constant-flag t :default-value "\"date:%F\"" :type "char") nil [2876 2911]) ("TOK_DATE_g" variable (:pointer 1 :constant-flag t :default-value "\"date:%g\"" :type "char") nil [2912 2947]) ("TOK_DATE_G" variable (:pointer 1 :constant-flag t :default-value "\"date:%G\"" :type "char") nil [2948 2983]) ("TOK_DATE_H" variable (:pointer 1 :constant-flag t :default-value "\"date:%H\"" :type "char") nil [2984 3019]) ("TOK_DATE_I" variable (:pointer 1 :constant-flag t :default-value "\"date:%I\"" :type "char") nil [3020 3055]) ("TOK_DATE_J" variable (:pointer 1 :constant-flag t :default-value "\"date:%J\"" :type "char") nil [3056 3091]) ("TOK_DATE_m" variable (:pointer 1 :constant-flag t :default-value "\"date:%m\"" :type "char") nil [3092 3127]) ("TOK_DATE_M" variable (:pointer 1 :constant-flag t :default-value "\"date:%M\"" :type "char") nil [3128 3163]) ("TOK_DATE_p" variable (:pointer 1 :constant-flag t :default-value "\"date:%p\"" :type "char") nil [3164 3199]) ("TOK_DATE_r" variable (:pointer 1 :constant-flag t :default-value "\"date:%r\"" :type "char") nil [3200 3235]) ("TOK_DATE_R" variable (:pointer 1 :constant-flag t :default-value "\"date:%R\"" :type "char") nil [3236 3271]) ("TOK_DATE_S" variable (:pointer 1 :constant-flag t :default-value "\"date:%S\"" :type "char") nil [3272 3307]) ("TOK_DATE_T" variable (:pointer 1 :constant-flag t :default-value "\"date:%T\"" :type "char") nil [3308 3343]) ("TOK_DATE_u" variable (:pointer 1 :constant-flag t :default-value "\"date:%u\"" :type "char") nil [3344 3379]) ("TOK_DATE_U" variable (:pointer 1 :constant-flag t :default-value "\"date:%U\"" :type "char") nil [3380 3415]) ("TOK_DATE_V" variable (:pointer 1 :constant-flag t :default-value "\"date:%V\"" :type "char") nil [3416 3451]) ("TOK_DATE_w" variable (:pointer 1 :constant-flag t :default-value "\"date:%w\"" :type "char") nil [3452 3487]) ("TOK_DATE_W" variable (:pointer 1 :constant-flag t :default-value "\"date:%W\"" :type "char") nil [3488 3523]) ("TOK_DATE_x" variable (:pointer 1 :constant-flag t :default-value "\"date:%x\"" :type "char") nil [3524 3559]) ("TOK_DATE_X" variable (:pointer 1 :constant-flag t :default-value "\"date:%X\"" :type "char") nil [3560 3595]) ("TOK_DATE_y" variable (:pointer 1 :constant-flag t :default-value "\"date:%y\"" :type "char") nil [3596 3631]) ("TOK_DATE_Y" variable (:pointer 1 :constant-flag t :default-value "\"date:%Y\"" :type "char") nil [3632 3667]) ("TOK_DATE_z" variable (:pointer 1 :constant-flag t :default-value "\"date:%z\"" :type "char") nil [3668 3703]) ("TOK_DATE_Z" variable (:pointer 1 :constant-flag t :default-value "\"date:%Z\"" :type "char") nil [3704 3739]) ("TOK_ADDRESS_NAME" variable (:pointer 1 :constant-flag t :default-value "\"address_name\"" :type "char") nil [3741 3787]) ("TOK_ADDRESS_GIVEN_NAME" variable (:pointer 1 :constant-flag t :default-value "\"address_givenname\"" :type "char") nil [3788 3845]) ("TOK_ADDRESS_FAMILY_NAME" variable (:pointer 1 :constant-flag t :default-value "\"address_familyname\"" :type "char") nil [3846 3905]) ("TOK_ADDRESS_EMAIL" variable (:pointer 1 :constant-flag t :default-value "\"address_email\"" :type "char") nil [3906 3954]) ("TOK_ADDRESS_FULL_EMAIL" variable (:pointer 1 :constant-flag t :default-value "\"address_fullemail\"" :type "char") nil [3955 4012]) ("TOK_ADDRESS_PHONE_PREF" variable (:pointer 1 :constant-flag t :default-value "\"address_phone\"" :type "char") nil [4013 4066]) ("TOK_ADDRESS_PHONE_HOME" variable (:pointer 1 :constant-flag t :default-value "\"address_phonehome\"" :type "char") nil [4067 4124]) ("TOK_ADDRESS_PHONE_WORK" variable (:pointer 1 :constant-flag t :default-value "\"address_phonework\"" :type "char") nil [4125 4182]) ("TOK_ADDRESS_PHONE_MSG" variable (:pointer 1 :constant-flag t :default-value "\"address_phonemsg\"" :type "char") nil [4183 4238]) ("TOK_ADDRESS_PHONE_VOICE" variable (:pointer 1 :constant-flag t :default-value "\"address_phonevoice\"" :type "char") nil [4239 4298]) ("TOK_ADDRESS_PHONE_FAX" variable (:pointer 1 :constant-flag t :default-value "\"address_phonefax\"" :type "char") nil [4299 4354]) ("TOK_ADDRESS_PHONE_CELL" variable (:pointer 1 :constant-flag t :default-value "\"address_phonemobile\"" :type "char") nil [4355 4414]) ("TOK_ADDRESS_PHONE_VIDEO" variable (:pointer 1 :constant-flag t :default-value "\"address_phonevideo\"" :type "char") nil [4415 4474]) ("TOK_ADDRESS_PHONE_BBS" variable (:pointer 1 :constant-flag t :default-value "\"address_phonebbs\"" :type "char") nil [4475 4530]) ("TOK_ADDRESS_PHONE_MODEM" variable (:pointer 1 :constant-flag t :default-value "\"address_phonemodem\"" :type "char") nil [4531 4590]) ("TOK_ADDRESS_PHONE_CAR" variable (:pointer 1 :constant-flag t :default-value "\"address_phonecar\"" :type "char") nil [4591 4646]) ("TOK_ADDRESS_PHONE_ISDN" variable (:pointer 1 :constant-flag t :default-value "\"address_phoneisdn\"" :type "char") nil [4647 4704]) ("TOK_ADDRESS_PHONE_PCS" variable (:pointer 1 :constant-flag t :default-value "\"address_phonepcs\"" :type "char") nil [4705 4760]) ("TOK_ADDRESS_PHONE_PAGER" variable (:pointer 1 :constant-flag t :default-value "\"address_phonepager\"" :type "char") nil [4761 4820]) ("TOK_ADDRESS_ADDRESS_POB" variable (:pointer 1 :constant-flag t :default-value "\"address_postofficebox\"" :type "char") nil [4821 4883]) ("TOK_ADDRESS_ADDRESS_EXTENDED" variable (:pointer 1 :constant-flag t :default-value "\"address_extended\"" :type "char") nil [4884 4946]) ("TOK_ADDRESS_ADDRESS_STREET" variable (:pointer 1 :constant-flag t :default-value "\"address_street\"" :type "char") nil [4947 5005]) ("TOK_ADDRESS_ADDRESS_LOCALITY" variable (:pointer 1 :constant-flag t :default-value "\"address_locality\"" :type "char") nil [5006 5068]) ("TOK_ADDRESS_ADDRESS_REGION" variable (:pointer 1 :constant-flag t :default-value "\"address_region\"" :type "char") nil [5069 5127]) ("TOK_ADDRESS_ADDRESS_POSTALCODE" variable (:pointer 1 :constant-flag t :default-value "\"address_postalcode\"" :type "char") nil [5128 5194]) ("TOK_ADDRESS_ADDRESS_COUNTRY" variable (:pointer 1 :constant-flag t :default-value "\"address_country\"" :type "char") nil [5195 5255]) ("TOK_ADDRESS_ADDRESS_LABEL" variable (:pointer 1 :constant-flag t :default-value "\"address_label\"" :type "char") nil [5256 5312]) ("TOK_ADDRESS" variable (:pointer 1 :constant-flag t :default-value "\"address\"" :type "char") nil [5313 5349]) ("TOK_ADDRESS_URL" variable (:pointer 1 :constant-flag t :default-value "\"address_url\"" :type "char") nil [5357 5401]) ("TOK_ADDRESS_NICK" variable (:pointer 1 :constant-flag t :default-value "\"address_nick\"" :type "char") nil [5402 5448]) ("TOK_ADDRESS_ADDITIONAL_NAME" variable (:pointer 1 :constant-flag t :default-value "\"address_addtionalname\"" :type "char") nil [5449 5515]) ("TOK_ADDRESS_PREFIX" variable (:pointer 1 :constant-flag t :default-value "\"address_prefix\"" :type "char") nil [5516 5566]) ("TOK_ADDRESS_SUFFIX" variable (:pointer 1 :constant-flag t :default-value "\"address_suffix\"" :type "char") nil [5567 5617]) ("TOK_ADDRESS_BIRTHDAY" variable (:pointer 1 :constant-flag t :default-value "\"address_birthday\"" :type "char") nil [5618 5672]) ("TOK_ADDRESS_TITLE" variable (:pointer 1 :constant-flag t :default-value "\"address_title\"" :type "char") nil [5673 5721]) ("TOK_ADDRESS_ROLE" variable (:pointer 1 :constant-flag t :default-value "\"address_role\"" :type "char") nil [5722 5768]) ("TOK_ADDRESS_NOTE" variable (:pointer 1 :constant-flag t :default-value "\"address_note\"" :type "char") nil [5769 5815]) ("TOK_ADDRESS_ORGANIZATION" variable (:pointer 1 :constant-flag t :default-value "\"address_organization\"" :type "char") nil [5816 5878]) ("TokenProvider" function (:constructor-flag t :parent "TokenProvider" :arguments (("paintdevice" variable (:pointer 1 :type ("QPaintDevice" type (:type "class") nil nil)) (reparse-symbol arg-sub-list) [5910 5937])) :type ("TokenProvider" type "class")) nil [5880 6579]) ("TokenProvider" function (:destructor-flag t :parent "TokenProvider" :type "void") nil [6581 6616]) ("TokenProvider::s_categories" variable (:type ("QValueList" type (:type "class") nil nil)) nil [6618 6670]) ("TokenProvider::s_captions" variable (:type ("QMap" type (:type "class") nil nil)) nil [6671 6738]) ("TokenProvider::s_interpreter" variable (:pointer 1 :default-value "NULL;" :type ("KJS::Interpreter" type (:type "class") nil nil)) nil [6759 6813]) ("TokenProvider::s_interpreter" variable (:pointer 1 :default-value "NULL;" :type ("KJSEmbed::KJSEmbedPart" type (:type "class") nil nil)) nil [6820 6880]) ("hasJavaScript" function (:parent "TokenProvider" :type ("bool" type (:type "class") nil nil)) nil [6905 7032]) ("getTokens" function (:pointer 1 :parent "TokenProvider" :type ("QValueList" type (:type "class") nil nil)) nil [7034 7143]) ("init" function (:parent "TokenProvider" :type "void") nil [7145 17408]) ("findBrackets" function (:parent "TokenProvider" :arguments (("text" variable (:type ("QString" type (:type "class") nil nil)) (reparse-symbol arg-sub-list) [17445 17460]) ("" variable (:type ("QString" type (:type "class") nil nil)) (reparse-symbol arg-sub-list) [17461 17501])) :type "void") nil [17411 18736]) ("parse" function (:parent "TokenProvider" :arguments (("text" variable (:constant-flag t :type ("QString" type (:type "class") nil nil)) (reparse-symbol arg-sub-list) [18768 18790])) :type ("QString" type (:type "class") nil nil)) nil [18738 18889]) ("listUserVars" function (:parent "TokenProvider" :type ("QStringList" type (:type "class") nil nil)) nil [18891 19537]) ("processUserVars" function (:parent "TokenProvider" :arguments (("t" variable (:constant-flag t :type ("QString" type (:type "class") nil nil)) (reparse-symbol arg-sub-list) [19579 19598])) :type ("QString" type (:type "class") nil nil)) nil [19539 20032]) ("process" function (:parent "TokenProvider" :arguments (("t" variable (:constant-flag t :type ("QString" type (:type "class") nil nil)) (reparse-symbol arg-sub-list) [20066 20085])) :type ("QString" type (:type "class") nil nil)) nil [20034 24091]) ("processAddresses" function (:parent "TokenProvider" :arguments (("t" variable (:constant-flag t :type ("QString" type (:type "class") nil nil)) (reparse-symbol arg-sub-list) [24134 24153])) :type ("QString" type (:type "class") nil nil)) nil [24093 29616]) ("query" function (:parent "TokenProvider" :arguments (("query" variable (:constant-flag t :type ("QString" type (:type "class") nil nil)) (reparse-symbol arg-sub-list) [29648 29671])) :type ("QString" type (:type "class") nil nil)) nil [29618 29867]) ("jsParse" function (:parent "TokenProvider" :arguments (("script" variable (:constant-flag t :type ("QString" type (:type "class") nil nil)) (reparse-symbol arg-sub-list) [29901 29925])) :type ("QString" type (:type "class") nil nil)) nil [29869 31283]) ("jsParseToBool" function (:parent "TokenProvider" :arguments (("script" variable (:constant-flag t :type ("QString" type (:type "class") nil nil)) (reparse-symbol arg-sub-list) [31320 31344])) :type ("bool" type (:type "class") nil nil)) nil [31285 31681]) ("createSerial" function (:parent "TokenProvider" :constant-flag t :type ("QString" type (:type "class") nil nil)) nil [31683 32384]) ("unescapeText" function (:parent "TokenProvider" :arguments (("t" variable (:constant-flag t :type ("QString" type (:type "class") nil nil)) (reparse-symbol arg-sub-list) [32423 32442])) :type ("QString" type (:type "class") nil nil)) nil [32386 32692]) ("escapeText" function (:parent "TokenProvider" :arguments (("t" variable (:constant-flag t :type ("QString" type (:type "class") nil nil)) (reparse-symbol arg-sub-list) [32729 32748])) :type ("QString" type (:type "class") nil nil)) nil [32694 33053]))
- :file "tokenprovider.cpp"
- :pointmax 33054
- )
- )
- :file "semantic.cache"
- :semantic-tag-version "2.0pre3"
- :semanticdb-version "2.0pre3"
- )
diff --git a/kbarcode/sqltables.h b/kbarcode/sqltables.h
index 12f4ab4..36c08ab 100644
--- a/kbarcode/sqltables.h
+++ b/kbarcode/sqltables.h
@@ -30,10 +30,6 @@
#define TABLE_BASIC "barcode_basic"
/* -------- */
-// a macro to support TQString::replace( TQString, TQString )
-// also on QT 3.0.x
-#define DSREPLACE( x ) x
-
// Holds all information
// necessary for connecting
// to a database
diff --git a/kbarcode/tdeactionmap.cpp b/kbarcode/tdeactionmap.cpp
deleted file mode 100644
index becffdd..0000000
--- a/kbarcode/tdeactionmap.cpp
+++ /dev/null
@@ -1,188 +0,0 @@
-/***************************************************************************
- tdeactionmap.cpp - description
- -------------------
- begin : Fri Mai 19 2006
- copyright : (C) 2006 by Dominik Seichter
- email : domseichter@web.de
- ***************************************************************************/
-
-/***************************************************************************
- * *
- * This program is free software; you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation; either version 2 of the License, or *
- * (at your option) any later version. *
- * *
- ***************************************************************************/
-
-#include "tdeactionmap.h"
-
-#include <tqimage.h>
-#include <tqlabel.h>
-#include <tqlayout.h>
-#include <tqmenubar.h>
-#include <tqmenudata.h>
-#include <tqpixmap.h>
-#include <tqpopupmenu.h>
-#include <tqregexp.h>
-#include <tqvbox.h>
-
-#include <tdeaction.h>
-#include <tdeapplication.h>
-#include <tdelistview.h>
-#if TDE_VERSION >= 0x030500
-#include <tdelistviewsearchline.h>
-#endif
-#include <tdelocale.h>
-
-class TDEListViewActionItem : public TDEListViewItem {
-public:
- TDEListViewActionItem( TDEListView* parent, TDEAction* action )
- : TDEListViewItem( parent ), m_action( action )
- {
- TQPixmap pix;
- TQSize size = TQIconSet::iconSize( TQIconSet::Large );
- TQIconSet iconset = m_action->iconSet( TDEIcon::Panel, TDEIcon::SizeLarge );
- TQRegExp regtag( "<[^>]*>" );
-
- pix = iconset.pixmap( TQIconSet::Large, TQIconSet::Normal ); // m_action->isEnabled() ? TQIconSet::Normal : TQIconSet::Disabled );
- if( pix.isNull() )
- {
- pix.resize( size );
- pix.fill( backgroundColor() );
- }
- else
- {
- if( pix.size() != size )
- {
- pix = pix.convertToImage().smoothScale( size );
- }
- }
-
- setText( 0, m_action->plainText() );
- setText( 1, m_action->shortcutText() );
- // replace HTML tags in What's this help
- setText( 2, m_action->whatsThis().replace( regtag, "" ) );
- setPixmap( 0, pix );
- }
-
- void paintCell( TQPainter *p, const TQColorGroup &cg,
- int column, int width, int alignment )
- {
- TQColorGroup _cg( cg );
- TQColor c = _cg.text();
- if( m_action && !m_action->isEnabled() )
- _cg.setColor( TQColorGroup::Text, TQt::gray );
-
- TDEListViewItem::paintCell( p, _cg, column, width, alignment );
- _cg.setColor( TQColorGroup::Text, c );
- }
-
- inline TDEAction* action() const
- {
- return m_action;
- }
-
-private:
- TDEAction* m_action;
-};
-
-TDEActionMapDlg::TDEActionMapDlg( TDEActionCollection* actions, TQWidget* parent, const char* name )
- : KDialogBase( parent, name, false, i18n("Action Map"), KDialogBase::Close, KDialogBase::Close )
-{
- TQVBox *page = makeVBoxMainWidget();
-
- new TQLabel( i18n("Find and execute actions."), page );
- m_map = new TDEActionMap( actions, page );
-
- show();
-}
-
-void TDEActionMapDlg::updateEnabledState()
-{
- m_map->updateEnabledState();
-}
-
-TDEActionMap::TDEActionMap( TDEActionCollection* actions, TQWidget* parent, const char* name )
- : TQWidget( parent, name ), m_actions( actions ), m_showMenuTree( true ), m_grayOutItems( false )
-{
- TQVBoxLayout* layout = new TQVBoxLayout( this );
-
- m_listView = new TDEListView( this );
-#if TDE_VERSION >= 0x030500
- m_searchLine = new TDEListViewSearchLineWidget( m_listView, this );
-#endif
-
- m_listView->addColumn( i18n("Action") );
- m_listView->addColumn( i18n("Shortcut") );
- m_listView->addColumn( i18n("Description") );
- m_listView->setColumnWidthMode( 0, TQListView::Maximum );
- m_listView->setColumnWidthMode( 1, TQListView::Maximum );
- m_listView->setColumnWidthMode( 2, TQListView::Manual );
- m_listView->setSorting( 0 );
- m_listView->setAllColumnsShowFocus( true );
-
-#if TDE_VERSION >= 0x030500
- layout->addWidget( m_searchLine );
-#endif
- layout->addWidget( m_listView );
-
- connect( m_listView, TQT_SIGNAL( executed( TQListViewItem* ) ), this, TQT_SLOT( slotExecuteAction( TQListViewItem* ) ) );
- connect( actions, TQT_SIGNAL( inserted( TDEAction* ) ), this, TQT_SLOT( slotActionCollectionChanged() ) );
- connect( actions, TQT_SIGNAL( removed( TDEAction* ) ), this, TQT_SLOT( slotActionCollectionChanged() ) );
- slotActionCollectionChanged();
-}
-
-TDEActionMap::~TDEActionMap()
-{
-
-}
-
-void TDEActionMap::slotActionCollectionChanged()
-{
- TDEActionPtrList actions;
- TDEActionPtrList::const_iterator it;
-
- m_listView->clear();
-
- if( !m_actions )
- return;
-
- actions = m_actions->actions();
- it = actions.begin();
-
- while( it != actions.end() )
- {
- /*
- if( m_showMenuTree )
- {
- }
- */
-
- new TDEListViewActionItem( m_listView, (*it) );
-
- connect( *it, TQT_SIGNAL( enabled(bool) ), this, TQT_SLOT( updateEnabledState() ) );
-
- ++it;
- }
-
-}
-
-void TDEActionMap::slotExecuteAction( TQListViewItem* item )
-{
- TDEListViewActionItem* action = dynamic_cast<TDEListViewActionItem*>(item);
- if( !action )
- return;
-
- if( !action->action()->isEnabled() )
- return;
-
- action->action()->activate();
-}
-
-void TDEActionMap::updateEnabledState()
-{
- m_listView->repaintContents();
-}
-
-#include "tdeactionmap.moc"
diff --git a/kbarcode/tdeactionmap.h b/kbarcode/tdeactionmap.h
deleted file mode 100644
index 023647f..0000000
--- a/kbarcode/tdeactionmap.h
+++ /dev/null
@@ -1,102 +0,0 @@
-/***************************************************************************
- tdeactionmap.h - description
- -------------------
- begin : Fri Mai 19 2006
- copyright : (C) 2006 by Dominik Seichter
- email : domseichter@web.de
- ***************************************************************************/
-
-/***************************************************************************
- * *
- * This program is free software; you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation; either version 2 of the License, or *
- * (at your option) any later version. *
- * *
- ***************************************************************************/
-
-#ifndef _TDEACTION_MAP_H_
-#define _TDEACTION_MAP_H_
-
-#include <tqwidget.h>
-#include <tdeversion.h>
-#include <kdialogbase.h>
-
-class TDEActionCollection;
-class TDEActionMap;
-#if TDE_VERSION >= 0x030500
-class TDEListViewSearchLineWidget;
-#endif
-class TDEListView;
-class TQListViewItem;
-
-/** Open a simple dialog containing an action map.
- */
-class TDEActionMapDlg : public KDialogBase {
- public:
- TDEActionMapDlg( TDEActionCollection* actions, TQWidget* parent = NULL, const char* name = NULL );
-
- /** Call this function whenever you changed the enabled/disalbed state of an action
- * in your application.
- */
- void updateEnabledState();
-
- private:
- TDEActionMap* m_map;
-};
-
-/**
- *
- * This class is an implementation of an Action Map for KDE.
- *
- *
- * 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 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.
- *
- * More concrete an Action Map is a dialog with a list of all
- * actions (i.e. make text bold, save file or insert image)
- * that can be performed in the application at its current state.
- * Additionally there is a search box at the top of the list so
- * that the user can search the list easily for a special action.
- * The action is executed by clicking on it. Disabled actions are
- * grayed out and cannot be clicked. The dialog is modeless so that
- * it can always be open and the normal usage of the application is not disturbed.
- */
-class TDEActionMap : public TQWidget {
- Q_OBJECT
-
- public:
- /** Creates a new TDEActionMap widget
- * @param action all actions from this TDEActionCollection are displayed.
- * @param parent the parent
- * @param name the name
- */
- TDEActionMap( TDEActionCollection* actions, TQWidget* parent = NULL, const char* name = NULL );
- ~TDEActionMap();
-
- public slots:
- /** Call this function whenever you changed the enabled/disalbed state of an action
- * in your application.
- */
- void updateEnabledState();
-
- private slots:
- void slotActionCollectionChanged();
- void slotExecuteAction( TQListViewItem* item );
-
- private:
- TDEActionCollection* m_actions;
- TDEListView* m_listView;
-#if TDE_VERSION >= 0x030500
- TDEListViewSearchLineWidget* m_searchLine;
-#endif
-
- bool m_showMenuTree;
- bool m_grayOutItems;
-};
-
-#endif // _TDEACTION_MAP_H_
diff --git a/kbarcode/textitem.cpp b/kbarcode/textitem.cpp
index 578ee28..a182a6d 100644
--- a/kbarcode/textitem.cpp
+++ b/kbarcode/textitem.cpp
@@ -98,22 +98,10 @@ void TextItem::draw(TQPainter* painter)
painter->rotate( m_rotation );
- if( !TextItem::IsTQtTextRenderingBroken() )
- {
- painter->setPen( TQt::black );
- srt.setWidth( painter, w );
- srt.draw( painter, 0, 0, TQRect( 0, 0, w, h ), cg );
- }
- else
- {
- TQRect r( 0, 0, width, height );
- TQPicture picture;
- TQPainter p( &picture );
- LabelUtils::renderString( &p, t, r, scalex, scaley );
- p.end();
- painter->drawPicture( 0, 0, picture );
- }
-
+ painter->setPen( TQt::black );
+ srt.setWidth( painter, w );
+ srt.draw( painter, 0, 0, TQRect( 0, 0, w, h ), cg );
+
painter->restore();
DocumentItem::drawBorder( painter );
@@ -210,43 +198,3 @@ void TextItem::setText (const TQString & text)
m_text = text;
}
-bool TextItem::s_qt_broken_init = false;
-bool TextItem::s_qt_broken = false;
-
-bool TextItem::IsTQtTextRenderingBroken()
-{
- if( !s_qt_broken_init )
- {
- TQString version( tqVersion() );
-// tqDebug( "Detected TQt Version: %s", version.latin1() );
- int major = version.section( ".", 0, 0 ).toInt();
- int minor = version.section( ".", 1, 1 ).toInt();
- int bugfix = version.section( ".", 2, 2 ).toInt();
-
- if( major >= 3 )
- {
- if( major == 3 && minor < 3 )
- s_qt_broken = true;
- else if( major == 3 && minor == 3 )
- {
- if( bugfix < 2 )
- s_qt_broken = true;
- else
- s_qt_broken = false;
- }
- else
- s_qt_broken = false;
- }
- else
- s_qt_broken = true;
-
- if( s_qt_broken )
- tqDebug("TQt's text redering is broken - using KBarcode fix.");
-
- s_qt_broken_init = true;
- return s_qt_broken;
- }
- else
- return s_qt_broken;
-}
-
diff --git a/kbarcode/textitem.h b/kbarcode/textitem.h
index 9c0b5a2..b415a82 100644
--- a/kbarcode/textitem.h
+++ b/kbarcode/textitem.h
@@ -24,7 +24,7 @@ class LabelEditor;
/**
* Class TextItem
- * Formated rich text (drawn using either DSRichText or TQSimpleRichText - once it is bug free) on screen or printer.
+ * Formated rich text (drawn using TQSimpleRichText) on screen or printer.
*/
class TextItem : public DocumentItem {
public:
@@ -46,14 +46,10 @@ public:
inline void setRotation( double rot ) { m_rotation = rot; }
inline double rotation() const { return m_rotation; }
- static bool IsTQtTextRenderingBroken();
private:
void init();
private:
- static bool s_qt_broken;
- static bool s_qt_broken_init;
-
double m_rotation;
TQString m_text;
};
diff --git a/kbarcode/textlineedit.cpp b/kbarcode/textlineedit.cpp
index 18a08f7..a0c561e 100644
--- a/kbarcode/textlineedit.cpp
+++ b/kbarcode/textlineedit.cpp
@@ -98,12 +98,12 @@ void TextLineEditor::setupActions()
TQStringList fuentes;
- fuentes += "Tiems Roman (Medium) 8 point";
- fuentes += "Tiems Roman (Medium) 10 point";
- fuentes += "Tiems Roman (Bold) 10 point";
- fuentes += "Tiems Roman (Bold) 12 point";
- fuentes += "Tiems Roman (Bold) 14 point";
- fuentes += "Tiems Roman (Italic) 12 point";
+ fuentes += "Times Roman (Medium) 8 point";
+ fuentes += "Times Roman (Medium) 10 point";
+ fuentes += "Times Roman (Bold) 10 point";
+ fuentes += "Times Roman (Bold) 12 point";
+ fuentes += "Times Roman (Bold) 14 point";
+ fuentes += "Times Roman (Italic) 12 point";
fuentes += "Helvetica (Medium) 6 point";
fuentes += "Helvetica (Medium) 10 point";
fuentes += "Helvetica (Medium) 12 point";
diff --git a/kbarcode/textlineitem.cpp b/kbarcode/textlineitem.cpp
index 22f696f..5871894 100644
--- a/kbarcode/textlineitem.cpp
+++ b/kbarcode/textlineitem.cpp
@@ -68,16 +68,9 @@ void TextLineItem::draw(TQPainter* painter)
painter->save();
- if( !TextLineItem::IsTQtTextRenderingBroken() )
- {
- painter->scale( scalex, scaley );
- painter->setPen( TQt::black );
- srt.draw( painter, (int)((double)rect().x() / scalex ), (int)((double)rect().y() / scaley), r, cg );
- }
- else
- {
- LabelUtils::renderString( painter, text, r, scalex, scaley );
- }
+ painter->scale( scalex, scaley );
+ painter->setPen( TQt::black );
+ srt.draw( painter, (int)((double)rect().x() / scalex ), (int)((double)rect().y() / scaley), r, cg );
painter->restore();
@@ -207,40 +200,3 @@ int TextLineItem::getMagHor () const
{
return m_mag_hor;
}
-
-bool TextLineItem::s_qt_broken_init = false;
-bool TextLineItem::s_qt_broken = false;
-
-bool TextLineItem::IsTQtTextRenderingBroken()
-{
- if( !s_qt_broken_init )
- {
- TQString version( tqVersion() );
- int major = version.section( ".", 0, 0 ).toInt();
- int minor = version.section( ".", 1, 1 ).toInt();
- int bugfix = version.section( ".", 2, 2 ).toInt();
-
- if( major >= 3 )
- {
- if( major == 3 && minor < 3 )
- s_qt_broken = true;
- else if( major == 3 && minor == 3 )
- {
- if( bugfix < 2 )
- s_qt_broken = true;
- else
- s_qt_broken = false;
- }
- else
- s_qt_broken = false;
- }
- else
- s_qt_broken = true;
-
- s_qt_broken_init = true;
- return s_qt_broken;
- }
- else
- return s_qt_broken;
-}
-
diff --git a/kbarcode/textlineitem.h b/kbarcode/textlineitem.h
index 2b86486..75bc307 100644
--- a/kbarcode/textlineitem.h
+++ b/kbarcode/textlineitem.h
@@ -22,7 +22,7 @@
/**
* Class TextLineItem
- * plain text (drawn using either DSRichText or TQSimpleRichText - once it is bug free) on screen or printer.
+ * plain text (drawn using TQSimpleRichText) on screen or printer.
*/
class TextLineItem : public DocumentItem {
public:
@@ -46,14 +46,10 @@ public:
void setMagVert (int count);
TQString text () const;
- static bool IsTQtTextRenderingBroken();
private:
void init();
private:
- static bool s_qt_broken;
- static bool s_qt_broken_init;
-
TQString m_text;
int m_font;
int m_rotate;
diff --git a/kbarcode/tokenprovider.cpp b/kbarcode/tokenprovider.cpp
index f0d4e0b..dfbe9a6 100644
--- a/kbarcode/tokenprovider.cpp
+++ b/kbarcode/tokenprovider.cpp
@@ -915,10 +915,10 @@ const TQString TokenProvider::createSerial()
TQString TokenProvider::unescapeText( const TQString & t )
{
TQString tmp = t;
- tmp = tmp.replace( DSREPLACE( "&lt;" ), "<" );
- tmp = tmp.replace( DSREPLACE( "&gt;" ), ">" );
- tmp = tmp.replace( DSREPLACE( "&amp;" ), "&" );
- tmp = tmp.replace( DSREPLACE( "&quot;" ), "\"" );
+ tmp = tmp.replace( "&lt;", "<" );
+ tmp = tmp.replace( "&gt;", ">" );
+ tmp = tmp.replace( "&amp;", "&" );
+ tmp = tmp.replace( "&quot;", "\"" );
return tmp;
}
@@ -926,11 +926,11 @@ TQString TokenProvider::unescapeText( const TQString & t )
TQString TokenProvider::escapeText( const TQString & t )
{
TQString tmp = t;
- 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 />" );
+ tmp = tmp.replace( "<", "&lt;" );
+ tmp = tmp.replace( ">", "&gt;" );
+ tmp = tmp.replace( "&", "&amp;" );
+ tmp = tmp.replace( "\"", "&quot;" );
+ tmp = tmp.replace( "\n", "<br />" );
return tmp;
}