| 1 | // For license of this file, see <project-root-folder>/LICENSE.md.cxx . . $ `<file>/src/librssguard/miscellaneous/iconfactory.h`/ |
| 2 | |
| 3 | #ifndef ICONFACTORY_H |
| 4 | #define ICONFACTORY_Hcxx . . $ `src/librssguard/miscellaneous/iconfactory.h:4:9`! |
| 5 | |
| 6 | #include "definitions/definitions.h"cxx . . $ `<file>/src/librssguard/definitions/definitions.h`/ |
| 7 | #include "miscellaneous/application.h"cxx . . $ `<file>/src/librssguard/miscellaneous/application.h`/ |
| 8 | |
| 9 | #include <QDir> |
| 10 | #include <QHash> |
| 11 | #include <QIcon> |
| 12 | #include <QObject> |
| 13 | #include <QString> |
| 14 | |
| 15 | class RSSGUARD_DLLSPECcxx . . $ `<built-in>:525:9`! IconFactorycxx . . $ IconFactory# : public QObjectcxx . . $ QObject# { |
| 16 | Q_OBJECTcxx . . $ IconFactory#qt_create_metaobjectdata(a52531b27a9fa42b). |
| 17 | |
| 18 | public: |
| 19 | explicit IconFactorycxx . . $ IconFactory#IconFactory(749de1b6ae65bddd).(QObjectcxx . . $ QObject#* parent = nullptr); |
| 20 | virtual ~cxx . . $ IconFactory#`~IconFactory`(ced63f7c635d850d).IconFactorycxx . . $ IconFactory#(); |
| 21 | |
| 22 | // Generates round icon of given color. |
| 23 | static QIconcxx . . $ QIcon# generateIconcxx . . $ IconFactory#generateIcon(e60330f79968ef46).(const QColorcxx . . $ QColor#& color); |
| 24 | |
| 25 | // Used to store/retrieve QIcons from/to Base64-encoded |
| 26 | // byte array. |
| 27 | static QIconcxx . . $ QIcon# fromByteArraycxx . . $ IconFactory#fromByteArray(c0ca791f368010bb).(QByteArraycxx . . $ QByteArray# array); |
| 28 | static QByteArraycxx . . $ QByteArray# toByteArraycxx . . $ IconFactory#toByteArray(e1f790fd40d1d8c2).(const QIconcxx . . $ QIcon#& icon); |
| 29 | |
| 30 | // Returns icon from active theme or invalid icon if |
| 31 | // "no icon theme" is set. |
| 32 | QIconcxx . . $ QIcon# fromThemecxx . . $ IconFactory#fromTheme(e457fbbee8993f3).(const QStringcxx . . $ QString#& name, const QStringcxx . . $ QString#& fallback =cxx . . $ QString#QString(ced63f7c635d850d). {}); |
| 33 | |
| 34 | QPixmapcxx . . $ QPixmap# miscPixmapcxx . . $ IconFactory#miscPixmap(13bf8f5656ba7097).(const QStringcxx . . $ QString#& name); |
| 35 | QIconcxx . . $ QIcon# miscIconcxx . . $ IconFactory#miscIcon(ef5a0418eb2d5e9b).(const QStringcxx . . $ QString#& name); |
| 36 | |
| 37 | // Adds custom application path to be search for icons. |
| 38 | void setupSearchPathscxx . . $ IconFactory#setupSearchPaths(49f6e7a06ebc5aa8).(); |
| 39 | |
| 40 | // Returns list of installed themes, including "default" theme. |
| 41 | QStringListcxx . . $ QStringList# installedIconThemescxx . . $ IconFactory#installedIconThemes(2b25566bdf736d18).() const; |
| 42 | |
| 43 | // Loads name of selected icon theme (from settings) for the application and |
| 44 | // activates it. If that particular theme is not installed, then |
| 45 | // "default" theme is loaded. |
| 46 | void loadCurrentIconThemecxx . . $ IconFactory#loadCurrentIconTheme(49f6e7a06ebc5aa8).(); |
| 47 | |
| 48 | // Returns name of currently activated theme for the application. |
| 49 | QStringcxx . . $ QString# currentIconThemecxx . . $ IconFactory#currentIconTheme(6ef7b6c27b00b43d).() const; |
| 50 | |
| 51 | // Sets icon theme with given name as the active one and loads it. |
| 52 | void setCurrentIconThemecxx . . $ IconFactory#setCurrentIconTheme(3520e46b33348bf6).(const QStringcxx . . $ QString#& theme_name); |
| 53 | }; |
| 54 | |
| 55 | #endif // ICONFACTORY_H |