1
/* ============================================================
2
* File : imageguidewidget.h
3
* Author: Gilles Caulier <caulier dot gilles at free.fr>
7
* Copyright 2004-2005 Gilles Caulier
9
* This program is free software; you can redistribute it
10
* and/or modify it under the terms of the GNU General
11
* Public License as published by the Free Software Foundation;
12
* either version 2, or (at your option)
15
* This program is distributed in the hope that it will be useful,
16
* but WITHOUT ANY WARRANTY; without even the implied warranty of
17
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18
* GNU General Public License for more details.
20
* ============================================================ */
22
#ifndef IMAGEGUIDEWIDGET_H
23
#define IMAGEGUIDEWIDGET_H
34
#include "digikam_export.h"
42
class DIGIKAM_EXPORT ImageGuideWidget : public QWidget
56
ImageGuideWidget(int w, int h, QWidget *parent=0,
57
bool spotVisible=true, int guideMode=HVGuideMode,
58
QColor guideColor=Qt::red, int guideSize=1);
61
Digikam::ImageIface* imageIface();
63
QPoint getSpotPosition(void);
64
QColor getSpotColor(void);
65
void setSpotVisible(bool v);
66
void resetSpotPosition(void);
67
void updatePreview( void );
71
void slotChangeGuideColor(const QColor &color);
72
void slotChangeGuideSize(int size);
76
void spotPositionChanged( const QColor &color, bool release, const QPoint &position );
77
void signalResized(void);
81
void paintEvent( QPaintEvent *e );
82
void resizeEvent( QResizeEvent * e );
83
void timerEvent(QTimerEvent * e);
84
void mousePressEvent( QMouseEvent * e );
85
void mouseReleaseEvent( QMouseEvent * e );
86
void mouseMoveEvent( QMouseEvent * e );
102
// Current spot position in preview coordinates.
111
Digikam::ImageIface *m_iface;
115
void updatePixmap( void );
118
} // NameSpace Digikam
120
#endif /* IMAGEGUIDEWIDGET_H */