Home · All Namespaces · All Classes · Grouped Classes · Modules · Functions codeless banner

QExifValue Class Reference
[QtBaseModule]

The QExifValue class represents data types found in EXIF image headers. More...

    #include <QExifValue>

This class is under development and is subject to change.

Public Types

Public Functions


Detailed Description

The QExifValue class represents data types found in EXIF image headers.

Tag values in EXIF headers are stored as arrays of a limited number of data types. QExifValue encapsulates a union of these types and provides conversions to and from appropriate Qt types.

String encoding

Most tags with string values in EXIF headers are ASCII encoded and have the Ascii value type, but some tags allow other encodings. In this case the value type is Undefined and the encoding of the text is given by the encoding function().

Date-time values

Date-time values in EXIF headers are stored in ASCII encoded strings of the form yyyy:MM:dd HH:mm:ss. Constructing a QExifValue from a QDateTime will perform this conversion and likewise an appropriately formed QExifValue can be converted to a QDateTime using the toDateTime() function.

See also QExifImageHeader.


Member Type Documentation

enum QExifValue::TextEncoding

Enumerates the encodings of text strings in EXIF values of Undefined type.

ConstantValueDescription
QExifValue::NoEncoding0An ASCII string of Ascii type.
QExifValue::AsciiEncoding1An ASCII string of Undefined type.
QExifValue::JisEncoding2A JIS X208-1990 string of Undefined type.
QExifValue::UnicodeEncoding3A Unicode string of Undefined type.
QExifValue::UndefinedEncoding4An unspecified string encoding of Undefined type. Assumed to be the local 8-bit encoding.

enum QExifValue::Type

Enumerates the possible types of EXIF values.

ConstantValueDescription
QExifValue::Byte1An unsigned 8 bit integer.
QExifValue::Ascii2A null terminated ascii string.
QExifValue::Short3An unsigned 16 bit integer.
QExifValue::Long4An unsigned 32 bit integer.
QExifValue::Rational5Two unsigned 32 bit integers, representing a the numerator and denominator of an unsigned rational number.
QExifValue::Undefined7An array of 8 bit integers.
QExifValue::SignedLong9A signed 32 bit integer.
QExifValue::SignedRational10Two signed 32 bit integers representing the numerator and denominator of a signed rational number.


Member Function Documentation

QExifValue::QExifValue ()

Constructs a null QExifValue.

QExifValue::QExifValue ( quint8 value )

Constructs a QExifValue with a value of type Byte.

QExifValue::QExifValue ( const QVector<quint8> & values )

Constructs a QExifValue with an array of values of type Byte.

QExifValue::QExifValue ( const QString & value, TextEncoding encoding = NoEncoding )

Constructs a QExifValue with a value of type Ascii or Undefined.

If the encoding is NoEncoding the value will be of type Ascii, otherwise it will be Undefined and the string encoded using the given encoding.

QExifValue::QExifValue ( quint16 value )

Constructs a QExifValue with a value of type Short.

QExifValue::QExifValue ( const QVector<quint16> & values )

Constructs a QExifValue with an array of values of type Short.

QExifValue::QExifValue ( quint32 value )

Constructs a QExifValue with a value of type Long.

QExifValue::QExifValue ( const QVector<quint32> & values )

Constructs a QExifValue with an array of values of type Long.

QExifValue::QExifValue ( const QExifURational & value )

Constructs a QExifValue with a value of type Rational.

QExifValue::QExifValue ( const QVector<QExifURational> & values )

Constructs a QExifValue with an array of values of type Rational.

QExifValue::QExifValue ( const QByteArray & value )

Constructs a QExifValue with a value of type Undefined.

QExifValue::QExifValue ( qint32 value )

Constructs a QExifValue with a value of type SignedLong.

QExifValue::QExifValue ( const QVector<qint32> & values )

Constructs a QExifValue with an array of values of type SignedLong.

QExifValue::QExifValue ( const QExifSRational & value )

Constructs a QExifValue with a value of type SignedRational.

QExifValue::QExifValue ( const QVector<QExifSRational> & values )

Constructs a QExifValue with an array of values of type SignedRational.

QExifValue::QExifValue ( const QDateTime & value )

Constructs a QExifValue of type Ascii with an ascii string formatted from a date-time value.

Date-times are stored as strings in the format yyyy:MM:dd HH:mm:ss.

QExifValue::QExifValue ( const QExifValue & other )

Constructs a copy of the QExifValue other.

QExifValue::~QExifValue ()

Destroys a QExifValue.

int QExifValue::count () const

Returns the number of elements in a QExifValue. For ascii strings this is the length of the string including the terminating null.

TextEncoding QExifValue::encoding () const

Returns the encoding of strings stored in Undefined values.

bool QExifValue::isNull () const

Returns true if a QExifValue has a null value and false otherwise.

quint8 QExifValue::toByte () const

Returns the value of a single element QExifValue of type Byte.

QByteArray QExifValue::toByteArray () const

Returns the value of a QExifValue of type Undefined.

QVector<quint8> QExifValue::toByteVector () const

Returns the value of a multiple element QExifValue of type Byte.

QDateTime QExifValue::toDateTime () const

Returns the value of QExifValue storing a date-time.

Date-times are stored as ascii strings in the format yyyy:MM:dd HH:mm:ss.

quint32 QExifValue::toLong () const

Returns the value of a single element QExifValue of type Byte, Short, Long, or SignedLong.

QVector<quint32> QExifValue::toLongVector () const

Returns the value of a multiple element QExifValue of type Long.

QExifURational QExifValue::toRational () const

Returns the value of a multiple element QExifValue of type Rational.

QVector<QExifURational> QExifValue::toRationalVector () const

Returns the value of a multiple element QExifValue of type Rational.

quint16 QExifValue::toShort () const

Returns the value of a single element QExifValue of type Byte or Short.

QVector<quint16> QExifValue::toShortVector () const

Returns the value of a single element QExifValue of type Short.

qint32 QExifValue::toSignedLong () const

Returns the value of a single element QExifValue of type Byte, Short, Long, or SignedLong.

QVector<qint32> QExifValue::toSignedLongVector () const

Returns the value of a multiple element QExifValue of type SignedLong.

QExifSRational QExifValue::toSignedRational () const

Returns the value of a single element QExifValue of type SignedRational.

QVector<QExifSRational> QExifValue::toSignedRationalVector () const

Returns the value of a multiple element QExifValue of type SignedRational.

QString QExifValue::toString () const

Returns the value of a QExifValue of type Ascii.

int QExifValue::type () const

Returns the type of a QExifValue.

QExifValue & QExifValue::operator= ( const QExifValue & other )

Assigns the value of other to a QExifValue.

bool QExifValue::operator== ( const QExifValue & other ) const

Compares a QExifValue to other. Returns true if they are the same value and false otherwise.


Copyright © 2009 Nokia Trademarks
Qt Extended 4.4.3