#include "CableTestBench.h" #include CCableTestBench::CCableTestBench(QObject *parent) : QObject(parent) { w = new MainWindow(0,this); } CCableTestBench::~CCableTestBench() { delete w; } int CCableTestBench::Start() { // w->showMaximized(); w->show(); mMainPageHandle = w->mMainPage; mVisualInspPageHandle = w->mVisualInspPage; return 1; } quint8 CCableTestBench::DecToBCDByte(const quint8 byte) { quint8 out = 0; out = ((byte/10) << 4) + (byte%10); return out; } quint16 CCableTestBench::DecToBCDWord(const quint16 word) { quint16 out = 0; quint16 temp = 0; out = word % 10; temp = (((word /10) % 10) << 4); out += temp; temp = (((word / 100) % 10) << 8); out += temp; temp = (((word / 1000) % 10) << 12); out += temp; return out; }