rtVTK  0.6.0
RenderWindow.h
00001 
00002 /******************************************************************************
00003  * Copyright (c) 2012, Grove City College
00004  * All rights reserved.
00005  *
00006  * Redistribution and use in source and binary forms, with or without
00007  * modification, are permitted provided that the following conditions are
00008  * met:
00009  * 
00010  *  * Redistributions of source code must retain the above copyright
00011  *    notice, this list of conditions and the following disclaimer.
00012  *
00013  *  * Redistributions in binary form must reproduce the above copyright
00014  *    notice, this list of conditions and the following disclaimer in
00015  *    the documentation and/or other materials provided with the
00016  *    distribution.
00017  *
00018  *  * Neither the name of Grove City College nor the names of its
00019  *    contributors may be used to endorse or promote products derived
00020  *    from this software without specific prior written permission.
00021  *
00022  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
00023  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
00024  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
00025  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
00026  * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
00027  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
00028  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
00029  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
00030  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
00031  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00032  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00033  *
00034  */
00035 
00036 
00042 #ifndef StandAlone_RenderWindow_h
00043 #define StandAlone_RenderWindow_h
00044 
00045 #include <string>
00046 using std::string;
00047 
00048 #include <QMainWindow>
00049 
00050 // Forward Declarations
00051 class QEvent;
00052 class QLabel;
00053 class QResizeEvent;
00054 class QShortcut;
00055 
00056 namespace Ui
00057 {
00058 
00059   class RenderWindow;
00060 
00061 } // namespace Ui
00062 
00063 namespace rtVTK
00064 {
00065 
00066   // Forward Declarations
00067   class glWidget;
00068   class MainWindow;
00069 
00071   class RenderWindow : public QMainWindow
00072   {
00073     Q_OBJECT
00074 
00075   public:
00076 
00077     static const uint baseWidth;
00078     static const uint baseHeight;
00079 
00080     explicit RenderWindow(glWidget*&, MainWindow* = 0);
00081 
00082     ~RenderWindow();
00083 
00084     void updateTitle(const string&);
00085 
00086   public slots:
00087     void slotUpdateTitle();
00088     void slotToggleIdle(bool);
00089 
00090   private slots:
00091     void slotUpdateCoords(QString, QString);
00092 
00093   signals:
00094     void sgnlRender();
00095 
00096   private:
00097     bool event(QEvent*);
00098     void resizeEvent(QResizeEvent*);
00099     
00100     QShortcut* escapeOverloaded;
00101 
00102     Ui::RenderWindow* ui;
00103 
00109     glWidget*& glw;
00110 
00116     QLabel* lblEye;
00117     QLabel* lblEyeCoord;
00118     QLabel* lblTab;
00119     QLabel* lblFocal;
00120     QLabel* lblFocalCoord;
00122 
00130     bool idling;
00131 
00135     string sceneName;
00136   }; // class RenderWindow
00137 
00138 } // namespace rtVTK
00139 
00140 #endif // StandAlone_RenderWindow_h
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends