NO_OPENGL support for Reader

This commit is contained in:
Felix Kauselmann
2015-02-17 11:33:32 +01:00
parent 88239f4f88
commit 33aaf19fe6
7 changed files with 56 additions and 20 deletions

View File

@ -57,7 +57,8 @@ HEADERS += $$PWD/../common/pdf_comic.h
}
QT += network opengl
QT += network widgets core
#opengl
#CONFIG += release
CONFIG -= flat
@ -81,7 +82,7 @@ HEADERS += $$PWD/../common/comic.h \
$$PWD/render.h \
$$PWD/shortcuts_dialog.h \
$$PWD/translator.h \
$$PWD/goto_flow_gl.h \
#$$PWD/goto_flow_gl.h \
$$PWD/goto_flow_widget.h \
$$PWD/page_label_widget.h \
$$PWD/goto_flow_toolbar.h \
@ -92,7 +93,7 @@ HEADERS += $$PWD/../common/comic.h \
$$PWD/../common/custom_widgets.h \
$$PWD/../common/check_new_version.h \
$$PWD/../common/qnaturalsorting.h \
$$PWD/../common/yacreader_flow_gl.h \
#$$PWD/../common/yacreader_flow_gl.h \
$$PWD/../common/yacreader_global.h \
$$PWD/../common/onstart_flow_selection_dialog.h \
$$PWD/../common/comic_db.h \
@ -116,7 +117,7 @@ SOURCES += $$PWD/../common/comic.cpp \
$$PWD/render.cpp \
$$PWD/shortcuts_dialog.cpp \
$$PWD/translator.cpp \
$$PWD/goto_flow_gl.cpp \
#$$PWD/goto_flow_gl.cpp \
$$PWD/goto_flow_widget.cpp \
$$PWD/page_label_widget.cpp \
$$PWD/goto_flow_toolbar.cpp \
@ -127,7 +128,7 @@ SOURCES += $$PWD/../common/comic.cpp \
$$PWD/../common/custom_widgets.cpp \
$$PWD/../common/check_new_version.cpp \
$$PWD/../common/qnaturalsorting.cpp \
$$PWD/../common/yacreader_flow_gl.cpp \
#$$PWD/../common/yacreader_flow_gl.cpp \
$$PWD/../common/onstart_flow_selection_dialog.cpp \
$$PWD/../common/comic_db.cpp \
$$PWD/../common/folder.cpp \

View File

@ -6,7 +6,7 @@ TARGET = YACReader
DEPENDPATH += . \
release
DEFINES += NOMINMAX YACREADER
DEFINES += NOMINMAX YACREADER NO_OPENGL
unix:!macx{
QMAKE_CXXFLAGS += -std=c++11

View File

@ -14,7 +14,9 @@
#include "yacreader_spin_slider_widget.h"
#include "yacreader_flow_config_widget.h"
#ifndef NO_OPENGL
#include "yacreader_gl_flow_config_widget.h"
#endif
OptionsDialog::OptionsDialog(QWidget * parent)
:YACReaderOptionsDialog(parent)
@ -116,8 +118,10 @@ OptionsDialog::OptionsDialog(QWidget * parent)
layoutGeneral->addWidget(shortcutsBox);
layoutGeneral->addStretch();
layoutFlow->addWidget(sw);
#ifndef NO_OPENGL
layoutFlow->addWidget(gl);
layoutFlow->addWidget(useGL);
#endif
layoutFlow->addStretch();
layoutImage->addWidget(new QLabel(tr("Brightness")),0,0);
layoutImage->addWidget(new QLabel(tr("Contrast")),1,0);
@ -151,8 +155,9 @@ OptionsDialog::OptionsDialog(QWidget * parent)
setLayout(layout);
//disable vSyncCheck
#ifndef NO_OPENGL
gl->vSyncCheck->hide();
#endif
//restoreOptions(); //load options
//resize(400,0);
setModal (true);

View File

@ -3,7 +3,11 @@
#include "configuration.h"
#include "magnifying_glass.h"
#include "goto_flow.h"
#ifndef NO_OPENGL
#include "goto_flow_gl.h"
#else
#include <QtWidgets>
#endif
#include "bookmarks_dialog.h"
#include "render.h"
#include "goto_dialog.h"
@ -67,6 +71,7 @@ shouldOpenPrevious(false)
QSettings * settings = new QSettings(YACReader::getSettingsPath()+"/YACReader.ini",QSettings::IniFormat);
//CONFIG GOTO_FLOW--------------------------------------------------------
#ifndef NO_OPENGL
if(!settings->contains(USE_OPEN_GL))
{
settings->setValue(USE_OPEN_GL,2);
@ -76,7 +81,9 @@ shouldOpenPrevious(false)
goToFlow = new GoToFlowGL(this,Configuration::getConfiguration().getFlowType());
else
goToFlow = new GoToFlow(this,Configuration::getConfiguration().getFlowType());
#else
goToFlow = new GoToFlow(this,Configuration::getConfiguration().getFlowType());
#endif
goToFlow->setFocusPolicy(Qt::StrongFocus);
goToFlow->hide();
showGoToFlowAnimation = new QPropertyAnimation(goToFlow,"pos");