Logo Search packages:      
Sourcecode: kbarcode version File versions  Download package

void BarCode::setHaveBarcode (  )  [static, inherited]

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 QValueList 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 also:
haveBarcode()

haveTBarcode()

havePDFBarcode()

Definition at line 529 of file mybarcode.cpp.

{
    m_haveGnuBarcode = !KStandardDirs::findExe( "barcode" ).isNull();
    m_havePdfEncode = !KStandardDirs::findExe( "pdf417_enc" ).isNull();
    m_haveTBarcode = !KStandardDirs::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( "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 ) );
        }
    }
}


Generated by  Doxygen 1.6.0   Back to index