#include "quiembroidery.h"

Quiembroidery::Quiembroidery()
{
    //添加各种参数到列表中
    initSpindleTestParasList();
    initRootParasList();
    initRootTraverseSetParasList();
    initRootHMIConfigurationList(m_allParasList);//超级用户界面配置
    initRootIOTConfigurationList(m_allParasList); //超级用户物联网配置
    initLockTestParasList();
    initColorPatternPatchParasList();
    initNeedlePatternPatchParasList();
    initPatternsParasList();
    initPatternOutlineParasList();
    initSoftwareParasList(m_allParasList);
    initTimeParasList(m_allParasList);
    initEmbCommonFunParasList(m_allParasList);
    initMcParasList();
    initWkParasList();
    initHeadParasList();
    initEXBUpgradeParaList();
    //初始化控制动作列表
    initOutCtrlList();

    //初始化快捷功能列表
    initShortCutList();

    //初始化辅助功能列表
    initAssistList();

    //初始化花样设置功能列表
    initPatternSetList();

    //初始化参数设置功能列表
    initParaSetList();

    //初始化刺绣功能列表
    initEmbFunctionList();

    //初始化传感器列表
    initSensorList();

    //初始化错误代码列表
    initErrorCodeAndStateList();
}

Quiembroidery::~Quiembroidery()
{

}

//主轴研车(试机)参数
void Quiembroidery::initSpindleTestParasList()
{
    // 平绣主轴圈数, 范围 1--S32_MAX，单位无，默认 1
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_SPINDLETEST,
                                        0,1, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Embroidery spindle circle"),// 平绣主轴圈数
                                        1, 1, S32_MAX, 1, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0001, operate));

    // 平绣主轴转速, 范围 1--3000，单位r/min，默认 1000
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_SPINDLETEST,
                                        0,
                                        2, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Spindle speed of embroidery"),// 平绣主轴转速
                                        1000, 1, 3000, 1000, 0, tr("r/min"), tr(""),
                                        tr(""), 0, 0, 0x0002, operate));
}

//超级用户参数(包括机器参数、工作参数和遍历设置)
void Quiembroidery::initRootParasList()
{
    //超级用户参数---------------------------
    //绣花机-超级用户参数-界面配置；单位：无
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_ROOT,
                                        0 ,
                                        ROOT_HMICONFIGURATION, 0, 0, PARA_VALUE_TYPE_CLICK,
                                        tr("HMI Configuration"),//界面配置
                                        0, 0, 0, 0, 0, tr(""), tr(""),
                                        tr(""),
                                        0, 0, 0x0000 , factory));

    //超级用户参数-界面进入调试模式；单位：无
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_ROOT,
                                        0 ,
                                        ROOT_DEBUGMODE, 0, 0, PARA_VALUE_TYPE_CLICK,
                                        tr("Interface debug mode"),//界面进入调试模式
                                        0, 0, 0, 0, 0, tr(""), tr(""),
                                        tr(""),
                                        0, 0, 0x0001 , root));

    //超级用户参数-删除config.ini配置文件；单位：无
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_ROOT,
                                        0 ,
                                        ROOT_DELETEINI, 0, 0, PARA_VALUE_TYPE_CLICK,
                                        tr("Delete configure file"),//删除配置文件
                                        0, 0, 0, 0, 0, tr(""), tr(""),
                                        tr(""),
                                        0, 0, 0x0001 , root));

    //绣花机-超级用户参数-机器参数；单位：无
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_ROOT,
                                        0 ,
                                        ROOT_MACHINEPARA, 0, 0, PARA_VALUE_TYPE_CLICK,
                                        tr("Machine parameters"),//机器参数
                                        0, 0, 0, 0, 0, tr(""), tr(""),
                                        tr(""),
                                        0, 0, 0x0001, factory));

    //绣花机-超级用户参数-工作参数；单位：无
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_ROOT,
                                        0 ,
                                        ROOT_WORKPARA, 0, 0, PARA_VALUE_TYPE_CLICK,
                                        tr("Work parameters"),//工作参数
                                        0, 0, 0, 0, 0, tr(""), tr(""),
                                        tr(""),
                                        0, 0, 0x0002, factory));

    //绣花机-超级用户参数-机头板参数；单位：无    -rq
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_ROOT,
                                        0 ,
                                        ROOT_EMBHEADPARAMETER, 0, 0, PARA_VALUE_TYPE_CLICK,
                                        tr("EMB head board parameters"),//平绣机头板参数
                                        0, 0, 0, 0, 0, tr(""), tr(""),
                                        tr(""),
                                        0, 0, 0x0003, factory));

    //绣花机-超级用户参数-花样参数；单位：无
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_ROOT,
                                        0 ,
                                        ROOT_PATTERNPARAMETERS, 0, 0, PARA_VALUE_TYPE_CLICK,
                                        tr("Pattern parameters"),//花样参数
                                        0, 0, 0, 0, 0, tr(""), tr(""),
                                        tr(""),
                                        0, 0, 0x0004, factory));

    //绣花机-超级用户参数-遍历设置；单位：无
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_ROOT,
                                        0 ,
                                        ROOT_TRAVERSESET, 0, 0, PARA_VALUE_TYPE_CLICK,
                                        tr("Traverse settings"),//遍历设置
                                        0, 0, 0, 0, 0, tr(""), tr(""),
                                        tr(""),
                                        0, 0, 0x0005, factory));

    //绣花机-超级用户参数-机头板总线检测；单位：无
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_ROOT,
                                        0 ,
                                        ROOT_HEADBOARDBUSDETECT, 0, 0, PARA_VALUE_TYPE_CLICK,
                                        tr("Machine head board bus detection"),//机头板总线检测
                                        0, 0, 0, 0, 0, tr(""), tr(""),
                                        tr(""),
                                        0, 0, 0x0006, factory));

    //绣花机-超级用户参数-自动定软限位；单位：无
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_ROOT,
                                        0 ,
                                        ROOT_AUTOSETSOFTLIMIT, 0, 0, PARA_VALUE_TYPE_CLICK,
                                        tr("Auto set softlimit"),//自动定软限位
                                        0, 0, 0, 0, 0, tr(""), tr(""),
                                        tr(""),
                                        0, 0, 0x0007, factory));

    //绣花机-超级用户参数-平绣锁头测试；单位：无
//    m_allParasList.append(makeAParaItem(0,
//                                        PARA_TYPE_ROOT,
//                                        0 ,
//                                        ROOT_EMBLOCKTEST, 0, 0, PARA_VALUE_TYPE_CLICK,
//                                        tr("EMB lock test"),//平绣锁头电机测试
//                                        0, 0, 0, 0, 0, tr(""), tr(""),
//                                        tr(""),
//                                        0, 0, 0x0008, factory));

    //绣花机-超级用户参数-平绣勾刀测试；单位：无
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_ROOT,
                                        0 ,
                                        ROOT_EMBHOOKTEST, 0, 0, PARA_VALUE_TYPE_CLICK,
                                        tr("EMB hook test"),//平绣勾刀测试
                                        0, 0, 0, 0, 0, tr(""), tr(""),
                                        tr(""),
                                        0, 0, 0x0009, factory));

     //绣花机-超级用户参数-花样总清；单位：无
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_ROOT,
                                        0 ,
                                        ROOT_CLEARPATTERN, 0, 0, PARA_VALUE_TYPE_CLICK,
                                        tr("Pattern clear"),//花样总清
                                        0, 0, 0, 0, 0, tr(""), tr(""),
                                        tr(""),
                                        0, 0, 0x000A, factory));

    //绣花机-超级用户参数-界面解密；单位：无
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_ROOT,
                                        0 ,
                                        ROOT_HMIDECRYPT, 0, 0, PARA_VALUE_TYPE_CLICK,
                                        tr("HMI decrypt"),//界面解密
                                        0, 0, 0, 0, 0, tr(""), tr(""),
                                        tr(""),
                                        0, 0, 0x000B, factory));

    //绣花机-超级用户参数-修改一级密码；单位：无
    m_allParasList.append(makeAParaItem(0,
                                       PARA_TYPE_ROOT,
                                       0 ,
                                       ROOT_CHANGEPASSWORD, 0, 0, PARA_VALUE_TYPE_CLICK,
                                       tr("Modify the first level password"),//修改一级密码
                                       0, 0, 0, 0, 0, tr(""), tr(""),
                                       tr(""),
                                       0, 0, 0x000C, root));

    //超级用户参数-物联网配置;
    m_allParasList.append(makeAParaItem(0,
                                       PARA_TYPE_ROOT,
                                       0 ,
                                       ROOT_IOTCONFIGURATION, 0, 0, PARA_VALUE_TYPE_CLICK,
                                       tr("InternetofThings  configuration"),//物联网配置
                                       0, 0, 0, 0, 0, tr(""), tr(""),
                                       tr(""),
                                       0, 0, 0x000D, factory));

    //超级用户参数-动框角度设置;
    m_allParasList.append(makeAParaItem(0,
                                       PARA_TYPE_ROOT,
                                       0 ,
                                       ROOT_FRAMEANGLESETTING, 0, 0, PARA_VALUE_TYPE_CLICK,
                                       tr("Frame angle setting"),//动框角度设置
                                       0, 0, 0, 0, 0, tr(""), tr(""),
                                       tr(""),
                                       0, 0, 0x000E, factory));

    //超级用户参数-平绣主轴齿轮比测试;
    m_allParasList.append(makeAParaItem(0,
                                       PARA_TYPE_ROOT,
                                       0 ,
                                       ROOT_EMBSPINDlLEGEARRATIO, 0, 0, PARA_VALUE_TYPE_CLICK,
                                       tr("EMB Spindle Gear Ratio Test"),//平绣主轴齿轮比测试
                                       0, 0, 0, 0, 0, tr(""), tr(""),
                                       tr(""),
                                       0, 0, 0x000E, factory));

    //超级用户参数-测试平绣主轴编码器宽度
    m_allParasList.append(makeAParaItem(0,
                                       PARA_TYPE_ROOT,
                                       0 ,
                                       ROOT_FLAT_ECD_WIDTH, 0, 0, PARA_VALUE_TYPE_CLICK,
                                       tr("Test the width of the FLAT spindle encoder"),//测试平绣主轴编码器宽度
                                       0, 0, 0, 0, 0, tr(""), tr(""),
                                       tr(""),
                                       0, 0, 0x000E, factory));

    //超级用户参数-平绣设置可工作区域;
    m_allParasList.append(makeAParaItem(0,
                                       PARA_TYPE_ROOT,
                                       0 ,
                                       ROOT_EMBWORKAREA, 0, 0, PARA_VALUE_TYPE_CLICK,
                                       tr("EMB set working area"),//平绣设置可工作区域
                                       0, 0, 0, 0, 0, tr(""), tr(""),
                                       tr(""),
                                       0, 0, 0x000E, factory));

    //超级用户参数-动框参数导入;
    m_allParasList.append(makeAParaItem(0,
                                       PARA_TYPE_ROOT,
                                       0 ,
                                       ROOT_FRAMEIMPORTPARA, 0, 0, PARA_VALUE_TYPE_CLICK,
                                       tr("Frame parameter import"),//动框参数导入
                                       0, 0, 0, 0, 0, tr(""), tr(""),
                                       tr(""),
                                       0, 0, 0x000E, factory));

    //超级用户参数-动框参数导出;
    m_allParasList.append(makeAParaItem(0,
                                       PARA_TYPE_ROOT,
                                       0 ,
                                       ROOT_FRAMEEXPORTPARA, 0, 0, PARA_VALUE_TYPE_CLICK,
                                       tr("Frame parameter export"),//动框参数导出
                                       0, 0, 0, 0, 0, tr(""), tr(""),
                                       tr(""),
                                       0, 0, 0x000E, factory));


#ifdef Q_OS_WIN
    //绣花机-超级用户参数-退出程序；单位：无
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_ROOT,
                                        0 ,
                                        PSE_SOFTWAREPARA_EXIT, 0, 0, PARA_VALUE_TYPE_CLICK,
                                        tr("HMI exit"),//退出程序
                                        0, 0, 0, 0, 0, tr(""), tr(""),
                                        tr(""),
                                        0, 0, 0x000F, factory));
#endif
    //超级用户参数---------------------------
}

//超级用户遍历设置参数
void Quiembroidery::initRootTraverseSetParasList()
{
    //超级用户遍历设置参数---------------------------
    //绣花机-超级用户遍历设置参数-协议类型；单位：无 ,范围：目前就一个
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_ROOTTRAVERSE,
                                        0 ,
                                        0, 0, 0, PARA_VALUE_TYPE_LIST,
                                        tr("Agreement type"),//协议类型
                                        5, 5, 5, 5, 0, tr(""), tr(""),
                                        tr("HeadboardPact:5"),//机头板协议:5
                                        5, 5, 0x0000, factory));

        m_allParasList.append(makeAParaItem(0,
                                            PARA_TYPE_ROOTTRAVERSE,
                                            0 ,
                                            1, 0, 1, PARA_VALUE_TYPE_LIST,
                                            tr("Node type"),//节点类型
                                            FLATEMB, FLATEMB, TOWEL, FLATEMB, 0, tr(""), tr(""),
                                            (tr("FlatEmbroidery:")+QString::number(FLATEMB)+";"),
                                            FLATEMB, FLATEMB, 0x0001, factory));


    //绣花机-超级用户遍历设置参数-遍历次数；单位：无 ,范围1或机头个数(只有这两个数)
    //全部遍历模式的机头个数需要从主控读取，这里设置为2，写入主控时需要用机头个数去设置
    //单独遍历模式是1
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_ROOTTRAVERSE,
                                        0 ,
                                        2, 0, 0, PARA_VALUE_TYPE_LIST,
                                        tr("Number of traverses"),//遍历次数
                                        1, 1, 2, 1, 0, tr(""), tr(""),
                                        tr("TraverseAlone:1;TraverseAll:2"),//单独遍历:1;全部遍历:2
                                        1, 1, 0x0002, factory));

    //绗绣机-超级用户遍历设置参数-机头号(起始ID)；单位：无，范围1-128，默认1
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_ROOTTRAVERSE,
                                        0 ,
                                        0, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Nose number"),//机头号
                                        1, 1, 128, 1, 0, tr(""), tr(""),
                                        tr(""),0, 0, 0x0003, factory));

    // 平绣机头个数，无单位， 范围1-32，默认1，只读，不可改变,
    // 此参数索引值为2不可改变，这是机器参数的参数索引值
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_ROOTTRAVERSE,//父类为遍历参数
                                        PARA_TYPE_MACH,//子类为机器参数
                                        2, 0, 1, PARA_VALUE_TYPE_INT,
                                        tr("Number of EMB heads"),// 平绣机头个数
                                        1, 1, 128, 1, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0010, factory));

    // 机头1-16遍历状态显示，无单位， 范围0-15，默认0，只读，
    // 此参数是实时显示机头1-16遍历状态的参数，类似于传感器信号
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_ROOTTRAVERSE,//遍历参数
                                        ROOT_SORT_EMBSENSOR,
                                        1, 0, 1, PARA_VALUE_TYPE_NONE,
                                        tr(""),
                                        0, 0, 15, 0, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0011, factory));

    // 机头17-32遍历状态显示，无单位， 范围16-31，默认16，只读，
    // 此参数是实时显示机头17-32遍历状态的参数，类似于传感器信号
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_ROOTTRAVERSE,//遍历参数
                                        ROOT_SORT_EMBSENSOR,//纯平绣
                                        2, 0, 1, PARA_VALUE_TYPE_NONE,
                                        tr(""),
                                        16, 16, 31, 16, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0012, factory));

    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_ROOTTRAVERSE,//遍历参数
                                        ROOT_SORT_CHENSENSOR,//毛巾  缠绕  平绣
                                        1, 0, 1, PARA_VALUE_TYPE_NONE,
                                        tr(""),
                                        0, 0, 15, 0, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0013, factory));

    //超级用户遍历设置参数---------------------------
}

//锁头测试参数
void Quiembroidery::initLockTestParasList()
{
    // 模拟主轴转速, 范围 1--1000，单位r/min，默认 700
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_EMBLOCKTEST,
                                        0,
                                        1, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Simulated spindle speed"),// 模拟主轴转速
                                        700, 1, 1000, 700, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0001, factory));
}

//花样按色贴布绣参数
void Quiembroidery::initColorPatternPatchParasList()
{
    //花样按色贴布绣参数---------------------------
    //绣花机-花样按色贴布绣参数；单位：mm ，范围0-65536，默认0
    //色序对应得贴布绣设置,只初始化一个,剩下的在贴布绣功能代码中自动生成
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_PATTERNPATCH_COLOR,
                                        PATCH_SORT_COLOR ,
                                        1, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr(""),
                                        0, 0, 65536, 0, 2, tr("mm"), tr(""),
                                        tr(""), 0, 0, 0x0000, operate));
    //花样按色贴布绣参数---------------------------
}

//花样按针贴布绣参数
void Quiembroidery::initNeedlePatternPatchParasList()
{
    //花样按针贴布绣参数---------------------------
    //绣花机-花样按针贴布绣参数；针数索引1，单位：无 ，范围0-S32_MAX，默认0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_PATTERNPATCH_NEEDLE,
                                        PATCH_SORT_IDX ,
                                        1, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Needle index 1"),
                                        0, 0, S32_MAX, 0, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0001, operate));

    //绣花机-花样按针贴布绣参数；相应针数移动的距离，单位：mm ，范围0-65536，默认0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_PATTERNPATCH_NEEDLE,
                                        PATCH_SORT_MOVE ,
                                        1, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Needle index 1 move distance"),
                                        0, 0, 65536, 0, 2, tr("mm"), tr(""),
                                        tr(""), 0, 0, 0x0001, operate));

    //绣花机-花样按针贴布绣参数；针数索引2，单位：无 ，范围0-S32_MAX，默认0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_PATTERNPATCH_NEEDLE,
                                        PATCH_SORT_IDX ,
                                        2, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Needle index 2"),
                                        0, 0, S32_MAX, 0, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0002, operate));

    //绣花机-花样按针贴布绣参数；相应针数移动的距离，单位：mm ，范围0-65536，默认0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_PATTERNPATCH_NEEDLE,
                                        PATCH_SORT_MOVE ,
                                        2, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Needle index 2 move distance"),
                                        0, 0, 65536, 0, 2, tr("mm"), tr(""),
                                        tr(""), 0, 0, 0x0002, operate));

    //绣花机-花样按针贴布绣参数；针数索引3，单位：无 ，范围0-S32_MAX，默认0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_PATTERNPATCH_NEEDLE,
                                        PATCH_SORT_IDX ,
                                        3, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Needle index 3"),
                                        0, 0, S32_MAX, 0, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0003, operate));

    //绣花机-花样按针贴布绣参数；相应针数移动的距离，单位：mm ，范围0-65536，默认0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_PATTERNPATCH_NEEDLE,
                                        PATCH_SORT_MOVE ,
                                        3, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Needle index 3 move distance"),
                                        0, 0, 65536, 0, 2, tr("mm"), tr(""),
                                        tr(""), 0, 0, 0x0003, operate));

    //绣花机-花样按针贴布绣参数；针数索引4，单位：无 ，范围0-S32_MAX，默认0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_PATTERNPATCH_NEEDLE,
                                        PATCH_SORT_IDX ,
                                        4, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Needle index 4"),
                                        0, 0, S32_MAX, 0, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0004, operate));

    //绣花机-花样按针贴布绣参数；相应针数移动的距离，单位：mm ，范围0-65536，默认0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_PATTERNPATCH_NEEDLE,
                                        PATCH_SORT_MOVE ,
                                        4, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Needle index 4 move distance"),
                                        0, 0, 65536, 0, 2, tr("mm"), tr(""),
                                        tr(""), 0, 0, 0x0004, operate));

    //绣花机-花样按针贴布绣参数；针数索引5，单位：无 ，范围0-S32_MAX，默认0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_PATTERNPATCH_NEEDLE,
                                        PATCH_SORT_IDX ,
                                        5, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Needle index 5"),
                                        0, 0, S32_MAX, 0, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0005, operate));

    //绣花机-花样按针贴布绣参数；相应针数移动的距离，单位：mm ，范围0-65536，默认0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_PATTERNPATCH_NEEDLE,
                                        PATCH_SORT_MOVE ,
                                        5, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Needle index 5 move distance"),
                                        0, 0, 65536, 0, 2, tr("mm"), tr(""),
                                        tr(""), 0, 0, 0x0005, operate));

    //绣花机-花样按针贴布绣参数；针数索引6，单位：无 ，范围0-S32_MAX，默认0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_PATTERNPATCH_NEEDLE,
                                        PATCH_SORT_IDX ,
                                        6, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Needle index 6"),
                                        0, 0, S32_MAX, 0, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0006, operate));

    //绣花机-花样按针贴布绣参数；相应针数移动的距离，单位：mm ，范围0-65536，默认0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_PATTERNPATCH_NEEDLE,
                                        PATCH_SORT_MOVE ,
                                        6, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Needle index 6 move distance"),
                                        0, 0, 65536, 0, 2, tr("mm"), tr(""),
                                        tr(""), 0, 0, 0x0006, operate));

    //绣花机-花样按针贴布绣参数；针数索引7，单位：无 ，范围0-S32_MAX，默认0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_PATTERNPATCH_NEEDLE,
                                        PATCH_SORT_IDX ,
                                        7, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Needle index 7"),
                                        0, 0, S32_MAX, 0, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0007, operate));

    //绣花机-花样按针贴布绣参数；相应针数移动的距离，单位：mm ，范围0-65536，默认0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_PATTERNPATCH_NEEDLE,
                                        PATCH_SORT_MOVE ,
                                        7, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Needle index 7 move distance"),
                                        0, 0, 65536, 0, 2, tr("mm"), tr(""),
                                        tr(""), 0, 0, 0x0007, operate));

    //绣花机-花样按针贴布绣参数；针数索引8，单位：无 ，范围0-S32_MAX，默认0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_PATTERNPATCH_NEEDLE,
                                        PATCH_SORT_IDX,
                                        8, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Needle index 8"),
                                        0, 0, S32_MAX, 0, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0008, operate));

    //绣花机-花样按针贴布绣参数；相应针数移动的距离，单位：mm ，范围0-65536，默认0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_PATTERNPATCH_NEEDLE,
                                        PATCH_SORT_MOVE ,
                                        8, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Needle index 8 move distance"),
                                        0, 0, 65536, 0, 2, tr("mm"), tr(""),
                                        tr(""), 0, 0, 0x0008, operate));

    //绣花机-花样按针贴布绣参数；针数索引9，单位：无 ，范围0-S32_MAX，默认0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_PATTERNPATCH_NEEDLE,
                                        PATCH_SORT_IDX ,
                                        9, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Needle index 9"),
                                        0, 0, S32_MAX, 0, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0009, operate));

    //绣花机-花样按针贴布绣参数；相应针数移动的距离，单位：mm ，范围0-65536，默认0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_PATTERNPATCH_NEEDLE,
                                        PATCH_SORT_MOVE ,
                                        9, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Needle index 9 move distance"),
                                        0, 0, 65536, 0, 2, tr("mm"), tr(""),
                                        tr(""), 0, 0, 0x0009, operate));

    //绣花机-花样按针贴布绣参数；针数索引10，单位：无 ，范围0-S32_MAX，默认0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_PATTERNPATCH_NEEDLE,
                                        PATCH_SORT_IDX ,
                                        10, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Needle index 10"),
                                        0, 0, S32_MAX, 0, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x000A, operate));

    //绣花机-花样按针贴布绣参数；相应针数移动的距离，单位：mm ，范围0-65536，默认0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_PATTERNPATCH_NEEDLE,
                                        PATCH_SORT_MOVE ,
                                        10, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Needle index 10 move distance"),
                                        0, 0, 65536, 0, 2, tr("mm"), tr(""),
                                        tr(""), 0, 0, 0x000A, operate));
    //花样按针贴布绣参数---------------------------
}

//花样参数
void Quiembroidery::initPatternsParasList()
{
    QTextCodec *cod = QTextCodec::codecForLocale();

    //花样参数---------------------------

    //绣花机-花样参数-花样设置参数-翻转式样；单位：无 ，范围0-7，默认0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_PATTERN,
                                        0 ,
                                        SET_ROTATESTYLE, 0, 0, PARA_VALUE_TYPE_LIST,
                                        tr("Flip style"),//翻转式样
                                        0, 0, 7, 0, 0, tr(""), tr(""),
                                        tr("normalP:0;nRight90P:1;nRight180P:2;nRight270P:3;mirrorP:4;mRight90P:5;mRight180P:6;mRight270P:7"),
                                        0, 0, 0x0000, operate));

    //绣花机-花样参数-花样设置参数-旋转角度；单位：° ，范围0-90，默认0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_PATTERN,
                                        0 ,
                                        SET_ROTATEANGLE, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Rotation angle"),//旋转角度
                                        0, 0, 90, 0, 0, cod->toUnicode("°"), tr(""),//度
                                        tr(""), 0, 0,0x0001, operate));

    //绣花机-花样参数-花样设置参数-X向倍率；单位：% ，范围50-200，默认100
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_PATTERN,
                                        0 ,
                                        SET_XZOOM, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("X direction magnification"),//X向倍率
                                        0, 50, 200, 100, 0, tr("%"), tr(""),
                                        tr(""), 0, 0,0x0002, operate));

    //绣花机-花样参数-花样设置参数-Y向倍率；单位：% ，范围50-200，默认100
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_PATTERN,
                                        0 ,
                                        SET_YZOOM, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Y direction magnification"),//Y向倍率
                                        0, 50, 200,100, 0, tr("%"), tr(""),
                                        tr(""), 0, 0,0x0003, operate));

#if(0)
    //绣花机-花样参数-花样设置参数-反复方式；单位：无 ，范围0-3，默认0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_PATTERN,
                                        0 ,
                                        SET_REPEATSTYLE, 0, 0, PARA_VALUE_TYPE_LIST,
                                        tr("Iterative way"),//反复方式
                                        0, 0, 3, 0, 0, tr(""), tr(""),
                                        //通常反复:0;X轴对称:1;Y轴对称:2;XY对称:3
                                        tr("UsualRepeat:0;XSymmetry:1;YSymmetry:2;XYSymmetry:3"),
                                        0, 0, 0x0004, operate));
#endif

    //绣花机-花样参数-花样设置参数-优先次序；单位：无 ，范围0-1，默认0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_PATTERN,
                                        0 ,
                                        SET_PRIORITY, 0, 0, PARA_VALUE_TYPE_LIST,
                                        tr("Priority"),//优先次序
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        //先绣横向:0;先绣纵向:1
                                        tr("HorFirst:0;VerFirst:1"),
                                        0, 0, 0x0005, operate));

    //绣花机-花样参数-花样设置参数-X向反复次数；单位：无 ，范围1-200，默认1
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_PATTERN,
                                        0 ,
                                        SET_XREPEATNUM, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("X repetition times"),//X向反复次数
                                        0, 1, 200, 1, 0, tr(""), tr(""),
                                        tr(""), 0, 0,0x0006, operate));

    //绣花机-花样参数-花样设置参数-Y向反复次数；单位：无 ，范围1-200，默认1
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_PATTERN,
                                        0 ,
                                        SET_YREPEATNUM, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Y repetition times"),//Y向反复次数
                                        0, 1, 200, 1, 0, tr(""), tr(""),
                                        tr(""), 0, 0,0x0007, operate));

    //绣花机-花样参数-花样设置参数-X向反复间距；单位：mm ，范围-30000-30000，默认0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_PATTERN,
                                        0 ,
                                        SET_XREPEATSPACE, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("X repetition space"),//X向反复间距
                                        0, -30000, 30000, 0, 1, tr("mm"), tr(""),
                                        tr(""), 0, 0,0x0008, operate));

    //绣花机-花样参数-花样设置参数-Y向反复间距；单位：mm ，范围-30000-30000，默认0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_PATTERN,
                                        0 ,
                                        SET_YREPEATSPACE, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Y repetition space"),//Y向反复间距
                                        0, -30000, 30000, 0, 1, tr("mm"), tr(""),
                                        tr(""), 0, 0,0x0009, operate));
#if(0)
    //绣花机-花样参数-花样设置参数-针步补偿；单位：mm ，范围-1-1，默认0.2   -rq
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_PATTERN,
                                        0 ,
                                        SET_STEPCOMPENSATE, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Step compensate"),//针步补偿
                                        20, -100, 100, 20, 2, tr("mm"), tr(""),
                                        tr(""), 0, 0,0x000A, operate));

    //绣花机-超级用户花样参数-花样设置参数-针步补偿；单位：mm ，范围-1-1，默认0.2    -rq
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE__ROOT_PATTERN,
                                        0 ,
                                        SET_STEPCOMPENSATE, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Step compensate"),//针步补偿
                                        20, -100, 100, 20, 2, tr("mm"), tr(""),
                                        tr(""), 0, 0,0x000A, factory));
#endif
    //绣花机-花样参数-花样设置参数-锁针次数；单位：次 ，范围0-10，默认2
//    m_allParasList.append(makeAParaItem(0,
//                                        PARA_TYPE_PATTERN,
//                                        0 ,
//                                        SET_LOCKNEEDLESNUM, 0, 0, PARA_VALUE_TYPE_INT,
//                                        tr("Lock needle times"),//锁针次数
//                                        2, 0, 10, 2, 0, tr(""), tr(""),
//                                        tr(""), 0, 0,0x000A, operate));

    //绣花机-花样参数-花样设置参数-锁针步数；单位：步 ，范围0-10，默认1
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_PATTERN,
                                        0 ,
                                        SET_LOCKNEEDLESSTEPNUM, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Lock needle steps"),//锁针步数
                                        1, 0, 10, 1, 0, tr(""), tr(""),
                                        tr(""), 0, 0,0x000B, operate));//11

    //绣花机-花样参数-花样设置参数-锁针针步长度；单位：mm，范围0-100，默认100
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_PATTERN,
                                        0 ,
                                        SET_LOCKNEEDLESSTEPLENTH, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Lock needle step size"),//锁针针步长度
                                        100, 0, 100, 100, 2, tr("mm"), tr(""),
                                        tr(""), 0, 0,0x000C, operate));//12


    //绣花机-花样参数-花样设置参数-X向补偿；单位：mm ，-1-1，默认0.2
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_PATTERN,
                                        0 ,
                                        SET_XCOMPENSATE, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("X compensation"),//X向补偿
                                        20, -100, 100, 20, 2, tr("mm"), tr(""),
                                        tr(""), 0, 0,0x000D, operate));//13

    //绣花机-花样参数-花样设置参数-Y向补偿；单位：mm ，-1-1，默认0.2
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_PATTERN,
                                        0 ,
                                        SET_YCOMPENSATE, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Y compensation"),//Y向补偿
                                        20, -100, 100, 20, 2, tr("mm"), tr(""),
                                        tr(""), 0, 0,0x000E, operate));//14

    //绣花机-花样参数-花样设置参数-偏移点X向允许；单位：无 ，范围0-1，默认0，bit0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_PATTERN,
                                        0 ,
                                        SET_OFFSETPOINTXENFLAG, 1, 0, PARA_VALUE_TYPE_SW,//开关类型
                                        tr("Offset point X allowed"),//偏移点X向允许
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr(""), 0, 0,0x000F, operate));  //15

    //绣花机-花样参数-花样设置参数-偏移点Y向允许；单位：无 ，范围0-1，默认0，bit1
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_PATTERN,
                                        0 ,
                                        SET_OFFSETPOINTYENFLAG, 2, 0, PARA_VALUE_TYPE_SW,//开关类型
                                        tr("Offset point Y allowed"),//偏移点Y向允许
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr(""), 0, 0,0x0010, operate));//16

    //绣花机-花样参数-花样设置参数-偏移点X；单位0.01mm，默认0 ,范围 -2147483648--2147483647
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_PATTERN,
                                        0 ,
                                        SET_OFFSETPOINTX, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Offset point X"),//偏移点X
                                        0, S32_MIN, S32_MAX, 0, 2, tr("mm"), tr(""),
                                        tr(""), 0, 0,0x0011, operate));//17

    //绣花机-花样参数-花样设置参数-偏移点Y；单位0.01mm，默认0 ,范围 -2147483648--2147483647
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_PATTERN,
                                        0 ,
                                        SET_OFFSETPOINTY, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Offset point Y"),//偏移点Y
                                        0, S32_MIN, S32_MAX, 0, 2, tr("mm"), tr(""),
                                        tr(""), 0, 0,0x0012, operate));//18

    //绣花机-花样参数-花样设置参数-过滤针步长度；单位：mm ，-1-1，默认0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_PATTERN,
                                        0 ,
                                        SET_MINSTEP, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Filter needle step length"),//过滤针步长度
                                        0, 0, 80, 0, 2, tr("mm"), tr(""),
                                        tr(""), 0, 0,0x000E, operate));//14
    /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    //绣花机-超级用户花样参数-花样设置参数-x针步补偿；单位：mm ，范围-1-1，默认0.2    -rq
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE__ROOT_PATTERN,
                                        0 ,
                                        SET_XCOMPENSATE, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("X compensation"),//x针步补偿
                                        20, -100, 100, 20, 2, tr("mm"), tr(""),
                                        tr(""), 0, 0,0x000A, factory));

    //绣花机-超级用户花样参数-花样设置参数-y针步补偿；单位：mm ，范围-1-1，默认0.2    -rq
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE__ROOT_PATTERN,
                                        0 ,
                                        SET_YCOMPENSATE, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Y compensation"),//y针步补偿
                                        20, -100, 100, 20, 2, tr("mm"), tr(""),
                                        tr(""), 0, 0,0x000B, factory));

    //绣花机-超级用户花样参数-花样设置参数-锁针次数；单位:次  范围0-10，默认2    -lxs
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE__ROOT_PATTERN,
                                        0 ,
                                        SET_LOCKNEEDLESNUM, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Lock needle times"),//锁针次数
                                        2, 0, 10, 2, 0, tr(""), tr(""),
                                        tr(""), 0, 0,0x000C, factory));

    //绣花机-超级用户花样参数-花样设置参数-锁针步数；单位：步 ，范围0-10，默认1    -lxs
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE__ROOT_PATTERN,
                                        0 ,
                                        SET_LOCKNEEDLESSTEPNUM, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Lock needle steps"),//锁针步数
                                        1, 0, 10, 1, 0, tr(""), tr(""),
                                        tr(""), 0, 0,0x000D, factory));

    //绣花机-超级用户花样参数-花样设置参数-锁针针步长度；单位：mm ，范围0-100，默认100    -lxs
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE__ROOT_PATTERN,
                                        0 ,
                                        SET_LOCKNEEDLESSTEPLENTH, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Lock needle step size"),//锁针针步长度
                                        100, 0, 100, 100, 2, tr("mm"), tr(""),
                                        tr(""), 0, 0,0x000E, factory));


    //绣花机-超级用户花样参数- 花样设置参数-过滤针步长度；单位：mm ，-1-1，默认0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE__ROOT_PATTERN,
                                        0 ,
                                        SET_MINSTEP, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Filter needle step length"),//过滤针步长度
                                        0, 0, 80, 0, 2, tr("mm"), tr(""),
                                        tr(""), 0, 0,0x000E, factory));

    //绣花机-花样参数-花样设置参数-跳针变越框锁针针数；单位：无，范围0-20，默认3
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_PATTERN,
                                        0 ,
                                        SET_JUMPNEEDLECHANGE, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Skip stitch to cross frame lock stitch count"),//跳针变越框锁针针数
                                        3, 0, 20, 3, 0, tr(""), tr(""),
                                        tr(""), 0, 0,0x000E, operate));//12

    //花样参数---------------------------
}

//花样轮廓参数
void Quiembroidery::initPatternOutlineParasList()
{
    //花样轮廓参数---------------------------
    //绣花机-花样轮廓参数-轮廓针步；单位：mm，范围1-6，默认3
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_PATTERNOUTLINE,
                                        0 ,
                                        SET_OUTLINESTEP, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Contour stitch"),//轮廓针步
                                        3, 1, 6, 3, 0, tr("mm"), tr(""),
                                        tr(""),
                                        0, 0, 0x0000, operate));

    //绣花机-花样轮廓参数-轮廓放大；单位：mm，范围0-20，默认2
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_PATTERNOUTLINE,
                                        0 ,
                                        SET_OUTLINEZOOM, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Outline zoom"),//轮廓放大
                                        2, 0, 3, 2, 0, tr("mm"), tr(""),
                                        tr(""),
                                        0, 0, 0x0001, operate));

//    //绣花机-花样轮廓参数-轮廓形状；单位：无，范围0-1，默认0
//    m_allParasList.append(makeAParaItem(0,
//                                        PARA_TYPE_PATTERNOUTLINE,
//                                        0 ,
//                                        SET_OUTLINESHAPE, 0, 0, PARA_VALUE_TYPE_LIST,
//                                        tr("Contour shape"),//轮廓形状
//                                        1, 0, 1, 1, 0, tr(""), tr(""),
//                                        tr("Concave:0;Convex:1"),//凹形:0;凸形:1
//                                        1, 1, 0x0002, operate));
    //花样轮廓参数---------------------------
}

//主控机器参数
void Quiembroidery::initMcParasList()
{
    QTextCodec *cod = QTextCodec::codecForLocale();

    //主控机器参数---------------------------
    // 平绣机头个数，无单位， 范围0-32，默认0    -rq  （之前默认是1）
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_EMB,
                                        2, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Number of EMB heads"),
                                        1, 0, 132, 1, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0001, root));

    // 平绣每头机针个数，无单位， 范围1-32，默认1
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_EMB,
                                        3, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Number of needles per head for EMB"),
                                        1, 1, 32, 1, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0001, root));

    // 剪线模式选择， 0:静态剪线；1:动态剪线；无单位， 范围0-1，默认0
//    m_allParasList.append(makeAParaItem(0,
//                                        PARA_TYPE_MACH,
//                                        MC_SORT_EMB,
//                                        15, 1, 0, PARA_VALUE_TYPE_LIST,
//                                        tr("Shear mode selection"),// 剪线模式选择
//                                        0, 0, 1, 0, 0, tr(""), tr(""),
//                                        tr("Static:0;Dynamic:1"),
//                                        0, 0, 0x0006, factory));

    // bit1,引线类型	0,通用引线	1,富怡引线
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_EMB,
                                        15, 2, 0, PARA_VALUE_TYPE_LIST,
                                        tr("Lead Type"),// 引线类型
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr("Universal lead:0;Richpeace Lead:1"),
                                        0, 0, 0x0007, root));

    // bit4,平绣锁头类型	0,电机锁头	1,电磁铁锁头
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_EMB,
                                        15, 5, 0, PARA_VALUE_TYPE_LIST,
                                        tr("Emb lock type"),
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr("Motor:0;Electromagnet:1"),
                                        0, 0, 0x0007, root));

    // bit5,X向零位传感器有无	0,X向有零位传感器	1,X向无零位传感器
//    m_allParasList.append(makeAParaItem(0,
//                                        PARA_TYPE_MACH,
//                                        MC_SORT_EMB,
//                                        15, 6, 0, PARA_VALUE_TYPE_LIST,
//                                        tr("Is there an X-direction zero sensor"),// X向零位传感器有无
//                                        0, 0, 1, 0, 0, tr(""), tr(""),
//                                        tr("Have:0;none:1"),
//                                        0, 0, 0x0008, root));

    // 换色启动方式， 0:自动启动；1:手动启动；无单位， 范围0-1，默认0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_SETTING,//公用参数（设置参数）
                                        15, 3, 0, PARA_VALUE_TYPE_LIST,
                                        tr("Color change start method"),// 换色启动方式
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr("Automatic:0;Manual:1"),
                                        0, 0, 0x0009, operate));

    // 单双排选择， 0:单排；1:双排；
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_SETTING,//公用参数（设置参数）
                                        15, 14, 0, PARA_VALUE_TYPE_LIST,
                                        tr("Single or double row selection"),// 单双排选择
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr("Single:0;Double:1"),//单排:0;双排:1
                                        0, 0, 0x0009, operate));

    // 平绣跳针变越框针数, 范围 0--100，单位：无，默认 5
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_EMB,
                                        16, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("EMB jump needle change the number of frame"),// 平绣跳针变越框针数
                                        5, 0, 100, 5, 0, tr("Needles"), tr(""),
                                        tr(""), 0, 0, 0x000A, operate));


    // 跳针变越框距离, 范围 0--50000，单位：0.01mm，默认 2100
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_EMB,
                                        17, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Jump stitch overrun distance"),// 跳针变越框距离
                                        2100, 0, 50000, 2100, 2, tr("mm"), tr(""),
                                        tr(""), 0, 0, 0x000C, operate));

    // 零位刹车时长(交流换色), 范围 0-500，单位：ms，默认 100
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_EMB,
                                        47, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Zero brake duration"),// 零位刹车时长
                                        100, 0, 500, 100, 0, tr("ms"), tr(""),
                                        tr(""), 0, 0, 0x000C, operate));

    // 换色刹车时长(交流换色), 范围 0-100，单位：ms，默认 30
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_EMB,
                                        48, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Change color brake duration"),// 换色刹车时长
                                        30, 0, 100, 30, 0, tr("ms"), tr(""),
                                        tr(""), 0, 0, 0x000C, operate));

    // 反向换色等待时长，单位ms，默认100，范围0-500
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_EMB,
                                        49, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Waiting time for reverse color change"),// 反向换色等待时长
                                        100, 0, 500, 100, 0, tr("ms"), tr(""),
                                        tr(""), 0, 0, 0x000C, operate));

    // 反向换色刹车时长，单位ms，默认30，范围0-100
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_EMB,
                                        50, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Reverse color change brake duration"),// 反向换色刹车时长
                                        30, 0, 100, 30, 0, tr("ms"), tr(""),
                                        tr(""), 0, 0, 0x000C, operate));

    // X框传感器坐标，单位 0.01mm，范围 -20000--20000，默认 10000
//    m_allParasList.append(makeAParaItem(0,
//                                        PARA_TYPE_MACH,
//                                        MC_SORT_SETTING,//公用参数
//                                        70, 0, 0, PARA_VALUE_TYPE_INT,
//                                        tr("X frame sensor coordinates"),
//                                        10000, -20000, 20000, 10000, 2, tr("mm"), tr(""),
//                                        tr(""), 0, 0, 0x0049, root));

    // X轴找零补偿,范围 -1000--1000, 单位 0.01mm，默认 200
//    m_allParasList.append(makeAParaItem(0,
//                                        PARA_TYPE_MACH,
//                                        MC_SORT_SETTING,//设置参数
//                                        72, 0, 0, PARA_VALUE_TYPE_INT,
//                                        tr("X axis find zero compensation"),
//                                        200, -1000, 1000, 200, 2, tr("mm"), tr(""),
//                                        tr(""), 0, 0, 0x004B, root));

    // Y框传感器坐标，单位 0.01mm，范围 -20000--20000，默认 10000
//    m_allParasList.append(makeAParaItem(0,
//                                        PARA_TYPE_MACH,
//                                        MC_SORT_SETTING,
//                                        71, 0, 0, PARA_VALUE_TYPE_INT,
//                                        tr("Y frame sensor coordinates"),
//                                        10000, -20000, 20000, 10000, 2, tr("mm"), tr(""),
//                                        tr(""), 0, 0, 0x004A, root));

    // Y轴找零补偿,范围 -1000--1000, 单位 0.01mm，默认 200
//    m_allParasList.append(makeAParaItem(0,
//                                        PARA_TYPE_MACH,
//                                        MC_SORT_SETTING,
//                                        73, 0, 0, PARA_VALUE_TYPE_INT,
//                                        tr("Y axis find zero compensation"),
//                                        200, -1000, 1000, 200, 2, tr("mm"), tr(""),
//                                        tr(""), 0, 0, 0x004C, root));

    // 平绣主轴停车角度，单位 0.01度，范围 5000--15000，默认 10000
//    m_allParasList.append(makeAParaItem(0,
//                                        PARA_TYPE_MACH,
//                                        MC_SORT_EMB,
//                                        74, 0, 0, PARA_VALUE_TYPE_INT,
//                                        tr("EMB spindle parking angle"),
//                                        10000, 5000, 10000, 10000, 2, cod->toUnicode("°"), tr(""),
//                                        tr(""), 0, 0, 0x004D, root));

    // 平绣主轴找零补偿, 范围-1000--1000,  单位 0.01度，默认 200
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_EMB,
                                        75, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("EMB spindle find zero compensation"),
                                        200, -1000, 1000, 200, 2, cod->toUnicode("°"), tr(""),
                                        tr(""), 0, 0, 0x004E, factory));

    // 可移动区域(X-), 范围 -2147483648--2147483647，单位0.01mm,默认-200000
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_SETTING,
                                        100, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Movable area (X-)"),
                                        -200000, S32_MIN, S32_MAX, -200000, 2, tr("mm"), tr(""),
                                        tr(""), 0, 0, 0x0057, factory));

    // 可移动区域(X+), 范围 -2147483648--2147483647，单位0.01mm,默认60000
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_SETTING,
                                        101, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Movable area (X+)"),
                                        60000, S32_MIN, S32_MAX, 60000, 2, tr("mm"), tr(""),
                                        tr(""), 0, 0, 0x0058, factory));

    // 可移动区域(Y-), 范围 -2147483648--2147483647，单位0.01mm,默认-200000
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_SETTING,
                                        102, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Movable area (Y-)"),
                                        -200000, S32_MIN, S32_MAX, -200000, 2, tr("mm"), tr(""),
                                        tr(""), 0, 0, 0x0059, factory));

    // 可移动区域(Y+), 范围 -2147483648--2147483647，单位0.01mm,默认60000
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_SETTING,
                                        103, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Movable area (Y+)"),
                                        60000, S32_MIN, S32_MAX, 60000, 2, tr("mm"), tr(""),
                                        tr(""), 0, 0, 0x005A, factory));

    // 平绣可工作区域(X-), 范围 -2147483648--2147483647，单位0.01mm,默认-200000
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_EMB,
                                        104, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("EMB workable area (X-)"),
                                        -200000, S32_MIN, S32_MAX, -200000, 2, tr("mm"), tr(""),
                                        tr(""), 0, 0, 0x005B, factory));

    // 平绣可工作区域(X+), 范围 -2147483648--2147483647，单位0.01mm,默认60000
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_EMB,
                                        105, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("EMB workable area (X+)"),
                                        60000, S32_MIN, S32_MAX, 60000, 2, tr("mm"), tr(""),
                                        tr(""), 0, 0, 0x005C, factory));

    // 平绣可工作区域(Y-), 范围 -2147483648--2147483647，单位0.01mm,默认-200000
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_EMB,
                                        106, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("EMB workable area (Y-)"),
                                        -200000, S32_MIN, S32_MAX, -200000, 2, tr("mm"), tr(""),
                                        tr(""), 0, 0, 0x005D, factory));

    // 平绣可工作区域(Y+), 范围 -2147483648--2147483647，单位0.01mm,默认60000
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_EMB,
                                        107, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("EMB workable area (Y+)"),
                                        60000, S32_MIN, S32_MAX, 60000, 2, tr("mm"), tr(""),
                                        tr(""), 0, 0, 0x005E, factory));


    // 平绣机头偏移X, 范围 -2147483648--2147483647，单位0.01mm，默认0
//     m_allParasList.append(makeAParaItem(0,
//              PARA_TYPE_MACH,
//              MC_SORT_EMB,
//              132, 0, 0, PARA_VALUE_TYPE_INT,
//              tr("EMB head offset X"),
//              0, S32_MIN, S32_MAX, 0, 2, tr("mm"), tr(""),
//              tr(""), 0, 0, 0x006F, factory));

    // 平绣机头偏移Y, 范围 -2147483648--2147483647，单位0.01mm，默认0
//     m_allParasList.append(makeAParaItem(0,
//              PARA_TYPE_MACH,
//              MC_SORT_EMB,
//              133, 0, 0, PARA_VALUE_TYPE_INT,
//              tr("EMB head offset Y"),
//              0, S32_MIN, S32_MAX, 0, 2, tr("mm"), tr(""),
//              tr(""), 0, 0, 0x0070, factory));

    // 平绣机头间距, 范围 -2147483648--2147483647，单位0.01mm,默认40000
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_EMB,
                                        134, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("EMB head spacing"),// 平绣机头间距
                                        40000, S32_MIN, S32_MAX, 40000, 2, tr("mm"), tr(""),
                                        tr(""), 0, 0, 0x0071, factory));

    // XY启动停止速度, 范围 1--100，单位mm/s，默认 10
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_SETTING,
                                        160, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("XY start and stop speed"),
                                        10, 1, 100, 10, 0, tr("mm/s"), tr(""),
                                        tr(""), 0, 0, 0x007B, factory));

    // XY归零运行速度, 范围 1--100，单位mm/s，默认 100
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_SETTING,
                                        161, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("XY zero return speed"),
                                        10, 1, 100, 10, 0, tr("mm/s"), tr(""),
                                        tr(""), 0, 0, 0x007C, factory));

    // XY空走运行速度, 范围 1--1000，单位mm/s，默认 300
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_SETTING,
                                        162, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("XY dry running speed"),
                                        200, 1, 1000, 200, 0, tr("mm/s"), tr(""),
                                        tr(""), 0, 0, 0x007D, factory));

    // XY行走加速度, 范围 1--10000，单位mm/s2，默认 1000
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_SETTING,
                                        163, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("XY walking acceleration"),
                                        1000, 1, 10000, 1000, 0, tr("mm/s2"), tr(""),
                                        tr(""), 0, 0, 0x007E, factory));

    // XY刹车加速度 1--10000，单位mm/s2，默认 10000
//    m_allParasList.append(makeAParaItem(0,
//                                        PARA_TYPE_MACH,
//                                        MC_SORT_SETTING,
//                                        164, 0, 0, PARA_VALUE_TYPE_INT,
//                                        tr("XY braking acceleration"),
//                                        10000, 1, 10000, 10000, 0, tr("mm/s2"), tr(""),
//                                        tr(""), 0, 0, 0x007F, factory));

    // XY最高移动速度, 范围 1--1000，单位mm/s，默认 300
//    m_allParasList.append(makeAParaItem(0,
//                                        PARA_TYPE_MACH,
//                                        MC_SORT_SETTING,
//                                        165, 0, 0, PARA_VALUE_TYPE_INT,
//                                        tr("XY maximum moving speed"),
//                                        300, 1, 1000, 300, 0, tr("mm/s"), tr(""),
//                                        tr(""), 0, 0, 0x0080, factory));

    // xy手动移动速度1, 范围 1--1000，单位mm/s，默认 10
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_SETTING,
                                        166, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("xy manual movement speed 1"),
                                        10, 1, 1000, 10, 0, tr("mm/s"), tr(""),
                                        tr(""), 0, 0, 0x0081, factory));

    // xy手动移动速度2, 范围 1--1000，单位mm/s，默认 10
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_SETTING,
                                        167, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("xy manual movement speed 2"),
                                        10, 1, 1000, 10, 0, tr("mm/s"), tr(""),
                                        tr(""), 0, 0, 0x0082, factory));

    // xy手动移动速度3, 范围 1--1000，单位mm/s，默认 10
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_SETTING,
                                        168, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("xy manual movement speed 3"),
                                        10, 1, 1000, 10, 0, tr("mm/s"), tr(""),
                                        tr(""), 0, 0, 0x0083, factory));

    // 主轴启动停止转速, 范围 1--300，单位r/min，默认 100
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_SETTING,
                                        169, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Spindle start and stop speed"),
                                        100, 1, 300, 100, 0, tr("r/min"), tr(""),
                                        tr(""), 0, 0, 0x0084, factory));

    // 主轴归零转速, 范围 1--300，单位r/min，默认 120
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_SETTING,
                                        170, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Spindle return to zero speed"),
                                        120, 1, 300, 120, 0, tr("r/min"), tr(""),
                                        tr(""), 0, 0, 0x0085, factory));

    // 主轴运转转速, 范围 1--3000，单位r/min，默认 300
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_SETTING,
                                        171, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Spindle rotation speed"),
                                        300, 1, 3000, 300, 0, tr("r/min"), tr(""),
                                        tr(""), 0, 0, 0x0086, factory));

    // 主轴运转加速度, 范围 1--200，单位r/ss，默认 50
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_SETTING,
                                        172, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Spindle acceleration"),
                                        50, 1, 200, 50, 0, tr("r/ss"), tr(""),
                                        tr(""), 0, 0, 0x0087, factory));

    // 主轴刹车加速度, 范围 1--100，单位r/ss，默认 100
//    m_allParasList.append(makeAParaItem(0,
//                                        PARA_TYPE_MACH,
//                                        MC_SORT_SETTING,
//                                        173, 0, 0, PARA_VALUE_TYPE_INT,
//                                        tr("Spindle braking acceleration"),
//                                        100, 1, 100, 100, 0, tr("r/ss"), tr(""),
//                                        tr(""), 0, 0, 0x0088, factory));

    // 平绣主轴最高转速, 范围 1--3000，单位r/min，默认 1200
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_EMB,
                                        174, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Maximum speed of EMB spindle"),
                                        1200, 1, 3000, 1200, 0, tr("r/min"), tr(""),
                                        tr(""), 0, 0, 0x0089, factory));

    // 主轴手动移动转速,范围1-500,单位r/min,默认10
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_MACH,
                                        MC_SORT_SETTING,
                                        179, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Spindle manual movement speed"),
                                        10, 1, 500, 10, 0, tr("r/min"), tr(""),
                                        tr(""), 0, 0, 0x008C, operate));

    //主控机器参数---------------------------
}

//主控工作参数
void Quiembroidery::initWkParasList()
{
    QTextCodec *cod = QTextCodec::codecForLocale();

    //主控工作参数---------------------------

#if(0)
    // 倒车等效主轴转速, 范围 1--3000，单位r/min，默认 1000
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_SETTING,
                                        0, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Reverse equivalent spindle speed"),// 倒车等效主轴转速
                                        1000, 1, 3000, 1000, 0, tr("r/min"), tr(""),
                                        tr(""), 0, 0, 0x0104, operate));
#endif

    // 平绣起针慢动针数, 0--10，单位 针，默认 3
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_EMB,
                                        6, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Number of slow motion stitches for EMB stitch"),// 平绣起针慢动针数
                                        3, 0, 10, 3, 0, tr("needle"), tr(""),
                                        tr(""), 0, 0, 0x0101, operate));

    // 平绣主轴启动慢动转速, 范围 1--500，单位r/min，默认 200
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_EMB,
                                        7, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Start slow speed of EMB spindle"),// 平绣主轴启动慢动转速
                                        200, 1, 500, 200, 0, tr("r/min"), tr(""),
                                        tr(""), 0, 0, 0x0102, factory));//258

/*
    // 平绣主轴回针转速, 范围 1--500，单位r/min，默认 200
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_SETTING,
                                        8, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Spindle needle speed of flat embroidery"),// 平绣主轴回针转速
                                        200, 1, 500, 200, 0, tr("r/min"), tr(""),
                                        tr(""), 0, 0, 0x0102, operate));
*/

    // 平绣跳针最高主轴转速, 范围 1--1200，单位r/min，默认 800
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_EMB,
                                        10, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Maximum spindle speed of EMB stitch skipping"),// 平绣跳针最高主轴转速
                                        800, 1, 1200, 800, 0, tr("r/min"), tr(""),
                                        tr(""), 0, 0, 0x0103, operate));

    // 平绣主轴工作转速, 范围 1--3000，单位r/min，默认 1000
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_EMB,
                                        11, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Spindle speed of EMB"),// 平绣主轴工作转速
                                        1000, 1, 3000, 1000, 0, tr("r/min"), tr(""),
                                        tr(""), 0, 0, 0x0104, operate));

    // 平绣工作加速度, 1--100, 单位r/ss , 默认5
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_EMB,
                                        12, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Acceleration of EMB"),// 平绣工作加速度
                                        5, 1, 100, 5, 0, tr("r/ss"), tr(""),
                                        tr(""), 0, 0, 0x0105, factory));

//    // 平绣动框方式, 2, XY连续动框; 3, XY间歇式动框;
//    m_allParasList.append(makeAParaItem(0,
//                                        PARA_TYPE_WORK,
//                                        MC_SORT_EMB,
//                                        13, 0, 0, PARA_VALUE_TYPE_LIST,
//                                        tr("EMB moving frame method"),// 平绣动框方式
//                                        0, 2, 3, 0, 0, tr(""), tr(""),
//                                        tr("XY continuous:2;XY intermittent:3"),//XY连续动框//XY间歇式动框
//                                        0, 0, 0x0106, root));

//    // 平绣动框起始角度, 0--36000, 单位 0.01度，默认 24000
//    m_allParasList.append(makeAParaItem(0,
//                                        PARA_TYPE_WORK,
//                                        MC_SORT_EMB,
//                                        14, 0, 0, PARA_VALUE_TYPE_INT,
//                                        tr("Start angle of EMB movable frame"),//平绣动框起始角度
//                                        24000, 0, 36000, 24000, 2, cod->toUnicode("°"), tr(""),
//                                        tr(""), 0, 0, 0x0107, root));

    // 平绣动框持续角度, 0--36000, 单位 0.01度，默认 20000
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_EMB,
                                        15, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Continuous angle of EMB movable frame"),//平绣动框持续角度
                                        20000, 0, 36000, 20000, 2, cod->toUnicode("°"), tr(""),
                                        tr(""), 0, 0, 0x0108, factory));//264

    // 平绣动框最高速度限制， 10-400, 单位mm/s, 默认 10
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_EMB,
                                        16, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Maximum speed limit of EMB movable frame"),// 平绣动框最高速度限制
                                        100, 10, 400, 100, 0, tr("mm/s"), tr(""),
                                        tr(""), 0, 0, 0x0109, factory));

    // 平绣动框最高加速度限制， 1-100, 单位mm/s, 默认 20
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_EMB,
                                        17, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Maximum acceleration limit of EMB movable frame"),// 平绣动框最高加速度限制
                                        20, 1, 100, 20, 0, tr("mm/s"), tr(""),
                                        tr(""), 0, 0, 0x010A, factory));//266

    // 平绣起针夹线允许; 位图选择 == 0, 不允许; == 1, 允许
    // bit0,夹线允许
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_EMB,
                                        18, 1, 0, PARA_VALUE_TYPE_SW,
                                        tr("EMB needle and thread clamp allowed"),// 平绣起针夹线允许
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0117, factory));

    // 平绣起针扣线允许; 位图选择 == 0, 不允许; == 1, 允许
    // bit1,扣线允许
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_EMB,
                                        18, 2, 0, PARA_VALUE_TYPE_SW,
                                        tr("EMB the needle buckle line allowed"),// 平绣起针扣线允许
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0118,factory));

    // 平绣主轴剪线转速, 范围 1--150，单位r/min，默认 120
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_CUT,
                                        9, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("EMB spindle trimming speed"),// 平绣主轴剪线转速
                                        120, 1, 150, 120, 0, tr("r/min"), tr(""),
                                        tr(""), 0, 0, 0x010B, operate));

    // 平绣剪线允许; 0, 不剪线; 1, 自动剪线; 2, 最后剪线，3,数据剪线，默认1
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_CUT,
                                        19, 0, 0, PARA_VALUE_TYPE_LIST,
                                        tr("EMB thread trimming allowed"),// 平绣剪线允许
                                        1, 0, 2, 1, 0, tr(""), tr(""),
                                        tr("No:0;"//不剪线
                                           "Automatic thread:1;"//自动剪线
                                           "Final:2;"//最后剪线
                                           "Data:3" ),//数据剪线
                                        1, 1, 0x010C, operate));

    // 平绣静态剪线完成角度，0--36000, 单位 0.01度，默认 6000
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_CUT,
                                        21, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("EMB static cut line completion angle"),//平绣静态剪线完成角度
                                        6000, 0, 36000, 6000, 2, cod->toUnicode("°"), tr(""),
                                        tr(""), 0, 0, 0x010D, operate));

    // 平绣剪线动框方向， 0:不动框；1:向左；2:向前；3:向右；4：向后 无单位， 范围0-4，默认0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_CUT,
                                        22, 0, 0, PARA_VALUE_TYPE_LIST,
                                        tr("Moving frame direction of EMB trimming"),// 平绣剪线动框方向
                                        0, 0, 4, 0, 0, tr(""), tr(""),
                                        tr("No:0;Left:1;Forward:2;Right:3;Backward:4"),
                                        0, 0, 0x010D, operate));

    // 平绣剪线动框位移, 1--1000, 单位0.01mm, 默认500
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_CUT,
                                        23, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Moving frame displacement of EMB trimming"),//平绣剪线动框位移
                                        500, 1, 1000, 500, 2, tr("mm"), tr(""),
                                        tr(""), 0, 0, 0x010D, operate));

    // 平绣勾线延迟，范围0--100，默认10,单位：无
//    m_allParasList.append(makeAParaItem(0,
//                                        PARA_TYPE_WORK,
//                                        MC_SORT_CUT,
//                                        31, 0, 0, PARA_VALUE_TYPE_INT,
//                                        tr("EMB hook latencys"),//平绣勾线延迟
//                                        10, 0, 100, 10, 0, tr(""), tr(""),
//                                        tr(""), 0, 0, 0x010D, factory));//276

    // 平绣勾线收缩,范围0--70,默认40
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_CUT,
                                        36, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("EMB hook contraction"),//平绣勾线收缩
                                        40, 0, 70, 40, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x010D, factory));

    // 平绣动态剪线分线角度，0--36000, 单位 0.01度，默认 27000
//    m_allParasList.append(makeAParaItem(0,
//                                        PARA_TYPE_WORK,
//                                        MC_SORT_CUT,
//                                        20, 0, 0, PARA_VALUE_TYPE_INT,
//                                        tr("EMB dynamic shear line distribution angle"),//平绣动态剪线分线角度
//                                        27000, 0, 36000, 27000, 2, cod->toUnicode("°"), tr(""),
//                                        tr(""), 0, 0, 0x010E, operate));

    // 平绣动态剪线夹线角度,范围0--9500,单位0.01度,默认6000
//    m_allParasList.append(makeAParaItem(0,
//                                        PARA_TYPE_WORK,
//                                        MC_SORT_CUT,
//                                        32, 0, 0, PARA_VALUE_TYPE_INT,
//                                        tr("EMB dynamic shear clip line angle"),//平绣动态剪线夹线角度
//                                        6000, 0, 9500, 6000, 2, cod->toUnicode("°"), tr(""),
//                                        tr(""), 0, 0, 0x010F, operate));//271

    // 平绣动态剪线勾刀出角度,范围0--36000,单位0.01度,默认28000
//    m_allParasList.append(makeAParaItem(0,
//                                        PARA_TYPE_WORK,
//                                        MC_SORT_CUT,
//                                        33, 0, 0, PARA_VALUE_TYPE_INT,
//                                        tr("EMB dynamic cut line hook out angle"),//平绣动态剪线勾刀出角度
//                                        28000, 0, 36000, 28000, 2, cod->toUnicode("°"), tr(""),
//                                        tr(""), 0, 0, 0x0110, operate));//272

    // 平绣动态剪线勾刀回角度,范围0--36000,单位0.01度,默认4000
//    m_allParasList.append(makeAParaItem(0,
//                                        PARA_TYPE_WORK,
//                                        MC_SORT_CUT,
//                                        34, 0, 0, PARA_VALUE_TYPE_INT,
//                                        tr("EMB dynamic cut line hook back angle"),//平绣动态剪线勾刀回角度
//                                        4000, 0, 36000, 4000, 2, cod->toUnicode("°"), tr(""),
//                                        tr(""), 0, 0, 0x0111, factory));//273

    // 平绣动态剪线完成角度,范围0--36000,单位0.01度,默认3000
//    m_allParasList.append(makeAParaItem(0,
//                                        PARA_TYPE_WORK,
//                                        MC_SORT_CUT,
//                                        35, 0, 0, PARA_VALUE_TYPE_INT,
//                                        tr("EMB dynamic cut line completion angle"),//平绣动态剪线完成角度
//                                        3000, 0, 36000, 3000, 2, cod->toUnicode("°"), tr(""),
//                                        tr(""), 0, 0, 0x0112, factory));//274

    // 平绣面线断线检测针数; 0-50, 0, 不检测断线; 其他, 断线信号连续针数，默认3
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_EMB,
                                        24, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Needles for detection of EMB thread breakage"),//平绣面线断线检测针数
                                        3, 0, 50, 3, 0, tr("needle"), tr(""),
                                        tr(""), 0, 0, 0x0119, operate));

    // 平绣底线断线检测针数; 0-50, 0, 不检测断线; 其他, 断线信号连续针数，默认3
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_EMB,
                                        25, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Needles for detection of EMB bottom thread breakage"),//平绣底线断线检测针数
                                        3, 0, 50, 3, 0, tr("needle"), tr(""),
                                        tr(""), 0, 0, 0x011A, operate));

    // 平绣换梭芯提醒功能, 0, 不启用该功能; 1, 按长度计数延迟提醒; 2, 按片数计数; 3, 按长度立刻提醒; 默认0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_EMB,
                                        26, 0, 0, PARA_VALUE_TYPE_LIST,
                                        tr("EMB bobbin change reminder function"),// 平绣换梭芯提醒功能
                                        0, 0, 3, 0, 0, tr(""), tr(""),
                                        tr("No:0;"//不启用该功能
                                           "Delay Reminder:1;"//按长度计数延迟提醒
                                           "Piece count:2;"//按片数计数
                                           "Immediately by length:3"//按长度立刻提醒
                                           ),
                                        0, 0, 0x0121, operate));

    // 平绣底线长度, 0-90000000,单位 0.01mm，默认 10000000
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_EMB,
                                        27, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("EMB bottom thread length"),//平绣底线长度
                                        10000000, 0, 90000000, 10000000, 2, tr("mm"), tr(""),
                                        tr(""), 0, 0, 0x0121, operate));

    // 平绣每针底线修正量, 0-1000,单位 0.01mm，默认 200
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_EMB,
                                        28, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Bottom thread correction amount per stitch for flat embroidery"),//平绣每针底线修正量
                                        200, 0, 1000, 200, 2, tr("mm"), tr(""),
                                        tr(""), 0, 0, 0x0122, operate));

    // 平绣换梭片数计数, 单位 次，0-S32_MAX，默认 0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_EMB,
                                        29, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Counting the number of shuttles for EMB"),//平绣换梭片数计数
                                        0, 0, S32_MAX, 0, 0, tr("Times"), tr(""),
                                        tr(""), 0, 0, 0x0123, operate));//291

    // 补绣方式, 0,不补绣, 1,手动补绣(补绣开关), 2,自动补绣(断线头+补绣开关), 3,全头补绣
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_SETTING,
                                        30, 0, 0, PARA_VALUE_TYPE_LIST,
                                        tr("Supplementary embroidery"),//补绣方式
                                        0, 0, 3, 0, 0, tr(""), tr(""),
                                        tr("No:0;"// 不补绣
                                           "Manual:1;"// 手动补绣
                                           "Auto:2;"// 自动补绣
                                           "All:3"), // 全头补绣
                                        0, 0, 0x011E, operate));

    // 平绣断线倒退针数,范围0--10,默认0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_EMB,
                                        37, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("EMB line broken return needles"),//平绣断线倒退针数
                                        0, 0, 10, 0, 0, tr("needle"), tr(""),
                                        tr(""), 0, 0, 0x011D, operate));

    // 补绣提前结束针数,范围0--10,默认0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_SETTING,
                                        38, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Needles to end ahead of time"),//补绣提前结束针数
                                        0, 0, 10, 0, 0, tr("needle"), tr(""),
                                        tr(""), 0, 0, 0x011F, operate));

    // 平绣动态剪线扣线角度,范围10500-18000,默认12000  单位0.01
//    m_allParasList.append(makeAParaItem(0,
//                                        PARA_TYPE_WORK,
//                                        MC_SORT_CUT,
//                                        55, 0, 0, PARA_VALUE_TYPE_INT,
//                                        tr("EMB dynamic thread trimming angle"),// 平绣动态剪线扣线角度
//                                        12000, 10500, 18000, 12000, 2, cod->toUnicode("°"), tr(""),
//                                        tr(""), 0, 0, 0x0115, operate));

    // 平绣面线起针不检测针数,范围0--30,默认8
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_EMB,
                                        56, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Needles is not detected when the EMB thread"),//平绣面线起针不检测针数
                                        8, 0, 30, 8, 0, tr("needle"), tr(""),
                                        tr(""), 0, 0, 0x011B, operate));

    // 平绣底线起针不检测针数,范围0--30,默认8
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_EMB,
                                        57, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Needles is not detected when the EMB bottom thread"),//平绣底线起针不检测针数
                                        8, 0, 30, 8, 0, tr("needle"), tr(""),
                                        tr(""), 0, 0, 0x011C, operate));

    // 平绣动态剪线扣线释放角度,范围0--36000,单位0.01度,D86控制动态剪线默认3000,N6A控制默认9000
//    m_allParasList.append(makeAParaItem(0,
//                                        PARA_TYPE_WORK,
//                                        MC_SORT_CUT,
//                                        59, 0, 0, PARA_VALUE_TYPE_INT,
//                                        tr("EMB dynamic cut line release angle"),//平绣动态剪线扣线释放角度
//                                        3000, 0, 36000, 3000, 2, cod->toUnicode("°"), tr(""),
//                                        tr(""), 0, 0, 0x0116, operate));//278


#if(0)
    // 锁针次数，范围0--5，默认0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_ACTION,
                                        39, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Lock stitch times"),//锁针次数
                                        0, 0, 5, 0, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0116, operate));

    // 锁针步数，范围0--5，默认0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_ACTION,
                                        40, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Lock stitch steps"),//锁针步数
                                        0, 0, 5, 0, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0116, operate));

    // 锁针针步长度，范围0--100，单位%，默认0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_ACTION,
                                        41, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Lock stitch length"),//锁针针步长度
                                        0, 0, 100, 0, 0, cod->toUnicode("%"), tr(""),
                                        tr(""), 0, 0, 0x0116, operate));
#endif

    // 提前降速针步, 单位 针，0-10，默认 0
//    m_allParasList.append(makeAParaItem(0,
//                                        PARA_TYPE_WORK,
//                                        MC_SORT_EMB,
//                                        140, 0, 0, PARA_VALUE_TYPE_INT,
//                                        tr("Advance speed needle"),//提前降速针步
//                                        0, 0, 10, 0, 0, tr("Needles"), tr(""),
//                                        tr(""), 0, 0, 0x0154, factory));

    // 延迟提速针步, 单位 针，0-10，默认 0
//    m_allParasList.append(makeAParaItem(0,
//                                        PARA_TYPE_WORK,
//                                        MC_SORT_EMB,
//                                        141, 0, 0, PARA_VALUE_TYPE_INT,
//                                        tr("Delay speed needle"),//延迟提速针步
//                                        0, 0, 10, 0, 0, tr("Needles"), tr(""),
//                                        tr(""), 0, 0, 0x0155, factory));

    // 雕孔针位,范围0-15,默认0(0认为无雕孔)
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_EMB,
                                        142, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Carve hole needle"),//雕孔针位
                                        0, 0, 15, 0, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0124, factory));

    // 雕孔偏移量,单位mm,精度0.01,范围0-20000,默认0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_EMB,
                                        143, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Carving hole offset"),//雕孔偏移量
                                        0, 0, 20000, 0, 2, tr("mm"), tr(""),
                                        tr(""), 0, 0, 0x0125, factory));

    // 雕孔偏移允许  bit5
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_EMB,
                                        183, 6, 0, PARA_VALUE_TYPE_SW,
                                        tr("Carving hole offset allows"),//雕孔偏移允许
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0126, operate));


    // 开机动作；BIT0,  1，开机平绣主轴自动找零，0，开机平绣主轴不自动找零;
//    m_allParasList.append(makeAParaItem(0,
//                                        PARA_TYPE_WORK,
//                                        MC_SORT_EMB,
//                                        160, 1, 0, PARA_VALUE_TYPE_SW,
//                                        tr("Boot spindle zero"),// 开机主轴归零
//                                        0, 0, 1, 0, 0, tr(""), tr(""),
//                                        tr(""), 0, 0, 0x0163, factory));

    // 开机动作；BIT1,  1，开机XY自动归零，0，开机XY不自动归零;
//    m_allParasList.append(makeAParaItem(0,
//                                        PARA_TYPE_WORK,
//                                        MC_SORT_SETTING,
//                                        160, 2, 0, PARA_VALUE_TYPE_SW,
//                                        tr("Boot XY zero"),// 开机XY归零
//                                        0, 0, 1, 0, 0, tr(""), tr(""),
//                                        tr(""), 0, 0, 0x0164, factory));

    // 开机总线检测  bit3,  1，开机总线检测禁止，0，开机总线检测允许;
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_SETTING,
                                        160, 4, 0, PARA_VALUE_TYPE_SW,
                                        tr("Boot bus detection disabled"),// 开机总线检测禁止
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0165, factory));

    // 同色是否停车,0,停车,1,不停车
    // bit10,同色是否停车
//    m_allParasList.append(makeAParaItem(0,
//                                        PARA_TYPE_WORK,
//                                        MC_SORT_SETTING,
//                                        183, 11, 0, PARA_VALUE_TYPE_LIST,
//                                        tr("Whether to stop in the same color"),//同色是否停车
//                                        0, 0, 1, 0, 0, tr(""), tr(""),
//                                        tr("parking:0;NoParking:1"), 0, 0, 0x0170, operate));

    // 跳针变越框方式,0,按针数,1,按距离
    // bit11,跳针变越框方式
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_EMB,//设置参数
                                        183, 12, 0, PARA_VALUE_TYPE_LIST,
                                        tr("Needle skipping mode"),//跳针变越框方式
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr("StitchesNum:0;Distance:1"), 0, 0, 0x000C, operate));

    // 安全输入允许，位图选择，0, 不允许; 1, 允许; bit0 光幕; bit1, 气压;  bit2 上电信号;	bit4 安全门 	bit5 手自动按钮
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_SETTING,
                                        162, 2, 0, PARA_VALUE_TYPE_SW,
                                        tr("Air pressure safety input allows"),// 气压安全输入允许
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr(""),
                                        0, 0, 0x016A, operate));

    // 安全输入允许，位图选择，0, 不允许; 1, 允许; bit0 光幕; bit1, 气压;  bit2 上电信号;	bit4 安全门 	bit5 手自动按钮
        m_allParasList.append(makeAParaItem(0,
                                            PARA_TYPE_WORK,
                                            MC_SORT_SETTING,
                                            162, 1, 0, PARA_VALUE_TYPE_SW,
                                            tr("Light curtain safety input allowed"),// 光幕安全输入允许
                                            0, 0, 1, 0, 0, tr(""), tr(""),
                                            tr(""),
                                            0, 0, 0x016B, factory));

    // 软件限位方式, bit0, xy移动; bit1, 缝纫头升降限制; bit2, 冲孔头升降限制; bit3, 裁刀机头升降限制;
    // bit4,冲孔落杆限制; bit5,绣花落杆限制;
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_SETTING,
                                        163, 1, 0, PARA_VALUE_TYPE_SW,
                                        tr("limit XY movement"),// XY移动限位
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr(""),
                                        0, 0, 0x016C, operate));

    // 软件限位方式, bit0, xy移动; bit1, 缝纫头升降限制; bit2, 冲孔头升降限制; bit3, 裁刀机头升降限制;
    // bit4,冲孔落杆限制; bit5,绣花落杆限制;
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_EMB,
                                        163, 6, 0, PARA_VALUE_TYPE_SW,
                                        tr("EMB rock limit"),// 绣花落杆限制
                                        1, 0, 1, 1, 0, tr(""), tr(""),
                                        tr(""),
                                        0, 0, 0x016D, factory));

    // 产量预设, 0, 关闭功能；其余，按照预设产量提示，0-S32_MAX，默认 0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_SETTING,
                                        164, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Production preset"),//产量预设
                                        0, 0, S32_MAX, 0, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0156, operate));

    // 完成后停车位置选择, 0, 当前位置; 1，起点，2，定位点，3，上料点; 4，偏移点
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_SETTING,
                                        165, 0, 0, PARA_VALUE_TYPE_LIST,
                                        tr("Parking location selection after completion"),//完成后停车位置选择
                                        0, 0, 4, 0, 0, tr(""), tr(""),
                                        tr("Current position:0;"//当前位置
                                           "Starting point:2;"//起点
                                           "Offset position:4"),//偏移点
                                        0, 0, 0x0157, operate));

    // 偏移点坐标有效标志；0：无效；1，x有效；2，y有效；3，xy同时有效；单位：无 ，范围0-3，默认0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_SETTING,
                                        166, 0, 0, PARA_VALUE_TYPE_LIST,
                                        tr("Offset point coordinate valid flag"),//偏移点坐标有效标志
                                        0, 0, 3, 0, 0, tr(""), tr(""),
                                        tr("Invalid:0;X Valid:1;Y Valid:2;XY Valid:3"),
                                        0, 0, 0x0158, operate));

    // 偏移点X坐标, 范围 -2147483648--2147483647，单位0.01mm，默认0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_SETTING,
                                        167, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("X coordinate of offset point"),//偏移点X坐标
                                        0, S32_MIN, S32_MAX, 0, 2, tr("mm"), tr(""),
                                        tr(""), 0, 0, 0x0159, operate));

    // 偏移点Y坐标, 范围 -2147483648--2147483647，单位0.01mm，默认0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_SETTING,
                                        168, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Y coordinate of offset point"),//偏移点Y坐标
                                        0, S32_MIN, S32_MAX, 0, 2, tr("mm"), tr(""),
                                        tr(""), 0, 0, 0x015A, operate));

     // 跟踪绳绣针位	0,无		1,首针	2,末针
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_EMB,
                                        177, 0, 0, PARA_VALUE_TYPE_LIST,
                                        tr("Tracking rope EMB needle position"),//跟踪绳绣针位
                                        0, 0, 2, 0, 0, tr(""), tr(""),
                                        tr("No:0;First stitch:1;Terminal stitch:2"),
                                        0, 0, 0x0127, root));

    // 跟踪绳绣转速	范围100-1000,默认700
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_EMB,
                                        178, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Tracking rope EMB speed"),//跟踪绳绣转速
                                        700, 100, 1000, 700, 0, tr("r/min"), tr(""),
                                        tr(""), 0, 0, 0x0128, operate));//296

    // 加油方式选择, 0,不加油,1,按工作时间加油,2按工作针数加油,3持续不停加油,默认0
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_SETTING,
                                        179, 0, 0, PARA_VALUE_TYPE_LIST,
                                        tr("Oil mode selection"),//加油方式选择
                                        0, 0, 3, 0, 0, tr(""), tr(""),
                                        tr("No:0;Work times:1;Work needles:2;Keep refueling:3"),
                                        0, 0, 0x015E, operate));

    // 加油针数间隔, 单位针,加油方式为按针数加油时有效,默认10000
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_SETTING,
                                        180, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Refueling needle interval"),//加油针数间隔
                                        10000, 0, 50000000, 10000, 0, tr("needle"), tr(""),
                                        tr(""), 0, 0, 0x015F, operate));

    // 加油时间间隔,单位秒,加油方式为按工作时间加油时有效
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_SETTING,
                                        181, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Refueling times interval"),//加油时间间隔
                                        43200, 0, 5000000, 43200, 0, tr("s"), tr(""),
                                        tr(""), 0, 0, 0x0160, operate));

    // 加油持续时长,单位秒
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_SETTING,
                                        182, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Collision continues"),//加油持续时长
                                        2, 0, 15, 2, 0, tr("s"), tr(""),
                                        tr(""), 0, 0, 0x0161, operate));

    // 加油储气时长,单位秒,默认3,范围0-180
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_SETTING,
                                        211, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Refueling gas storage"),//加油储气时长
                                        3, 0, 180, 3, 0, tr("s"), tr(""),
                                        tr(""), 0, 0, 0x0162, operate));

    // 功能允许控制,0,不允许,1,允许

    // bit0,循环工作功能
//    m_allParasList.append(makeAParaItem(0,
//                                        PARA_TYPE_WORK,
//                                        MC_SORT_SETTING,
//                                        183, 1, 0, PARA_VALUE_TYPE_SW,
//                                        tr("Cyclic work function"),//循环工作功能
//                                        0, 0, 1, 0, 0, tr(""), tr(""),
//                                        tr(""), 0, 0, 0x016E, operate));
    // bit2,针位限速允许
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_EMB,
                                        183, 3, 0, PARA_VALUE_TYPE_SW,
                                        tr("Needle speed limit allows"),//针位限速允许
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0173, operate));

    // 功能允许控制,0,不允许,1,允许
    // bit3,勾刀检测允许
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_EMB,
                                        183, 4, 0, PARA_VALUE_TYPE_SW,
                                        tr("Hook knife detection allows"),//勾刀检测允许
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x010C, operate));

    // 缺料检测允许,0,不允许,1,允许
    // bit6,缺料检测允许
//    m_allParasList.append(makeAParaItem(0,
//                                        PARA_TYPE_WORK,
//                                        MC_SORT_FEED,
//                                        183, 7, 0, PARA_VALUE_TYPE_SW,
//                                        tr("Lack of material detection allows"),//缺料检测允许
//                                        0, 0, 1, 0, 0, tr(""), tr(""),
//                                        tr(""), 0, 0, 0x016F, operate));

    // 平绣断线检测禁止,0,不允许,1,允许
    // bit7,断线检测允许
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_EMB,
                                        183, 8, 0, PARA_VALUE_TYPE_SW,
                                        tr("Emb Disconnection detection prohibited"),//平绣断线检测禁止
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0118, operate));

    // bit16,总线屏蔽   0不屏蔽 1屏蔽
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_EMB,
                                        183, 17, 0, PARA_VALUE_TYPE_LIST,
                                        tr("Bus shield"),//总线屏蔽
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr("Unshielded:0;shield:1"),  0, 0, 0x0171, root));

    // bit22,自动定起绣点
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_SETTING,
                                        183, 22, 0, PARA_VALUE_TYPE_SW,
                                        tr("Automatically fix the stitch point"),//自动定起绣点
                                        0, 0, 1, 0, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0172, operate));

    // 针位1限速,范围0-2000,单位转/分,默认1200
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_EMB,
                                        196, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Imposity 1 speed limit"),//针位1限速
                                        1200, 0, 2000, 1200, 0, tr("rpm/min"), tr(""),
                                        tr(""), 0, 0, 0x0174, operate));

    // 针位2限速,范围0-2000,单位转/分,默认1200
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_EMB,
                                        197, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Imposity 2 speed limit"),//针位2限速
                                        1200, 0, 2000, 1200, 0, tr("rpm/min"), tr(""),
                                        tr(""), 0, 0, 0x0175, operate));

    // 针位3限速,范围0-2000,单位转/分,默认1200
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_EMB,
                                        198, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Imposity 3 speed limit"),//针位3限速
                                        1200, 0, 2000, 1200, 0, tr("rpm/min"), tr(""),
                                        tr(""), 0, 0, 0x0176, operate));

    // 针位4限速,范围0-2000,单位转/分,默认1200
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_WORK,
                                        MC_SORT_EMB,
                                        199, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("Imposity 4 speed limit"),//针位4限速
                                        1200, 0, 2000, 1200, 0, tr("rpm/min"), tr(""),
                                        tr(""), 0, 0, 0x0177, operate));

    // 针位5限速,范围0-2000,单位转/分,默认1200
//    m_allParasList.append(makeAParaItem(0,
//                                        PARA_TYPE_WORK,
//                                        MC_SORT_EMB,
//                                        200, 0, 0, PARA_VALUE_TYPE_INT,
//                                        tr("Imposity 5 speed limit"),//针位5限速
//                                        1200, 0, 2000, 1200, 0, tr("rpm/min"), tr(""),
//                                        tr(""), 0, 0, 0x0178, operate));

    // 针位6限速,范围0-2000,单位转/分,默认1200
//    m_allParasList.append(makeAParaItem(0,
//                                        PARA_TYPE_WORK,
//                                        MC_SORT_EMB,
//                                        201, 0, 0, PARA_VALUE_TYPE_INT,
//                                        tr("Imposity 6 speed limit"),//针位6限速
//                                        1200, 0, 2000, 1200, 0, tr("rpm/min"), tr(""),
//                                        tr(""), 0, 0, 0x0179, operate));

    // 针位7限速,范围0-2000,单位转/分,默认1200
//    m_allParasList.append(makeAParaItem(0,
//                                        PARA_TYPE_WORK,
//                                        MC_SORT_EMB,
//                                        202, 0, 0, PARA_VALUE_TYPE_INT,
//                                        tr("Imposity 7 speed limit"),//针位7限速
//                                        1200, 0, 2000, 1200, 0, tr("rpm/min"), tr(""),
//                                        tr(""), 0, 0, 0x017A, operate));

    // 针位8限速,范围0-2000,单位转/分,默认1200
//    m_allParasList.append(makeAParaItem(0,
//                                        PARA_TYPE_WORK,
//                                        MC_SORT_EMB,
//                                        203, 0, 0, PARA_VALUE_TYPE_INT,
//                                        tr("Imposity 8 speed limit"),//针位8限速
//                                        1200, 0, 2000, 1200, 0, tr("rpm/min"), tr(""),
//                                        tr(""), 0, 0, 0x017B, operate));

    // 针位9限速,范围0-2000,单位转/分,默认1200
//    m_allParasList.append(makeAParaItem(0,
//                                        PARA_TYPE_WORK,
//                                        MC_SORT_EMB,
//                                        204, 0, 0, PARA_VALUE_TYPE_INT,
//                                        tr("Imposity 9 speed limit"),//针位9限速
//                                        1200, 0, 2000, 1200, 0, tr("rpm/min"), tr(""),
//                                        tr(""), 0, 0, 0x017C, operate));

    // 针位10限速,范围0-2000,单位转/分,默认1200
//    m_allParasList.append(makeAParaItem(0,
//                                        PARA_TYPE_WORK,
//                                        MC_SORT_EMB,
//                                        205, 0, 0, PARA_VALUE_TYPE_INT,
//                                        tr("Imposity 10 speed limit"),//针位10限速
//                                        1200, 0, 2000, 1200, 0, tr("rpm/min"), tr(""),
//                                        tr(""), 0, 0, 0x017D, operate));

    // 针位11限速,范围0-2000,单位转/分,默认1200
//    m_allParasList.append(makeAParaItem(0,
//                                        PARA_TYPE_WORK,
//                                        MC_SORT_EMB,
//                                        206, 0, 0, PARA_VALUE_TYPE_INT,
//                                        tr("Imposity 11 speed limit"),//针位11限速
//                                        1200, 0, 2000, 1200, 0, tr("rpm/min"), tr(""),
//                                        tr(""), 0, 0, 0x017E, operate));

    // 针位12限速,范围0-2000,单位转/分,默认1200
//    m_allParasList.append(makeAParaItem(0,
//                                        PARA_TYPE_WORK,
//                                        MC_SORT_EMB,
//                                        207, 0, 0, PARA_VALUE_TYPE_INT,
//                                        tr("Imposity 12 speed limit"),//针位12限速
//                                        1200, 0, 2000, 1200, 0, tr("rpm/min"), tr(""),
//                                        tr(""), 0, 0, 0x017F, operate));

    // 针位13限速,范围0-2000,单位转/分,默认1200
//    m_allParasList.append(makeAParaItem(0,
//                                        PARA_TYPE_WORK,
//                                        MC_SORT_EMB,
//                                        208, 0, 0, PARA_VALUE_TYPE_INT,
//                                        tr("Imposity 13 speed limit"),//针位13限速
//                                        1200, 0, 2000, 1200, 0, tr("rpm/min"), tr(""),
//                                        tr(""), 0, 0, 0x0180, operate));

    // 针位14限速,范围0-2000,单位转/分,默认1200
//    m_allParasList.append(makeAParaItem(0,
//                                        PARA_TYPE_WORK,
//                                        MC_SORT_EMB,
//                                        209, 0, 0, PARA_VALUE_TYPE_INT,
//                                        tr("Imposity 14 speed limit"),//针位14限速
//                                        1200, 0, 2000, 1200, 0, tr("rpm/min"), tr(""),
//                                        tr(""), 0, 0, 0x0181, operate));

    // 针位15限速,范围0-2000,单位转/分,默认1200
//    m_allParasList.append(makeAParaItem(0,
//                                        PARA_TYPE_WORK,
//                                        MC_SORT_EMB,
//                                        210, 0, 0, PARA_VALUE_TYPE_INT,
//                                        tr("Imposity 15 speed limit"),//针位15限速
//                                        1200, 0, 2000, 1200, 0, tr("rpm/min"), tr(""),
//                                        tr(""), 0, 0, 0x0182, operate));

    //主控工作参数---------------------------
}

//平绣机头板参数
void Quiembroidery::initHeadParasList()
{
    //QTextCodec *cod = QTextCodec::codecForLocale();

//    // 双向电磁铁保持时间,单位ms，范围0-50，默认值30
//    m_allParasList.append(makeAParaItem(0,
//                                        PARA_TYPE_HEADPARAMETER,
//                                        0,
//                                        0, 0, 0, PARA_VALUE_TYPE_INT,
//                                        tr("Two way electromagnet hold time"),// 双向电磁铁保持时间
//                                        30, 0, 50, 30, 0, tr("ms"), tr(""),
//                                        tr(""), 0, 0, 0x0000, factory));

    // 单向电磁铁PWM关闭时间，范围2-8，默认值8，单位无
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_HEADPARAMETER,
                                        0,
                                        22, 0, 0, PARA_VALUE_TYPE_INT,
                                        tr("One way electromagnet PWM shutdown time"),// 单向电磁铁PWM关闭时间
                                        8, 2, 8, 8, 0, tr(""), tr(""),
                                        tr(""), 0, 0, 0x0016, factory));

//    // 锁头电机细分数，范围1-64，默认值16
//    m_allParasList.append(makeAParaItem(0,
//                                        PARA_TYPE_HEADPARAMETER,
//                                        0,
//                                        1, 0, 0, PARA_VALUE_TYPE_INT,
//                                        tr("Lock motor segmentation"),// 锁头电机细分数
//                                        16, 1, 64, 16, 0, tr(""), tr(""),
//                                        tr(""), 0, 0, 0x0001, factory));

//    // 锁头电机运行电流，范围1-31，默认值30
//    m_allParasList.append(makeAParaItem(0,
//                                        PARA_TYPE_HEADPARAMETER,
//                                        0,
//                                        2, 0, 0, PARA_VALUE_TYPE_INT,
//                                        tr("Lock motor running current"),// 锁头电机运行电流
//                                        30, 1, 31, 30, 0, tr(""), tr(""),
//                                        tr(""), 0, 0, 0x0002, factory));

//    // 锁头电机锁头电流，范围1-31，默认值6
//    m_allParasList.append(makeAParaItem(0,
//                                        PARA_TYPE_HEADPARAMETER,
//                                        0,
//                                        3, 0, 0, PARA_VALUE_TYPE_INT,
//                                        tr("Lock motor lock current"),// 锁头电机锁头电流
//                                        6, 1, 31, 6, 0, tr(""), tr(""),
//                                        tr(""), 0, 0, 0x0003, factory));

//    // 锁头电机停止电流，范围1-31，默认值2
//    m_allParasList.append(makeAParaItem(0,
//                                        PARA_TYPE_HEADPARAMETER,
//                                        0,
//                                        4, 0, 0, PARA_VALUE_TYPE_INT,
//                                        tr("Lock motor stop current"),// 锁头电机停止电流
//                                        2, 1, 31, 2, 0, tr(""), tr(""),
//                                        tr(""), 0, 0, 0x0004, factory));

//    // 锁头自动断电, 0, 不断电, 小电流锁定; 1, 自动断电;
//    m_allParasList.append(makeAParaItem(0,
//                                        PARA_TYPE_HEADPARAMETER,
//                                        0,
//                                        5, 0, 0, PARA_VALUE_TYPE_LIST,
//                                        tr("Lock automatic power off"),// 锁头自动断电
//                                        0, 0, 1, 0, 0, tr(""), tr(""),
//                                        tr("No:0;Auto break:1"), 0, 0, 0x0005, factory));

//    // 锁头电机运行角度，范围1-10000，默认值2700，单位0.01度
//    m_allParasList.append(makeAParaItem(0,
//                                        PARA_TYPE_HEADPARAMETER,
//                                        0,
//                                        6, 0, 0, PARA_VALUE_TYPE_INT,
//                                        tr("Lock motor operation angle"),// 锁头电机运行角度
//                                        2700, 1, 10000, 2700, 2, cod->toUnicode("°"), tr(""),
//                                        tr(""), 0, 0, 0x0006, factory));

//    // 锁头电机起始跳过角度，范围0-1000，默认值0，单位0.01度
//    m_allParasList.append(makeAParaItem(0,
//                                        PARA_TYPE_HEADPARAMETER,
//                                        0,
//                                        7, 0, 0, PARA_VALUE_TYPE_INT,
//                                        tr("Lock motor start skipping angle"),// 锁头电机起始跳过角度
//                                        0, 1, 1000, 0, 2, cod->toUnicode("°"), tr(""),
//                                        tr(""), 0, 0, 0x0007, factory));

//    // 锁头电机启动频率(整步数/秒)，范围1-10000，默认值300
//    m_allParasList.append(makeAParaItem(0,
//                                        PARA_TYPE_HEADPARAMETER,
//                                        0,
//                                        8, 0, 0, PARA_VALUE_TYPE_INT,
//                                        tr("Lock motor start frequency"),// 锁头电机启动频率
//                                        300, 1, 10000, 300, 0, tr("step/s"), tr(""),
//                                        tr(""), 0, 0, 0x0008, factory));

//    // 锁头电机运行频率(整步数/秒)，范围1-3000，默认值300
//    m_allParasList.append(makeAParaItem(0,
//                                        PARA_TYPE_HEADPARAMETER,
//                                        0,
//                                        9, 0, 0, PARA_VALUE_TYPE_INT,
//                                        tr("Lock motor run frequency"),// 锁头电机运行频率
//                                        300, 1, 3000, 300, 0, tr("step/s"), tr(""),
//                                        tr(""), 0, 0, 0x0009, factory));

//    // 锁头电机加速度(整步数/秒2)，范围1-10000，默认值10
//    m_allParasList.append(makeAParaItem(0,
//                                        PARA_TYPE_HEADPARAMETER,
//                                        0,
//                                        10, 0, 0, PARA_VALUE_TYPE_INT,
//                                        tr("Lock motor acceleration"),// 锁头电机加速度
//                                        10, 1, 10000, 10, 0, tr("step/s2"), tr(""),
//                                        tr(""), 0, 0, 0x000A, factory));

//    // 勾线电机细分数，范围1-256，默认值64
//    m_allParasList.append(makeAParaItem(0,
//                                        PARA_TYPE_HEADPARAMETER,
//                                        0,
//                                        11, 0, 0, PARA_VALUE_TYPE_INT,
//                                        tr("Hook motor segmentation"),// 勾线电机细分数
//                                        64, 1, 256, 64, 0, tr(""), tr(""),
//                                        tr(""), 0, 0, 0x0000B, factory));

//    // 勾线电机运行电流，范围1-31，默认值30
//    m_allParasList.append(makeAParaItem(0,
//                                        PARA_TYPE_HEADPARAMETER,
//                                        0,
//                                        12, 0, 0, PARA_VALUE_TYPE_INT,
//                                        tr("Hook motor running current"),// 勾线电机运行电流
//                                        30, 1, 31, 30, 0, tr(""), tr(""),
//                                        tr(""), 0, 0, 0x000C, factory));

//    // 勾线电机勾线电流，范围1-31，默认值5
//    m_allParasList.append(makeAParaItem(0,
//                                        PARA_TYPE_HEADPARAMETER,
//                                        0,
//                                        13, 0, 0, PARA_VALUE_TYPE_INT,
//                                        tr("Hook motor hook current"),// 勾线电机勾线电流
//                                        5, 1, 31, 5, 0, tr(""), tr(""),
//                                        tr(""), 0, 0, 0x000D, factory));

//    // 勾线电机停止电流，范围1-31，默认值2
//    m_allParasList.append(makeAParaItem(0,
//                                        PARA_TYPE_HEADPARAMETER,
//                                        0,
//                                        14, 0, 0, PARA_VALUE_TYPE_INT,
//                                        tr("Hook motor stop current"),// 勾线电机停止电流
//                                        2, 1, 31, 2, 0, tr(""), tr(""),
//                                        tr(""), 0, 0, 0x000E, factory));

//    // 勾线自动断电, 0, 不断电, 小电流锁定; 1, 自动断电;
//    m_allParasList.append(makeAParaItem(0,
//                                        PARA_TYPE_HEADPARAMETER,
//                                        0,
//                                        15, 0, 0, PARA_VALUE_TYPE_LIST,
//                                        tr("Hook automatic power off"),// 勾线自动断电
//                                        0, 0, 1, 0, 0, tr(""), tr(""),
//                                        tr("No:0;Auto break:1"), 0, 0, 0x000F, factory));

//    // 勾线电机运行角度，范围1-30000，默认值10440，单位0.01度
//    m_allParasList.append(makeAParaItem(0,
//                                        PARA_TYPE_HEADPARAMETER,
//                                        0,
//                                        16, 0, 0, PARA_VALUE_TYPE_INT,
//                                        tr("Hook motor operation angle"),// 勾线电机运行角度
//                                        10440, 1, 30000, 10440, 2, cod->toUnicode("°"), tr(""),
//                                        tr(""), 0, 0, 0x0010, factory));

//    // 勾线电机起始跳过角度，范围0-1000，默认值200，单位0.01度
//    m_allParasList.append(makeAParaItem(0,
//                                        PARA_TYPE_HEADPARAMETER,
//                                        0,
//                                        17, 0, 0, PARA_VALUE_TYPE_INT,
//                                        tr("Hook motor start skipping angle"),// 勾线电机起始跳过角度
//                                        200, 1, 1000, 200, 2, cod->toUnicode("°"), tr(""),
//                                        tr(""), 0, 0, 0x0011, factory));

//    // 勾线电机启动频率(整步数/秒)，范围1-500，默认值100
//    m_allParasList.append(makeAParaItem(0,
//                                        PARA_TYPE_HEADPARAMETER,
//                                        0,
//                                        18, 0, 0, PARA_VALUE_TYPE_INT,
//                                        tr("Hook moto start frequency"),// 勾线电机启动频率
//                                        100, 1, 500, 100, 0, tr("step/s"), tr(""),
//                                        tr(""), 0, 0, 0x0012, factory));

//    // 勾线电机运行频率(整步数/秒)，范围1-3000，默认值300
//    m_allParasList.append(makeAParaItem(0,
//                                        PARA_TYPE_HEADPARAMETER,
//                                        0,
//                                        19, 0, 0, PARA_VALUE_TYPE_INT,
//                                        tr("Hook moto run frequency"),// 勾线电机运行频率
//                                        300, 1, 3000, 300, 0, tr("step/s"), tr(""),
//                                        tr(""), 0, 0, 0x0013, factory));

//    // 勾线电机加速度(整步数/秒2)，范围1-100，默认值10
//    m_allParasList.append(makeAParaItem(0,
//                                        PARA_TYPE_HEADPARAMETER,
//                                        0,
//                                        20, 0, 0, PARA_VALUE_TYPE_INT,
//                                        tr("Hook moto acceleration"),// 勾线电机加速度
//                                        10, 1, 100, 10, 0, tr("step/s2"), tr(""),
//                                        tr(""), 0, 0, 0x0014, factory));

//    // 勾线放松角度，范围0-5000，默认值1260，单位0.01度
//    m_allParasList.append(makeAParaItem(0,
//                                        PARA_TYPE_HEADPARAMETER,
//                                        0,
//                                        21, 0, 0, PARA_VALUE_TYPE_INT,
//                                        tr("Relax angle"),// 勾线放松角度
//                                        1260, 0, 5000, 1260, 2, cod->toUnicode("°"), tr(""),
//                                        tr(""), 0, 0, 0x0015, factory));


//    // 锁头类型，范围0-2，0,无锁头  1,电磁铁锁头 2,步进电机锁头
//    m_allParasList.append(makeAParaItem(0,
//                                        PARA_TYPE_HEADPARAMETER,
//                                        0,
//                                        23, 0, 0, PARA_VALUE_TYPE_LIST,
//                                        tr("lock type"),// 锁头类型
//                                        0, 0, 2, 0, 0, tr(""), tr(""),
//                                        tr("No:0;Electromagnet:1;Stepper motor:2"),
//                                        0, 0, 0x0016, factory));

//    //Q1功能类型	0,锁头电磁铁	1,激光出光控制	默认0
//    m_allParasList.append(makeAParaItem(0,
//                                        PARA_TYPE_HEADPARAMETER,
//                                        0,
//                                        24, 0, 0, PARA_VALUE_TYPE_LIST,
//                                        tr("Q1 function type"),// Q1功能类型
//                                        0, 0, 1, 0, 0, tr(""), tr(""),
//                                        tr("LockHead:0;LaserControl:1"),
//                                        0, 0, 0x0016, factory));

//    // Q2功能类型	0,单向夹线电磁铁	1,激光定位灯	2,激光吹气	3，跟踪绳绣  默认0
//    m_allParasList.append(makeAParaItem(0,
//                                        PARA_TYPE_HEADPARAMETER,
//                                        0,
//                                        25, 0, 0, PARA_VALUE_TYPE_LIST,
//                                        tr("Q2 function type"),// 锁头类型
//                                        0, 0, 3, 0, 0, tr(""), tr(""),
//                                        tr("One-wayClamp:0;LaserPosition:1;LaserBlow:2;TrackRope:3"),
//                                        0, 0, 0x0016, factory));

//    // 激光定位灯关闭延时 ,单位秒,范围0-10,默认3
//    m_allParasList.append(makeAParaItem(0,
//                                        PARA_TYPE_HEADPARAMETER,
//                                        0,
//                                        31, 0, 0, PARA_VALUE_TYPE_INT,
//                                        tr("Laser positioning light off delay"),// 激光定位灯关闭延时
//                                        3, 0, 10, 3, 0, tr(""), tr(""),
//                                        tr(""), 0, 0, 0x0016, factory));

//    // 夹线装置选择，0，不夹线; 1, 电磁铁夹线; 2, 双向电磁铁夹线
//    m_allParasList.append(makeAParaItem(0,
//                                        PARA_TYPE_HEADPARAMETER,
//                                        0,
//                                        0, 0, 0, PARA_VALUE_TYPE_LIST,
//                                        tr("Clip device selection"),// 夹线装置选择
//                                        0, 0, 2, 0, 0, tr(""), tr(""),
//                                        tr("No clamp:0;Elec clamp:1;TwoWay elec clamp:2"), 0, 0, 0x0000, factory));

//    // 锁头类型，0，无锁头; 1, 电磁铁锁头; 3, 步进电机锁头
//    m_allParasList.append(makeAParaItem(0,
//                                        PARA_TYPE_HEADPARAMETER,
//                                        0,
//                                        1, 0, 0, PARA_VALUE_TYPE_LIST,
//                                        tr("Lock type"),// 锁头类型
//                                        0, 0, 3, 0, 0, tr(""), tr(""),
//                                        tr("Null:0;Elec lock:1;Stepper motor lock:3"), 0, 0, 0x0001, factory));

}


//外围板升级参数
void Quiembroidery::initEXBUpgradeParaList()
{
    //绣花机-外围板升级参数-机头板升级；单位：无
    m_allParasList.append(makeAParaItem(0,
                                        PARA_TYPE_EXBUPGRADE,
                                        0 ,
                                        ROOT_HEADUPDATE, 0, 0, PARA_VALUE_TYPE_CLICK,
                                        tr("EMB Overhead board upgrade"),//平绣机头板升级
                                        0, 0, 0, 0, 0, tr(""), tr(""),
                                        tr(""),
                                        0, 0, 0x0000, factory));

//    //绣花机-外围板升级参数-换色板升级；单位：无
//    m_allParasList.append(makeAParaItem(0,
//                                        PARA_TYPE_EXBUPGRADE,
//                                        0 ,
//                                        ROOT_HCPSUPDATE, 0, 0, PARA_VALUE_TYPE_CLICK,
//                                        tr("Change color board upgrade"),//换色板升级
//                                        0, 0, 0, 0, 0, tr(""), tr(""),
//                                        tr(""),
//                                        0, 0, 0x0002, factory));
}

void Quiembroidery::initOutCtrlList()
{
    m_allOutCtrlList.clear();

    QString enableStr = tr("Enable");   //使能
    QString disableStr = tr("Disable"); //失能
    QString jogPStr = tr("JogP"); //正转
    QString jogNStr = tr("JogN"); //反转
    QString zeroStr = tr("Zero"); //归零
    QString openStr = tr("Open"); //打开
    QString closeStr= tr("Close");//关闭

    m_allOutCtrlList.append(makeAOutCtrlItem(0,0x0001,tr("X to move motor"),MT_LX,// X向移动电机
                                             enableStr,true,OUTCONTROL_ENABLE,-1,-1,
                                             disableStr,true,OUTCONTROL_DISABLE,-1,-1,
                                             jogPStr,true,-1,OUTCONTROL_JOGP,OUTCONTROL_STOP,
                                             jogNStr,true,-1,OUTCONTROL_JOGN,OUTCONTROL_STOP,
                                             zeroStr,true,OUTCONTROL_ZERO,-1,-1));

    m_allOutCtrlList.append(makeAOutCtrlItem(0,0x0002,tr("Y to move motor"),MT_LY,// Y向移动电机
                                             enableStr,true,OUTCONTROL_ENABLE,-1,-1,
                                             disableStr,true,OUTCONTROL_DISABLE,-1,-1,
                                             jogPStr,true,-1,OUTCONTROL_JOGP,OUTCONTROL_STOP,
                                             jogNStr,true,-1,OUTCONTROL_JOGN,OUTCONTROL_STOP,
                                             zeroStr,true,OUTCONTROL_ZERO,-1,-1));

    m_allOutCtrlList.append(makeAOutCtrlItem(0,0x0003,tr("Flat embroidery spindle"),MT_LEM,// 平绣主轴
                                             enableStr,true,OUTCONTROL_MS_ENABLE,-1,-1,
                                             disableStr,true,OUTCONTROL_MS_DISABLE,-1,-1,
                                             jogPStr,true,-1,OUTCONTROL_JOGP,OUTCONTROL_STOP,
                                             jogNStr,true,-1,OUTCONTROL_JOGN,OUTCONTROL_STOP,
                                             zeroStr,true,OUTCONTROL_ZERO,-1,-1));

    m_allOutCtrlList.append(makeAOutCtrlItem(0,0x0008,tr("Flat embroidery button line"),OT_EMB_PUSH,// 平绣扣线
                                             "",false,-1,-1,-1,
                                             "",false,-1,-1,-1,
                                             "",false,-1,-1,-1,
                                             openStr,true,OUTCONTROL_OPEN,-1,-1,
                                             closeStr,true,OUTCONTROL_CLOSE,-1,-1));

    m_allOutCtrlList.append(makeAOutCtrlItem(0,0x0009,tr("Flat embroidery clip noodles"),OT_EMB_CLIP,// 平绣夹面线
                                             "",false,-1,-1,-1,
                                             "",false,-1,-1,-1,
                                             "",false,-1,-1,-1,
                                             openStr,true,OUTCONTROL_OPEN,-1,-1,
                                             closeStr,true,OUTCONTROL_CLOSE,-1,-1));

    m_allOutCtrlList.append(makeAOutCtrlItem(0,0x000A,tr("Flat embroidery lock"),OT_EMB_LOCK,// 平绣锁头
                                             "",false,-1,-1,-1,
                                             "",false,-1,-1,-1,
                                             "",false,-1,-1,-1,
                                             openStr,true,OUTCONTROL_OPEN,-1,-1,
                                             closeStr,true,OUTCONTROL_CLOSE,-1,-1));

    m_allOutCtrlList.append(makeAOutCtrlItem(0,0x000A,tr("Flat embroidery oil"),OT_EMB_OIL,// 平绣加油
                                             "",false,-1,-1,-1,
                                             "",false,-1,-1,-1,
                                             "",false,-1,-1,-1,
                                             "",false,-1,-1,-1,
                                             openStr,true,OUTCONTROL_OPEN,-1,-1));
}

void Quiembroidery::initShortCutList()
{
    m_allShortCutList.clear();

    m_allShortCutList.append(makeAShortCutItem(0,0x0001,tr("AllToZero"),"buttonAllToZero",FUN_ALLTOZERO));//全部归零
    m_allShortCutList.append(makeAShortCutItem(0,0x0002,tr("EmbHook"),"buttonFlatEmbHook",FUN_FLATEMBHOOK));//平绣勾线
    m_allShortCutList.append(makeAShortCutItem(0,0x0003,tr("AxleJog"),"buttonSpindleJog",FUN_SPINDLEJOG));//主轴点动
    m_allShortCutList.append(makeAShortCutItem(0,0x0004,tr("AxleRotate"),"buttonSpindleRotate",FUN_SPINDLEROTATE));//主轴旋转
    m_allShortCutList.append(makeAShortCutItem(0,0x0005,tr("GoWork"),"buttonBackWorkPoint",FUN_BACKWORKPOINT));//回工作点
    m_allShortCutList.append(makeAShortCutItem(0,0x0006,tr("GoOrigin"),"buttonBackToOrigin",FUN_BACKTOORIGIN));//回原点
    //    m_allShortCutList.append(makeAShortCutItem(0,0x0005,tr("SetAnchorPoint"),"buttonSetAnchorPoint",FUN_SETANCHORPOINT));//定定位点
    //    m_allShortCutList.append(makeAShortCutItem(0,0x0006,tr("BackAnchorPoint"),"buttonBackAnchorPoint",FUN_BACKANCHORPOINT));//回定位点
    m_allShortCutList.append(makeAShortCutItem(0,0x0007,tr("SetOffset"),"buttonSetOffsetPoint",FUN_SETOFFSETPOINT));//定偏移点
    m_allShortCutList.append(makeAShortCutItem(0,0x0008,tr("GoOffset"),"buttonBackOffsetPoint",FUN_BACKOFFSETPOINT));//回偏移点
    m_allShortCutList.append(makeAShortCutItem(0,0x0009,tr("SetStart"),"buttonSetEmbPoint",FUN_SETSTARTEMBPOINT));//定起绣点(绣花机用于设定为点)
    m_allShortCutList.append(makeAShortCutItem(0,0x000A,tr("GoStart"),"buttonBackEmbPoint",FUN_BACKSTARTEMBPOINT));//回起绣点(绣花机用于设定为点)
    m_allShortCutList.append(makeAShortCutItem(0,0x000B,tr("CheckFrame"),"buttonBorderCheck",FUN_CHECKFRAME));//边框检查
    m_allShortCutList.append(makeAShortCutItem(0,0x000C,tr("Trim"),"buttonManualTrim",FUN_MANUALTRIM));//平绣剪线
    m_allShortCutList.append(makeAShortCutItem(0,0x000D,tr("UnderTrim"),"buttonCutOpenAndClose",FUN_CUTOPENANDCLOSE));//下剪线
    m_allShortCutList.append(makeAShortCutItem(0,0x000E,tr("ChangeC"),"buttonManualChangeColor",FUN_MANUALCHANGECOLOR));//手动换色
    m_allShortCutList.append(makeAShortCutItem(0,0x000F,tr("GoOrBack"),"buttonForwardOrBack",FUN_FORWARDORBACK));//前进回退
    m_allShortCutList.append(makeAShortCutItem(0,0x0010,tr("MoveBorder"),"buttonQuantityMoveFrame",FUN_QUANTITYMOVEFRAME));//定量移框
    m_allShortCutList.append(makeAShortCutItem(0,0x0011,tr("RodPosition"),"buttonNeedleRodPosition",FUN_NEEDLERODPOSITION));//针杆定位
    m_allShortCutList.append(makeAShortCutItem(0,0x0012,tr("Border"),"buttonSimulateFrame",FUN_SIMULATEFRAME));//空走边框
    //m_allShortCutList.append(makeAShortCutItem(0,0x0013,tr("Reset"),"buttonProcessReset",FUN_PROCESSRESET));//流程复位
    m_allShortCutList.append(makeAShortCutItem(0,0x0016,tr("Oil"),"buttonManualOil",FUN_MANUALOIL));//手动加油
    //m_allShortCutList.append(makeAShortCutItem(0,0x000C,tr("EmbWorkArea"),"buttonBorderEmb",FUN_EMBWORKAREA));//平绣设置可工作区域

}

void Quiembroidery::initAssistList()
{
    m_allAssistList.clear();

    m_allAssistList.append(makeAAssistItem(0,0x0001,tr("Signal"),"buttonSensor",ASSIST_SENSOR));//传感器信号
    m_allAssistList.append(makeAAssistItem(0,0x0002,tr("Action"),"buttonControlAction",ASSIST_CONTROLACTION));//控制动作
    m_allAssistList.append(makeAAssistItem(0,0x0003,tr("HMIUpgrade"),"buttonHMIUpgrade",ASSIST_HMIUPGRADE));//界面升级
    m_allAssistList.append(makeAAssistItem(0,0x0004,tr("MCUpgrade"),"buttonMCUpgrade",ASSIST_MCUPGRADE));//主控升级
    // m_allAssistList.append(makeAAssistItem(0,0x0005,tr("EXBUpgrade"),"buttonEXBUpgrade",ASSIST_EXBUPGRADE));//外围板升级
    m_allAssistList.append(makeAAssistItem(0,0x0006,tr("ParaImport"),"buttonParaImport",ASSIST_PARAIMPORT));//参数导入
    m_allAssistList.append(makeAAssistItem(0,0x0007,tr("ParaExport"),"buttonParaExport",ASSIST_PARAEXPORT));//参数导出
    m_allAssistList.append(makeAAssistItem(0,0x0008,tr("Software"),"buttonSoftwareSet",ASSIST_SOFTWARESET));//软件设置
    m_allAssistList.append(makeAAssistItem(0,0x0009,tr("Authorize"),"buttonSoftwareAuthor",ASSIST_AUTHORIZATION));//软件授权
    m_allAssistList.append(makeAAssistItem(0,0x000A,tr("Network"),"buttonNetworkManage",ASSIST_NETWORK));//网络管理
    s16 wifi = g_pSettings->readFromInHMIiFile("HMI/wifi").toInt();//是否有wifi
    if(wifi == 1)
    {
        m_allAssistList.append(makeAAssistItem(0,0x000A,tr("WIFI"),"buttonWIFI",ASSIST_WIFI));//WIFI管理
    }

    m_allAssistList.append(makeAAssistItem(0,0x000B,tr("NeedleSet"),"buttonNeedleSet",ASSIST_NEEDLESET));//针杆设置
    m_allAssistList.append(makeAAssistItem(0,0x000D,tr("Time"),"buttonTimeSet",ASSIST_TIMESET));//时间设置
    //m_allAssistList.append(makeAAssistItem(0,0x000E,tr("Shortcut"),"buttonCommonFunction",ASSIST_SHORTCUTSET));//常用设置
    m_allAssistList.append(makeAAssistItem(0,0x000F,tr("Statistics"),"buttonProductStatistics",ASSIST_PRODUCTSTATICS));//生产统计
    m_allAssistList.append(makeAAssistItem(0,0x0010,tr("Version"),"buttonVersionInfo",ASSIST_MCVERSION));//版本信息
    m_allAssistList.append(makeAAssistItem(0,0x0011,tr("EXBVersion"),"buttonEXBVersionInfo",ASSIST_EXBVERSION));//外围板信息
    m_allAssistList.append(makeAAssistItem(0,0x0012,tr("UnderDetect"),"buttonBottomDetect",ASSIST_BOTTOMLINEDETECT));//底线检测
    m_allAssistList.append(makeAAssistItem(0,0x0013,tr("FaceDetect"),"buttonFaceDetect",ASSIST_FACELINEDETECT));//面线检测
    m_allAssistList.append(makeAAssistItem(0,0x0014,tr("AxleTest"),"buttonSpindleTest",ASSIST_SPINDLETEST));//主轴研车
    m_allAssistList.append(makeAAssistItem(0,0x000F,tr("ErrorLog"),"buttonAgingTest",ASSIST_ERRORLOG));//错误日志
    m_allAssistList.append(makeAAssistItem(0,0x0015,tr("DebugInfo"),"buttonSpindleTest",ASSIST_DEBUGINFO));//调试信息
    m_allAssistList.append(makeAAssistItem(0,0x0017,tr("Root"),"buttonRoot",ASSIST_ROOT));//超级用户

#ifdef Q_OS_WIN
    m_allAssistList.append(makeAAssistItem(0,0x0018,tr("ShutDown"),"buttonShutDown",ASSIST_SHUTDOWN));//关机
#endif
}

void Quiembroidery::initPatternSetList()
{
    m_allPatternSetList.clear();

    m_allPatternSetList.append(makeAPatternSetItem(0,0x0001,tr("Select"),"buttonPatternSelect",PATTERNSET_PATTERNSELECT));//花样选择
    m_allPatternSetList.append(makeAPatternSetItem(0,0x0002,tr("Para"),"buttonPatternPara",PATTERNSET_PATTERNPARA));//花样参数
    m_allPatternSetList.append(makeAPatternSetItem(0,0x0003,tr("Color"),"buttonPatternColorOrder",PATTERNSET_PATTERNCOLOR));//花样色序
    m_allPatternSetList.append(makeAPatternSetItem(0,0x0004,tr("Import"),"buttonPatternImport",PATTERNSET_PATTERNIMPORT));//花样导入
    m_allPatternSetList.append(makeAPatternSetItem(0,0x0005,tr("Export"),"buttonPatternExport",PATTERNSET_PATTERNEXPORT));//花样导出
    m_allPatternSetList.append(makeAPatternSetItem(0,0x0006,tr("Delete"),"buttonPatternDelete",PATTERNSET_PATTERNDELETE));//花样删除
}

void Quiembroidery::initParaSetList()
{
    m_allParaSetList.clear();

    m_allParaSetList.append(makeAParaSetItem(0,0x0001,tr("EmbPara"),"buttonPositionParas",PARASET_EMB));//绣花参数
    //m_allParaSetList.append(makeAParaSetItem(0,0x0002,tr("PositionPara"),"buttonSpeedParas",PARASET_POSITION));//位置参数
    //m_allParaSetList.append(makeAParaSetItem(0,0x0002,tr("SpeedPara"),"buttonSpeedParas",PARASET_SPEED));//速度参数
    //m_allParaSetList.append(makeAParaSetItem(0,0x0003,tr("ActionPara"),"buttonActionParas",PARASET_ACTION));//动作参数
    //m_allParaSetList.append(makeAParaSetItem(0,0x0004,tr("DetectPara"),"buttonDetectParas",PARASET_DETECT));//检测参数
    m_allParaSetList.append(makeAParaSetItem(0,0x0001,tr("SetPara"),"buttonDetectParas",PARASET_SETTING));//设置参数
    m_allParaSetList.append(makeAParaSetItem(0,0x0005,tr("CutPara"),"buttonDetectParas",PARASET_CUT));//剪线参数

}

void Quiembroidery::initEmbFunctionList()
{
    m_allEmbFunctionList.clear();

    m_allEmbFunctionList.append(makeAEmbFunItem(0,0x0001,tr("BorderEmb"),"buttonBorderEmb",EMBFUN_BORDEREMB));//边框刺绣
    m_allEmbFunctionList.append(makeAEmbFunItem(0,0x0002,tr("MateEmb"),"buttonMateEmb",EMBFUN_MATEEMB));//匹绣

    int headEmb = g_pSettings->readFromInHMIiFile("HMI/headEmb").toInt();//是否有隔头绣功能
    //是否显示隔头绣按钮
    if(headEmb == 1)
    {
        m_allEmbFunctionList.append(makeAEmbFunItem(0,0x0003,tr("HeadEmb"),"buttonHeadEmb",EMBFUN_HEADEMB));//隔头绣
    }

    m_allEmbFunctionList.append(makeAEmbFunItem(0,0x0004,tr("PatchEmb"),"buttonPatchEmb",EMBFUN_PATCHEMB));//贴布绣
    m_allEmbFunctionList.append(makeAEmbFunItem(0,0x0005,tr("LineEmb"),"buttonOpenLineEmb",EMBFUN_OPENLINEEMB));//开位线绣
    //m_allEmbFunctionList.append(makeAEmbFunItem(0,0x0006,tr("OutLine"),"buttonOutLine",EMBFUN_OUTLINE));//花样轮廓
    //m_allEmbFunctionList.append(makeAEmbFunItem(0,0x0006,tr("OutLineEmb"),"buttonOutLine",EMBFUN_OUTLINECHECK));//轮廓刺绣
    m_allEmbFunctionList.append(makeAEmbFunItem(0,0x0007,tr("LineOffset"),"buttonLineOffset",EMBFUN_LINEOFFSET));//线迹偏移
    m_allEmbFunctionList.append(makeAEmbFunItem(0,0x0008,tr("WorkPause"),"buttonAgingTest",EMBFUN_WORKSUSPENSION));//工作暂停
}

//初始化传感器列表
void Quiembroidery::initSensorList()
{
    QList <SensorItem> sensorList;

    sensorList.append(makeASensorItem(0x0000, 0, tr("Start button 1")));//启动按钮1
    sensorList.append(makeASensorItem(0x0001, 0, tr("Pause button 1")));//暂停按钮1
    sensorList.append(makeASensorItem(0x0002, 0, tr("Jog button 1")));//点动按钮1
    sensorList.append(makeASensorItem(0x0003, 0, tr("open box button 1")));//开框按钮1
    sensorList.append(makeASensorItem(0x0003, 1, tr("open box button 2")));//开框按钮2
    sensorList.append(makeASensorItem(0x0003, 2, tr("open box button 3")));//开框按钮3
    sensorList.append(makeASensorItem(0x0003, 3, tr("open box button 4")));//开框按钮4
    sensorList.append(makeASensorItem(0x0003, 4, tr("open box button 5")));//开框按钮5
    sensorList.append(makeASensorItem(0x0003, 5, tr("open box button 6")));//开框按钮6
    sensorList.append(makeASensorItem(0x0003, 6, tr("open box button 7")));//开框按钮7
    sensorList.append(makeASensorItem(0x0003, 7, tr("open box button 8")));//开框按钮8

    sensorList.append(makeASensorItem(0x0007, 0, tr("Air pressure detection 1")));//气压检测1
    sensorList.append(makeASensorItem(0x0007, 1, tr("Air pressure detection 2")));//气压检测2
    sensorList.append(makeASensorItem(0x0007, 2, tr("Air pressure detection 3")));//气压检测3
    sensorList.append(makeASensorItem(0x0007, 3, tr("Air pressure detection 4")));//气压检测4
    sensorList.append(makeASensorItem(0x0007, 4, tr("Air pressure detection 5")));//气压检测5
    sensorList.append(makeASensorItem(0x0007, 5, tr("Air pressure detection 6")));//气压检测6
    sensorList.append(makeASensorItem(0x0007, 6, tr("Air pressure detection 7")));//气压检测7
    sensorList.append(makeASensorItem(0x0007, 7, tr("Air pressure detection 8")));//气压检测8

    sensorList.append(makeASensorItem(0x0020, 0, tr("Main frame X zero position")));//主框架X零位
    sensorList.append(makeASensorItem(0x0020, 1, tr("Main frame Y zero position")));//主框架Y零位
    sensorList.append(makeASensorItem(0x0022, 0, tr("Main frame X negative limit")));//主框架X负限位
    sensorList.append(makeASensorItem(0x0022, 1, tr("Main frame Y negative limit")));//主框架Y负限位
    sensorList.append(makeASensorItem(0x0023, 0, tr("Main frame X positive limit")));//主框架X正限位
    sensorList.append(makeASensorItem(0x0023, 1, tr("Main frame Y positive limit")));//主框架Y正限位
    sensorList.append(makeASensorItem(0x0100, 0, tr("Scissors return")));//剪刀回位
    sensorList.append(makeASensorItem(0x0103, 1, tr("Tracking rope embroidery alarm")));//跟踪绳绣报警
    sensorList.append(makeASensorItem(0x0103, 0, tr("Automatic shuttle change alarm")));//自动换梭报警

    sensorList.append(makeASensorItem(0x0104, 0, tr("Cutter hook return")));//勾刀回位
    sensorList.append(makeASensorItem(0x0104, 1, tr("Color change zero position")));//换色零位
    sensorList.append(makeASensorItem(0x0104, 2, tr("Color change position 1")));//换色位置1
    sensorList.append(makeASensorItem(0x0104, 3, tr("Color change position 2")));   //换色位置2
    sensorList.append(makeASensorItem(0x0104, 4, tr("Color change position 3"))); //换色位置3
    sensorList.append(makeASensorItem(0x0104, 5, tr("Color change position 4"))); //换色位置4
    sensorList.append(makeASensorItem(0x0104, 6, tr("Foot switch"))); //脚踏开关


    //将机型所需的传感器列表替换到传感器整体列表中
    for(int i = 0; i < sensorList.size(); i++)
    {
        int byteaddr = sensorList[i].m_byte_offset;
        int bitaddr = sensorList[i].m_bit_offset;
        QString str = sensorList[i].m_name;
        int type = sensorList[i].m_type;

        int idx = byteaddr*8+bitaddr;
        if(idx < m_allSensorList.size())
        {
            m_allSensorList[idx].m_name = str;
            m_allSensorList[idx].m_type = type;
        }
    }
}

//初始化错误代码和状态列表
void Quiembroidery::initErrorCodeAndStateList()
{
    m_allErrorCodeAndStateList.clear();

    //错误代码
    m_allErrorCodeAndStateList.append(makeAErrorStateItem(ERR_EMB_NOT_ZERO, tr("The embroidery spindle is not in the zero position")));// 绣花主轴不在零位
    m_allErrorCodeAndStateList.append(makeAErrorStateItem(ERR_EMB_SWND_TIMOUT, tr("Flat embroidery color change timeout")));// 平绣换色超时
    m_allErrorCodeAndStateList.append(makeAErrorStateItem(ERR_EMB_ND_ERR, tr("Flat embroidery needle position error")));// 平绣针位错误
    m_allErrorCodeAndStateList.append(makeAErrorStateItem(ERR_NODE_ERR, tr("Node error")));// 节点错误
    m_allErrorCodeAndStateList.append(makeAErrorStateItem(ERR_BUS_ERR, tr("Bus error")));// 总线错误
    m_allErrorCodeAndStateList.append(makeAErrorStateItem(ERR_EMB_HOOK_NOT_ZERO, tr("Flat embroidery hook knife is not returning")));// 平绣勾刀不在回位
    m_allErrorCodeAndStateList.append(makeAErrorStateItem(ERR_EMB_CUT_NOT_ZERO, tr("Flat embroidery cutter is not returning")));// 平绣剪刀不在回位
    m_allErrorCodeAndStateList.append(makeAErrorStateItem(ERR_CAN_TIMEOUT, tr("CAN communication timeout")));// CAN通讯超时
    m_allErrorCodeAndStateList.append(makeAErrorStateItem(ERR_HEAD_NUM, tr("Number of machine heads")));// 机头个数错误
    m_allErrorCodeAndStateList.append(makeAErrorStateItem(ERR_READ_HEAD_PARA, tr("Read the head board parameter error")));// 读取机头板参数错误
    m_allErrorCodeAndStateList.append(makeAErrorStateItem(ERR_X_DRIVER, tr("X drive alarm")));// X驱动器报警
    m_allErrorCodeAndStateList.append(makeAErrorStateItem(ERR_Y_DRIVER, tr("Y drive alarm")));// Y驱动器报警
    m_allErrorCodeAndStateList.append(makeAErrorStateItem(ERR_LIGHTCURTAINS1, tr("Light curtain intervention")));// 光幕介入
    m_allErrorCodeAndStateList.append(makeAErrorStateItem(ERR_EMB_SPINDLE_RATIO, tr("Pingxiu spindle gear ratio error")));// 平绣主轴齿轮比错误
    m_allErrorCodeAndStateList.append(makeAErrorStateItem(ERR_MS_COOR_SYSTM, tr("Horizontal embroidery spindle coordinate system error")));// 平绣主轴坐标系统错误
    m_allErrorCodeAndStateList.append(makeAErrorStateItem(ERR_ZP_SIGNAL, tr("ZP signal abnormality")));// ZP信号异常
    m_allErrorCodeAndStateList.append(makeAErrorStateItem(ERR_MP_SIGNAL, tr("MP signal abnormality")));// MP信号异常
    //状态代码
    m_allErrorCodeAndStateList.append(makeAErrorStateItem(STA_EMB_CHNGCL_STOP, tr("Color change stop")));// 换色停止
    m_allErrorCodeAndStateList.append(makeAErrorStateItem(STA_MEND_FINISH, tr("Mending embroidery is complete")));// 补绣完成
    m_allErrorCodeAndStateList.append(makeAErrorStateItem(STA_LINE_TBREAK, tr("Broken line stop")));// 断线停止
    m_allErrorCodeAndStateList.append(makeAErrorStateItem(STA_EMB_SPINDLERATIO, tr("The gear ratio of plain emb spindle is normal")));// 平绣主轴齿轮比正常
}
