From 251dede93d2393ed77156ee3bdea417d0c6612dd Mon Sep 17 00:00:00 2001 From: Felix Kauselmann <2039670+selmf@users.noreply.github.com> Date: Mon, 19 Feb 2018 14:36:58 +0100 Subject: [PATCH] Remove obsolete QGLWidget based cover flow --- YACReader/YACReader.pro | 25 ++++++------------------- YACReader/goto_flow_toolbar.cpp | 11 +++-------- YACReaderLibrary/YACReaderLibrary.pro | 19 ++----------------- 3 files changed, 11 insertions(+), 44 deletions(-) diff --git a/YACReader/YACReader.pro b/YACReader/YACReader.pro index 8e2b9b66..48d6a529 100644 --- a/YACReader/YACReader.pro +++ b/YACReader/YACReader.pro @@ -45,10 +45,8 @@ SOURCES += main.cpp INCLUDEPATH += ../common \ ../custom_widgets -!CONFIG(no_opengl):CONFIG(legacy_gl_widget) { - INCLUDEPATH += ../common/gl_legacy \ -} else { - INCLUDEPATH += ../common/gl \ +!CONFIG(no_opengl) { + INCLUDEPATH += ../common/gl } #there are going to be two builds for windows, OpenGL based and ANGLE based @@ -124,14 +122,8 @@ HEADERS += ../common/comic.h \ ../common/pdf_comic.h !CONFIG(no_opengl) { - CONFIG(legacy_gl_widget) { - message("Using legacy YACReaderFlowGL (QGLWidget) header") - DEFINES += YACREADER_LEGACY_FLOW_GL - HEADERS += ../common/gl_legacy/yacreader_flow_gl.h - } else { - HEADERS += ../common/gl/yacreader_flow_gl.h - } - HEADERS += goto_flow_gl.h + HEADERS += ../common/gl/yacreader_flow_gl.h \ + goto_flow_gl.h } SOURCES += ../common/comic.cpp \ @@ -169,13 +161,8 @@ SOURCES += ../common/comic.cpp \ ../common/opengl_checker.cpp !CONFIG(no_opengl) { - CONFIG(legacy_gl_widget) { - message("using legacy YACReaderFlowGL (QGLWidget) source code") - SOURCES += ../common/gl_legacy/yacreader_flow_gl.cpp - } else { - SOURCES += ../common/gl/yacreader_flow_gl.cpp - } - SOURCES += goto_flow_gl.cpp + SOURCES += ../common/gl/yacreader_flow_gl.cpp \ + goto_flow_gl.cpp } include(../custom_widgets/custom_widgets_yacreader.pri) diff --git a/YACReader/goto_flow_toolbar.cpp b/YACReader/goto_flow_toolbar.cpp index 4043f568..94fa576a 100644 --- a/YACReader/goto_flow_toolbar.cpp +++ b/YACReader/goto_flow_toolbar.cpp @@ -56,7 +56,7 @@ GoToFlowToolBar::GoToFlowToolBar(QWidget * parent) "QPushButton:pressed {background-image: url(:/images/imgCenterSlidePressed.png); width: 100%; height:100%; background-repeat: none; border: none;} "; centerButton = new QPushButton(this); //centerButton->setIcon(QIcon(":/images/center.png")); - centerButton->setStyleSheet(centerButtonCSS); + centerButton->setStyleSheet(centerButtonCSS); centerButton->setFixedSize(26,50); centerButton->setAttribute(Qt::WA_LayoutUsesWidgetRect,true); connect(centerButton,SIGNAL(clicked()),this,SLOT(centerSlide())); @@ -66,10 +66,10 @@ GoToFlowToolBar::GoToFlowToolBar(QWidget * parent) "QPushButton:pressed {background-image: url(:/images/imgGoToSlidePressed.png); width: 100%; height:100%; background-repeat: none; border: none;} "; goToButton = new QPushButton(this); //goToButton->setIcon(QIcon(":/images/goto.png")); - goToButton->setStyleSheet(goToButtonCSS); + goToButton->setStyleSheet(goToButtonCSS); goToButton->setFixedSize(32,50); goToButton->setAttribute(Qt::WA_LayoutUsesWidgetRect,true); - + connect(goToButton,SIGNAL(clicked()),this,SLOT(goTo())); normalLayout->setMargin(0); @@ -94,12 +94,7 @@ GoToFlowToolBar::GoToFlowToolBar(QWidget * parent) void GoToFlowToolBar::paintEvent(QPaintEvent *) { QPainter painter(this); - -#ifdef YACREADER_LEGACY_FLOW_GL - painter.fillRect(0,0,width(),height(),QColor("#FF000000")); -#else painter.fillRect(0,0,width(),height(),QColor("#99000000")); -#endif } void GoToFlowToolBar::setPage(int pageNumber) diff --git a/YACReaderLibrary/YACReaderLibrary.pro b/YACReaderLibrary/YACReaderLibrary.pro index 88a2c851..8814ea0a 100644 --- a/YACReaderLibrary/YACReaderLibrary.pro +++ b/YACReaderLibrary/YACReaderLibrary.pro @@ -24,11 +24,7 @@ unix:haiku { LIBS += -lnetwork -lbsd } -CONFIG(legacy_gl_widget) { - INCLUDEPATH += ../common/gl_legacy \ -} else { - INCLUDEPATH += ../common/gl \ -} +INCLUDEPATH += ../common/gl # there are two builds for Windows, Desktop OpenGL based and ANGLE OpenGL ES based win32 { @@ -154,12 +150,7 @@ HEADERS += comic_flow.h \ yacreader_comic_info_helper.h !CONFIG(no_opengl) { - CONFIG(legacy_gl_widget) { - message("using legacy YACReaderFlowGL (QGLWidget) header") - HEADERS += ../common/gl_legacy/yacreader_flow_gl.h - } else { HEADERS += ../common/gl/yacreader_flow_gl.h - } } SOURCES += comic_flow.cpp \ @@ -228,15 +219,9 @@ SOURCES += comic_flow.cpp \ yacreader_comic_info_helper.cpp !CONFIG(no_opengl) { - CONFIG(legacy_gl_widget) { - message("using legacy YACReaderFlowGL (QGLWidget) source code") - SOURCES += ../common/gl_legacy/yacreader_flow_gl.cpp - } else { - SOURCES += ../common/gl/yacreader_flow_gl.cpp - } + SOURCES += ../common/gl/yacreader_flow_gl.cpp } - include(./server/server.pri) include(../custom_widgets/custom_widgets_yacreaderlibrary.pri)