| Line | |
|---|
| 1 | /*************************************************************************** |
|---|
| 2 | QImageWidget.h - description |
|---|
| 3 | ------------------- |
|---|
| 4 | begin : Fri Nov 17 2000 |
|---|
| 5 | copyright : (C) 2000 by Rainer Lehrig |
|---|
| 6 | email : lehrig@t-online.de |
|---|
| 7 | ***************************************************************************/ |
|---|
| 8 | |
|---|
| 9 | /*************************************************************************** |
|---|
| 10 | * * |
|---|
| 11 | * This program is free software; you can redistribute it and/or modify * |
|---|
| 12 | * it under the terms of the GNU General Public License as published by * |
|---|
| 13 | * the Free Software Foundation; either version 2 of the License, or * |
|---|
| 14 | * (at your option) any later version. * |
|---|
| 15 | * * |
|---|
| 16 | ***************************************************************************/ |
|---|
| 17 | #ifndef _QIMAGE_WIDGET_H_ |
|---|
| 18 | #define _QIMAGE_WIDGET_H_ |
|---|
| 19 | |
|---|
| 20 | #include <QtGui/QWidget> |
|---|
| 21 | #include <QtGui/QImage> |
|---|
| 22 | |
|---|
| 23 | class QImageWidget : public QWidget |
|---|
| 24 | { |
|---|
| 25 | Q_OBJECT |
|---|
| 26 | public: |
|---|
| 27 | QImageWidget(QWidget *parent=0); |
|---|
| 28 | ~QImageWidget(); |
|---|
| 29 | virtual void setGeometry(int nx, int ny, int nw, int nh); |
|---|
| 30 | void setImage(const QImage& newimage); |
|---|
| 31 | |
|---|
| 32 | protected: |
|---|
| 33 | virtual void paintEvent( QPaintEvent * ); |
|---|
| 34 | |
|---|
| 35 | private: |
|---|
| 36 | int conversion_flags; |
|---|
| 37 | int x,y,w,h; |
|---|
| 38 | QImage image; // the loaded image |
|---|
| 39 | }; |
|---|
| 40 | |
|---|
| 41 | |
|---|
| 42 | #endif |
|---|
Note: See
TracBrowser
for help on using the repository browser.