}
-RenderWidget::RenderWidget(const QString &projectfolder, bool enableProxy, MltVideoProfile profile, QWidget * parent) :
+RenderWidget::RenderWidget(const QString &projectfolder, bool enableProxy, const MltVideoProfile &profile, QWidget * parent) :
QDialog(parent),
m_projectFolder(projectfolder),
m_profile(profile),
m_view.create_chapter->setEnabled(false);
}
double fps = (double) m_profile.frame_rate_num / m_profile.frame_rate_den;
- for (int i = 0; i < nodes.count(); i++) {
+ for (int i = 0; i < nodes.count(); ++i) {
QDomElement e = nodes.item(i).toElement();
if (!e.isNull()) {
GenTime pos = GenTime(e.attribute("time").toDouble());
QDialog *d = new QDialog(this);
ui.setupUi(d);
- for (int i = 0; i < m_view.destination_list->count(); i++)
+ for (int i = 0; i < m_view.destination_list->count(); ++i)
ui.destination_list->addItem(m_view.destination_list->itemIcon(i), m_view.destination_list->itemText(i), m_view.destination_list->itemData(i, Qt::UserRole));
ui.destination_list->setCurrentIndex(m_view.destination_list->currentIndex());
break;
}
}
- i++;
+ ++i;
}
profiles.appendChild(newprofile);
QDialog *d = new QDialog(this);
ui.setupUi(d);
- for (int i = 0; i < m_view.destination_list->count(); i++)
+ for (int i = 0; i < m_view.destination_list->count(); ++i)
ui.destination_list->addItem(m_view.destination_list->itemIcon(i), m_view.destination_list->itemText(i), m_view.destination_list->itemData(i, Qt::UserRole));
ui.destination_list->setCurrentIndex(m_view.destination_list->currentIndex());
break;
}
}
- i++;
+ ++i;
}
QDomElement profileElement = doc.createElement("profile");
doc.documentElement().removeChild(profiles.item(i));
break;
}
- i++;
+ ++i;
}
if (!file.open(QIODevice::WriteOnly | QIODevice::Text)) {
return count;
}
-void RenderWidget::setProfile(MltVideoProfile profile)
+void RenderWidget::setProfile(const MltVideoProfile &profile)
{
m_view.scanning_list->setCurrentIndex(0);
m_view.rescale_width->setValue(KdenliveSettings::defaultrescalewidth());
m_view.open_browser->setVisible(false);
// hide groups that are not in the correct destination
- for (int i = 0; i < m_renderCategory.count(); i++) {
+ for (int i = 0; i < m_renderCategory.count(); ++i) {
sizeItem = m_renderCategory.at(i);
if (sizeItem->data(MetaGroupRole).toString() == destination) {
m_view.format_list->addItem(sizeItem->clone());
const QColor disabledbg = scheme.background(KColorScheme::NegativeBackground).color();
double project_framerate = (double) m_profile.frame_rate_num / m_profile.frame_rate_den;
- for (int i = 0; i < m_renderItems.count(); i++) {
+ for (int i = 0; i < m_renderItems.count(); ++i) {
sizeItem = m_renderItems.at(i);
QListWidgetItem *dupItem = NULL;
if ((sizeItem->data(GroupRole).toString() == group || sizeItem->data(GroupRole).toString().isEmpty()) && sizeItem->data(MetaGroupRole).toString() == destination) {
}
}
-KUrl RenderWidget::filenameWithExtension(KUrl url, QString extension)
+KUrl RenderWidget::filenameWithExtension(KUrl url, const QString &extension)
{
if (url.isEmpty()) url = KUrl(m_projectFolder);
QString directory = url.directory(KUrl::AppendTrailingSlash | KUrl::ObeyTrailingSlash);
newprofiles.setAttribute("version", 1);
newdoc.appendChild(newprofiles);
QDomNodeList profilelist = doc.elementsByTagName("profile");
- for (int i = 0; i < profilelist.count(); i++) {
+ for (int i = 0; i < profilelist.count(); ++i) {
QString category = i18nc("Category Name", "Custom");
QString extension;
QDomNode parent = profilelist.at(i).parentNode();
n = n.nextSibling();
}
- i++;
+ ++i;
}
}
}
m_view.abort_job->setEnabled(activate);
/*
- for (int i = 0; i < m_view.running_jobs->topLevelItemCount(); i++) {
+ for (int i = 0; i < m_view.running_jobs->topLevelItemCount(); ++i) {
current = static_cast<RenderJobItem*>(m_view.running_jobs->topLevelItem(i));
if (current == static_cast<RenderJobItem*> (m_view.running_jobs->currentItem())) {
current->setSizeHint(1, QSize(m_view.running_jobs->columnWidth(1), fontMetrics().height() * 3));
if (current == NULL) return;
m_view.start_script->setEnabled(current->data(0, Qt::UserRole).toString().isEmpty());
m_view.delete_script->setEnabled(true);
- for (int i = 0; i < m_view.scripts_list->topLevelItemCount(); i++) {
+ for (int i = 0; i < m_view.scripts_list->topLevelItemCount(); ++i) {
current = m_view.scripts_list->topLevelItem(i);
if (current == m_view.scripts_list->currentItem()) {
current->setSizeHint(1, QSize(m_view.scripts_list->columnWidth(1), fontMetrics().height() * 3));
m_view.error_box->setVisible(false);
}
-void RenderWidget::setRenderProfile(QMap <QString, QString> props)
+void RenderWidget::setRenderProfile(const QMap<QString, QString> &props)
{
m_view.scanning_list->setCurrentIndex(props.value("renderscanning").toInt());
int exportAudio = props.value("renderexportaudio").toInt();
void RenderWidget::setRescaleEnabled(bool enable)
{
- for (int i = 0; i < m_view.rescale_box->layout()->count(); i++) {
+ for (int i = 0; i < m_view.rescale_box->layout()->count(); ++i) {
if (m_view.rescale_box->itemAt(i)->widget()) m_view.rescale_box->itemAt(i)->widget()->setEnabled(enable);
}
}