Example #1
0
//////////////////////////////////////////////////////////////////////////////////
// start receive widget element at
CSVMainForm::CSVMainForm(WContainerWidget * parent):
WTable(parent)
{
	//Resource
	OBJECT objRes=LoadResource("default", "localhost");  
	if( objRes !=INVALID_VALUE )
	{	
		MAPNODE ResNode=GetResourceNode(objRes);
		if( ResNode != INVALID_VALUE )
		{
			FindNodeValue(ResNode,"IDS_Report_Edit",strEditReport);
			FindNodeValue(ResNode,"IDS_Report_Add",strAddReport);
		}
		CloseResource(objRes);
	}



	setStyleClass("t6");

    m_pfrSmsSend = NULL;
    m_pfrAddPhone = NULL;

	
	//elementAt(1, 0)->setContentAlignment(AlignCenter);
	elementAt(1, 0)->setVerticalAlignment(AlignTop);
    m_pmainStack = new WStackedWidget(elementAt(1, 0));
    m_pmainStack->setPadding(WLength(0));
    //m_pmainStack->addWidget(m_pfrSmsSet = new CSVTopnReportSet());

	m_pfrSmsSet = new CSVTopnReportSet();
	
	//m_pmainStack->addWidget(m_pfrSmsSet);
	//OutputDebugString("------CSVMainForm0---------\n");
	//m_pmainStack->addWidget(m_pfrSmsSet = new CSVTopnReportSet());
	//OutputDebugString("------CSVMainForm1---------\n");
   
	if (!m_pfrAddPhone)
    {
        m_pmainStack->addWidget(m_pfrAddPhone = new CSVAddTopnReport());
        WObject::connect(m_pfrAddPhone, SIGNAL(BackTo(std::string)), this, SLOT(ShowSetForm(std::string)));
        WObject::connect(m_pfrAddPhone, SIGNAL(SaveTopnReport(SAVE_REPORT_LIST)), 
            this, SLOT(Save_Phone(SAVE_REPORT_LIST)));
        WObject::connect(m_pfrAddPhone, SIGNAL(ExChangeAddEvent()), this, SLOT(ExChangeRefresh()));
    }

	WObject::connect(m_pfrSmsSet, SIGNAL(AddNewPhone()), this, SLOT(ShowAddForm()));  
    WObject::connect(m_pfrSmsSet, SIGNAL(EditPhone(SAVE_REPORT_LIST)), this, 
        SLOT(Edit_Phone(SAVE_REPORT_LIST)));
	WObject::connect(m_pfrSmsSet, SIGNAL(ExChangeEvent()), this, SLOT(ExChangeRefresh()));  


	m_pmainStack->addWidget(m_pfrSmsSet);

    showSmsSet();
}
Example #2
0
void CSVReportSet::AddPhone()
{
	OutputDebugString("\naaa\n");
    emit AddNewPhone();
}