author | alwin <alwin> | 2004-04-05 22:09:25 (UTC) |
---|---|---|
committer | alwin <alwin> | 2004-04-05 22:09:25 (UTC) |
commit | 266b184c615022484b988e1638be768b11c0c19b (patch) (side-by-side diff) | |
tree | b2560b3a64c49db414fa950fc3ef4670e25cd5ca /noncore/graphics/opie-eye/gui/imagescrollview.h | |
parent | 930abeed35ee6dd3aaec491f13d400f825b9d9d1 (diff) | |
download | opie-266b184c615022484b988e1638be768b11c0c19b.zip opie-266b184c615022484b988e1638be768b11c0c19b.tar.gz opie-266b184c615022484b988e1638be768b11c0c19b.tar.bz2 |
yeah - autoresize and autoscale now have toggle-buttons and the image display
respect these buttons
ToDo:
find a good way for prescaled loading of images if autoScale is on (in respect
to autorotate and so on)
Diffstat (limited to 'noncore/graphics/opie-eye/gui/imagescrollview.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/graphics/opie-eye/gui/imagescrollview.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/noncore/graphics/opie-eye/gui/imagescrollview.h b/noncore/graphics/opie-eye/gui/imagescrollview.h index 864a015..dcf54ce 100644 --- a/noncore/graphics/opie-eye/gui/imagescrollview.h +++ b/noncore/graphics/opie-eye/gui/imagescrollview.h @@ -12,24 +12,27 @@ class ImageScrollView:public QScrollView { Q_OBJECT public: ImageScrollView( QWidget* parent, const char* name = 0, WFlags fl = 0 ); ImageScrollView (const QImage&, QWidget * parent=0, const char * name=0, WFlags f=0,bool always_scale=false,bool rfit=false ); ImageScrollView (const QString&, QWidget * parent=0, const char * name=0, WFlags f=0,bool always_scale=false,bool rfit=false ); virtual ~ImageScrollView(); void setImage(const QImage&); void setImage( const QString& path ); void setDestructiveClose(); + void setAutoRotate(bool); + void setAutoScale(bool); + enum Rotation { Rotate0, Rotate90, Rotate180, Rotate270 }; signals: void sig_return(); protected: virtual void drawContents ( QPainter * p, int clipx, int clipy, int clipw, int cliph ); @@ -39,24 +42,25 @@ protected: QImage _original_data; int _mouseStartPosX,_mouseStartPosY; bool scale_to_fit; bool rotate_to_fit; bool first_resize_done; Rotation last_rot; void rescaleImage(int w, int h); void rotate_into_data(Rotation r); + void generateImage(); protected slots: virtual void viewportMouseMoveEvent(QMouseEvent* e); virtual void contentsMousePressEvent ( QMouseEvent * e); virtual void contentsMouseReleaseEvent ( QMouseEvent * e); virtual void resizeEvent(QResizeEvent * e); }; /* for testing */ class ImageDlg:public QDialog { Q_OBJECT |