Gegl.MetadataStore¶
- Subclasses:
Methods¶
- Inherited:
- Structs:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
|
|
|
|
|
|
|
|
|
Properties¶
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w/en |
Name of image creator |
||
r/w/en |
Miscellaneous comment |
||
r/w/en |
Copyright notice |
||
r/w/en |
Description of image (possibly long) |
||
r/w/en |
Legal disclaimer |
||
r/en |
Name of currently active file module or |
||
r/w/en |
Units for image resolution |
||
r/w/en |
X Resolution |
||
r/w/en |
X Resolution |
||
r/w/en |
Software used to create the image |
||
r/w/en |
Device used to create the image |
||
r/w/en |
Image creation time |
||
r/w/en |
Short title or caption |
||
r/w/en |
Warning of nature of content |
Signals¶
- Inherited:
Name |
Short Description |
---|---|
|
|
If a signal handler is connected to |
|
|
|
If a signal handler is connected to |
|
|
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent_instance |
r |
Class Details¶
- class Gegl.MetadataStore(**kwargs)¶
- Bases:
- Abstract:
Yes
- Structure:
- declare(pspec)¶
- Parameters:
pspec (
GObject.ParamSpec
) – AGObject.ParamSpec
Declare a metadata value using a
GObject.ParamSpec
.
- get_description()¶
-
Get description of image.
- get_file_module_name()¶
-
Return the name registered by the current file module.
- get_resolution_unit()¶
- Returns:
- Return type:
Get the units used for resolution.
- get_resolution_x()¶
- Returns:
X resolution
- Return type:
Get the X resolution or density in dots per unit.
- get_resolution_y()¶
- Returns:
Y resolution
- Return type:
Get the Y resolution or density in dots per unit.
- get_software()¶
-
Get software used to create the image.
- get_source()¶
-
Get device used to create the image.
- get_string(name)¶
-
A slightly more efficient version of
Gegl.MetadataStore.get_value
() for string values avoiding a duplication. Otherwise it behaves the sameGegl.MetadataStore.get_value
().
- get_timestamp()¶
- Returns:
GLib.DateTime
orNone
if not set. Free withGLib.DateTime.unref
() when done.- Return type:
Get time of original image creation.
- get_value(name, value)¶
- Parameters:
name (
str
) – Metadata namevalue (
GObject.Value
) – An initialisedGObject.Value
.
- Returns:
An initialised
GObject.Value
.- Return type:
value:
GObject.Value
Retrieve the metadata value. value must be initialised with a compatible type. If the value is unset or has not been previously declared value is unchanged and an error message is logged.
- has_value(name)¶
- Parameters:
name (
str
) – Metadata name- Returns:
True
if metadata is declared and contains a valid value.- Return type:
Test whether the
Gegl.MetadataStore
contains a value for the specified name.
- notify(pspec, shadow)¶
- Parameters:
pspec (
GObject.ParamSpec
) – TheGObject.ParamSpec
used to declare the variable.shadow (
bool
) – The metadata variable shadows a property.
Gegl.MetadataStore.notify
() is called by subclasses when the value of a metadata variable changes. It emits the::changed
signal with the variable name as the detail parameter. Set shadow =True
if variable is shadowed by a property so that a notify signal is emitted with the property name as the detail parameter.
- register(local_name, name, transform)¶
- Parameters:
local_name (
str
) – Metadata name known to file modulename (
str
) – Metadata nametransform (
GObject.ValueTransform
) – AGObject.ValueTransform
function orNone
- set_comment(comment)¶
- Parameters:
comment (
str
) – Comment string
Set the miscellaneous comment; conversion from GIF comment.
- set_description(description)¶
- Parameters:
description (
str
) – Description string
Set description of image.
- set_disclaimer(disclaimer)¶
- Parameters:
disclaimer (
str
) – Disclaimer string
Set the legal disclaimer.
- set_resolution_unit(unit)¶
- Parameters:
unit (
Gegl.ResolutionUnit
) – Units as aGegl.ResolutionUnit
Set the units used for the resolution (density) values.
- set_resolution_x(resolution_x)¶
- Parameters:
resolution_x (
float
) – X resolution or density
Set the X resolution or density in dots per unit.
- set_resolution_y(resolution_y)¶
- Parameters:
resolution_y (
float
) – Y resolution or density
Set the Y resolution or density in dots per unit.
- set_software(software)¶
- Parameters:
software (
str
) – Software string
Set software used to create the image.
- set_string(name, string)¶
-
A slightly more efficient version of
Gegl.MetadataStore.set_value
() for string values avoiding a duplication. Otherwise it behaves the sameGegl.MetadataStore.set_value
().
- set_timestamp(timestamp)¶
- Parameters:
timestamp (
GLib.DateTime
) – AGLib.DateTime
Set time of original image creation.
- set_value(name, value)¶
- Parameters:
name (
str
) – Metadata namevalue (
GObject.Value
) – (nullable): A validGObject.Value
orNone
Set the specified metadata value. If value is
None
the default value from the associatedGObject.ParamSpec
is used. This operation will fail if the value has not been previously declared. Achanged::name
signal is emitted when the value is set. If the value is shadowed by a property anotify::name
signal is also emitted.
- set_warning(warning)¶
- Parameters:
warning (
str
) – Warning string
Set the warning of nature of content.
- typeof_value(name)¶
- Parameters:
name (
str
) – Metadata name- Returns:
Declared
GObject.GType
of metadata value orGObject.TYPE_INVALID
.- Return type:
Get the declared type of the value in the
Gegl.MetadataStore
.
- do__declare(pspec, shadow) virtual¶
- Parameters:
pspec (
GObject.ParamSpec
) –shadow (
bool
) –
- do_has_value(name) virtual¶
- Parameters:
name (
str
) – Metadata name- Returns:
True
if metadata is declared and contains a valid value.- Return type:
Test whether the
Gegl.MetadataStore
contains a value for the specified name.
- do_register_hook(file_module_name, flags) virtual¶
- do_set_value(name, value) virtual¶
- Parameters:
name (
str
) – Metadata namevalue (
GObject.Value
) – (nullable): A validGObject.Value
orNone
Set the specified metadata value. If value is
None
the default value from the associatedGObject.ParamSpec
is used. This operation will fail if the value has not been previously declared. Achanged::name
signal is emitted when the value is set. If the value is shadowed by a property anotify::name
signal is also emitted.
Signal Details¶
- Gegl.MetadataStore.signals.changed(metadata_store, pspec)¶
- Signal Name:
changed
- Flags:
- Parameters:
metadata_store (
Gegl.MetadataStore
) – The object which received the signalpspec (
GObject.ParamSpec
) – AGObject.ParamSpec
declaring the metadata value
::changed
is emitted when a metadata value is changed. This is analogous to theGObject::notify
signal.
- Gegl.MetadataStore.signals.generate_value(metadata_store, pspec, value)¶
- Signal Name:
generate-value
- Flags:
- Parameters:
metadata_store (
Gegl.MetadataStore
) – The object which received the signalpspec (
GObject.ParamSpec
) – AGObject.ParamSpec
declaring the metadata valuevalue (
GObject.Value
) – An initialisedGObject.Value
.
- Returns:
True
if a value is generated successfully.- value:
An initialised
GObject.Value
.
- Return type:
(
bool
, value:GObject.Value
)
If a signal handler is connected to
::generate-value
a signal is emitted when the file module accesses a value using gegl_metadata_get_value(). The signal handler must generate a value of the type specified in the pspec argument. The signal handler’s return value indicates the success of the operation.If no handler is connected the mapped metadata value is accessed normally,
- Gegl.MetadataStore.signals.mapped(metadata_store, file_module, exclude_unmapped)¶
- Signal Name:
mapped
- Flags:
- Parameters:
metadata_store (
Gegl.MetadataStore
) – The object which received the signalfile_module (
str
) – The file module nameexclude_unmapped (
bool
) –True
if the file module cannot handle unmapped values
::mapped
is emitted after a file module registers a mapping and before other processing takes place. An application may respond to the signal by registering additional mappings or overriding existing values, for example it might override the TIFF ImageDescription tag to format multiple metadata values into the description.
- Gegl.MetadataStore.signals.parse_value(metadata_store, pspec, value)¶
- Signal Name:
parse-value
- Flags:
- Parameters:
metadata_store (
Gegl.MetadataStore
) – The object which received the signalpspec (
GObject.ParamSpec
) – AGObject.ParamSpec
declaring the metadata valuevalue (
GObject.Value
) – AGObject.Value
containing the value to parse.
- Returns:
True
if parsing is successful.- value:
A
GObject.Value
containing the value to parse.
- Return type:
(
bool
, value:GObject.Value
)
If a signal handler is connected to
::parse-value
a signal is emitted when the file module accesses a value using gegl_metadata_set_value(). The signal handler should parse the value supplied in theGObject.Value
and may set any number of metadata values usingGegl.MetadataStore.set_value
().If no handler is connected the mapped metadata value is set normally,
- Gegl.MetadataStore.signals.unmapped(metadata_store, file_module, local_name)¶
- Signal Name:
unmapped
- Flags:
- Parameters:
metadata_store (
Gegl.MetadataStore
) – The object which received the signalfile_module (
str
) – The file module namelocal_name (
str
) – The unmapped metadata name as used by the file module
::unmapped
is emitted when a file module tries to look up an unmapped metadata name. When the handler returns a second attempt is made to look up the metadata.
Property Details¶
- Gegl.MetadataStore.props.artist¶
- Name:
artist
- Type:
- Default Value:
- Flags:
Name of image creator.
- Gegl.MetadataStore.props.comment¶
- Name:
comment
- Type:
- Default Value:
- Flags:
Miscellaneous comment; conversion from GIF comment.
- Gegl.MetadataStore.props.copyright¶
- Name:
copyright
- Type:
- Default Value:
- Flags:
Copyright notice.
- Gegl.MetadataStore.props.description¶
- Name:
description
- Type:
- Default Value:
- Flags:
Description of image (possibly long).
- Gegl.MetadataStore.props.disclaimer¶
- Name:
disclaimer
- Type:
- Default Value:
- Flags:
Legal disclaimer.
- Gegl.MetadataStore.props.file_module_name¶
- Name:
file-module-name
- Type:
- Default Value:
- Flags:
Current file loader/saver module name. Valid only while a
Gegl.Metadata
mapping is registered. This property is mainly provided for use in signal handlers.
- Gegl.MetadataStore.props.resolution_unit¶
- Name:
resolution-unit
- Type:
- Default Value:
- Flags:
A
Gegl.ResolutionUnit
specifying units for the image resolution (density).
- Gegl.MetadataStore.props.resolution_x¶
- Name:
resolution-x
- Type:
- Default Value:
300.0
- Flags:
X resolution or density in dots per unit.
- Gegl.MetadataStore.props.resolution_y¶
- Name:
resolution-y
- Type:
- Default Value:
300.0
- Flags:
Y resolution or density in dots per unit.
- Gegl.MetadataStore.props.software¶
- Name:
software
- Type:
- Default Value:
- Flags:
Software used to create the image.
- Gegl.MetadataStore.props.source¶
- Name:
source
- Type:
- Default Value:
- Flags:
Device used to create the image.
- Gegl.MetadataStore.props.timestamp¶
- Name:
timestamp
- Type:
- Default Value:
- Flags:
Time of original image creation.
- Gegl.MetadataStore.props.title¶
- Name:
title
- Type:
- Default Value:
- Flags:
Short (one line) title or caption for image.