F:/KPlato/koffice/libs/kofficecore/KoPictureWmf.h

Aller à la documentation de ce fichier.
00001 /* This file is part of the KDE project
00002    Copyright (c) 2001 Simon Hausmann <hausmann@kde.org>
00003    Copyright (C) 2002 Nicolas GOUTTE <goutte@kde.org>
00004 
00005    This library is free software; you can redistribute it and/or
00006    modify it under the terms of the GNU Library General Public
00007    License as published by the Free Software Foundation; either
00008    version 2 of the License, or (at your option) any later version.
00009 
00010    This library is distributed in the hope that it will be useful,
00011    but WITHOUT ANY WARRANTY; without even the implied warranty of
00012    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013    Library General Public License for more details.
00014 
00015    You should have received a copy of the GNU Library General Public License
00016    along with this library; see the file COPYING.LIB.  If not, write to
00017    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00018  * Boston, MA 02110-1301, USA.
00019 */
00020 #ifndef __koPictureWmf_h__
00021 #define __koPictureWmf_h__
00022 
00023 #include <QString>
00024 #include <qpicture.h>
00025 //Added by qt3to4:
00026 #include <QPixmap>
00027 #include <koffice_export.h>
00028 
00029 class QPainter;
00030 class QSize;
00031 
00041 class KOFFICECORE_EXPORT KoPictureWmf : public KoPictureBase
00042 {
00043 public:
00047     KoPictureWmf();
00048 
00052     virtual ~KoPictureWmf();
00053 
00054     virtual KoPictureType::Type getType(void) const;
00055 
00056     virtual KoPictureBase* newCopy(void) const;
00057 
00058 
00062     virtual bool isNull(void) const;
00063 
00079     virtual void draw(QPainter& painter, int x, int y, int width, int height, int sx = 0, int sy = 0, int sw = -1, int sh = -1, bool fastMode = false);
00080 
00081     virtual bool loadData(const QByteArray& array, const QString& extension);
00082 
00087     virtual bool save(QIODevice* io) const;
00088 
00089     virtual QSize getOriginalSize(void) const;
00090 
00091     virtual QPixmap generatePixmap(const QSize& size, bool smoothScale = false);
00092 
00093     virtual QString getMimeType(const QString& extension) const;
00094 
00095 protected:
00096     QPixmap getPixmap(QImage& image);
00101     void drawQPicture(QPicture& clipart, QPainter& painter,
00102         int x, int y, int width, int height, int sx, int sy, int sw, int sh);
00103 protected:
00104     QPicture m_clipart;
00105     QByteArray m_rawData;
00106     QSize m_size;
00107     QSize m_originalSize;
00108 };
00109 
00110 #endif /* __koPictureWmf_h__ */

Généré le Wed Nov 22 23:41:03 2006 pour KPlato par  doxygen 1.5.1-p1