资源简介
输入字符串自动转换二维码图案,并支持打印机打印输出。
代码片段和文件信息
/*
* QR Code generator library (C++)
*
* Copyright (c) Project Nayuki. (MIT License)
* https://www.nayuki.io/page/qr-code-generator-library
*
* Permission is hereby granted free of charge to any person obtaining a copy of
* this software and associated documentation files (the “Software“) to deal in
* the Software without restriction including without limitation the rights to
* use copy modify merge publish distribute sublicense and/or sell copies of
* the Software and to permit persons to whom the Software is furnished to do so
* subject to the following conditions:
* - The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
* - The Software is provided “as is“ without warranty of any kind express or
* implied including but not limited to the warranties of merchantability
* fitness for a particular purpose and noninfringement. In no event shall the
* authors or copyright holders be liable for any claim damages or other
* liability whether in an action of contract tort or otherwise arising from
* out of or in connection with the Software or the use or other dealings in the
* Software.
*/
#include “BitBuffer.hpp“
namespace qrcodegen {
BitBuffer::BitBuffer()
: std::vector() {}
std::vector BitBuffer::getBytes() const {
std::vector result(size() / 8 + (size() % 8 == 0 ? 0 : 1));
for (std::size_t i = 0; i < size(); i++)
result[i >> 3] |= (*this)[i] ? 1 << (7 - (i & 7)) : 0;
return result;
}
void BitBuffer::appendBits(std::uint32_t val int len) {
if (len < 0 || len > 31 || val >> len != 0)
throw “Value out of range“;
for (int i = len - 1; i >= 0; i--) // Append bit by bit
this->push_back(((val >> i) & 1) != 0);
}
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 1827 2018-06-25 05:02 genQrCode_ok\BitBuffer.cpp
文件 1895 2018-06-25 05:02 genQrCode_ok\BitBuffer.hpp
文件 1149 2018-06-28 22:46 genQrCode_ok\genQrCode_ok.pro
文件 23874 2018-09-11 15:39 genQrCode_ok\genQrCode_ok.pro.user
文件 18733 2018-06-09 17:05 genQrCode_ok\genQrCode_ok.pro.user.8737b3b
文件 167818 2014-03-08 17:31 genQrCode_ok\logo.png
文件 183 2018-06-09 17:03 genQrCode_ok\main.cpp
文件 1071 2018-07-03 14:24 genQrCode_ok\mainwindow.cpp
文件 465 2018-06-28 22:36 genQrCode_ok\mainwindow.h
文件 5335 2018-06-29 20:22 genQrCode_ok\mainwindow.ui
文件 19031 2018-06-09 18:12 genQrCode_ok\medal.png
文件 1174 2018-07-03 15:09 genQrCode_ok\myqrcode.cpp
文件 397 2018-07-03 11:28 genQrCode_ok\myqrcode.h
文件 20586 2018-06-25 05:02 genQrCode_ok\QrCode.cpp
文件 5777 2018-06-29 20:49 genQrCode_ok\qrcode.h
文件 12443 2018-06-25 05:02 genQrCode_ok\QrCode.hpp
文件 4284 2014-03-08 17:31 genQrCode_ok\qrencode\bitstream.c
文件 1432 2014-03-08 17:31 genQrCode_ok\qrencode\bitstream.h
文件 2708 2014-03-08 17:31 genQrCode_ok\qrencode\config.h
文件 6929 2014-03-08 17:31 genQrCode_ok\qrencode\mask.c
文件 1560 2014-03-08 17:31 genQrCode_ok\qrencode\mask.h
文件 4078 2014-03-08 17:31 genQrCode_ok\qrencode\mmask.c
文件 1404 2014-03-08 17:31 genQrCode_ok\qrencode\mmask.h
文件 7063 2014-03-08 17:31 genQrCode_ok\qrencode\mqrspec.c
文件 4774 2014-03-08 17:31 genQrCode_ok\qrencode\mqrspec.h
文件 20071 2014-03-08 17:31 genQrCode_ok\qrencode\qrencode.c
文件 20916 2014-03-08 17:31 genQrCode_ok\qrencode\qrencode.h
文件 2778 2014-03-08 17:31 genQrCode_ok\qrencode\qrencode_inner.h
文件 38941 2014-03-08 17:31 genQrCode_ok\qrencode\qrinput.c
文件 3651 2014-03-08 17:31 genQrCode_ok\qrencode\qrinput.h
............此处省略15个文件信息
- 上一篇:KendoUI的速查手册
- 下一篇:三菱PLC温度控制
相关资源
- Qt自定义鼠标点击样式
- paho.mqtt.c-1.3.1
- 嵌入式毕业设计
- STM32单片机实现二维码显示
- Qt Creator应用程序发布及修改应用程序
- MuWinWindow.rar
- QPushButton和QListView实现自定义QcomboBo
- STM32F1单片机+四元数欧拉角姿态解算
- zedboard移植opencv+qt的人脸检测
- QT串口通信程序
- Qt开发的文本编辑器
- Linux下Qt开发的中国象棋
- jz2440的DHT11驱动 +QT5.6的温湿度监测系
- qt aes加密 源代码
- 多平台QT USB设备热插拔检测库
- qt面试相关
- MyGraphics.rar
- QTP10破解
- 二叉树指定第i层输出以及打印叶子结
- CXF 文件记录报文日志,非控制台打印
- 基于QT聊天室设计+部分论文内容
- qt5QjsonDemo
- Qt写的网络版五子棋游戏源代码
- Qt写的单机版的五子棋游戏源代码
- QT5.9.2+OpenGL,使用最新的QOpenGLWidget框
- 安科9.2破解工具
- 基于qt实现的画图板
- 编写QT键盘插件自定义GPIO按键
- QT vs2013编译 x64 patch
- QT Graphiview中的graphicItem的各种变化
评论
共有 条评论