diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-02-15 18:34:54 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-02-15 18:34:54 +0000 |
commit | 8805e6b17b1460f3316ccb28629e8ad78e4b9c2c (patch) | |
tree | dc9b702962ecf0060cc473397b9f80268c2456c9 /kbarcode/imageitem.h | |
download | kbarcode-8805e6b17b1460f3316ccb28629e8ad78e4b9c2c.tar.gz kbarcode-8805e6b17b1460f3316ccb28629e8ad78e4b9c2c.zip |
Added abandoned KDE3 version of kbarcode
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kbarcode@1090667 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kbarcode/imageitem.h')
-rw-r--r-- | kbarcode/imageitem.h | 79 |
1 files changed, 79 insertions, 0 deletions
diff --git a/kbarcode/imageitem.h b/kbarcode/imageitem.h new file mode 100644 index 0000000..d3f4194 --- /dev/null +++ b/kbarcode/imageitem.h @@ -0,0 +1,79 @@ +/*************************************************************************** + imageitem.h - description + ------------------- + begin : Do Sep 9 2004 + copyright : (C) 2004 by Dominik Seichter + email : domseichter@web.de + ***************************************************************************/ + +/*************************************************************************** + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + ***************************************************************************/ +#ifndef IMAGEITEM_H +#define IMAGEITEM_H + +#include "documentitem.h" + +#include <qpixmap.h> + +enum EImageScaling { eImage_Original = 0, eImage_Scaled, eImage_Zoomed }; + +/** +@author Dominik Seichter +*/ +class ImageItem : public DocumentItem +{ + public: + ImageItem(); + ~ImageItem(); + + void setExpression( const QString & ex ); + inline QString expression() const { return m_expression; }; + + void setPixmap( const QPixmap & pix ); + const QPixmap & pixmap(); + + void setScaling( EImageScaling scaling ); + EImageScaling scaling() const; + + void setRotation( double rot ); + double rotation() const; + + void setMirrorHorizontal( bool b ); + bool mirrorHorizontal() const; + + void setMirrorVertical( bool b ); + bool mirrorVertical() const; + + virtual int rtti() const { return eRtti_Image;} + virtual void draw(QPainter* painter); + virtual void drawZpl( QTextStream* stream ); + virtual void drawIpl( QTextStream* stream, IPLUtils* utils ); + virtual void drawEPcl( QTextStream* stream ); + virtual void loadXML(QDomElement* element); + virtual void saveXML(QDomElement* element); + + void updateImage(); + void createImage(); + + private: + void init(); + + private: + QString m_expression; + QPixmap m_pixmap; + QPixmap m_tmp; + + double m_rotation; + bool m_mirror_v; + bool m_mirror_h; + + EImageScaling m_scaling; +}; + +#endif |