本文整理汇总了C++中QueueItem::text方法的典型用法代码示例。如果您正苦于以下问题:C++ QueueItem::text方法的具体用法?C++ QueueItem::text怎么用?C++ QueueItem::text使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QueueItem
的用法示例。
在下文中一共展示了QueueItem::text方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: processQueue
void MainWindow::processQueue() {
if(ui->listWidget_queue->count() == 0)
return;
if(!(ui->checkBox_queue_generateNormal->isChecked() ||
ui->checkBox_queue_generateSpec->isChecked() ||
ui->checkBox_queue_generateDisplace->isChecked())) {
QMessageBox::information(this, "Nothing to do", "Select at least one map type to generate from the \"Save\" section");
return;
}
if(!exportPath.isValid()) {
QMessageBox::information(this, "Invalid Export Path", "Export path is invalid!");
return;
}
//enable stop button
ui->pushButton_stopProcessingQueue->setEnabled(true);
//show progress bar and adjust maximum to queue size
ui->progressBar_Queue->show();
ui->progressBar_Queue->setMaximum(ui->listWidget_queue->count());
for(int i = 0; i < ui->listWidget_queue->count() && !stopQueue; i++)
{
QueueItem *item = (QueueItem*)(ui->listWidget_queue->item(i));
//display status
ui->statusBar->showMessage("Processing Image \"" + item->text() + "\"");
ui->progressBar_Queue->setValue(i + 1);
ui->listWidget_queue->item(i)->setSelected(true);
//load image
load(item->getUrl());
//save maps
QUrl exportUrl = QUrl::fromLocalFile(exportPath.toLocalFile() + "/" + item->text());
std::cout << "[Queue] Image " << i + 1 << " exported: "
<< exportUrl.toLocalFile().toStdString() << std::endl;
save(exportUrl);
//user interface should stay responsive
QCoreApplication::processEvents();
}
//disable stop button
ui->pushButton_stopProcessingQueue->setEnabled(false);
stopQueue = false;
//hide queue progress bar
ui->progressBar_Queue->hide();
//enable "Open Export Folder" gui button
ui->pushButton_openExportFolder->setEnabled(true);
}