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

@ -128,7 +128,7 @@ void LibraryWindow::setupUI()
createActions(); createActions();
doModels(); doModels();
doDialogs(); doDialogs();
doLayout(); doLayout();
createToolBars(); createToolBars();
@ -250,7 +250,7 @@ void LibraryWindow::doLayout()
#else #else
sHorizontal->addWidget(comicsViewsManager->containerWidget()); sHorizontal->addWidget(comicsViewsManager->containerWidget());
#endif #endif
sHorizontal->setStretchFactor(0,0); sHorizontal->setStretchFactor(0,0);
sHorizontal->setStretchFactor(1,1); sHorizontal->setStretchFactor(1,1);
mainWidget = new QStackedWidget(this); mainWidget = new QStackedWidget(this);
@ -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"));
@ -840,7 +840,7 @@ void LibraryWindow::createToolBars()
libraryToolBar->attachToWindow(this->windowHandle()); libraryToolBar->attachToWindow(this->windowHandle());
#else #else
libraryToolBar->backButton->setDefaultAction(backAction); libraryToolBar->backButton->setDefaultAction(backAction);
libraryToolBar->forwardButton->setDefaultAction(forwardAction); libraryToolBar->forwardButton->setDefaultAction(forwardAction);
@ -858,9 +858,9 @@ void LibraryWindow::createToolBars()
editInfoToolBar->addAction(editSelectedComicsAction); editInfoToolBar->addAction(editSelectedComicsAction);
editInfoToolBar->addAction(getInfoAction); editInfoToolBar->addAction(getInfoAction);
editInfoToolBar->addAction(asignOrderAction); editInfoToolBar->addAction(asignOrderAction);
editInfoToolBar->addSeparator(); editInfoToolBar->addSeparator();
editInfoToolBar->addAction(selectAllComicsAction); editInfoToolBar->addAction(selectAllComicsAction);
editInfoToolBar->addSeparator(); editInfoToolBar->addSeparator();
@ -873,7 +873,7 @@ void LibraryWindow::createToolBars()
editInfoToolBar->addAction(showHideMarksAction); editInfoToolBar->addAction(showHideMarksAction);
editInfoToolBar->addSeparator(); editInfoToolBar->addSeparator();
editInfoToolBar->addAction(deleteComicsAction); editInfoToolBar->addAction(deleteComicsAction);
@ -897,7 +897,7 @@ void LibraryWindow::createMenus()
foldersView->addAction(setFolderAsReadAction); foldersView->addAction(setFolderAsReadAction);
foldersView->addAction(setFolderAsUnreadAction); foldersView->addAction(setFolderAsUnreadAction);
selectedLibrary->addAction(updateLibraryAction); selectedLibrary->addAction(updateLibraryAction);
selectedLibrary->addAction(renameLibraryAction); selectedLibrary->addAction(renameLibraryAction);
selectedLibrary->addAction(removeLibraryAction); selectedLibrary->addAction(removeLibraryAction);
YACReader::addSperator(selectedLibrary); YACReader::addSperator(selectedLibrary);
@ -911,7 +911,7 @@ void LibraryWindow::createMenus()
//MacOSX app menus //MacOSX app menus
#ifdef Q_OS_MACX #ifdef Q_OS_MACX
QMenuBar * menu = this->menuBar(); QMenuBar * menu = this->menuBar();
@ -1120,7 +1120,7 @@ void LibraryWindow::createConnections()
void LibraryWindow::loadLibrary(const QString & name) void LibraryWindow::loadLibrary(const QString & name)
{ {
if(!libraries.isEmpty()) //si hay bibliotecas... if(!libraries.isEmpty()) //si hay bibliotecas...
{ {
historyController->clear(); historyController->clear();
showRootWidget(); showRootWidget();
@ -1230,7 +1230,7 @@ void LibraryWindow::loadLibrary(const QString & name)
} }
else//si existe el path, puede ser que la librería sea alguna versión pre-5.0 ó que esté corrupta o que no haya drivers sql else//si existe el path, puede ser que la librería sea alguna versión pre-5.0 ó que esté corrupta o que no haya drivers sql
{ {
if(d.exists(path+"/library.ydb")) if(d.exists(path+"/library.ydb"))
{ {
QSqlDatabase db = DataBaseManagement::loadDatabase(path); QSqlDatabase db = DataBaseManagement::loadDatabase(path);
@ -1310,7 +1310,7 @@ void LibraryWindow::copyAndImportComicsToFolder(const QList<QPair<QString,QStrin
{ {
QLOG_DEBUG() << "-copyAndImportComicsToFolder-"; QLOG_DEBUG() << "-copyAndImportComicsToFolder-";
if(comics.size()>0) if(comics.size()>0)
{ {
QModelIndex folderDestination = foldersModelProxy->mapToSource(miFolder); QModelIndex folderDestination = foldersModelProxy->mapToSource(miFolder);
QString destFolderPath = QDir::cleanPath(currentPath()+foldersModel->getFolderPath(folderDestination)); QString destFolderPath = QDir::cleanPath(currentPath()+foldersModel->getFolderPath(folderDestination));
@ -1773,7 +1773,7 @@ void LibraryWindow::openComic()
quint64 comicId = comic.id; quint64 comicId = comic.id;
//TODO generate IDS for libraries... //TODO generate IDS for libraries...
quint64 libraryId = libraries.getId(selectedLibrary->currentText()); quint64 libraryId = libraries.getId(selectedLibrary->currentText());
// %1 %2 %3 NO-->%4 %5 %6 %7 %8 %9 %10 // %1 %2 %3 NO-->%4 %5 %6 %7 %8 %9 %10
//Invoke YACReader comicPath comicId libraryId NO-->currentPage bookmark1 bookmark2 bookmark3 brightness contrast gamma //Invoke YACReader comicPath comicId libraryId NO-->currentPage bookmark1 bookmark2 bookmark3 brightness contrast gamma
bool yacreaderFound = false; bool yacreaderFound = false;
@ -1854,7 +1854,7 @@ void LibraryWindow::reloadCurrentLibrary() {
void LibraryWindow::openLastCreated() void LibraryWindow::openLastCreated()
{ {
selectedLibrary->disconnect(); selectedLibrary->disconnect();
selectedLibrary->setCurrentIndex(selectedLibrary->findText(_lastAdded)); selectedLibrary->setCurrentIndex(selectedLibrary->findText(_lastAdded));
@ -1864,7 +1864,7 @@ void LibraryWindow::openLastCreated()
libraries.save(); libraries.save();
connect(selectedLibrary,SIGNAL(currentIndexChanged(QString)),this,SLOT(loadLibrary(QString))); connect(selectedLibrary,SIGNAL(currentIndexChanged(QString)),this,SLOT(loadLibrary(QString)));
loadLibrary(_lastAdded); loadLibrary(_lastAdded);
} }
@ -1875,12 +1875,12 @@ void LibraryWindow::showAddLibrary()
} }
void LibraryWindow::openLibrary(QString path, QString name) void LibraryWindow::openLibrary(QString path, QString name)
{ {
if(!libraries.contains(name)) if(!libraries.contains(name))
{ {
//TODO: fix bug, /a/b/c/.yacreaderlibrary/d/e //TODO: fix bug, /a/b/c/.yacreaderlibrary/d/e
path.remove("/.yacreaderlibrary"); path.remove("/.yacreaderlibrary");
QDir d; //TODO change this by static methods (utils class?? with delTree for example) QDir d; //TODO change this by static methods (utils class?? with delTree for example)
if(d.exists(path + "/.yacreaderlibrary")) if(d.exists(path + "/.yacreaderlibrary"))
{ {
_lastAdded = name; _lastAdded = name;
@ -2021,9 +2021,9 @@ void LibraryWindow::stopLibraryCreator()
void LibraryWindow::setRootIndex() void LibraryWindow::setRootIndex()
{ {
if(!libraries.isEmpty()) if(!libraries.isEmpty())
{ {
QString path=libraries.getPath(selectedLibrary->currentText())+"/.yacreaderlibrary"; QString path=libraries.getPath(selectedLibrary->currentText())+"/.yacreaderlibrary";
QDir d; //TODO change this by static methods (utils class?? with delTree for example) QDir d; //TODO change this by static methods (utils class?? with delTree for example)
if(d.exists(path)) if(d.exists(path))
{ {
navigationController->selectedFolder(QModelIndex()); navigationController->selectedFolder(QModelIndex());
@ -2166,7 +2166,7 @@ void LibraryWindow::showProperties()
propertiesDialog->databasePath = foldersModel->getDatabase(); propertiesDialog->databasePath = foldersModel->getDatabase();
propertiesDialog->basePath = currentPath(); propertiesDialog->basePath = currentPath();
propertiesDialog->setComics(comics); propertiesDialog->setComics(comics);
propertiesDialog->show(); propertiesDialog->show();
} }
@ -2240,15 +2240,15 @@ 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
return; return;
} }
qint64 edited = comicsModel->asignNumbers(indexList,startingNumber); qint64 edited = comicsModel->asignNumbers(indexList,startingNumber);
//TODO add resorting without reloading //TODO add resorting without reloading
navigationController->loadFolderInfo(foldersModelProxy->mapToSource(foldersView->currentIndex())); navigationController->loadFolderInfo(foldersModelProxy->mapToSource(foldersView->currentIndex()));
@ -2282,7 +2282,7 @@ QFileInfo file = QDir::cleanPath(currentPath() + comicsModel->getComicPath(model
args << "end tell"; args << "end tell";
QProcess::startDetached("osascript", args); QProcess::startDetached("osascript", args);
#endif #endif
#ifdef Q_OS_WIN #ifdef Q_OS_WIN
QString filePath = file.absoluteFilePath(); QString filePath = file.absoluteFilePath();
QString cmdArgs = QString("/select,\"") + QDir::toNativeSeparators(filePath) + QStringLiteral("\""); QString cmdArgs = QString("/select,\"") + QDir::toNativeSeparators(filePath) + QStringLiteral("\"");
@ -2569,7 +2569,7 @@ void LibraryWindow::showFoldersContextMenu(const QPoint &point)
/* /*
void LibraryWindow::showSocial() void LibraryWindow::showSocial()
{ {
socialDialog->move(this->mapToGlobal(QPoint(width()-socialDialog->width()-10, centralWidget()->pos().y()+10))); socialDialog->move(this->mapToGlobal(QPoint(width()-socialDialog->width()-10, centralWidget()->pos().y()+10)));
QModelIndexList indexList = getSelectedComics(); QModelIndexList indexList = getSelectedComics();

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

@ -89,7 +89,7 @@ void PropertiesDialog::createCoverBox()
layout->addStretch(); layout->addStretch();
coverPageEdit = new YACReaderFieldEdit(); coverPageEdit = new YACReaderFieldEdit();
showPreviousCoverPageButton = new QToolButton(); showPreviousCoverPageButton = new QToolButton();
showPreviousCoverPageButton->setIcon(QIcon(":/images/previousCoverPage.png")); showPreviousCoverPageButton->setIcon(QIcon(":/images/previousCoverPage.png"));
showPreviousCoverPageButton->setStyleSheet("QToolButton {border:none;}"); showPreviousCoverPageButton->setStyleSheet("QToolButton {border:none;}");
@ -122,7 +122,7 @@ void PropertiesDialog::createCoverBox()
connect(showPreviousCoverPageButton,SIGNAL(clicked()),this,SLOT(loadPreviousCover())); connect(showPreviousCoverPageButton,SIGNAL(clicked()),this,SLOT(loadPreviousCover()));
connect(showNextCoverPageButton,SIGNAL(clicked()),this,SLOT(loadNextCover())); connect(showNextCoverPageButton,SIGNAL(clicked()),this,SLOT(loadNextCover()));
} }
QFrame * createLine() QFrame * createLine()
@ -145,7 +145,7 @@ void PropertiesDialog::createGeneralInfoBox()
generalInfoLayout->setFieldGrowthPolicy(QFormLayout::ExpandingFieldsGrow); generalInfoLayout->setFieldGrowthPolicy(QFormLayout::ExpandingFieldsGrow);
//generalInfoLayout->setRowWrapPolicy(QFormLayout::WrapAllRows); //generalInfoLayout->setRowWrapPolicy(QFormLayout::WrapAllRows);
generalInfoLayout->addRow(tr("Title:"), title = new YACReaderFieldEdit()); generalInfoLayout->addRow(tr("Title:"), title = new YACReaderFieldEdit());
QHBoxLayout * number = new QHBoxLayout; QHBoxLayout * number = new QHBoxLayout;
number->addWidget(numberEdit = new YACReaderFieldEdit()); number->addWidget(numberEdit = new YACReaderFieldEdit());
@ -161,7 +161,7 @@ void PropertiesDialog::createGeneralInfoBox()
/*generalInfoLayout->addRow(tr("&Issue number:"), ); /*generalInfoLayout->addRow(tr("&Issue number:"), );
generalInfoLayout->addRow(tr("&Bis:"), );*/ generalInfoLayout->addRow(tr("&Bis:"), );*/
generalInfoLayout->addRow(tr("Issue number:"), number); generalInfoLayout->addRow(tr("Issue number:"), number);
generalInfoLayout->addRow(tr("Volume:"), volumeEdit = new YACReaderFieldEdit()); generalInfoLayout->addRow(tr("Volume:"), volumeEdit = new YACReaderFieldEdit());
QHBoxLayout * arc = new QHBoxLayout; QHBoxLayout * arc = new QHBoxLayout;
@ -176,9 +176,9 @@ void PropertiesDialog::createGeneralInfoBox()
arcCountEdit->setValidator(&arcCountValidator); arcCountEdit->setValidator(&arcCountValidator);
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"));
//generalInfoLayout->addRow(tr("Comic Vine link:"), comicVineLink = new QLabel("...")); //generalInfoLayout->addRow(tr("Comic Vine link:"), comicVineLink = new QLabel("..."));
@ -196,7 +196,7 @@ void PropertiesDialog::createGeneralInfoBox()
void PropertiesDialog::createAuthorsBox() void PropertiesDialog::createAuthorsBox()
{ {
authorsBox = new QWidget; authorsBox = new QWidget;
QVBoxLayout *authorsLayout = new QVBoxLayout; QVBoxLayout *authorsLayout = new QVBoxLayout;
//authorsLayout->setRowWrapPolicy(QFormLayout::WrapAllRows); //authorsLayout->setRowWrapPolicy(QFormLayout::WrapAllRows);
@ -220,7 +220,7 @@ void PropertiesDialog::createAuthorsBox()
vr2->addWidget(new QLabel(tr("Colorist(s):"))); vr2->addWidget(new QLabel(tr("Colorist(s):")));
vr2->addWidget(colorist = new YACReaderFieldPlainTextEdit()); vr2->addWidget(colorist = new YACReaderFieldPlainTextEdit());
h2->addLayout(vr2); h2->addLayout(vr2);
//authorsLayout->addRow(tr("Inker(s):"), new YACReaderFieldPlainTextEdit()); //authorsLayout->addRow(tr("Inker(s):"), new YACReaderFieldPlainTextEdit());
//authorsLayout->addRow(tr("Colorist(s):"), new YACReaderFieldPlainTextEdit()); //authorsLayout->addRow(tr("Colorist(s):"), new YACReaderFieldPlainTextEdit());
@ -247,7 +247,7 @@ void PropertiesDialog::createAuthorsBox()
void PropertiesDialog::createPublishingBox() void PropertiesDialog::createPublishingBox()
{ {
publishingBox = new QWidget; publishingBox = new QWidget;
QFormLayout *publishingLayout = new QFormLayout; QFormLayout *publishingLayout = new QFormLayout;
publishingLayout->setFieldGrowthPolicy(QFormLayout::ExpandingFieldsGrow); publishingLayout->setFieldGrowthPolicy(QFormLayout::ExpandingFieldsGrow);
@ -399,10 +399,10 @@ void PropertiesDialog::setComics(QList<ComicDB> comics)
int coverPage = comic.info.coverPage.toInt(); int coverPage = comic.info.coverPage.toInt();
coverPageNumberLabel->setText(QString::number(coverPage)); coverPageNumberLabel->setText(QString::number(coverPage));
coverPageNumberLabel->adjustSize(); coverPageNumberLabel->adjustSize();
showPreviousCoverPageButton->setEnabled(true); showPreviousCoverPageButton->setEnabled(true);
showNextCoverPageButton->setEnabled(true); showNextCoverPageButton->setEnabled(true);
if(coverPage == 1) if(coverPage == 1)
showPreviousCoverPageButton->setDisabled(true); showPreviousCoverPageButton->setDisabled(true);
if(coverPage == comic.info.numPages.toInt()) if(coverPage == comic.info.numPages.toInt())
@ -496,7 +496,7 @@ void PropertiesDialog::setComics(QList<ComicDB> comics)
{ {
if(itr->info.title.isNull() || itr->info.title.toString() != title->text()) if(itr->info.title.isNull() || itr->info.title.toString() != title->text())
title->clear(); title->clear();
if(itr->info.count.isNull() || itr->info.count.toString() != countEdit->text()) if(itr->info.count.isNull() || itr->info.count.toString() != countEdit->text())
countEdit->clear(); countEdit->clear();
@ -605,7 +605,7 @@ void PropertiesDialog::setNumpages(int pagesNum)
} }
void PropertiesDialog::setSize(float sizeFloat) void PropertiesDialog::setSize(float sizeFloat)
{ {
size->setText(QString::number(sizeFloat,'f',2) + " MB"); size->setText(QString::number(sizeFloat,'f',2) + " MB");
} }
@ -813,7 +813,7 @@ void PropertiesDialog::closeEvent ( QCloseEvent * e )
synopsis->clear(); synopsis->clear();
characters->clear(); characters->clear();
notes->clear(); notes->clear();
setDisableUniqueValues(false); setDisableUniqueValues(false);
tabBar->setCurrentIndex(0); tabBar->setCurrentIndex(0);
@ -850,7 +850,7 @@ void PropertiesDialog::loadNextCover()
if(current < comics.at(0).info.numPages.toInt()) if(current < comics.at(0).info.numPages.toInt())
{ {
updateCoverPageNumberLabel(current+1); updateCoverPageNumberLabel(current+1);
ThumbnailCreator tc(basePath+comics[0].path,"",current+1); ThumbnailCreator tc(basePath+comics[0].path,"",current+1);
tc.create(); tc.create();
setCover(tc.getCover()); setCover(tc.getCover());

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

@ -24,15 +24,15 @@ struct Preset defaultYACReaderFlowConfig = {
0.08f, //Animation_step sets the speed of the animation 0.08f, //Animation_step sets the speed of the animation
1.5f, //Animation_speedup sets the acceleration of the animation 1.5f, //Animation_speedup sets the acceleration of the animation
0.1f, //Animation_step_max sets the maximum speed of the animation 0.1f, //Animation_step_max sets the maximum speed of the animation
3.f, //Animation_Fade_out_dis sets the distance of view 3.f, //Animation_Fade_out_dis sets the distance of view
1.5f, //pre_rotation sets the rotation increasion 1.5f, //pre_rotation sets the rotation increasion
3.f, //View_rotate_light_strenght sets the light strenght on rotation 3.f, //View_rotate_light_strenght sets the light strenght on rotation
0.01f, //View_rotate_add sets the speed of the rotation 0.01f, //View_rotate_add sets the speed of the rotation
0.02f, //View_rotate_sub sets the speed of reversing the rotation 0.02f, //View_rotate_sub sets the speed of reversing the rotation
20.f, //View_angle sets the maximum view angle 20.f, //View_angle sets the maximum view angle
0.f, //CF_X the X Position of the Coverflow 0.f, //CF_X the X Position of the Coverflow
0.f, //CF_Y the Y Position of the Coverflow 0.f, //CF_Y the Y Position of the Coverflow
-8.f, //CF_Z the Z Position of the Coverflow -8.f, //CF_Z the Z Position of the Coverflow
@ -43,7 +43,7 @@ struct Preset defaultYACReaderFlowConfig = {
-50.f, //Rotation sets the rotation of each cover -50.f, //Rotation sets the rotation of each cover
0.18f, //X_Distance sets the distance between the covers 0.18f, //X_Distance sets the distance between the covers
1.f, //Center_Distance sets the distance between the centered and the non centered covers 1.f, //Center_Distance sets the distance between the centered and the non centered covers
0.1f, //Z_Distance sets the pushback amount 0.1f, //Z_Distance sets the pushback amount
0.0f, //Y_Distance sets the elevation amount 0.0f, //Y_Distance sets the elevation amount
30.f //zoom level 30.f //zoom level
@ -54,15 +54,15 @@ struct Preset presetYACReaderFlowClassicConfig = {
0.08f, //Animation_step sets the speed of the animation 0.08f, //Animation_step sets the speed of the animation
1.5f, //Animation_speedup sets the acceleration of the animation 1.5f, //Animation_speedup sets the acceleration of the animation
0.1f, //Animation_step_max sets the maximum speed of the animation 0.1f, //Animation_step_max sets the maximum speed of the animation
2.f, //Animation_Fade_out_dis sets the distance of view 2.f, //Animation_Fade_out_dis sets the distance of view
1.5f, //pre_rotation sets the rotation increasion 1.5f, //pre_rotation sets the rotation increasion
3.f, //View_rotate_light_strenght sets the light strenght on rotation 3.f, //View_rotate_light_strenght sets the light strenght on rotation
0.08f, //View_rotate_add sets the speed of the rotation 0.08f, //View_rotate_add sets the speed of the rotation
0.08f, //View_rotate_sub sets the speed of reversing the rotation 0.08f, //View_rotate_sub sets the speed of reversing the rotation
30.f, //View_angle sets the maximum view angle 30.f, //View_angle sets the maximum view angle
0.f, //CF_X the X Position of the Coverflow 0.f, //CF_X the X Position of the Coverflow
-0.2f, //CF_Y the Y Position of the Coverflow -0.2f, //CF_Y the Y Position of the Coverflow
-7.f, //CF_Z the Z Position of the Coverflow -7.f, //CF_Z the Z Position of the Coverflow
@ -73,9 +73,9 @@ struct Preset presetYACReaderFlowClassicConfig = {
-40.f, //Rotation sets the rotation of each cover -40.f, //Rotation sets the rotation of each cover
0.18f, //X_Distance sets the distance between the covers 0.18f, //X_Distance sets the distance between the covers
1.f, //Center_Distance sets the distance between the centered and the non centered covers 1.f, //Center_Distance sets the distance between the centered and the non centered covers
0.1f, //Z_Distance sets the pushback amount 0.1f, //Z_Distance sets the pushback amount
0.0f, //Y_Distance sets the elevation amount 0.0f, //Y_Distance sets the elevation amount
22.f //zoom level 22.f //zoom level
}; };
@ -84,15 +84,15 @@ struct Preset presetYACReaderFlowStripeConfig = {
0.08f, //Animation_step sets the speed of the animation 0.08f, //Animation_step sets the speed of the animation
1.5f, //Animation_speedup sets the acceleration of the animation 1.5f, //Animation_speedup sets the acceleration of the animation
0.1f, //Animation_step_max sets the maximum speed of the animation 0.1f, //Animation_step_max sets the maximum speed of the animation
6.f, //Animation_Fade_out_dis sets the distance of view 6.f, //Animation_Fade_out_dis sets the distance of view
1.5f, //pre_rotation sets the rotation increasion 1.5f, //pre_rotation sets the rotation increasion
4.f, //View_rotate_light_strenght sets the light strenght on rotation 4.f, //View_rotate_light_strenght sets the light strenght on rotation
0.08f, //View_rotate_add sets the speed of the rotation 0.08f, //View_rotate_add sets the speed of the rotation
0.08f, //View_rotate_sub sets the speed of reversing the rotation 0.08f, //View_rotate_sub sets the speed of reversing the rotation
30.f, //View_angle sets the maximum view angle 30.f, //View_angle sets the maximum view angle
0.f, //CF_X the X Position of the Coverflow 0.f, //CF_X the X Position of the Coverflow
-0.2f, //CF_Y the Y Position of the Coverflow -0.2f, //CF_Y the Y Position of the Coverflow
-7.f, //CF_Z the Z Position of the Coverflow -7.f, //CF_Z the Z Position of the Coverflow
@ -103,7 +103,7 @@ struct Preset presetYACReaderFlowStripeConfig = {
0.f, //Rotation sets the rotation of each cover 0.f, //Rotation sets the rotation of each cover
1.1f, //X_Distance sets the distance between the covers 1.1f, //X_Distance sets the distance between the covers
0.2f, //Center_Distance sets the distance between the centered and the non centered covers 0.2f, //Center_Distance sets the distance between the centered and the non centered covers
0.01f, //Z_Distance sets the pushback amount 0.01f, //Z_Distance sets the pushback amount
0.0f, //Y_Distance sets the elevation amount 0.0f, //Y_Distance sets the elevation amount
22.f //zoom level 22.f //zoom level
@ -114,15 +114,15 @@ struct Preset presetYACReaderFlowOverlappedStripeConfig = {
0.08f, //Animation_step sets the speed of the animation 0.08f, //Animation_step sets the speed of the animation
1.5f, //Animation_speedup sets the acceleration of the animation 1.5f, //Animation_speedup sets the acceleration of the animation
0.1f, //Animation_step_max sets the maximum speed of the animation 0.1f, //Animation_step_max sets the maximum speed of the animation
2.f, //Animation_Fade_out_dis sets the distance of view 2.f, //Animation_Fade_out_dis sets the distance of view
1.5f, //pre_rotation sets the rotation increasion 1.5f, //pre_rotation sets the rotation increasion
3.f, //View_rotate_light_strenght sets the light strenght on rotation 3.f, //View_rotate_light_strenght sets the light strenght on rotation
0.08f, //View_rotate_add sets the speed of the rotation 0.08f, //View_rotate_add sets the speed of the rotation
0.08f, //View_rotate_sub sets the speed of reversing the rotation 0.08f, //View_rotate_sub sets the speed of reversing the rotation
30.f, //View_angle sets the maximum view angle 30.f, //View_angle sets the maximum view angle
0.f, //CF_X the X Position of the Coverflow 0.f, //CF_X the X Position of the Coverflow
-0.2f, //CF_Y the Y Position of the Coverflow -0.2f, //CF_Y the Y Position of the Coverflow
-7.f, //CF_Z the Z Position of the Coverflow -7.f, //CF_Z the Z Position of the Coverflow
@ -133,7 +133,7 @@ struct Preset presetYACReaderFlowOverlappedStripeConfig = {
0.f, //Rotation sets the rotation of each cover 0.f, //Rotation sets the rotation of each cover
0.18f, //X_Distance sets the distance between the covers 0.18f, //X_Distance sets the distance between the covers
1.f, //Center_Distance sets the distance between the centered and the non centered covers 1.f, //Center_Distance sets the distance between the centered and the non centered covers
0.1f, //Z_Distance sets the pushback amount 0.1f, //Z_Distance sets the pushback amount
0.0f, //Y_Distance sets the elevation amount 0.0f, //Y_Distance sets the elevation amount
22.f //zoom level 22.f //zoom level
@ -144,15 +144,15 @@ struct Preset pressetYACReaderFlowUpConfig = {
0.08f, //Animation_step sets the speed of the animation 0.08f, //Animation_step sets the speed of the animation
1.5f, //Animation_speedup sets the acceleration of the animation 1.5f, //Animation_speedup sets the acceleration of the animation
0.1f, //Animation_step_max sets the maximum speed of the animation 0.1f, //Animation_step_max sets the maximum speed of the animation
2.5f, //Animation_Fade_out_dis sets the distance of view 2.5f, //Animation_Fade_out_dis sets the distance of view
1.5f, //pre_rotation sets the rotation increasion 1.5f, //pre_rotation sets the rotation increasion
3.f, //View_rotate_light_strenght sets the light strenght on rotation 3.f, //View_rotate_light_strenght sets the light strenght on rotation
0.08f, //View_rotate_add sets the speed of the rotation 0.08f, //View_rotate_add sets the speed of the rotation
0.08f, //View_rotate_sub sets the speed of reversing the rotation 0.08f, //View_rotate_sub sets the speed of reversing the rotation
5.f, //View_angle sets the maximum view angle 5.f, //View_angle sets the maximum view angle
0.f, //CF_X the X Position of the Coverflow 0.f, //CF_X the X Position of the Coverflow
-0.2f, //CF_Y the Y Position of the Coverflow -0.2f, //CF_Y the Y Position of the Coverflow
-7.f, //CF_Z the Z Position of the Coverflow -7.f, //CF_Z the Z Position of the Coverflow
@ -163,7 +163,7 @@ struct Preset pressetYACReaderFlowUpConfig = {
-50.f, //Rotation sets the rotation of each cover -50.f, //Rotation sets the rotation of each cover
0.18f, //X_Distance sets the distance between the covers 0.18f, //X_Distance sets the distance between the covers
1.f, //Center_Distance sets the distance between the centered and the non centered covers 1.f, //Center_Distance sets the distance between the centered and the non centered covers
0.1f, //Z_Distance sets the pushback amount 0.1f, //Z_Distance sets the pushback amount
-0.1f, //Y_Distance sets the elevation amount -0.1f, //Y_Distance sets the elevation amount
22.f //zoom level 22.f //zoom level
@ -174,15 +174,15 @@ struct Preset pressetYACReaderFlowDownConfig = {
0.08f, //Animation_step sets the speed of the animation 0.08f, //Animation_step sets the speed of the animation
1.5f, //Animation_speedup sets the acceleration of the animation 1.5f, //Animation_speedup sets the acceleration of the animation
0.1f, //Animation_step_max sets the maximum speed of the animation 0.1f, //Animation_step_max sets the maximum speed of the animation
2.5f, //Animation_Fade_out_dis sets the distance of view 2.5f, //Animation_Fade_out_dis sets the distance of view
1.5f, //pre_rotation sets the rotation increasion 1.5f, //pre_rotation sets the rotation increasion
3.f, //View_rotate_light_strenght sets the light strenght on rotation 3.f, //View_rotate_light_strenght sets the light strenght on rotation
0.08f, //View_rotate_add sets the speed of the rotation 0.08f, //View_rotate_add sets the speed of the rotation
0.08f, //View_rotate_sub sets the speed of reversing the rotation 0.08f, //View_rotate_sub sets the speed of reversing the rotation
5.f, //View_angle sets the maximum view angle 5.f, //View_angle sets the maximum view angle
0.f, //CF_X the X Position of the Coverflow 0.f, //CF_X the X Position of the Coverflow
-0.2f, //CF_Y the Y Position of the Coverflow -0.2f, //CF_Y the Y Position of the Coverflow
-7.f, //CF_Z the Z Position of the Coverflow -7.f, //CF_Z the Z Position of the Coverflow
@ -193,14 +193,14 @@ struct Preset pressetYACReaderFlowDownConfig = {
-50.f, //Rotation sets the rotation of each cover -50.f, //Rotation sets the rotation of each cover
0.18f, //X_Distance sets the distance between the covers 0.18f, //X_Distance sets the distance between the covers
1.f, //Center_Distance sets the distance between the centered and the non centered covers 1.f, //Center_Distance sets the distance between the centered and the non centered covers
0.1f, //Z_Distance sets the pushback amount 0.1f, //Z_Distance sets the pushback amount
0.1f, //Y_Distance sets the elevation amount 0.1f, //Y_Distance sets the elevation amount
22.f //zoom level 22.f //zoom level
}; };
/*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;
@ -251,7 +251,7 @@ void YACReaderFlowGL::timerEvent(QTimerEvent * event)
{ {
if(timerId == event->timerId()) if(timerId == event->timerId())
updateGL(); updateGL();
//if(!worker->isRunning()) //if(!worker->isRunning())
//worker->start(); //worker->start();
} }
@ -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{
@ -414,7 +417,7 @@ void YACReaderFlowGL::drawCover(const YACReader3DImage & image)
float w = image.width; float w = image.width;
float h = image.height; float h = image.height;
//fadeout //fadeout
float opacity = 1-1/(config.animationFadeOutDist+config.viewRotateLightStrenght*fabs(viewRotate))*fabs(0-image.current.x); float opacity = 1-1/(config.animationFadeOutDist+config.viewRotateLightStrenght*fabs(viewRotate))*fabs(0-image.current.x);
glLoadIdentity(); glLoadIdentity();
@ -492,7 +495,7 @@ void YACReaderFlowGL::drawCover(const YACReader3DImage & image)
glEnd(); glEnd();
glDisable(GL_TEXTURE_2D); glDisable(GL_TEXTURE_2D);
if(showMarks && loaded[image.index] && marks[image.index] != Unread) if(showMarks && loaded[image.index] && marks[image.index] != Unread)
{ {
glEnable(GL_TEXTURE_2D); glEnable(GL_TEXTURE_2D);
@ -526,7 +529,7 @@ void YACReaderFlowGL::drawCover(const YACReader3DImage & image)
glDisable(GL_TEXTURE_2D); glDisable(GL_TEXTURE_2D);
} }
glPopMatrix(); glPopMatrix();
} }
@ -598,7 +601,7 @@ void YACReaderFlowGL::showPrevious()
viewRotateActive = 1; viewRotateActive = 1;
} }
} }
void YACReaderFlowGL::showNext() void YACReaderFlowGL::showNext()
@ -778,7 +781,7 @@ void YACReaderFlowGL::populate(int n)
loaded = QVector<bool>(n,false); loaded = QVector<bool>(n,false);
//marks = QVector<bool>(n,false); //marks = QVector<bool>(n,false);
//worker->start(); //worker->start();
} }
@ -870,7 +873,7 @@ void YACReaderFlowGL::setCenter_Distance(int distance)
config.centerDistance = distance/100.0; config.centerDistance = distance/100.0;
} }
//sets the pushback amount //sets the pushback amount
void YACReaderFlowGL::setZ_Distance(int distance) void YACReaderFlowGL::setZ_Distance(int distance)
{ {
startAnimationTimer(); startAnimationTimer();
@ -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);
@ -1199,7 +1207,7 @@ void YACReaderComicFlowGL::updateImageData()
} }
} }
// try to load only few images on the left and right side // try to load only few images on the left and right side
// i.e. all visible ones plus some extra // i.e. all visible ones plus some extra
int count=8; int count=8;
switch(performance) switch(performance)
@ -1224,7 +1232,7 @@ void YACReaderComicFlowGL::updateImageData()
{ {
indexes[j*2+1] = center+j+1; indexes[j*2+1] = center+j+1;
indexes[j*2+2] = center-j-1; indexes[j*2+2] = center-j-1;
} }
for(int c = 0; c < 2*count+1; c++) for(int c = 0; c < 2*count+1; c++)
{ {
int i = indexes[c]; int i = indexes[c];
@ -1332,7 +1340,7 @@ void YACReaderPageFlowGL::updateImageData()
} }
} }
// try to load only few images on the left and right side // try to load only few images on the left and right side
// i.e. all visible ones plus some extra // i.e. all visible ones plus some extra
int count=8; int count=8;
switch(performance) switch(performance)
@ -1357,17 +1365,17 @@ void YACReaderPageFlowGL::updateImageData()
{ {
indexes[j*2+1] = center+j+1; indexes[j*2+1] = center+j+1;
indexes[j*2+2] = center-j-1; indexes[j*2+2] = center-j-1;
} }
for(int c = 0; c < 2*count+1; c++) for(int c = 0; c < 2*count+1; c++)
{ {
int i = indexes[c]; int i = indexes[c];
if((i >= 0) && (i < numObjects)) if((i >= 0) && (i < numObjects))
if(rawImages.size()>0) if(rawImages.size()>0)
if(!loaded[i]&&imagesReady[i])//slide(i).isNull()) if(!loaded[i]&&imagesReady[i])//slide(i).isNull())
{ {
worker->generate(i, rawImages.at(i)); worker->generate(i, rawImages.at(i));
delete[] indexes; delete[] indexes;
return; return;
} }
@ -1416,7 +1424,7 @@ QImage ImageLoaderGL::loadImage(const QString& fileName)
return image; return image;
} }
ImageLoaderGL::ImageLoaderGL(YACReaderFlowGL * flow): ImageLoaderGL::ImageLoaderGL(YACReaderFlowGL * flow):
QThread(),flow(flow),restart(false), working(false), idx(-1) QThread(),flow(flow),restart(false), working(false), idx(-1)
{ {
@ -1433,7 +1441,7 @@ ImageLoaderGL::~ImageLoaderGL()
bool ImageLoaderGL::busy() const bool ImageLoaderGL::busy() const
{ {
return isRunning() ? working : false; return isRunning() ? working : false;
} }
void ImageLoaderGL::generate(int index, const QString& fileName) void ImageLoaderGL::generate(int index, const QString& fileName)
{ {
@ -1491,9 +1499,9 @@ void ImageLoaderGL::run()
} }
} }
QImage ImageLoaderGL::result() QImage ImageLoaderGL::result()
{ {
return img; return img;
} }
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
@ -1526,7 +1534,7 @@ QImage ImageLoaderByteArrayGL::loadImage(const QByteArray& raw)
return image; return image;
} }
ImageLoaderByteArrayGL::ImageLoaderByteArrayGL(YACReaderFlowGL * flow): ImageLoaderByteArrayGL::ImageLoaderByteArrayGL(YACReaderFlowGL * flow):
QThread(),flow(flow),restart(false), working(false), idx(-1) QThread(),flow(flow),restart(false), working(false), idx(-1)
{ {
@ -1543,7 +1551,7 @@ ImageLoaderByteArrayGL::~ImageLoaderByteArrayGL()
bool ImageLoaderByteArrayGL::busy() const bool ImageLoaderByteArrayGL::busy() const
{ {
return isRunning() ? working : false; return isRunning() ? working : false;
} }
void ImageLoaderByteArrayGL::generate(int index, const QByteArray& raw) void ImageLoaderByteArrayGL::generate(int index, const QByteArray& raw)
{ {
@ -1591,8 +1599,7 @@ void ImageLoaderByteArrayGL::run()
} }
} }
QImage ImageLoaderByteArrayGL::result() QImage ImageLoaderByteArrayGL::result()
{ {
return img; return img;
} }

View File

@ -57,13 +57,13 @@ struct Preset{
float animationSpeedUp; float animationSpeedUp;
//sets the maximum speed of the animation //sets the maximum speed of the animation
float animationStepMax; float animationStepMax;
//sets the distance of view //sets the distance of view
float animationFadeOutDist; float animationFadeOutDist;
//sets the rotation increasion //sets the rotation increasion
float preRotation; float preRotation;
//sets the light strenght on rotation //sets the light strenght on rotation
float viewRotateLightStrenght; float viewRotateLightStrenght;
//sets the speed of the rotation //sets the speed of the rotation
float viewRotateAdd; float viewRotateAdd;
//sets the speed of reversing the rotation //sets the speed of reversing the rotation
float viewRotateSub; float viewRotateSub;
@ -71,17 +71,17 @@ struct Preset{
float viewAngle; float viewAngle;
/*** Position Configuration ***/ /*** Position Configuration ***/
//the X Position of the Coverflow //the X Position of the Coverflow
float cfX; float cfX;
//the Y Position of the Coverflow //the Y Position of the Coverflow
float cfY; float cfY;
//the Z Position of the Coverflow //the Z Position of the Coverflow
float cfZ; float cfZ;
//the X Rotation of the Coverflow //the X Rotation of the Coverflow
float cfRX; float cfRX;
//the Y Rotation of the Coverflow //the Y Rotation of the Coverflow
float cfRY; float cfRY;
//the Z Rotation of the Coverflow //the Z Rotation of the Coverflow
float cfRZ; float cfRZ;
//sets the rotation of each cover //sets the rotation of each cover
float rotation; float rotation;
@ -89,7 +89,7 @@ struct Preset{
float xDistance; float xDistance;
//sets the distance between the centered and the non centered covers //sets the distance between the centered and the non centered covers
float centerDistance; float centerDistance;
//sets the pushback amount //sets the pushback amount
float zDistance; float zDistance;
//sets the elevation amount //sets the elevation amount
float yDistance; float yDistance;
@ -122,7 +122,7 @@ protected:
void drawCover(const YACReader3DImage & image); void drawCover(const YACReader3DImage & image);
void udpatePerspective(int width, int height); void udpatePerspective(int width, int height);
int updateCount; int updateCount;
WidgetLoader * loader; WidgetLoader * loader;
int fontSize; int fontSize;
@ -143,16 +143,19 @@ 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;
/*** Animation Settings ***/ /*** Animation Settings ***/
Preset config; Preset config;
//sets/returns the curent selected cover //sets/returns the curent selected cover
int currentSelected; int currentSelected;
//defines the position of the centered cover //defines the position of the centered cover
YACReader3DVector centerPos; YACReader3DVector centerPos;
/*** Style ***/ /*** Style ***/
@ -172,7 +175,7 @@ protected:
void startAnimationTimer(); void startAnimationTimer();
void stopAnimationTimer(); void stopAnimationTimer();
public: public:
@ -198,7 +201,7 @@ public:
void draw(); void draw();
//updates the coverflow //updates the coverflow
void updatePositions(); void updatePositions();
//inserts a new item to the coverflow //inserts a new item to the coverflow
//if item is set to a value > -1 it updates a already set value //if item is set to a value > -1 it updates a already set value
//otherwise a new entry is set //otherwise a new entry is set
void insert(const char *name, GLuint Tex, float x, float y,int item = -1); void insert(const char *name, GLuint Tex, float x, float y,int item = -1);
@ -215,9 +218,9 @@ public:
public slots: public slots:
void setCF_RX(int value); void setCF_RX(int value);
//the Y Rotation of the Coverflow //the Y Rotation of the Coverflow
void setCF_RY(int value); void setCF_RY(int value);
//the Z Rotation of the Coverflow //the Z Rotation of the Coverflow
void setCF_RZ(int value); void setCF_RZ(int value);
//perspective //perspective
@ -228,7 +231,7 @@ public:
void setX_Distance(int distance); void setX_Distance(int distance);
//sets the distance between the centered and the non centered covers //sets the distance between the centered and the non centered covers
void setCenter_Distance(int distance); void setCenter_Distance(int distance);
//sets the pushback amount //sets the pushback amount
void setZ_Distance(int distance); void setZ_Distance(int distance);
void setCF_Y(int value); void setCF_Y(int value);
@ -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();
@ -336,7 +341,7 @@ protected:
private: private:
QMutex mutex; QMutex mutex;
QWaitCondition condition; QWaitCondition condition;
bool restart; bool restart;
bool working; bool working;

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 ..