ORE Studio 0.0.4
Loading...
Searching...
No Matches
IconUtils.hpp
1/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
2 *
3 * Copyright (C) 2024-2025 Marco Craveiro <marco.craveiro@gmail.com>
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 3 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
18 * MA 02110-1301, USA.
19 *
20 */
21#ifndef ORES_QT_ICON_UTILS_HPP
22#define ORES_QT_ICON_UTILS_HPP
23
24#include <QIcon>
25#include <QColor>
26#include <QString>
27#include "ores.utility/log/make_logger.hpp"
28
29namespace ores::qt {
30
34class IconUtils {
35private:
36 inline static std::string_view logger_name = "ores.qt.icon_utils";
37
38 static auto& lg() {
39 using namespace ores::utility::log;
40 static auto instance = make_logger(logger_name);
41 return instance;
42 }
43
44public:
56 static QIcon createRecoloredIcon(const QString& svgPath, const QColor& color);
57};
58
59}
60
61#endif
Qt-based graphical user interface for ORE Studio.
Definition AboutDialog.hpp:35
Implements logging for ORE Studio.
Definition lifecycle_manager.hpp:30
Utility class for icon manipulation operations.
Definition IconUtils.hpp:34
static QIcon createRecoloredIcon(const QString &svgPath, const QColor &color)
Creates a recolored version of an SVG icon.
Definition IconUtils.cpp:30