summaryrefslogtreecommitdiffstats
path: root/src/barcode/barcode.h
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-07-02 06:40:27 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-07-02 06:40:27 +0000
commit2595a15ebeb6fc46b7cb241d01ec0c2460ec2111 (patch)
tree18a8f0f4ac5a86dacfa74c3537551ec39bc85e75 /src/barcode/barcode.h
parent1d90725a4001fab9d3922b2cbcceeee5e2d1686f (diff)
downloadtellico-2595a15ebeb6fc46b7cb241d01ec0c2460ec2111.tar.gz
tellico-2595a15ebeb6fc46b7cb241d01ec0c2460ec2111.zip
TQt4 port tellico
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/tellico@1239054 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/barcode/barcode.h')
-rw-r--r--src/barcode/barcode.h51
1 files changed, 26 insertions, 25 deletions
diff --git a/src/barcode/barcode.h b/src/barcode/barcode.h
index b8d71bc..6155108 100644
--- a/src/barcode/barcode.h
+++ b/src/barcode/barcode.h
@@ -16,11 +16,11 @@
#ifndef BARCODE_H
#define BARCODE_H
-#include <qthread.h>
-#include <qimage.h>
-#include <qvaluevector.h>
-#include <qobject.h>
-#include <qmutex.h>
+#include <tqthread.h>
+#include <tqimage.h>
+#include <tqvaluevector.h>
+#include <tqobject.h>
+#include <tqmutex.h>
#include <math.h>
#include "barcode_v4l.h"
@@ -66,15 +66,15 @@ namespace barcodeRecognition {
class Barcode_EAN13 {
public:
Barcode_EAN13();
- Barcode_EAN13( QValueVector<int> code );
+ Barcode_EAN13( TQValueVector<int> code );
bool isNull() const { return m_null; }
bool isValid() const;
- QValueVector<int> getNumbers() const;
- void setCode( QValueVector<int> code );
- QString toString() const;
+ TQValueVector<int> getNumbers() const;
+ void setCode( TQValueVector<int> code );
+ TQString toString() const;
bool operator!= ( const Barcode_EAN13 &code );
protected:
- QValueVector<int> m_numbers;
+ TQValueVector<int> m_numbers;
bool m_null;
};
@@ -91,43 +91,44 @@ namespace barcodeRecognition {
class Decoder_EAN13 {
public:
enum { BOTH_TABLES = 0, EVEN_TABLE = 1, ODD_TABLE = 2 };
- static Barcode_EAN13 recognize( QValueVector< QValueVector<int> > fields );
- static QValueVector<int> decode( QValueVector< QValueVector<int> > fields, int start_i, int end_i );
- static MatchMakerResult recognizeNumber( QValueVector< QValueVector<int> > fields, int code_table_to_use );
+ static Barcode_EAN13 recognize( TQValueVector< TQValueVector<int> > fields );
+ static TQValueVector<int> decode( TQValueVector< TQValueVector<int> > fields, int start_i, int end_i );
+ static MatchMakerResult recognizeNumber( TQValueVector< TQValueVector<int> > fields, int code_table_to_use );
static MatchMakerResult recognizeSystemCode( bool parity_pattern[6] );
};
/** \brief this thread handles barcode recognition using webcams
* @author Sebastian Held <[email protected]>
*/
- class barcodeRecognitionThread : public QObject, public QThread {
+ class barcodeRecognitionThread : public TQObject, public TQThread {
Q_OBJECT
+ TQ_OBJECT
public:
barcodeRecognitionThread();
~barcodeRecognitionThread();
virtual void run();
void stop();
- void recognizeBarcode( QImage img );
+ void recognizeBarcode( TQImage img );
bool isWebcamAvailable();
signals:
- void recognized( QString barcode );
- void gotImage( QImage &img );
+ void recognized( TQString barcode );
+ void gotImage( TQImage &img );
protected:
volatile bool m_stop;
- QImage m_barcode_img;
- QMutex m_stop_mutex, m_barcode_img_mutex;
+ TQImage m_barcode_img;
+ TQMutex m_stop_mutex, m_barcode_img_mutex;
barcode_v4l *m_barcode_v4l;
- Barcode_EAN13 recognize( QImage img );
- Barcode_EAN13 recognizeCode( QImage img, int x1, int x2, int y );
- void addNumberToPossibleNumbers( QValueVector<int> number, int possible_numbers[10][13][2], bool correct_code );
+ Barcode_EAN13 recognize( TQImage img );
+ Barcode_EAN13 recognizeCode( TQImage img, int x1, int x2, int y );
+ void addNumberToPossibleNumbers( TQValueVector<int> number, int possible_numbers[10][13][2], bool correct_code );
void sortDigits( int possible_numbers[10][13][2] );
Barcode_EAN13 extractBarcode( int possible_numbers[10][13][2] );
- QValueVector<int> transformPathToBW( QValueVector<QRgb> line);
- QValueVector< QValueVector<int> > extractFieldInformation( QValueVector<int> string );
+ TQValueVector<int> transformPathToBW( TQValueVector<TQRgb> line);
+ TQValueVector< TQValueVector<int> > extractFieldInformation( TQValueVector<int> string );
Barcode_EAN13 detectValidBarcode ( int possible_numbers[10][13][2], int max_amount_of_considered_codes );
bool isValid( int numbers[13] );
- bool isValid( QValueVector<int> numbers );
+ bool isValid( TQValueVector<int> numbers );
void printArray( int array[10][13][2], int level );
};
}