FotoSHOCK
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
All
Classes
Namespaces
Functions
Variables
Typedefs
Enumerations
Enumerator
Pages
src
fotoshock
operations
QGLPreview
QGLPreviewOperation.h
1
/*
2
* Copyright 2011, 2012 Lukas Jirkovsky
3
*
4
* This file is part of FotoSHOCK.
5
*
6
* FotoSHOCK is free software: you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License as published by
8
* the Free Software Foundation, version 3 of the License.
9
*
10
* FotoSHOCK is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
14
*
15
* You should have received a copy of the GNU General Public License
16
* along with FotoSHOCK. If not, see <http://www.gnu.org/licenses/>.
17
*/
18
19
#ifndef QGLPREVIEWOPERATION_H
20
#define QGLPREVIEWOPERATION_H
21
22
#include "../operations/FotoSHOCKOperation.h"
23
24
#include "ImageWindow.h"
25
26
class
QGLPreviewOperation
:
public
QObject,
public
FotoSHOCKcore::ImageOperation
,
public
IFotoSHOCKOperation
{
27
Q_OBJECT
28
public
:
29
QGLPreviewOperation
();
30
virtual
QDialog*
getUI
(QWidget* parent = 0);
31
virtual
void
runOperation
(
const
FotoSHOCKcore::Inputs
& sources,
const
FotoSHOCKcore::Outputs
& dest, vector<FotoSHOCKcore::UpdateInfo>& ROI,
const
long
stamp);
32
signals:
33
void
redraw();
34
private
:
35
ImageWindow
* window;
36
};
37
38
class
QGLPreviewOperationDescr
:
public
FotoSHOCKcore::ImageOperationDescriptor
{
39
public
:
40
virtual
const
char
*
name
() {
return
"OpenGL Preview"
;}
41
virtual
const
char
*
description
() {
return
"Image preview using OpenGL"
;}
42
virtual
FotoSHOCKcore::ImageOperationDescriptor::ImageOperationType
operationType
() {
return
ImageOperationDescriptor::TypePreview;}
43
// TODO: actually handle other types than uint8
44
virtual
FotoSHOCKcore::InputProto
inputPrototype
() {
45
FotoSHOCKcore::InputProto
proto;
46
proto.
addInput
(
FotoSHOCKcore::PixelData
(
FotoSHOCKcore::ValueTypeEnum::ANY
, 0, 0,
FotoSHOCKcore::ColorSpaceEnum::ANY
));
47
return
proto;
48
}
49
virtual
FotoSHOCKcore::OutputProto
outputPrototype
() {
50
FotoSHOCKcore::OutputProto
proto;
51
return
proto;
52
}
53
virtual
FotoSHOCKcore::ImageOperation
*
operation
() {
return
new
QGLPreviewOperation
;}
54
};
55
56
#endif // QGLPREVIEWOPERATION_H
Generated on Sat Jun 29 2013 14:25:18 for FotoSHOCK by
1.8.4