예제 #1
0
CMenuTable::CMenuTable(WContainerWidget * parent, const std::string strTitle)
:WTable(parent)
{
	this->setCellPadding(0);
	this->setCellSpaceing(0);
	bShow = true;

	WTable * pTable = new WTable(this->elementAt(0,0));
	pTable->setCellPadding(0);
	pTable->setCellSpaceing(0);
	new WText(strTitle, (WContainerWidget*)pTable->elementAt(0,0));
	pTable->elementAt(0,0)->setStyleClass("navt2title");

	m_pOpenimg = new WImage("../icons/arrowdown.gif", (WContainerWidget *)pTable->elementAt(0, 1)); 
	m_pOpenimg->setStyleClass("helpimg");
	m_pCloseimg = new WImage("../icons/arrowup.gif", (WContainerWidget *)pTable->elementAt(0, 1));
	m_pCloseimg->setStyleClass("helpimg");
	//m_pOpenimg->decorationStyle().setCursor(WCssDecorationStyle::Pointer);
	//m_pCloseimg->decorationStyle().setCursor(WCssDecorationStyle::Pointer);
	//pTable->elementAt(0,0)->resize(15, 11);
	//m_pCloseimg->resize(15, 11);
	pTable->elementAt(0, 1)->setContentAlignment(AlignRight);
	pTable->setStyleClass("navt2");

	m_pOpenimg->hide();
	WObject::connect(pTable->elementAt(0,0),SIGNAL(clicked()),this,SLOT(ShowOrHideTable()));	
	WObject::connect(m_pOpenimg,SIGNAL(clicked()),this,SLOT(ShowTable()));
	WObject::connect(m_pCloseimg,SIGNAL(clicked()),this,SLOT(HideTable()));	
	

	m_pContentTable = new WTable((WContainerWidget*)this->elementAt(1,0)) ;	
	m_pContentTable->setCellPadding(0);
	m_pContentTable->setCellSpaceing(0);
	m_pContentTable->setStyleClass("navt3");
}
예제 #2
0
CFlexTable::CFlexTable(WContainerWidget * parent, const std::string strTitle)
:WTable(parent)
{
	//Resource
	OBJECT objRes=LoadResource("default", "localhost");  
	if( objRes !=INVALID_VALUE )
	{	
		MAPNODE ResNode=GetResourceNode(objRes);
		if( ResNode != INVALID_VALUE )
		{
			FindNodeValue(ResNode,"IDS_All_Select",m_FormShowText.szTipSelAll);
			FindNodeValue(ResNode,"IDS_None_Select",m_FormShowText.szTipNotSelAll);
			FindNodeValue(ResNode,"IDS_Invert_Select",m_FormShowText.szTipInvSel);
			FindNodeValue(ResNode,"IDS_Delete",m_FormShowText.szTipDel);
		}
		CloseResource(objRes);
	}

	m_pOpenimg = new WImage("../Images/open.gif", (WContainerWidget *)this->elementAt( 0, 0)); 
	m_pCloseimg = new WImage("../Images/close.gif", (WContainerWidget *)this->elementAt( 0, 0));
	m_pOpenimg->decorationStyle().setCursor(WCssDecorationStyle::Pointer);
	m_pCloseimg->decorationStyle().setCursor(WCssDecorationStyle::Pointer);

	m_pOpenimg->hide();
	WObject::connect(m_pOpenimg,SIGNAL(clicked()),this,SLOT(ShowTable()));
	WObject::connect(m_pCloseimg,SIGNAL(clicked()),this,SLOT(HideTable()));	
	new WText(strTitle, (WContainerWidget*)this->elementAt(0,0));

	this->setStyleClass("t2");
	this->elementAt(0,0)->setStyleClass("t2title");

	m_pContentTable = new WTable((WContainerWidget*)this->elementAt(1,0)) ;	
	m_pContentTable->setStyleClass("t3");
}
예제 #3
0
bool CFlexTable::triggerSlot(WObject *sender, const WSlot_ *slot, void **args)
{
    if (slot == slots_ + 0) {
        sender_ = sender;
        ShowTable();
        return true;
    }
    if (slot == slots_ + 1) {
        sender_ = sender;
        HideTable();
        return true;
    }
    return WTable::triggerSlot(sender, slot, args);
}