本文整理汇总了C++中WImage::decorationStyle方法的典型用法代码示例。如果您正苦于以下问题:C++ WImage::decorationStyle方法的具体用法?C++ WImage::decorationStyle怎么用?C++ WImage::decorationStyle使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类WImage
的用法示例。
在下文中一共展示了WImage::decorationStyle方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: addPhoneListNew
void CSVReportSet::addPhoneListNew()
{
std::list<string> sectionlist;
std::list<string>::iterator m_sItem;
GetIniFileSections(sectionlist, "reportset.ini");
int numRow = 1;
for(m_sItem = sectionlist.begin(); m_sItem != sectionlist.end(); m_sItem++)
{
m_pReportListTable->InitRow(numRow);
std::string section = *m_sItem;
string ret = "error";
WCheckBox * pCheck = new WCheckBox("", (WContainerWidget*)m_pReportListTable->GeDataTable()->elementAt(numRow, 0));
m_pReportListTable->GeDataTable()->elementAt(numRow, 0)->setContentAlignment(AlignCenter);
// 名称
std::string strlinkname;
std::string hrefstr = RepHrefStr(section);
strlinkname ="<a href=/fcgi-bin/startsreportlist.exe?id="+hrefstr+">"+section+"</a>";
WText *pName = new WText(strlinkname, (WContainerWidget*)m_pReportListTable->GeDataTable()->elementAt(numRow , 2));
m_pReportListTable->GeDataTable()->elementAt(numRow, 2)->setContentAlignment(AlignCenter);
std::string szPeriod = GetIniFileString(section, "Period", ret, "reportset.ini");
if(strcmp(szPeriod.c_str(), "error") == 0)
{
}
WText *pPeriod = new WText(szPeriod, (WContainerWidget*)m_pReportListTable->GeDataTable()->elementAt(numRow, 4));
m_pReportListTable->GeDataTable()->elementAt(numRow, 4)->setContentAlignment(AlignCenter);
WImage *pEdit = new WImage("/Images/edit.gif", (WContainerWidget*)m_pReportListTable->GeDataTable()->elementAt(numRow ,6));
m_pReportListTable->GeDataTable()->elementAt(numRow, 6)->setContentAlignment(AlignCenter);
pEdit->decorationStyle().setCursor(WCssDecorationStyle::Pointer);
connect(pEdit, SIGNAL(clicked()), &m_signalMapper, SLOT(map()));
m_signalMapper.setMapping(pEdit, section);
REPORT_LIST list;
list.pSelect = pCheck;
list.pName = pName;
list.pPeriod = pPeriod;
list.pEdit = pEdit;
m_pListReport.push_back(list);
numRow++;
}
}
示例2: SavePhone
void CSVReportSet::SavePhone(SAVE_REPORT_LIST * report)
{
//nullTable -> clear();
if(strcmp(chgstr.c_str(), "") != 0)
{
Edit_Phone(report);
return;
}
//judge report name/(ini section) is right
std::list<string> sectionlist;
std::list<string>::iterator Item;
GetIniFileSections(sectionlist, "reportset.ini");
bool bRe = false;
for(Item = sectionlist.begin(); Item != sectionlist.end(); Item++)
{
std::string str = *Item;
if(strcmp(str.c_str(), report->szTitle.c_str()) == 0)
{
bRe = true;
break;
}
}
if(bRe)//有重复
{
std::list<string> errorMsgList;
errorMsgList.push_back(m_formText.szConnErr);
m_pReportListTable->ShowErrorMsg(errorMsgList); //show error msg
//m_pConnErr ->setText(m_formText.szConnErr);
//m_pConnErr ->show();
}
else
{
//int numRow = m_ptbPhone->numRows();
int numRow = m_pReportListTable->GeDataTable()->numRows();
m_pReportListTable->InitRow(numRow);
WCheckBox * pCheck = new WCheckBox("", (WContainerWidget*)m_pReportListTable->GeDataTable()->elementAt(numRow, 0));
m_pReportListTable->GeDataTable()->elementAt(numRow, 0)->setContentAlignment(AlignCenter);
std::string strlinkname;
std::string hrefstr = RepHrefStr(report->szTitle);
strlinkname ="<a href=/fcgi-bin/statsreportlist.exe?id="+hrefstr+">"+report->szTitle+"</a>";
WText *pName = new WText(strlinkname, (WContainerWidget*)m_pReportListTable->GeDataTable()->elementAt(numRow , 2));
m_pReportListTable->GeDataTable()->elementAt(numRow, 2)->setContentAlignment(AlignCenter);
WText *pPeriod = new WText(report->szPeriod, (WContainerWidget*)m_pReportListTable->GeDataTable()->elementAt(numRow, 4));
m_pReportListTable->GeDataTable()->elementAt(numRow, 4)->setContentAlignment(AlignCenter);
WImage *pEdit = new WImage("/Images/edit.gif", (WContainerWidget*)m_pReportListTable->GeDataTable()->elementAt(numRow , 6));
m_pReportListTable->GeDataTable()->elementAt(numRow, 6)->setContentAlignment(AlignCenter);
pEdit->decorationStyle().setCursor(WCssDecorationStyle::Pointer);
//m_ptbPhone->adjustRowStyle("tr1","tr2");
m_signalMapper.setMapping(pEdit, report->szTitle);
bool isWriteIni = false;
isWriteIni = WriteIniFileString(report->szTitle, "Title", report->szTitle, "reportset.ini");
if(!isWriteIni)
{
}
isWriteIni = WriteIniFileString(report->szTitle, "Descript", report->szDescript, "reportset.ini");
if(!isWriteIni)
{
}
isWriteIni = WriteIniFileString(report->szTitle, "Plan", report->szPlan, "reportset.ini");
if(!isWriteIni)
{
}
isWriteIni = WriteIniFileString(report->szTitle, "Period", report->szPeriod, "reportset.ini");
if(!isWriteIni)
{
}
isWriteIni = WriteIniFileString(report->szTitle, "StatusResult", report->szStatusresult, "reportset.ini");
if(!isWriteIni)
{
}
isWriteIni = WriteIniFileString(report->szTitle, "ErrorResult", report->szErrorresult, "reportset.ini");
if(!isWriteIni)
{
}
isWriteIni = WriteIniFileString(report->szTitle, "Graphic", report->szGraphic, "reportset.ini");
if(!isWriteIni)
//.........这里部分代码省略.........
示例3: addPhoneList
//add list function
void CSVReportSet::addPhoneList(WTable * table)
{
m_ptbPhone = new WTable((WContainerWidget*)table->elementAt(7,0));
nullTable = new WTable((WContainerWidget*)table->elementAt(8, 0));
m_ptbPhone -> setStyleClass("t3");
nullTable -> setStyleClass("t3");
if (m_ptbPhone)
{
m_ptbPhone -> setCellPadding(0);
m_ptbPhone->setCellSpaceing(0);
new WText("", (WContainerWidget*)m_ptbPhone->elementAt(0,0));
new WText(m_formText.szColName, (WContainerWidget*)m_ptbPhone->elementAt(0, 1));
new WText(m_formText.szColPeriod, (WContainerWidget*)m_ptbPhone->elementAt(0, 2));
new WText(m_formText.szColEdit, (WContainerWidget*)m_ptbPhone->elementAt(0, 3));
m_ptbPhone->elementAt(0, 0)->setStyleClass("t3title");
m_ptbPhone->elementAt(0, 1)->setStyleClass("t3title");
m_ptbPhone->elementAt(0, 2)->setStyleClass("t3title");
m_ptbPhone->elementAt(0, 3)->setStyleClass("t3title");
}
std::list<string> sectionlist;
std::list<string>::iterator m_sItem;
GetIniFileSections(sectionlist, "reportset.ini");
for(m_sItem = sectionlist.begin(); m_sItem != sectionlist.end(); m_sItem++)
{
int numRow = m_ptbPhone->numRows();
std::string section = *m_sItem;
string ret = "error";
WCheckBox * pCheck = new WCheckBox("", (WContainerWidget*)m_ptbPhone->elementAt(numRow, 0));
// 名称
std::string strlinkname;
std::string hrefstr = RepHrefStr(section);
strlinkname ="<a href=/fcgi-bin/startsreportlist.exe?id="+hrefstr+">"+section+"</a>";
WText *pName = new WText(strlinkname, (WContainerWidget*)m_ptbPhone->elementAt(numRow , 1));
std::string szPeriod = GetIniFileString(section, "Period", ret, "reportset.ini");
if(strcmp(szPeriod.c_str(), "error") == 0)
{
}
WText *pPeriod = new WText(szPeriod, (WContainerWidget*)m_ptbPhone->elementAt(numRow, 2));
WImage *pEdit = new WImage("../icons/edit.gif", (WContainerWidget*)m_ptbPhone->elementAt(numRow ,3));
pEdit->decorationStyle().setCursor(WCssDecorationStyle::Pointer);
connect(pEdit, SIGNAL(clicked()), &m_signalMapper, SLOT(map()));
m_signalMapper.setMapping(pEdit, section);
REPORT_LIST list;
list.pSelect = pCheck;
list.pName = pName;
list.pPeriod = pPeriod;
list.pEdit = pEdit;
m_pListReport.push_back(list);
}
m_ptbPhone->adjustRowStyle("tr1","tr2");
//m_pReportListTable->HideNullTip();
}
示例4: UpdatePhoneList
void CSVReportSet::UpdatePhoneList()
{
/*
int nNum =m_ptbPhone->numRows();
for(int i=1;i<nNum;i++)
{
m_ptbPhone->deleteRow(1);
}
*/
PrintDebugString("Into UpdatePhoneList\n");
m_pReportListTable->GeDataTable()->clear();
m_pListReport.clear();
std::list<string> sectionlist;
std::list<string>::iterator m_sItem;
GetIniFileSections(sectionlist, "reportset.ini");
//if(sectionlist.size() == 0)
//{
// WText * nText = new WText("[----------统计报告列表为空-----------]", (WContainerWidget*)m_pReportListTable->GeDataTable() -> elementAt(0, 0));
// nText ->decorationStyle().setForegroundColor(Wt::red);
// //nullTable -> elementAt(0, 0) -> setContentAlignment(AlignTop | AlignCenter);
//}
int numRow = 1;
for(m_sItem = sectionlist.begin(); m_sItem != sectionlist.end(); m_sItem++)
{
std::string section = *m_sItem;
std::list<string> keylist;
std::list<string>::iterator m_pItem;
bool bRet = false;
bRet = GetIniFileKeys(section,keylist, "reportset.ini" );
if(!bRet)
{
}
m_pItem = keylist.begin();
std::string str = *m_pItem;
std::string ret = "error";
REPORT_LIST list;
m_pReportListTable->InitRow(numRow);
// 是否选择
WCheckBox * pCheck = new WCheckBox("", (WContainerWidget*)m_pReportListTable->GeDataTable()->elementAt(numRow, 0));
m_pReportListTable->GeDataTable()->elementAt(numRow, 0)->setContentAlignment(AlignCenter);
// 名称
std::string ReportName = GetIniFileString(section, "Title", ret, "reportset.ini");
std::string strlinkname;
std::string hrefstr = RepHrefStr(ReportName);
strlinkname ="<a href=/fcgi-bin/statsreportlist.exe?id="+hrefstr+">"+ReportName+"</a>";
OutputDebugString("----------------report link name include null----------------\n");
OutputDebugString(strlinkname.c_str());
OutputDebugString("\n");
if(strcmp(ReportName.c_str(), "error") == 0)
{
}
WText *pName = new WText(strlinkname, (WContainerWidget*)m_pReportListTable->GeDataTable()->elementAt(numRow , 2));
m_pReportListTable->GeDataTable()->elementAt(numRow, 2)->setContentAlignment(AlignCenter);
std::string ReportPeriod = GetIniFileString(section, "Period", ret, "reportset.ini");
if(strcmp(ReportPeriod.c_str(), "error") == 0)
{
}
WText *pPeriod = new WText(ReportPeriod, (WContainerWidget*)m_pReportListTable->GeDataTable()->elementAt(numRow, 4));
m_pReportListTable->GeDataTable()->elementAt(numRow, 4)->setContentAlignment(AlignCenter);
WImage *pEdit = new WImage("/Images/edit.gif", (WContainerWidget*)m_pReportListTable->GeDataTable()->elementAt(numRow ,6));
m_pReportListTable->GeDataTable()->elementAt(numRow, 6)->setContentAlignment(AlignCenter);
if(!GetUserRight("m_reportlistEdit"))
pEdit->hide();
else
pEdit->show();
pEdit->decorationStyle().setCursor(WCssDecorationStyle::Pointer);
connect(pEdit, SIGNAL(clicked()),"showbar();", &m_signalMapper, SLOT(map()),
WObject::ConnectionType::JAVASCRIPTDYNAMIC);
m_signalMapper.setMapping(pEdit, section);
list.pSelect = pCheck;
list.pName = pName;
list.pPeriod = pPeriod;
list.pEdit = pEdit;
m_pListReport.push_back(list);
numRow++;
//.........这里部分代码省略.........