• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdegraphics API Reference
  • KDE Home
  • Contact Us
 

libs/libkipi/libkipi

  • sources
  • kde-4.14
  • kdegraphics
  • libs
  • libkipi
  • libkipi
imagecollectionshared.cpp
Go to the documentation of this file.
1 
32 #include "imagecollectionshared.h"
33 
34 // KDE Includes
35 
36 #include <kdebug.h>
37 
38 // Local includes
39 
40 #include "imagecollection.h"
41 
42 // Macros
43 
44 #define PrintWarningMessageFeature(feature) \
45  kWarning() << "This should only be invoked if the host application supports " \
46  "KIPI::Features (" << feature << "). If host application do " \
47  "support that, then this function should have been overridden " \
48  "in the KIPI host interface."
49 
50 namespace KIPI
51 {
52 
53 ImageCollectionShared::ImageCollectionShared()
54  : m_count(1)
55 {
56 }
57 
58 ImageCollectionShared::~ImageCollectionShared()
59 {
60 }
61 
62 void ImageCollectionShared::addRef()
63 {
64  m_count++;
65 }
66 
67 void ImageCollectionShared::removeRef()
68 {
69  m_count--;
70 
71  if ( m_count == 0 )
72  {
73  // kDebug() << "Deleting!" << endl;
74  delete this;
75  }
76 }
77 
78 KUrl ImageCollectionShared::path()
79 {
80  kWarning() << "This method should only be invoked if this imagecollection is a directory. "
81  << "See KIPI::ImageCollectionShared::isDirectory()";
82  return KUrl();
83 }
84 
85 KUrl ImageCollectionShared::uploadPath()
86 {
87  PrintWarningMessageFeature("AcceptNewImages");
88  return KUrl();
89 }
90 
91 KUrl ImageCollectionShared::uploadRoot()
92 {
93  KUrl path = uploadPath();
94 
95  if ( path.isValid() )
96  {
97  path.setPath("/");
98  return path;
99  }
100  else
101  {
102  return KUrl( "file:/" );
103  }
104 }
105 
106 QString ImageCollectionShared::uploadRootName()
107 {
108  return (QString("Images")); // No i18n here. THis must be done on KIPI host interface.
109 }
110 
111 bool ImageCollectionShared::isDirectory()
112 {
113  return false;
114 }
115 
116 QString ImageCollectionShared::comment()
117 {
118  PrintWarningMessageFeature("AlbumsHaveComments");
119  return QString();
120 }
121 
122 QString ImageCollectionShared::category()
123 {
124  PrintWarningMessageFeature("AlbumsHaveCategory");
125  return QString();
126 }
127 
128 QDate ImageCollectionShared::date()
129 {
130  PrintWarningMessageFeature("AlbumsHaveCreationDate");
131  return QDate();
132 }
133 
134 bool ImageCollectionShared::operator==(ImageCollectionShared& ics)
135 {
136  return images() == ics.images();
137 }
138 
139 } // namespace KIPI
KIPI::ImageCollectionShared::path
virtual KUrl path()
Definition: imagecollectionshared.cpp:78
KIPI::ImageCollectionShared::ImageCollectionShared
ImageCollectionShared()
Definition: imagecollectionshared.cpp:53
imagecollectionshared.h
===========================================================This file is a part of digiKam project htt...
KIPI::ImageCollectionShared::images
virtual KUrl::List images()=0
These methods must be re-implemented in your KIPI host application to manage collection attributes wi...
PrintWarningMessageFeature
#define PrintWarningMessageFeature(feature)
Definition: imagecollectionshared.cpp:44
KIPI::ImageCollectionShared::~ImageCollectionShared
virtual ~ImageCollectionShared()
Definition: imagecollectionshared.cpp:58
KIPI::ImageCollectionShared::operator==
virtual bool operator==(ImageCollectionShared &)
Definition: imagecollectionshared.cpp:134
KIPI::ImageCollectionShared::uploadRootName
virtual QString uploadRootName()
Definition: imagecollectionshared.cpp:106
KIPI::ImageCollectionShared::category
virtual QString category()
Definition: imagecollectionshared.cpp:122
KIPI::ImageCollectionShared::uploadPath
virtual KUrl uploadPath()
Definition: imagecollectionshared.cpp:85
QDate
QString
KIPI::ImageCollectionShared::comment
virtual QString comment()
Definition: imagecollectionshared.cpp:116
KIPI::ImageCollectionShared::date
virtual QDate date()
Definition: imagecollectionshared.cpp:128
imagecollection.h
===========================================================This file is a part of digiKam project htt...
KIPI::ImageCollectionShared
See ImageCollection documentation for details.
Definition: imagecollectionshared.h:53
KIPI::ImageCollectionShared::uploadRoot
virtual KUrl uploadRoot()
Definition: imagecollectionshared.cpp:91
KIPI::ImageCollectionShared::isDirectory
virtual bool isDirectory()
Definition: imagecollectionshared.cpp:111
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:19:43 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

libs/libkipi/libkipi

Skip menu "libs/libkipi/libkipi"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members

kdegraphics API Reference

Skip menu "kdegraphics API Reference"
  •     libkdcraw
  •     libkexiv2
  •     libkipi
  •     libksane
  • okular

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal