00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #include <klocale.h>
00026 #include <kdebug.h>
00027
00028
00029
00030 #include "imagecollectionshared.h"
00031
00032
00033 KIPI::ImageCollectionShared::ImageCollectionShared()
00034 : _count(1)
00035 {
00036 }
00037
00038 void KIPI::ImageCollectionShared::addRef()
00039 {
00040 _count++;
00041 }
00042
00043 void KIPI::ImageCollectionShared::removeRef()
00044 {
00045 _count--;
00046 if ( _count == 0 ) {
00047
00048 delete this;
00049 }
00050 }
00051
00052 KURL KIPI::ImageCollectionShared::path()
00053 {
00054 kdWarning(51000) << "This method should only be invoked if this imagecollection is a directory.\n"
00055 << "See KIPI::ImageCollectionShared::isDirectory()"
00056 << endl;
00057 return KURL();
00058 }
00059
00060 KURL KIPI::ImageCollectionShared::uploadPath()
00061 {
00062 kdWarning(51000) << "This method should only be invoked if the host application supports the KIPI::Features\n"
00063 "AcceptNewImages - if the host application do support that, then this function should\n"
00064 "have been overriden in the host application.\n";
00065 return KURL();
00066 }
00067
00068 KURL KIPI::ImageCollectionShared::uploadRoot()
00069 {
00070 KURL path = uploadPath();
00071 if ( path.isValid() ) {
00072 path.setPath("/");
00073 return path;
00074 }
00075 else
00076 return KURL( "file:/" );
00077 }
00078
00079 QString KIPI::ImageCollectionShared::uploadRootName()
00080 {
00081 return (i18n("Images"));
00082 }
00083
00084 bool KIPI::ImageCollectionShared::isDirectory()
00085 {
00086 return false;
00087 }
00088
00089 QString KIPI::ImageCollectionShared::comment()
00090 {
00091 kdWarning(51000) << "KIPI::ImageCollectionShared::comment should only be invoked if the host application supports\n"
00092 "the KIPI::Features AlbumsHaveComments - if the host application do support that, then this function should\n"
00093 "have been overriden in the host application.\n";
00094 return QString::null;
00095 }
00096
00097 QString KIPI::ImageCollectionShared::category()
00098 {
00099 kdWarning(51000) << "KIPI::ImageCollectionShared::category should only be invoked if the host application supports\n"
00100 "the KIPI::Features AlbumsHaveCategory - if the host application do support that, then this function should\n"
00101 "have been overriden in the host application.\n";
00102 return QString::null;
00103 }
00104
00105 QDate KIPI::ImageCollectionShared::date()
00106 {
00107 kdWarning(51000) << "KIPI::ImageCollectionShared::date should only be invoked if the host application supports\n"
00108 "the KIPI::Features AlbumsHaveCreationDate - if the host application do support that, then this function should\n"
00109 "have been overriden in the host application.\n";
00110 return QDate();
00111 }
00112
00113
00114 bool KIPI::ImageCollectionShared::operator==(ImageCollectionShared& ics) {
00115 return images()==ics.images();
00116 }