Commit 4969f999 authored by Hans-Christian Ebke's avatar Hans-Christian Ebke

Snapshot dialog can now store view into image metadata.


git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@16130 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 942dc61f
......@@ -514,7 +514,7 @@ void CoreWidget::viewerSnapshotDialog() {
int h = glView_->height();
SnapshotDialog dialog(suggest, true, w, h, 0);
bool ok = dialog.exec();
if (ok){
......@@ -551,6 +551,23 @@ void CoreWidget::viewerSnapshotDialog() {
if (!comments.isEmpty())
finalImage.setText("Mesh Comments", comments);
if (dialog.metaData_storeView_cb->isChecked()) {
QSize window_size;
if (isMaximized())
window_size = QSize(0,0);
else
window_size = QSize (width(),height());
int splitter_size = 0;
if (OpenFlipperSettings().value("Core/Gui/ToolBoxes/ToolBoxOnTheRight",true).toBool())
splitter_size = toolSplitter_->sizes()[1];
else
splitter_size = toolSplitter_->sizes()[0];
QString view;
examiner_widgets_[PluginFunctions::activeExaminer()]->encodeView(view, window_size, splitter_size);
finalImage.setText("View", view);
}
finalImage.save(newName);
break;
......
......@@ -230,10 +230,10 @@ Allowed values: any number between 2 and 16.</string>
<item>
<widget class="QGroupBox" name="groupBox_3">
<property name="toolTip">
<string>Use e.g. ImageMagick (&quot;identify --verbose &lt;filename&gt;&quot;) to display the image file's meta data.</string>
<string>Use e.g. ImageMagick (&quot;identify -verbose &lt;filename&gt;&quot;) to display the image file's meta data.</string>
</property>
<property name="title">
<string>Image Meta Data</string>
<string>Image Meta Data*</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
......@@ -250,7 +250,7 @@ Allowed values: any number between 2 and 16.</string>
<widget class="QWidget" name="widget" native="true">
<layout class="QHBoxLayout" name="horizontalLayout_4">
<property name="leftMargin">
<number>9</number>
<number>16</number>
</property>
<property name="topMargin">
<number>0</number>
......@@ -281,6 +281,37 @@ Allowed values: any number between 2 and 16.</string>
</layout>
</widget>
</item>
<item>
<widget class="QCheckBox" name="metaData_storeView_cb">
<property name="text">
<string>Store View Settings</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_5">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<pointsize>8</pointsize>
</font>
</property>
<property name="text">
<string>* If you have ImageMagick use &quot;identify -verbose &lt;file&gt;&quot; to display meta data.</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
</item>
......
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