本文整理汇总了C++中WTable::numRows方法的典型用法代码示例。如果您正苦于以下问题:C++ WTable::numRows方法的具体用法?C++ WTable::numRows怎么用?C++ WTable::numRows使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类WTable
的用法示例。
在下文中一共展示了WTable::numRows方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: createContent
void CSVSortList::createContent()
{
int nRow = numRows();
WTable * pTable = new WTable(elementAt(nRow,0));
if(pTable)
{
pTable->setCellPadding(0);
pTable->setCellSpaceing(0);
WScrollArea * pScrollArea = new WScrollArea(elementAt(nRow,0));
if(pScrollArea)
{
pScrollArea->setStyleClass("t5");
pScrollArea->setWidget(pTable);
}
pTable->setStyleClass("t5");
elementAt(nRow, 0)->setStyleClass("t7");
nRow = pTable->numRows();
m_pContent = new WTable(pTable->elementAt(nRow,0));
pTable->elementAt(nRow,0)->setContentAlignment(AlignTop);
}
if(m_pContent)
{
m_pContent->setStyleClass("t3");
nRow = m_pContent->numRows();
new WText(SVResString::getResString("IDS_Name"), m_pContent->elementAt(nRow, 0));
new WText(SVResString::getResString("IDS_Sort"), m_pContent->elementAt(nRow, 1));
m_pContent->GetRow(0)->setStyleClass("t3title");
}
}
示例2: createSEList
void SVSEView::createSEList()
{
int nRow = numRows();
SVShowTable * pTable = new SVShowTable((WContainerWidget*)elementAt(nRow, 0));
if(pTable)
{
pTable->setTitle(SVResString::getResString("IDS_SE_List_Title").c_str());
WTable * pSub = pTable->createSubTable();
if(pSub)
{
int nRow = pSub->numRows();
m_pSEList = new WTable((WContainerWidget*)pSub->elementAt(nRow, 0));
if(m_pSEList)
{
m_pSEList->setStyleClass("t3");
//new WText("", (WContainerWidget *)m_pSEList->elementAt(0, 0));
new WText(SVResString::getResString("IDS_State_Description"), (WContainerWidget *)m_pSEList->elementAt(0, 0));
new WText(SVResString::getResString("IDS_Name"), (WContainerWidget *)m_pSEList->elementAt(0, 1));
new WText(SVResString::getResString("IDS_Edit"), (WContainerWidget *)m_pSEList->elementAt(0, 2));
m_pSEList->setCellPadding(0);
m_pSEList->setCellSpaceing(0);
m_pSEList->GetRow(0)->setStyleClass("t3title");
connect(&m_wNameMapper, SIGNAL(mapped(const std::string)), this, SLOT(enterSVSE(const std::string)));
connect(&m_wEditMapper, SIGNAL(mapped(const std::string)), this, SLOT(EditSE(const std::string)));
}
//createOperate(pSub);
}
}
}
示例3: createTitle
void SVSEView::createTitle()
{
int nRow = numRows();
WTable *pSub = new WTable(elementAt(nRow, 0));
elementAt(nRow, 0)->setStyleClass("t1title");
if(pSub)
{
pSub->setStyleClass("t3");
nRow = pSub->numRows();
WText *pTitle = new WText(SVResString::getResString("IDS_SE_List_Title"), (WContainerWidget*)pSub->elementAt(nRow, 0));
if(pTitle)
pTitle->setStyleClass("tgrouptitle2");
pSub->elementAt(nRow, 0)->setStyleClass("cell_80");
m_pTime = new WText("local time", pSub->elementAt(nRow, 1));
pSub->elementAt(nRow, 1)->setContentAlignment(AlignRight | AlignCenter);
svutil::TTime ttime = svutil::TTime::GetCurrentTimeEx();
string curTime = ttime.Format();
if(m_pTime)
{
m_pTime->setStyleClass("tgrouptitle2");
m_pTime->setText(SVResString::getResString("IDS_Refresh_Time") + curTime);
}
}
}
示例4: WText
//添加栏目内容-->标题、输入控件、帮助、错误信息 (多项怎么办?输入控件怎么定位?帮助、错误信息必须放到统一的数组中?)--->由此函数解决
WContainerWidget * WSVFlexTable::AppendRowsContent(int nRow, string strLabel, string strDes, string strError, bool noBlank)
{
//取出指定栏目的Table
WTable * pRowTable = NULL;
WContainerWidget * pParentCell = NULL;
//
if(nRow > m_pListRowTable.size())
{
for (unsigned i = nRow; i > m_pListRowTable.size() ; --i)
{
AppendRows("");
//此情况应该无效或不会出现, 暂时先这样处理
}
}
else
{
//
}
pRowTable = m_pListRowTable[nRow];
int iLast = pRowTable->numRows();
//标题 WText
iLast++;
if (noBlank)
{
strLabel += "<font color=red>*</font>";
}
new WText(strLabel, pRowTable->elementAt(iLast, 0));
strcpy(pRowTable->elementAt(iLast, 0)->contextmenu_,"nowrap");
pRowTable->elementAt(iLast, 0)->setStyleClass("width120");
//输入控件
pParentCell = pRowTable->elementAt(iLast, 1);
strcpy(pRowTable->elementAt(iLast, 1)->contextmenu_,"nowrap");
//pRowTable->elementAt(iLast, 1)->setStyleClass("table_gruop_item");
//帮助 WText
if(strDes != "")
{
iLast++;
m_pListHelpText.push_back(new WText(strDes, pRowTable->elementAt(iLast, 1)));
//strcpy(pRowTable->elementAt(iLast, 1)->contextmenu_,"nowrap");
pRowTable->elementAt(iLast, 1)->setStyleClass("table_data_input_des");
}
//错误信息 WText
if(strError != "")
{
iLast++;
m_pListErrorText.push_back(new WText(strError, pRowTable->elementAt(iLast, 1)));
strcpy(pRowTable->elementAt(iLast, 1)->contextmenu_,"nowrap");
pRowTable->elementAt(iLast, 1)->setStyleClass("table_data_input_error");
}
return pParentCell;
}
示例5: enumSVSE
void CSVWholeview::enumSVSE()
{
if(!m_pContent)
return;
PAIRLIST selist;
string szRootname("");
int nRow = 0;
WTable *pTable = m_pContent;
if(GetIniFileInt("solover","solover",1,"general.ini") == 1)
{
sv_pair svpair;
svpair.name = "1";
OBJECT objSE = GetSVSE("1");//, m_szIDCUser, m_szIDCPwd);
if(objSE != INVALID_VALUE)
{
svpair.value = GetSVSELabel(objSE);
CloseSVSE(objSE);
}
selist.push_back(svpair);
}
else
{
GetAllSVSEInfo(selist);
szRootname = GetIniFileString("segroup","name","","general.ini");
if(szRootname.empty())
szRootname = "SiteView ECC 7.0";
nRow = m_pContent->numRows();
//WImage *pShow = new WImage("../Images/foldopen.gif", m_pContent->elementAt(nRow, 0));
//WImage *pHide = new WImage("../Images/foldclose.gif", m_pContent->elementAt(nRow, 0));
WImage *pShow = new WImage("/Images/cb1-unwrap.gif", m_pContent->elementAt(nRow, 0));
WImage *pHide = new WImage("/Images/cb1-fold.gif", m_pContent->elementAt(nRow, 0));
new WText(" ",m_pContent->elementAt(nRow, 0));
//new WImage("../Images/home.gif", m_pContent->elementAt(nRow, 1));
new WImage("/Images/cbb-2main.gif", m_pContent->elementAt(nRow, 1));
new WText(" ",m_pContent->elementAt(nRow, 1));
WText *pName = new WText(szRootname, m_pContent->elementAt(nRow, 2));
if(pName)
{
sprintf(pName->contextmenu_, "style='color:#669;cursor:pointer;' onmouseover='" \
"this.style.textDecoration=\"underline\"' " \
"onmouseout='this.style.textDecoration=\"none\"'");
}
pTable = new WTable(m_pContent->elementAt(nRow + 1, 2));
pTable->setStyleClass("widthauto");
if(!pTable)
return;
else
{
if(pShow && pHide)
{
string szShow = "", szHide = "", szSubTable = "";
szShow = pHide->formName();
szHide = pShow->formName();
szSubTable = pTable->formName();
string szShowText = "onclick='showsubtable(\"" + szShow + "\", \"" + szHide + "\", \"" + szSubTable + "\")' " + "style='display:none;cursor:pointer'";
string szHideText = "onclick='hidesubtable(\"" + szShow + "\", \"" + szHide + "\", \"" + szSubTable + "\")' " + "style='cursor:pointer'";
sprintf(pShow->contextmenu_, szShowText.c_str());
sprintf(pHide->contextmenu_, szHideText.c_str());
}
}
}
PAIRLIST::iterator iSe;
bool bHasRight = true;
int nChildCount = 0, nIndex = 0;
OBJECT objSE = INVALID_VALUE;
OBJECT objGroup = INVALID_VALUE;
MAPNODE node = INVALID_VALUE;
string szSEID(""), szSubGroupID(""), szEntityID("");
string szName(""), szIndex("");
string szContext(""), szShow(""), szHide(""), szSubTable("");
string szShowText(""), szHideText("");
list<string> lsGroupID;
list<string> lsDeviceID;
list<string>::iterator lstItem;
for(iSe= selist.begin(); iSe!=selist.end(); iSe++)
{
szSEID = (*iSe).name;
bHasRight = true;
if(m_pSVUser)
bHasRight = m_pSVUser->haveGroupRight(szSEID, Tree_SE);
if(bHasRight)
{
nRow = pTable->numRows();
//WImage *pShow = new WImage("../Images/foldopen.gif", pTable->elementAt(nRow, 0));
//WImage *pHide = new WImage("../Images/foldclose.gif", pTable->elementAt(nRow, 0));
WImage *pShow = new WImage("/Images/cb1-unwrap.gif", pTable->elementAt(nRow, 0));
//.........这里部分代码省略.........