libKipi
imagecollectionshared.cpp
Go to the documentation of this file.
1/* ============================================================
2 *
3 * This file is a part of kipi-plugins project
4 * http://www.kipi-plugins.org
5 *
6 * Date : 2004-02-01
7 * Description : image collection shared
8 *
9 * Copyright (C) 2004-2007 by Gilles Caulier <caulier dot gilles at gmail dot com>
10 * Copyright (C) 2004-2005 by Renchi Raju <renchi.raju at kdemail.net>
11 * Copyright (C) 2004-2005 by Jesper K. Pedersen <blackie at kde.org>
12 * Copyright (C) 2004-2005 by Aurelien Gateau <aurelien dot gateau at free.fr>
13 *
14 * This program is free software; you can redistribute it
15 * and/or modify it under the terms of the GNU General
16 * Public License as published by the Free Software Foundation;
17 * either version 2, or (at your option) any later version.
18 *
19 * This program is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU General Public License for more details.
23 *
24 * ============================================================ */
25
26// KDE Includes.
27
28#include <klocale.h>
29#include <kdebug.h>
30
31// Local Includes.
32
34
35
40
41void KIPI::ImageCollectionShared::addRef()
42{
43 _count++;
44}
45
46void KIPI::ImageCollectionShared::removeRef()
47{
48 _count--;
49 if ( _count == 0 )
50 {
51 // qDebug("Deleting!");
52 delete this;
53 }
54}
55
57{
58 kdWarning(51000) << "This method should only be invoked if this imagecollection is a directory.\n"
59 << "See KIPI::ImageCollectionShared::isDirectory()"
60 << endl;
61 return KURL();
62}
63
65{
66 kdWarning(51000) << "This method should only be invoked if the host application supports the KIPI::Features\n"
67 "AcceptNewImages - if the host application do support that, then this function should\n"
68 "have been overridden in the host application.\n" << endl;
69 return KURL();
70}
71
73{
74 KURL path = uploadPath();
75 if ( path.isValid() )
76 {
77 path.setPath("/");
78 return path;
79 }
80 else
81 return KURL( "file:/" );
82}
83
85{
86 return (i18n("Images"));
87}
88
90{
91 return false;
92}
93
95{
96 kdWarning(51000) << "KIPI::ImageCollectionShared::comment should only be invoked if the host application supports\n"
97 "the KIPI::Features AlbumsHaveComments - if the host application do support that, then this function should\n"
98 "have been overridden in the host application.\n" << endl;
99 return QString::null;
100}
101
103{
104 kdWarning(51000) << "KIPI::ImageCollectionShared::category should only be invoked if the host application supports\n"
105 "the KIPI::Features AlbumsHaveCategory - if the host application do support that, then this function should\n"
106 "have been overridden in the host application.\n" << endl;
107 return QString::null;
108}
109
111{
112 kdWarning(51000) << "KIPI::ImageCollectionShared::date should only be invoked if the host application supports\n"
113 "the KIPI::Features AlbumsHaveCreationDate - if the host application do support that, then this function should\n"
114 "have been overridden in the host application.\n" << endl;
115 return QDate();
116}
117
119{
120 return images()==ics.images();
121}
KDStream & endl(KDStream &stream)
Definition KDStream.cpp:264
Definition imagecollectionshared.h:46
virtual KURL uploadRoot()
Definition imagecollectionshared.cpp:72
virtual bool isDirectory()
Definition imagecollectionshared.cpp:89
virtual QString comment()
Definition imagecollectionshared.cpp:94
virtual QString category()
Definition imagecollectionshared.cpp:102
ImageCollectionShared()
Definition imagecollectionshared.cpp:36
virtual KURL uploadPath()
Definition imagecollectionshared.cpp:64
virtual QDate date()
Definition imagecollectionshared.cpp:110
virtual KURL path()
Definition imagecollectionshared.cpp:56
virtual bool operator==(ImageCollectionShared &)
Definition imagecollectionshared.cpp:118
virtual KURL::List images()=0
virtual QString uploadRootName()
Definition imagecollectionshared.cpp:84