mirror of
https://github.com/YACReader/yacreader
synced 2025-07-24 16:05:01 -04:00
initial no_opengl support for YACReaderLibrary
This commit is contained in:
@ -106,7 +106,7 @@ HEADERS += comic_flow.h \
|
||||
../common/pictureflow.h \
|
||||
../common/custom_widgets.h \
|
||||
../common/qnaturalsorting.h \
|
||||
../common/yacreader_flow_gl.h \
|
||||
#../common/yacreader_flow_gl.h \
|
||||
../common/yacreader_global.h \
|
||||
../common/onstart_flow_selection_dialog.h \
|
||||
no_libraries_widget.h \
|
||||
@ -167,7 +167,7 @@ SOURCES += comic_flow.cpp \
|
||||
../common/pictureflow.cpp \
|
||||
../common/custom_widgets.cpp \
|
||||
../common/qnaturalsorting.cpp \
|
||||
../common/yacreader_flow_gl.cpp \
|
||||
#../common/yacreader_flow_gl.cpp \
|
||||
../common/onstart_flow_selection_dialog.cpp \
|
||||
no_libraries_widget.cpp \
|
||||
import_widget.cpp \
|
||||
|
@ -16,12 +16,14 @@ ClassicComicsView::ClassicComicsView(QWidget *parent)
|
||||
settings->beginGroup("libraryConfig");
|
||||
//FLOW-----------------------------------------------------------------------
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
#ifndef NO_OPENGL
|
||||
if((settings->value(USE_OPEN_GL).toBool() == true))
|
||||
comicFlow = new ComicFlowWidgetGL(0);
|
||||
else
|
||||
comicFlow = new ComicFlowWidgetSW(0);
|
||||
|
||||
#else
|
||||
comicFlow = new ComicFlowWidgetSW(0);
|
||||
#endif
|
||||
comicFlow->updateConfig(settings);
|
||||
comicFlow->setFocusPolicy(Qt::StrongFocus);
|
||||
comicFlow->setShowMarks(true);
|
||||
|
@ -1,5 +1,5 @@
|
||||
#include "comic_flow_widget.h"
|
||||
|
||||
#include <QVBoxLayout>
|
||||
ComicFlowWidget::ComicFlowWidget(QWidget * parent)
|
||||
:QWidget(parent)
|
||||
{
|
||||
@ -145,7 +145,7 @@ void ComicFlowWidgetSW::resortCovers(QList<int> newOrder)
|
||||
flow->resortCovers(newOrder);
|
||||
}
|
||||
|
||||
|
||||
#ifndef NO_OPENGL
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
///OpenGL ComicFlow
|
||||
@ -341,7 +341,7 @@ void ComicFlowWidgetGL::resortCovers(QList<int> newOrder)
|
||||
{
|
||||
flow->resortCovers(newOrder);
|
||||
}
|
||||
|
||||
#endif
|
||||
//void ComicFlowWidgetGL::setCF_RX(int value){ flow->setCF_RX(value);}
|
||||
//void ComicFlowWidgetGL::setCF_RY(int value){ flow->setCF_RY(value);}
|
||||
//void ComicFlowWidgetGL::setCF_RZ(int value){ flow->setCF_RZ(value);}
|
||||
|
@ -6,8 +6,9 @@
|
||||
|
||||
#include "pictureflow.h"
|
||||
#include "comic_flow.h"
|
||||
#ifndef NO_OPENGL
|
||||
#include "yacreader_flow_gl.h"
|
||||
|
||||
#endif
|
||||
class ComicFlowWidget : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
@ -75,6 +76,7 @@ protected:
|
||||
QSize slideSizeF;
|
||||
};
|
||||
|
||||
#ifndef NO_OPENGL
|
||||
class ComicFlowWidgetGL : public ComicFlowWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
@ -127,5 +129,5 @@ protected:
|
||||
QSize minimumSizeHint() const;
|
||||
QSize sizeHint() const;
|
||||
};
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
@ -10,7 +10,8 @@
|
||||
#include <QScrollBar>
|
||||
#include <QGraphicsItemAnimation>
|
||||
#include <QTimeLine>
|
||||
#include <QGLWidget>
|
||||
//TODO: is QGLWidget needed here???
|
||||
//#include <QGLWidget>
|
||||
#include <QTimer>
|
||||
#include <QElapsedTimer>
|
||||
#include <QToolButton>
|
||||
|
@ -15,7 +15,9 @@
|
||||
#include <QFileIconProvider>
|
||||
#include <QMatrix>
|
||||
#include <QSettings>
|
||||
#ifndef NO_OPENGL
|
||||
#include <QGLFormat>
|
||||
#endif
|
||||
#include <QHeaderView>
|
||||
|
||||
#include <iterator>
|
||||
@ -182,14 +184,14 @@ void LibraryWindow::doLayout()
|
||||
libraryToolBar = new YACReaderMainToolBar(this);
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef NO_OPENGL
|
||||
//FLOW-----------------------------------------------------------------------
|
||||
//---------------------------------------------------------------------------
|
||||
if(QGLFormat::hasOpenGL() && !settings->contains(USE_OPEN_GL))
|
||||
{
|
||||
settings->setValue(USE_OPEN_GL,2);
|
||||
}
|
||||
|
||||
#endif
|
||||
//FOLDERS FILTER-------------------------------------------------------------
|
||||
//---------------------------------------------------------------------------
|
||||
#ifndef Q_OS_MAC
|
||||
|
@ -1,8 +1,10 @@
|
||||
#include "options_dialog.h"
|
||||
|
||||
#ifndef NO_OPENGL
|
||||
#include "yacreader_flow_gl.h"
|
||||
#include "yacreader_flow_config_widget.h"
|
||||
#include "yacreader_gl_flow_config_widget.h"
|
||||
#endif
|
||||
#include "yacreader_flow_config_widget.h"
|
||||
#include "api_key_dialog.h"
|
||||
|
||||
#include <QVBoxLayout>
|
||||
@ -15,6 +17,8 @@
|
||||
#include <QFile>
|
||||
#include <QMessageBox>
|
||||
#include <QCheckBox>
|
||||
#include <QtWidgets>
|
||||
|
||||
|
||||
FlowType flowType = Strip;
|
||||
|
||||
@ -28,20 +32,25 @@ OptionsDialog::OptionsDialog(QWidget * parent)
|
||||
QVBoxLayout * flowLayout = new QVBoxLayout;
|
||||
QVBoxLayout * generalLayout = new QVBoxLayout();
|
||||
|
||||
QHBoxLayout * switchFlowType = new QHBoxLayout;
|
||||
QHBoxLayout * switchFlowType = new QHBoxLayout();
|
||||
switchFlowType->addStretch();
|
||||
#ifndef NO_OPENGL
|
||||
switchFlowType->addWidget(useGL);
|
||||
|
||||
#endif
|
||||
QHBoxLayout * buttons = new QHBoxLayout();
|
||||
buttons->addStretch();
|
||||
buttons->addWidget(accept);
|
||||
buttons->addWidget(cancel);
|
||||
|
||||
flowLayout->addWidget(sw);
|
||||
#ifndef NO_OPENGL
|
||||
flowLayout->addWidget(gl);
|
||||
#endif
|
||||
flowLayout->addLayout(switchFlowType);
|
||||
|
||||
#ifndef NO_OPENGL
|
||||
sw->hide();
|
||||
#endif
|
||||
|
||||
QVBoxLayout * apiKeyLayout = new QVBoxLayout();
|
||||
QPushButton * apiKeyButton = new QPushButton(tr("Edit Comic Vine API key"));
|
||||
|
@ -6,7 +6,7 @@ HEADERS += $$PWD/help_about_dialog.h \
|
||||
$$PWD/yacreader_field_plain_text_edit.h \
|
||||
$$PWD/yacreader_flow.h \
|
||||
$$PWD/yacreader_flow_config_widget.h \
|
||||
$$PWD/yacreader_gl_flow_config_widget.h \
|
||||
#$$PWD/yacreader_gl_flow_config_widget.h \
|
||||
$$PWD/yacreader_options_dialog.h \
|
||||
$$PWD/yacreader_spin_slider_widget.h \
|
||||
$$PWD/yacreader_tool_bar_stretch.h \
|
||||
@ -23,7 +23,7 @@ SOURCES += $$PWD/help_about_dialog.cpp \
|
||||
$$PWD/yacreader_field_plain_text_edit.cpp \
|
||||
$$PWD/yacreader_flow.cpp \
|
||||
$$PWD/yacreader_flow_config_widget.cpp \
|
||||
$$PWD/yacreader_gl_flow_config_widget.cpp \
|
||||
#$$PWD/yacreader_gl_flow_config_widget.cpp \
|
||||
$$PWD/yacreader_options_dialog.cpp \
|
||||
$$PWD/yacreader_spin_slider_widget.cpp \
|
||||
$$PWD/yacreader_tool_bar_stretch.cpp \
|
||||
|
@ -6,7 +6,7 @@ HEADERS += $$PWD/help_about_dialog.h \
|
||||
$$PWD/yacreader_field_plain_text_edit.h \
|
||||
$$PWD/yacreader_flow.h \
|
||||
$$PWD/yacreader_flow_config_widget.h \
|
||||
$$PWD/yacreader_gl_flow_config_widget.h \
|
||||
#$$PWD/yacreader_gl_flow_config_widget.h \
|
||||
$$PWD/yacreader_options_dialog.h \
|
||||
$$PWD/yacreader_search_line_edit.h \
|
||||
$$PWD/yacreader_spin_slider_widget.h \
|
||||
@ -29,7 +29,7 @@ SOURCES += $$PWD/help_about_dialog.cpp \
|
||||
$$PWD/yacreader_field_plain_text_edit.cpp \
|
||||
$$PWD/yacreader_flow.cpp \
|
||||
$$PWD/yacreader_flow_config_widget.cpp \
|
||||
$$PWD/yacreader_gl_flow_config_widget.cpp \
|
||||
#$$PWD/yacreader_gl_flow_config_widget.cpp \
|
||||
$$PWD/yacreader_options_dialog.cpp \
|
||||
$$PWD/yacreader_search_line_edit.cpp \
|
||||
$$PWD/yacreader_spin_slider_widget.cpp \
|
||||
|
Reference in New Issue
Block a user