imagecollectionshared.cpp

Go to the documentation of this file.
00001 /* ============================================================
00002  * File   : imagecollectionshared.cpp
00003  * Authors: KIPI team developers (see AUTHORS files for details)
00004  *
00005  * Date   : 2004-02
00006  * Description :
00007  *
00008  * Copyright 2004 by the KIPI team
00009  *
00010  * This program is free software; you can redistribute it
00011  * and/or modify it under the terms of the GNU Library General
00012  * Public License as published by the Free Software Foundation;
00013  * either version 2, or (at your option)
00014  * any later version.
00015  *
00016  * This program is distributed in the hope that it will be useful,
00017  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00018  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00019  * GNU Library General Public License for more details.
00020  *
00021  * ============================================================ */
00022 
00023 // KDE Includes.
00024 
00025 #include <klocale.h>
00026 #include <kdebug.h>
00027 
00028 // Local Includes.
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         // qDebug("Deleting!");
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 }

Generated on Tue Sep 25 22:34:22 2007 for libKipi by  doxygen 1.5.3