#include "cmwcalilaserpathall.h"
#include "ui_cmwcalilaserpathall.h"
#include "cmwcalilaserpath.h"
#include "logic_compdef.h"
#include "cmwcalibeampos.h"
CMWCaliLaserPathAll::CMWCaliLaserPathAll(QWidget *parent) :
    CMWidget(parent),
    ui(new Ui::CMWCaliLaserPathAll)
{
    ui->setupUi(this);
}

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

void CMWCaliLaserPathAll::MInit()
{
    CMWidget* pWidget = nullptr;
#ifdef __USE_D_NARROW__
    pWidget = new CMWCaliLaserPath(ui->tabWidget,LASERPATH_D_NARROW);
    ui->tabWidget->addTab(pWidget,
                          m_gSystem.m_mapNameList[LASERPATH_D_NARROW]);
    mchildwidgets[intptr_t(pWidget)]=pWidget;
#endif

#ifdef __USE_S_NARROW__
	pWidget = new CMWCaliLaserPath(ui->tabWidget, LASERPATH_S_NARROW);
	ui->tabWidget->addTab(pWidget,
		m_gSystem.m_mapNameList[LASERPATH_S_NARROW]);
	mchildwidgets[intptr_t(pWidget)] = pWidget;
#endif

#ifdef __USE_L_NARROW__
    pWidget = new CMWCaliLaserPath(ui->tabWidget, LASERPATH_L_NARROW);
    ui->tabWidget->addTab(pWidget,
                          m_gSystem.m_mapNameList[LASERPATH_L_NARROW]);
    mchildwidgets[intptr_t(pWidget)] = pWidget;
#endif


#ifdef __USE_D_WIDE__
    pWidget=new CMWCaliLaserPath(ui->tabWidget, LASERPATH_D_WIDE);
    ui->tabWidget->addTab(pWidget,
                          m_gSystem.m_mapNameList[LASERPATH_D_WIDE]);
    mchildwidgets[intptr_t(pWidget)]=pWidget;
#endif


#ifdef __USE_DWIDE_BEAM_WIDTH__
    //挡板位置
    pWidget=new CMWCaliBeamPos(ui->tabWidget);
    ui->tabWidget->addTab(pWidget,
              QObject::trUtf8("Beam Pos"));
    mchildwidgets[intptr_t(pWidget)]=pWidget;
#endif

    CMWidget::MInit();
}
