#include "MainPage.h"
#include "LazerProbeSimPage.h"
#include "SEIModbusPage.h"
#include "ui_MainPage.h"
#include "ZTAlarmGenerator.h"

#include "OutilModbus.h"


CMainPage::CMainPage(QWidget *parent) :
    QWidget(parent),
    ui(new Ui::CMainPage)
{
    ui->setupUi(this);
}

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

int CMainPage::RegisterPagesTabs(CModbusPage *ModbusPage, CLazerProbeSimPage* LazerSimPage, CSEIModbusPage *SEIModbusPage, CZTAlarmGeneratorPage* ZTAlarmGenPage, CHistorianPage *HistorianPage)
{
    ui->mMainPageTabs->clear();
 #ifndef VERSION_FORMATION_SEI
    ui->mMainPageTabs->addTab((QWidget*)ModbusPage,"Modbus CC");
    ui->mMainPageTabs->addTab((QWidget*)SEIModbusPage,"Modbus SEI");
    ui->mMainPageTabs->addTab((QWidget*)LazerSimPage,"Sondes");
    ui->mMainPageTabs->addTab((QWidget*)HistorianPage,"Historien PI");
#endif
    ui->mMainPageTabs->addTab((QWidget*)ZTAlarmGenPage,"Générateur ZT");

    //ModbusPage->show();
    ui->mMainPageTabs->setCurrentIndex(1);

    return 1;
}
