{"id":15206977,"url":"https://github.com/hellorge/qtsvgiconengine","last_synced_at":"2026-02-15T19:31:36.976Z","repository":{"id":249926371,"uuid":"832973571","full_name":"Hellorge/QtSvgIconEngine","owner":"Hellorge","description":"QtSvgIconEngine is Qt based program to use svg files as icons with support for animations and transitions.","archived":false,"fork":false,"pushed_at":"2024-11-11T23:30:15.000Z","size":2463,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-01T23:41:17.629Z","etag":null,"topics":["cpp","qanimation","qicon","qt","qt-svg-icons","svg"],"latest_commit_sha":null,"homepage":"","language":"CSS","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-2.1","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Hellorge.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-07-24T05:37:11.000Z","updated_at":"2024-11-11T23:30:19.000Z","dependencies_parsed_at":"2024-08-04T17:14:13.564Z","dependency_job_id":"7f902d90-d47b-42e0-abcd-9f599aeb25ea","html_url":"https://github.com/Hellorge/QtSvgIconEngine","commit_stats":{"total_commits":31,"total_committers":2,"mean_commits":15.5,"dds":"0.032258064516129004","last_synced_commit":"c016ff996f7943f8b48d1a229386c46fbce4a25c"},"previous_names":["hellorge/qtsvgiconengine"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hellorge%2FQtSvgIconEngine","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hellorge%2FQtSvgIconEngine/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hellorge%2FQtSvgIconEngine/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hellorge%2FQtSvgIconEngine/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Hellorge","download_url":"https://codeload.github.com/Hellorge/QtSvgIconEngine/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238791894,"owners_count":19531027,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cpp","qanimation","qicon","qt","qt-svg-icons","svg"],"created_at":"2024-09-28T06:05:07.880Z","updated_at":"2025-10-29T07:32:44.280Z","avatar_url":"https://github.com/Hellorge.png","language":"CSS","funding_links":[],"categories":[],"sub_categories":[],"readme":"Demo uses the beautiful open source [ionicons](https://ionic.io/ionicons)\n\nMerge requests are welcome, I'll only work on or add functionality I deem required while working on other projects of mine.\n\n\u003e [!NOTE]\n\u003e The `CMakeLists.txt` bundles all `.svg` files present in provided directory in a resource file `resources.qrc` located inside your build folder.\n\n### Usage\n```\nSvgIconEngine iconEngine(\u003cpath/to/svg/files/directory\u003e, \u003coptions\u003e);\n\nSvgIcon icon = iconEngine.getIcon(\u003cstyle\u003e, \u003cicon_name\u003e, \u003coptions\u003e);\n// to get an icon\n\niconEngine.setDefaults(\u003coptions\u003e);\n// set new default options\n\niconEngine.setCachePolicy(CachePolicy::\u003cpolicy\u003e);\n// {ALL, NONE, LRU}\n// ALL: cache all, NONE: no caching, LRU: 100 QSvgRenderer instances will be cache at once\n\niconEngine.clearCache();\n// clear QSvgRenderer cache, without cache QSvgRenderer instances are generated from svg paths for each time an icon is requested.\n```\n\n### Arguments\n1. `SvgIconEngine::SvgIconEngine` SvgIconEngine constructor\n\t  - `path/to/svg/files/directory` | QString | Required\n\n    \tFolders path where icons are located,\n\n    - `options` | QVariantMap\n\n    \tSet default options for all new icons\n\n    - `policy` | CachePolicy\n\n    \tSet cache policy for SvgIconEngine, possible values are: `ALL`, `NONE`, `LRU`\n\n2. `SvgIconEngine::getIcon` get an icon\n\t  - `style` | QString | Required\n\n    \tFolders path between `\u003cpath/to/svg/files/directory\u003e` and svg file,\n\n    - `icon_name` | QString | Required\n\n    \tSvg filename without extension\n\n    - `options` | QVariantMap\n\n   \t\tSet options for required icon\n\n### `\u003coptions\u003e`\n| QVariant       | Value Type | Default Value                          | Ex. Value         | Animates? | Use |\n| -------------- | ---------- | -------------------------------------- | ----------------- | --------- | --- |\n| color          | QColor     | QApplication::palette().text().color() | QColor(Qt::red)   | Yes       | Color used to fill icon |\n| background     | QColor     | Qt::transparent                        | QColor(Qt::red)   | Yes       | Background fill for icons |\n| size           | QSize      | QSvgRenderer.defaultSize()             | QSize(64, 64)     | Yes       | Icon size |\n| scale          | qreal      | 1                                      | 2                 | Yes       | Image size inside icon box |\n| opacity        | qreal      | 1                                      | .5                | Yes       | Icon opacity |\n| border_color   | QColor     | QApplication::palette().text().color() | QColor(Qt::black) | Will      | Color for border around icon |\n| border_width   | qreal      | 0                                      | 10                | Will      | Border width |\n| default_colors | bool       | false                                  | true/false        | No        | If icon colors remain as in svg file |\n\n### Example\nAn svg file at `/home/user/pictures/svgs/regular/calendar.svg`\n\n```\npath/to/svg/files/directory = \"/home/user/pictures/svgs\"\nstyle = \"regular\"\nicon_name = \"calendar\"\n```\n\n\n## License\n\nThis project is licensed under the terms of the GNU Lesser General Public License. See the [LICENSE](./LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhellorge%2Fqtsvgiconengine","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhellorge%2Fqtsvgiconengine","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhellorge%2Fqtsvgiconengine/lists"}