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