FotoSHOCK
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Pages
ImageWindow.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 IMAGEWINDOW_H
20 #define IMAGEWINDOW_H
21 
22 #include <GraphNode.hpp>
23 #include "../widgets/QPreview/QPreview.h"
24 #include "../operations/FotoSHOCKOperation.h"
25 
26 #include <QtGui/QDialog>
27 #include <QtGui/QSpinBox>
28 #include <QtGui/QStatusBar>
29 #include <QtGui/QToolButton>
30 
31 class ImageWindow : public QDialog {
32 Q_OBJECT
33  public:
34  // TODO: add option to set default zoom
35  ImageWindow(FotoSHOCKcore::GraphNode* node, QWidget* parent = 0);
36  ~ImageWindow();
37  public slots:
38  void slotUpdateROI(unsigned int x, unsigned int y, unsigned int sizeX, unsigned int sizeY, const int mipmapLevel);
39  void redraw();
40  void save();
41  private:
42  QPreview* preview;
43  QStatusBar* statusBar;
44  QSpinBox* zoom;
45  QToolButton* fitWindow;
46  QToolButton* saveImage;
47 
48  void setupLayout();
49 
50  FotoSHOCKcore::GraphNode* m_ownerNode;
51  boost::shared_ptr<FotoSHOCKcore::UpdateInfo> m_ROI;
52 };
53 
54 #endif // IMAGEWINDOW_H