1 /* 2 Copyright (c) 2020, Lukas Holecek <hluk@email.cz> 3 4 This file is part of CopyQ. 5 6 CopyQ is free software: you can redistribute it and/or modify 7 it under the terms of the GNU General Public License as published by 8 the Free Software Foundation, either version 3 of the License, or 9 (at your option) any later version. 10 11 CopyQ is distributed in the hope that it will be useful, 12 but WITHOUT ANY WARRANTY; without even the implied warranty of 13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 GNU General Public License for more details. 15 16 You should have received a copy of the GNU General Public License 17 along with CopyQ. If not, see <http://www.gnu.org/licenses/>. 18 */ 19 #ifndef MENUITEMS_H 20 #define MENUITEMS_H 21 22 #include <QList> 23 #include <QKeySequence> 24 #include <QString> 25 #include <QtContainerFwd> 26 #include <QSettings> 27 28 namespace Actions { 29 30 enum Id { 31 File_New, 32 File_Import, 33 File_Export, 34 File_Preferences, 35 File_Commands, 36 File_ShowClipboardContent, 37 File_ShowPreview, 38 File_ToggleClipboardStoring, 39 File_ProcessManager, 40 File_Exit, 41 42 Edit_SortSelectedItems, 43 Edit_ReverseSelectedItems, 44 Edit_PasteItems, 45 Edit_CopySelectedItems, 46 Edit_FindItems, 47 48 Item_MoveToClipboard, 49 Item_ShowContent, 50 Item_Remove, 51 Item_Edit, 52 Item_EditNotes, 53 Item_EditWithEditor, 54 Item_Action, 55 56 Item_MoveUp, 57 Item_MoveDown, 58 Item_MoveToTop, 59 Item_MoveToBottom, 60 61 Tabs_NewTab, 62 Tabs_RenameTab, 63 Tabs_RemoveTab, 64 Tabs_ChangeTabIcon, 65 Tabs_NextTab, 66 Tabs_PreviousTab, 67 68 Help_Help, 69 Help_ShowLog, 70 Help_About, 71 72 ItemMenu 73 }; 74 75 } // Actions 76 77 struct MenuItem { 78 QString iconName; 79 ushort iconId = 0; 80 QString text; 81 QString settingsKey; 82 QKeySequence defaultShortcut; 83 QList<QKeySequence> shortcuts; 84 }; 85 86 using MenuItems = QVector<MenuItem>; 87 88 MenuItems menuItems(); 89 90 void loadShortcuts(MenuItems *items, const QSettings &settings); 91 92 #endif // MENUITEMS_H 93