Nori

include/nori/gui.h

Go to the documentation of this file.
00001 /*
00002     This file is part of Nori, a simple educational ray tracer
00003 
00004     Copyright (c) 2012 by Wenzel Jakob and Steve Marschner.
00005 
00006     Nori is free software; you can redistribute it and/or modify
00007     it under the terms of the GNU General Public License Version 3
00008     as published by the Free Software Foundation.
00009 
00010     Nori is distributed in the hope that it will be useful,
00011     but WITHOUT ANY WARRANTY; without even the implied warranty of
00012     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00013     GNU General Public License for more details.
00014 
00015     You should have received a copy of the GNU General Public License
00016     along with this program. If not, see <http://www.gnu.org/licenses/>.
00017 */
00018 
00019 #if !defined(__GUI_H)
00020 #define __GUI_H
00021 
00022 #include <nori/block.h>
00023 #include <QtGui>
00024 
00025 class PreviewWidget;
00026 
00027 /**
00028  * \brief Implements a simple preview window for watching
00029  * renderings as they progress
00030  */
00031 class NoriWindow : public QWidget {
00032         Q_OBJECT
00033 public:
00034         NoriWindow(const nori::ImageBlock *output);
00035 
00036         inline void startRefresh() { m_refreshTimer->start(); }
00037         inline void stopRefresh() { m_refreshTimer->stop(); }
00038 
00039 private slots:
00040         void setExposure(int value);
00041         void refresh();
00042 
00043 private:
00044         PreviewWidget *m_preview;
00045         QSlider *m_exposure;
00046         QTimer *m_refreshTimer;
00047 };
00048 
00049 #endif /* __GUI_H */
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Defines