资源简介
C++ 条码,二维码生成程序(Qt 界面),整合 BarCode,QREncode 两个开源库, 当然也有扫描识别部分没加进来 ,扫描识别使用 zxing opensource project, 已经测试过,有 android(java) 和 C++ 版本,有时间再整理上传。

代码片段和文件信息
/*
* codabar.c -- encoding for Codabar
*
* Copyright (c) 2000 Leonid A. Broukhis (leob@mailcom.com)
* Copyright (c) 2010 2011 Giuseppe Scrivano (gscrivano@gnu.org)
*
* 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 3 of the License or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not see .
*/
#include “barcode.h“
#include
#include
#include
#include
#include
/* this is ordered in decades to simplify encoding */
static char alphabet[] =
“0123456789“ “-$:/.+ABCD“;
#define CODE_A 16
#define CODE_B 17
#define NARROW 12
#define WIDE 14
/* Patterns */
static char *patterns[] = {
“1111133““1111331““1113113““3311111““1131131“
“3111131““1311113““1311311““1331111““3113111“
“1113311““1133111““3111313““3131113““3131311“
“1131313““1133131““1313113““1113133““1113331“ };
/*
* Check that the text can be encoded. Returns 0 or -1.
* If it‘s all lowecase convert to uppercase and accept it.
* If the first character is a letter (A to D) the last one must be too;
* no other character should be a letter.
*/
int Barcode_cbr_verify(char *text)
{
int i lower=0 upper=0;
int startpresent = 0;
if (!strlen(text))
return -1;
for (i=0; text[i]; i++) {
char * pos;
if (isupper(text[i])) upper++;
if (islower(text[i])) lower++;
pos = strchr(alphabettoupper(text[i]));
if (!pos)
return -1;
if (i == 0 && pos - alphabet >= CODE_A)
startpresent = 1;
else if (pos - alphabet >= CODE_A &&
(!startpresent || i != strlen(text) - 1))
return -1;
}
if (lower && upper)
return -1;
return 0;
}
static int add_one(char *ptr int code)
{
sprintf(ptr“1%s“ /* separator */ patterns[code]);
return 0;
}
/*
* The encoding functions fills the “partial“ and “textinfo“ fields.
* Lowercase chars are converted to uppercase
*/
int Barcode_cbr_encode(struct Barcode_Item *bc)
{
static char *text;
static char *partial; /* dynamic */
static char *textinfo; /* dynamic */
char *c *ptr *textptr;
int i code textpos usesum checksum = 0 startpresent;
if (bc->partial)
free(bc->partial);
if (bc->textinfo)
free(bc->textinfo);
bc->partial = bc->textinfo = NULL; /* safe */
if (!bc->encoding)
bc->encoding = strdup(“codabar“);
text = bc->ascii;
if (!text) {
bc->error = EINVAL;
return -1;
}
/* the partial code is 8 * (he
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 54784 2016-04-06 11:09 tootzoe_qr_bar_code\Qr_bar_code\BarCode.dll
文件 40246 2016-01-11 20:47 tootzoe_qr_bar_code\Qr_bar_code\icon.jpg
文件 119822 2014-12-22 00:07 tootzoe_qr_bar_code\Qr_bar_code\libgcc_s_dw2-1.dll
文件 1026062 2014-12-22 00:07 tootzoe_qr_bar_code\Qr_bar_code\libstdc++-6.dll
文件 49152 2014-12-22 00:07 tootzoe_qr_bar_code\Qr_bar_code\libwinpthread-1.dll
文件 31744 2015-10-13 03:45 tootzoe_qr_bar_code\Qr_bar_code\platforms\qminimal.dll
文件 669696 2015-10-13 03:45 tootzoe_qr_bar_code\Qr_bar_code\platforms\qoffscreen.dll
文件 1413632 2015-10-13 03:46 tootzoe_qr_bar_code\Qr_bar_code\platforms\qwindows.dll
文件 246784 2015-10-13 03:45 tootzoe_qr_bar_code\Qr_bar_code\plugins\imageformats\qjpeg.dll
文件 28672 2015-10-13 03:48 tootzoe_qr_bar_code\Qr_bar_code\plugins\imageformats\qsvg.dll
文件 804352 2015-10-13 03:44 tootzoe_qr_bar_code\Qr_bar_code\plugins\sqldrivers\qsqlite.dll
文件 72704 2015-10-13 03:44 tootzoe_qr_bar_code\Qr_bar_code\plugins\sqldrivers\qsqlmysql.dll
文件 50176 2016-04-06 10:23 tootzoe_qr_bar_code\Qr_bar_code\QrEncode.dll
文件 5391360 2015-11-28 22:52 tootzoe_qr_bar_code\Qr_bar_code\Qt5Core.dll
文件 5334528 2015-10-13 03:31 tootzoe_qr_bar_code\Qr_bar_code\Qt5Gui.dll
文件 1528832 2015-10-13 03:26 tootzoe_qr_bar_code\Qr_bar_code\Qt5Network.dll
文件 259072 2015-10-13 03:25 tootzoe_qr_bar_code\Qr_bar_code\Qt5Sql.dll
文件 331776 2015-10-13 03:48 tootzoe_qr_bar_code\Qr_bar_code\Qt5Svg.dll
文件 6541824 2015-10-13 03:37 tootzoe_qr_bar_code\Qr_bar_code\Qt5Widgets.dll
文件 1413632 2015-10-13 03:46 tootzoe_qr_bar_code\Qr_bar_code\qwindows.dll
文件 38912 2016-04-06 11:10 tootzoe_qr_bar_code\Qr_bar_code\testQRGenerator.exe
文件 4136 2016-04-05 22:32 tootzoe_qr_bar_code\win_src\libBarCode\barcode.h
文件 5014 2013-03-30 06:22 tootzoe_qr_bar_code\win_src\libBarCode\codabar.c
文件 5196 2013-03-30 06:22 tootzoe_qr_bar_code\win_src\libBarCode\code11.c
文件 16986 2013-03-30 06:22 tootzoe_qr_bar_code\win_src\libBarCode\code128.c
文件 6691 2013-03-30 06:22 tootzoe_qr_bar_code\win_src\libBarCode\code39.c
文件 7013 2013-03-30 06:22 tootzoe_qr_bar_code\win_src\libBarCode\code93.c
文件 49044 2016-04-06 10:22 tootzoe_qr_bar_code\win_src\libBarCode\config.h
文件 20293 2013-03-30 06:23 tootzoe_qr_bar_code\win_src\libBarCode\ean.c
文件 4570 2013-03-30 06:23 tootzoe_qr_bar_code\win_src\libBarCode\i25.c
............此处省略144个文件信息
- 上一篇:JAVA微信支付退款接口demo
- 下一篇:android获取焦点后按钮变大
相关资源
- java实现POS系统源码
- 扫描二维码 JAVA实现20190403
- 基于RocketMQ的MQTT消息推送服务器分布
- 实现android端的类似二维码的扫描窗口
- Android之实现扫描二维码并生成二维码
- Java生成和识别二维码Zxing2.2 支持JDK
- java 生成二维码 且中间 带图片(log
- .NET C#利用ZXing生成、识别二维码/条形
- java连接mqtt所需jar包.zip
- zxing扫码用于Android手机
- android studio zxing二维码扫描 超级简单
- 二维码jar资源
- Qt调用Android原生Toast控件,含源码
- 二维码生成jar包地址
- Android ZXing二维码——集成本地图片扫
- android MQTT 带SSL加密连接demo
- zxing jar包,支持jdk1.6,包括源码
- C++Qt5实现雷达及余晖扫描,探测发现
- QRCode.jar 3.0 低积分
- java生成二维码,中间带logo,logo居中
- JAVA调用zpl条码打印机打印中文打印及
- Qt for Android 调用原生系统摄像头进行
- Qt for android打开原生系统相机和相册
- C++最强版中国象棋
- Android二维码源代码
- qrcode.jar和qrcode_swetake.jar
- android 二维码扫描页面Fragment 的实现
- android二维码扫描实用案例源码
- Android开发二维码的生成和扫一扫功能
- Delphi10.3二维码扫描源码.zip
评论
共有 条评论