From 1b7aaf904fa70c16eee03155bd826e921798cc22 Mon Sep 17 00:00:00 2001 From: alwin Date: Tue, 06 Apr 2004 23:54:50 +0000 Subject: fixed mousescroll handling so users kann move image with mouse/pen implement key handler for arrow keys --- (limited to 'noncore/graphics/opie-eye/gui/imagescrollview.h') diff --git a/noncore/graphics/opie-eye/gui/imagescrollview.h b/noncore/graphics/opie-eye/gui/imagescrollview.h index 44f2a64..17e2f5f 100644 --- a/noncore/graphics/opie-eye/gui/imagescrollview.h +++ b/noncore/graphics/opie-eye/gui/imagescrollview.h @@ -17,12 +17,12 @@ public: 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(); + virtual void setImage(const QImage&); + virtual void setImage( const QString& path ); + virtual void setDestructiveClose(); - void setAutoRotate(bool); - void setAutoScale(bool); + virtual void setAutoRotate(bool); + virtual void setAutoScale(bool); enum Rotation { Rotate0, @@ -48,25 +48,15 @@ protected: bool first_resize_done; Rotation last_rot; QString m_lastName; - void rescaleImage(int w, int h); + virtual void rescaleImage(int w, int h); - void rotate_into_data(Rotation r); - void generateImage(); + virtual void rotate_into_data(Rotation r); + virtual void generateImage(); protected slots: virtual void viewportMouseMoveEvent(QMouseEvent* e); virtual void contentsMousePressEvent ( QMouseEvent * e); - virtual void contentsMouseReleaseEvent ( QMouseEvent * e); virtual void resizeEvent(QResizeEvent * e); + virtual void keyPressEvent(QKeyEvent * e); }; - -/* for testing */ -class ImageDlg:public QDialog -{ - Q_OBJECT -public: - ImageDlg(const QString&,QWidget * parent=0, const char * name=0); - virtual ~ImageDlg(); -}; - #endif -- cgit v0.9.0.2