#include "cmwcalilevel.h"
#include "ui_cmwcalilevel.h"
#include "logic.h"
CMWCaliLevel::CMWCaliLevel(QWidget *parent) :
    CMWidget(parent),
    ui(new Ui::CMWCaliLevel)
{
    ui->setupUi(this);
}

CMWCaliLevel::~CMWCaliLevel()
{
    delete ui;
}

void CMWCaliLevel::MInit()
{
    Variant *pParam[5]={0};
    CProcess_Level* pLevel=GET_PROCESS(PROCESS_LEVELING,
                                       SM_MAIN,
                                       CProcess_Level);
    CMProduct* product=GET_CHDIRECT(PRODUCT,CMProduct);
    Q_ASSERT(product);
    //pParam[0]=product->m_Variants.get_Variant(Var_MProduct_EnableAlignment_ID);
    pParam[0]=pLevel->m_Variants.get_Variant(Var_Process_Level_ModelTestCount);
    pParam[1]=pLevel->m_Variants.get_Variant(Var_Process_Level_BeforeSearchSleep);
    pParam[2]=pLevel->m_Variants.get_Variant(Var_Process_Level_AfterSearchSleep);
    //pParam[4]=pLevel->m_Variants.get_Variant(Var_Process_Level_EnableAutoFoucs);

	/*CProcess_Cut* pProcessCut=GET_PROCESS(PROCESS_CUT,SM_MAIN,CProcess_Cut);
	pParam[5]=product->m_Variants.get_Variant(Var_MProduct_EnableAlignment_ID);
	pParam[6]=pLevel->m_Variants.get_Variant(Var_Process_Level_ModelTestCount);*/

    ui->widget->MParamInit_list(pParam,3);

    mchildwidgets[intptr_t(ui->widget)]=ui->widget;
}
