blob: 16432777d85dd88230e6bd33445bc9be7953f58b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#pragma once
#include <QLocale>
QT_BEGIN_NAMESPACE
class QColor;
class QString;
QT_END_NAMESPACE
namespace Valgrind::Internal {
namespace CallgrindHelper
{
/**
* Returns color for a specific string, the string<->color mapping is cached
*/
QColor colorForString(const QString &text);
/**
* Returns color for a specific cost ratio
* \param ratio The cost ratio, ratio should be of [0,1]
*/
QColor colorForCostRatio(qreal ratio);
/**
* Returns a proper percent representation of a float limited to 5 chars
*/
QString toPercent(float costs, const QLocale &locale = QLocale());
}
} // namespace Valgrind::Internal
|