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 00079 QMap<QString,QVariant> KIPI::ImageInfo::attributes() const 00080 { 00081 return _data->attributes(); 00082 } 00083 00087 int KIPI::ImageInfo::size() const 00088 { 00089 return _data->size(); 00090 } 00091 00092 KIPI::ImageInfo::ImageInfo( ImageInfoShared* shared ) 00093 : _data( shared ) 00094 { 00095 } 00096 00097 KIPI::ImageInfo::ImageInfo( const KIPI::ImageInfo& rhs ) 00098 { 00099 _data = rhs._data; 00100 _data->addRef(); 00101 } 00102 00103 KIPI::ImageInfo::~ImageInfo() 00104 { 00105 _data->removeRef(); 00106 } 00107 00108 void KIPI::ImageInfo::setTitle( const QString& name ) 00109 { 00110 _data->setTitle( name ); 00111 } 00112 00113 void KIPI::ImageInfo::setDescription( const QString& description ) 00114 { 00115 _data->setDescription( description ); 00116 } 00117 00118 void KIPI::ImageInfo::clearAttributes() 00119 { 00120 _data->clearAttributes(); 00121 } 00122 00123 void KIPI::ImageInfo::addAttributes( const QMap<QString,QVariant>& attributes ) 00124 { 00125 _data->addAttributes( attributes ); 00126 } 00127 00134 int KIPI::ImageInfo::angle() const 00135 { 00136 return _data->angle(); 00137 } 00138 00142 void KIPI::ImageInfo::setAngle( int angle ) 00143 { 00144 _data->setAngle( angle ); 00145 } 00146 00152 bool KIPI::ImageInfo::isTimeExact() const 00153 { 00154 return _data->isTimeExact(); 00155 } 00156 00157 void KIPI::ImageInfo::setTime( const QDateTime& time, TimeSpec spec ) 00158 { 00159 _data->setTime( time, spec ); 00160 } 00161 00165 void KIPI::ImageInfo::cloneData( const ImageInfo& other ) 00166 { 00167 _data->cloneData( other._data ); 00168 } 00169
1.5.3