From f0d69cb03292a1db7c2c6dc591ff42c99de292d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20=C3=81ngel=20San=20Mart=C3=ADn?= Date: Sat, 22 Nov 2014 14:03:15 +0100 Subject: [PATCH] added all empty container views --- YACReaderLibrary/YACReaderLibrary.pro | 598 +++++++++--------- YACReaderLibrary/db/reading_list_item.cpp | 9 + YACReaderLibrary/db/reading_list_item.h | 2 + YACReaderLibrary/db/reading_list_model.cpp | 6 + YACReaderLibrary/db/reading_list_model.h | 8 +- YACReaderLibrary/empty_container_info.cpp | 47 ++ YACReaderLibrary/empty_container_info.h | 26 + YACReaderLibrary/empty_folder_widget.cpp | 33 +- YACReaderLibrary/empty_folder_widget.h | 13 +- YACReaderLibrary/empty_label_widget.cpp | 35 +- YACReaderLibrary/empty_label_widget.h | 8 +- .../empty_reading_list_widget.cpp | 9 + YACReaderLibrary/empty_reading_list_widget.h | 13 + YACReaderLibrary/empty_special_list.cpp | 7 + YACReaderLibrary/empty_special_list.h | 13 + YACReaderLibrary/images.qrc | 71 +-- YACReaderLibrary/images_osx.qrc | 97 ++- YACReaderLibrary/images_win.qrc | 34 +- YACReaderLibrary/library_window.cpp | 15 + YACReaderLibrary/library_window.h | 6 + .../yacreader_navigation_controller.cpp | 18 +- images/empty_current_readings.png | Bin 0 -> 1550 bytes images/empty_favorites.png | Bin 0 -> 2839 bytes images/empty_reading_list.png | Bin 0 -> 2471 bytes images/empty_reading_list_osx.png | Bin 0 -> 2346 bytes 25 files changed, 584 insertions(+), 484 deletions(-) create mode 100644 YACReaderLibrary/empty_container_info.cpp create mode 100644 YACReaderLibrary/empty_container_info.h create mode 100644 YACReaderLibrary/empty_reading_list_widget.cpp create mode 100644 YACReaderLibrary/empty_reading_list_widget.h create mode 100644 YACReaderLibrary/empty_special_list.cpp create mode 100644 YACReaderLibrary/empty_special_list.h create mode 100644 images/empty_current_readings.png create mode 100644 images/empty_favorites.png create mode 100644 images/empty_reading_list.png create mode 100644 images/empty_reading_list_osx.png diff --git a/YACReaderLibrary/YACReaderLibrary.pro b/YACReaderLibrary/YACReaderLibrary.pro index 81f8d6b2..8732dc46 100644 --- a/YACReaderLibrary/YACReaderLibrary.pro +++ b/YACReaderLibrary/YACReaderLibrary.pro @@ -1,296 +1,302 @@ -###################################################################### -# Automatically generated by qmake (2.01a) dom 12. oct 20:47:48 2008 -###################################################################### - -TEMPLATE = app -TARGET = YACReaderLibrary -DEPENDPATH += . -INCLUDEPATH += . -INCLUDEPATH += ../common \ - ./server \ - ./db \ - ../custom_widgets \ - ./comic_vine \ - ./comic_vine/model - -DEFINES += SERVER_RELEASE NOMINMAX YACREADER_LIBRARY - -win32 { - -LIBS += -L../dependencies/poppler/lib -loleaut32 -lole32 -lshell32 - -isEqual(QT_MAJOR_VERSION, 5) { -LIBS += -lpoppler-qt5 -INCLUDEPATH += ../dependencies/poppler/include/qt5 -} -else { -LIBS += -lpoppler-qt4 -INCLUDEPATH += ../dependencies/poppler/include/qt4 -} - -#QMAKE_CXXFLAGS_RELEASE += /MP /Ob2 /Oi /Ot /GT /GL -#QMAKE_LFLAGS_RELEASE += /LTCG -CONFIG -= embed_manifest_exe -} - -unix:!macx{ - -isEqual(QT_MAJOR_VERSION, 5) { -INCLUDEPATH += /usr/include/poppler/qt5 -LIBS += -L/usr/lib -lpoppler-qt5 -} -else { -INCLUDEPATH += /usr/include/poppler/qt4 -LIBS += -L/usr/lib -lpoppler-qt4 -} -LIBS += -lGLU -} - -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 - -OBJECTIVE_SOURCES += $$PWD/../common/pdf_comic.mm -HEADERS += $$PWD/../common/pdf_comic.h -CONFIG += objective_c -QT += macextras gui-private -} - -unix{ -QMAKE_CXXFLAGS += -std=c++11 -} - -#CONFIG += release -CONFIG -= flat -QT += sql network opengl script - -# 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_flow_gl.h \ - ../common/yacreader_global.h \ - ../common/onstart_flow_selection_dialog.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 - - -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/yacreader_flow_gl.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 \ - 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 - - -include(./server/server.pri) -include(../custom_widgets/custom_widgets_yacreaderlibrary.pri) -include(../compressed_archive/wrapper.pri) -include(./comic_vine/comic_vine.pri) -include(../QsLog/QsLog.pri) -include(../shortcuts_management/shortcuts_management.pri) - -RESOURCES += images.qrc files.qrc -win32:RESOURCES += images_win.qrc -unix:!macx:RESOURCES += images_win.qrc -macx:RESOURCES += images_osx.qrc - -RC_FILE = icon.rc - -macx { - 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 - -isEqual(QT_MAJOR_VERSION, 5) { - Release:DESTDIR = ../release5 - Debug:DESTDIR = ../debug5 - -#QML/GridView -QT += quick qml - -HEADERS += grid_comics_view.h \ - comics_view_transition.h - -SOURCES += grid_comics_view.cpp \ - comics_view_transition.cpp - -RESOURCES += qml.qrc -win32:RESOURCES += qml_win.qrc -unix:!macx:RESOURCES += qml_win.qrc -macx:RESOURCES += qml_osx.qrc - -} else { - Release:DESTDIR = ../release - Debug:DESTDIR = ../debug -} - -win32 { -!exists(../compressed_archive/lib7zip){ - error(You\'ll need 7zip source code to compile YACReader. \ - Please check the compressed_archive folder for further instructions.) -} -} - -unix { -exists (../compressed_archive/libp7zip) { - message(Found p7zip source code...) - system(patch -d ../compressed_archive -N -p0 -i libp7zip.patch) -} else { - error(You\'ll need 7zip source code to compile YACReader. \ - Please check the compressed_archive folder for further instructions.) -} -} - -unix:!macx { -#set install prefix if it's empty -isEmpty(PREFIX) { - PREFIX = /usr -} - -BINDIR = $$PREFIX/bin -LIBDIR = $$PREFIX/lib -DATADIR = $$PREFIX/share - -DEFINES += "LIBDIR=\\\"$$LIBDIR\\\"" "DATADIR=\\\"$$DATADIR\\\"" "BINDIR=\\\"$$BINDIR\\\"" - -#MAKE INSTALL -INSTALLS += bin icon desktop server translation manpage - -bin.path = $$BINDIR -isEmpty(DESTDIR) { - bin.files = YACReaderLibrary -} else { - 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 - -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_* - -manpage.path = $$DATADIR/man/man1 -manpage.files = ../YACReaderLibrary.1 -} +###################################################################### +# Automatically generated by qmake (2.01a) dom 12. oct 20:47:48 2008 +###################################################################### + +TEMPLATE = app +TARGET = YACReaderLibrary +DEPENDPATH += . +INCLUDEPATH += . +INCLUDEPATH += ../common \ + ./server \ + ./db \ + ../custom_widgets \ + ./comic_vine \ + ./comic_vine/model + +DEFINES += SERVER_RELEASE NOMINMAX YACREADER_LIBRARY + +win32 { + +LIBS += -L../dependencies/poppler/lib -loleaut32 -lole32 -lshell32 + +isEqual(QT_MAJOR_VERSION, 5) { +LIBS += -lpoppler-qt5 +INCLUDEPATH += ../dependencies/poppler/include/qt5 +} +else { +LIBS += -lpoppler-qt4 +INCLUDEPATH += ../dependencies/poppler/include/qt4 +} + +#QMAKE_CXXFLAGS_RELEASE += /MP /Ob2 /Oi /Ot /GT /GL +#QMAKE_LFLAGS_RELEASE += /LTCG +CONFIG -= embed_manifest_exe +} + +unix:!macx{ + +isEqual(QT_MAJOR_VERSION, 5) { +INCLUDEPATH += /usr/include/poppler/qt5 +LIBS += -L/usr/lib -lpoppler-qt5 +} +else { +INCLUDEPATH += /usr/include/poppler/qt4 +LIBS += -L/usr/lib -lpoppler-qt4 +} +LIBS += -lGLU +} + +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 + +OBJECTIVE_SOURCES += $$PWD/../common/pdf_comic.mm +HEADERS += $$PWD/../common/pdf_comic.h +CONFIG += objective_c +QT += macextras gui-private +} + +unix{ +QMAKE_CXXFLAGS += -std=c++11 +} + +#CONFIG += release +CONFIG -= flat +QT += sql network opengl script + +# 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_flow_gl.h \ + ../common/yacreader_global.h \ + ../common/onstart_flow_selection_dialog.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 + + +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/yacreader_flow_gl.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 \ + 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 + + +include(./server/server.pri) +include(../custom_widgets/custom_widgets_yacreaderlibrary.pri) +include(../compressed_archive/wrapper.pri) +include(./comic_vine/comic_vine.pri) +include(../QsLog/QsLog.pri) +include(../shortcuts_management/shortcuts_management.pri) + +RESOURCES += images.qrc files.qrc +win32:RESOURCES += images_win.qrc +unix:!macx:RESOURCES += images_win.qrc +macx:RESOURCES += images_osx.qrc + +RC_FILE = icon.rc + +macx { + 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 + +isEqual(QT_MAJOR_VERSION, 5) { + Release:DESTDIR = ../release5 + Debug:DESTDIR = ../debug5 + +#QML/GridView +QT += quick qml + +HEADERS += grid_comics_view.h \ + comics_view_transition.h + +SOURCES += grid_comics_view.cpp \ + comics_view_transition.cpp + +RESOURCES += qml.qrc +win32:RESOURCES += qml_win.qrc +unix:!macx:RESOURCES += qml_win.qrc +macx:RESOURCES += qml_osx.qrc + +} else { + Release:DESTDIR = ../release + Debug:DESTDIR = ../debug +} + +win32 { +!exists(../compressed_archive/lib7zip){ + error(You\'ll need 7zip source code to compile YACReader. \ + Please check the compressed_archive folder for further instructions.) +} +} + +unix { +exists (../compressed_archive/libp7zip) { + message(Found p7zip source code...) + system(patch -d ../compressed_archive -N -p0 -i libp7zip.patch) +} else { + error(You\'ll need 7zip source code to compile YACReader. \ + Please check the compressed_archive folder for further instructions.) +} +} + +unix:!macx { +#set install prefix if it's empty +isEmpty(PREFIX) { + PREFIX = /usr +} + +BINDIR = $$PREFIX/bin +LIBDIR = $$PREFIX/lib +DATADIR = $$PREFIX/share + +DEFINES += "LIBDIR=\\\"$$LIBDIR\\\"" "DATADIR=\\\"$$DATADIR\\\"" "BINDIR=\\\"$$BINDIR\\\"" + +#MAKE INSTALL +INSTALLS += bin icon desktop server translation manpage + +bin.path = $$BINDIR +isEmpty(DESTDIR) { + bin.files = YACReaderLibrary +} else { + 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 + +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_* + +manpage.path = $$DATADIR/man/man1 +manpage.files = ../YACReaderLibrary.1 +} diff --git a/YACReaderLibrary/db/reading_list_item.cpp b/YACReaderLibrary/db/reading_list_item.cpp index a0904fcc..6baa4ba8 100644 --- a/YACReaderLibrary/db/reading_list_item.cpp +++ b/YACReaderLibrary/db/reading_list_item.cpp @@ -38,6 +38,15 @@ QIcon SpecialListItem::getIcon() const } } +ReadingListModel::TypeSpecialList SpecialListItem::getType() const +{ + if(itemData.count()>1) + { + int id = itemData.at(1).toInt(); + return (ReadingListModel::TypeSpecialList)id; + } +} + //------------------------------------------------------ LabelItem::LabelItem(const QList &data) diff --git a/YACReaderLibrary/db/reading_list_item.h b/YACReaderLibrary/db/reading_list_item.h index 5d82bc27..41c3aaaa 100644 --- a/YACReaderLibrary/db/reading_list_item.h +++ b/YACReaderLibrary/db/reading_list_item.h @@ -5,6 +5,7 @@ #include #include "yacreader_global.h" +#include "reading_list_model.h" //TODO add propper constructors, using QList is not safe class ListItem @@ -25,6 +26,7 @@ class SpecialListItem : public ListItem public: SpecialListItem(const QList &data); QIcon getIcon() const; + ReadingListModel::TypeSpecialList getType() const; }; //------------------------------------------------------ diff --git a/YACReaderLibrary/db/reading_list_model.cpp b/YACReaderLibrary/db/reading_list_model.cpp index 18dd4b16..288d4cf0 100644 --- a/YACReaderLibrary/db/reading_list_model.cpp +++ b/YACReaderLibrary/db/reading_list_model.cpp @@ -82,6 +82,12 @@ QVariant ReadingListModel::data(const QModelIndex &index, int role) const if (role == ReadingListModel::IDRole) return item->getId(); + if (role == ReadingListModel::SpecialListTypeRole && typeid(*item) == typeid(SpecialListItem)) + { + SpecialListItem * specialListItem = static_cast(item); + return QVariant(specialListItem->getType()); + } + if(typeid(*item) == typeid(ReadingListSeparatorItem)) return QVariant(); diff --git a/YACReaderLibrary/db/reading_list_model.h b/YACReaderLibrary/db/reading_list_model.h index efe01296..40048a2f 100644 --- a/YACReaderLibrary/db/reading_list_model.h +++ b/YACReaderLibrary/db/reading_list_model.h @@ -53,7 +53,8 @@ public: enum Roles { TypeListsRole = Qt::UserRole + 1, IDRole, - LabelColorRole + LabelColorRole, + SpecialListTypeRole }; enum TypeList { @@ -63,6 +64,11 @@ public: Separator }; + enum TypeSpecialList { + Reading, + Favorites + }; + signals: private: diff --git a/YACReaderLibrary/empty_container_info.cpp b/YACReaderLibrary/empty_container_info.cpp new file mode 100644 index 00000000..2c5b74d0 --- /dev/null +++ b/YACReaderLibrary/empty_container_info.cpp @@ -0,0 +1,47 @@ +#include "empty_container_info.h" + +EmptyContainerInfo::EmptyContainerInfo(QWidget *parent) : + QWidget(parent), iconLabel(new QLabel()), titleLabel(new QLabel()) +{ +#ifdef Q_OS_MAC + backgroundColor = "#FFFFFF"; + titleLabel->setStyleSheet("QLabel {color:#888888; font-size:24px;font-family:Arial;font-weight:bold;}"); +#else + backgroundColor = "#2A2A2A"; + titleLabel->setStyleSheet("QLabel {color:#CCCCCC; font-size:24px;font-family:Arial;font-weight:bold;}"); +#endif + + iconLabel->setAlignment(Qt::AlignCenter); + titleLabel->setAlignment(Qt::AlignCenter); +} + +void EmptyContainerInfo::setPixmap(const QPixmap &pixmap) +{ + iconLabel->setPixmap(pixmap); +} + +void EmptyContainerInfo::setText(const QString &text) +{ + titleLabel->setText(text); +} + +QVBoxLayout * EmptyContainerInfo::setUpDefaultLayout(bool addStretch) +{ + QVBoxLayout * layout = new QVBoxLayout; + + layout->addSpacing(100); + layout->addWidget(iconLabel); + layout->addSpacing(30); + layout->addWidget(titleLabel); + if(addStretch) + layout->addStretch(); + + setLayout(layout); + return layout; +} + +void EmptyContainerInfo::paintEvent(QPaintEvent *) +{ + QPainter painter (this); + painter.fillRect(0,0,width(),height(),QColor(backgroundColor)); +} diff --git a/YACReaderLibrary/empty_container_info.h b/YACReaderLibrary/empty_container_info.h new file mode 100644 index 00000000..8fd81747 --- /dev/null +++ b/YACReaderLibrary/empty_container_info.h @@ -0,0 +1,26 @@ +#ifndef EMPTY_CONTAINER_INFO_H +#define EMPTY_CONTAINER_INFO_H + +#include + +class EmptyContainerInfo : public QWidget +{ + Q_OBJECT +public: + explicit EmptyContainerInfo(QWidget *parent = 0); + void setPixmap(const QPixmap & pixmap); + void setText(const QString & text); + QVBoxLayout *setUpDefaultLayout(bool addStretch); +signals: + +public slots: + +protected: + void paintEvent(QPaintEvent *); + + QLabel * iconLabel; + QLabel * titleLabel; + QString backgroundColor; +}; + +#endif // EMPTY_CONTAINER_INFO_H diff --git a/YACReaderLibrary/empty_folder_widget.cpp b/YACReaderLibrary/empty_folder_widget.cpp index 053a584a..ba73b6ff 100644 --- a/YACReaderLibrary/empty_folder_widget.cpp +++ b/YACReaderLibrary/empty_folder_widget.cpp @@ -17,28 +17,12 @@ void testListView(QListView * l) } EmptyFolderWidget::EmptyFolderWidget(QWidget *parent) : - QWidget(parent),subfoldersModel(new QStringListModel()) + EmptyContainerInfo(parent),subfoldersModel(new QStringListModel()) { -#ifdef Q_OS_MAC - backgroundColor = "#FFFFFF"; -#else - backgroundColor = "#2A2A2A"; -#endif + QVBoxLayout * layout = setUpDefaultLayout(false); - QVBoxLayout * layout = new QVBoxLayout; - - iconLabel = new QLabel(); iconLabel->setPixmap(QPixmap(":/images/empty_folder.png")); - iconLabel->setAlignment(Qt::AlignCenter); - - titleLabel = new QLabel(tr("Subfolders in this folder")); - titleLabel->setAlignment(Qt::AlignCenter); - -#ifdef Q_OS_MAC - titleLabel->setStyleSheet("QLabel {color:#888888; font-size:24px;font-family:Arial;font-weight:bold;}"); -#else - titleLabel->setStyleSheet("QLabel {color:#CCCCCC; font-size:24px;font-family:Arial;font-weight:bold;}"); -#endif + titleLabel->setText(tr("Subfolders in this folder")); foldersView = new QListView(); foldersView->setMinimumWidth(282); @@ -83,10 +67,6 @@ EmptyFolderWidget::EmptyFolderWidget(QWidget *parent) : foldersView->setSizePolicy(QSizePolicy ::Expanding , QSizePolicy ::Expanding ); testListView(foldersView); - layout->addSpacing(100); - layout->addWidget(iconLabel); - layout->addSpacing(30); - layout->addWidget(titleLabel); layout->addSpacing(12); layout->addWidget(foldersView,1,Qt::AlignHCenter); layout->addStretch(); @@ -98,7 +78,6 @@ EmptyFolderWidget::EmptyFolderWidget(QWidget *parent) : setStyleSheet(QString("QWidget {background:%1}").arg(backgroundColor)); setSizePolicy(QSizePolicy ::Expanding , QSizePolicy ::Expanding ); - setLayout(layout); setAcceptDrops(true); @@ -126,12 +105,6 @@ void EmptyFolderWidget::onItemClicked(const QModelIndex &mi) emit subfolderSelected(parent,mi.row()); } -void EmptyFolderWidget::paintEvent(QPaintEvent *) -{ - QPainter painter (this); - painter.fillRect(0,0,width(),height(),QColor(backgroundColor)); -} - //TODO remove repeated code in drag & drop support.... void EmptyFolderWidget::dragEnterEvent(QDragEnterEvent *event) { diff --git a/YACReaderLibrary/empty_folder_widget.h b/YACReaderLibrary/empty_folder_widget.h index fc9b1835..98cb4d01 100644 --- a/YACReaderLibrary/empty_folder_widget.h +++ b/YACReaderLibrary/empty_folder_widget.h @@ -1,14 +1,12 @@ #ifndef EMPTY_FOLDER_WIDGET_H #define EMPTY_FOLDER_WIDGET_H -#include -#include +#include "empty_container_info.h" +#include -class QLabel; -class QListView; -class QStringListModel; -class EmptyFolderWidget : public QWidget + +class EmptyFolderWidget : public EmptyContainerInfo { Q_OBJECT public: @@ -25,12 +23,9 @@ public slots: void onItemClicked(const QModelIndex & mi); protected: - QLabel * iconLabel; - QLabel * titleLabel; QListView * foldersView; QModelIndex parent; QStringListModel * subfoldersModel; - void paintEvent(QPaintEvent *); QString backgroundColor; //Drop to import diff --git a/YACReaderLibrary/empty_label_widget.cpp b/YACReaderLibrary/empty_label_widget.cpp index d530dad8..eac010d7 100644 --- a/YACReaderLibrary/empty_label_widget.cpp +++ b/YACReaderLibrary/empty_label_widget.cpp @@ -1,37 +1,14 @@ #include "empty_label_widget.h" EmptyLabelWidget::EmptyLabelWidget(QWidget *parent) : - QWidget(parent) + EmptyContainerInfo(parent) { -#ifdef Q_OS_MAC - backgroundColor = "#FFFFFF"; -#else - backgroundColor = "#2A2A2A"; -#endif + setUpDefaultLayout(true); - QVBoxLayout * layout = new QVBoxLayout; - - iconLabel = new QLabel(); iconLabel->setPixmap(QPixmap(":/images/empty_label.png")); - iconLabel->setAlignment(Qt::AlignCenter); //titleLabel->setText(tr("This label doesn't contain comics yet") + QString("

%1

").arg(tr("Drag and drop folders and comics here"))); - titleLabel = new QLabel(("This label doesn't contain comics yet")); - titleLabel->setAlignment(Qt::AlignCenter); - -#ifdef Q_OS_MAC - titleLabel->setStyleSheet("QLabel {color:#888888; font-size:24px;font-family:Arial;font-weight:bold;}"); -#else - titleLabel->setStyleSheet("QLabel {color:#CCCCCC; font-size:24px;font-family:Arial;font-weight:bold;}"); -#endif - - layout->addSpacing(100); - layout->addWidget(iconLabel); - layout->addSpacing(30); - layout->addWidget(titleLabel); - layout->addStretch(); - - setLayout(layout); + titleLabel->setText(tr("This label doesn't contain comics yet")); } void EmptyLabelWidget::setColor(YACReader::LabelColors color) @@ -42,9 +19,3 @@ void EmptyLabelWidget::setColor(YACReader::LabelColors color) YACReader::colorize(img,destColor); iconLabel->setPixmap(QPixmap::fromImage(img)); } - -void EmptyLabelWidget::paintEvent(QPaintEvent * event) -{ - QPainter painter (this); - painter.fillRect(0,0,width(),height(),QColor(backgroundColor)); -} diff --git a/YACReaderLibrary/empty_label_widget.h b/YACReaderLibrary/empty_label_widget.h index ac76f722..0e877da6 100644 --- a/YACReaderLibrary/empty_label_widget.h +++ b/YACReaderLibrary/empty_label_widget.h @@ -2,25 +2,21 @@ #define EMPTY_LABEL_WIDGET_H #include +#include "empty_container_info.h" #include "yacreader_global.h" -class EmptyLabelWidget : public QWidget +class EmptyLabelWidget : public EmptyContainerInfo { Q_OBJECT public: explicit EmptyLabelWidget(QWidget *parent = 0); void setColor(YACReader::LabelColors color); - void paintEvent(QPaintEvent *event); signals: public slots: protected: - QLabel * iconLabel; - QLabel * titleLabel; - QString backgroundColor; - }; #endif // EMPTY_LABEL_WIDGET_H diff --git a/YACReaderLibrary/empty_reading_list_widget.cpp b/YACReaderLibrary/empty_reading_list_widget.cpp new file mode 100644 index 00000000..f325dc37 --- /dev/null +++ b/YACReaderLibrary/empty_reading_list_widget.cpp @@ -0,0 +1,9 @@ +#include "empty_reading_list_widget.h" + +EmptyReadingListWidget::EmptyReadingListWidget(QWidget *parent) + :EmptyContainerInfo(parent) +{ + setUpDefaultLayout(true); + setPixmap(QPixmap(":/images/empty_reading_list")); + setText(tr("This reading list doesn't cotain comics yet")); +} diff --git a/YACReaderLibrary/empty_reading_list_widget.h b/YACReaderLibrary/empty_reading_list_widget.h new file mode 100644 index 00000000..566b8cfb --- /dev/null +++ b/YACReaderLibrary/empty_reading_list_widget.h @@ -0,0 +1,13 @@ +#ifndef EMPTY_READING_LIST_WIDGET_H +#define EMPTY_READING_LIST_WIDGET_H + +#include +#include "empty_container_info.h" + +class EmptyReadingListWidget : public EmptyContainerInfo +{ +public: + EmptyReadingListWidget(QWidget * parent = 0); +}; + +#endif // EMPTY_READING_LIST_WIDGET_H diff --git a/YACReaderLibrary/empty_special_list.cpp b/YACReaderLibrary/empty_special_list.cpp new file mode 100644 index 00000000..c4ec384d --- /dev/null +++ b/YACReaderLibrary/empty_special_list.cpp @@ -0,0 +1,7 @@ +#include "empty_special_list.h" + +EmptySpecialListWidget::EmptySpecialListWidget(QWidget *parent) + :EmptyContainerInfo(parent) +{ + setUpDefaultLayout(true); +} diff --git a/YACReaderLibrary/empty_special_list.h b/YACReaderLibrary/empty_special_list.h new file mode 100644 index 00000000..f9d4b117 --- /dev/null +++ b/YACReaderLibrary/empty_special_list.h @@ -0,0 +1,13 @@ +#ifndef EMPTY_SPECIAL_LIST_H +#define EMPTY_SPECIAL_LIST_H + +#include +#include "empty_container_info.h" + +class EmptySpecialListWidget : public EmptyContainerInfo +{ +public: + EmptySpecialListWidget(QWidget * parent = 0); +}; + +#endif // EMPTY_SPECIAL_LIST_H diff --git a/YACReaderLibrary/images.qrc b/YACReaderLibrary/images.qrc index a6e4be01..0086639e 100644 --- a/YACReaderLibrary/images.qrc +++ b/YACReaderLibrary/images.qrc @@ -1,5 +1,5 @@ - + ../images/folder.png ../images/folder_finished.png ../images/icon.png @@ -12,7 +12,7 @@ ../images/notCover.png ../images/edit.png ../images/editIcon.png - ../images/flow1.png + ../images/flow1.png ../images/flow2.png ../images/flow3.png ../images/flow4.png @@ -21,13 +21,13 @@ ../images/importLibraryIcon.png ../images/exportLibrary.png ../images/exportLibraryIcon.png - ../images/importLibraryIcon.png + ../images/importLibraryIcon.png ../images/open.png ../images/coversPackage.png ../images/setRead.png ../images/setUnread.png - + ../images/showMarks.png ../images/editComic.png ../images/selectAll.png @@ -59,26 +59,11 @@ ../images/trash.png ../images/setReadButton.png ../images/openInYACReader.png - - ../images/main_toolbar/divider.png + + ../images/main_toolbar/divider.png ../images/collapsed_branch_osx.png ../images/expanded_branch_osx.png - ../images/folder_macosx.png + ../images/folder_macosx.png ../images/libraryIconSelected.png ../images/libraryOptions.png ../images/branch-open.png @@ -90,28 +75,30 @@ ../images/getInfo.png ../images/comic_vine/radioChecked.png ../images/comic_vine/radioUnchecked.png - ../images/comic_vine/radioUnchecked.png - ../images/comic_vine/rowDown.png - ../images/comic_vine/rowUp.png - ../images/comic_vine/previousPage.png - ../images/comic_vine/nextPage.png - ../images/comic_vine/downArrow.png - ../images/comic_vine/upArrow.png + ../images/comic_vine/radioUnchecked.png + ../images/comic_vine/rowDown.png + ../images/comic_vine/rowUp.png + ../images/comic_vine/previousPage.png + ../images/comic_vine/nextPage.png + ../images/comic_vine/downArrow.png + ../images/comic_vine/upArrow.png ../images/find_folder.png - ../images/clear_shortcut.png - ../images/accept_shortcut.png + ../images/clear_shortcut.png + ../images/accept_shortcut.png ../images/f_overlayed.png ../images/f_overlayed_retina.png - ../images/shortcuts_group_comics.png - ../images/shortcuts_group_folders.png - ../images/shortcuts_group_general.png - ../images/shortcuts_group_libraries.png - ../images/shortcuts_group_mglass.png - ../images/shortcuts_group_page.png - ../images/shortcuts_group_reading.png - ../images/shortcuts_group_visualization.png - ../images/searching_icon.png - ../images/empty_label.png + ../images/shortcuts_group_comics.png + ../images/shortcuts_group_folders.png + ../images/shortcuts_group_general.png + ../images/shortcuts_group_libraries.png + ../images/shortcuts_group_mglass.png + ../images/shortcuts_group_page.png + ../images/shortcuts_group_reading.png + ../images/shortcuts_group_visualization.png + ../images/searching_icon.png + ../images/empty_label.png + ../images/empty_current_readings.png + ../images/empty_favorites.png - + \ No newline at end of file diff --git a/YACReaderLibrary/images_osx.qrc b/YACReaderLibrary/images_osx.qrc index 65aed99b..2244f4ca 100644 --- a/YACReaderLibrary/images_osx.qrc +++ b/YACReaderLibrary/images_osx.qrc @@ -1,51 +1,48 @@ - - ../images/folder_finished_macosx.png - ../images/main_toolbar/back_osx.png - ../images/main_toolbar/back_osx@2x.png - ../images/main_toolbar/forward_osx.png - ../images/main_toolbar/forward_osx@2x.png - ../images/main_toolbar/settings_osx.png - ../images/main_toolbar/settings_osx@2x.png - ../images/main_toolbar/server_osx.png - ../images/main_toolbar/server_osx@2x.png - ../images/main_toolbar/help_osx.png - ../images/main_toolbar/help_osx@2x.png - ../images/main_toolbar/flow_osx.png - ../images/main_toolbar/flow_osx@2x.png - ../images/main_toolbar/grid_osx.png - ../images/main_toolbar/grid_osx@2x.png - - ../images/libraryIcon_osx.png - ../images/setRoot_osx.png - ../images/expand_osx.png - ../images/colapse_osx.png - ../images/newLibraryIcon_osx.png - ../images/openLibraryIcon_osx.png - ../images/flow_to_grid.gif - ../images/grid_to_flow.gif - ../images/empty_folder_osx.png - ../images/empty_search_osx.png - ../images/iconSearch.png - ../images/clearSearch.png - - - ../images/lists/default_0_osx.png - ../images/lists/default_1_osx.png - ../images/lists/label_blue_osx.png - ../images/lists/label_cyan_osx.png - ../images/lists/label_dark_osx.png - ../images/lists/label_green_osx.png - ../images/lists/label_light_osx.png - ../images/lists/label_orange_osx.png - ../images/lists/label_pink_osx.png - ../images/lists/label_purple_osx.png - ../images/lists/label_red_osx.png - ../images/lists/label_violet_osx.png - ../images/lists/label_white_osx.png - ../images/lists/label_yellow_osx.png - ../images/lists/list_osx.png - - - - + + ../images/folder_finished_macosx.png + ../images/main_toolbar/back_osx.png + ../images/main_toolbar/back_osx@2x.png + ../images/main_toolbar/forward_osx.png + ../images/main_toolbar/forward_osx@2x.png + ../images/main_toolbar/settings_osx.png + ../images/main_toolbar/settings_osx@2x.png + ../images/main_toolbar/server_osx.png + ../images/main_toolbar/server_osx@2x.png + ../images/main_toolbar/help_osx.png + ../images/main_toolbar/help_osx@2x.png + ../images/main_toolbar/flow_osx.png + ../images/main_toolbar/flow_osx@2x.png + ../images/main_toolbar/grid_osx.png + ../images/main_toolbar/grid_osx@2x.png + ../images/libraryIcon_osx.png + ../images/setRoot_osx.png + ../images/expand_osx.png + ../images/colapse_osx.png + ../images/newLibraryIcon_osx.png + ../images/openLibraryIcon_osx.png + ../images/flow_to_grid.gif + ../images/grid_to_flow.gif + ../images/empty_folder_osx.png + ../images/empty_search_osx.png + ../images/iconSearch.png + ../images/clearSearch.png + + ../images/lists/default_0_osx.png + ../images/lists/default_1_osx.png + ../images/lists/label_blue_osx.png + ../images/lists/label_cyan_osx.png + ../images/lists/label_dark_osx.png + ../images/lists/label_green_osx.png + ../images/lists/label_light_osx.png + ../images/lists/label_orange_osx.png + ../images/lists/label_pink_osx.png + ../images/lists/label_purple_osx.png + ../images/lists/label_red_osx.png + ../images/lists/label_violet_osx.png + ../images/lists/label_white_osx.png + ../images/lists/label_yellow_osx.png + ../images/lists/list_osx.png + ../images/empty_reading_list_osx.png + + \ No newline at end of file diff --git a/YACReaderLibrary/images_win.qrc b/YACReaderLibrary/images_win.qrc index f0f62517..66c4015d 100644 --- a/YACReaderLibrary/images_win.qrc +++ b/YACReaderLibrary/images_win.qrc @@ -27,21 +27,21 @@ ../images/addLabelIcon.png ../images/renameListIcon.png - ../images/lists/default_0.png - ../images/lists/default_1.png - ../images/lists/label_blue.png - ../images/lists/label_cyan.png - ../images/lists/label_dark.png - ../images/lists/label_green.png - ../images/lists/label_light.png - ../images/lists/label_orange.png - ../images/lists/label_pink.png - ../images/lists/label_purple.png - ../images/lists/label_red.png - ../images/lists/label_violet.png - ../images/lists/label_white.png - ../images/lists/label_yellow.png - ../images/lists/list.png - + ../images/lists/default_0.png + ../images/lists/default_1.png + ../images/lists/label_blue.png + ../images/lists/label_cyan.png + ../images/lists/label_dark.png + ../images/lists/label_green.png + ../images/lists/label_light.png + ../images/lists/label_orange.png + ../images/lists/label_pink.png + ../images/lists/label_purple.png + ../images/lists/label_red.png + ../images/lists/label_violet.png + ../images/lists/label_white.png + ../images/lists/label_yellow.png + ../images/lists/list.png + ../images/empty_reading_list.png - + \ No newline at end of file diff --git a/YACReaderLibrary/library_window.cpp b/YACReaderLibrary/library_window.cpp index 7843c4b6..c85cf2dd 100644 --- a/YACReaderLibrary/library_window.cpp +++ b/YACReaderLibrary/library_window.cpp @@ -66,6 +66,8 @@ #include "comics_view_transition.h" #include "empty_folder_widget.h" #include "empty_label_widget.h" +#include "empty_special_list.h" +#include "empty_reading_list_widget.h" #include "edit_shortcuts_dialog.h" #include "shortcuts_manager.h" @@ -242,7 +244,10 @@ void LibraryWindow::doLayout() comicsViewStack->addWidget(comicsViewTransition = new ComicsViewTransition()); comicsViewStack->addWidget(emptyFolderWidget = new EmptyFolderWidget()); comicsViewStack->addWidget(emptyLabelWidget = new EmptyLabelWidget()); + comicsViewStack->addWidget(emptySpecialList = new EmptySpecialListWidget()); + comicsViewStack->addWidget(emptyReadingList = new EmptyReadingListWidget()); comicsViewStack->addWidget(noSearchResultsWidget = new NoSearchResultsWidget()); + comicsViewStack->addWidget(comicsView); comicsViewStack->setCurrentWidget(comicsView); @@ -2167,6 +2172,16 @@ void LibraryWindow::showEmptyLabelView() comicsViewStack->setCurrentWidget(emptyLabelWidget); } +void LibraryWindow::showEmptySpecialList() +{ + comicsViewStack->setCurrentWidget(emptySpecialList); +} + +void LibraryWindow::showEmptyReadingListWidget() +{ + comicsViewStack->setCurrentWidget(emptyReadingList); +} + void LibraryWindow::showNoSearchResultsView() { comicsViewStack->setCurrentWidget(noSearchResultsWidget); diff --git a/YACReaderLibrary/library_window.h b/YACReaderLibrary/library_window.h index 8602d517..fc087386 100644 --- a/YACReaderLibrary/library_window.h +++ b/YACReaderLibrary/library_window.h @@ -69,6 +69,8 @@ class ReadingListModelProxy; class YACReaderReadingListsView; class YACReaderHistoryController; class EmptyLabelWidget; +class EmptySpecialListWidget; +class EmptyReadingListWidget; #include "comic_db.h" @@ -123,6 +125,8 @@ private: ComicsViewTransition * comicsViewTransition; EmptyFolderWidget * emptyFolderWidget; EmptyLabelWidget * emptyLabelWidget; + EmptySpecialListWidget * emptySpecialList; + EmptyReadingListWidget * emptyReadingList; NoSearchResultsWidget * noSearchResultsWidget; YACReaderFoldersView * foldersView; @@ -361,6 +365,8 @@ public slots: void showComicsView(); void showEmptyFolderView(); void showEmptyLabelView(); + void showEmptySpecialList(); + void showEmptyReadingListWidget(); void showNoSearchResultsView(); void toggleComicsView(); void checkSearchNumResults(int numResults); diff --git a/YACReaderLibrary/yacreader_navigation_controller.cpp b/YACReaderLibrary/yacreader_navigation_controller.cpp index b2be7085..b1a70876 100644 --- a/YACReaderLibrary/yacreader_navigation_controller.cpp +++ b/YACReaderLibrary/yacreader_navigation_controller.cpp @@ -15,6 +15,7 @@ #include "yacreader_search_line_edit.h" #include "yacreader_global.h" #include "empty_label_widget.h" +#include "empty_special_list.h" #include "QsLog.h" @@ -98,7 +99,21 @@ void YACReaderNavigationController::loadListInfo(const QModelIndex &modelIndex) void YACReaderNavigationController::loadSpecialListInfo(const QModelIndex &modelIndex) { + ReadingListModel::TypeSpecialList type = (ReadingListModel::TypeSpecialList)modelIndex.data(ReadingListModel::SpecialListTypeRole).toInt(); + switch(type) + { + case ReadingListModel::Favorites: + libraryWindow->emptySpecialList->setPixmap(QPixmap(":/images/empty_favorites.png")); + libraryWindow->emptySpecialList->setText(tr("No favorites")); + break; + case ReadingListModel::Reading: + libraryWindow->emptySpecialList->setPixmap(QPixmap(":/images/empty_current_readings.png")); + libraryWindow->emptySpecialList->setText(tr("You are not reading anything yet, come on!!")); + break; + } + libraryWindow->showEmptySpecialList(); + libraryWindow->disableComicsActions(true); } void YACReaderNavigationController::loadLabelInfo(const QModelIndex &modelIndex) @@ -126,7 +141,8 @@ void YACReaderNavigationController::loadLabelInfo(const QModelIndex &modelIndex) void YACReaderNavigationController::loadReadingListInfo(const QModelIndex &modelIndex) { - + libraryWindow->showEmptyReadingListWidget(); + libraryWindow->disableComicsActions(true); } void YACReaderNavigationController::selectedList(const QModelIndex &mi) diff --git a/images/empty_current_readings.png b/images/empty_current_readings.png new file mode 100644 index 0000000000000000000000000000000000000000..776fb0c3e8ba0207ffb8325d8f0f7ec776f32be8 GIT binary patch literal 1550 zcmcJPdr;C@6vuh^C{UVFr&aS&wqdjm;Tu#G99eZ!EU8(`N4cw_?wTfOktnE9?oRg7 ze5FVaVZtD`rOd)jw3q1uMq+9q*+U7lhbW2C?$7#br@wd3+wvwam zVXiO`2xK1{6O{;L0kAYHY=B*weX0sbE_6~7osyqL-=AKX2_k0X|CG5lHZPr;nV6ZL z!PwWA83qDbOJbvl+YgLRKdp{;i*{x|%RCLq265iF>T%S+ zd&xDejOJ5xt_h)^RbZhHX5W3#If%i(o6i23M^L7fFHHG~|0vfaYu|(8>{E>Mk6WBO zo=?yCralN6&&^z18uWd5|4x6&;<*2$==nJ-v*l+0!4COMI0Z!?VJw*j7W#a* zMV2lUD@Xo*@DDw#HtE)F|H*GQSyRBDyLsta{qE+oS5(rV80> zXqL|szFi`|kqnhHoCZeL)xUQ?fd+B>aSiOA#(;rp@lB;SmX&1H>AWIqsFdr%E0}@M zG{e10Frl>+u49T8R2VRaRzJ}ubDxDzm0>`fSr(?|K<*4XZLzM~<(I_rPH;dO9*&jA zIS_4)Hi{e#A4Y>t4d?cpF;echyfwVSG0#%CUPF!?+#{plG7?8>a#auo5qK`%8%Gj) z+t7kE$dUxYynN>)^y?BaLH5L5J-vp(NgXsvrwz z(Z8SG`NZiWdc`XrQ~W%az1p9&$$FCc8WYSG3nTe48+1NdX7zfN7eA)+xeQ%Y)8);B zWACB%UKvmSh*Tk|yrR39Z$7@UGa?k}2O+e4-cIt#!d_e>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@FCKaXk^!zd2ZDug{u}X67qGW=vT3mLPyRn?(^Jy` literal 0 HcmV?d00001 diff --git a/images/empty_reading_list.png b/images/empty_reading_list.png new file mode 100644 index 0000000000000000000000000000000000000000..36669888d486f05a4060afc50a13e337c1ed16a1 GIT binary patch literal 2471 zcmbW2`#%%=nk*7^Pg=ks`cKJWKWugB;0csyV4ce@=0ssJD zR9CPegJ-ZfO({`qL<&xQ%0^E>tjpDjh^I%3al?c1)_Zfsa6c z2yxLBj-@^O{gBE~=9ai~MnWA%ck8j}Ks#HN9Z!4-B|$Z-T$@bxrvlXn=Io95Ur%4^ z?$0#N5`8>rP*3Jm3&)lHJ*)ss8X}>^x&@YVG z!F_8TQHtlp+)RB4O41=`Rg%y5O#KhUP#BaC?9=rXZz~~el-C=hy6U4Ld%P;nHQa(_ z&@@G>I&m)5Bc>yS*wNN(4~7n|7}(V?N!WRvc%Hs(-2qciaBC8p$Kh(`qBiG1xX#AI zLloxI5N6eq;Y0tPUSHg!gHI^VP#Km2-%IFsfy_`er}Yvg_haNTA-1@!RW50^|;_8UChiyUD94Ni@a?^epB~et6E|W2o(@*NjqAMC35;- zHYF?*&N&==|CT;qHPp-?yw2UmTe2;Q+}xFPg16?<8+`mlp6Xc^_sN?==I8b*o}igm zJ4Q;lD>pKi0$+vDkH?)^o4p_S>o9r4q5S~c1D^h_?n8h|IC81y*{N~07Vxn}MW#)w z&yj-bL;_W^O5!Vt)>AI@Z?=2TS|XDjniU@?5c9wN)$M!r+n>(ff6a<_oKl(7nh*DR znv}MJ2(0^xiRy|ol7{JDp3us{GVQPNjO=MN=JZ4+Clfu*(}w>Dzm9c`(6PH3Nb`3H zBeYan9fFuQk$I14RQM*?x zZ$@+6n)h-l?nI%xDU#xrKEUsiq8x;&3~?}EW$XIbUNMaiY4Mnk)g_htZst_boQjVt zJFOc$uwW}$EtsLMv_Z3=mS-FE1tYq3oHs2W=SCj&^0BuE6=j592wc<@GUTas7h#CCgF40A)?rXHY;slY$?Vf zT_&LObLA_P1+`Gtiwy;LC@jaU#+`|3WfPFQ_>0lH?il@^h?-CCd!9+z&Z+o%X#M>n z=HCBv`krK`Fz@bVwDRSC`;^pP7S&o|G$;%$47JFp!`&80&F$@Roicmn*HuP&7l%;O z%w?c<&H`w$cPciZ!`(+4n$kBDeDdE{J}!Cw%~Fzby}E0xAdRloaVKazI=HKU?$&|w z4dP>T`L~R6nn&v6H#z5Se2}MS{qB+l@tNOnQwd@yzGGy~DUKE>b8z|(o2`cXSPmV* z%t@`ch)I2r9{R=uWa7QT!T8W$D0W!zQjs9ME!}EuYVrBaVVWf6?I?5S=;?hteR1Tx z%8k;gyj?nPj&cmwI@vW=4FPX8>`E(xFKZ~p%K)vio;yKn6jI8d1*ZL`a{n?70KiGq z%fn-jc(X~CDhJ@}*i@`CoH?F{U(3m`L2e^FIR@YRN4S951QBIX@`O;Cb=vUzajB_L{q(i zzBjj;cP(cJEzalIGHkuF+cQ<&cW5G28@y-a;}+Mge5S9j^XUWVHU8&o0Z2-i%d_#r zQj{0>qhQ(~_q9%b7ISGT1sBZTwz^n~Of(luV?$$p0K+Q<7e{ z3E<7=-142a#q$)M#t|sm?vokG-V0K0Grx~|L%A=eRM!a^`Rj8h-yti$hrk}V=E=g4 zWn{y{mhphK43d1&&cw%D%Er3%o0qxwv!M0f|Kv1Bal?QRLoul(GL;YWF74Xo zeAhoW8l@mLM>~c!A#%G+4(BEI*He2Ri3_d&S(H+4dr#N;~8Ovij`TN@1T3$`pv+OOk7ZdoeO8;W-Hj6o|j)N4?^8;5V kN*Lh#vT@Cz`)!%E0j3@O3_mEli)7hAI=MSm+h4r-H;Fr%kpKVy literal 0 HcmV?d00001 diff --git a/images/empty_reading_list_osx.png b/images/empty_reading_list_osx.png new file mode 100644 index 0000000000000000000000000000000000000000..59667e1f36d5e37dc44af8c4f39e171f2877715f GIT binary patch literal 2346 zcmbVN`8OMA7Y@-R2)ark( z6L&bb9s=UL7SeVMPLK$NJB8W>`h`Y#1^WUnpaZ>q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