#ifndef IMAGEPROJECTOR_H //Here, as with BaseWidget, we must use the evil #define IMAGEPROJECTOR_H //header guards to keep moc happy. #include <QBitmap> #include <QFrame> #include <QImage> #include <QPaintEvent> #include <QResizeEvent> class ImageProjector : public QFrame { Q_OBJECT public: ImageProjector(void); ~ImageProjector(void); void setImage( QImage* i ) { image = i; }; void setInfo( QString s ) { info_string = s; }; virtual void setMask( QBitmap* m ) { mask = m; }; void setScale( double s ); void setMaskEnabled( bool e ) { maskOn = e; update(); }; void setMaskColor( QColor c ) { maskColor = c; update(); }; QColor getMaskColor() { return maskColor; }; signals: void info( QString i ); void resized( int width, int height ); protected: void enterEvent( QEvent* e ); virtual void leaveEvent( QEvent* e ); virtual void paintEvent( QPaintEvent* e ); void resizeEvent( QResizeEvent* e ); QImage* image; bool maskOn; int displayWidth; int displayHeight; double scale; QString info_string; private: QBitmap* mask; QColor maskColor; bool autoSize; }; #endif
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#5 | 5519 | Sam Stafford |
Added the paintbrush tool. Now we're getting somewhere. |
||
#4 | 5516 | Sam Stafford | The M is for Merge. | ||
#3 | 5505 | Sam Stafford | Add "diff stencil". | ||
#2 | 5502 | Sam Stafford |
Status bar with handy information, and infrastructure to allow ImageProjectors to have frames. |
||
#1 | 5501 | Sam Stafford |
Codename CALAMARI. Built with Qt 4.1.3 - needs QtCore4.dll and QtGui4.dll to run. |