diff --git a/YACReader/YACReader.pro b/YACReader/YACReader.pro index fa4dc161..a2c1c48d 100644 --- a/YACReader/YACReader.pro +++ b/YACReader/YACReader.pro @@ -17,6 +17,11 @@ unix:!macx{ QMAKE_CXXFLAGS += -std=c++11 } +unix:haiku { + DEFINES += _BSD_SOURCE + LIBS += -lnetwork -lbsd +} + CONFIG(force_angle) { contains(QMAKE_TARGET.arch, x86_64) { Release:DESTDIR = ../release64_angle diff --git a/YACReader/yacreader_es.qm b/YACReader/yacreader_es.qm deleted file mode 100644 index b2cee2ed..00000000 Binary files a/YACReader/yacreader_es.qm and /dev/null differ diff --git a/YACReaderLibrary/YACReaderLibrary.pro b/YACReaderLibrary/YACReaderLibrary.pro index b50c53e0..da72a7a7 100644 --- a/YACReaderLibrary/YACReaderLibrary.pro +++ b/YACReaderLibrary/YACReaderLibrary.pro @@ -19,6 +19,11 @@ QMAKE_MAC_SDK = macosx10.12 include (../config.pri) include (../dependencies/pdf_backend.pri) +unix:haiku { + DEFINES += _BSD_SOURCE + LIBS += -lnetwork -lbsd +} + CONFIG(legacy_gl_widget) { INCLUDEPATH += ../common/gl_legacy \ } else { @@ -48,8 +53,8 @@ CONFIG(force_angle) { Release:DESTDIR = ../release64_angle Debug:DESTDIR = ../debug64_angle } else { - Release:DESTDIR = ../release_angle - Debug:DESTDIR = ../debug_angle + Release:DESTDIR = ../release_angle + Debug:DESTDIR = ../debug_angle } } else { contains(QMAKE_TARGET.arch, x86_64) { @@ -66,11 +71,9 @@ unix:!macx:!CONFIG(no_opengl) { } macx { - -LIBS += -framework Foundation -framework ApplicationServices -framework AppKit - -CONFIG += objective_c -QT += macextras gui-private + LIBS += -framework Foundation -framework ApplicationServices -framework AppKit + CONFIG += objective_c + QT += macextras gui-private } unix:!macx { diff --git a/YACReaderLibrary/empty_reading_list_widget.cpp b/YACReaderLibrary/empty_reading_list_widget.cpp index f325dc37..ddb13738 100644 --- a/YACReaderLibrary/empty_reading_list_widget.cpp +++ b/YACReaderLibrary/empty_reading_list_widget.cpp @@ -5,5 +5,5 @@ EmptyReadingListWidget::EmptyReadingListWidget(QWidget *parent) { setUpDefaultLayout(true); 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")); } diff --git a/YACReaderLibrary/library_window.cpp b/YACReaderLibrary/library_window.cpp index 0c264cdd..0c0a1ca8 100644 --- a/YACReaderLibrary/library_window.cpp +++ b/YACReaderLibrary/library_window.cpp @@ -128,7 +128,7 @@ void LibraryWindow::setupUI() createActions(); doModels(); - + doDialogs(); doLayout(); createToolBars(); @@ -250,7 +250,7 @@ void LibraryWindow::doLayout() #else sHorizontal->addWidget(comicsViewsManager->containerWidget()); #endif - + sHorizontal->setStretchFactor(0,0); sHorizontal->setStretchFactor(1,1); mainWidget = new QStackedWidget(this); @@ -566,7 +566,7 @@ void LibraryWindow::createActions() expandAllNodesAction->setIcon(QIcon(":/images/sidebar/expand.png")); colapseAllNodesAction = new QAction(this); - colapseAllNodesAction->setToolTip(tr("Colapse all nodes")); + colapseAllNodesAction->setToolTip(tr("Collapse all nodes")); colapseAllNodesAction->setData(COLAPSE_ALL_NODES_ACTION_YL); colapseAllNodesAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(COLAPSE_ALL_NODES_ACTION_YL)); colapseAllNodesAction->setIcon(QIcon(":/images/sidebar/colapse.png")); @@ -654,7 +654,7 @@ void LibraryWindow::createActions() editSelectedComicsAction->setIcon(QIcon(":/images/comics_view_toolbar/editComic.png")); 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->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(ASIGN_ORDER_ACTION_YL)); asignOrderAction->setIcon(QIcon(":/images/comics_view_toolbar/asignNumber.png")); @@ -840,7 +840,7 @@ void LibraryWindow::createToolBars() libraryToolBar->attachToWindow(this->windowHandle()); - + #else libraryToolBar->backButton->setDefaultAction(backAction); libraryToolBar->forwardButton->setDefaultAction(forwardAction); @@ -858,9 +858,9 @@ void LibraryWindow::createToolBars() editInfoToolBar->addAction(editSelectedComicsAction); editInfoToolBar->addAction(getInfoAction); editInfoToolBar->addAction(asignOrderAction); - + editInfoToolBar->addSeparator(); - + editInfoToolBar->addAction(selectAllComicsAction); editInfoToolBar->addSeparator(); @@ -873,7 +873,7 @@ void LibraryWindow::createToolBars() editInfoToolBar->addAction(showHideMarksAction); editInfoToolBar->addSeparator(); - + editInfoToolBar->addAction(deleteComicsAction); @@ -897,7 +897,7 @@ void LibraryWindow::createMenus() foldersView->addAction(setFolderAsReadAction); foldersView->addAction(setFolderAsUnreadAction); - selectedLibrary->addAction(updateLibraryAction); + selectedLibrary->addAction(updateLibraryAction); selectedLibrary->addAction(renameLibraryAction); selectedLibrary->addAction(removeLibraryAction); YACReader::addSperator(selectedLibrary); @@ -911,7 +911,7 @@ void LibraryWindow::createMenus() - + //MacOSX app menus #ifdef Q_OS_MACX QMenuBar * menu = this->menuBar(); @@ -1120,7 +1120,7 @@ void LibraryWindow::createConnections() void LibraryWindow::loadLibrary(const QString & name) { if(!libraries.isEmpty()) //si hay bibliotecas... - { + { historyController->clear(); 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 { - + if(d.exists(path+"/library.ydb")) { QSqlDatabase db = DataBaseManagement::loadDatabase(path); @@ -1310,7 +1310,7 @@ void LibraryWindow::copyAndImportComicsToFolder(const QList0) - { + { QModelIndex folderDestination = foldersModelProxy->mapToSource(miFolder); QString destFolderPath = QDir::cleanPath(currentPath()+foldersModel->getFolderPath(folderDestination)); @@ -1773,7 +1773,7 @@ void LibraryWindow::openComic() quint64 comicId = comic.id; //TODO generate IDS for libraries... quint64 libraryId = libraries.getId(selectedLibrary->currentText()); - + // %1 %2 %3 NO-->%4 %5 %6 %7 %8 %9 %10 //Invoke YACReader comicPath comicId libraryId NO-->currentPage bookmark1 bookmark2 bookmark3 brightness contrast gamma bool yacreaderFound = false; @@ -1854,7 +1854,7 @@ void LibraryWindow::reloadCurrentLibrary() { void LibraryWindow::openLastCreated() { - + selectedLibrary->disconnect(); selectedLibrary->setCurrentIndex(selectedLibrary->findText(_lastAdded)); @@ -1864,7 +1864,7 @@ void LibraryWindow::openLastCreated() libraries.save(); connect(selectedLibrary,SIGNAL(currentIndexChanged(QString)),this,SLOT(loadLibrary(QString))); - + loadLibrary(_lastAdded); } @@ -1875,12 +1875,12 @@ void LibraryWindow::showAddLibrary() } void LibraryWindow::openLibrary(QString path, QString name) -{ +{ if(!libraries.contains(name)) { //TODO: fix bug, /a/b/c/.yacreaderlibrary/d/e 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")) { _lastAdded = name; @@ -2021,9 +2021,9 @@ void LibraryWindow::stopLibraryCreator() void LibraryWindow::setRootIndex() { if(!libraries.isEmpty()) - { + { 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)) { navigationController->selectedFolder(QModelIndex()); @@ -2166,7 +2166,7 @@ void LibraryWindow::showProperties() propertiesDialog->databasePath = foldersModel->getDatabase(); propertiesDialog->basePath = currentPath(); propertiesDialog->setComics(comics); - + propertiesDialog->show(); } @@ -2240,15 +2240,15 @@ void LibraryWindow::asignNumbers() if(indexList.count()>1) { bool ok; - int n = QInputDialog::getInt(this, tr("Asign comics numbers"), - tr("Asign numbers starting in:"), startingNumber,0,2147483647,1,&ok); + int n = QInputDialog::getInt(this, tr("Assign comics numbers"), + tr("Assign numbers starting in:"), startingNumber,0,2147483647,1,&ok); if (ok) startingNumber = n; else return; } qint64 edited = comicsModel->asignNumbers(indexList,startingNumber); - + //TODO add resorting without reloading navigationController->loadFolderInfo(foldersModelProxy->mapToSource(foldersView->currentIndex())); @@ -2282,7 +2282,7 @@ QFileInfo file = QDir::cleanPath(currentPath() + comicsModel->getComicPath(model args << "end tell"; QProcess::startDetached("osascript", args); #endif - + #ifdef Q_OS_WIN QString filePath = file.absoluteFilePath(); QString cmdArgs = QString("/select,\"") + QDir::toNativeSeparators(filePath) + QStringLiteral("\""); @@ -2569,7 +2569,7 @@ void LibraryWindow::showFoldersContextMenu(const QPoint &point) /* void LibraryWindow::showSocial() -{ +{ socialDialog->move(this->mapToGlobal(QPoint(width()-socialDialog->width()-10, centralWidget()->pos().y()+10))); QModelIndexList indexList = getSelectedComics(); diff --git a/YACReaderLibrary/options_dialog.cpp b/YACReaderLibrary/options_dialog.cpp index 5c623a96..1bf6060a 100644 --- a/YACReaderLibrary/options_dialog.cpp +++ b/YACReaderLibrary/options_dialog.cpp @@ -63,7 +63,7 @@ OptionsDialog::OptionsDialog(QWidget * parent) backgroundImageBlurRadiusSlider = new QSlider(Qt::Horizontal); 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")); diff --git a/YACReaderLibrary/properties_dialog.cpp b/YACReaderLibrary/properties_dialog.cpp index 8101c2a6..afa4fab8 100644 --- a/YACReaderLibrary/properties_dialog.cpp +++ b/YACReaderLibrary/properties_dialog.cpp @@ -89,7 +89,7 @@ void PropertiesDialog::createCoverBox() layout->addStretch(); coverPageEdit = new YACReaderFieldEdit(); - + showPreviousCoverPageButton = new QToolButton(); showPreviousCoverPageButton->setIcon(QIcon(":/images/previousCoverPage.png")); showPreviousCoverPageButton->setStyleSheet("QToolButton {border:none;}"); @@ -122,7 +122,7 @@ void PropertiesDialog::createCoverBox() connect(showPreviousCoverPageButton,SIGNAL(clicked()),this,SLOT(loadPreviousCover())); connect(showNextCoverPageButton,SIGNAL(clicked()),this,SLOT(loadNextCover())); - + } QFrame * createLine() @@ -145,7 +145,7 @@ void PropertiesDialog::createGeneralInfoBox() generalInfoLayout->setFieldGrowthPolicy(QFormLayout::ExpandingFieldsGrow); //generalInfoLayout->setRowWrapPolicy(QFormLayout::WrapAllRows); generalInfoLayout->addRow(tr("Title:"), title = new YACReaderFieldEdit()); - + QHBoxLayout * number = new QHBoxLayout; number->addWidget(numberEdit = new YACReaderFieldEdit()); @@ -161,7 +161,7 @@ void PropertiesDialog::createGeneralInfoBox() /*generalInfoLayout->addRow(tr("&Issue number:"), ); generalInfoLayout->addRow(tr("&Bis:"), );*/ generalInfoLayout->addRow(tr("Issue number:"), number); - + generalInfoLayout->addRow(tr("Volume:"), volumeEdit = new YACReaderFieldEdit()); QHBoxLayout * arc = new QHBoxLayout; @@ -176,9 +176,9 @@ void PropertiesDialog::createGeneralInfoBox() arcCountEdit->setValidator(&arcCountValidator); arc->addStretch(1); 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("Comic Vine link:"), comicVineLink = new QLabel("...")); @@ -196,7 +196,7 @@ void PropertiesDialog::createGeneralInfoBox() void PropertiesDialog::createAuthorsBox() { authorsBox = new QWidget; - + QVBoxLayout *authorsLayout = new QVBoxLayout; //authorsLayout->setRowWrapPolicy(QFormLayout::WrapAllRows); @@ -220,7 +220,7 @@ void PropertiesDialog::createAuthorsBox() vr2->addWidget(new QLabel(tr("Colorist(s):"))); vr2->addWidget(colorist = new YACReaderFieldPlainTextEdit()); h2->addLayout(vr2); - + //authorsLayout->addRow(tr("Inker(s):"), new YACReaderFieldPlainTextEdit()); //authorsLayout->addRow(tr("Colorist(s):"), new YACReaderFieldPlainTextEdit()); @@ -247,7 +247,7 @@ void PropertiesDialog::createAuthorsBox() void PropertiesDialog::createPublishingBox() { publishingBox = new QWidget; - + QFormLayout *publishingLayout = new QFormLayout; publishingLayout->setFieldGrowthPolicy(QFormLayout::ExpandingFieldsGrow); @@ -399,10 +399,10 @@ void PropertiesDialog::setComics(QList comics) int coverPage = comic.info.coverPage.toInt(); coverPageNumberLabel->setText(QString::number(coverPage)); coverPageNumberLabel->adjustSize(); - + showPreviousCoverPageButton->setEnabled(true); showNextCoverPageButton->setEnabled(true); - + if(coverPage == 1) showPreviousCoverPageButton->setDisabled(true); if(coverPage == comic.info.numPages.toInt()) @@ -496,7 +496,7 @@ void PropertiesDialog::setComics(QList comics) { if(itr->info.title.isNull() || itr->info.title.toString() != title->text()) title->clear(); - + if(itr->info.count.isNull() || itr->info.count.toString() != countEdit->text()) countEdit->clear(); @@ -605,7 +605,7 @@ void PropertiesDialog::setNumpages(int pagesNum) } void PropertiesDialog::setSize(float sizeFloat) { - + size->setText(QString::number(sizeFloat,'f',2) + " MB"); } @@ -813,7 +813,7 @@ void PropertiesDialog::closeEvent ( QCloseEvent * e ) synopsis->clear(); characters->clear(); notes->clear(); - + setDisableUniqueValues(false); tabBar->setCurrentIndex(0); @@ -850,7 +850,7 @@ void PropertiesDialog::loadNextCover() if(current < comics.at(0).info.numPages.toInt()) { updateCoverPageNumberLabel(current+1); - + ThumbnailCreator tc(basePath+comics[0].path,"",current+1); tc.create(); setCover(tc.getCover()); diff --git a/YACReaderLibrary/yacreaderlibrary_de.ts b/YACReaderLibrary/yacreaderlibrary_de.ts index caab3a44..5232af26 100644 --- a/YACReaderLibrary/yacreaderlibrary_de.ts +++ b/YACReaderLibrary/yacreaderlibrary_de.ts @@ -374,7 +374,7 @@ EmptyReadingListWidget - This reading list doesn't cotain comics yet + This reading list doesn't contain comics yet @@ -1219,7 +1219,7 @@ YACReaderLibrary will not stop you from creating more libraries but you should k NoLibrariesWidget - You don't have any librarires yet + You don't have any libraries yet Sie haben im Augenblick keine Bibliothek @@ -1267,7 +1267,7 @@ YACReaderLibrary will not stop you from creating more libraries but you should k - Use selectec comic cover as background + Use selected comic cover as background diff --git a/YACReaderLibrary/yacreaderlibrary_es.qm b/YACReaderLibrary/yacreaderlibrary_es.qm deleted file mode 100644 index 370934a5..00000000 Binary files a/YACReaderLibrary/yacreaderlibrary_es.qm and /dev/null differ diff --git a/YACReaderLibrary/yacreaderlibrary_es.ts b/YACReaderLibrary/yacreaderlibrary_es.ts index 4bd8cda1..a5695c8c 100644 --- a/YACReaderLibrary/yacreaderlibrary_es.ts +++ b/YACReaderLibrary/yacreaderlibrary_es.ts @@ -374,7 +374,7 @@ EmptyReadingListWidget - This reading list doesn't cotain comics yet + This reading list doesn't contain comics yet @@ -1220,7 +1220,7 @@ YACReaderLibrary will not stop you from creating more libraries but you should k NoLibrariesWidget - You don't have any librarires yet + You don't have any libraries yet Aún no tienes ninguna biblioteca @@ -1268,7 +1268,7 @@ YACReaderLibrary will not stop you from creating more libraries but you should k - Use selectec comic cover as background + Use selected comic cover as background diff --git a/YACReaderLibrary/yacreaderlibrary_fr.ts b/YACReaderLibrary/yacreaderlibrary_fr.ts index db0c94ce..9786f715 100644 --- a/YACReaderLibrary/yacreaderlibrary_fr.ts +++ b/YACReaderLibrary/yacreaderlibrary_fr.ts @@ -370,7 +370,7 @@ EmptyReadingListWidget - This reading list doesn't cotain comics yet + This reading list doesn't contain comics yet @@ -1214,7 +1214,7 @@ YACReaderLibrary will not stop you from creating more libraries but you should k NoLibrariesWidget - You don't have any librarires yet + You don't have any libraries yet Vous n'avez pas encore de librairie @@ -1262,7 +1262,7 @@ YACReaderLibrary will not stop you from creating more libraries but you should k - Use selectec comic cover as background + Use selected comic cover as background diff --git a/YACReaderLibrary/yacreaderlibrary_nl.ts b/YACReaderLibrary/yacreaderlibrary_nl.ts index 4164c9f8..37c6299c 100644 --- a/YACReaderLibrary/yacreaderlibrary_nl.ts +++ b/YACReaderLibrary/yacreaderlibrary_nl.ts @@ -370,7 +370,7 @@ EmptyReadingListWidget - This reading list doesn't cotain comics yet + This reading list doesn't contain comics yet @@ -1214,8 +1214,8 @@ YACReaderLibrary will not stop you from creating more libraries but you should k NoLibrariesWidget - You don't have any librarires yet - Je hebt geen nog librarires + You don't have any libraries yet + Je hebt geen nog libraries @@ -1262,7 +1262,7 @@ YACReaderLibrary will not stop you from creating more libraries but you should k - Use selectec comic cover as background + Use selected comic cover as background diff --git a/YACReaderLibrary/yacreaderlibrary_pt.ts b/YACReaderLibrary/yacreaderlibrary_pt.ts index 7925609e..270d7168 100644 --- a/YACReaderLibrary/yacreaderlibrary_pt.ts +++ b/YACReaderLibrary/yacreaderlibrary_pt.ts @@ -370,7 +370,7 @@ EmptyReadingListWidget - This reading list doesn't cotain comics yet + This reading list doesn't contain comics yet @@ -1200,7 +1200,7 @@ YACReaderLibrary will not stop you from creating more libraries but you should k NoLibrariesWidget - You don't have any librarires yet + You don't have any libraries yet @@ -1248,7 +1248,7 @@ YACReaderLibrary will not stop you from creating more libraries but you should k - Use selectec comic cover as background + Use selected comic cover as background diff --git a/YACReaderLibrary/yacreaderlibrary_ru.ts b/YACReaderLibrary/yacreaderlibrary_ru.ts index d099759e..23c018f4 100644 --- a/YACReaderLibrary/yacreaderlibrary_ru.ts +++ b/YACReaderLibrary/yacreaderlibrary_ru.ts @@ -370,7 +370,7 @@ EmptyReadingListWidget - This reading list doesn't cotain comics yet + This reading list doesn't contain comics yet @@ -1204,7 +1204,7 @@ YACReaderLibrary will not stop you from creating more libraries but you should k NoLibrariesWidget - You don't have any librarires yet + You don't have any libraries yet @@ -1252,7 +1252,7 @@ YACReaderLibrary will not stop you from creating more libraries but you should k - Use selectec comic cover as background + Use selected comic cover as background diff --git a/YACReaderLibrary/yacreaderlibrary_source.ts b/YACReaderLibrary/yacreaderlibrary_source.ts index 28eed1e1..20faa0e2 100644 --- a/YACReaderLibrary/yacreaderlibrary_source.ts +++ b/YACReaderLibrary/yacreaderlibrary_source.ts @@ -370,7 +370,7 @@ EmptyReadingListWidget - This reading list doesn't cotain comics yet + This reading list doesn't contain any comics yet @@ -1190,7 +1190,7 @@ YACReaderLibrary will not stop you from creating more libraries but you should k NoLibrariesWidget - You don't have any librarires yet + You don't have any libraries yet @@ -1238,7 +1238,7 @@ YACReaderLibrary will not stop you from creating more libraries but you should k - Use selectec comic cover as background + Use selected comic cover as background diff --git a/YACReaderLibrary/yacreaderlibrary_tr.ts b/YACReaderLibrary/yacreaderlibrary_tr.ts index 1da49010..dddd80a2 100644 --- a/YACReaderLibrary/yacreaderlibrary_tr.ts +++ b/YACReaderLibrary/yacreaderlibrary_tr.ts @@ -297,7 +297,7 @@ EmptyReadingListWidget - This reading list doesn't cotain comics yet + This reading list doesn't contain comics yet @@ -1048,7 +1048,7 @@ YACReaderLibrary will not stop you from creating more libraries but you should k İlk kütüphaneni oluştur - You don't have any librarires yet + You don't have any libraries yet Henüz bir kütüphaneye sahip değilsin @@ -1087,7 +1087,7 @@ YACReaderLibrary will not stop you from creating more libraries but you should k - Use selectec comic cover as background + Use selected comic cover as background diff --git a/YACReaderLibraryServer/YACReaderLibraryServer.pro b/YACReaderLibraryServer/YACReaderLibraryServer.pro index 89b2036e..48ccda01 100644 --- a/YACReaderLibraryServer/YACReaderLibraryServer.pro +++ b/YACReaderLibraryServer/YACReaderLibraryServer.pro @@ -33,6 +33,11 @@ unix { CONFIG += c++11 } +unix:haiku { + DEFINES += _BSD_SOURCE + LIBS += -lnetwork -lbsd +} + #CONFIG += release CONFIG -= flat QT += core sql network @@ -144,7 +149,7 @@ isEmpty(DESTDIR) { server.path = $$DATADIR/yacreader server.files = ../release/server -systemd.path = $$LIBDIR/systemd/system +systemd.path = $$LIBDIR/systemd/user systemd.files = yacreaderlibraryserver.service translation.path = $$DATADIR/yacreader/languages diff --git a/YACReaderLibraryServer/yacreaderlibraryserver.service b/YACReaderLibraryServer/yacreaderlibraryserver.service index c8f6ab30..6ed9024d 100644 --- a/YACReaderLibraryServer/yacreaderlibraryserver.service +++ b/YACReaderLibraryServer/yacreaderlibraryserver.service @@ -1,5 +1,5 @@ [Unit] -Description=YACReaderLibrary headless server +Description= YACReaderLibrary headless server After=network.target [Service] @@ -8,4 +8,4 @@ Restart=always ExecStart=/usr/bin/YACReaderLibraryServer start [Install] -WantedBy=multi-user.target +WantedBy=default.target diff --git a/common/gl_legacy/yacreader_flow_gl.cpp b/common/gl_legacy/yacreader_flow_gl.cpp index 9234b6b3..8258fd1e 100644 --- a/common/gl_legacy/yacreader_flow_gl.cpp +++ b/common/gl_legacy/yacreader_flow_gl.cpp @@ -24,15 +24,15 @@ struct Preset defaultYACReaderFlowConfig = { 0.08f, //Animation_step sets the speed 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 - 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 3.f, //View_rotate_light_strenght sets the light strenght on 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.01f, //View_rotate_add sets the speed of the rotation + 0.02f, //View_rotate_sub sets the speed of reversing the rotation 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 -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 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 - 0.1f, //Z_Distance sets the pushback amount + 0.1f, //Z_Distance sets the pushback amount 0.0f, //Y_Distance sets the elevation amount 30.f //zoom level @@ -54,15 +54,15 @@ struct Preset presetYACReaderFlowClassicConfig = { 0.08f, //Animation_step sets the speed 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 - 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 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_sub sets the speed of reversing 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 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 -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 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 - 0.1f, //Z_Distance sets the pushback amount + 0.1f, //Z_Distance sets the pushback amount 0.0f, //Y_Distance sets the elevation amount - + 22.f //zoom level }; @@ -84,15 +84,15 @@ struct Preset presetYACReaderFlowStripeConfig = { 0.08f, //Animation_step sets the speed 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 - 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 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_sub sets the speed of reversing 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 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 -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 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.01f, //Z_Distance sets the pushback amount + 0.01f, //Z_Distance sets the pushback amount 0.0f, //Y_Distance sets the elevation amount 22.f //zoom level @@ -114,15 +114,15 @@ struct Preset presetYACReaderFlowOverlappedStripeConfig = { 0.08f, //Animation_step sets the speed 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 - 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 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_sub sets the speed of reversing 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 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 -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.18f, //X_Distance sets the distance between the 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 22.f //zoom level @@ -144,15 +144,15 @@ struct Preset pressetYACReaderFlowUpConfig = { 0.08f, //Animation_step sets the speed 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 - 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 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_sub sets the speed of reversing 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 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 -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 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 - 0.1f, //Z_Distance sets the pushback amount + 0.1f, //Z_Distance sets the pushback amount -0.1f, //Y_Distance sets the elevation amount 22.f //zoom level @@ -174,15 +174,15 @@ struct Preset pressetYACReaderFlowDownConfig = { 0.08f, //Animation_step sets the speed 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 - 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 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_sub sets the speed of reversing 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 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 -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 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 - 0.1f, //Z_Distance sets the pushback amount + 0.1f, //Z_Distance sets the pushback amount 0.1f, //Y_Distance sets the elevation amount 22.f //zoom level }; /*Constructor*/ 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; config = p; @@ -251,7 +251,7 @@ void YACReaderFlowGL::timerEvent(QTimerEvent * event) { if(timerId == event->timerId()) updateGL(); - + //if(!worker->isRunning()) //worker->start(); } @@ -354,6 +354,9 @@ void YACReaderFlowGL::udpatePerspective(int width, int height) /*Private*/ void YACReaderFlowGL::calcPos(YACReader3DImage & image, int pos) { + if(flowRightToLeft){ + pos = pos * -1; + } if(pos == 0){ image.current = centerPos; }else{ @@ -414,7 +417,7 @@ void YACReaderFlowGL::drawCover(const YACReader3DImage & image) float w = image.width; float h = image.height; - //fadeout + //fadeout float opacity = 1-1/(config.animationFadeOutDist+config.viewRotateLightStrenght*fabs(viewRotate))*fabs(0-image.current.x); glLoadIdentity(); @@ -492,7 +495,7 @@ void YACReaderFlowGL::drawCover(const YACReader3DImage & image) glEnd(); glDisable(GL_TEXTURE_2D); - + if(showMarks && loaded[image.index] && marks[image.index] != Unread) { glEnable(GL_TEXTURE_2D); @@ -526,7 +529,7 @@ void YACReaderFlowGL::drawCover(const YACReader3DImage & image) glDisable(GL_TEXTURE_2D); } - + glPopMatrix(); } @@ -598,7 +601,7 @@ void YACReaderFlowGL::showPrevious() viewRotateActive = 1; - } + } } void YACReaderFlowGL::showNext() @@ -778,7 +781,7 @@ void YACReaderFlowGL::populate(int n) loaded = QVector(n,false); //marks = QVector(n,false); - + //worker->start(); } @@ -870,7 +873,7 @@ void YACReaderFlowGL::setCenter_Distance(int distance) config.centerDistance = distance/100.0; } -//sets the pushback amount +//sets the pushback amount void YACReaderFlowGL::setZ_Distance(int distance) { startAnimationTimer(); @@ -1025,6 +1028,11 @@ void YACReaderFlowGL::render() //do nothing } +void YACReaderFlowGL::setFlowRightToLeft(bool b) +{ + flowRightToLeft = b; +} + //EVENTOS void YACReaderFlowGL::wheelEvent(QWheelEvent * event) { @@ -1045,7 +1053,7 @@ void YACReaderFlowGL::wheelEvent(QWheelEvent * 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) setCurrentIndex((currentSelected-10<0)?0:currentSelected-10); @@ -1055,7 +1063,7 @@ void YACReaderFlowGL::keyPressEvent(QKeyEvent *event) 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) setCurrentIndex((currentSelected+10>=numObjects)?numObjects-1:currentSelected+10); @@ -1067,7 +1075,7 @@ void YACReaderFlowGL::keyPressEvent(QKeyEvent *event) if(event->key() == Qt::Key_Up) { - //emit selected(centerIndex()); + //emit selected(centerIndex()); return; } @@ -1098,7 +1106,7 @@ void YACReaderFlowGL::mousePressEvent(QMouseEvent *event) 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; //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); showNext(); } - else if(posX <=-0.5) + else if((posX <=-0.5 && !flowRightToLeft) || (posX >= 0.5 && flowRightToLeft) ) showPrevious(); } else 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 int count=8; switch(performance) @@ -1224,7 +1232,7 @@ void YACReaderComicFlowGL::updateImageData() { indexes[j*2+1] = center+j+1; indexes[j*2+2] = center-j-1; - } + } for(int c = 0; c < 2*count+1; 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 int count=8; switch(performance) @@ -1357,17 +1365,17 @@ void YACReaderPageFlowGL::updateImageData() { indexes[j*2+1] = center+j+1; indexes[j*2+2] = center-j-1; - } + } for(int c = 0; c < 2*count+1; c++) { int i = indexes[c]; if((i >= 0) && (i < numObjects)) if(rawImages.size()>0) - + if(!loaded[i]&&imagesReady[i])//slide(i).isNull()) { worker->generate(i, rawImages.at(i)); - + delete[] indexes; return; } @@ -1416,7 +1424,7 @@ QImage ImageLoaderGL::loadImage(const QString& fileName) return image; } -ImageLoaderGL::ImageLoaderGL(YACReaderFlowGL * flow): +ImageLoaderGL::ImageLoaderGL(YACReaderFlowGL * flow): QThread(),flow(flow),restart(false), working(false), idx(-1) { @@ -1433,7 +1441,7 @@ ImageLoaderGL::~ImageLoaderGL() bool ImageLoaderGL::busy() const { return isRunning() ? working : false; -} +} void ImageLoaderGL::generate(int index, const QString& fileName) { @@ -1491,9 +1499,9 @@ void ImageLoaderGL::run() } } -QImage ImageLoaderGL::result() -{ - return img; +QImage ImageLoaderGL::result() +{ + return img; } //----------------------------------------------------------------------------- @@ -1526,7 +1534,7 @@ QImage ImageLoaderByteArrayGL::loadImage(const QByteArray& raw) return image; } -ImageLoaderByteArrayGL::ImageLoaderByteArrayGL(YACReaderFlowGL * flow): +ImageLoaderByteArrayGL::ImageLoaderByteArrayGL(YACReaderFlowGL * flow): QThread(),flow(flow),restart(false), working(false), idx(-1) { @@ -1543,7 +1551,7 @@ ImageLoaderByteArrayGL::~ImageLoaderByteArrayGL() bool ImageLoaderByteArrayGL::busy() const { return isRunning() ? working : false; -} +} void ImageLoaderByteArrayGL::generate(int index, const QByteArray& raw) { @@ -1591,8 +1599,7 @@ void ImageLoaderByteArrayGL::run() } } -QImage ImageLoaderByteArrayGL::result() -{ - return img; +QImage ImageLoaderByteArrayGL::result() +{ + return img; } - diff --git a/common/gl_legacy/yacreader_flow_gl.h b/common/gl_legacy/yacreader_flow_gl.h index ba025253..65666f28 100644 --- a/common/gl_legacy/yacreader_flow_gl.h +++ b/common/gl_legacy/yacreader_flow_gl.h @@ -57,13 +57,13 @@ struct Preset{ float animationSpeedUp; //sets the maximum speed of the animation float animationStepMax; - //sets the distance of view + //sets the distance of view float animationFadeOutDist; //sets the rotation increasion float preRotation; - //sets the light strenght on rotation + //sets the light strenght on rotation float viewRotateLightStrenght; - //sets the speed of the rotation + //sets the speed of the rotation float viewRotateAdd; //sets the speed of reversing the rotation float viewRotateSub; @@ -71,17 +71,17 @@ struct Preset{ float viewAngle; /*** Position Configuration ***/ - //the X Position of the Coverflow + //the X Position of the Coverflow float cfX; - //the Y Position of the Coverflow + //the Y Position of the Coverflow float cfY; - //the Z Position of the Coverflow + //the Z Position of the Coverflow float cfZ; - //the X Rotation of the Coverflow + //the X Rotation of the Coverflow float cfRX; - //the Y Rotation of the Coverflow + //the Y Rotation of the Coverflow float cfRY; - //the Z Rotation of the Coverflow + //the Z Rotation of the Coverflow float cfRZ; //sets the rotation of each cover float rotation; @@ -89,7 +89,7 @@ struct Preset{ float xDistance; //sets the distance between the centered and the non centered covers float centerDistance; - //sets the pushback amount + //sets the pushback amount float zDistance; //sets the elevation amount float yDistance; @@ -122,7 +122,7 @@ protected: void drawCover(const YACReader3DImage & image); void udpatePerspective(int width, int height); - + int updateCount; WidgetLoader * loader; int fontSize; @@ -143,16 +143,19 @@ protected: QVector images; bool hasBeenInitialized; + // sets flow direction right-to-left (manga mode) + bool flowRightToLeft; + Performance performance; bool bUseVSync; /*** Animation Settings ***/ Preset config; - //sets/returns the curent selected cover + //sets/returns the curent selected cover int currentSelected; - //defines the position of the centered cover + //defines the position of the centered cover YACReader3DVector centerPos; /*** Style ***/ @@ -172,7 +175,7 @@ protected: void startAnimationTimer(); void stopAnimationTimer(); - + public: @@ -198,7 +201,7 @@ public: void draw(); //updates the coverflow 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 //otherwise a new entry is set void insert(const char *name, GLuint Tex, float x, float y,int item = -1); @@ -215,9 +218,9 @@ public: public slots: void setCF_RX(int value); - //the Y Rotation of the Coverflow + //the Y Rotation of the Coverflow void setCF_RY(int value); - //the Z Rotation of the Coverflow + //the Z Rotation of the Coverflow void setCF_RZ(int value); //perspective @@ -228,7 +231,7 @@ public: void setX_Distance(int distance); //sets the distance between the centered and the non centered covers void setCenter_Distance(int distance); - //sets the pushback amount + //sets the pushback amount void setZ_Distance(int distance); void setCF_Y(int value); @@ -248,6 +251,8 @@ public: void useVSync(bool b); + void setFlowRightToLeft(bool b); + virtual void updateImageData() = 0; void reset(); @@ -336,7 +341,7 @@ protected: private: QMutex mutex; QWaitCondition condition; - + bool restart; bool working; diff --git a/config.pri b/config.pri index ddf87384..6d4aaafe 100644 --- a/config.pri +++ b/config.pri @@ -10,39 +10,39 @@ QT_VER_MIN = $$member(QT_VERSION, 1) lessThan(QT_VER_MAJ, 5) { error(YACReader requires Qt 5 or newer but Qt $$[QT_VERSION] was detected.) - } + } lessThan(QT_VER_MIN, 4):!CONFIG(no_opengl) { - CONFIG += legacy_gl_widget - message ("Qt < 5.4 detected. Using QGLWidget for coverflow.") - } + CONFIG += legacy_gl_widget + message ("Qt < 5.4 detected. Using QGLWidget for coverflow.") + } 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 CONFIG(no_opengl) { - DEFINES += NO_OPENGL + DEFINES += NO_OPENGL } #default values for decompression backends !CONFIG(unarr):!CONFIG(7zip) { - unix { - CONFIG += unarr - } - win32 { - CONFIG += unarr - } + unix { + CONFIG += unarr + } + win32 { + CONFIG += unarr + } } #default values for pdf render backend win32:!CONFIG(poppler):!CONFIG(pdfium) { - CONFIG += pdfium + CONFIG += pdfium } unix:!macx:!CONFIG(poppler):!CONFIG(pdfium) { - CONFIG += poppler + CONFIG += poppler } macx:!CONFIG(pdfkit):!CONFIG(pdfium) { - CONFIG += pdfium + CONFIG += pdfium } diff --git a/generateVS2010Projects.bat b/generateVS2010Projects.bat deleted file mode 100644 index 23f8ce59..00000000 --- a/generateVS2010Projects.bat +++ /dev/null @@ -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 .. \ No newline at end of file