1 /*************************************************************************** 2 icons.h 3 ------------------- 4 begin : Sun Jun 25 2017 5 copyright : (C) 2017 by Łukasz Wojniłowicz <lukasz.wojnilowicz@gmail.com> 6 (C) 2020 by Dawid Wróbel <me@dawidwrobel.com> 7 8 9 ***************************************************************************/ 10 11 /*************************************************************************** 12 * * 13 * This program is free software; you can redistribute it and/or modify * 14 * it under the terms of the GNU General Public License as published by * 15 * the Free Software Foundation; either version 2 of the License, or * 16 * (at your option) any later version. * 17 * * 18 ***************************************************************************/ 19 20 #ifndef ICONS_H 21 #define ICONS_H 22 23 // ---------------------------------------------------------------------------- 24 // QT Includes 25 26 #include <icons/kmm_icons_export.h> 27 28 // ---------------------------------------------------------------------------- 29 // Project Includes 30 31 class QString; 32 class QIcon; 33 34 namespace Icons { 35 36 enum class IconSet { Common, Oxygen, Tango, Breeze }; 37 38 enum class Icon { OpenDatabase, Merge, Reconcile, Split, Tip, PerformanceTest, 39 Calculator, 40 UserProperties, DocumentProperties, 41 ZoomIn, ZoomOut, 42 Pause, SeekForward, 43 SkipForward, 44 HideReconciled, HideCategories, 45 Home, Institution, Institutions, 46 Accounts, 47 Schedule, Tags, 48 Payees, 49 Investment, Investments, Reports, 50 Budget, Forecast, 51 OnlineJobOutbox, Filter, 52 Loan, Stock, 53 Checking, 54 Savings, 55 LoanAsset, CreditCard, 56 Cash, Equity, 57 Income, Expense, 58 Asset, Liability, 59 UpcomingEvents, CalendarDay, 60 Ledger, BankAccount, 61 Currencies, FinancialCategories, 62 Transaction, Bank, 63 Calendar, 64 TransactionDetails, Close, 65 DialogOK, DialogClose, DialogCancel, 66 DialogOKApply, DialogError, DialogWarning, 67 DialogInformation, 68 ListExpand, ListCollapse, 69 ListAdd, ListAddUser, ListRemoveUser, 70 ListAddTag, ListRemoveTag, 71 GoTo, KeyEnter, Download, TagRename, 72 EditDelete, EditCopy, EditRename, 73 Find, EditUndo, EditClear, 74 DocumentEdit, 75 DocumentNew, DocumentSave, 76 DocumentClose, DocumentOpen, 77 DocumentImport, DocumentExport, 78 OfficeChartLine, 79 MailMessageNew, MailMessage, MailReceive, 80 MapOnlineAccount, UnmapOnlineAccount, 81 NewSchedule, KMyMoney, 82 PayeeRename, PayeeMerge, 83 Configure, 84 Reconciled, AccountClosed, Unknown, 85 Report, Refresh, PreferencesGeneral, 86 SortAscending, SortDescending, 87 ArrowUp, ArrowDown, ArrowRight, ArrowLeft, 88 Warning, TaskComplete, 89 TaskReject, TaskAccepted, TaskOngoing, 90 Help, Folder, 91 PreferencesFonts, PreferencesColors, PreferencesIcons, 92 PreferencesNetwork, PreferencesPlugins, 93 Empty, 94 InstitutionNew, InstitutionEdit, InstitutionDelete, 95 AccountNew, AccountEdit, AccountDelete, 96 AccountClose, AccountReopen, 97 AccountUpdate, AccountUpdateAll, 98 AccountCreditTransfer, AccountFinishReconciliation, 99 CategoryNew, CategoryEdit, CategoryDelete, 100 TransactionNew, TransactionEdit, 101 TransactionMatch, TransactionAccept, 102 InvestmentNew, InvestmentEdit, 103 InvestmentDelete, InvestmentOnlinePrice, 104 BudgetNew, BudgetRename, BudgetDelete, BudgetCopy, 105 PriceUpdate, InvestmentOnlinePriceAll, Reverse, Visibility, NoVisibility, 106 SelectAll 107 }; 108 109 KMM_ICONS_EXPORT void setUpMappings(const QString & themeName); 110 KMM_ICONS_EXPORT QIcon get(Icons::Icon icon); 111 112 113 /** 114 * return an icon from the application local cache or an icon provided 115 * by the application. The @a name is formatted as @c type:iconName. 116 * The following types are supported 117 * 118 * - enum 119 * - favicon 120 * 121 * @sa storeIconInApplicationCache(const QString& name, const QIcon& icon) 122 */ 123 KMM_ICONS_EXPORT QIcon loadIconFromApplicationCache(const QString& name); 124 125 /** 126 * store the @a icon in the applications local cache directory under the given @a name. 127 * The @a name is formatted as @c type:iconName. 128 * The icon will be stored in the file "type-iconName". 129 * 130 * @sa loadIconFromApplicationCache(const QString& name) 131 */ 132 KMM_ICONS_EXPORT bool storeIconInApplicationCache(const QString& name, const QIcon& icon); 133 } 134 135 #endif 136