return result;
}
+// static
+double ProfilesDialog::getStringEval(const MltVideoProfile &profile, QString eval)
+{
+ double result;
+ eval.replace("%width", QString::number(profile.width));
+ eval.replace("%height", QString::number(profile.height));
+ if (eval.contains('/')) result = (double) eval.section('/', 0, 0).toInt() / eval.section('/', 1, 1).toInt();
+ else if (eval.contains('*')) result = (double) eval.section('*', 0, 0).toInt() * eval.section('*', 1, 1).toInt();
+ else if (eval.contains('+')) result = (double) eval.section('+', 0, 0).toInt() + eval.section('+', 1, 1).toInt();
+ else if (eval.contains('-')) result = (double) eval.section('-', 0, 0).toInt() - eval.section('-', 1, 1).toInt();
+ else result = eval.toDouble();
+ return result;
+}
+
// static
bool ProfilesDialog::existingProfileDescription(const QString &desc)
m_selectedProfileIndex = m_view.profiles_list->currentIndex();
QString currentProfile = m_view.profiles_list->itemData(m_view.profiles_list->currentIndex()).toString();
m_isCustomProfile = currentProfile.contains('/');
+ m_view.button_create->setEnabled(true);
m_view.button_delete->setEnabled(m_isCustomProfile);
m_view.properties->setEnabled(m_isCustomProfile);
m_view.button_save->setEnabled(m_isCustomProfile);