45 lines
875 B
Plaintext
45 lines
875 B
Plaintext
#ifndef QBARCODE_H
|
|
#define QBARCODE_H
|
|
|
|
#include <QDialog>
|
|
#include "barcode.h"
|
|
#include "QGraphicsScene"
|
|
#include "QGraphicsPixmapItem"
|
|
|
|
namespace Ui {
|
|
class QBarCode;
|
|
}
|
|
|
|
class QBarCode : public QDialog
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit QBarCode(QWidget *parent = 0);
|
|
~QBarCode();
|
|
unsigned char pointMap[40*1000];
|
|
QString pictureName;//当前显示的图片
|
|
private slots:
|
|
void onEnCodeBar();
|
|
|
|
private:
|
|
void ShowBarCode(QString fileName);
|
|
int Barcode_Encode_and_Print(char *text, FILE *f, int wid, int hei,
|
|
int xoff, int yoff, int flags);
|
|
int Barcode_ToImage(Barcode_Item * bc );
|
|
|
|
QGraphicsScene *scene;//声明scene
|
|
QGraphicsPixmapItem *item;//声明item
|
|
|
|
QString bcPartial;
|
|
QString bcTextinfo;
|
|
QString bcText;
|
|
int bcWidth,bcHeight;
|
|
|
|
|
|
private:
|
|
Ui::QBarCode *ui;
|
|
};
|
|
|
|
#endif // QBARCODE_H
|