File indexing completed on 2024-12-08 04:58:21
0001 /* 0002 SPDX-FileCopyrightText: 2018 Michail Vourlakos <mvourlakos@gmail.com> 0003 SPDX-License-Identifier: GPL-2.0-or-later 0004 */ 0005 0006 #ifndef COMMONTOOLS_H 0007 #define COMMONTOOLS_H 0008 0009 // Qt 0010 #include <QColor> 0011 #include <QRect> 0012 #include <QString> 0013 0014 namespace Latte { 0015 0016 float colorBrightness(QColor color); 0017 float colorBrightness(QRgb rgb); 0018 float colorBrightness(float r, float g, float b); 0019 0020 float colorLumina(QColor color); 0021 float colorLumina(QRgb rgb); 0022 float colorLumina(float r, float g, float b); 0023 0024 QString rectToString(const QRect &rect); 0025 QRect stringToRect(const QString &str); 0026 0027 //! returns the standard path found that contains the subPath 0028 //! local paths have higher priority by default 0029 QString standardPath(QString subPath, bool localFirst = true); 0030 0031 QString configPath(); 0032 } 0033 0034 #endif