FotoSHOCK
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Pages
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 
27 Q_OBJECT
28  public:
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 
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
47  return proto;
48  }
51  return proto;
52  }
54 };
55 
56 #endif // QGLPREVIEWOPERATION_H