StelMainWindow.cpp   StelMainWindow.cpp 
skipping to change at line 35 skipping to change at line 35
#include "StelModuleMgr.hpp" #include "StelModuleMgr.hpp"
#include "StelTranslator.hpp" #include "StelTranslator.hpp"
#include <QSettings> #include <QSettings>
#include <QResizeEvent> #include <QResizeEvent>
#include <QIcon> #include <QIcon>
#include <QDebug> #include <QDebug>
#include <QCoreApplication> #include <QCoreApplication>
#include <QApplication> #include <QApplication>
#include <QHBoxLayout> #include <QHBoxLayout>
#include <QFontDatabase>
#include <QGLWidget> #include <QGLWidget>
// Initialize static variables // Initialize static variables
StelMainWindow* StelMainWindow::singleton = NULL; StelMainWindow* StelMainWindow::singleton = NULL;
StelMainWindow::StelMainWindow() : QMainWindow(NULL) StelMainWindow::StelMainWindow() : QMainWindow(NULL)
{ {
// Can't create 2 StelMainWindow instances // Can't create 2 StelMainWindow instances
Q_ASSERT(!singleton); Q_ASSERT(!singleton);
singleton = this; singleton = this;
setAttribute(Qt::WA_NoSystemBackground); setAttribute(Qt::WA_NoSystemBackground);
setWindowIcon(QIcon(":/mainWindow/icon.bmp")); setWindowIcon(QIcon(":/mainWindow/icon.bmp"));
initTitleI18n(); initTitleI18n();
// Add the DejaVu font that we use everywhere in the program
try
{
const QString& fName = StelFileMgr::findFile("data/DejaVuSan
s.ttf");
if (!fName.isEmpty())
QFontDatabase::addApplicationFont(fName);
}
catch (std::runtime_error& e)
{
// Removed this warning practically allowing to package the
program without the font file.
// This is useful for distribution having already a package
for DejaVu font.
// qWarning() << "ERROR while loading font DejaVuSans : " <<
e.what();
}
mainGraphicsView = new StelMainGraphicsView(this); mainGraphicsView = new StelMainGraphicsView(this);
setCentralWidget(mainGraphicsView); setCentralWidget(mainGraphicsView);
} }
// Update the translated title // Update the translated title
void StelMainWindow::initTitleI18n() void StelMainWindow::initTitleI18n()
{ {
QString appNameI18n = q_("Stellarium %1").arg(StelUtils::getApplicat ionVersion()); QString appNameI18n = q_("Stellarium %1").arg(StelUtils::getApplicat ionVersion());
setWindowTitle(appNameI18n); setWindowTitle(appNameI18n);
} }
skipping to change at line 96 skipping to change at line 81
setFullScreen(false); setFullScreen(false);
} }
show(); show();
// Process the event to make the window visible and create the openG L context. // Process the event to make the window visible and create the openG L context.
QCoreApplication::processEvents(); QCoreApplication::processEvents();
mainGraphicsView->init(conf); mainGraphicsView->init(conf);
} }
void StelMainWindow::deinit() void StelMainWindow::deinit()
{ {
StelMainGraphicsView::getInstance().deinitGL(); mainGraphicsView->deinitGL();
} }
// Alternate fullscreen mode/windowed mode if possible // Alternate fullscreen mode/windowed mode if possible
void StelMainWindow::toggleFullScreen() void StelMainWindow::toggleFullScreen()
{ {
// Toggle full screen // Toggle full screen
if (getFullScreen()) if (getFullScreen())
{ {
setFullScreen(false); setFullScreen(false);
} }
 End of changes. 3 change blocks. 
20 lines changed or deleted 1 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/