本文整理汇总了C++中QValueList::empty方法的典型用法代码示例。如果您正苦于以下问题:C++ QValueList::empty方法的具体用法?C++ QValueList::empty怎么用?C++ QValueList::empty使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QValueList
的用法示例。
在下文中一共展示了QValueList::empty方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: setMessageStatus
void MessageActions::setMessageStatus(KMMsgStatus status, bool toggle)
{
QValueList<Q_UINT32> serNums = mVisibleSernums;
if(serNums.isEmpty() && mCurrentMessage)
serNums.append(mCurrentMessage->getMsgSerNum());
if(serNums.empty())
return;
KMCommand *command = new KMSetStatusCommand(status, serNums, toggle);
command->start();
}
示例2: write
void MyMoneyReport::write ( QDomElement& e, QDomDocument *doc, bool anonymous ) const
{
// No matter what changes, be sure to have a 'type' attribute. Only change
// the major type if it becomes impossible to maintain compatability with
// older versions of the program as new features are added to the reports.
// Feel free to change the minor type every time a change is made here.
writeBaseXML ( *doc, e );
if ( anonymous )
{
e.setAttribute ( "name", m_id );
e.setAttribute ( "comment", QString ( m_comment ).fill ( 'x' ) );
}
else
{
e.setAttribute ( "name", m_name );
e.setAttribute ( "comment", m_comment );
}
e.setAttribute ( "group", m_group );
e.setAttribute ( "convertcurrency", m_convertCurrency );
e.setAttribute ( "favorite", m_favorite );
e.setAttribute ( "tax", m_tax );
e.setAttribute ( "investments", m_investments );
e.setAttribute ( "loans", m_loans );
e.setAttribute ( "rowtype", kRowTypeText[m_rowType] );
e.setAttribute ( "datelock", kDateLockText[m_dateLock] );
e.setAttribute ( "includeschedules", m_includeSchedules );
e.setAttribute ( "columnsaredays", m_columnsAreDays );
e.setAttribute ( "includestransfers", m_includeTransfers );
if ( !m_budgetId.isEmpty() )
e.setAttribute ( "budget", m_budgetId );
e.setAttribute ( "includesactuals", m_includeBudgetActuals );
e.setAttribute ( "includeunused", m_includeUnusedAccounts );
e.setAttribute ( "includesforecast", m_includeForecast );
e.setAttribute ( "includesprice", m_includePrice );
e.setAttribute ( "includesaverageprice", m_includeAveragePrice );
e.setAttribute ( "includesmovingaverage", m_includeMovingAverage );
if( m_includeMovingAverage )
e.setAttribute ( "movingaveragedays", m_movingAverageDays );
e.setAttribute ( "charttype", kChartTypeText[m_chartType] );
e.setAttribute ( "chartdatalabels", m_chartDataLabels );
e.setAttribute ( "chartgridlines", m_chartGridLines );
e.setAttribute ( "chartbydefault", m_chartByDefault );
e.setAttribute ( "chartlinewidth", m_chartLineWidth );
if ( m_reportType == ePivotTable )
{
e.setAttribute ( "type", "pivottable 1.15" );
e.setAttribute ( "detail", kDetailLevelText[m_detailLevel] );
e.setAttribute ( "columntype", kColumnTypeText[m_columnType] );
e.setAttribute ( "showrowtotals", m_showRowTotals );
}
else if ( m_reportType == eQueryTable )
{
e.setAttribute ( "type", "querytable 1.14" );
QStringList columns;
unsigned qc = m_queryColumns;
unsigned it_qc = eQCbegin;
unsigned index = 1;
while ( it_qc != eQCend )
{
if ( qc & it_qc )
columns += kQueryColumnsText[index];
it_qc *= 2;
index++;
}
e.setAttribute ( "querycolumns", columns.join ( "," ) );
}
else if ( m_reportType == eInfoTable )
{
e.setAttribute ( "type", "infotable 1.0" );
e.setAttribute ( "detail", kDetailLevelText[m_detailLevel] );
e.setAttribute ( "showrowtotals", m_showRowTotals );
}
//
// Text Filter
//
QRegExp textfilter;
if ( textFilter ( textfilter ) )
{
QDomElement f = doc->createElement ( "TEXT" );
f.setAttribute ( "pattern", textfilter.pattern() );
f.setAttribute ( "casesensitive", textfilter.caseSensitive() );
f.setAttribute ( "regex", !textfilter.wildcard() );
f.setAttribute ( "inverttext", m_invertText );
e.appendChild ( f );
}
//
// Type & State Filters
//
QValueList<int> typelist;
if ( types ( typelist ) && ! typelist.empty() )
{
// iterate over payees, and add each one
//.........这里部分代码省略.........