Exemplo n.º 1
0
bool SVDepend::triggerSlot(WObject *sender, const WSlot_ *slot, void **args)
{
  if (slot == slots_ + 0) {
    sender_ = sender;    closeWnd();
    return true;
  }
  if (slot == slots_ + 1) {
    sender_ = sender;    cancel();
    return true;
  }
  if (slot == slots_ + 2) {
    sender_ = sender;    Translate();
    return true;
  }
  if (slot == slots_ + 3) {
    sender_ = sender;    ExChange();
    return true;
  }
  return WContainerWidget::triggerSlot(sender, slot, args);
}
Exemplo n.º 2
0
//Jansion.zhou
void SVDeviceTest::NewCreateContain()
{
	m_pContentTable = new WSPopTable(this);
    if(m_pContentTable)
    {
		m_pContentTable->AppendRows(m_szResult);
		m_pWait = new WText("", (WContainerWidget *)m_pContentTable->GeRowContentTable(0)->elementAt(0, 0));

		string strTmp = "<div id='";
		strTmp += "listpan1";
		strTmp += "' class='panel_item'>";
		new WText(strTmp, (WContainerWidget *)m_pContentTable->GeRowContentTable(0)->elementAt(1, 0));

		m_pSubContent = new WTable(m_pContentTable->GeRowContentTable(0)->elementAt(1, 0));
		if (!m_pSubContent)
		{
			return;
		}

		new WText("</div>", (WContainerWidget *)m_pContentTable->GeRowContentTable(0)->elementAt(1, 0));
		
		//设置高度
		strListHeights += "200";
		strListHeights += ",";
		strListPans += "listpan1";
		strListPans += ",";
		strListTitles +=  m_pSubContent->formName();
		strListTitles += ",";
		
		m_pFinish = new WText("", (WContainerWidget *)m_pContentTable->GeRowContentTable(0)->elementAt(2, 0));

		m_pContentTable->GeRowActionTable(0)->setStyleClass("widthauto");

		m_pClose = new WSPopButton(m_pContentTable->GeRowActionTable(0)->elementAt(0, 0), m_szClose, "button_bg_m.png", m_szClose, false);
		if(m_pClose)
		{
			m_pClose->setToolTip(m_szCloseTip);
			WObject::connect(m_pClose, SIGNAL(clicked()), this, SLOT(closeWnd()));
		}
		m_pContentTable->GeRowActionTable(0)->elementAt(0, 0)->setContentAlignment(AlignCenter);
    }

	//int RowList = m_pContentTable->GeRowActionTable(0)->numRows();
	m_pHideButton = new WPushButton("hide button", m_pContentTable->GeRowActionTable(0)->elementAt(0, 1));
    if(m_pHideButton)
    {
		OutputDebugString("--------------- is   --------------\n");
        WObject::connect(m_pHideButton, SIGNAL(clicked()), this, SLOT(showresult()));
        m_pHideButton->hide();
    }


	pTranslateBtn = new WPushButton(strTranslate, m_pContentTable->GeRowActionTable(0)->elementAt(0, 2));
	connect(pTranslateBtn, SIGNAL(clicked()), this, SLOT(Translate()));	
    //pTranslateBtn->setToolTip(strTranslateTip);
	pTranslateBtn->hide();

	pExChangeBtn = new WPushButton(strRefresh, m_pContentTable->GeRowActionTable(0)->elementAt(0, 3));
	connect(pExChangeBtn, SIGNAL(clicked()), this, SLOT(ExChange()));	
	//pExChangeBtn->setToolTip(strRefreshTip);
	pExChangeBtn->hide();
}