00001 /* ============================================================ 00002 * File : imageinfo.h 00003 * Author: KIPI team developers (see AUTHORS files for details) 00004 * Date : 2004-07-22 00005 * Description : 00006 * 00007 * Copyright 2004 by the KIPI team 00008 * 00009 * This program is free software; you can redistribute it 00010 * and/or modify it under the terms of the GNU Library General 00011 * Public License as published by the Free Software Foundation; 00012 * either version 2, or (at your option) 00013 * any later version. 00014 * 00015 * This program is distributed in the hope that it will be useful, 00016 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00017 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00018 * GNU Library General Public License for more details. 00019 * 00020 * ============================================================ */ 00021 00022 #include "imageinfo.h" 00023 #include "KDStream.h" 00024 #include "imageinfoshared.h" 00025 00028 QString KIPI::ImageInfo::toString( const QVariant& data ) const 00029 { 00030 QString string; 00031 KDStream stream( &string ); 00032 stream << data 00033 << flush ; 00034 return string; 00035 } 00036 00040 QString KIPI::ImageInfo::title() const 00041 { 00042 return _data->title(); 00043 } 00044 00048 KURL KIPI::ImageInfo::path() const 00049 { 00050 return _data->path(); 00051 } 00052 00056 QString KIPI::ImageInfo::description() const 00057 { 00058 return _data->description(); 00059 } 00060 00066 QDateTime KIPI::ImageInfo::time( TimeSpec spec ) const 00067 { 00068 return _data->time( spec ); 00069 } 00070 00074 QMap<QString,QVariant> KIPI::ImageInfo::attributes() const 00075 { 00076 return _data->attributes(); 00077 } 00078 00082 int KIPI::ImageInfo::size() const 00083 { 00084 return _data->size(); 00085 } 00086 00087 KIPI::ImageInfo::ImageInfo( ImageInfoShared* shared ) 00088 : _data( shared ) 00089 { 00090 } 00091 00092 KIPI::ImageInfo::ImageInfo( const KIPI::ImageInfo& rhs ) 00093 { 00094 _data = rhs._data; 00095 _data->addRef(); 00096 } 00097 00098 KIPI::ImageInfo::~ImageInfo() 00099 { 00100 _data->removeRef(); 00101 } 00102 00103 void KIPI::ImageInfo::setTitle( const QString& name ) 00104 { 00105 _data->setTitle( name ); 00106 } 00107 00108 void KIPI::ImageInfo::setDescription( const QString& description ) 00109 { 00110 _data->setDescription( description ); 00111 } 00112 00113 void KIPI::ImageInfo::clearAttributes() 00114 { 00115 _data->clearAttributes(); 00116 } 00117 00118 void KIPI::ImageInfo::addAttributes( const QMap<QString,QVariant>& attributes ) 00119 { 00120 _data->addAttributes( attributes ); 00121 } 00122 00129 int KIPI::ImageInfo::angle() const 00130 { 00131 return _data->angle(); 00132 } 00133 00137 void KIPI::ImageInfo::setAngle( int angle ) 00138 { 00139 _data->setAngle( angle ); 00140 } 00141 00147 bool KIPI::ImageInfo::isTimeExact() const 00148 { 00149 return _data->isTimeExact(); 00150 } 00151 00152 void KIPI::ImageInfo::setTime( const QDateTime& time, TimeSpec spec ) 00153 { 00154 _data->setTime( time, spec ); 00155 } 00156 00160 void KIPI::ImageInfo::cloneData( const ImageInfo& other ) 00161 { 00162 _data->cloneData( other._data ); 00163 } 00164
1.5.0