本文整理汇总了C++中BatchProcessImagesItem::changeOutputMess方法的典型用法代码示例。如果您正苦于以下问题:C++ BatchProcessImagesItem::changeOutputMess方法的具体用法?C++ BatchProcessImagesItem::changeOutputMess怎么用?C++ BatchProcessImagesItem::changeOutputMess使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BatchProcessImagesItem
的用法示例。
在下文中一共展示了BatchProcessImagesItem::changeOutputMess方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: slotReadyRead
void BatchProcessImagesDialog::slotReadyRead()
{
BatchProcessImagesItem *item =
static_cast<BatchProcessImagesItem*>(**m_listFile2Process_iterator);
QByteArray output = m_ProcessusProc->readAll();
item->changeOutputMess(QString::fromLocal8Bit(output.data(), output.size()));
}
示例2: updateListing
void RenameImagesWidget::updateListing()
{
int pos = 0;
QTreeWidgetItemIterator it(ui->m_listView);
for (; *it; ++it)
{
BatchProcessImagesItem* item = static_cast<BatchProcessImagesItem*>(*it);
item->changeNameDest(oldToNewName(item, pos));
item->changeResult(QString());
item->changeError(QString());
item->changeOutputMess(QString());
pos++;
}
}
示例3: startProcess
//.........这里部分代码省略.........
else
{
item->setDidOverWrite(true);
}
break;
}
case OVERWRITE_RENAME:
{
QFileInfo Target(targetAlbum + '/' + item->nameDest());
QString newFileName = RenameTargetImageFile(&Target);
if (newFileName.isNull())
{
item->changeResult(i18nc("batch process result", "Failed."));
item->changeError(i18n("destination image file already exists and cannot be renamed."));
++*m_listFile2Process_iterator;
++m_progressStatus;
m_ui->m_progress->setValue((int)((float)m_progressStatus *(float)100 / (float)m_nbItem));
if (**m_listFile2Process_iterator)
{
startProcess();
return true;
}
else
{
endProcess();
return true;
}
}
else
{
QFileInfo newTarget(newFileName);
item->changeNameDest(newTarget.fileName());
}
break;
}
case OVERWRITE_SKIP:
{
item->changeResult(i18n("Skipped."));
item->changeError(i18n("destination image file already exists (skipped automatically)."));
++*m_listFile2Process_iterator;
++m_progressStatus;
m_ui->m_progress->setValue((int)((float)m_progressStatus *(float)100 / (float)m_nbItem));
if (**m_listFile2Process_iterator)
{
startProcess();
return true;
}
else
{
endProcess();
return true;
}
break;
}
case OVERWRITE_OVER: // In this case do nothing : 'convert' default mode...
item->setDidOverWrite(true);
break;
default:
{
endProcess();
return true;
}
}
}
m_ProcessusProc = new KProcess(this);
m_ProcessusProc->setOutputChannelMode(KProcess::MergedChannels);
initProcess(m_ProcessusProc, item, targetAlbum);
m_commandLine = m_ProcessusProc->program().join(" ");
item->changeOutputMess(m_commandLine + "\n\n");
connect(m_ProcessusProc, SIGNAL(finished(int,QProcess::ExitStatus)),
this, SLOT(slotFinished()));
connect(m_ProcessusProc, SIGNAL(readyRead()),
this, SLOT(slotReadyRead()));
m_ProcessusProc->start();
if (!m_ProcessusProc->waitForStarted())
{
KMessageBox::error(this, i18n("Cannot start 'convert' program from 'ImageMagick' package;\n"
"please check your installation."));
delete m_ProcessusProc;
m_ProcessusProc = 0;
return false;
}
return true;
}