diff --git a/YACReaderLibrary/images_win.qrc b/YACReaderLibrary/images_win.qrc index 99e83640..c75eb5bb 100644 --- a/YACReaderLibrary/images_win.qrc +++ b/YACReaderLibrary/images_win.qrc @@ -24,5 +24,6 @@ ../images/delete_sidebar.png ../images/iconSearchNew.png ../images/clearSearchNew.png + ../images/addLabelIcon.png diff --git a/YACReaderLibrary/library_window.cpp b/YACReaderLibrary/library_window.cpp index ae6c35c8..e64c4893 100644 --- a/YACReaderLibrary/library_window.cpp +++ b/YACReaderLibrary/library_window.cpp @@ -198,6 +198,9 @@ void LibraryWindow::doLayout() readingListsTitle->addAction(addReadingListAction); readingListsTitle->addAction(deleteReadingListAction); + readingListsTitle->addSepartor(); + readingListsTitle->addAction(addLabelAction); + readingListsTitle->addSpacing(3); //FINAL LAYOUT------------------------------------------------------------- comicsViewStack = new QStackedWidget(); @@ -338,6 +341,13 @@ void LibraryWindow::setUpShortcutsManagement() << updateCurrentFolderAction); allActions << tmpList; + editShortcutsDialog->addActionsGroup("Lists",QIcon(":/images/shortcuts_group_folders.png"), //TODO change icon + tmpList = QList() + << addReadingListAction + << deleteReadingListAction + << addLabelAction); + allActions << tmpList; + editShortcutsDialog->addActionsGroup("General",QIcon(":/images/shortcuts_group_general.png"), tmpList = QList() << backAction @@ -703,6 +713,12 @@ void LibraryWindow::createActions() deleteReadingListAction->setToolTip(tr("Remove current reading list from the library")); deleteReadingListAction->setIcon(QIcon(":/images/delete_sidebar.png")); + addLabelAction = new QAction(tr("Add new label"), this); + addLabelAction->setData(ADD_LABEL_ACTION_YL); + addLabelAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(ADD_LABEL_ACTION_YL)); + addLabelAction->setToolTip(tr("Add a new label to this library")); + addLabelAction->setIcon(QIcon(":/images/addLabelIcon.png")); + //disable actions disableAllActions(); } diff --git a/YACReaderLibrary/library_window.h b/YACReaderLibrary/library_window.h index ce4c39cf..1611d784 100644 --- a/YACReaderLibrary/library_window.h +++ b/YACReaderLibrary/library_window.h @@ -187,6 +187,7 @@ private: //reading lists actions QAction * addReadingListAction; QAction * deleteReadingListAction; + QAction * addLabelAction; //-- //QAction * expandAllNodesRLAction; //QAction * colapseAllNodesRLAction; diff --git a/images/addLabelIcon.png b/images/addLabelIcon.png new file mode 100644 index 00000000..d82284db Binary files /dev/null and b/images/addLabelIcon.png differ diff --git a/shortcuts_management/shortcuts_manager.h b/shortcuts_management/shortcuts_manager.h index 3ae3f768..7c435fd7 100644 --- a/shortcuts_management/shortcuts_manager.h +++ b/shortcuts_management/shortcuts_manager.h @@ -77,6 +77,7 @@ public: #define REMOVE_FOLDER_ACTION_YL "REMOVE_FOLDER_ACTION_YL" #define ADD_READING_LIST_ACTION_YL "ADD_READING_LIST_ACTION_YL" #define REMOVE_READING_LIST_ACTION_YL "REMOVE_READING_LIST_ACTION_YL" +#define ADD_LABEL_ACTION_YL "ADD_LABEL_ACTION_YL" //COMMANDS YACReaderLibrary