Remove obsolete QGLWidget based cover flow

This commit is contained in:
Felix Kauselmann
2018-02-19 14:36:58 +01:00
parent 87023114e6
commit 251dede93d
3 changed files with 11 additions and 44 deletions

View File

@ -45,10 +45,8 @@ SOURCES += main.cpp
INCLUDEPATH += ../common \ INCLUDEPATH += ../common \
../custom_widgets ../custom_widgets
!CONFIG(no_opengl):CONFIG(legacy_gl_widget) { !CONFIG(no_opengl) {
INCLUDEPATH += ../common/gl_legacy \ INCLUDEPATH += ../common/gl
} else {
INCLUDEPATH += ../common/gl \
} }
#there are going to be two builds for windows, OpenGL based and ANGLE based #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 ../common/pdf_comic.h
!CONFIG(no_opengl) { !CONFIG(no_opengl) {
CONFIG(legacy_gl_widget) { HEADERS += ../common/gl/yacreader_flow_gl.h \
message("Using legacy YACReaderFlowGL (QGLWidget) header") goto_flow_gl.h
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
} }
SOURCES += ../common/comic.cpp \ SOURCES += ../common/comic.cpp \
@ -169,13 +161,8 @@ SOURCES += ../common/comic.cpp \
../common/opengl_checker.cpp ../common/opengl_checker.cpp
!CONFIG(no_opengl) { !CONFIG(no_opengl) {
CONFIG(legacy_gl_widget) { SOURCES += ../common/gl/yacreader_flow_gl.cpp \
message("using legacy YACReaderFlowGL (QGLWidget) source code") goto_flow_gl.cpp
SOURCES += ../common/gl_legacy/yacreader_flow_gl.cpp
} else {
SOURCES += ../common/gl/yacreader_flow_gl.cpp
}
SOURCES += goto_flow_gl.cpp
} }
include(../custom_widgets/custom_widgets_yacreader.pri) include(../custom_widgets/custom_widgets_yacreader.pri)

View File

@ -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;} "; "QPushButton:pressed {background-image: url(:/images/imgCenterSlidePressed.png); width: 100%; height:100%; background-repeat: none; border: none;} ";
centerButton = new QPushButton(this); centerButton = new QPushButton(this);
//centerButton->setIcon(QIcon(":/images/center.png")); //centerButton->setIcon(QIcon(":/images/center.png"));
centerButton->setStyleSheet(centerButtonCSS); centerButton->setStyleSheet(centerButtonCSS);
centerButton->setFixedSize(26,50); centerButton->setFixedSize(26,50);
centerButton->setAttribute(Qt::WA_LayoutUsesWidgetRect,true); centerButton->setAttribute(Qt::WA_LayoutUsesWidgetRect,true);
connect(centerButton,SIGNAL(clicked()),this,SLOT(centerSlide())); 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;} "; "QPushButton:pressed {background-image: url(:/images/imgGoToSlidePressed.png); width: 100%; height:100%; background-repeat: none; border: none;} ";
goToButton = new QPushButton(this); goToButton = new QPushButton(this);
//goToButton->setIcon(QIcon(":/images/goto.png")); //goToButton->setIcon(QIcon(":/images/goto.png"));
goToButton->setStyleSheet(goToButtonCSS); goToButton->setStyleSheet(goToButtonCSS);
goToButton->setFixedSize(32,50); goToButton->setFixedSize(32,50);
goToButton->setAttribute(Qt::WA_LayoutUsesWidgetRect,true); goToButton->setAttribute(Qt::WA_LayoutUsesWidgetRect,true);
connect(goToButton,SIGNAL(clicked()),this,SLOT(goTo())); connect(goToButton,SIGNAL(clicked()),this,SLOT(goTo()));
normalLayout->setMargin(0); normalLayout->setMargin(0);
@ -94,12 +94,7 @@ GoToFlowToolBar::GoToFlowToolBar(QWidget * parent)
void GoToFlowToolBar::paintEvent(QPaintEvent *) void GoToFlowToolBar::paintEvent(QPaintEvent *)
{ {
QPainter painter(this); 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")); painter.fillRect(0,0,width(),height(),QColor("#99000000"));
#endif
} }
void GoToFlowToolBar::setPage(int pageNumber) void GoToFlowToolBar::setPage(int pageNumber)

View File

@ -24,11 +24,7 @@ unix:haiku {
LIBS += -lnetwork -lbsd LIBS += -lnetwork -lbsd
} }
CONFIG(legacy_gl_widget) { INCLUDEPATH += ../common/gl
INCLUDEPATH += ../common/gl_legacy \
} else {
INCLUDEPATH += ../common/gl \
}
# there are two builds for Windows, Desktop OpenGL based and ANGLE OpenGL ES based # there are two builds for Windows, Desktop OpenGL based and ANGLE OpenGL ES based
win32 { win32 {
@ -154,12 +150,7 @@ HEADERS += comic_flow.h \
yacreader_comic_info_helper.h yacreader_comic_info_helper.h
!CONFIG(no_opengl) { !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 HEADERS += ../common/gl/yacreader_flow_gl.h
}
} }
SOURCES += comic_flow.cpp \ SOURCES += comic_flow.cpp \
@ -228,15 +219,9 @@ SOURCES += comic_flow.cpp \
yacreader_comic_info_helper.cpp yacreader_comic_info_helper.cpp
!CONFIG(no_opengl) { !CONFIG(no_opengl) {
CONFIG(legacy_gl_widget) { SOURCES += ../common/gl/yacreader_flow_gl.cpp
message("using legacy YACReaderFlowGL (QGLWidget) source code")
SOURCES += ../common/gl_legacy/yacreader_flow_gl.cpp
} else {
SOURCES += ../common/gl/yacreader_flow_gl.cpp
}
} }
include(./server/server.pri) include(./server/server.pri)
include(../custom_widgets/custom_widgets_yacreaderlibrary.pri) include(../custom_widgets/custom_widgets_yacreaderlibrary.pri)