StelMainView.hpp   StelMainView.hpp 
skipping to change at line 23 skipping to change at line 23
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA. * Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA.
*/ */
#ifndef _STELMAINGRAPHICSVIEW_HPP_ #ifndef _STELMAINGRAPHICSVIEW_HPP_
#define _STELMAINGRAPHICSVIEW_HPP_ #define _STELMAINGRAPHICSVIEW_HPP_
#include "config.h"
#include <QDeclarativeView> #include <QDeclarativeView>
#include <QCoreApplication> #include <QCoreApplication>
#include <QEventLoop> #include <QEventLoop>
#include <QOpenGLContext> #include <QOpenGLContext>
// This define (only used here and in StelMainView.cpp) is temporarily used
// to allow uncompromised compiling while the migration to the new QOpenGL.
.. classes
// has not been done. As soon as Qt5.4 is out, we should finish this migrat
ion process!
#define STEL_USE_NEW_OPENGL_WIDGETS 0
class QDeclarativeItem; class QDeclarativeItem;
#if STEL_USE_NEW_OPENGL_WIDGETS
class QOpenGLWidget;
class StelQOpenGLWidget;
#else
class QGLWidget; class QGLWidget;
class StelQGLWidget;
#endif
class QMoveEvent; class QMoveEvent;
class QResizeEvent; class QResizeEvent;
class StelGuiBase; class StelGuiBase;
class StelQGLWidget;
class QMoveEvent; class QMoveEvent;
class QSettings;
//! @class StelMainView //! @class StelMainView
//! Reimplement a QGraphicsView for Stellarium. //! Reimplement a QGraphicsView for Stellarium.
//! It is the class creating the singleton GL Widget, the main StelApp inst ance as well as the main GUI. //! It is the class creating the singleton GL Widget, the main StelApp inst ance as well as the main GUI.
class StelMainView : public QDeclarativeView class StelMainView : public QDeclarativeView
{ {
friend class StelGuiItem; friend class StelGuiItem;
friend class StelSkyItem; friend class StelSkyItem;
Q_OBJECT Q_OBJECT
Q_PROPERTY(bool fullScreen READ isFullScreen WRITE setFullScreen) Q_PROPERTY(bool fullScreen READ isFullScreen WRITE setFullScreen)
skipping to change at line 70 skipping to change at line 79
//! Get the StelMainView singleton instance. //! Get the StelMainView singleton instance.
static StelMainView& getInstance() {Q_ASSERT(singleton); return *sin gleton;} static StelMainView& getInstance() {Q_ASSERT(singleton); return *sin gleton;}
//! Delete openGL textures (to call before the GLContext disappears) //! Delete openGL textures (to call before the GLContext disappears)
void deinitGL(); void deinitGL();
//! Return focus to the sky item. To be used when we close a dialog . //! Return focus to the sky item. To be used when we close a dialog .
void focusSky(); void focusSky();
//! Return the parent gui widget, this should be used as parent to a ll //! Return the parent gui widget, this should be used as parent to a ll
//! the StelDialog instances. //! the StelDialog instances.
QGraphicsWidget* getGuiWidget() const {return guiWidget;} QGraphicsWidget* getGuiWidget() const {return guiWidget;}
//! Return mouse position coordinates
QPoint getMousePos();
public slots: public slots:
//! Set whether fullscreen is activated or not //! Set whether fullscreen is activated or not
void setFullScreen(bool); void setFullScreen(bool);
//////////////////////////////////////////////////////////////////// /////// //////////////////////////////////////////////////////////////////// ///////
// Specific methods // Specific methods
//! Save a screen shot. //! Save a screen shot.
//! The format of the file, and hence the filename extension //! The format of the file, and hence the filename extension
//! depends on the architecture and build type. //! depends on the architecture and build type.
skipping to change at line 150 skipping to change at line 161
private slots: private slots:
// Do the actual screenshot generation in the main thread with this method. // Do the actual screenshot generation in the main thread with this method.
void doScreenshot(void); void doScreenshot(void);
void minFpsChanged(); void minFpsChanged();
private: private:
//! Start the display loop //! Start the display loop
void startMainLoop(); void startMainLoop();
QString getSupportedOpenGLVersion() const; //! provide extended OpenGL diagnostics in logfile.
//! provide extensive OpenGL dignostics in logfile.
void dumpOpenGLdiagnostics() const; void dumpOpenGLdiagnostics() const;
//! Startup diagnostics, providing test for various circumstances of
bad OS/OpenGL driver combinations
//! to provide feedback to the user about bad OpenGL drivers.
#if STEL_USE_NEW_OPENGL_WIDGETS
void processOpenGLdiagnosticsAndWarnings(QSettings *conf, StelQOpenG
LWidget* glWidget) const;
#else
void processOpenGLdiagnosticsAndWarnings(QSettings *conf, StelQGLWid
get* glWidget) const;
#endif
//! The StelMainView singleton //! The StelMainView singleton
static StelMainView* singleton; static StelMainView* singleton;
//! This is created by the StelGuiItem, but need to be publicly //! This is created by the StelGuiItem, but need to be publicly
//! accessible so that StelDialog instances can reparent to it. //! accessible so that StelDialog instances can reparent to it.
QGraphicsWidget *guiWidget; QGraphicsWidget *guiWidget;
QDeclarativeItem* skyItem; QDeclarativeItem* skyItem;
//! The openGL window //! The openGL window
#if STEL_USE_NEW_OPENGL_WIDGETS
StelQOpenGLWidget* glWidget;
#else
StelQGLWidget* glWidget; StelQGLWidget* glWidget;
#endif
StelGuiBase* gui; StelGuiBase* gui;
class StelApp* stelApp; class StelApp* stelApp;
bool flagInvertScreenShotColors; bool flagInvertScreenShotColors;
QString screenShotPrefix; QString screenShotPrefix;
QString screenShotDir; QString screenShotDir;
// Number of second before the mouse cursor disappears // Number of second before the mouse cursor disappears
float cursorTimeout; float cursorTimeout;
 End of changes. 11 change blocks. 
5 lines changed or deleted 31 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/