本文整理汇总了C++中QueryResult::end方法的典型用法代码示例。如果您正苦于以下问题:C++ QueryResult::end方法的具体用法?C++ QueryResult::end怎么用?C++ QueryResult::end使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QueryResult
的用法示例。
在下文中一共展示了QueryResult::end方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: fillCategorieRec
void BookmarkGui::fillCategorieRec( const QString& name , const QString& parent_id , QTreeWidgetItem* parent )
{
Bookmark bk ;
QueryResult qr ;
bk.getFoldersId( qr , parent_id ) ;
for ( QueryResult::iterator itr = qr.begin() ; itr < qr.end() ; itr++ )
{
QString name = qr.getField( "Folder" , itr ) ;
QString id = qr.getField( "Id" , itr ) ;
QTreeWidgetItem* item = new QTreeWidgetItem( parent , BookmarkGui::item_folder ) ;
this->setFolderItemDecorations( item , name , id ) ;
this->fillCategorieRec( name , id , item ) ;
}
bk.getFavoritesByParent( qr , name ) ;
for ( QueryResult::iterator itr = qr.begin() ; itr < qr.end() ; itr++ )
{
QString id_entry = qr.getField( "IdEntry" , itr ) ;
QString id = qr.getField( "Id" , itr ) ;
QTreeWidgetItem* item = new QTreeWidgetItem( parent , BookmarkGui::item_article ) ;
this->setArticleItemDecorations( item , id_entry , id ) ;
}
}
示例2: fillEvaluations
void BookmarkGui::fillEvaluations()
{
QueryResult eval ;
Bookmark bk ;
QList<QTreeWidgetItem*> items;
ui->Evaluation->clear();
int index = 0 ;
ui->Evaluation->setIconSize( QSize( 100 , 20 ) );
ui->treeEvaluations->setIconSize( QSize( 100 , 20 ) );
ui->Evaluation->insertItem( index , tr("Nessuna valutazione") , "-1" );
bk.getEvaluations( eval );
for ( QueryResult::iterator itr = eval.begin() ; itr < eval.end() ; itr++ )
{
QString Evaluation = eval.getField( "Evaluation" , itr ) ;
QString stars_file = ":/stars/stars/" ;
stars_file += Evaluation ;
stars_file += "s.png" ;
QIcon stars_icon( stars_file ) ;
QTreeWidgetItem* item = new QTreeWidgetItem( (QTreeWidget*)0 , BookmarkGui::item_evaluation ) ;
item->setIcon( 0 , stars_icon ) ;
item->setText( 1 , Evaluation ) ;
qDebug() << item->text(1);
QueryResult entries ;
bk.getFavoritesByEvaluation( entries , Evaluation ) ;
for ( QueryResult::iterator itr_b = entries.begin() ; itr_b < entries.end() ; itr_b++ )
{
QString id_entry = entries.getField( "IdEntry" , itr_b ) ;
QString id = entries.getField( "Id" , itr_b ) ;
QTreeWidgetItem* entry_item = new QTreeWidgetItem( item , BookmarkGui::item_article ) ;
this->setArticleItemDecorations( entry_item , id_entry , id ) ;
}
items.append( item );
QVariant stars ;
stars.setValue( Evaluation );
ui->Evaluation->insertItem( ++index , stars_icon , "" , stars ) ;
}
ui->treeEvaluations->clear();
ui->treeEvaluations->addTopLevelItems( items );
}
示例3: fillCategorie
void BookmarkGui::fillCategorie()
{
QList<QTreeWidgetItem *> items;
Bookmark bk ;
QueryResult qr ;
bk.getRootFolders( qr );
for ( QueryResult::iterator itr = qr.begin() ; itr < qr.end() ; itr++ )
{
QString name = qr.getField( "Folder" , itr ) ;
QString id = qr.getField( "Id" , itr ) ;
QTreeWidgetItem* item = new QTreeWidgetItem( (QTreeWidget*)0 , BookmarkGui::item_folder ) ;
setFolderItemDecorations( item , name , id ) ;
fillCategorieRec( name , id , item ) ;
items.append( item ) ;
}
// ATTENIONE!
bk.getFavoritesByParentId( qr , "" ) ;
for ( QueryResult::iterator itr = qr.begin() ; itr < qr.end() ; itr++ )
{
QString name = qr.getField( "IdArticolo" , itr ) ;
QString id = qr.getField( "Id" , itr ) ;
QTreeWidgetItem* item = new QTreeWidgetItem( (QTreeWidget*)0 , BookmarkGui::item_article ) ;
this->setArticleItemDecorations( item , name , id ) ;
items.append( item );
}
ui->treeCategorie->clear();
if ( items.isEmpty() )
{
showDataBaseMessage() ;
return ;
}
current_favorites_item = items.first() ;
ui->treeCategorie->insertTopLevelItems(0, items);
current_favorites_item->setExpanded( true ) ;
}
示例4: eval
QueryResult OrQuery::eval(const TextQuery &text) const
{
QueryResult right = rhs.eval(text), left= lhs.eval(text);
//! copy the left-hand operand into the result set
std::shared_ptr<std::set<line_no>> ret_lines =
std::make_shared<std::set<line_no>>(left.begin(), left.end());
//! inert lines from the right-hand operand
ret_lines->insert(right.begin(), right.end());
return QueryResult(rep(),ret_lines,left.get_file());
}
示例5: fillStates
void BookmarkGui::fillStates()
{
QueryResult states ;
Bookmark bk ;
bk.getStates( states );
QList<QTreeWidgetItem*> items;
ui->State->clear();
int index = 0 ;
ui->State->insertItem( index , tr("Non definito") ) ;
for ( QueryResult::iterator itr = states.begin() ; itr < states.end() ; itr++ )
{
QString name = states.getField( "StateName" , itr ) ;
QString id = states.getField( "Id" , itr ) ;
QTreeWidgetItem* item = new QTreeWidgetItem( (QTreeWidget*)0 , BookmarkGui::item_state ) ;
QueryResult entries ;
bk.getFavoritesByState( entries , name ) ;
for ( QueryResult::iterator itr_b = entries.begin() ; itr_b < entries.end() ; itr_b++ )
{
QString id_entry = entries.getField( "IdEntry" , itr_b ) ;
QString id = entries.getField( "Id" , itr_b ) ;
QTreeWidgetItem* entry_item = new QTreeWidgetItem( item , BookmarkGui::item_article ) ;
this->setArticleItemDecorations( entry_item , id_entry , id ) ;
}
this->setFolderItemDecorations( item , name , id ) ;
items.append( item );
ui->State->insertItem( ++index , name ) ;
}
ui->treeStates->clear();
ui->treeStates->addTopLevelItems( items ) ;
}
示例6:
bool LeScienze500::fillQListWidget( QListWidget *w_list , QueryResult &r_list )
{
if ( r_list.empty() )
return false ;
w_list->clear();
QString col_name = r_list.getFirstColumnName() ;
QueryResult::iterator it;
for( it = r_list.begin() ; it < r_list.end() ; it++ )
{
w_list->addItem( r_list.getField( col_name , it ) );
}
return true ;
}