• 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
imageinfoshared.cpp
Go to the documentation of this file.
1 
34 #include "imageinfoshared.h"
35 
36 // Qt includes
37 
38 #include <QFileInfo>
39 
40 // KDE includes
41 
42 #include <kdebug.h>
43 
44 // Local includes
45 
46 #include "interface.h"
47 
48 namespace KIPI
49 {
50 
51 class ImageInfoShared::Private
52 {
53 public:
54 
55  Private()
56  {
57  count = 1;
58  interface = 0;
59  }
60 
61  int count;
62  Interface* interface;
63 };
64 
65 ImageInfoShared::ImageInfoShared()
66  : d(new Private)
67 {
68 }
69 
70 ImageInfoShared::ImageInfoShared(Interface* const interface, const KUrl& url)
71  : d(new Private)
72 {
73  d->interface = interface;
74  _url = url;
75 }
76 
77 ImageInfoShared::~ImageInfoShared()
78 {
79  delete d;
80 }
81 
82 void ImageInfoShared::addRef()
83 {
84  d->count++;
85 }
86 
87 void ImageInfoShared::removeRef()
88 {
89  d->count--;
90  if ( d->count == 0 )
91  {
92  delete this;
93  }
94 }
95 
96 KUrl ImageInfoShared::url() const
97 {
98  return _url;
99 }
100 
101 void ImageInfoShared::cloneData(ImageInfoShared* const other)
102 {
103  clearAttributes();
104  addAttributes(other->attributes());
105 }
106 
107 bool ImageInfoShared::reserveForAction(QObject* const reservingObject, const QString& descriptionOfAction) const
108 {
109  return d->interface->reserveForAction(_url, reservingObject, descriptionOfAction);
110 }
111 
112 void ImageInfoShared::clearReservation(QObject* const reservingObject)
113 {
114  return d->interface->clearReservation(_url, reservingObject);
115 }
116 
117 bool ImageInfoShared::itemIsReserved(QString* const descriptionOfAction) const
118 {
119  return d->interface->itemIsReserved(_url, descriptionOfAction);
120 }
121 
122 FileReadWriteLock* ImageInfoShared::createReadWriteLock() const
123 {
124  return d->interface->createReadWriteLock(_url);
125 }
126 
127 } // namespace KIPI
KIPI::ImageInfoShared::addAttributes
virtual void addAttributes(const QMap< QString, QVariant > &)=0
KIPI::FileReadWriteLock
Definition: interface.h:122
KIPI::Interface
Definition: interface.h:158
imageinfoshared.h
===========================================================This file is a part of digiKam project htt...
KIPI::ImageInfoShared::itemIsReserved
bool itemIsReserved(QString *const descriptionOfAction=0) const
Definition: imageinfoshared.cpp:117
KIPI::ImageInfoShared::attributes
virtual QMap< QString, QVariant > attributes()=0
These methods must be re-implemented in your KIPI host application to manage image attributes with pl...
KIPI::ImageInfoShared::reserveForAction
bool reserveForAction(QObject *const reservingObject, const QString &descriptionOfAction) const
Convenience methods calling the respective methods in the interface for this item.
Definition: imageinfoshared.cpp:107
interface.h
===========================================================This file is a part of digiKam project htt...
QObject
KIPI::ImageInfoShared::url
KUrl url() const
Definition: imageinfoshared.cpp:96
QString
KIPI::ImageInfoShared::cloneData
virtual void cloneData(ImageInfoShared *const other)
Definition: imageinfoshared.cpp:101
KIPI::ImageInfoShared
See ImageInfo documentation for details.
Definition: imageinfoshared.h:62
KIPI::ImageInfoShared::_url
KUrl _url
Definition: imageinfoshared.h:90
KIPI::ImageInfoShared::clearAttributes
virtual void clearAttributes()=0
KIPI::ImageInfoShared::clearReservation
void clearReservation(QObject *const reservingObject)
Definition: imageinfoshared.cpp:112
KIPI::ImageInfoShared::~ImageInfoShared
virtual ~ImageInfoShared()
Definition: imageinfoshared.cpp:77
KIPI::ImageInfoShared::createReadWriteLock
FileReadWriteLock * createReadWriteLock() const
Definition: imageinfoshared.cpp:122
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