Merged in selmf/yacreader/develop (pull request #56)

Fixes for Qt 5.3 and Haiku
This commit is contained in:
Luis Ángel San Martín 2017-11-19 09:10:46 +00:00
commit 455509f2b8
22 changed files with 201 additions and 207 deletions

View File

@ -17,6 +17,11 @@ unix:!macx{
QMAKE_CXXFLAGS += -std=c++11 QMAKE_CXXFLAGS += -std=c++11
} }
unix:haiku {
DEFINES += _BSD_SOURCE
LIBS += -lnetwork -lbsd
}
CONFIG(force_angle) { CONFIG(force_angle) {
contains(QMAKE_TARGET.arch, x86_64) { contains(QMAKE_TARGET.arch, x86_64) {
Release:DESTDIR = ../release64_angle Release:DESTDIR = ../release64_angle

Binary file not shown.

View File

@ -19,6 +19,11 @@ QMAKE_MAC_SDK = macosx10.12
include (../config.pri) include (../config.pri)
include (../dependencies/pdf_backend.pri) include (../dependencies/pdf_backend.pri)
unix:haiku {
DEFINES += _BSD_SOURCE
LIBS += -lnetwork -lbsd
}
CONFIG(legacy_gl_widget) { CONFIG(legacy_gl_widget) {
INCLUDEPATH += ../common/gl_legacy \ INCLUDEPATH += ../common/gl_legacy \
} else { } else {
@ -48,8 +53,8 @@ CONFIG(force_angle) {
Release:DESTDIR = ../release64_angle Release:DESTDIR = ../release64_angle
Debug:DESTDIR = ../debug64_angle Debug:DESTDIR = ../debug64_angle
} else { } else {
Release:DESTDIR = ../release_angle Release:DESTDIR = ../release_angle
Debug:DESTDIR = ../debug_angle Debug:DESTDIR = ../debug_angle
} }
} else { } else {
contains(QMAKE_TARGET.arch, x86_64) { contains(QMAKE_TARGET.arch, x86_64) {
@ -66,11 +71,9 @@ unix:!macx:!CONFIG(no_opengl) {
} }
macx { macx {
LIBS += -framework Foundation -framework ApplicationServices -framework AppKit
LIBS += -framework Foundation -framework ApplicationServices -framework AppKit CONFIG += objective_c
QT += macextras gui-private
CONFIG += objective_c
QT += macextras gui-private
} }
unix:!macx { unix:!macx {

View File

@ -5,5 +5,5 @@ EmptyReadingListWidget::EmptyReadingListWidget(QWidget *parent)
{ {
setUpDefaultLayout(true); setUpDefaultLayout(true);
setPixmap(QPixmap(":/images/empty_reading_list")); setPixmap(QPixmap(":/images/empty_reading_list"));
setText(tr("This reading list doesn't cotain comics yet")); setText(tr("This reading list does not contain any comics yet"));
} }

View File

@ -566,7 +566,7 @@ void LibraryWindow::createActions()
expandAllNodesAction->setIcon(QIcon(":/images/sidebar/expand.png")); expandAllNodesAction->setIcon(QIcon(":/images/sidebar/expand.png"));
colapseAllNodesAction = new QAction(this); colapseAllNodesAction = new QAction(this);
colapseAllNodesAction->setToolTip(tr("Colapse all nodes")); colapseAllNodesAction->setToolTip(tr("Collapse all nodes"));
colapseAllNodesAction->setData(COLAPSE_ALL_NODES_ACTION_YL); colapseAllNodesAction->setData(COLAPSE_ALL_NODES_ACTION_YL);
colapseAllNodesAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(COLAPSE_ALL_NODES_ACTION_YL)); colapseAllNodesAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(COLAPSE_ALL_NODES_ACTION_YL));
colapseAllNodesAction->setIcon(QIcon(":/images/sidebar/colapse.png")); colapseAllNodesAction->setIcon(QIcon(":/images/sidebar/colapse.png"));
@ -654,7 +654,7 @@ void LibraryWindow::createActions()
editSelectedComicsAction->setIcon(QIcon(":/images/comics_view_toolbar/editComic.png")); editSelectedComicsAction->setIcon(QIcon(":/images/comics_view_toolbar/editComic.png"));
asignOrderAction = new QAction(this); asignOrderAction = new QAction(this);
asignOrderAction->setText(tr("Asign current order to comics")); asignOrderAction->setText(tr("Assign current order to comics"));
asignOrderAction->setData(ASIGN_ORDER_ACTION_YL); asignOrderAction->setData(ASIGN_ORDER_ACTION_YL);
asignOrderAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(ASIGN_ORDER_ACTION_YL)); asignOrderAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(ASIGN_ORDER_ACTION_YL));
asignOrderAction->setIcon(QIcon(":/images/comics_view_toolbar/asignNumber.png")); asignOrderAction->setIcon(QIcon(":/images/comics_view_toolbar/asignNumber.png"));
@ -2240,8 +2240,8 @@ void LibraryWindow::asignNumbers()
if(indexList.count()>1) if(indexList.count()>1)
{ {
bool ok; bool ok;
int n = QInputDialog::getInt(this, tr("Asign comics numbers"), int n = QInputDialog::getInt(this, tr("Assign comics numbers"),
tr("Asign numbers starting in:"), startingNumber,0,2147483647,1,&ok); tr("Assign numbers starting in:"), startingNumber,0,2147483647,1,&ok);
if (ok) if (ok)
startingNumber = n; startingNumber = n;
else else

View File

@ -63,7 +63,7 @@ OptionsDialog::OptionsDialog(QWidget * parent)
backgroundImageBlurRadiusSlider = new QSlider(Qt::Horizontal); backgroundImageBlurRadiusSlider = new QSlider(Qt::Horizontal);
backgroundImageBlurRadiusSlider->setRange(0,100); backgroundImageBlurRadiusSlider->setRange(0,100);
useCurrentComicCoverCheck = new QCheckBox(tr("Use selectec comic cover as background")); useCurrentComicCoverCheck = new QCheckBox(tr("Use selected comic cover as background"));
resetButton = new QPushButton(tr("Restore defautls")); resetButton = new QPushButton(tr("Restore defautls"));

View File

@ -177,7 +177,7 @@ void PropertiesDialog::createGeneralInfoBox()
arc->addStretch(1); arc->addStretch(1);
generalInfoLayout->addRow(tr("Story arc:"), arc); generalInfoLayout->addRow(tr("Story arc:"), arc);
generalInfoLayout->addRow(tr("Genere:"), genereEdit = new YACReaderFieldEdit()); generalInfoLayout->addRow(tr("Genre:"), genereEdit = new YACReaderFieldEdit());
generalInfoLayout->addRow(tr("Size:"), size = new QLabel("size")); generalInfoLayout->addRow(tr("Size:"), size = new QLabel("size"));

View File

@ -374,7 +374,7 @@
<name>EmptyReadingListWidget</name> <name>EmptyReadingListWidget</name>
<message> <message>
<location filename="empty_reading_list_widget.cpp" line="8"/> <location filename="empty_reading_list_widget.cpp" line="8"/>
<source>This reading list doesn&apos;t cotain comics yet</source> <source>This reading list doesn&apos;t contain comics yet</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
</context> </context>
@ -1219,7 +1219,7 @@ YACReaderLibrary will not stop you from creating more libraries but you should k
<name>NoLibrariesWidget</name> <name>NoLibrariesWidget</name>
<message> <message>
<location filename="no_libraries_widget.cpp" line="26"/> <location filename="no_libraries_widget.cpp" line="26"/>
<source>You don&apos;t have any librarires yet</source> <source>You don&apos;t have any libraries yet</source>
<translation>Sie haben im Augenblick keine Bibliothek</translation> <translation>Sie haben im Augenblick keine Bibliothek</translation>
</message> </message>
<message> <message>
@ -1267,7 +1267,7 @@ YACReaderLibrary will not stop you from creating more libraries but you should k
</message> </message>
<message> <message>
<location filename="options_dialog.cpp" line="66"/> <location filename="options_dialog.cpp" line="66"/>
<source>Use selectec comic cover as background</source> <source>Use selected comic cover as background</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>

View File

@ -374,7 +374,7 @@
<name>EmptyReadingListWidget</name> <name>EmptyReadingListWidget</name>
<message> <message>
<location filename="empty_reading_list_widget.cpp" line="8"/> <location filename="empty_reading_list_widget.cpp" line="8"/>
<source>This reading list doesn&apos;t cotain comics yet</source> <source>This reading list doesn&apos;t contain comics yet</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
</context> </context>
@ -1220,7 +1220,7 @@ YACReaderLibrary will not stop you from creating more libraries but you should k
<name>NoLibrariesWidget</name> <name>NoLibrariesWidget</name>
<message> <message>
<location filename="no_libraries_widget.cpp" line="26"/> <location filename="no_libraries_widget.cpp" line="26"/>
<source>You don&apos;t have any librarires yet</source> <source>You don&apos;t have any libraries yet</source>
<translation>Aún no tienes ninguna biblioteca</translation> <translation>Aún no tienes ninguna biblioteca</translation>
</message> </message>
<message> <message>
@ -1268,7 +1268,7 @@ YACReaderLibrary will not stop you from creating more libraries but you should k
</message> </message>
<message> <message>
<location filename="options_dialog.cpp" line="66"/> <location filename="options_dialog.cpp" line="66"/>
<source>Use selectec comic cover as background</source> <source>Use selected comic cover as background</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>

View File

@ -370,7 +370,7 @@
<name>EmptyReadingListWidget</name> <name>EmptyReadingListWidget</name>
<message> <message>
<location filename="empty_reading_list_widget.cpp" line="8"/> <location filename="empty_reading_list_widget.cpp" line="8"/>
<source>This reading list doesn&apos;t cotain comics yet</source> <source>This reading list doesn&apos;t contain comics yet</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
</context> </context>
@ -1214,7 +1214,7 @@ YACReaderLibrary will not stop you from creating more libraries but you should k
<name>NoLibrariesWidget</name> <name>NoLibrariesWidget</name>
<message> <message>
<location filename="no_libraries_widget.cpp" line="26"/> <location filename="no_libraries_widget.cpp" line="26"/>
<source>You don&apos;t have any librarires yet</source> <source>You don&apos;t have any libraries yet</source>
<translation>Vous n&apos;avez pas encore de librairie</translation> <translation>Vous n&apos;avez pas encore de librairie</translation>
</message> </message>
<message> <message>
@ -1262,7 +1262,7 @@ YACReaderLibrary will not stop you from creating more libraries but you should k
</message> </message>
<message> <message>
<location filename="options_dialog.cpp" line="66"/> <location filename="options_dialog.cpp" line="66"/>
<source>Use selectec comic cover as background</source> <source>Use selected comic cover as background</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>

View File

@ -370,7 +370,7 @@
<name>EmptyReadingListWidget</name> <name>EmptyReadingListWidget</name>
<message> <message>
<location filename="empty_reading_list_widget.cpp" line="8"/> <location filename="empty_reading_list_widget.cpp" line="8"/>
<source>This reading list doesn&apos;t cotain comics yet</source> <source>This reading list doesn&apos;t contain comics yet</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
</context> </context>
@ -1214,8 +1214,8 @@ YACReaderLibrary will not stop you from creating more libraries but you should k
<name>NoLibrariesWidget</name> <name>NoLibrariesWidget</name>
<message> <message>
<location filename="no_libraries_widget.cpp" line="26"/> <location filename="no_libraries_widget.cpp" line="26"/>
<source>You don&apos;t have any librarires yet</source> <source>You don&apos;t have any libraries yet</source>
<translation type="unfinished">Je hebt geen nog librarires</translation> <translation type="unfinished">Je hebt geen nog libraries</translation>
</message> </message>
<message> <message>
<location filename="no_libraries_widget.cpp" line="28"/> <location filename="no_libraries_widget.cpp" line="28"/>
@ -1262,7 +1262,7 @@ YACReaderLibrary will not stop you from creating more libraries but you should k
</message> </message>
<message> <message>
<location filename="options_dialog.cpp" line="66"/> <location filename="options_dialog.cpp" line="66"/>
<source>Use selectec comic cover as background</source> <source>Use selected comic cover as background</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>

View File

@ -370,7 +370,7 @@
<name>EmptyReadingListWidget</name> <name>EmptyReadingListWidget</name>
<message> <message>
<location filename="empty_reading_list_widget.cpp" line="8"/> <location filename="empty_reading_list_widget.cpp" line="8"/>
<source>This reading list doesn&apos;t cotain comics yet</source> <source>This reading list doesn&apos;t contain comics yet</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
</context> </context>
@ -1200,7 +1200,7 @@ YACReaderLibrary will not stop you from creating more libraries but you should k
<name>NoLibrariesWidget</name> <name>NoLibrariesWidget</name>
<message> <message>
<location filename="no_libraries_widget.cpp" line="26"/> <location filename="no_libraries_widget.cpp" line="26"/>
<source>You don&apos;t have any librarires yet</source> <source>You don&apos;t have any libraries yet</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
@ -1248,7 +1248,7 @@ YACReaderLibrary will not stop you from creating more libraries but you should k
</message> </message>
<message> <message>
<location filename="options_dialog.cpp" line="66"/> <location filename="options_dialog.cpp" line="66"/>
<source>Use selectec comic cover as background</source> <source>Use selected comic cover as background</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>

View File

@ -370,7 +370,7 @@
<name>EmptyReadingListWidget</name> <name>EmptyReadingListWidget</name>
<message> <message>
<location filename="empty_reading_list_widget.cpp" line="8"/> <location filename="empty_reading_list_widget.cpp" line="8"/>
<source>This reading list doesn&apos;t cotain comics yet</source> <source>This reading list doesn&apos;t contain comics yet</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
</context> </context>
@ -1204,7 +1204,7 @@ YACReaderLibrary will not stop you from creating more libraries but you should k
<name>NoLibrariesWidget</name> <name>NoLibrariesWidget</name>
<message> <message>
<location filename="no_libraries_widget.cpp" line="26"/> <location filename="no_libraries_widget.cpp" line="26"/>
<source>You don&apos;t have any librarires yet</source> <source>You don&apos;t have any libraries yet</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
@ -1252,7 +1252,7 @@ YACReaderLibrary will not stop you from creating more libraries but you should k
</message> </message>
<message> <message>
<location filename="options_dialog.cpp" line="66"/> <location filename="options_dialog.cpp" line="66"/>
<source>Use selectec comic cover as background</source> <source>Use selected comic cover as background</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>

View File

@ -370,7 +370,7 @@
<name>EmptyReadingListWidget</name> <name>EmptyReadingListWidget</name>
<message> <message>
<location filename="empty_reading_list_widget.cpp" line="8"/> <location filename="empty_reading_list_widget.cpp" line="8"/>
<source>This reading list doesn&apos;t cotain comics yet</source> <source>This reading list doesn&apos;t contain any comics yet</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
</context> </context>
@ -1190,7 +1190,7 @@ YACReaderLibrary will not stop you from creating more libraries but you should k
<name>NoLibrariesWidget</name> <name>NoLibrariesWidget</name>
<message> <message>
<location filename="no_libraries_widget.cpp" line="26"/> <location filename="no_libraries_widget.cpp" line="26"/>
<source>You don&apos;t have any librarires yet</source> <source>You don&apos;t have any libraries yet</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
@ -1238,7 +1238,7 @@ YACReaderLibrary will not stop you from creating more libraries but you should k
</message> </message>
<message> <message>
<location filename="options_dialog.cpp" line="66"/> <location filename="options_dialog.cpp" line="66"/>
<source>Use selectec comic cover as background</source> <source>Use selected comic cover as background</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>

View File

@ -297,7 +297,7 @@
<context> <context>
<name>EmptyReadingListWidget</name> <name>EmptyReadingListWidget</name>
<message> <message>
<source>This reading list doesn&apos;t cotain comics yet</source> <source>This reading list doesn&apos;t contain comics yet</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
</context> </context>
@ -1048,7 +1048,7 @@ YACReaderLibrary will not stop you from creating more libraries but you should k
<translation>İlk kütüphaneni oluştur</translation> <translation>İlk kütüphaneni oluştur</translation>
</message> </message>
<message> <message>
<source>You don&apos;t have any librarires yet</source> <source>You don&apos;t have any libraries yet</source>
<translation>Henüz bir kütüphaneye sahip değilsin</translation> <translation>Henüz bir kütüphaneye sahip değilsin</translation>
</message> </message>
<message> <message>
@ -1087,7 +1087,7 @@ YACReaderLibrary will not stop you from creating more libraries but you should k
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<source>Use selectec comic cover as background</source> <source>Use selected comic cover as background</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>

View File

@ -33,6 +33,11 @@ unix {
CONFIG += c++11 CONFIG += c++11
} }
unix:haiku {
DEFINES += _BSD_SOURCE
LIBS += -lnetwork -lbsd
}
#CONFIG += release #CONFIG += release
CONFIG -= flat CONFIG -= flat
QT += core sql network QT += core sql network
@ -144,7 +149,7 @@ isEmpty(DESTDIR) {
server.path = $$DATADIR/yacreader server.path = $$DATADIR/yacreader
server.files = ../release/server server.files = ../release/server
systemd.path = $$LIBDIR/systemd/system systemd.path = $$LIBDIR/systemd/user
systemd.files = yacreaderlibraryserver.service systemd.files = yacreaderlibraryserver.service
translation.path = $$DATADIR/yacreader/languages translation.path = $$DATADIR/yacreader/languages

View File

@ -1,5 +1,5 @@
[Unit] [Unit]
Description=YACReaderLibrary headless server Description= YACReaderLibrary headless server
After=network.target After=network.target
[Service] [Service]
@ -8,4 +8,4 @@ Restart=always
ExecStart=/usr/bin/YACReaderLibraryServer start ExecStart=/usr/bin/YACReaderLibraryServer start
[Install] [Install]
WantedBy=multi-user.target WantedBy=default.target

View File

@ -200,7 +200,7 @@ struct Preset pressetYACReaderFlowDownConfig = {
}; };
/*Constructor*/ /*Constructor*/
YACReaderFlowGL::YACReaderFlowGL(QWidget *parent,struct Preset p) YACReaderFlowGL::YACReaderFlowGL(QWidget *parent,struct Preset p)
:QGLWidget(QGLFormat(QGL::SampleBuffers), parent),numObjects(0),lazyPopulateObjects(-1),bUseVSync(false),hasBeenInitialized(false) :QGLWidget(QGLFormat(QGL::SampleBuffers), parent),numObjects(0),lazyPopulateObjects(-1),bUseVSync(false),hasBeenInitialized(false),flowRightToLeft(false)
{ {
updateCount = 0; updateCount = 0;
config = p; config = p;
@ -354,6 +354,9 @@ void YACReaderFlowGL::udpatePerspective(int width, int height)
/*Private*/ /*Private*/
void YACReaderFlowGL::calcPos(YACReader3DImage & image, int pos) void YACReaderFlowGL::calcPos(YACReader3DImage & image, int pos)
{ {
if(flowRightToLeft){
pos = pos * -1;
}
if(pos == 0){ if(pos == 0){
image.current = centerPos; image.current = centerPos;
}else{ }else{
@ -1025,6 +1028,11 @@ void YACReaderFlowGL::render()
//do nothing //do nothing
} }
void YACReaderFlowGL::setFlowRightToLeft(bool b)
{
flowRightToLeft = b;
}
//EVENTOS //EVENTOS
void YACReaderFlowGL::wheelEvent(QWheelEvent * event) void YACReaderFlowGL::wheelEvent(QWheelEvent * event)
{ {
@ -1045,7 +1053,7 @@ void YACReaderFlowGL::wheelEvent(QWheelEvent * event)
void YACReaderFlowGL::keyPressEvent(QKeyEvent *event) void YACReaderFlowGL::keyPressEvent(QKeyEvent *event)
{ {
if(event->key() == Qt::Key_Left) if((event->key() == Qt::Key_Left && !flowRightToLeft) || (event->key() == Qt::Key_Right && flowRightToLeft))
{ {
if(event->modifiers() == Qt::ControlModifier) if(event->modifiers() == Qt::ControlModifier)
setCurrentIndex((currentSelected-10<0)?0:currentSelected-10); setCurrentIndex((currentSelected-10<0)?0:currentSelected-10);
@ -1055,7 +1063,7 @@ void YACReaderFlowGL::keyPressEvent(QKeyEvent *event)
return; return;
} }
if(event->key() == Qt::Key_Right) if((event->key() == Qt::Key_Right && !flowRightToLeft) || (event->key() == Qt::Key_Left && flowRightToLeft))
{ {
if(event->modifiers() == Qt::ControlModifier) if(event->modifiers() == Qt::ControlModifier)
setCurrentIndex((currentSelected+10>=numObjects)?numObjects-1:currentSelected+10); setCurrentIndex((currentSelected+10>=numObjects)?numObjects-1:currentSelected+10);
@ -1067,7 +1075,7 @@ void YACReaderFlowGL::keyPressEvent(QKeyEvent *event)
if(event->key() == Qt::Key_Up) if(event->key() == Qt::Key_Up)
{ {
//emit selected(centerIndex()); //emit selected(centerIndex());
return; return;
} }
@ -1098,7 +1106,7 @@ void YACReaderFlowGL::mousePressEvent(QMouseEvent *event)
gluUnProject( winX, winY, winZ, modelview, projection, viewport, &posX, &posY, &posZ); gluUnProject( winX, winY, winZ, modelview, projection, viewport, &posX, &posY, &posZ);
if(posX >= 0.5) if((posX >= 0.5 && !flowRightToLeft) || (posX <=-0.5 && flowRightToLeft))
{ {
//int index = currentSelected+1; //int index = currentSelected+1;
//while((cfImages[index].current.x-cfImages[index].width/(2.0*config.rotation)) < posX) //while((cfImages[index].current.x-cfImages[index].width/(2.0*config.rotation)) < posX)
@ -1106,7 +1114,7 @@ void YACReaderFlowGL::mousePressEvent(QMouseEvent *event)
//setCurrentIndex(index-1); //setCurrentIndex(index-1);
showNext(); showNext();
} }
else if(posX <=-0.5) else if((posX <=-0.5 && !flowRightToLeft) || (posX >= 0.5 && flowRightToLeft) )
showPrevious(); showPrevious();
} else } else
QGLWidget::mousePressEvent(event); QGLWidget::mousePressEvent(event);
@ -1595,4 +1603,3 @@ QImage ImageLoaderByteArrayGL::result()
{ {
return img; return img;
} }

View File

@ -143,6 +143,9 @@ protected:
QVector<YACReader3DImage> images; QVector<YACReader3DImage> images;
bool hasBeenInitialized; bool hasBeenInitialized;
// sets flow direction right-to-left (manga mode)
bool flowRightToLeft;
Performance performance; Performance performance;
bool bUseVSync; bool bUseVSync;
@ -248,6 +251,8 @@ public:
void useVSync(bool b); void useVSync(bool b);
void setFlowRightToLeft(bool b);
virtual void updateImageData() = 0; virtual void updateImageData() = 0;
void reset(); void reset();

View File

@ -10,39 +10,39 @@ QT_VER_MIN = $$member(QT_VERSION, 1)
lessThan(QT_VER_MAJ, 5) { lessThan(QT_VER_MAJ, 5) {
error(YACReader requires Qt 5 or newer but Qt $$[QT_VERSION] was detected.) error(YACReader requires Qt 5 or newer but Qt $$[QT_VERSION] was detected.)
} }
lessThan(QT_VER_MIN, 4):!CONFIG(no_opengl) { lessThan(QT_VER_MIN, 4):!CONFIG(no_opengl) {
CONFIG += legacy_gl_widget CONFIG += legacy_gl_widget
message ("Qt < 5.4 detected. Using QGLWidget for coverflow.") message ("Qt < 5.4 detected. Using QGLWidget for coverflow.")
} }
lessThan(QT_VER_MIN, 3){ lessThan(QT_VER_MIN, 3){
error ("You need at least Qt 5.3 to build YACReader or YACReaderLibrary") error ("You need at least Qt 5.3 to build YACReader or YACReaderLibrary")
} }
#build without opengl widget support #build without opengl widget support
CONFIG(no_opengl) { CONFIG(no_opengl) {
DEFINES += NO_OPENGL DEFINES += NO_OPENGL
} }
#default values for decompression backends #default values for decompression backends
!CONFIG(unarr):!CONFIG(7zip) { !CONFIG(unarr):!CONFIG(7zip) {
unix { unix {
CONFIG += unarr CONFIG += unarr
} }
win32 { win32 {
CONFIG += unarr CONFIG += unarr
} }
} }
#default values for pdf render backend #default values for pdf render backend
win32:!CONFIG(poppler):!CONFIG(pdfium) { win32:!CONFIG(poppler):!CONFIG(pdfium) {
CONFIG += pdfium CONFIG += pdfium
} }
unix:!macx:!CONFIG(poppler):!CONFIG(pdfium) { unix:!macx:!CONFIG(poppler):!CONFIG(pdfium) {
CONFIG += poppler CONFIG += poppler
} }
macx:!CONFIG(pdfkit):!CONFIG(pdfium) { macx:!CONFIG(pdfkit):!CONFIG(pdfium) {
CONFIG += pdfium CONFIG += pdfium
} }

View File

@ -1,31 +0,0 @@
echo Setting up a Qt environment...
set QTDIR=D:\Desarrollo\Qt\4.8.5
echo -- QTDIR set to D:\Desarrollo\Qt\4.8.5
set PATH=D:\Desarrollo\Qt\4.8.5\bin;%PATH%
echo -- Added D:\Desarrollo\Qt\4.8.5\bin to PATH
set QMAKESPEC=win32-msvc2010
echo -- QMAKESPEC set to "win32-msvc2010"
if not "%1"=="vsvars" goto ENDVSVARS
call "C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\Tools\vsvars32.bat"
:ENDVSVARS
if not "%1"=="vsstart" goto ENDVSSTART
call "C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\Tools\vsvars32.bat"
devenv /useenv
:ENDVSSTART
cd YACReader
echo Entering YACReader
qmake -spec win32-msvc2010 -tp vc YACReader.pro
echo qmake -spec win32-msvc2010 -tp vc YACReader.pro
cd ..
echo leaving YACReader
cd YACReaderLibrary
echo Entering YACReaderLibrary
qmake -spec win32-msvc2010 -tp vc YACReaderLibrary.pro
echo qmake -spec win32-msvc2010 -tp vc YACReaderLibrary.pro
cd ..