mirror of
https://github.com/YACReader/yacreader
synced 2025-05-28 03:10:27 -04:00
Format
This commit is contained in:
parent
e587f59ddb
commit
a632480422
@ -87,7 +87,7 @@
|
|||||||
#include <shellapi.h>
|
#include <shellapi.h>
|
||||||
#endif
|
#endif
|
||||||
#ifdef Q_OS_MACOS
|
#ifdef Q_OS_MACOS
|
||||||
#include "trayhandler.h"
|
#include "trayhandler.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
LibraryWindow::LibraryWindow()
|
LibraryWindow::LibraryWindow()
|
||||||
@ -531,229 +531,229 @@ void LibraryWindow::createActions()
|
|||||||
setAllAsNonReadAction->setToolTip(tr("Set all comics as unread"));
|
setAllAsNonReadAction->setToolTip(tr("Set all comics as unread"));
|
||||||
setAllAsNonReadAction->setIcon(QIcon(":/images/comics_view_toolbar/setAllUnread.png"));*/
|
setAllAsNonReadAction->setIcon(QIcon(":/images/comics_view_toolbar/setAllUnread.png"));*/
|
||||||
|
|
||||||
showHideMarksAction = new QAction(tr("Show/Hide marks"), this);
|
showHideMarksAction = new QAction(tr("Show/Hide marks"), this);
|
||||||
showHideMarksAction->setToolTip(tr("Show or hide read marks"));
|
showHideMarksAction->setToolTip(tr("Show or hide read marks"));
|
||||||
showHideMarksAction->setData(SHOW_HIDE_MARKS_ACTION_YL);
|
showHideMarksAction->setData(SHOW_HIDE_MARKS_ACTION_YL);
|
||||||
showHideMarksAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(SHOW_HIDE_MARKS_ACTION_YL));
|
showHideMarksAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(SHOW_HIDE_MARKS_ACTION_YL));
|
||||||
showHideMarksAction->setCheckable(true);
|
showHideMarksAction->setCheckable(true);
|
||||||
showHideMarksAction->setIcon(QIcon(":/images/comics_view_toolbar/showMarks.png"));
|
showHideMarksAction->setIcon(QIcon(":/images/comics_view_toolbar/showMarks.png"));
|
||||||
showHideMarksAction->setChecked(true);
|
showHideMarksAction->setChecked(true);
|
||||||
#ifndef Q_OS_MAC
|
#ifndef Q_OS_MAC
|
||||||
toggleFullScreenAction = new QAction(tr("Fullscreen mode on/off"), this);
|
toggleFullScreenAction = new QAction(tr("Fullscreen mode on/off"), this);
|
||||||
toggleFullScreenAction->setToolTip(tr("Fullscreen mode on/off"));
|
toggleFullScreenAction->setToolTip(tr("Fullscreen mode on/off"));
|
||||||
toggleFullScreenAction->setData(TOGGLE_FULL_SCREEN_ACTION_YL);
|
toggleFullScreenAction->setData(TOGGLE_FULL_SCREEN_ACTION_YL);
|
||||||
toggleFullScreenAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(TOGGLE_FULL_SCREEN_ACTION_YL));
|
toggleFullScreenAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(TOGGLE_FULL_SCREEN_ACTION_YL));
|
||||||
QIcon icoFullscreenButton;
|
QIcon icoFullscreenButton;
|
||||||
icoFullscreenButton.addPixmap(QPixmap(":/images/main_toolbar/fullscreen.png"), QIcon::Normal);
|
icoFullscreenButton.addPixmap(QPixmap(":/images/main_toolbar/fullscreen.png"), QIcon::Normal);
|
||||||
toggleFullScreenAction->setIcon(icoFullscreenButton);
|
toggleFullScreenAction->setIcon(icoFullscreenButton);
|
||||||
#endif
|
#endif
|
||||||
helpAboutAction = new QAction(this);
|
helpAboutAction = new QAction(this);
|
||||||
helpAboutAction->setToolTip(tr("Help, About YACReader"));
|
helpAboutAction->setToolTip(tr("Help, About YACReader"));
|
||||||
helpAboutAction->setData(HELP_ABOUT_ACTION_YL);
|
helpAboutAction->setData(HELP_ABOUT_ACTION_YL);
|
||||||
helpAboutAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(HELP_ABOUT_ACTION_YL));
|
helpAboutAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(HELP_ABOUT_ACTION_YL));
|
||||||
QIcon icoHelpButton;
|
QIcon icoHelpButton;
|
||||||
icoHelpButton.addFile(":/images/main_toolbar/help.png", QSize(), QIcon::Normal);
|
icoHelpButton.addFile(":/images/main_toolbar/help.png", QSize(), QIcon::Normal);
|
||||||
helpAboutAction->setIcon(icoHelpButton);
|
helpAboutAction->setIcon(icoHelpButton);
|
||||||
|
|
||||||
addFolderAction = new QAction(tr("Add new folder"), this);
|
addFolderAction = new QAction(tr("Add new folder"), this);
|
||||||
addFolderAction->setData(ADD_FOLDER_ACTION_YL);
|
addFolderAction->setData(ADD_FOLDER_ACTION_YL);
|
||||||
addFolderAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(ADD_FOLDER_ACTION_YL));
|
addFolderAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(ADD_FOLDER_ACTION_YL));
|
||||||
addFolderAction->setToolTip(tr("Add new folder to the current library"));
|
addFolderAction->setToolTip(tr("Add new folder to the current library"));
|
||||||
addFolderAction->setIcon(QIcon(":/images/sidebar/addNew_sidebar.png"));
|
addFolderAction->setIcon(QIcon(":/images/sidebar/addNew_sidebar.png"));
|
||||||
|
|
||||||
deleteFolderAction = new QAction(tr("Delete folder"), this);
|
deleteFolderAction = new QAction(tr("Delete folder"), this);
|
||||||
deleteFolderAction->setData(REMOVE_FOLDER_ACTION_YL);
|
deleteFolderAction->setData(REMOVE_FOLDER_ACTION_YL);
|
||||||
deleteFolderAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(REMOVE_FOLDER_ACTION_YL));
|
deleteFolderAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(REMOVE_FOLDER_ACTION_YL));
|
||||||
deleteFolderAction->setToolTip(tr("Delete current folder from disk"));
|
deleteFolderAction->setToolTip(tr("Delete current folder from disk"));
|
||||||
deleteFolderAction->setIcon(QIcon(":/images/sidebar/delete_sidebar.png"));
|
deleteFolderAction->setIcon(QIcon(":/images/sidebar/delete_sidebar.png"));
|
||||||
|
|
||||||
setRootIndexAction = new QAction(this);
|
setRootIndexAction = new QAction(this);
|
||||||
setRootIndexAction->setData(SET_ROOT_INDEX_ACTION_YL);
|
setRootIndexAction->setData(SET_ROOT_INDEX_ACTION_YL);
|
||||||
setRootIndexAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(SET_ROOT_INDEX_ACTION_YL));
|
setRootIndexAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(SET_ROOT_INDEX_ACTION_YL));
|
||||||
setRootIndexAction->setToolTip(tr("Select root node"));
|
setRootIndexAction->setToolTip(tr("Select root node"));
|
||||||
setRootIndexAction->setIcon(QIcon(":/images/sidebar/setRoot.png"));
|
setRootIndexAction->setIcon(QIcon(":/images/sidebar/setRoot.png"));
|
||||||
|
|
||||||
expandAllNodesAction = new QAction(this);
|
expandAllNodesAction = new QAction(this);
|
||||||
expandAllNodesAction->setToolTip(tr("Expand all nodes"));
|
expandAllNodesAction->setToolTip(tr("Expand all nodes"));
|
||||||
expandAllNodesAction->setData(EXPAND_ALL_NODES_ACTION_YL);
|
expandAllNodesAction->setData(EXPAND_ALL_NODES_ACTION_YL);
|
||||||
expandAllNodesAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(EXPAND_ALL_NODES_ACTION_YL));
|
expandAllNodesAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(EXPAND_ALL_NODES_ACTION_YL));
|
||||||
expandAllNodesAction->setIcon(QIcon(":/images/sidebar/expand.png"));
|
expandAllNodesAction->setIcon(QIcon(":/images/sidebar/expand.png"));
|
||||||
|
|
||||||
colapseAllNodesAction = new QAction(this);
|
colapseAllNodesAction = new QAction(this);
|
||||||
colapseAllNodesAction->setToolTip(tr("Collapse all nodes"));
|
colapseAllNodesAction->setToolTip(tr("Collapse all nodes"));
|
||||||
colapseAllNodesAction->setData(COLAPSE_ALL_NODES_ACTION_YL);
|
colapseAllNodesAction->setData(COLAPSE_ALL_NODES_ACTION_YL);
|
||||||
colapseAllNodesAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(COLAPSE_ALL_NODES_ACTION_YL));
|
colapseAllNodesAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(COLAPSE_ALL_NODES_ACTION_YL));
|
||||||
colapseAllNodesAction->setIcon(QIcon(":/images/sidebar/colapse.png"));
|
colapseAllNodesAction->setIcon(QIcon(":/images/sidebar/colapse.png"));
|
||||||
|
|
||||||
optionsAction = new QAction(this);
|
optionsAction = new QAction(this);
|
||||||
optionsAction->setToolTip(tr("Show options dialog"));
|
optionsAction->setToolTip(tr("Show options dialog"));
|
||||||
optionsAction->setData(OPTIONS_ACTION_YL);
|
optionsAction->setData(OPTIONS_ACTION_YL);
|
||||||
optionsAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(OPTIONS_ACTION_YL));
|
optionsAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(OPTIONS_ACTION_YL));
|
||||||
QIcon icoSettingsButton;
|
QIcon icoSettingsButton;
|
||||||
icoSettingsButton.addFile(":/images/main_toolbar/settings.png", QSize(), QIcon::Normal);
|
icoSettingsButton.addFile(":/images/main_toolbar/settings.png", QSize(), QIcon::Normal);
|
||||||
optionsAction->setIcon(icoSettingsButton);
|
optionsAction->setIcon(icoSettingsButton);
|
||||||
|
|
||||||
serverConfigAction = new QAction(this);
|
serverConfigAction = new QAction(this);
|
||||||
serverConfigAction->setToolTip(tr("Show comics server options dialog"));
|
serverConfigAction->setToolTip(tr("Show comics server options dialog"));
|
||||||
serverConfigAction->setData(SERVER_CONFIG_ACTION_YL);
|
serverConfigAction->setData(SERVER_CONFIG_ACTION_YL);
|
||||||
serverConfigAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(SERVER_CONFIG_ACTION_YL));
|
serverConfigAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(SERVER_CONFIG_ACTION_YL));
|
||||||
QIcon icoServerButton;
|
QIcon icoServerButton;
|
||||||
icoServerButton.addFile(":/images/main_toolbar/server.png", QSize(), QIcon::Normal);
|
icoServerButton.addFile(":/images/main_toolbar/server.png", QSize(), QIcon::Normal);
|
||||||
serverConfigAction->setIcon(icoServerButton);
|
serverConfigAction->setIcon(icoServerButton);
|
||||||
|
|
||||||
toggleComicsViewAction = new QAction(tr("Change between comics views"), this);
|
toggleComicsViewAction = new QAction(tr("Change between comics views"), this);
|
||||||
toggleComicsViewAction->setToolTip(tr("Change between comics views"));
|
toggleComicsViewAction->setToolTip(tr("Change between comics views"));
|
||||||
QIcon icoViewsButton;
|
QIcon icoViewsButton;
|
||||||
|
|
||||||
if (!settings->contains(COMICS_VIEW_STATUS) || settings->value(COMICS_VIEW_STATUS) == Flow)
|
if (!settings->contains(COMICS_VIEW_STATUS) || settings->value(COMICS_VIEW_STATUS) == Flow)
|
||||||
icoViewsButton.addFile(":/images/main_toolbar/grid.png", QSize(), QIcon::Normal);
|
icoViewsButton.addFile(":/images/main_toolbar/grid.png", QSize(), QIcon::Normal);
|
||||||
else if (settings->value(COMICS_VIEW_STATUS) == Grid)
|
else if (settings->value(COMICS_VIEW_STATUS) == Grid)
|
||||||
icoViewsButton.addFile(":/images/main_toolbar/info.png", QSize(), QIcon::Normal);
|
icoViewsButton.addFile(":/images/main_toolbar/info.png", QSize(), QIcon::Normal);
|
||||||
else
|
else
|
||||||
icoViewsButton.addFile(":/images/main_toolbar/flow.png", QSize(), QIcon::Normal);
|
icoViewsButton.addFile(":/images/main_toolbar/flow.png", QSize(), QIcon::Normal);
|
||||||
|
|
||||||
toggleComicsViewAction->setData(TOGGLE_COMICS_VIEW_ACTION_YL);
|
toggleComicsViewAction->setData(TOGGLE_COMICS_VIEW_ACTION_YL);
|
||||||
toggleComicsViewAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(TOGGLE_COMICS_VIEW_ACTION_YL));
|
toggleComicsViewAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(TOGGLE_COMICS_VIEW_ACTION_YL));
|
||||||
toggleComicsViewAction->setIcon(icoViewsButton);
|
toggleComicsViewAction->setIcon(icoViewsButton);
|
||||||
//socialAction = new QAction(this);
|
//socialAction = new QAction(this);
|
||||||
|
|
||||||
openContainingFolderAction = new QAction(this);
|
openContainingFolderAction = new QAction(this);
|
||||||
openContainingFolderAction->setText(tr("Open folder..."));
|
openContainingFolderAction->setText(tr("Open folder..."));
|
||||||
openContainingFolderAction->setData(OPEN_CONTAINING_FOLDER_ACTION_YL);
|
openContainingFolderAction->setData(OPEN_CONTAINING_FOLDER_ACTION_YL);
|
||||||
openContainingFolderAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(OPEN_CONTAINING_FOLDER_ACTION_YL));
|
openContainingFolderAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(OPEN_CONTAINING_FOLDER_ACTION_YL));
|
||||||
openContainingFolderAction->setIcon(QIcon(":/images/menus_icons/open.png"));
|
openContainingFolderAction->setIcon(QIcon(":/images/menus_icons/open.png"));
|
||||||
|
|
||||||
setFolderAsNotCompletedAction = new QAction(this);
|
setFolderAsNotCompletedAction = new QAction(this);
|
||||||
setFolderAsNotCompletedAction->setText(tr("Set as uncompleted"));
|
setFolderAsNotCompletedAction->setText(tr("Set as uncompleted"));
|
||||||
setFolderAsNotCompletedAction->setData(SET_FOLDER_AS_NOT_COMPLETED_ACTION_YL);
|
setFolderAsNotCompletedAction->setData(SET_FOLDER_AS_NOT_COMPLETED_ACTION_YL);
|
||||||
setFolderAsNotCompletedAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(SET_FOLDER_AS_NOT_COMPLETED_ACTION_YL));
|
setFolderAsNotCompletedAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(SET_FOLDER_AS_NOT_COMPLETED_ACTION_YL));
|
||||||
|
|
||||||
setFolderAsCompletedAction = new QAction(this);
|
setFolderAsCompletedAction = new QAction(this);
|
||||||
setFolderAsCompletedAction->setText(tr("Set as completed"));
|
setFolderAsCompletedAction->setText(tr("Set as completed"));
|
||||||
setFolderAsCompletedAction->setData(SET_FOLDER_AS_COMPLETED_ACTION_YL);
|
setFolderAsCompletedAction->setData(SET_FOLDER_AS_COMPLETED_ACTION_YL);
|
||||||
setFolderAsCompletedAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(SET_FOLDER_AS_COMPLETED_ACTION_YL));
|
setFolderAsCompletedAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(SET_FOLDER_AS_COMPLETED_ACTION_YL));
|
||||||
|
|
||||||
setFolderAsReadAction = new QAction(this);
|
setFolderAsReadAction = new QAction(this);
|
||||||
setFolderAsReadAction->setText(tr("Set as read"));
|
setFolderAsReadAction->setText(tr("Set as read"));
|
||||||
setFolderAsReadAction->setData(SET_FOLDER_AS_READ_ACTION_YL);
|
setFolderAsReadAction->setData(SET_FOLDER_AS_READ_ACTION_YL);
|
||||||
setFolderAsReadAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(SET_FOLDER_AS_READ_ACTION_YL));
|
setFolderAsReadAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(SET_FOLDER_AS_READ_ACTION_YL));
|
||||||
|
|
||||||
setFolderAsUnreadAction = new QAction(this);
|
setFolderAsUnreadAction = new QAction(this);
|
||||||
setFolderAsUnreadAction->setText(tr("Set as unread"));
|
setFolderAsUnreadAction->setText(tr("Set as unread"));
|
||||||
setFolderAsUnreadAction->setData(SET_FOLDER_AS_UNREAD_ACTION_YL);
|
setFolderAsUnreadAction->setData(SET_FOLDER_AS_UNREAD_ACTION_YL);
|
||||||
setFolderAsUnreadAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(SET_FOLDER_AS_UNREAD_ACTION_YL));
|
setFolderAsUnreadAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(SET_FOLDER_AS_UNREAD_ACTION_YL));
|
||||||
|
|
||||||
openContainingFolderComicAction = new QAction(this);
|
openContainingFolderComicAction = new QAction(this);
|
||||||
openContainingFolderComicAction->setText(tr("Open containing folder..."));
|
openContainingFolderComicAction->setText(tr("Open containing folder..."));
|
||||||
openContainingFolderComicAction->setData(OPEN_CONTAINING_FOLDER_COMIC_ACTION_YL);
|
openContainingFolderComicAction->setData(OPEN_CONTAINING_FOLDER_COMIC_ACTION_YL);
|
||||||
openContainingFolderComicAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(OPEN_CONTAINING_FOLDER_COMIC_ACTION_YL));
|
openContainingFolderComicAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(OPEN_CONTAINING_FOLDER_COMIC_ACTION_YL));
|
||||||
openContainingFolderComicAction->setIcon(QIcon(":/images/menus_icons/open.png"));
|
openContainingFolderComicAction->setIcon(QIcon(":/images/menus_icons/open.png"));
|
||||||
|
|
||||||
resetComicRatingAction = new QAction(this);
|
resetComicRatingAction = new QAction(this);
|
||||||
resetComicRatingAction->setText(tr("Reset comic rating"));
|
resetComicRatingAction->setText(tr("Reset comic rating"));
|
||||||
resetComicRatingAction->setData(RESET_COMIC_RATING_ACTION_YL);
|
resetComicRatingAction->setData(RESET_COMIC_RATING_ACTION_YL);
|
||||||
resetComicRatingAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(RESET_COMIC_RATING_ACTION_YL));
|
resetComicRatingAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(RESET_COMIC_RATING_ACTION_YL));
|
||||||
|
|
||||||
//Edit comics actions------------------------------------------------------
|
//Edit comics actions------------------------------------------------------
|
||||||
selectAllComicsAction = new QAction(this);
|
selectAllComicsAction = new QAction(this);
|
||||||
selectAllComicsAction->setText(tr("Select all comics"));
|
selectAllComicsAction->setText(tr("Select all comics"));
|
||||||
selectAllComicsAction->setData(SELECT_ALL_COMICS_ACTION_YL);
|
selectAllComicsAction->setData(SELECT_ALL_COMICS_ACTION_YL);
|
||||||
selectAllComicsAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(SELECT_ALL_COMICS_ACTION_YL));
|
selectAllComicsAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(SELECT_ALL_COMICS_ACTION_YL));
|
||||||
selectAllComicsAction->setIcon(QIcon(":/images/comics_view_toolbar/selectAll.png"));
|
selectAllComicsAction->setIcon(QIcon(":/images/comics_view_toolbar/selectAll.png"));
|
||||||
|
|
||||||
editSelectedComicsAction = new QAction(this);
|
editSelectedComicsAction = new QAction(this);
|
||||||
editSelectedComicsAction->setText(tr("Edit"));
|
editSelectedComicsAction->setText(tr("Edit"));
|
||||||
editSelectedComicsAction->setData(EDIT_SELECTED_COMICS_ACTION_YL);
|
editSelectedComicsAction->setData(EDIT_SELECTED_COMICS_ACTION_YL);
|
||||||
editSelectedComicsAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(EDIT_SELECTED_COMICS_ACTION_YL));
|
editSelectedComicsAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(EDIT_SELECTED_COMICS_ACTION_YL));
|
||||||
editSelectedComicsAction->setIcon(QIcon(":/images/comics_view_toolbar/editComic.png"));
|
editSelectedComicsAction->setIcon(QIcon(":/images/comics_view_toolbar/editComic.png"));
|
||||||
|
|
||||||
asignOrderAction = new QAction(this);
|
asignOrderAction = new QAction(this);
|
||||||
asignOrderAction->setText(tr("Assign current order to comics"));
|
asignOrderAction->setText(tr("Assign current order to comics"));
|
||||||
asignOrderAction->setData(ASIGN_ORDER_ACTION_YL);
|
asignOrderAction->setData(ASIGN_ORDER_ACTION_YL);
|
||||||
asignOrderAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(ASIGN_ORDER_ACTION_YL));
|
asignOrderAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(ASIGN_ORDER_ACTION_YL));
|
||||||
asignOrderAction->setIcon(QIcon(":/images/comics_view_toolbar/asignNumber.png"));
|
asignOrderAction->setIcon(QIcon(":/images/comics_view_toolbar/asignNumber.png"));
|
||||||
|
|
||||||
forceCoverExtractedAction = new QAction(this);
|
forceCoverExtractedAction = new QAction(this);
|
||||||
forceCoverExtractedAction->setText(tr("Update cover"));
|
forceCoverExtractedAction->setText(tr("Update cover"));
|
||||||
forceCoverExtractedAction->setData(FORCE_COVER_EXTRACTED_ACTION_YL);
|
forceCoverExtractedAction->setData(FORCE_COVER_EXTRACTED_ACTION_YL);
|
||||||
forceCoverExtractedAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(FORCE_COVER_EXTRACTED_ACTION_YL));
|
forceCoverExtractedAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(FORCE_COVER_EXTRACTED_ACTION_YL));
|
||||||
forceCoverExtractedAction->setIcon(QIcon(":/images/importCover.png"));
|
forceCoverExtractedAction->setIcon(QIcon(":/images/importCover.png"));
|
||||||
|
|
||||||
deleteComicsAction = new QAction(this);
|
deleteComicsAction = new QAction(this);
|
||||||
deleteComicsAction->setText(tr("Delete selected comics"));
|
deleteComicsAction->setText(tr("Delete selected comics"));
|
||||||
deleteComicsAction->setData(DELETE_COMICS_ACTION_YL);
|
deleteComicsAction->setData(DELETE_COMICS_ACTION_YL);
|
||||||
deleteComicsAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(DELETE_COMICS_ACTION_YL));
|
deleteComicsAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(DELETE_COMICS_ACTION_YL));
|
||||||
deleteComicsAction->setIcon(QIcon(":/images/comics_view_toolbar/trash.png"));
|
deleteComicsAction->setIcon(QIcon(":/images/comics_view_toolbar/trash.png"));
|
||||||
|
|
||||||
getInfoAction = new QAction(this);
|
getInfoAction = new QAction(this);
|
||||||
getInfoAction->setData(GET_INFO_ACTION_YL);
|
getInfoAction->setData(GET_INFO_ACTION_YL);
|
||||||
getInfoAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(GET_INFO_ACTION_YL));
|
getInfoAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(GET_INFO_ACTION_YL));
|
||||||
getInfoAction->setText(tr("Download tags from Comic Vine"));
|
getInfoAction->setText(tr("Download tags from Comic Vine"));
|
||||||
getInfoAction->setIcon(QIcon(":/images/comics_view_toolbar/getInfo.png"));
|
getInfoAction->setIcon(QIcon(":/images/comics_view_toolbar/getInfo.png"));
|
||||||
//-------------------------------------------------------------------------
|
//-------------------------------------------------------------------------
|
||||||
|
|
||||||
showEditShortcutsAction = new QAction(tr("Edit shortcuts"), this);
|
showEditShortcutsAction = new QAction(tr("Edit shortcuts"), this);
|
||||||
showEditShortcutsAction->setData(SHOW_EDIT_SHORTCUTS_ACTION_YL);
|
showEditShortcutsAction->setData(SHOW_EDIT_SHORTCUTS_ACTION_YL);
|
||||||
showEditShortcutsAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(SHOW_EDIT_SHORTCUTS_ACTION_YL));
|
showEditShortcutsAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(SHOW_EDIT_SHORTCUTS_ACTION_YL));
|
||||||
showEditShortcutsAction->setShortcutContext(Qt::ApplicationShortcut);
|
showEditShortcutsAction->setShortcutContext(Qt::ApplicationShortcut);
|
||||||
addAction(showEditShortcutsAction);
|
addAction(showEditShortcutsAction);
|
||||||
|
|
||||||
updateFolderAction = new QAction(tr("Update folder"), this);
|
updateFolderAction = new QAction(tr("Update folder"), this);
|
||||||
updateFolderAction->setIcon(QIcon(":/images/menus_icons/updateLibraryIcon.png"));
|
updateFolderAction->setIcon(QIcon(":/images/menus_icons/updateLibraryIcon.png"));
|
||||||
|
|
||||||
updateCurrentFolderAction = new QAction(tr("Update current folder"), this);
|
updateCurrentFolderAction = new QAction(tr("Update current folder"), this);
|
||||||
updateCurrentFolderAction->setData(UPDATE_CURRENT_FOLDER_ACTION_YL);
|
updateCurrentFolderAction->setData(UPDATE_CURRENT_FOLDER_ACTION_YL);
|
||||||
updateCurrentFolderAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(UPDATE_CURRENT_FOLDER_ACTION_YL));
|
updateCurrentFolderAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(UPDATE_CURRENT_FOLDER_ACTION_YL));
|
||||||
updateCurrentFolderAction->setIcon(QIcon(":/images/menus_icons/updateLibraryIcon.png"));
|
updateCurrentFolderAction->setIcon(QIcon(":/images/menus_icons/updateLibraryIcon.png"));
|
||||||
|
|
||||||
addReadingListAction = new QAction(tr("Add new reading list"), this);
|
addReadingListAction = new QAction(tr("Add new reading list"), this);
|
||||||
addReadingListAction->setData(ADD_READING_LIST_ACTION_YL);
|
addReadingListAction->setData(ADD_READING_LIST_ACTION_YL);
|
||||||
addReadingListAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(ADD_READING_LIST_ACTION_YL));
|
addReadingListAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(ADD_READING_LIST_ACTION_YL));
|
||||||
addReadingListAction->setToolTip(tr("Add a new reading list to the current library"));
|
addReadingListAction->setToolTip(tr("Add a new reading list to the current library"));
|
||||||
addReadingListAction->setIcon(QIcon(":/images/sidebar/addNew_sidebar.png"));
|
addReadingListAction->setIcon(QIcon(":/images/sidebar/addNew_sidebar.png"));
|
||||||
|
|
||||||
deleteReadingListAction = new QAction(tr("Remove reading list"), this);
|
deleteReadingListAction = new QAction(tr("Remove reading list"), this);
|
||||||
deleteReadingListAction->setData(REMOVE_READING_LIST_ACTION_YL);
|
deleteReadingListAction->setData(REMOVE_READING_LIST_ACTION_YL);
|
||||||
deleteReadingListAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(REMOVE_READING_LIST_ACTION_YL));
|
deleteReadingListAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(REMOVE_READING_LIST_ACTION_YL));
|
||||||
deleteReadingListAction->setToolTip(tr("Remove current reading list from the library"));
|
deleteReadingListAction->setToolTip(tr("Remove current reading list from the library"));
|
||||||
deleteReadingListAction->setIcon(QIcon(":/images/sidebar/delete_sidebar.png"));
|
deleteReadingListAction->setIcon(QIcon(":/images/sidebar/delete_sidebar.png"));
|
||||||
|
|
||||||
addLabelAction = new QAction(tr("Add new label"), this);
|
addLabelAction = new QAction(tr("Add new label"), this);
|
||||||
addLabelAction->setData(ADD_LABEL_ACTION_YL);
|
addLabelAction->setData(ADD_LABEL_ACTION_YL);
|
||||||
addLabelAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(ADD_LABEL_ACTION_YL));
|
addLabelAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(ADD_LABEL_ACTION_YL));
|
||||||
addLabelAction->setToolTip(tr("Add a new label to this library"));
|
addLabelAction->setToolTip(tr("Add a new label to this library"));
|
||||||
addLabelAction->setIcon(QIcon(":/images/sidebar/addLabelIcon.png"));
|
addLabelAction->setIcon(QIcon(":/images/sidebar/addLabelIcon.png"));
|
||||||
|
|
||||||
renameListAction = new QAction(tr("Rename selected list"), this);
|
renameListAction = new QAction(tr("Rename selected list"), this);
|
||||||
renameListAction->setData(RENAME_LIST_ACTION_YL);
|
renameListAction->setData(RENAME_LIST_ACTION_YL);
|
||||||
renameListAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(RENAME_LIST_ACTION_YL));
|
renameListAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(RENAME_LIST_ACTION_YL));
|
||||||
renameListAction->setToolTip(tr("Rename any selected labels or lists"));
|
renameListAction->setToolTip(tr("Rename any selected labels or lists"));
|
||||||
renameListAction->setIcon(QIcon(":/images/sidebar/renameListIcon.png"));
|
renameListAction->setIcon(QIcon(":/images/sidebar/renameListIcon.png"));
|
||||||
|
|
||||||
//--
|
//--
|
||||||
addToMenuAction = new QAction(tr("Add to..."), this);
|
addToMenuAction = new QAction(tr("Add to..."), this);
|
||||||
|
|
||||||
addToFavoritesAction = new QAction(tr("Favorites"), this);
|
addToFavoritesAction = new QAction(tr("Favorites"), this);
|
||||||
addToFavoritesAction->setData(ADD_TO_FAVORITES_ACTION_YL);
|
addToFavoritesAction->setData(ADD_TO_FAVORITES_ACTION_YL);
|
||||||
addToFavoritesAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(ADD_TO_FAVORITES_ACTION_YL));
|
addToFavoritesAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(ADD_TO_FAVORITES_ACTION_YL));
|
||||||
addToFavoritesAction->setToolTip(tr("Add selected comics to favorites list"));
|
addToFavoritesAction->setToolTip(tr("Add selected comics to favorites list"));
|
||||||
addToFavoritesAction->setIcon(QIcon(":/images/lists/default_1.png"));
|
addToFavoritesAction->setIcon(QIcon(":/images/lists/default_1.png"));
|
||||||
|
|
||||||
//actions not asigned to any widget
|
//actions not asigned to any widget
|
||||||
this->addAction(saveCoversToAction);
|
this->addAction(saveCoversToAction);
|
||||||
this->addAction(openContainingFolderAction);
|
this->addAction(openContainingFolderAction);
|
||||||
this->addAction(updateCurrentFolderAction);
|
this->addAction(updateCurrentFolderAction);
|
||||||
this->addAction(resetComicRatingAction);
|
this->addAction(resetComicRatingAction);
|
||||||
this->addAction(setFolderAsCompletedAction);
|
this->addAction(setFolderAsCompletedAction);
|
||||||
this->addAction(setFolderAsNotCompletedAction);
|
this->addAction(setFolderAsNotCompletedAction);
|
||||||
this->addAction(setFolderAsReadAction);
|
this->addAction(setFolderAsReadAction);
|
||||||
this->addAction(setFolderAsUnreadAction);
|
this->addAction(setFolderAsUnreadAction);
|
||||||
#ifndef Q_OS_MAC
|
#ifndef Q_OS_MAC
|
||||||
this->addAction(toggleFullScreenAction);
|
this->addAction(toggleFullScreenAction);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//disable actions
|
//disable actions
|
||||||
disableAllActions();
|
disableAllActions();
|
||||||
}
|
}
|
||||||
void LibraryWindow::disableComicsActions(bool disabled)
|
void LibraryWindow::disableComicsActions(bool disabled)
|
||||||
{
|
{
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
#include "exit_check.h"
|
#include "exit_check.h"
|
||||||
#include "opengl_checker.h"
|
#include "opengl_checker.h"
|
||||||
#ifdef Q_OS_MACOS
|
#ifdef Q_OS_MACOS
|
||||||
#include "trayhandler.h"
|
#include "trayhandler.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "QsLog.h"
|
#include "QsLog.h"
|
||||||
@ -130,12 +130,12 @@ int main(int argc, char **argv)
|
|||||||
app.setApplicationVersion(VERSION);
|
app.setApplicationVersion(VERSION);
|
||||||
app.setAttribute(Qt::AA_UseHighDpiPixmaps);
|
app.setAttribute(Qt::AA_UseHighDpiPixmaps);
|
||||||
|
|
||||||
// Set window icon according to Freedesktop icon specification
|
// Set window icon according to Freedesktop icon specification
|
||||||
// This is mostly relevant for Linux and other Unix systems
|
// This is mostly relevant for Linux and other Unix systems
|
||||||
if (QIcon::hasThemeIcon("YACReaderLibrary")) {
|
if (QIcon::hasThemeIcon("YACReaderLibrary")) {
|
||||||
app.setWindowIcon(QIcon::fromTheme("YACReaderLibrary"));
|
app.setWindowIcon(QIcon::fromTheme("YACReaderLibrary"));
|
||||||
}
|
}
|
||||||
// TODO: We might want to add a fallback icon here.
|
// TODO: We might want to add a fallback icon here.
|
||||||
|
|
||||||
QString destLog = YACReader::getSettingsPath() + "/yacreaderlibrary.log";
|
QString destLog = YACReader::getSettingsPath() + "/yacreaderlibrary.log";
|
||||||
QDir().mkpath(YACReader::getSettingsPath());
|
QDir().mkpath(YACReader::getSettingsPath());
|
||||||
@ -216,18 +216,18 @@ int main(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef SERVER_RELEASE
|
#ifdef SERVER_RELEASE
|
||||||
QSettings * settings = new QSettings(YACReader::getSettingsPath()+"/YACReaderLibrary.ini",QSettings::IniFormat); //TODO unificar la creaci<63>n del fichero de config con el servidor
|
QSettings *settings = new QSettings(YACReader::getSettingsPath() + "/YACReaderLibrary.ini", QSettings::IniFormat); //TODO unificar la creaci<63>n del fichero de config con el servidor
|
||||||
settings->beginGroup("libraryConfig");
|
settings->beginGroup("libraryConfig");
|
||||||
|
|
||||||
s = new Startup();
|
s = new Startup();
|
||||||
|
|
||||||
if (settings->value(SERVER_ON, true).toBool()) {
|
if (settings->value(SERVER_ON, true).toBool()) {
|
||||||
s->start();
|
s->start();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
QLOG_INFO() << "YACReaderLibrary attempting to start";
|
QLOG_INFO() << "YACReaderLibrary attempting to start";
|
||||||
|
|
||||||
logSystemAndConfig();
|
logSystemAndConfig();
|
||||||
|
|
||||||
if (YACReaderLocalServer::isRunning()) //s<>lo se permite una instancia de YACReaderLibrary
|
if (YACReaderLocalServer::isRunning()) //s<>lo se permite una instancia de YACReaderLibrary
|
||||||
{
|
{
|
||||||
@ -241,24 +241,24 @@ int main(int argc, char **argv)
|
|||||||
|
|
||||||
auto mw = new LibraryWindow();
|
auto mw = new LibraryWindow();
|
||||||
|
|
||||||
mw->connect(localServer,SIGNAL(comicUpdated(quint64, const ComicDB &)),mw,SLOT(updateComicsView(quint64, const ComicDB &)), Qt::QueuedConnection);
|
mw->connect(localServer, SIGNAL(comicUpdated(quint64, const ComicDB &)), mw, SLOT(updateComicsView(quint64, const ComicDB &)), Qt::QueuedConnection);
|
||||||
|
|
||||||
//connections to localServer
|
//connections to localServer
|
||||||
|
|
||||||
mw->show();
|
mw->show();
|
||||||
|
|
||||||
int ret = app.exec();
|
int ret = app.exec();
|
||||||
|
|
||||||
QLOG_INFO() << "YACReaderLibrary closed with exit code :" << ret;
|
QLOG_INFO() << "YACReaderLibrary closed with exit code :" << ret;
|
||||||
|
|
||||||
YACReader::exitCheck(ret);
|
YACReader::exitCheck(ret);
|
||||||
|
|
||||||
//shutdown
|
//shutdown
|
||||||
s->stop();
|
s->stop();
|
||||||
delete s;
|
delete s;
|
||||||
localServer->close();
|
localServer->close();
|
||||||
delete localServer;
|
delete localServer;
|
||||||
delete mw;
|
delete mw;
|
||||||
|
|
||||||
QsLogging::Logger::destroyInstance();
|
QsLogging::Logger::destroyInstance();
|
||||||
|
|
||||||
|
@ -44,8 +44,8 @@ OptionsDialog::OptionsDialog(QWidget *parent)
|
|||||||
sw->hide();
|
sw->hide();
|
||||||
#endif
|
#endif
|
||||||
// Tray icon settings
|
// Tray icon settings
|
||||||
QGroupBox * trayIconBox = new QGroupBox(tr("Tray icon settings"));
|
QGroupBox *trayIconBox = new QGroupBox(tr("Tray icon settings"));
|
||||||
QVBoxLayout * trayLayout = new QVBoxLayout();
|
QVBoxLayout *trayLayout = new QVBoxLayout();
|
||||||
|
|
||||||
auto apiKeyLayout = new QVBoxLayout();
|
auto apiKeyLayout = new QVBoxLayout();
|
||||||
auto apiKeyButton = new QPushButton(tr("Edit Comic Vine API key"));
|
auto apiKeyButton = new QPushButton(tr("Edit Comic Vine API key"));
|
||||||
|
@ -19,20 +19,21 @@ public slots:
|
|||||||
void editApiKey();
|
void editApiKey();
|
||||||
void restoreOptions(QSettings *settings) override;
|
void restoreOptions(QSettings *settings) override;
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void useBackgroundImageCheckClicked(bool checked);
|
void useBackgroundImageCheckClicked(bool checked);
|
||||||
void backgroundImageOpacitySliderChanged(int value);
|
void backgroundImageOpacitySliderChanged(int value);
|
||||||
void backgroundImageBlurRadiusSliderChanged(int value);
|
void backgroundImageBlurRadiusSliderChanged(int value);
|
||||||
void useCurrentComicCoverCheckClicked(bool checked);
|
void useCurrentComicCoverCheckClicked(bool checked);
|
||||||
void resetToDefaults();
|
void resetToDefaults();
|
||||||
private:
|
|
||||||
QCheckBox * useBackgroundImageCheck;
|
private:
|
||||||
QCheckBox * useCurrentComicCoverCheck;
|
QCheckBox *useBackgroundImageCheck;
|
||||||
QSlider * backgroundImageOpacitySlider;
|
QCheckBox *useCurrentComicCoverCheck;
|
||||||
QSlider * backgroundImageBlurRadiusSlider;
|
QSlider *backgroundImageOpacitySlider;
|
||||||
QLabel * opacityLabel;
|
QSlider *backgroundImageBlurRadiusSlider;
|
||||||
QLabel * blurLabel;
|
QLabel *opacityLabel;
|
||||||
QPushButton * resetButton;
|
QLabel *blurLabel;
|
||||||
|
QPushButton *resetButton;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user