本文整理汇总了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();
}
示例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();
}
示例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;
}
}