• Skip to content
  • Skip to link menu
KDE 4.5 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

digikam

imageiface.h

Go to the documentation of this file.
00001 /* ============================================================
00002  *
00003  * This file is a part of digiKam project
00004  * http://www.digikam.org
00005  *
00006  * Date        : 2004-02-14
00007  * Description : image data interface for image plugins
00008  *
00009  * Copyright (C) 2004-2005 by Renchi Raju <renchi@pooh.tam.uiuc.edu>
00010  * Copyright (C) 2004-2010 by Gilles Caulier <caulier dot gilles at gmail dot com>
00011  *
00012  * This program is free software; you can redistribute it
00013  * and/or modify it under the terms of the GNU General
00014  * Public License as published by the Free Software Foundation;
00015  * either version 2, or (at your option)
00016  * any later version.
00017  *
00018  * This program is distributed in the hope that it will be useful,
00019  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00020  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00021  * GNU General Public License for more details.
00022  *
00023  * ============================================================ */
00024 
00025 #ifndef IMAGEIFACE_H
00026 #define IMAGEIFACE_H
00027 
00028 // Qt includes
00029 
00030 #include <QtCore/QString>
00031 #include <QtGui/QPixmap>
00032 
00033 // KDE includes
00034 
00035 #include <klocale.h>
00036 
00037 // Local includes
00038 
00039 #include "dimg.h"
00040 #include "dcolor.h"
00041 #include "photoinfocontainer.h"
00042 #include "digikam_export.h"
00043 #include "globals.h"
00044 
00045 class QPaintDevice;
00046 
00047 namespace Digikam
00048 {
00049 
00050 class ImageIfacePriv;
00051 
00052 class DIGIKAM_EXPORT ImageIface
00053 {
00054 public:
00055 
00056     explicit ImageIface(int w=0, int h=0);
00057     ~ImageIface();
00058 
00062     void setPreviewType(bool useSelect=false);
00063 
00067     bool previewType();
00068 
00074     uchar* getPreviewImage() const;
00075 
00078     DImg getPreviewImg();
00079     
00085     uchar* getImageSelection() const;
00086 
00091     uchar* getOriginalImage() const;
00092 
00096     DImg*  getOriginalImg() const;
00097 
00106     void   putOriginalImage(const QString& caller, uchar* data, int w=-1, int h=-1);
00107 
00109     void   putOriginalIccProfile(const IccProfile& profile);
00110 
00118     void   putImageSelection(const QString& caller, uchar* data);
00119 
00128     void   putPreviewImage(uchar* data);
00129 
00131     void   putPreviewIccProfile(const IccProfile& profile);
00132 
00137     DColor getColorInfoFromOriginalImage(const QPoint& point);
00138     DColor getColorInfoFromPreviewImage(const QPoint& point);
00139     DColor getColorInfoFromTargetPreviewImage(const QPoint& point);
00140 
00142     int  originalWidth();
00143     int  originalHeight();
00144     bool originalSixteenBit();
00145     bool originalHasAlpha();
00146 
00148     IccProfile getOriginalIccProfile();
00149     QByteArray getExifFromOriginalImage();
00150     QByteArray getIptcFromOriginalImage();
00151     QByteArray getXmpFromOriginalImage();
00152 
00154     PhotoInfoContainer getPhotographInformation() const;
00155 
00157     int  previewWidth();
00158     int  previewHeight();
00159     bool previewHasAlpha();
00160     bool previewSixteenBit();
00161 
00166     uchar* setPreviewImageSize(int w, int h) const;
00167 
00169     int  selectedWidth();
00170     int  selectedHeight();
00171 
00173     int  selectedXOrg();
00174     int  selectedYOrg();
00175 
00177     void convertOriginalColorDepth(int depth);
00178 
00181     QPixmap convertToPixmap(DImg& img);
00182 
00187     void paint(QPaintDevice* device, int x, int y, int w, int h, QPainter* painter=0);
00188 
00189 private:
00190 
00191     ImageIfacePriv* const d;
00192 };
00193 
00194 } // namespace Digikam
00195 
00196 #endif /* IMAGEIFACE_H */

digikam

Skip menu "digikam"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

API Reference

Skip menu "API Reference"
  • digikam
Generated for API Reference by doxygen 1.5.9-20090814
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal