本文整理汇总了C++中WTable类的典型用法代码示例。如果您正苦于以下问题:C++ WTable类的具体用法?C++ WTable怎么用?C++ WTable使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了WTable类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: szRootname
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));
//.........这里部分代码省略.........
开发者ID:,项目名称:,代码行数:101,代码来源:
示例2: clear
void MediaInfoPanel::info( Media &media )
{
clear();
WContainerWidget *header = WW<WContainerWidget>().setContentAlignment( AlignCenter );
Dbo::Transaction t( *d->session );
WString title = media.title( t );
header->addWidget( WW<WText>( title ).css( "media-title" ) );
Dbo::ptr<MediaAttachment> previewAttachment = media.preview( t, Media::PreviewPlayer );
if( previewAttachment )
{
WLink previewLink = previewAttachment->link( previewAttachment, t, header );
WLink fullImage = previewLink;
Dbo::ptr<MediaAttachment> fullImageAttachment = media.preview( t, Media::PreviewFull );
if( fullImageAttachment )
fullImage = fullImageAttachment->link( fullImageAttachment, t, header );
WAnchor *fullImageLink = new WAnchor {fullImage, WW<WImage>(previewLink, title).css("img-responsive img-rounded")};
fullImageLink->setTarget( Wt::AnchorTarget::TargetNewWindow );
header->addWidget( fullImageLink );
}
else
{
auto iconType = ( media.mimetype().find( "video" ) == string::npos ) ? Settings::AudioFile : Settings::VideoFile;
WImage *icon = new WImage { d->settings->icon( iconType ) };
header->addWidget( icon );
}
auto mediaMediaInfoPanel = d->createPanel( "mediabrowser.information" );
WTable *table = new WTable( mediaMediaInfoPanel.second );
table->setWidth( WLength( 100, WLength::Percentage ) );
d->labelValueBox( "mediabrowser.filename", WString::fromUTF8(media.filename()), table );
d->labelValueBox( "mediabrowser.filesize", Utils::formatFileSize( fs::file_size( media.path() ) ), table );
MediaPropertiesPtr mediaProperties = media.properties( t );
if( mediaProperties )
{
d->labelValueBox( "mediabrowser.creation_time", mediaProperties->creationTime().toString(), table );
d->labelValueBox( "mediabrowser.medialength", WTime( 0, 0, 0 ).addSecs( mediaProperties->duration() ).toString(), table );
if( media.mimetype().find( "video" ) != string::npos && mediaProperties->width() > 0 && mediaProperties->height() > 0 )
d->labelValueBox( "mediabrowser.resolution", WString( "{1}x{2}" ).arg( mediaProperties->width() ).arg( mediaProperties->height() ), table );
}
Ratings rating = MediaRating::ratingFor( media, t );
if( rating.users > 0 )
{
WContainerWidget *avgRatingWidget = new WContainerWidget;
for( int i = 1; i <= 5; i++ )
{
avgRatingWidget->addWidget( WW<WImage>( Settings::staticPath( "/icons/rating_small.png" ) ).css( rating.ratingAverage < i ? "rating-unrated" : "" ) );
}
d->labelValueBox( "mediabrowser.rating", avgRatingWidget, table );
}
auto actions = d->createPanel( "mediabrowser.actions" );
actions.second->addWidget( WW<WPushButton>( wtr( "mediabrowser.play" ) ).css( "btn btn-block btn-sm btn-primary" ).onClick( [ = ]( WMouseEvent )
{
d->play.emit( media );
} ) );
actions.second->addWidget( WW<WPushButton>( wtr( "mediabrowser.queue" ) ).css( "btn btn-block btn-sm" ).onClick( [ = ]( WMouseEvent )
{
d->queue.emit( media );
} ) );
actions.second->addWidget( WW<WPushButton>( wtr( "mediabrowser.share" ) ).css( "btn btn-block btn-sm" ).onClick( [ = ]( WMouseEvent )
{
Wt::Dbo::Transaction t( *d->session );
WW<WMessageBox>(wtr( "mediabrowser.share" ),
wtr( "mediabrowser.share.dialog" )
.arg( media.title( t ) )
.arg( d->settings->shareLink( media.uid() ).url() ),
Wt::Information, Ok)
.button(Ok, [=](WMessageBox *msgBox){ msgBox->accept(); }).get()->show();
} ) );
addWidget( WW<WPushButton>( wtr( "button.close.info" ) ).css( "btn btn-primary btn-block hidden-lg hidden-md" )
.onClick( [ = ]( WMouseEvent )
{
wasResetted().emit();
} ) );
actions.second->addWidget( WW<WPushButton>( wtr( "player.downloadlink" ) ).css( "btn btn-block btn-sm btn-success" ).onClick( [ = ]( WMouseEvent )
{
WDialog *downloadDialog = new WDialog(wtr("player.downloadlink"));
downloadDialog->contents()->addWidget(new WText{wtr("player.downloadlink.message").arg(d->settings->linkFor( media.path() , d->session).url()), XHTMLUnsafeText});
downloadDialog->footer()->addWidget(WW<WPushButton>(wtr("button.ok")).css("btn btn-primary").onClick([=](WMouseEvent){ downloadDialog->accept(); }));
downloadDialog->show();
} ) );
addWidget( WW<WPushButton>( wtr( "button.close.info" ) ).css( "btn btn-primary btn-block hidden-lg hidden-md" )
.onClick( [ = ]( WMouseEvent )
{
wasResetted().emit();
} ) );
addWidget( header );
addWidget( mediaMediaInfoPanel.first );
addWidget( actions.first );
//.........这里部分代码省略.........
开发者ID:geolffrey,项目名称:Pandorica,代码行数:101,代码来源:mediainfopanel.cpp
示例3: WTable
void SysMon::Impl::RefreshResourceUsage()
{
sg_cpu_percents *cpuPercents;
sg_mem_stats *memStats;
sg_swap_stats *swapStats;
sg_host_info *hostInfo;
sg_disk_io_stats *diskIoStats;
sg_network_io_stats *networkIoStats;
std::size_t cpuPercentsEntries = 0;
std::size_t memStatsEntries = 0;
std::size_t swapStatsEntries = 0;
std::size_t hostInfoEntries = 0;
std::size_t diskIoStatsEntries = 0;
std::size_t networkIoStatsEntries = 0;
/// Get the host info
if ((hostInfo = sg_get_host_info(&hostInfoEntries)) != NULL) {
HostInfoDiv->clear();
WTable *hostTable = new WTable(HostInfoDiv);
hostTable->setStyleClass("table table-hover");
hostTable->setHeaderCount(1, Orientation::Horizontal);
hostTable->elementAt(0, 0)->addWidget(new WText(tr("system-monitor-host-info-os-name")));
hostTable->elementAt(0, 1)->addWidget(new WText(tr("system-monitor-host-info-os-release")));
hostTable->elementAt(0, 2)->addWidget(new WText(tr("system-monitor-host-info-os-version")));
hostTable->elementAt(0, 3)->addWidget(new WText(tr("system-monitor-host-info-platform")));
hostTable->elementAt(0, 4)->addWidget(new WText(tr("system-monitor-host-info-hostname")));
hostTable->elementAt(0, 5)->addWidget(new WText(tr("system-monitor-host-info-bitwidth")));
hostTable->elementAt(0, 6)->addWidget(new WText(tr("system-monitor-host-info-host-state")));
hostTable->elementAt(0, 7)->addWidget(new WText(tr("system-monitor-host-info-ncpus")));
hostTable->elementAt(0, 8)->addWidget(new WText(tr("system-monitor-host-info-maxcpus")));
hostTable->elementAt(0, 9)->addWidget(new WText(tr("system-monitor-host-info-uptime")));
hostTable->elementAt(0, 10)->addWidget(new WText(tr("system-monitor-host-info-systime")));
hostTable->elementAt(1, 0)->addWidget(new WText(WString(hostInfo->os_name)));
hostTable->elementAt(1, 1)->addWidget(new WText(WString(hostInfo->os_release)));
hostTable->elementAt(1, 2)->addWidget(new WText(WString(hostInfo->os_version)));
hostTable->elementAt(1, 3)->addWidget(new WText(WString(hostInfo->platform)));
hostTable->elementAt(1, 4)->addWidget(new WText(WString(hostInfo->hostname)));
hostTable->elementAt(1, 5)->addWidget(new WText(lexical_cast<string>(hostInfo->bitwidth)));
hostTable->elementAt(1, 6)->addWidget(new WText(lexical_cast<string>(HostState[hostInfo->host_state])));
hostTable->elementAt(1, 7)->addWidget(new WText(lexical_cast<string>(hostInfo->ncpus)));
hostTable->elementAt(1, 8)->addWidget(new WText(lexical_cast<string>(hostInfo->maxcpus)));
hostTable->elementAt(1, 9)->addWidget(new WText(lexical_cast<string>(hostInfo->uptime)));
hostTable->elementAt(1, 10)->addWidget(new WText(lexical_cast<string>(hostInfo->systime)));
}
/// Shift and fill the CPU usage cache and model
if ((cpuPercents = sg_get_cpu_percents(&cpuPercentsEntries)) != NULL) {
CpuInstant cpuInstant;
cpuInstant[Cpu::User] = cpuPercents->user;
cpuInstant[Cpu::Kernel] = cpuPercents->kernel;
cpuInstant[Cpu::Idle] = cpuPercents->idle;
cpuInstant[Cpu::IoWait] = cpuPercents->iowait;
cpuInstant[Cpu::Swap] = cpuPercents->swap;
cpuInstant[Cpu::Nice] = cpuPercents->nice;
CpuUsageCache.push_back(cpuInstant);
CpuUsageCache.pop_front();
int i = 0;
for (std::list<CpuInstant>::const_iterator it =
CpuUsageCache.begin(); it != CpuUsageCache.end(); ++it) {
cpuInstant = *it;
CpuUsageModel->setData(i, 0, cpuInstant[Cpu::User]);
CpuUsageModel->setData(i, 1, cpuInstant[Cpu::Kernel]);
CpuUsageModel->setData(i, 2, cpuInstant[Cpu::Idle]);
CpuUsageModel->setData(i, 3, cpuInstant[Cpu::IoWait]);
CpuUsageModel->setData(i, 4, cpuInstant[Cpu::Swap]);
CpuUsageModel->setData(i, 5, cpuInstant[Cpu::Nice]);
CpuUsageModel->setData(i, 6, i);
++i;
}
}
/// Shift and fill the memory usage cache and model
if(((memStats = sg_get_mem_stats(&memStatsEntries)) != NULL)) {
MemoryInstant memoryInstant;
memoryInstant[Memory::Total] = 100.0;
memoryInstant[Memory::Free] = 100.0 * memStats->free / memStats->total;
memoryInstant[Memory::Used] = 100.0 * memStats->used / memStats->total;
memoryInstant[Memory::Cache] = 100.0 * memStats->cache / memStats->total;
MemoryUsageCache.push_back(memoryInstant);
MemoryUsageCache.pop_front();
MemoryUsageModel->setHeaderData(
0, WString::fromUTF8("{1} {2}")
.arg(Utility::CalculateSize(memStats->total))
.arg(tr("system-monitor-memory-stats-total")));
MemoryUsageModel->setHeaderData(
1, WString::fromUTF8("{1} ({2}%) {3}")
.arg(Utility::CalculateSize(memStats->free))
.arg((wformat(L"%.1f") % memoryInstant[Memory::Free]).str())
.arg(tr("system-monitor-memory-stats-free"))
);
//.........这里部分代码省略.........
开发者ID:moslemezzati,项目名称:tse-rtsq,代码行数:101,代码来源:SysMon.cpp
示例4: WText
void CSVReportSet::initForm()
{
new WText("<SCRIPT language='JavaScript' src='/Calendar.js'></SCRIPT>",this);
new WText("<SCRIPT language='JavaScript' src='/basic.js'></SCRIPT>", this);
new WText("<div id='view_panel' class='panel_view'>",this);
m_pMainTable = new WSVMainTable(this,m_formText.szMainTitle,false);
m_pReportListTable = new WSVFlexTable(m_pMainTable->GetContentTable()->elementAt(0,0), List, m_formText.szTBTitle);
if (m_pReportListTable->GetContentTable() != NULL)
{
m_pReportListTable->AppendColumn("",WLength(5,WLength::Percentage));
m_pReportListTable->SetDataRowStyle("table_data_grid_item_img");
m_pReportListTable->AppendColumn(m_formText.szColName,WLength(55,WLength::Percentage));
m_pReportListTable->SetDataRowStyle("table_data_grid_item_text");
m_pReportListTable->AppendColumn(m_formText.szColPeriod,WLength(20,WLength::Percentage));
m_pReportListTable->SetDataRowStyle("table_data_grid_item_img");
m_pReportListTable->AppendColumn(m_formText.szColEdit,WLength(20,WLength::Percentage));
m_pReportListTable->SetDataRowStyle("table_data_grid_item_text");
}
addPhoneListNew();
connect(&m_signalMapper, SIGNAL(mapped(const std::string)), this, SLOT(EditRow(const std::string)));
if (m_pReportListTable->GetActionTable() != NULL)
{
m_pReportListTable->SetNullTipInfo(szListEmpty);
if(m_pListReport.size() <= 0)
{
m_pReportListTable->ShowNullTip();
}
else
{
m_pReportListTable->HideNullTip();
}
m_pReportListTable->AddStandardSelLink(m_formText.szTipSelAll1 ,m_formText.szTipSelNone,m_formText.szTipSelInv);
connect(m_pReportListTable->pSelAll, SIGNAL(clicked()), this, SLOT(SelAll()));
connect(m_pReportListTable->pSelNone, SIGNAL(clicked()), this, SLOT(SelNone()));
connect(m_pReportListTable->pSelReverse, SIGNAL(clicked()), this, SLOT(SelInvert()));
WTable *pTbl;
m_pReportListTable->GetActionTable()->elementAt(0,1)->setContentAlignment(AlignCenter);
m_pReportListTable->GetActionTable()->elementAt(0,1)->setStyleClass("textbold");
pTbl = new WTable(m_pReportListTable->GetActionTable()->elementAt(0,1));
pTbl->setStyleClass("widthauto");
m_pDel = new WSVButton(pTbl->elementAt(0,1),m_formText.szTipDel, "button_bg_del.png", "", false);
if(!GetUserRight("m_reportlistDel"))
m_pDel->hide();
else
m_pDel->show();
if (m_pDel)
{
m_pDel->setToolTip(m_formText.szTipDel);
connect(m_pDel , SIGNAL(clicked()),this, SLOT(BeforeDelPhone()));
}
m_pReportListTable->GetActionTable()->elementAt(0,2)->setContentAlignment(AlignRight);
m_pAdd = new WSVButton(m_pReportListTable->GetActionTable()->elementAt(0,2),m_formText.szAddPhoneBut, "button_bg_add_black.png", m_formText.szTipAddNew, true);
if(!GetUserRight("m_reportlistAdd"))
m_pAdd->hide();
else
m_pAdd->show();
if (m_pAdd)
{
m_pAdd->setToolTip(m_formText.szTipAddNew);
WObject::connect(m_pAdd, SIGNAL(clicked()),"showbar();", this, SLOT(AddPhone())
, WObject::ConnectionType::JAVASCRIPTDYNAMIC);
}
//隐藏按钮
pHideBut = new WPushButton("hide button",this);
if(pHideBut)
{
pHideBut->setToolTip("Hide Button");
connect(pHideBut,SIGNAL(clicked()),this,SLOT(DelPhone()));
pHideBut->hide();
}
}
//.........这里部分代码省略.........
开发者ID:,项目名称:,代码行数:101,代码来源:
示例5: clear
void HighScoresWidget::update()
{
clear();
new WText("<h2>Hall of fame</h2>", this);
int ranking = session_->findRanking();
std::string yourScore;
if (ranking == 1)
yourScore = "Congratulations! You are currently leading the pack.";
else {
yourScore = "You are currently ranked number "
+ boost::lexical_cast<std::string>(ranking)
+ ". Almost there !";
}
WText *score = new WText("<p>" + yourScore + "</p>", this);
score->addStyleClass("score");
std::vector<User> top = session_->topUsers(20);
WTable *table = new WTable(this);
new WText("Rank", table->elementAt(0, 0));
new WText("User", table->elementAt(0, 1));
new WText("Games", table->elementAt(0, 2));
new WText("Score", table->elementAt(0, 3));
new WText("Last game", table->elementAt(0, 4));
table->setHeaderCount(1);
int formerScore = -1;
int rank = 0;
for (unsigned i = 0; i < top.size(); i++) {
User u = top[i];
if (u.score != formerScore) {
formerScore = u.score;
++rank;
}
int row = table->rowCount();
new WText(boost::lexical_cast<std::string>(rank),
table->elementAt(row, 0));
new WText(u.name, table->elementAt(row, 1));
new WText(boost::lexical_cast<std::string>(u.gamesPlayed),
table->elementAt(row, 2));
new WText(boost::lexical_cast<std::string>(u.score),
table->elementAt(row, 3));
if (!u.lastGame.isNull())
new WText(u.lastGame.timeTo(WDateTime::currentDateTime())
+ " ago", table->elementAt(row, 4));
else
new WText("---", table->elementAt(row, 4));
if (session_->login().loggedIn() && session_->userName() == u.name)
table->rowAt(row)->setId("self");
}
WText *fineprint = new WText(tr("highscore.info"), this);
fineprint->addStyleClass("fineprint");
}
开发者ID:913862627,项目名称:wt,代码行数:62,代码来源:HighScoresWidget.C
示例6: WTable
void TrendReportFrame::initQueryTable(WSVFlexTable **pFlexTable_Add ,int nRow,std::string strTitle, WSVMainTable * pUserTable)
{
*pFlexTable_Add = new WSVFlexTable((WContainerWidget *)pUserTable->GetContentTable()->elementAt(nRow,0), Blank, strTitle);
WSVFlexTable *pFlexTable = *pFlexTable_Add;
if(pFlexTable->GetContentTable() != NULL)
{
//标题链接
WTable *QueryTitleTable1 = new WTable(pFlexTable->GetContentTable()->elementAt(0,0));
QueryTitleTable1->elementAt(0, 1)->resize(WLength(8,WLength::Percentage),0);
WText * p2HourText = new WText("2h", QueryTitleTable1->elementAt(0, 1));
p2HourText->setStyleClass("linktext");
connect(p2HourText, SIGNAL(clicked()), "showbar();" ,this, SLOT(Query2HourText()) , WObject::ConnectionType::JAVASCRIPTDYNAMIC);
QueryTitleTable1->elementAt(0, 2)->resize(WLength(8,WLength::Percentage),0);
WText * p4HourText = new WText("4h", QueryTitleTable1->elementAt(0, 2));
p4HourText->setStyleClass("linktext");
connect(p4HourText, SIGNAL(clicked()), "showbar();" ,this, SLOT(Query4HourText()) , WObject::ConnectionType::JAVASCRIPTDYNAMIC);
QueryTitleTable1->elementAt(0, 3)->resize(WLength(8,WLength::Percentage),0);
WText * p8HourText = new WText("8h", QueryTitleTable1->elementAt(0, 3));
p8HourText->setStyleClass("linktext");
connect(p8HourText, SIGNAL(clicked()), "showbar();" ,this, SLOT(Query8HourText()) , WObject::ConnectionType::JAVASCRIPTDYNAMIC);
QueryTitleTable1->elementAt(0, 4)->resize(WLength(8,WLength::Percentage),0);
WText * p1DayText = new WText("1d", QueryTitleTable1->elementAt(0, 4));
p1DayText->setStyleClass("linktext");
connect(p1DayText, SIGNAL(clicked()), "showbar();" ,this, SLOT(Query1DayText()) , WObject::ConnectionType::JAVASCRIPTDYNAMIC);
QueryTitleTable1->elementAt(0, 5)->resize(WLength(8,WLength::Percentage),0);
WText * p3DayText = new WText("3d", QueryTitleTable1->elementAt(0, 5));
p3DayText->setStyleClass("linktext");
connect(p3DayText, SIGNAL(clicked()), "showbar();" ,this, SLOT(Query3DayText()) , WObject::ConnectionType::JAVASCRIPTDYNAMIC);
QueryTitleTable1->elementAt(0, 6)->resize(WLength(8,WLength::Percentage),0);
WText * p5DayText = new WText("5d", QueryTitleTable1->elementAt(0, 6));
p5DayText->setStyleClass("linktext");
connect(p5DayText, SIGNAL(clicked()), "showbar();" ,this, SLOT(Query5DayText()) , WObject::ConnectionType::JAVASCRIPTDYNAMIC);
QueryTitleTable1->elementAt(0, 7)->resize(WLength(8,WLength::Percentage),0);
WText * p1WeekText = new WText("1w", QueryTitleTable1->elementAt(0, 7));
p1WeekText->setStyleClass("linktext");
connect(p1WeekText, SIGNAL(clicked()), "showbar();" ,this, SLOT(Query1WeekText()) , WObject::ConnectionType::JAVASCRIPTDYNAMIC);
QueryTitleTable1->elementAt(0, 8)->resize(WLength(12,WLength::Percentage),0);
WText * pCurWeekText = new WText(strWeek, QueryTitleTable1->elementAt(0, 8));
pCurWeekText->setStyleClass("linktext");
connect(pCurWeekText, SIGNAL(clicked()), "showbar();" ,this, SLOT(QueryCurWeekText()) , WObject::ConnectionType::JAVASCRIPTDYNAMIC);
QueryTitleTable1->elementAt(0, 9)->resize(WLength(8,WLength::Percentage),0);
WText * p1MonthText = new WText("1m", QueryTitleTable1->elementAt(0, 9));
p1MonthText->setStyleClass("linktext");
connect(p1MonthText, SIGNAL(clicked()), "showbar();" ,this, SLOT(Query1MonthText()) , WObject::ConnectionType::JAVASCRIPTDYNAMIC);
QueryTitleTable1->elementAt(0, 10)->resize(WLength(8,WLength::Percentage),0);
WText * p3MonthText = new WText("3m", QueryTitleTable1->elementAt(0, 10));
p3MonthText->setStyleClass("linktext");
connect(p3MonthText, SIGNAL(clicked()), "showbar();" ,this, SLOT(Query3MonthText()) , WObject::ConnectionType::JAVASCRIPTDYNAMIC);
QueryTitleTable1->elementAt(0, 11)->resize(WLength(8,WLength::Percentage),0);
WText * p6MonthText = new WText("6m", QueryTitleTable1->elementAt(0, 11));
p6MonthText->setStyleClass("linktext");
connect(p6MonthText, SIGNAL(clicked()), "showbar();" ,this, SLOT(Query6MonthText()) , WObject::ConnectionType::JAVASCRIPTDYNAMIC);
QueryTitleTable1->elementAt(0, 12)->resize(WLength(12,WLength::Percentage),0);
WText * pCurDayText = new WText(strDay, QueryTitleTable1->elementAt(0, 12));
pCurDayText->setStyleClass("linktext");
connect(pCurDayText, SIGNAL(clicked()), "showbar();" ,this, SLOT(QueryCurDayText()) , WObject::ConnectionType::JAVASCRIPTDYNAMIC);
//时间
WTable * QueryTitleTable2 = new WTable((WContainerWidget *)pFlexTable->GetContentTable()->elementAt(1,0));
pFlexTable->GetContentTable()->elementAt(1, 0)->setContentAlignment(AlignTop | AlignCenter);
QueryTitleTable2->resize(WLength(100,WLength::Percentage),WLength(30,WLength::Pixel));
TTime curTime = TTime::GetCurrentTimeEx();
new WText(strStartTimeLabel, QueryTitleTable2->elementAt(0, 0));
pAlertStartTime = new WLineEdit("", QueryTitleTable2->elementAt(0, 1));
TTimeSpan ts(0,24,0,0);
curTime -= ts;
pAlertStartTime->setText(curTime.Format());
pAlertStartTime->setStyleClass("input_text");
strcpy(pAlertStartTime->contextmenu_ , "onFocus=\"calendar()\"");
curTime = TTime::GetCurrentTimeEx();
new WText(strEndTimeLabel, QueryTitleTable2->elementAt(0, 3));
pAlertEndTime = new WLineEdit("", QueryTitleTable2->elementAt(0, 4));
pAlertEndTime->setText(curTime.Format());
pAlertEndTime->setStyleClass("input_text");
strcpy(pAlertEndTime->contextmenu_ , "onFocus=\"calendar()\"");
pFlexTable->ShowOrHideHelp();
pFlexTable->HideAllErrorMsg();
}
if(pFlexTable->GetActionTable()!=NULL)
{
//.........这里部分代码省略.........
开发者ID:,项目名称:,代码行数:101,代码来源:
示例7: WSVFlexTable
void CSVPlanSet::InitFlexTable(std::string strTitle1, std::string strTitle2)
{
ReceiveAddrSetTable = new WSVFlexTable(pMainTable->GetContentTable()->elementAt(1,0), List, strTitle1);
//new WText("\n<SCRIPT language='JavaScript' src='/basic.js'></SCRIPT>", this);
//WTable * m_pGeneral4 = new WTable(this);
//WTable * m_pGeneral = new WTable( this );
//m_pGeneral ->setStyleClass("t2");
//if ( m_pGeneral )
ReceiveAddrSetTable->SetDivId("listpan1");
if(ReceiveAddrSetTable->GetContentTable()!=NULL)
{
strListHeights += "200";
strListHeights += ",";
strListPans += ReceiveAddrSetTable->GetDivId();
strListPans += ",";
strListTitles += ReceiveAddrSetTable->dataTitleTable->formName();
strListTitles += ",";
ReceiveAddrSetTable->AppendColumn("", WLength(5, WLength::Percentage));
ReceiveAddrSetTable->SetDataRowStyle("table_data_grid_item_img");
ReceiveAddrSetTable->AppendColumn(m_FormShowText.szColName, WLength(70, WLength::Percentage));
ReceiveAddrSetTable->SetDataRowStyle("table_data_grid_item_img");
ReceiveAddrSetTable->AppendColumn(m_FormShowText.szColMod, WLength(25, WLength::Percentage));
ReceiveAddrSetTable->SetDataRowStyle("table_data_grid_item_text");
//older list table header
// // 列表
// ContainerReceiveAddrSetTable = new WTable((WContainerWidget *) m_pGeneral->elementAt(1,0));
// ContainerReceiveAddrSetTable -> setStyleClass("t3");
// ReceiveAddrSetTable = new WTable((WContainerWidget *) ContainerReceiveAddrSetTable->elementAt(0,0));
// nullTable = new WTable((WContainerWidget *) ContainerReceiveAddrSetTable->elementAt(1, 0));
//
// ReceiveAddrSetTable->setStyleClass("t3");
// ReceiveAddrSetTable->setCellPadding(0);
// ReceiveAddrSetTable->setCellSpaceing(0);
// nullTable -> setStyleClass("t8");
//
// // 添加表头
// // 全选 clicked 事件处理 函数 SelAll
//// new WText(m_FormShowText.szColStatus, (WContainerWidget*)ReceiveAddrSetTable->elementAt(0, 0));
// new WText("", (WContainerWidget*)ReceiveAddrSetTable->elementAt(0, 0));
// new WText(m_FormShowText.szColName, (WContainerWidget*)ReceiveAddrSetTable->elementAt(0, 1));
//// new WText(m_FormShowText.szColType, (WContainerWidget*)ReceiveAddrSetTable->elementAt(0, 2));
// new WText(m_FormShowText.szColMod, (WContainerWidget*)ReceiveAddrSetTable->elementAt(0, 2));
// ReceiveAddrSetTable->elementAt(0, 0)->setStyleClass("t3title");
// ReceiveAddrSetTable->elementAt(0, 1)->setStyleClass("t3title");
// ReceiveAddrSetTable->elementAt(0, 2)->setStyleClass("t3title");
// ReceiveAddrSetTable->elementAt(0, 3)->setStyleClass("t3title");
updateRangeSchedule();
}
if(ReceiveAddrSetTable->GetActionTable()!=NULL)
{
ReceiveAddrSetTable->AddStandardSelLink(m_FormShowText.szTipSelAll , m_FormShowText.szTipNotSelAll, m_FormShowText.szTipInvSel );
WObject::connect(ReceiveAddrSetTable->pSelAll, SIGNAL(clicked()), this, SLOT(SelAll()));
WObject::connect(ReceiveAddrSetTable->pSelNone, SIGNAL(clicked()), this, SLOT(SelNone()));
WObject::connect(ReceiveAddrSetTable->pSelReverse, SIGNAL(clicked()), this, SLOT(SelInvert()));
WTable *pTbl;
ReceiveAddrSetTable->GetActionTable()->elementAt(0,1)->setContentAlignment(AlignCenter);
ReceiveAddrSetTable->GetActionTable()->elementAt(0,1)->setStyleClass("textbold");
pTbl = new WTable(ReceiveAddrSetTable->GetActionTable()->elementAt(0,1));
pTbl->setStyleClass("widthauto");
WSVButton * DelBtn = new WSVButton(pTbl->elementAt(0,0),m_FormShowText.szTipDel,"button_bg_del.png",m_FormShowText.szTipDel, false);
connect(DelBtn, SIGNAL(clicked()) ,this, SLOT(BeforeDelPlan()));
pTbl = new WTable(ReceiveAddrSetTable->GetActionTable()->elementAt(0,2));
ReceiveAddrSetTable->GetActionTable()->elementAt(0,2)->setContentAlignment(AlignRight);
WSVButton * btn = new WSVButton(ReceiveAddrSetTable->GetActionTable()->elementAt(0,2),m_FormShowText.szAddRelPlanBut,"button_bg_add_black.png",m_FormShowText.szAddRelPlanBut, true);
connect(btn, SIGNAL(clicked()), this, SLOT(AddPlan()));
//
//ft = new CFlexTable();
//ft->AddGroupOperate(m_pGeneral,m_FormShowText.szValDel);
//ft->AddGroupAddBtn(m_pGeneral,m_FormShowText.szAddRelPlanBut);
//WObject::connect(ft->pSelAll, SIGNAL(clicked()), this, SLOT(SelAll()));
//WObject::connect(ft->pSelNone, SIGNAL(clicked()), this, SLOT(SelNone()));
//WObject::connect(ft->pSelinvert, SIGNAL(clicked()), this, SLOT(SelInvert()));
// WObject::connect(ft->pDel , SIGNAL(clicked()) ,this, SLOT(BeforeDelPlan()));
//WObject::connect(ft->pAdd, SIGNAL(clicked()), this, SLOT(AddPlan()));
connect(&m_signalMapper, SIGNAL(mapped(const std::string)), this, SLOT(EditPlan(const std::string)));
//ReceiveAddrSetTable->SetNullTipInfo(strSepPlanNull);
ReceiveAddrSetTable->SetNullTipInfo(strSepPlanNull);
if(m_pListPlan.size() <= 0)
{
//OutputDebugString("---------------- NO S ------------------\n");
//OutputDebugString(("---------------- NO S"+ strSepPlanNull + " ------------------\n").c_str());
ReceiveAddrSetTable->ShowNullTip();
}
else
//.........这里部分代码省略.........
开发者ID:,项目名称:,代码行数:101,代码来源:
示例8: FindNodeValue
void CSVAddPlan::showMainForm()
{
string szMon,szThurs,szWed,szTues,szFri,szSat,szSun,szDisable,szEnable,szfrom,szTo,szAddRelPlanBut;
//Resource
OBJECT objRes=LoadResource("default", "localhost");
if( objRes !=INVALID_VALUE )
{
MAPNODE ResNode=GetResourceNode(objRes);
if( ResNode != INVALID_VALUE )
{
FindNodeValue(ResNode,"IDS_Time_Area_Task_Add",szAddRelPlanBut);
FindNodeValue(ResNode,"IDS_Disable",szDisable);
FindNodeValue(ResNode,"IDS_Enable",szEnable);
FindNodeValue(ResNode,"IDS_Monday",szMon);
FindNodeValue(ResNode,"IDS_Tuesday",szThurs);
FindNodeValue(ResNode,"IDS_Wednesday",szWed);
FindNodeValue(ResNode,"IDS_Thursday",szTues);
FindNodeValue(ResNode,"IDS_Friday",szFri);
FindNodeValue(ResNode,"IDS_Saturday",szSat);
FindNodeValue(ResNode,"IDS_Sunday",szSun);
FindNodeValue(ResNode,"IDS_From",szfrom);
FindNodeValue(ResNode,"IDS_To",szTo);
}
CloseResource(objRes);
}
new WText("<SCRIPT language='JavaScript' src='/basic.js'></SCRIPT>", this);
new WText("<div id='view_panel' class='panel_view'>", this);
OutputDebugString("----------------strUser----------------\n");
pMainTable = new WSVMainTable(this, szTitle, true);
if(pMainTable->pHelpImg)
{
connect(pMainTable->pHelpImg, SIGNAL(clicked()),this,SLOT(AddPlanHelp()));
}
AddRangeTable = new WSVFlexTable((WContainerWidget *)pMainTable->GetContentTable()->elementAt(1,0), Group, m_FormShowText.szAddReTitle);
if (AddRangeTable->GetContentTable() != NULL)
{
AddRangeTable->AppendRows(m_FormShowText.szBasicAdd);
m_pName = new WLineEdit("", AddRangeTable->AppendRowsContent(0, m_FormShowText.szRunName+"<span class =required>*</span>", m_FormShowText.szRunNameHelp, m_FormShowText.szErrorMsg));
//m_pName -> setTextSize(50);
m_pName->resize(WLength(300, WLength::Pixel),WLength(20, WLength::Pixel));
m_pName->setStyleClass("input_text");
new WText("", AddRangeTable->AppendRowsContent(0, "", "", m_FormShowText.szErrorMsg1));
m_pTasklist = new CTaskList(NULL, AddRangeTable,m_FormShowText.strWeekHelp);
/*
m_pCombo[0] = new WComboBox(RecList->elementAt(0, 1));
m_pCombo[0]->addItem(szEnable);
m_pCombo[0]->addItem(szDisable);
pFrom[0] = new WText(szfrom, RecList->elementAt(0, 2));
m_pStart[0] = new WLineEdit("00:00", RecList->elementAt(0, 3));
m_pStart[0]->setStyleClass("input_text");
pTo[0] = new WText(szTo, RecList->elementAt(0, 4));
m_pEnd[0] = new WLineEdit("23:59", RecList->elementAt(0, 5));
m_pEnd[0]->setStyleClass("input_text");
for (int i=1; i<7; i++)
{
WTable *RecList = new WTable(AddRangeTable->AppendRowsContent(0, DayType[i], "", ""));
RecList->setStyleClass("widthauto");
m_pCombo[i] = new WComboBox(RecList->elementAt(0, 1));
m_pCombo[i]->addItem(szEnable);
m_pCombo[i]->addItem(szDisable);
pFrom[i] = new WText(szfrom, RecList->elementAt(0, 2));
m_pStart[i] = new WLineEdit("00:00", RecList->elementAt(0, 3));
m_pStart[i]->setStyleClass("input_text");
pTo[i] = new WText(szTo, RecList->elementAt(0, 4));
m_pEnd[i] = new WLineEdit("23:59", RecList->elementAt(0, 5));
m_pEnd[i]->setStyleClass("input_text");
}
*/
AddRangeTable->AppendRows(m_FormShowText.szAdvanceAdd);
textarea = new WTextArea("", AddRangeTable->AppendRowsContent(1, m_FormShowText.szDescript, "", ""));
textarea->resize(WLength(400, WLength::Pixel),WLength(100, WLength::Pixel));
textarea->setStyleClass("input_text");
AddRangeTable->ShowOrHideHelp();
AddRangeTable->HideAllErrorMsg();
}
if (AddRangeTable->GetActionTable() != NULL)
{
WTable *pGroupOperate = new WTable(AddRangeTable->GetActionTable()->elementAt(0, 1));
pGroupOperate->setStyleClass("widthauto");
WSVButton * pSave = new WSVButton(pGroupOperate->elementAt(0,0),m_FormShowText.szSaveBut,"button_bg_m_black.png",m_FormShowText.szSaveBut,true);
WObject::connect(pSave, SIGNAL(clicked()), this, SLOT(Save()));
//pGroupOperate->elementAt(0,0)-> addWidget(pSave);
WSVButton * pCancel = new WSVButton(pGroupOperate->elementAt(0,1),m_FormShowText.szCancelBut,"button_bg_m.png",m_FormShowText.szCancelBut,false);
//.........这里部分代码省略.........
开发者ID:,项目名称:,代码行数:101,代码来源:
示例9: WTable
VanetMobilityModelForm::VanetMobilityModelForm(WContainerWidget* parent)
{
WTable* t = new WTable(this);
int row = 0;
WLabel* l = new WLabel(tr("vanet.property.form.mobility.combo"), t->elementAt(row, 0));
mobilityCombo_ = new WComboBox(t->elementAt(row, 1));
mobilityCombo_->addItem(tr("vanet.property.form.mobility.combo.im"));
mobilityCombo_->addItem(tr("vanet.property.form.mobility.combo.lc"));
mobilityCombo_->activated().connect(this, &VanetMobilityModelForm::mobilityChanged);
l->setBuddy(mobilityCombo_);
++row;
l = new WLabel(tr("vanet.property.form.mobility.minspeed"), t->elementAt(row, 0));
minSpeed_ = new WDoubleSpinBox(t->elementAt(row, 1));
minSpeed_->setDecimals(1);
minSpeed_->setMaximum(100.0);
minSpeed_->setMinimum(0.0);
minSpeed_->setValue(0.0);
l->setBuddy(minSpeed_);
++row;
l = new WLabel(tr("vanet.property.form.mobility.maxspeed"), t->elementAt(row, 0));
maxSpeed_ = new WDoubleSpinBox(t->elementAt(row, 1));
maxSpeed_->setDecimals(1);
maxSpeed_->setMaximum(300.0);
maxSpeed_->setMinimum(0.0);
maxSpeed_->setValue(0.0);
l->setBuddy(maxSpeed_);
++row;
l = new WLabel(tr("vanet.property.form.mobility.length"), t->elementAt(row, 0));
length_ = new WDoubleSpinBox(t->elementAt(row, 1));
length_->setDecimals(1);
length_->setMaximum(20.0);
length_->setMinimum(0.0);
length_->setValue(5.0);
l->setBuddy(length_);
++row;
l = new WLabel(tr("vanet.property.form.mobility.maxaccel"), t->elementAt(row, 0));
maxAccel_ = new WDoubleSpinBox(t->elementAt(row, 1));
maxAccel_->setDecimals(1);
maxAccel_->setMaximum(10.0);
maxAccel_->setMinimum(0.0);
maxAccel_->setValue(0.6);
l->setBuddy(maxAccel_);
++row;
l = new WLabel(tr("vanet.property.form.mobility.comfydecel"), t->elementAt(row, 0));
comfyDecel_ = new WDoubleSpinBox(t->elementAt(row, 1));
comfyDecel_->setDecimals(1);
comfyDecel_->setMaximum(10.0);
comfyDecel_->setMinimum(0.0);
comfyDecel_->setValue(0.6);
l->setBuddy(comfyDecel_);
++row;
l = new WLabel(tr("vanet.property.form.mobility.jamdist"), t->elementAt(row, 0));
jamDistance_ = new WDoubleSpinBox(t->elementAt(row, 1));
jamDistance_->setDecimals(1);
jamDistance_->setMaximum(5.0);
jamDistance_->setMinimum(0.0);
jamDistance_->setValue(2.0);
l->setBuddy(jamDistance_);
++row;
l = new WLabel(tr("vanet.property.form.mobility.t"), t->elementAt(row, 0));
safeTimeHeadway_ = new WDoubleSpinBox(t->elementAt(row, 1));
safeTimeHeadway_->setDecimals(1);
safeTimeHeadway_->setMaximum(10.0);
safeTimeHeadway_->setMinimum(0.0);
safeTimeHeadway_->setValue(1.5);
l->setBuddy(safeTimeHeadway_);
++row;
l = new WLabel(tr("vanet.property.form.mobility.step"), t->elementAt(row, 0));
step_ = new WDoubleSpinBox(t->elementAt(row, 1));
step_->setDecimals(1);
step_->setMaximum(10.0);
step_->setMinimum(0.1);
step_->setValue(0.9);
l->setBuddy(step_);
++row;
l = new WLabel(tr("vanet.property.form.mobility.stay"), t->elementAt(row, 0));
stay_ = new WDoubleSpinBox(t->elementAt(row, 1));
stay_->setDecimals(1);
stay_->setMaximum(10.0);
stay_->setMinimum(0.0);
stay_->setValue(0.0);
l->setBuddy(stay_);
++row;
l = new WLabel(tr("vanet.property.form.mobility.bsave"), t->elementAt(row, 0));
bsave_ = new WDoubleSpinBox(t->elementAt(row, 1));
bsave_->setDecimals(1);
bsave_->setMaximum(10.0);
bsave_->setMinimum(0.0);
bsave_->setValue(4.0);
//.........这里部分代码省略.........
开发者ID:flaviu-toader,项目名称:vanetizer-c--,代码行数:101,代码来源:vanetmobilitymodelform.cpp
示例10: WTable
void CmsSubscribers::Impl::FillDataTable(const CmsSubscribers::Impl::Table &tableType)
{
try {
SubscribersTableContainer->clear();
WTable *table = new WTable(SubscribersTableContainer);
table->setStyleClass("table table-striped table-hover");
table->setHeaderCount(1, Orientation::Horizontal);
table->elementAt(0, 0)->addWidget(new WText(tr("cms-subscribers-no")));
table->elementAt(0, 1)->addWidget(new WText(tr("cms-subscribers-inbox")));
table->elementAt(0, 2)->addWidget(new WText(tr("cms-subscribers-subscription")));
table->elementAt(0, 3)->addWidget(new WText(tr("cms-subscribers-pending-confirm")));
table->elementAt(0, 4)->addWidget(new WText(tr("cms-subscribers-pending-cancel")));
table->elementAt(0, 5)->addWidget(new WText(tr("cms-subscribers-join-date")));
table->elementAt(0, 6)->addWidget(new WText(tr("cms-subscribers-update-date")));
table->elementAt(0, 7)->addWidget(new WText(tr("cms-subscribers-uuid")));
result r;
switch (tableType) {
case Table::All:
r = Pool::Database()->Sql()
<< (format("SELECT inbox, uuid, subscription, pending_confirm, pending_cancel, join_date, update_date"
" FROM \"%1%\" ORDER BY inbox COLLATE \"en_US.UTF-8\" ASC;")
% Pool::Database()->GetTableName("SUBSCRIBERS")).str();
break;
case Table::EnFa:
r = Pool::Database()->Sql()
<< (format("SELECT inbox, uuid, subscription, pending_confirm, pending_cancel, join_date, update_date"
" FROM \"%1%\" WHERE subscription = 'en_fa' ORDER BY inbox COLLATE \"en_US.UTF-8\" ASC;")
% Pool::Database()->GetTableName("SUBSCRIBERS")).str();
break;
case Table::En:
r = Pool::Database()->Sql()
<< (format("SELECT inbox, uuid, subscription, pending_confirm, pending_cancel, join_date, update_date"
" FROM \"%1%\" WHERE subscription = 'en' ORDER BY inbox COLLATE \"en_US.UTF-8\" ASC;")
% Pool::Database()->GetTableName("SUBSCRIBERS")).str();
break;
case Table::Fa:
r = Pool::Database()->Sql()
<< (format("SELECT inbox, uuid, subscription, pending_confirm, pending_cancel, join_date, update_date"
" FROM \"%1%\" WHERE subscription = 'fa' ORDER BY inbox COLLATE \"en_US.UTF-8\" ASC;")
% Pool::Database()->GetTableName("SUBSCRIBERS")).str();
break;
case Table::Inactive:
r = Pool::Database()->Sql()
<< (format("SELECT inbox, uuid, subscription, pending_confirm, pending_cancel, join_date, update_date"
" FROM \"%1%\" WHERE subscription = 'none' ORDER BY inbox COLLATE \"en_US.UTF-8\" ASC;")
% Pool::Database()->GetTableName("SUBSCRIBERS")).str();
break;
}
int i = 0;
while(r.next()) {
++i;
string inbox;
string uuid;
string subscription;
string pending_confirm;
string pending_cancel;
string join_date;
string update_date;
r >> inbox >> uuid >> subscription >> pending_confirm >> pending_cancel >> join_date >> update_date;
WString subscriptionTypeName;
WString pendingConfirmTypeName;
WString pendingCancelTypeName;
this->GetSubscriptionTypeName(subscription, subscriptionTypeName);
this->GetSubscriptionTypeName(pending_confirm, pendingConfirmTypeName);
this->GetSubscriptionTypeName(pending_cancel, pendingCancelTypeName);
WString joinDate;
WString updateDate;
this->GetDate(join_date, joinDate);
this->GetDate(join_date, updateDate);
table->elementAt(i, 0)->addWidget(new WText(WString::fromUTF8(lexical_cast<string>(i))));
table->elementAt(i, 1)->addWidget(new WText(WString::fromUTF8(inbox)));
table->elementAt(i, 2)->addWidget(new WText(subscriptionTypeName));
table->elementAt(i, 3)->addWidget(new WText(pendingConfirmTypeName));
table->elementAt(i, 4)->addWidget(new WText(pendingCancelTypeName));
table->elementAt(i, 5)->addWidget(new WText(joinDate));
table->elementAt(i, 6)->addWidget(new WText(updateDate));
table->elementAt(i, 7)->addWidget(new WText(WString::fromUTF8(uuid)));
}
}
catch (boost::exception &ex) {
LOG_ERROR(boost::diagnostic_information(ex));
}
catch (std::exception &ex) {
LOG_ERROR(ex.what());
}
catch (...) {
LOG_ERROR(UNKNOWN_ERROR);
//.........这里部分代码省略.........
开发者ID:NuLL3rr0r,项目名称:blog-subscription-service,代码行数:101,代码来源:CmsSubscribers.cpp
示例11: WContainerWidget
WWidget *MvcWidgets::proxyModels()
{
WContainerWidget *result = new WContainerWidget();
topic("WAbstractProxyModel", "WSortFilterProxyModel", result);
addText(tr("mvc-proxymodels"), result);
WStandardItemModel* cocktails = new WStandardItemModel(result);
cocktails->appendRow(new WStandardItem("The Last WordLime Rickey"));
cocktails->appendRow(new WStandardItem("Gin pahit"));
cocktails->appendRow(new WStandardItem("Alexander"));
cocktails->appendRow(new WStandardItem("Montgomery"));
cocktails->appendRow(new WStandardItem("Gin Sour"));
cocktails->appendRow(new WStandardItem("Hanky-Panky"));
cocktails->appendRow(new WStandardItem("Gimlet"));
cocktails->appendRow(new WStandardItem("Chocolate Soldier"));
cocktails->appendRow(new WStandardItem("Joker"));
cocktails->appendRow(new WStandardItem("Mickey Slim"));
cocktails->appendRow(new WStandardItem("Long Island Iced Tea"));
cocktails->appendRow(new WStandardItem("Old Etonian"));
cocktails->appendRow(new WStandardItem("Lorraine"));
cocktails->appendRow(new WStandardItem("Bijou"));
cocktails->appendRow(new WStandardItem("Bronx"));
cocktails->appendRow(new WStandardItem("Gin and tonic"));
cocktails->appendRow(new WStandardItem("Pall Mall"));
cocktails->appendRow(new WStandardItem("Gin Fizz"));
cocktails->appendRow(new W
|
请发表评论