需求
电脑端通过条码打印机TSC-TTP244 Pro:
1. 打印出尺寸为60*30cm
2. 条码打印机TSC-TTP244 Pro 不干胶纸 (不需要碳带,热敏纸)
3. windows系统要求用QT编写程序,并加上必要的注释(所有源代码要给我们,包括SDK)
4. 界面需要适应不同分辨率的电脑
5. 条码样式如下:
Demo
硬件:条码打印机TSC 244 Pro
v1.0.0
class TscPrinterManager : public QObject { Q_OBJECT private: explicit TscPrinterManager(QObject *parent = 0); signals: public slots: public: static TscPrinterManager *getInstance(); public: bool initPrinter(); void abount(); void test(); bool printHengYaHanJieFa(QString vType, int v1, int v2, int v3, int v4, int vS1, int vS2, int vS3, int vS4, QString model, int num); bool printHengLiuHanJieFa(QString vType, int v1, int v2, int v3, int v4, int vS1, int vS2, int vS3, int vS4, QString model, int num); QString getDevName() const; void setDevName(const QString &devName); private: QLibrary _library; QString _libName; QString _devName; QTextCodec *_pTextCodec; private: // 打印机函数 文档中共20个函数,当前初始化13个 function_about _pFunAbout; function_openport _pFunOpenPort; function_closeport _pFunClosePort; function_barcode _pFunBarcode; function_clearBuffer _pFunClearBuffer; function_downloadpcx _pFunDownLoadPcx; function_formfeed _pFunFromFeed; function_nobackfeed _pFunNobackFeed; function_printerfont _pFunPrinterFont; function_printlabel _pFunPrintLabel; function_sendcommand _pFunSendCommand; function_setup _pFunSetup; function_windowsfont _pFunWindowsFont; function_windowsunicode _pFunWindowsUnicode; private: static TscPrinterManager *_pInstance; static QMutex _mutex; };