A?adido di?logo de selecci?n del flow (en el primer arranque).

A?adida la comprobaci?n de que OpenGL est? disponible en el sistema.
This commit is contained in:
Luis Ángel San Martín
2012-10-11 22:39:16 +02:00
parent b4669c5b8b
commit 46a769e53e
12 changed files with 103 additions and 11 deletions

View File

@ -32,7 +32,8 @@ HEADERS += comic.h \
../common/check_new_version.h \
../common/qnaturalsorting.h \
../common/yacreader_flow_gl.h \
../common/yacreader_global.h
../common/yacreader_global.h \
../common/onstart_flow_selection_dialog.h
SOURCES += comic.cpp \
configuration.cpp \
@ -54,7 +55,8 @@ SOURCES += comic.cpp \
../common/custom_widgets.cpp \
../common/check_new_version.cpp \
../common/qnaturalsorting.cpp \
../common/yacreader_flow_gl.cpp
../common/yacreader_flow_gl.cpp \
../common/onstart_flow_selection_dialog.cpp
RESOURCES += images.qrc \
files.qrc

View File

@ -63,6 +63,9 @@
<file>../images/helpImages/keyboard.png</file>
<file>../images/helpImages/mouse.png</file>
<file>../images/helpImages/speaker.png</file>
<file>../images/defaultCover.png</file>
<file>../images/defaultCover.png</file>
<file>../images/onStartFlowSelection.png</file>
<file>../images/useNewFlowButton.png</file>
<file>../images/useOldFlowButton.png</file>
</qresource>
</RCC>

View File

@ -8,6 +8,7 @@
#include "render.h"
#include "goto_dialog.h"
#include "translator.h"
#include "onstart_flow_selection_dialog.h"
#include <QWebView>
#include <QFile>
@ -69,7 +70,20 @@ drag(false)
QSettings * settings = new QSettings("YACReader.ini",QSettings::IniFormat);
//CONFIG GOTO_FLOW--------------------------------------------------------
if(settings->contains(USE_OPEN_GL) && settings->value(USE_OPEN_GL).toBool() == true)
if(QGLFormat::hasOpenGL() && !settings->contains(USE_OPEN_GL))
{
OnStartFlowSelectionDialog * flowSelDialog = new OnStartFlowSelectionDialog();
flowSelDialog->exec();
if(flowSelDialog->result() == QDialog::Accepted)
settings->setValue(USE_OPEN_GL,2);
else
settings->setValue(USE_OPEN_GL,0);
delete flowSelDialog;
}
if(QGLFormat::hasOpenGL() && (settings->value(USE_OPEN_GL).toBool() == true))
goToFlow = new GoToFlowGL(this,Configuration::getConfiguration().getFlowType());
else
goToFlow = new GoToFlow(this,Configuration::getConfiguration().getFlowType());