added add label action

This commit is contained in:
Luis Ángel San Martín 2014-10-29 23:53:35 +01:00
parent 741c88c690
commit 3b1ca917aa
5 changed files with 19 additions and 0 deletions

View File

@ -24,5 +24,6 @@
<file>../images/delete_sidebar.png</file> <file>../images/delete_sidebar.png</file>
<file alias="images/iconSearch.png">../images/iconSearchNew.png</file> <file alias="images/iconSearch.png">../images/iconSearchNew.png</file>
<file alias="images/clearSearch.png">../images/clearSearchNew.png</file> <file alias="images/clearSearch.png">../images/clearSearchNew.png</file>
<file>../images/addLabelIcon.png</file>
</qresource> </qresource>
</RCC> </RCC>

View File

@ -198,6 +198,9 @@ void LibraryWindow::doLayout()
readingListsTitle->addAction(addReadingListAction); readingListsTitle->addAction(addReadingListAction);
readingListsTitle->addAction(deleteReadingListAction); readingListsTitle->addAction(deleteReadingListAction);
readingListsTitle->addSepartor();
readingListsTitle->addAction(addLabelAction);
readingListsTitle->addSpacing(3);
//FINAL LAYOUT------------------------------------------------------------- //FINAL LAYOUT-------------------------------------------------------------
comicsViewStack = new QStackedWidget(); comicsViewStack = new QStackedWidget();
@ -338,6 +341,13 @@ void LibraryWindow::setUpShortcutsManagement()
<< updateCurrentFolderAction); << updateCurrentFolderAction);
allActions << tmpList; allActions << tmpList;
editShortcutsDialog->addActionsGroup("Lists",QIcon(":/images/shortcuts_group_folders.png"), //TODO change icon
tmpList = QList<QAction *>()
<< addReadingListAction
<< deleteReadingListAction
<< addLabelAction);
allActions << tmpList;
editShortcutsDialog->addActionsGroup("General",QIcon(":/images/shortcuts_group_general.png"), editShortcutsDialog->addActionsGroup("General",QIcon(":/images/shortcuts_group_general.png"),
tmpList = QList<QAction *>() tmpList = QList<QAction *>()
<< backAction << backAction
@ -703,6 +713,12 @@ void LibraryWindow::createActions()
deleteReadingListAction->setToolTip(tr("Remove current reading list from the library")); deleteReadingListAction->setToolTip(tr("Remove current reading list from the library"));
deleteReadingListAction->setIcon(QIcon(":/images/delete_sidebar.png")); 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 //disable actions
disableAllActions(); disableAllActions();
} }

View File

@ -187,6 +187,7 @@ private:
//reading lists actions //reading lists actions
QAction * addReadingListAction; QAction * addReadingListAction;
QAction * deleteReadingListAction; QAction * deleteReadingListAction;
QAction * addLabelAction;
//-- //--
//QAction * expandAllNodesRLAction; //QAction * expandAllNodesRLAction;
//QAction * colapseAllNodesRLAction; //QAction * colapseAllNodesRLAction;

BIN
images/addLabelIcon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 441 B

View File

@ -77,6 +77,7 @@ public:
#define REMOVE_FOLDER_ACTION_YL "REMOVE_FOLDER_ACTION_YL" #define REMOVE_FOLDER_ACTION_YL "REMOVE_FOLDER_ACTION_YL"
#define ADD_READING_LIST_ACTION_YL "ADD_READING_LIST_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 REMOVE_READING_LIST_ACTION_YL "REMOVE_READING_LIST_ACTION_YL"
#define ADD_LABEL_ACTION_YL "ADD_LABEL_ACTION_YL"
//COMMANDS YACReaderLibrary //COMMANDS YACReaderLibrary