AlbumShaper 1.0a3
grainEditor.h
Go to the documentation of this file.
1//Added by qt3to4:
2#include <Q3Frame>
3#include <QKeyEvent>
4//==============================================
5// copyright : (C) 2003-2005 by Will Stokes
6//==============================================
7// This program is free software; you can redistribute it
8// and/or modify it under the terms of the GNU General
9// Public License as published by the Free Software
10// Foundation; either version 2 of the License, or
11// (at your option) any later version.
12//==============================================
13
14#ifndef GUI_EDITING_GRAINEDITOR_H
15#define GUI_EDITING_GRAINEDITOR_H
16
17//--------------------
18//forward declarations
22//--------------------
23class QComboBox;
24class Q3Frame;
25class ClickableLabel;
26
27#include <qdialog.h>
28#include <qimage.h>
29
30//=====================================
32//=====================================
33
34class GrainEditor : public QDialog
35{
36Q_OBJECT
37
38public:
40 GrainEditor(QString filename,
41 QWidget *parent=0, const char* name=0);
42
44
46 QImage* getModifiedImage();
47 //----------------------
48protected:
49 void keyPressEvent(QKeyEvent *e);
50 void keyReleaseEvent(QKeyEvent *e);
51 //----------------------
52private slots:
54 void selectPreviewImageType(int selection);
55
57 void resetBoundaries();
58
60 void resetRegions();
61
63 //accepts changes, otherwise calls reject
64 void applyAction();
65
67 void resetAction();
68
70 void previewResized();
71
74
75 //----------------------
76private:
77 //adjust image using current blur/sharpen setting
78 void adjustImage( QImage& image, QPoint offset );
79
80 //original image filename
81 QString fileName;
82
83 //original image size
85
86 //Edges image
87 QImage edgesImage;
88
89 //Cluster map - each pixel assigned an int for the cluster it belongs to
92
95
98
99 QComboBox* previewSelection;
101
105
108};
109//======================
110
111#endif //GUI_EDITING_GRAINEDITOR_H
A clickable label.
Interface for adjusting image grain by bluring and sharpening.
Definition grainEditor.h:35
ClickableLabel * regionsIcon
ClickableLabel * boundariesIcon
void previewResized()
handle resize preview signals
QImage * getModifiedImage()
get modified image that resulted from adjustments
PanningPreviewInterface * previewInterface
Preview image.
Definition grainEditor.h:94
int * clusterMap
Definition grainEditor.h:90
BlurSharpenSlider * boundariesSlider
Grain slider.
void resetBoundaries()
reset blur/sharpen of object boundaries
void applyAction()
check for changes to settings, if so
QSize origImageSize
Definition grainEditor.h:84
void resetRegions()
reset blur/sharpen of regions
void resetAction()
resets image grain to original state
QString fileName
Definition grainEditor.h:81
void keyPressEvent(QKeyEvent *e)
QComboBox * previewSelection
Definition grainEditor.h:99
Q3Frame * buttonsFrame
void generateAdjustedPreviewImage()
generate and set adjusted image
void adjustImage(QImage &image, QPoint offset)
void keyReleaseEvent(QKeyEvent *e)
void selectPreviewImageType(int selection)
updates preview image
GrainEditor(QString filename, QWidget *parent=0, const char *name=0)
Constructs layout.
SelectionPlacementInterface * selectionPlacementInterface
Interface for placing selection.
Definition grainEditor.h:97
BlurSharpenSlider * regionsSlider
QImage edgesImage
Definition grainEditor.h:87
A selection region placement interface.