コード例 #1
0
void DigikamImageView::confirmFaces(const QList<QModelIndex>& indexes, int tagId)
{
#ifdef HAVE_KFACE
    QList<ImageInfo>    infos;
    QList<DatabaseFace> faces;
    QList<QModelIndex>  sourceIndexes;

    // fast-remove in the "unknown person" view

    bool needFastRemove = false;

    if (imageAlbumModel()->currentAlbums().size() == 1)
    {
        needFastRemove = d->faceMode && (tagId != imageAlbumModel()->currentAlbums().first()->id());
    }

    foreach (const QModelIndex& index, indexes)
    {
        infos << ImageModel::retrieveImageInfo(index);
        faces << d->faceDelegate->face(index);

        if (needFastRemove)
        {
            sourceIndexes << imageSortFilterModel()->mapToSourceImageModel(index);
        }
    }
コード例 #2
0
ファイル: imagethumbnailbar.cpp プロジェクト: KDE/digikam
void ImageThumbnailBar::assignRating(const QList<QModelIndex>& indexes, int rating)
{
    FileActionMngr::instance()->assignRating(imageSortFilterModel()->imageInfos(indexes), rating);
}