|
Git commit 0cb41977f2a938e882c6bd5da021ebcee4284f8f by Gilles Caulier.
Committed on 05/02/2012 at 12:49. Pushed by cgilles into branch 'master'. more deprecated methods for the future, including time management methods. Use universal *attributes* methods instead to be able to extend image properties exchange between plugins and kipi host without to break binary compatibility when new methods are introducing in library. CCMAIL: [hidden email] CCMAIL: [hidden email] M +25 -14 libkipi/imageinfo.h M +6 -8 libkipi/imageinfoshared.h http://commits.kde.org/libkipi/0cb41977f2a938e882c6bd5da021ebcee4284f8f diff --git a/libkipi/imageinfo.h b/libkipi/imageinfo.h index 62979f9..c188e54 100644 --- a/libkipi/imageinfo.h +++ b/libkipi/imageinfo.h @@ -55,11 +55,6 @@ namespace KIPI class ImageInfoShared; -enum TimeSpec -{ - FromInfo, - ToInfo -}; /** @class ImageInfo Holds info about an image @@ -140,33 +135,49 @@ public: KUrl path() const; QString toString( const QVariant& ) const; + // ------------------------------------------------------------------------------------------------------- + // NOTE: Deprecated Methods. Do not use it, they will be removed in the future... + // + // More universal methods based on attributes must be used instead to extend more easily data exange between + // kipi-plugins and kipi host without to break binary compatibility. + + // Deprecated data used by time() and setTime() + enum TimeSpec + { + FromInfo, + ToInfo + }; + /** Returns the time of the image. In case the host application supports time range, the spec argument specifies if it is the start or end time that should be returned. - */ - QDateTime time( TimeSpec spec = FromInfo ) const; + + Replaced by attributes(QString("date")) + */ + KDE_DEPRECATED QDateTime time( TimeSpec spec = FromInfo ) const; /** See \ref time - */ - void setTime( const QDateTime& time, TimeSpec spec = FromInfo ); + + Replaced by addAttributes(QMap < QString("date"), QDateTime(...) >) + */ + KDE_DEPRECATED void setTime( const QDateTime& time, TimeSpec spec = FromInfo ); /** In the case the application supports time ranges (like this image is from 1998-2000), this method will return true if the time is an exact specification, and thus not a range. - */ - bool isTimeExact() const; - // ------------------------------------------------------------------------------------------------------- - // NOTE: Deprecated Methods. Do not use it, they will be removed in the future... + This method is deprecated because it have never used by kipi-plugins. + */ + KDE_DEPRECATED bool isTimeExact() const; /** replaced by attributes(QString("comment")) */ KDE_DEPRECATED QString description() const; - /** replaced by addAttributes(QMap < QString("comment"), QString("...") >) + /** replaced by addAttributes(QMap < QString("comment"), QString(...) >) */ KDE_DEPRECATED void setDescription( const QString& description); diff --git a/libkipi/imageinfoshared.h b/libkipi/imageinfoshared.h index 955c331..b164d97 100644 --- a/libkipi/imageinfoshared.h +++ b/libkipi/imageinfoshared.h @@ -62,8 +62,6 @@ public: ImageInfoShared( KIPI::Interface* const interface, const KUrl& url ); virtual ~ImageInfoShared(); - QString toString(const QVariant&); - virtual QString name(); virtual void setName(const QString&); @@ -72,18 +70,18 @@ public: virtual void addAttributes(const QMap<QString, QVariant>&) = 0; virtual void delAttributes(const QStringList& ) = 0; - virtual int size(); - virtual KUrl path(); - virtual void cloneData(ImageInfoShared* const other); - virtual QDateTime time(KIPI::TimeSpec spec); - virtual void setTime(const QDateTime& time, TimeSpec spec = FromInfo); - virtual bool isTimeExact(); + virtual int size(); + virtual KUrl path(); // --------------------------------------------------------------------------------------- // Deprecated methods. Do not use it. See Imageinfo for details. + KDE_DEPRECATED virtual QDateTime time(KIPI::TimeSpec spec); + KDE_DEPRECATED virtual void setTime(const QDateTime& time, TimeSpec spec = FromInfo); + KDE_DEPRECATED virtual bool isTimeExact(); + KDE_DEPRECATED virtual QString description(); KDE_DEPRECATED virtual void setDescription(const QString&); _______________________________________________ Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel |
| Free forum by Nabble | Edit this page |
