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