Commit 3827e0d0 authored by Julius Künzel's avatar Julius Künzel
Browse files

Effects: "save" mode for url (frei0r.bigsh0t_stabilize_360) #350

parent 137fb105
Pipeline #51661 passed with stage
in 10 minutes and 19 seconds
......@@ -187,6 +187,7 @@ For double values these placeholders are avaible:
| attribute name | description |
| :------------- | :------------- |
| `filter` | Filter for file extensions. Example : `"*.cpp *.cc *.C\|C++ Source Files\n*.h *.H\|Header files"` or as using MIME type: `"image/png text html"` |
| `mode` | _(optional)_ Default is empty = open. `"save"` means none-exsisting files can be selected and gui label is "save"
<!-- Attention if you see this comment (i.e. your editor does not support markdown), note that the string above is probably not show right. Please consider "*.cpp *.cc *.C|C++ Source Files\n*.h *.H|Header" to be right -->
......
......@@ -6,8 +6,8 @@
<parameter type="bool" name="analyze">
<name>Analyze</name>
</parameter>
<parameter type="url" name="analysisFile" filter="*.bigsh0t360motion">
<name>Motion Analysis File</name>
<parameter type="url" name="analysisFile" filter="*.bigsh0t360motion" mode="save">
<name>Motion Analysis File</name>
</parameter>
<parameter type="constant" name="sampleRadius" default="16" min="1" max="64" factor="1" suffix="px">
<name>Analysis Sample Radius</name>
......
......@@ -494,6 +494,8 @@ QVariant AssetParameterModel::data(const QModelIndex &index, int role) const
}
case NewStuffRole:
return element.attribute(QStringLiteral("newstuff"));
case ModeRole:
return element.attribute(QStringLiteral("mode"));
case List1Role:
return parseAttribute(m_ownerId, QStringLiteral("list1"), element);
case List2Role:
......
......@@ -104,6 +104,7 @@ public:
ListValuesRole,
ListNamesRole,
NewStuffRole,
ModeRole,
FactorRole,
FilterRole,
FilterJobParamsRole,
......
......@@ -38,6 +38,11 @@ UrlParamWidget::UrlParamWidget(std::shared_ptr<AssetParameterModel> model, QMode
if (!filter.isEmpty()) {
urlwidget->setFilter(filter);
}
QString mode = m_model->data(m_index, AssetParameterModel::ModeRole).toString();
if (mode == "save") {
urlwidget->setAcceptMode(QFileDialog::AcceptSave);
urlwidget->setMode(KFile::File);
}
slotRefresh();
// setup the name
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment