KoPictureWmf.h
1/* This file is part of the KDE project
2 Copyright (c) 2001 Simon Hausmann <hausmann@kde.org>
3 Copyright (C) 2002 Nicolas GOUTTE <goutte@kde.org>
4
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public
7 License as published by the Free Software Foundation; either
8 version 2 of the License, or (at your option) any later version.
9
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Library General Public License for more details.
14
15 You should have received a copy of the GNU Library General Public License
16 along with this library; see the file COPYING.LIB. If not, write to
17 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 * Boston, MA 02110-1301, USA.
19*/
20#ifndef __koPictureWmf_h__
21#define __koPictureWmf_h__
22
23#include <tqstring.h>
24#include <tqpicture.h>
25#include <koffice_export.h>
26
27class TQPainter;
28class TQSize;
29
39class KOFFICECORE_EXPORT KoPictureWmf : public KoPictureBase
40{
41public:
45 KoPictureWmf();
46
50 virtual ~KoPictureWmf();
51
52 virtual KoPictureType::Type getType(void) const;
53
54 virtual KoPictureBase* newCopy(void) const;
55
56
60 virtual bool isNull(void) const;
61
77 virtual void draw(TQPainter& painter, int x, int y, int width, int height, int sx = 0, int sy = 0, int sw = -1, int sh = -1, bool fastMode = false);
78
79 virtual bool loadData(const TQByteArray& array, const TQString& extension);
80
85 virtual bool save(TQIODevice* io) const;
86
87 virtual TQSize getOriginalSize(void) const;
88
89 virtual TQPixmap generatePixmap(const TQSize& size, bool smoothScale = false);
90
91 virtual TQString getMimeType(const TQString& extension) const;
92
93protected:
94 TQPixmap getPixmap(TQImage& image);
99 void drawTQPicture(TQPicture& clipart, TQPainter& painter,
100 int x, int y, int width, int height, int sx, int sy, int sw, int sh);
101protected:
102 TQPicture m_clipart;
103 TQByteArray m_rawData;
104 TQSize m_size;
105 TQSize m_originalSize;
106};
107
108#endif /* __koPictureWmf_h__ */
TDEAction * save(const TQObject *recvr, const char *slot, TDEActionCollection *parent, const char *name=0)