From 3b1ca917aac93b2e14e54bb2797a991bbd18344a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20=C3=81ngel=20San=20Mart=C3=ADn?= Date: Wed, 29 Oct 2014 23:53:35 +0100 Subject: [PATCH] added add label action --- YACReaderLibrary/images_win.qrc | 1 + YACReaderLibrary/library_window.cpp | 16 ++++++++++++++++ YACReaderLibrary/library_window.h | 1 + images/addLabelIcon.png | Bin 0 -> 441 bytes shortcuts_management/shortcuts_manager.h | 1 + 5 files changed, 19 insertions(+) create mode 100644 images/addLabelIcon.png 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 0000000000000000000000000000000000000000..d82284db468de5df7f61fb5de95b2b20d264a9de GIT binary patch literal 441 zcmV;q0Y?6bP)dJT(yghE)k~+;vi_DEotNL4Ockgo$bLx zFGrtW-rReqHPnNFCRhbJ(D-@@CSVK-O(7d#1MGoau+BpoT>b!W;Hw@$&nsXDw1Ob$ z*tUIKPcMpMc#47P6H~|s-EQ|nCRgPd23538|7Qxh<2cTdD7D+|J8&&5(f(*m_-3VC ztMbog>AakODwrF9@+!A%gq>-ua0vb>VFP zAmmvVQj-UK1FJ6RLQBT7kSxm{AzumdXfCTRkqHi?D7ry+ZZSXM7pf^cNV40g^RuzZ j=igvRcS!c;UjYUHbJBkVfqvU100000NkvXXu0mjfuP?th literal 0 HcmV?d00001 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