mirror of
https://github.com/YACReader/yacreader
synced 2025-07-14 02:54:46 -04:00
Merge
This commit is contained in:
@ -1,153 +1,158 @@
|
||||
######################################################################
|
||||
# Automatically generated by qmake (2.01a) dom 12. oct 20:47:48 2008
|
||||
######################################################################
|
||||
|
||||
TEMPLATE = app
|
||||
TARGET = YACReaderLibrary
|
||||
|
||||
QMAKE_TARGET_BUNDLE_PREFIX = "com.yacreader"
|
||||
|
||||
DEPENDPATH += .
|
||||
INCLUDEPATH += .
|
||||
INCLUDEPATH += ../common \
|
||||
./server \
|
||||
./db \
|
||||
../custom_widgets \
|
||||
./comic_vine \
|
||||
./comic_vine/model
|
||||
INCLUDEPATH += . \
|
||||
../common \
|
||||
./server \
|
||||
./db \
|
||||
../custom_widgets \
|
||||
./comic_vine \
|
||||
./comic_vine/model
|
||||
|
||||
DEFINES += SERVER_RELEASE NOMINMAX YACREADER_LIBRARY
|
||||
QMAKE_MAC_SDK = macosx10.12
|
||||
#load default build flags
|
||||
|
||||
# load default build flags
|
||||
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 {
|
||||
INCLUDEPATH += ../common/gl \
|
||||
}
|
||||
|
||||
#there are going to be two builds for windows, OpenGL based and ANGLE based
|
||||
# there are two builds for Windows, Desktop OpenGL based and ANGLE OpenGL ES based
|
||||
win32 {
|
||||
CONFIG(force_angle) {
|
||||
message("using ANGLE")
|
||||
LIBS += -loleaut32 -lole32 -lshell32 -lopengl32 -lglu32 -luser32
|
||||
#linking extra libs are necesary for a successful compilation, a better approach should be
|
||||
#to remove any OpenGL (desktop) dependencies
|
||||
#the OpenGL stuff should be migrated to OpenGL ES
|
||||
# linking extra libs are necesary for a successful compilation, a better approach should be
|
||||
# to remove any OpenGL (desktop) dependencies
|
||||
# the OpenGL stuff should be migrated to OpenGL ES
|
||||
DEFINES += FORCE_ANGLE
|
||||
} else {
|
||||
LIBS += -loleaut32 -lole32 -lshell32 -lopengl32 -lglu32 -luser32
|
||||
}
|
||||
|
||||
|
||||
QMAKE_CXXFLAGS_RELEASE += /MP /Ob2 /Oi /Ot /GT /GL
|
||||
QMAKE_LFLAGS_RELEASE += /LTCG
|
||||
CONFIG -= embed_manifest_exe
|
||||
}
|
||||
|
||||
unix:!macx{
|
||||
|
||||
!CONFIG(no_opengl) {
|
||||
LIBS += -lGLU
|
||||
}
|
||||
CONFIG(force_angle) {
|
||||
contains(QMAKE_TARGET.arch, x86_64) {
|
||||
Release:DESTDIR = ../release64_angle
|
||||
Debug:DESTDIR = ../debug64_angle
|
||||
} else {
|
||||
Release:DESTDIR = ../release_angle
|
||||
Debug:DESTDIR = ../debug_angle
|
||||
}
|
||||
} else {
|
||||
contains(QMAKE_TARGET.arch, x86_64) {
|
||||
Release:DESTDIR = ../release64
|
||||
Debug:DESTDIR = ../debug64
|
||||
} else {
|
||||
Release:DESTDIR = ../release
|
||||
Debug:DESTDIR = ../debug
|
||||
}
|
||||
}
|
||||
|
||||
macx{
|
||||
#INCLUDEPATH += "/Volumes/Mac OS X Lion/usr/X11/include"
|
||||
#isEqual(QT_MAJOR_VERSION, 5) {
|
||||
#INCLUDEPATH += /usr/local/include/poppler/qt5
|
||||
#LIBS += -L/usr/local/lib -lpoppler-qt5
|
||||
#}
|
||||
#else {
|
||||
#INCLUDEPATH += /usr/local/include/poppler/qt4
|
||||
#LIBS += -L/usr/local/lib -lpoppler-qt4
|
||||
#}
|
||||
#QT += macextras
|
||||
|
||||
LIBS += -framework Foundation -framework ApplicationServices -framework AppKit
|
||||
|
||||
CONFIG += objective_c
|
||||
QT += macextras gui-private
|
||||
unix:!macx:!CONFIG(no_opengl) {
|
||||
LIBS += -lGLU
|
||||
}
|
||||
|
||||
unix{
|
||||
CONFIG += c++11
|
||||
macx {
|
||||
LIBS += -framework Foundation -framework ApplicationServices -framework AppKit
|
||||
CONFIG += objective_c
|
||||
QT += macextras gui-private
|
||||
}
|
||||
|
||||
unix:!macx {
|
||||
CONFIG += c++11
|
||||
}
|
||||
|
||||
#CONFIG += release
|
||||
CONFIG -= flat
|
||||
QT += sql network widgets script
|
||||
!CONFIG(no_opengl) {
|
||||
QT += opengl
|
||||
QT += opengl
|
||||
}
|
||||
|
||||
# Input
|
||||
HEADERS += comic_flow.h \
|
||||
create_library_dialog.h \
|
||||
library_creator.h \
|
||||
library_window.h \
|
||||
add_library_dialog.h \
|
||||
rename_library_dialog.h \
|
||||
properties_dialog.h \
|
||||
options_dialog.h \
|
||||
export_library_dialog.h \
|
||||
import_library_dialog.h \
|
||||
package_manager.h \
|
||||
bundle_creator.h \
|
||||
export_comics_info_dialog.h \
|
||||
import_comics_info_dialog.h \
|
||||
server_config_dialog.h \
|
||||
comic_flow_widget.h \
|
||||
db_helper.h \
|
||||
./db/data_base_management.h \
|
||||
./db/folder_item.h \
|
||||
./db/folder_model.h \
|
||||
./db/comic_model.h \
|
||||
./db/comic_item.h \
|
||||
../common/comic_db.h \
|
||||
../common/folder.h \
|
||||
../common/library_item.h \
|
||||
../common/comic.h \
|
||||
../common/bookmarks.h \
|
||||
../common/pictureflow.h \
|
||||
../common/custom_widgets.h \
|
||||
../common/qnaturalsorting.h \
|
||||
../common/yacreader_global.h \
|
||||
../common/yacreader_global_gui.h \
|
||||
../common/onstart_flow_selection_dialog.h \
|
||||
../common/pdf_comic.h \
|
||||
no_libraries_widget.h \
|
||||
import_widget.h \
|
||||
yacreader_local_server.h \
|
||||
yacreader_main_toolbar.h \
|
||||
comics_remover.h \
|
||||
../common/http_worker.h \
|
||||
yacreader_libraries.h \
|
||||
../common/exit_check.h \
|
||||
comics_view.h \
|
||||
classic_comics_view.h \
|
||||
empty_folder_widget.h \
|
||||
no_search_results_widget.h \
|
||||
comic_files_manager.h \
|
||||
db/reading_list_model.h \
|
||||
db/reading_list_item.h \
|
||||
yacreader_folders_view.h \
|
||||
yacreader_reading_lists_view.h \
|
||||
add_label_dialog.h \
|
||||
yacreader_history_controller.h \
|
||||
yacreader_navigation_controller.h \
|
||||
empty_label_widget.h \
|
||||
empty_container_info.h \
|
||||
empty_special_list.h \
|
||||
empty_reading_list_widget.h \
|
||||
../common/scroll_management.h \
|
||||
../common/opengl_checker.h \
|
||||
yacreader_comics_views_manager.h \
|
||||
info_comics_view.h \
|
||||
yacreader_comics_selection_helper.h \
|
||||
yacreader_comic_info_helper.h \
|
||||
db/reading_list.cpp
|
||||
create_library_dialog.h \
|
||||
library_creator.h \
|
||||
library_window.h \
|
||||
add_library_dialog.h \
|
||||
rename_library_dialog.h \
|
||||
properties_dialog.h \
|
||||
options_dialog.h \
|
||||
export_library_dialog.h \
|
||||
import_library_dialog.h \
|
||||
package_manager.h \
|
||||
bundle_creator.h \
|
||||
export_comics_info_dialog.h \
|
||||
import_comics_info_dialog.h \
|
||||
server_config_dialog.h \
|
||||
comic_flow_widget.h \
|
||||
db_helper.h \
|
||||
./db/data_base_management.h \
|
||||
./db/folder_item.h \
|
||||
./db/folder_model.h \
|
||||
./db/comic_model.h \
|
||||
./db/comic_item.h \
|
||||
../common/comic_db.h \
|
||||
../common/folder.h \
|
||||
../common/library_item.h \
|
||||
../common/comic.h \
|
||||
../common/bookmarks.h \
|
||||
../common/pictureflow.h \
|
||||
../common/custom_widgets.h \
|
||||
../common/qnaturalsorting.h \
|
||||
../common/yacreader_global.h \
|
||||
../common/yacreader_global_gui.h \
|
||||
../common/onstart_flow_selection_dialog.h \
|
||||
../common/pdf_comic.h \
|
||||
no_libraries_widget.h \
|
||||
import_widget.h \
|
||||
yacreader_local_server.h \
|
||||
yacreader_main_toolbar.h \
|
||||
comics_remover.h \
|
||||
../common/http_worker.h \
|
||||
yacreader_libraries.h \
|
||||
../common/exit_check.h \
|
||||
comics_view.h \
|
||||
classic_comics_view.h \
|
||||
empty_folder_widget.h \
|
||||
no_search_results_widget.h \
|
||||
comic_files_manager.h \
|
||||
db/reading_list_model.h \
|
||||
db/reading_list_item.h \
|
||||
yacreader_folders_view.h \
|
||||
yacreader_reading_lists_view.h \
|
||||
add_label_dialog.h \
|
||||
yacreader_history_controller.h \
|
||||
yacreader_navigation_controller.h \
|
||||
empty_label_widget.h \
|
||||
empty_container_info.h \
|
||||
empty_special_list.h \
|
||||
empty_reading_list_widget.h \
|
||||
../common/scroll_management.h \
|
||||
../common/opengl_checker.h \
|
||||
yacreader_comics_views_manager.h \
|
||||
info_comics_view.h \
|
||||
yacreader_comics_selection_helper.h \
|
||||
yacreader_comic_info_helper.h \
|
||||
db/reading_list.h
|
||||
|
||||
!CONFIG(no_opengl) {
|
||||
CONFIG(legacy_gl_widget) {
|
||||
@ -157,72 +162,72 @@ HEADERS += comic_flow.h \
|
||||
HEADERS += ../common/gl/yacreader_flow_gl.h
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
SOURCES += comic_flow.cpp \
|
||||
create_library_dialog.cpp \
|
||||
library_creator.cpp \
|
||||
library_window.cpp \
|
||||
main.cpp \
|
||||
add_library_dialog.cpp \
|
||||
rename_library_dialog.cpp \
|
||||
properties_dialog.cpp \
|
||||
options_dialog.cpp \
|
||||
export_library_dialog.cpp \
|
||||
import_library_dialog.cpp \
|
||||
package_manager.cpp \
|
||||
bundle_creator.cpp \
|
||||
export_comics_info_dialog.cpp \
|
||||
import_comics_info_dialog.cpp \
|
||||
server_config_dialog.cpp \
|
||||
comic_flow_widget.cpp \
|
||||
db_helper.cpp \
|
||||
./db/data_base_management.cpp \
|
||||
./db/folder_item.cpp \
|
||||
./db/folder_model.cpp \
|
||||
./db/comic_model.cpp \
|
||||
./db/comic_item.cpp \
|
||||
../common/comic_db.cpp \
|
||||
../common/folder.cpp \
|
||||
../common/library_item.cpp \
|
||||
../common/comic.cpp \
|
||||
../common/bookmarks.cpp \
|
||||
../common/pictureflow.cpp \
|
||||
../common/custom_widgets.cpp \
|
||||
../common/qnaturalsorting.cpp \
|
||||
../common/onstart_flow_selection_dialog.cpp \
|
||||
no_libraries_widget.cpp \
|
||||
import_widget.cpp \
|
||||
yacreader_local_server.cpp \
|
||||
yacreader_main_toolbar.cpp \
|
||||
comics_remover.cpp \
|
||||
../common/http_worker.cpp \
|
||||
../common/yacreader_global.cpp \
|
||||
../common/yacreader_global_gui.cpp \
|
||||
yacreader_libraries.cpp \
|
||||
../common/exit_check.cpp \
|
||||
comics_view.cpp \
|
||||
classic_comics_view.cpp \
|
||||
empty_folder_widget.cpp \
|
||||
no_search_results_widget.cpp \
|
||||
comic_files_manager.cpp \
|
||||
db/reading_list_model.cpp \
|
||||
db/reading_list_item.cpp \
|
||||
yacreader_folders_view.cpp \
|
||||
yacreader_reading_lists_view.cpp \
|
||||
add_label_dialog.cpp \
|
||||
yacreader_history_controller.cpp \
|
||||
yacreader_navigation_controller.cpp \
|
||||
empty_label_widget.cpp \
|
||||
empty_container_info.cpp \
|
||||
empty_special_list.cpp \
|
||||
empty_reading_list_widget.cpp \
|
||||
../common/scroll_management.cpp \
|
||||
../common/opengl_checker.cpp \
|
||||
yacreader_comics_views_manager.cpp \
|
||||
info_comics_view.cpp \
|
||||
yacreader_comics_selection_helper.cpp \
|
||||
yacreader_comic_info_helper.cpp \
|
||||
db/reading_list.cpp
|
||||
create_library_dialog.cpp \
|
||||
library_creator.cpp \
|
||||
library_window.cpp \
|
||||
main.cpp \
|
||||
add_library_dialog.cpp \
|
||||
rename_library_dialog.cpp \
|
||||
properties_dialog.cpp \
|
||||
options_dialog.cpp \
|
||||
export_library_dialog.cpp \
|
||||
import_library_dialog.cpp \
|
||||
package_manager.cpp \
|
||||
bundle_creator.cpp \
|
||||
export_comics_info_dialog.cpp \
|
||||
import_comics_info_dialog.cpp \
|
||||
server_config_dialog.cpp \
|
||||
comic_flow_widget.cpp \
|
||||
db_helper.cpp \
|
||||
./db/data_base_management.cpp \
|
||||
./db/folder_item.cpp \
|
||||
./db/folder_model.cpp \
|
||||
./db/comic_model.cpp \
|
||||
./db/comic_item.cpp \
|
||||
../common/comic_db.cpp \
|
||||
../common/folder.cpp \
|
||||
../common/library_item.cpp \
|
||||
../common/comic.cpp \
|
||||
../common/bookmarks.cpp \
|
||||
../common/pictureflow.cpp \
|
||||
../common/custom_widgets.cpp \
|
||||
../common/qnaturalsorting.cpp \
|
||||
../common/onstart_flow_selection_dialog.cpp \
|
||||
no_libraries_widget.cpp \
|
||||
import_widget.cpp \
|
||||
yacreader_local_server.cpp \
|
||||
yacreader_main_toolbar.cpp \
|
||||
comics_remover.cpp \
|
||||
../common/http_worker.cpp \
|
||||
../common/yacreader_global.cpp \
|
||||
../common/yacreader_global_gui.cpp \
|
||||
yacreader_libraries.cpp \
|
||||
../common/exit_check.cpp \
|
||||
comics_view.cpp \
|
||||
classic_comics_view.cpp \
|
||||
empty_folder_widget.cpp \
|
||||
no_search_results_widget.cpp \
|
||||
comic_files_manager.cpp \
|
||||
db/reading_list_model.cpp \
|
||||
db/reading_list_item.cpp \
|
||||
yacreader_folders_view.cpp \
|
||||
yacreader_reading_lists_view.cpp \
|
||||
add_label_dialog.cpp \
|
||||
yacreader_history_controller.cpp \
|
||||
yacreader_navigation_controller.cpp \
|
||||
empty_label_widget.cpp \
|
||||
empty_container_info.cpp \
|
||||
empty_special_list.cpp \
|
||||
empty_reading_list_widget.cpp \
|
||||
../common/scroll_management.cpp \
|
||||
../common/opengl_checker.cpp \
|
||||
yacreader_comics_views_manager.cpp \
|
||||
info_comics_view.cpp \
|
||||
yacreader_comics_selection_helper.cpp \
|
||||
yacreader_comic_info_helper.cpp \
|
||||
db/reading_list.cpp
|
||||
|
||||
!CONFIG(no_opengl) {
|
||||
CONFIG(legacy_gl_widget) {
|
||||
@ -233,15 +238,16 @@ SOURCES += comic_flow.cpp \
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
include(./server/server.pri)
|
||||
include(../custom_widgets/custom_widgets_yacreaderlibrary.pri)
|
||||
|
||||
CONFIG(7zip){
|
||||
include(../compressed_archive/wrapper.pri)
|
||||
} else:CONFIG(unarr) {
|
||||
include(../compressed_archive/unarr/unarr-wrapper.pri)
|
||||
} else {
|
||||
error(No compression backend specified. Did you mess with the build system?)
|
||||
error(No compression backend specified. Did you mess with the build system?)
|
||||
}
|
||||
|
||||
include(./comic_vine/comic_vine.pri)
|
||||
@ -256,25 +262,17 @@ macx:RESOURCES += images_osx.qrc
|
||||
RC_FILE = icon.rc
|
||||
|
||||
macx {
|
||||
ICON = YACReaderLibrary.icns
|
||||
ICON = YACReaderLibrary.icns
|
||||
}
|
||||
|
||||
TRANSLATIONS = yacreaderlibrary_es.ts \
|
||||
yacreaderlibrary_ru.ts \
|
||||
yacreaderlibrary_pt.ts \
|
||||
yacreaderlibrary_fr.ts \
|
||||
yacreaderlibrary_nl.ts \
|
||||
yacreaderlibrary_tr.ts \
|
||||
yacreaderlibrary_de.ts \
|
||||
yacreaderlibrary_source.ts
|
||||
|
||||
CONFIG(force_angle) {
|
||||
Release:DESTDIR = ../release_angle
|
||||
Debug:DESTDIR = ../debug_angle
|
||||
} else {
|
||||
Release:DESTDIR = ../release
|
||||
Debug:DESTDIR = ../debug
|
||||
}
|
||||
TRANSLATIONS = yacreaderlibrary_es.ts \
|
||||
yacreaderlibrary_ru.ts \
|
||||
yacreaderlibrary_pt.ts \
|
||||
yacreaderlibrary_fr.ts \
|
||||
yacreaderlibrary_nl.ts \
|
||||
yacreaderlibrary_tr.ts \
|
||||
yacreaderlibrary_de.ts \
|
||||
yacreaderlibrary_source.ts
|
||||
|
||||
#QML/GridView
|
||||
QT += quick qml
|
||||
@ -293,7 +291,7 @@ macx:RESOURCES += qml_osx.qrc
|
||||
unix:!macx {
|
||||
#set install prefix if it's empty
|
||||
isEmpty(PREFIX) {
|
||||
PREFIX = /usr
|
||||
PREFIX = /usr
|
||||
}
|
||||
|
||||
BINDIR = $$PREFIX/bin
|
||||
@ -307,21 +305,19 @@ INSTALLS += bin icon desktop server translation manpage
|
||||
|
||||
bin.path = $$BINDIR
|
||||
isEmpty(DESTDIR) {
|
||||
bin.files = YACReaderLibrary
|
||||
bin.files = YACReaderLibrary
|
||||
} else {
|
||||
bin.files = $$DESTDIR/YACReaderLibrary
|
||||
bin.files = $$DESTDIR/YACReaderLibrary
|
||||
}
|
||||
|
||||
server.path = $$DATADIR/yacreader
|
||||
server.files = ../release/server
|
||||
|
||||
icon.path = $$DATADIR/yacreader
|
||||
icon.files = ../images/iconLibrary.png ../images/db.png ../images/coversPackage.png
|
||||
icon.path = $$DATADIR/icons/hicolor/48x48/apps
|
||||
icon.files = ../YACReaderLibrary.png
|
||||
|
||||
desktop.path = $$DATADIR/applications
|
||||
desktop.extra = desktop-file-edit --set-icon=$$DATADIR/yacreader/iconLibrary.png $$PWD/../YACReaderLibrary.desktop
|
||||
desktop.files = ../YACReaderLibrary.desktop
|
||||
#TODO: icons should be located at /usr/share/icons and have the same basename as their application
|
||||
|
||||
translation.path = $$DATADIR/yacreader/languages
|
||||
translation.files = ../release/languages/yacreaderlibrary_*
|
||||
|
@ -390,15 +390,9 @@ void ReadingListModel::addNewLabel(const QString &name, YACReader::LabelColors c
|
||||
QSqlDatabase db = DataBaseManagement::loadDatabase(_databasePath);
|
||||
qulonglong id = DBHelper::insertLabel(name, color, db);
|
||||
|
||||
Q_UNUSED(id);
|
||||
int newPos = addLabelIntoList(new LabelItem(QList<QVariant>() << name << YACReader::colorToName(color) << id << color));
|
||||
beginInsertRows(QModelIndex(),specialLists.count()+1+newPos+1, specialLists.count()+1+newPos+1);
|
||||
|
||||
beginInsertRows(QModelIndex(),0, 0);
|
||||
|
||||
// using the specfic row pos for inserting doesnt work
|
||||
// int newPos = addLabelIntoList(new LabelItem(QList<QVariant>() << name << YACReader::colorToName(color) << id << color));
|
||||
// beginInsertRows(QModelIndex(),specialLists.count()+1+newPos+1, specialLists.count()+1+newPos+1);
|
||||
|
||||
// endInsertRows();
|
||||
|
||||
endInsertRows();
|
||||
|
||||
|
@ -483,6 +483,9 @@ void DBHelper::update(qulonglong libraryId, ComicInfo & comicInfo)
|
||||
|
||||
void DBHelper::update(ComicInfo * comicInfo, QSqlDatabase & db)
|
||||
{
|
||||
if(comicInfo == nullptr)
|
||||
return;
|
||||
|
||||
QSqlQuery updateComicInfo(db);
|
||||
updateComicInfo.prepare("UPDATE comic_info SET "
|
||||
"title = :title,"
|
||||
@ -674,10 +677,9 @@ void DBHelper::updateProgress(qulonglong libraryId, const ComicInfo &comicInfo)
|
||||
ComicDB comic = DBHelper::loadComic(comicInfo.id,db);
|
||||
comic.info.currentPage = comicInfo.currentPage;
|
||||
comic.info.hasBeenOpened = true;
|
||||
comic.info.read = comic.info.read || comic.info.currentPage == comic.info.numPages;
|
||||
|
||||
comic.info.lastTimeOpened = QDateTime::currentSecsSinceEpoch();
|
||||
|
||||
DBHelper::update(&comic.info,db);
|
||||
DBHelper::updateReadingRemoteProgress(comic.info,db);
|
||||
|
||||
db.close();
|
||||
QSqlDatabase::removeDatabase(libraryPath);
|
||||
@ -701,6 +703,8 @@ void DBHelper::updateReadingRemoteProgress(const ComicInfo &comicInfo, QSqlDatab
|
||||
updateComicInfo.bindValue(":id", comicInfo.id);
|
||||
updateComicInfo.bindValue(":rating", comicInfo.rating);
|
||||
updateComicInfo.exec();
|
||||
|
||||
updateComicInfo.clear();
|
||||
}
|
||||
|
||||
|
||||
@ -1174,7 +1178,7 @@ QList<ComicDB> DBHelper::getSortedComicsFromParent(qulonglong parentId, QSqlData
|
||||
{
|
||||
if(c1.info.number.isNull() && c2.info.number.isNull())
|
||||
{
|
||||
return naturalSortLessThanCI(c1.info.title.toString(), c2.info.title.toString());
|
||||
return naturalSortLessThanCI(c1.name, c2.name);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -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"));
|
||||
}
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 97 KiB After Width: | Height: | Size: 163 KiB |
@ -114,8 +114,6 @@ LibraryWindow::LibraryWindow()
|
||||
|
||||
void LibraryWindow::setupUI()
|
||||
{
|
||||
setWindowIcon(QIcon(":/images/iconLibrary.png"));
|
||||
|
||||
setUnifiedTitleAndToolBarOnMac(true);
|
||||
|
||||
libraryCreator = new LibraryCreator();
|
||||
@ -128,7 +126,7 @@ void LibraryWindow::setupUI()
|
||||
|
||||
createActions();
|
||||
doModels();
|
||||
|
||||
|
||||
doDialogs();
|
||||
doLayout();
|
||||
createToolBars();
|
||||
@ -250,7 +248,7 @@ void LibraryWindow::doLayout()
|
||||
#else
|
||||
sHorizontal->addWidget(comicsViewsManager->containerWidget());
|
||||
#endif
|
||||
|
||||
|
||||
sHorizontal->setStretchFactor(0,0);
|
||||
sHorizontal->setStretchFactor(1,1);
|
||||
mainWidget = new QStackedWidget(this);
|
||||
@ -566,7 +564,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 +652,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 +838,7 @@ void LibraryWindow::createToolBars()
|
||||
|
||||
libraryToolBar->attachToWindow(this->windowHandle());
|
||||
|
||||
|
||||
|
||||
#else
|
||||
libraryToolBar->backButton->setDefaultAction(backAction);
|
||||
libraryToolBar->forwardButton->setDefaultAction(forwardAction);
|
||||
@ -858,9 +856,9 @@ void LibraryWindow::createToolBars()
|
||||
editInfoToolBar->addAction(editSelectedComicsAction);
|
||||
editInfoToolBar->addAction(getInfoAction);
|
||||
editInfoToolBar->addAction(asignOrderAction);
|
||||
|
||||
|
||||
editInfoToolBar->addSeparator();
|
||||
|
||||
|
||||
editInfoToolBar->addAction(selectAllComicsAction);
|
||||
|
||||
editInfoToolBar->addSeparator();
|
||||
@ -873,7 +871,7 @@ void LibraryWindow::createToolBars()
|
||||
editInfoToolBar->addAction(showHideMarksAction);
|
||||
|
||||
editInfoToolBar->addSeparator();
|
||||
|
||||
|
||||
editInfoToolBar->addAction(deleteComicsAction);
|
||||
|
||||
|
||||
@ -897,7 +895,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 +909,7 @@ void LibraryWindow::createMenus()
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//MacOSX app menus
|
||||
#ifdef Q_OS_MACX
|
||||
QMenuBar * menu = this->menuBar();
|
||||
@ -1120,7 +1118,7 @@ void LibraryWindow::createConnections()
|
||||
void LibraryWindow::loadLibrary(const QString & name)
|
||||
{
|
||||
if(!libraries.isEmpty()) //si hay bibliotecas...
|
||||
{
|
||||
{
|
||||
historyController->clear();
|
||||
|
||||
showRootWidget();
|
||||
@ -1230,7 +1228,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 +1308,7 @@ void LibraryWindow::copyAndImportComicsToFolder(const QList<QPair<QString,QStrin
|
||||
{
|
||||
QLOG_DEBUG() << "-copyAndImportComicsToFolder-";
|
||||
if(comics.size()>0)
|
||||
{
|
||||
{
|
||||
QModelIndex folderDestination = foldersModelProxy->mapToSource(miFolder);
|
||||
|
||||
QString destFolderPath = QDir::cleanPath(currentPath()+foldersModel->getFolderPath(folderDestination));
|
||||
@ -1727,6 +1725,14 @@ void LibraryWindow::saveSelectedCoversTo()
|
||||
}
|
||||
}
|
||||
|
||||
void LibraryWindow::checkMaxNumLibraries()
|
||||
{
|
||||
int numLibraries = libraries.getNames().length();
|
||||
if(numLibraries >= MAX_LIBRARIES_WARNING_NUM) {
|
||||
QMessageBox::warning(this,tr("You are adding too many libraries."),tr("You are adding too many libraries.\n\nYou probably only need one library in your top level comics folder, you can browse any subfolders using the folders section in the left sidebar.\n\nYACReaderLibrary will not stop you from creating more libraries but you should keep the number of libraries low."));
|
||||
}
|
||||
}
|
||||
|
||||
void LibraryWindow::selectSubfolder(const QModelIndex &mi, int child)
|
||||
{
|
||||
QModelIndex dest = foldersModel->index(child,0,mi);
|
||||
@ -1765,17 +1771,29 @@ 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;
|
||||
#ifdef Q_OS_MAC
|
||||
|
||||
QString comicIdS = QString("--comicId=") + QString("%1").arg(comicId);
|
||||
QString libraryIdS = QString("--libraryId=") + QString("%1").arg(libraryId);
|
||||
QString yacreaderPath = QDir::cleanPath(QCoreApplication::applicationDirPath()+"/../../../YACReader.app");
|
||||
if(yacreaderFound = QFileInfo(yacreaderPath).exists())
|
||||
QProcess::startDetached("open", QStringList() << "-n" << yacreaderPath << "--args" << path << comicIdS << libraryIdS ); /*<< page << bookmark1 << bookmark2 << bookmark3 << brightness << contrast << gamma*///,QStringList() << path);
|
||||
|
||||
#ifdef Q_OS_MAC
|
||||
QStringList possiblePaths;
|
||||
|
||||
possiblePaths.append(QDir::cleanPath(QCoreApplication::applicationDirPath()+"/../../../"));
|
||||
possiblePaths.append(QStandardPaths::standardLocations(QStandardPaths::ApplicationsLocation));
|
||||
for(auto && ypath: possiblePaths)
|
||||
{
|
||||
QString yacreaderPath = QDir::cleanPath(ypath + "/YACReader.app");
|
||||
if(QFileInfo(yacreaderPath).exists())
|
||||
{
|
||||
yacreaderFound = true;
|
||||
QProcess::startDetached("open", QStringList() << "-n" << yacreaderPath << "--args" << path << comicIdS << libraryIdS ); /*<< page << bookmark1 << bookmark2 << bookmark3 << brightness << contrast << gamma*///,QStringList() << path);
|
||||
break;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef Q_OS_WIN /* \"%4\" \"%5\" \"%6\" \"%7\" \"%8\" \"%9\" \"%10\" */
|
||||
@ -1811,6 +1829,7 @@ void LibraryWindow::setCurrentComicUnreaded() {
|
||||
}
|
||||
|
||||
void LibraryWindow::createLibrary() {
|
||||
checkMaxNumLibraries();
|
||||
createLibraryDialog->open(libraries);
|
||||
}
|
||||
|
||||
@ -1833,7 +1852,7 @@ void LibraryWindow::reloadCurrentLibrary() {
|
||||
|
||||
void LibraryWindow::openLastCreated()
|
||||
{
|
||||
|
||||
|
||||
selectedLibrary->disconnect();
|
||||
|
||||
selectedLibrary->setCurrentIndex(selectedLibrary->findText(_lastAdded));
|
||||
@ -1843,22 +1862,23 @@ void LibraryWindow::openLastCreated()
|
||||
libraries.save();
|
||||
|
||||
connect(selectedLibrary,SIGNAL(currentIndexChanged(QString)),this,SLOT(loadLibrary(QString)));
|
||||
|
||||
|
||||
loadLibrary(_lastAdded);
|
||||
}
|
||||
|
||||
void LibraryWindow::showAddLibrary()
|
||||
{
|
||||
checkMaxNumLibraries();
|
||||
addLibraryDialog->open();
|
||||
}
|
||||
|
||||
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;
|
||||
@ -1999,9 +2019,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());
|
||||
@ -2144,7 +2164,7 @@ void LibraryWindow::showProperties()
|
||||
propertiesDialog->databasePath = foldersModel->getDatabase();
|
||||
propertiesDialog->basePath = currentPath();
|
||||
propertiesDialog->setComics(comics);
|
||||
|
||||
|
||||
propertiesDialog->show();
|
||||
}
|
||||
|
||||
@ -2218,15 +2238,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()));
|
||||
|
||||
@ -2260,7 +2280,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("\"");
|
||||
@ -2549,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();
|
||||
|
@ -375,6 +375,7 @@ public slots:
|
||||
void onAddComicsToLabel();
|
||||
void setToolbarTitle(const QModelIndex & modelIndex);
|
||||
void saveSelectedCoversTo();
|
||||
void checkMaxNumLibraries();
|
||||
|
||||
private:
|
||||
//fullscreen mode in Windows for preventing this bug: QTBUG-41309 https://bugreports.qt.io/browse/QTBUG-41309
|
||||
|
@ -217,7 +217,7 @@ int main( int argc, char ** argv )
|
||||
|
||||
LibraryWindow * mw = new LibraryWindow();
|
||||
|
||||
mw->connect(localServer,SIGNAL(comicUpdated(quint64, const ComicDB &)),mw,SLOT(updateComicsView(quint64, const ComicDB &)));
|
||||
mw->connect(localServer,SIGNAL(comicUpdated(quint64, const ComicDB &)),mw,SLOT(updateComicsView(quint64, const ComicDB &)), Qt::QueuedConnection);
|
||||
|
||||
//connections to localServer
|
||||
|
||||
|
@ -23,7 +23,7 @@ NoLibrariesWidget::NoLibrariesWidget(QWidget *parent) :
|
||||
QLabel * lineLabel = new QLabel();
|
||||
lineLabel->setPixmap(line);
|
||||
|
||||
QLabel * text = new QLabel("<font color=\"#495252\">"+tr("You don't have any librarires yet")+"</font>");
|
||||
QLabel * text = new QLabel("<font color=\"#495252\">"+tr("You don't have any libraries yet")+"</font>");
|
||||
text->setStyleSheet("QLabel {font-size:25px;font-weight:bold;}");
|
||||
QLabel * textDescription = new QLabel("<font color=\"#565959\">"+tr("<p>You can create a library in any folder, YACReaderLibrary will import all comics and folders from this folder. If you have created any library in the past you can open them.</p><p>Don't forget that you can use YACReader as a stand alone application for reading the comics on your computer.</p>")+"</font>");
|
||||
textDescription->setWordWrap(true);
|
||||
|
@ -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"));
|
||||
|
||||
|
@ -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<ComicDB> 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<ComicDB> 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());
|
||||
|
@ -10,6 +10,7 @@
|
||||
#include "../static.h"
|
||||
|
||||
#include "qnaturalsorting.h"
|
||||
#include "yacreader_global.h"
|
||||
|
||||
#include "yacreader_http_session.h"
|
||||
|
||||
@ -27,6 +28,11 @@ FolderController::FolderController() {}
|
||||
|
||||
void FolderController::service(HttpRequest& request, HttpResponse& response)
|
||||
{
|
||||
QSettings * settings = new QSettings(YACReader::getSettingsPath()+"/YACReaderLibrary.ini",QSettings::IniFormat); //TODO unificar la creación del fichero de config con el servidor
|
||||
settings->beginGroup("libraryConfig");
|
||||
|
||||
bool showlessInfoPerFolder = settings->value(REMOTE_BROWSE_PERFORMANCE_WORKAROUND,false).toBool();
|
||||
|
||||
HttpSession session=Static::sessionStore->getSession(request,response,false);
|
||||
YACReaderHttpSession *ySession = Static::yacreaderSessionStore->getYACReaderSessionHttpSession(session.getId());
|
||||
|
||||
@ -170,14 +176,30 @@ void FolderController::service(HttpRequest& request, HttpResponse& response)
|
||||
{
|
||||
t.setVariable(QString("element%1.class").arg(i),"folder");
|
||||
|
||||
const Folder * folder = static_cast<Folder*>(item);
|
||||
|
||||
if(folder->getFirstChildHash().length()>0)
|
||||
if(showlessInfoPerFolder)
|
||||
{
|
||||
t.setVariable(QString("element%1.image.url").arg(i),QString("/library/%1/cover/%2.jpg?folderCover=true").arg(libraryId).arg(folder->getFirstChildHash()));
|
||||
t.setVariable(QString("element%1.image.url").arg(i),"/images/f.png");
|
||||
}
|
||||
else
|
||||
t.setVariable(QString("element%1.image.url").arg(i),"/images/f.png");
|
||||
{
|
||||
const Folder * folder = static_cast<Folder*>(item);
|
||||
|
||||
if(folder->getFirstChildHash().length()>0)
|
||||
{
|
||||
t.setVariable(QString("element%1.image.url").arg(i),QString("/library/%1/cover/%2.jpg?folderCover=true").arg(libraryId).arg(folder->getFirstChildHash()));
|
||||
}
|
||||
else
|
||||
{
|
||||
QList<LibraryItem *> children = DBHelper::getFolderComicsFromLibrary(libraryId, item->id);
|
||||
if(children.length()>0)
|
||||
{
|
||||
const ComicDB * comic = static_cast<ComicDB*>(children.at(0));
|
||||
t.setVariable(QString("element%1.image.url").arg(i),QString("/library/%1/cover/%2.jpg?folderCover=true").arg(libraryId).arg(comic->info.hash));
|
||||
}
|
||||
else
|
||||
t.setVariable(QString("element%1.image.url").arg(i),"/images/f.png");
|
||||
}
|
||||
}
|
||||
|
||||
t.setVariable(QString("element%1.browse").arg(i),QString("<a class =\"browseButton\" href=\"%1\">BROWSE</a>").arg(QString("/library/%1/folder/%2").arg(libraryId).arg(item->id)));
|
||||
t.setVariable(QString("element%1.cover.browse").arg(i),QString("<a href=\"%1\">").arg(QString("/library/%1/folder/%2").arg(libraryId).arg(item->id)));
|
||||
|
@ -147,6 +147,10 @@ ServerConfigDialog::ServerConfigDialog(QWidget * parent)
|
||||
check->setText(tr("enable the server"));
|
||||
check->setStyleSheet("QCheckBox {color:#262626; font-size:13px; font-family: Arial;}");
|
||||
|
||||
performanceWorkaroundCheck = new QCheckBox(this);
|
||||
performanceWorkaroundCheck->move(332,354);
|
||||
performanceWorkaroundCheck->setText(tr("display less information about folders in the browser\nto improve the performance"));
|
||||
performanceWorkaroundCheck->setStyleSheet("QCheckBox {color:#262626; font-size:13px; font-family: Arial;}");
|
||||
|
||||
//accept->move(444, 242);
|
||||
//check->setLayoutDirection(Qt::RightToLeft);
|
||||
@ -184,9 +188,12 @@ ServerConfigDialog::ServerConfigDialog(QWidget * parent)
|
||||
else
|
||||
check->setChecked(false);
|
||||
|
||||
performanceWorkaroundCheck->setChecked(settings->value(REMOTE_BROWSE_PERFORMANCE_WORKAROUND,false).toBool());
|
||||
|
||||
settings->endGroup();
|
||||
|
||||
connect(check,SIGNAL(stateChanged(int)),this,SLOT(enableServer(int)));
|
||||
connect(performanceWorkaroundCheck,SIGNAL(stateChanged(int)),this,SLOT(enableperformanceWorkaround(int)));
|
||||
}
|
||||
|
||||
void ServerConfigDialog::enableServer(int status)
|
||||
@ -208,7 +215,23 @@ void ServerConfigDialog::enableServer(int status)
|
||||
port->setText("");
|
||||
settings->setValue(SERVER_ON,false);
|
||||
}
|
||||
settings->endGroup();
|
||||
settings->endGroup();
|
||||
}
|
||||
|
||||
void ServerConfigDialog::enableperformanceWorkaround(int status)
|
||||
{
|
||||
QSettings * settings = new QSettings(YACReader::getSettingsPath()+"/YACReaderLibrary.ini",QSettings::IniFormat); //TODO unificar la creación del fichero de config con el servidor
|
||||
settings->beginGroup("libraryConfig");
|
||||
|
||||
if(status == Qt::Checked)
|
||||
{
|
||||
settings->setValue(REMOTE_BROWSE_PERFORMANCE_WORKAROUND,true);
|
||||
}
|
||||
else
|
||||
{
|
||||
settings->setValue(REMOTE_BROWSE_PERFORMANCE_WORKAROUND,false);
|
||||
}
|
||||
settings->endGroup();
|
||||
}
|
||||
|
||||
void ServerConfigDialog::generateQR()
|
||||
|
@ -21,6 +21,7 @@ Q_OBJECT
|
||||
QLineEdit * port;
|
||||
|
||||
QCheckBox * check;
|
||||
QCheckBox * performanceWorkaroundCheck;
|
||||
|
||||
QPushButton * close;
|
||||
QPushButton * accept;
|
||||
@ -35,6 +36,7 @@ Q_OBJECT
|
||||
void regenerateQR(const QString & ip);
|
||||
void updateImage();
|
||||
void enableServer(int status);
|
||||
void enableperformanceWorkaround(int status);
|
||||
void updatePort();
|
||||
signals:
|
||||
void portChanged(QString port);
|
||||
|
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -297,7 +297,7 @@
|
||||
<context>
|
||||
<name>EmptyReadingListWidget</name>
|
||||
<message>
|
||||
<source>This reading list doesn't cotain comics yet</source>
|
||||
<source>This reading list doesn't contain comics yet</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
@ -426,6 +426,13 @@
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>GridComicsView</name>
|
||||
<message>
|
||||
<source>Show info</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>HelpAboutDialog</name>
|
||||
<message>
|
||||
@ -1014,6 +1021,18 @@
|
||||
<source>Comics will only be deleted from the current label/list. Are you sure?</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>You are adding too many libraries.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>You are adding too many libraries.
|
||||
|
||||
You probably only need one library in your top level comics folder, you can browse any subfolders using the folders section in the left sidebar.
|
||||
|
||||
YACReaderLibrary will not stop you from creating more libraries but you should keep the number of libraries low.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>LocalComicListModel</name>
|
||||
@ -1029,7 +1048,7 @@
|
||||
<translation>İlk kütüphaneni oluştur</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>You don't have any librarires yet</source>
|
||||
<source>You don't have any libraries yet</source>
|
||||
<translation>Henüz bir kütüphaneye sahip değilsin</translation>
|
||||
</message>
|
||||
<message>
|
||||
@ -1068,7 +1087,7 @@
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Use selectec comic cover as background</source>
|
||||
<source>Use selected comic cover as background</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
@ -1405,6 +1424,11 @@
|
||||
<source>Choose an IP address</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>display less information about folders in the browser
|
||||
to improve the performance</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SortVolumeComics</name>
|
||||
|
Reference in New Issue
Block a user