当前位置: 首页>>代码示例>>C++>>正文


C++ BatchProcessImagesItem::nameSrc方法代码示例

本文整理汇总了C++中BatchProcessImagesItem::nameSrc方法的典型用法代码示例。如果您正苦于以下问题:C++ BatchProcessImagesItem::nameSrc方法的具体用法?C++ BatchProcessImagesItem::nameSrc怎么用?C++ BatchProcessImagesItem::nameSrc使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在BatchProcessImagesItem的用法示例。


在下文中一共展示了BatchProcessImagesItem::nameSrc方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: sortList

void RenameImagesWidget::sortList(QAction* action)
{
    QTreeWidgetItemIterator it(ui->m_listView->topLevelItem(0));
    for (; *it; ++it)
    {
        BatchProcessImagesItem* item = static_cast<BatchProcessImagesItem*>(*it);

        if (action == m_byNameAction)
        {
            item->changeSortKey(item->nameSrc());
        }
        else if (action == m_bySizeAction)
        {
            QFileInfo fi(item->pathSrc());
            item->changeSortKey(QString::number(fi.size()));
        }
        else if (action == m_byDateAction)
        {
            KUrl url(item->pathSrc());
            KIPIPlugins::KPImageInfo info(url);
            item->changeSortKey(info.date().toString(Qt::ISODate));
        }
    }

    ui->m_listView->sortByColumn(BatchProcessImagesItem::columnOfSortKey(), Qt::AscendingOrder);

    updateListing();
}
开发者ID:rickysarraf,项目名称:digikam,代码行数:28,代码来源:renameimageswidget.cpp

示例2: slotPreviewFinished

void BatchProcessImagesDialog::slotPreviewFinished()
{
    if (m_PreviewProc->exitStatus() == QProcess::CrashExit)
    {
        KMessageBox::error(this, i18n("Cannot run properly 'convert' program from 'ImageMagick' package."));
        m_ui->m_previewButton->setEnabled(true);
        return;
    }

    BatchProcessImagesItem* item = static_cast<BatchProcessImagesItem*>(m_listFiles->currentItem());
    int ValRet                   = m_PreviewProc->exitCode();

    kDebug() << "Convert exit (" << ValRet << ")";

    if (ValRet == 0)
    {
        QString cropTitle = "";

        if (m_ui->m_smallPreview->isChecked())
            cropTitle = i18n(" - small preview");

        QPointer<ImagePreview> previewDialog = new ImagePreview(item->pathSrc(), m_tmpFolder + '/'
                + QString::number(getpid()) + "preview.PNG", m_ui->m_smallPreview->isChecked(),
                m_Type->currentText() + cropTitle, item->nameSrc(), this);
        previewDialog->exec();
        delete previewDialog;

        KUrl deletePreviewImage(m_tmpFolder + '/' + QString::number(getpid()) + "preview.PNG");

        KIO::NetAccess::del(deletePreviewImage, kapp->activeWindow());
    }
    else
    {
        QPointer<KPOutputDialog> infoDialog = new KPOutputDialog(this, i18n("Preview processing error"),
                m_previewOutput, i18n("Cannot process preview for image \"%1\"."
                                      "\nThe output messages are:\n", item->nameSrc()));
        infoDialog->exec();
        delete infoDialog;
    }

    endPreview();
}
开发者ID:rickysarraf,项目名称:digikam,代码行数:42,代码来源:batchprocessimagesdialog.cpp

示例3: slotListDoubleClicked

void BatchProcessImagesDialog::slotListDoubleClicked(QTreeWidgetItem *itemClicked)
{
    BatchProcessImagesItem* item = static_cast<BatchProcessImagesItem*>(itemClicked);

    if (m_convertStatus == PROCESS_DONE)
    {
        QPointer<KPOutputDialog> infoDialog = new KPOutputDialog(this, i18n("Image processing error"),
                item->outputMess(),
                i18n("Image \"%1\": %2\n\nThe output messages are:\n",
                     item->nameSrc(),
                     item->error()));
        infoDialog->exec();
        delete infoDialog;
    }
}
开发者ID:rickysarraf,项目名称:digikam,代码行数:15,代码来源:batchprocessimagesdialog.cpp


注:本文中的BatchProcessImagesItem::nameSrc方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。