|
|
|
@ -5,7 +5,7 @@
|
|
|
|
|
*
|
|
|
|
|
* Date : 2004-08-20
|
|
|
|
|
* Description : a widget to display an image with guides
|
|
|
|
|
*
|
|
|
|
|
*
|
|
|
|
|
* Copyright (C) 2004-2008 Gilles Caulier <caulier dot gilles at gmail dot com>
|
|
|
|
|
*
|
|
|
|
|
* This program is free software; you can redistribute it
|
|
|
|
@ -13,12 +13,12 @@
|
|
|
|
|
* Public License as published by the Free Software Foundation;
|
|
|
|
|
* either version 2, or (at your option)
|
|
|
|
|
* any later version.
|
|
|
|
|
*
|
|
|
|
|
*
|
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
|
*
|
|
|
|
|
*
|
|
|
|
|
* ============================================================ */
|
|
|
|
|
|
|
|
|
|
#ifndef IMAGEGUIDEWIDGET_H
|
|
|
|
@ -47,23 +47,23 @@ class ImageGuideWidgetPriv;
|
|
|
|
|
class DIGIKAM_EXPORT ImageGuideWidget : public TQWidget
|
|
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
|
|
enum GuideToolMode
|
|
|
|
|
enum GuideToolMode
|
|
|
|
|
{
|
|
|
|
|
HVGuideMode=0,
|
|
|
|
|
PickColorMode
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
enum RenderingPreviewMode
|
|
|
|
|
enum RenderingPreviewMode
|
|
|
|
|
{
|
|
|
|
|
PreviewOriginalImage=0, // Original image only.
|
|
|
|
|
PreviewBothImagesHorz, //Qt::Horizontal with original and target duplicated.
|
|
|
|
|
PreviewBothImagesVert, //Qt::Vertical with original and target duplicated.
|
|
|
|
|
PreviewBothImagesHorzCont, //Qt::Horizontal with original and target in contiguous.
|
|
|
|
|
PreviewBothImagesVertCont, //Qt::Vertical with original and target in contiguous.
|
|
|
|
|
PreviewBothImagesHorz, // Horizontal with original and target duplicated.
|
|
|
|
|
PreviewBothImagesVert, // Vertical with original and target duplicated.
|
|
|
|
|
PreviewBothImagesHorzCont, // Horizontal with original and target in contiguous.
|
|
|
|
|
PreviewBothImagesVertCont, // Vertical with original and target in contiguous.
|
|
|
|
|
PreviewTargetImage, // Target image only.
|
|
|
|
|
PreviewToggleOnMouseOver, // Original image if mouse is over image area, else target image.
|
|
|
|
|
NoPreviewMode // Target image only without information displayed.
|
|
|
|
@ -78,14 +78,14 @@ public:
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
|
|
ImageGuideWidget(int w, int h, TQWidget *parent=0,
|
|
|
|
|
ImageGuideWidget(int w, int h, TQWidget *parent=0,
|
|
|
|
|
bool spotVisible=true, int guideMode=HVGuideMode,
|
|
|
|
|
const TQColor& guideColor=TQt::red, int guideSize=1,
|
|
|
|
|
const TQColor& guideColor=TQt::red, int guideSize=1,
|
|
|
|
|
bool blink=false, bool useImageSelection=false);
|
|
|
|
|
~ImageGuideWidget();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ImageIface* imageIface();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
TQPoint getSpotPosition();
|
|
|
|
|
DColor getSpotColor(int getColorFrom);
|
|
|
|
|
void setSpotVisible(bool spotVisible, bool blink=false);
|
|
|
|
@ -94,13 +94,13 @@ public:
|
|
|
|
|
void updatePreview();
|
|
|
|
|
|
|
|
|
|
public slots:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void slotChangeGuideColor(const TQColor &color);
|
|
|
|
|
void slotChangeGuideSize(int size);
|
|
|
|
|
void slotChangeGuideSize(int size);
|
|
|
|
|
void slotChangeRenderingPreviewMode(int mode);
|
|
|
|
|
void slotToggleUnderExposure(bool);
|
|
|
|
|
void slotToggleOverExposure(bool);
|
|
|
|
|
|
|
|
|
|
void slotToggleUnderExposure(bool);
|
|
|
|
|
void slotToggleOverExposure(bool);
|
|
|
|
|
|
|
|
|
|
signals:
|
|
|
|
|
|
|
|
|
|
void spotPositionChangedFromOriginal(const Digikam::DColor &color, const TQPoint &position);
|
|
|
|
@ -108,7 +108,7 @@ signals:
|
|
|
|
|
void signalResized();
|
|
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void paintEvent(TQPaintEvent*);
|
|
|
|
|
void resizeEvent(TQResizeEvent*);
|
|
|
|
|
void timerEvent(TQTimerEvent*);
|
|
|
|
@ -117,14 +117,14 @@ protected:
|
|
|
|
|
void mouseMoveEvent(TQMouseEvent*);
|
|
|
|
|
void enterEvent(TQEvent*);
|
|
|
|
|
void leaveEvent(TQEvent*);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
|
|
|
|
|
void updatePixmap();
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
|
|
|
|
|
ImageGuideWidgetPriv *d;
|
|
|
|
|
ImageGuideWidgetPriv *d;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
} // NameSpace Digikam
|
|
|
|
|