Skip to content

Commit

Permalink
Add a couple of EXIF tags, and other improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
emericg committed Nov 6, 2019
1 parent a3790c9 commit 1fb9178
Show file tree
Hide file tree
Showing 4 changed files with 324 additions and 77 deletions.
50 changes: 41 additions & 9 deletions qml/InfosGeneric.qml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,9 @@ ScrollView {
info_extension.text = mediaItem.ext
info_date.text = mediaItem.date.toLocaleDateString()
info_time.text = mediaItem.date.toLocaleTimeString()

item_duration.visible = (mediaItem.duration > 0)
info_duration.text = UtilsString.durationToString_short(mediaItem.duration)

item_size.visible = false
info_size.text = UtilsString.bytesToString(mediaItem.size)

info_size.text = UtilsString.bytesToString(mediaItem.size, settingsManager.unitSizes)
item_timecode.visible = (mediaItem.timecode.length > 0)
info_timecode.text = mediaItem.timecode

Expand All @@ -47,9 +43,11 @@ ScrollView {
columnImage.visible = true

info_icodec.text = mediaItem.videoCodec
info_impix.text = ((mediaItem.width * mediaItem.height) / 1000000).toFixed(1)
info_idefinition.text = mediaItem.width + " x " + mediaItem.height
info_iaspectratio.text = UtilsMedia.varToString(mediaItem.width, mediaItem.height)
item_iorientation.visible = (mediaItem.orientation > 0)
info_iresolution.text = (mediaItem.resolution) ? (mediaItem.resolution + " " + qsTr("dpi")) : ""
item_iorientation.visible = (mediaItem.orientation !== 0)
info_iorientation.text = UtilsMedia.orientationToString(mediaItem.orientation)
item_iprojection.visible = (mediaItem.projection > 0)
info_iprojection.text = UtilsMedia.projectionToString(mediaItem.projection)
Expand Down Expand Up @@ -271,7 +269,6 @@ ScrollView {
}
}
Row { ////
id: item_size
anchors.left: parent.left
anchors.leftMargin: 56
height: 24
Expand Down Expand Up @@ -468,12 +465,12 @@ ScrollView {
spacing: 16

Text {
text: qsTr("definition")
text: qsTr("megapixel")
color: Theme.colorSubText
font.pixelSize: 15
}
Text {
id: info_idefinition
id: info_impix
color: Theme.colorText
font.pixelSize: 15
}
Expand All @@ -495,6 +492,41 @@ ScrollView {
font.pixelSize: 15
}
}
Row { ////
anchors.left: parent.left
anchors.leftMargin: 56
height: 24
spacing: 16

Text {
text: qsTr("definition")
color: Theme.colorSubText
font.pixelSize: 15
}
Text {
id: info_idefinition
color: Theme.colorText
font.pixelSize: 15
}
}
Row { ////
anchors.left: parent.left
anchors.leftMargin: 56
height: 24
spacing: 16
visible: (info_iresolution.text.length > 0)

Text {
text: qsTr("resolution")
color: Theme.colorSubText
font.pixelSize: 15
}
Text {
id: info_iresolution
color: Theme.colorText
font.pixelSize: 15
}
}
Row { ////
id: item_iorientation
anchors.left: parent.left
Expand Down
64 changes: 64 additions & 0 deletions qml/InfosImageTags.qml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@ ScrollView {
info_iso.text = mediaItem.iso
info_focal.text = mediaItem.focal
info_exposure.text = mediaItem.exposure
info_exposureBias.text = mediaItem.exposureBias
info_flash.text = mediaItem.flash
info_lightSource.text = mediaItem.lightSource
info_meteringMode.text = mediaItem.meteringMode

columnGPS.visible = mediaItem.hasGPS
info_gps_version.text = mediaItem.gpsVersion
Expand Down Expand Up @@ -213,6 +216,7 @@ ScrollView {
anchors.leftMargin: 56
height: 24
spacing: 16
visible: (info_focal.text.length > 0)

Text {
text: qsTr("focal")
Expand All @@ -231,6 +235,7 @@ ScrollView {
anchors.leftMargin: 56
height: 24
spacing: 16
visible: (info_exposure.text.length > 0)

Text {
text: qsTr("exposure time")
Expand All @@ -243,12 +248,32 @@ ScrollView {
font.pixelSize: 15
}
}
Row { ////
id: item_exposureBias
anchors.left: parent.left
anchors.leftMargin: 56
height: 24
spacing: 16
visible: (info_exposureBias.text.length > 0)

Text {
text: qsTr("exposure bias")
color: Theme.colorSubText
font.pixelSize: 15
}
Text {
id: info_exposureBias
color: Theme.colorText
font.pixelSize: 15
}
}
Row { ////
id: item_iso
anchors.left: parent.left
anchors.leftMargin: 56
height: 24
spacing: 16
visible: (info_iso.text.length > 0)

Text {
text: qsTr("ISO")
Expand All @@ -267,6 +292,7 @@ ScrollView {
anchors.leftMargin: 56
height: 24
spacing: 16
visible: (info_flash.text != "false")

Text {
text: qsTr("flash")
Expand All @@ -279,6 +305,44 @@ ScrollView {
font.pixelSize: 15
}
}
Row { ////
id: item_lightSource
anchors.left: parent.left
anchors.leftMargin: 56
height: 24
spacing: 16
visible: (info_lightSource.text.length > 0)

Text {
text: qsTr("light source")
color: Theme.colorSubText
font.pixelSize: 15
}
Text {
id: info_lightSource
color: Theme.colorText
font.pixelSize: 15
}
}
Row { ////
id: item_meteringMode
anchors.left: parent.left
anchors.leftMargin: 56
height: 24
spacing: 16
visible: (info_meteringMode.text.length > 0)

Text {
text: qsTr("metering mode")
color: Theme.colorSubText
font.pixelSize: 15
}
Text {
id: info_meteringMode
color: Theme.colorText
font.pixelSize: 15
}
}
}

////////////////
Expand Down
Loading

0 comments on commit 1fb9178

Please sign in to comment.