Diffstat (limited to 'libopie2/opiemm/oimagescrollview.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie2/opiemm/oimagescrollview.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/libopie2/opiemm/oimagescrollview.h b/libopie2/opiemm/oimagescrollview.h index 01a2d56..11964fd 100644 --- a/libopie2/opiemm/oimagescrollview.h +++ b/libopie2/opiemm/oimagescrollview.h @@ -76,118 +76,134 @@ public: * Be carefull - autorating real large images cost time! * @param how if true then autorotate otherwise not */ virtual void setAutoRotate(bool how); /** * set if the image should be scaled to the size of the viewport if larger(!) * * if autoscaling is set when loading a jpeg image, it will use a feature of * jpeg lib to load the image scaled to display size. If switch of later the * image will reloaded. * * @param how true - display image scaled down otherwise not */ virtual void setAutoScale(bool how); /** * set if the image should be scaled to the size of the viewport if larger(!) * and/or rotate to best fit. You avoid double repainting when you want to switch * booth values. * * if autoscaling is set when loading a jpeg image, it will use a feature of * jpeg lib to load the image scaled to display size. If switch of later the * image will reloaded. * * @param scale true - display image scaled down otherwise not * @param rotate true - the image will rotate for best fit */ virtual void setAutoScaleRotate(bool scale, bool rotate); /** * set if there should be displayed a small zoomer widget at the right bottom of * the view when the image is larger than the viewport. * * @param how true - display zoomer */ virtual void setShowZoomer(bool how); /** * return the current value of the autorotate flag. */ virtual bool AutoRotate()const; /** * return the current value of the autoscale flag. */ virtual bool AutoScale()const; /** * return the current value of the show zoomer flag. */ virtual bool ShowZoomer()const; + /** + * set a display intensity + * @param value the intensity value, will calcuated to a percent value (value/100) + * @param reload should the real image recalculated complete or just work on current display. + * @return the new intensity + */ + virtual int setIntensity(int value,bool reload=false); + /** + * return the current display intensity + */ + virtual const int Intensity()const; + + public slots: /** * Displays a new image, calculations will made immediately. * * @param aImage the image to display */ virtual void setImage(const QImage&aImage); /** * Displays a new image, calculations will made immediately. * * @param path the image to display */ virtual void setImage( const QString& path ); signals: /** * emitted when the display image size has changed. */ void imageSizeChanged( const QSize& ); /** * emitted when the size of the viewport has changed, eg. in resizeEvent of * the view. * * @see QWidget::resizeEvent */ void viewportSizeChanged( const QSize& ); protected: virtual void drawContents ( QPainter * p, int clipx, int clipy, int clipw, int cliph ); void init(); Opie::MM::OImageZoomer *_zoomer; QImage _image_data; QImage _original_data; QPixmap _pdata; + int _intensity; + bool _newImage; int _mouseStartPosX,_mouseStartPosY; QBitArray m_states; Rotation m_last_rot; QString m_lastName; virtual void rescaleImage(int w, int h); virtual void rotate_into_data(Rotation r); virtual void generateImage(); virtual void loadJpeg(bool interncall = false); bool image_fit_into(const QSize&s); void check_zoomer(); /* internal bitset manipulation */ virtual bool ImageIsJpeg()const; virtual void setImageIsJpeg(bool how); virtual bool ImageScaledLoaded()const; virtual void setImageScaledLoaded(bool how); virtual bool FirstResizeDone()const; virtual void setFirstResizeDone(bool how); + virtual void apply_gamma(int aValue); protected slots: virtual void viewportMouseMoveEvent(QMouseEvent* e); virtual void contentsMousePressEvent ( QMouseEvent * e); virtual void resizeEvent(QResizeEvent * e); virtual void keyPressEvent(QKeyEvent * e); }; } } #endif |