Falkon Develop
Cross-platform Qt-based web browser
colors.h
Go to the documentation of this file.
1/*
2 * Bespin library for Qt style, KWin decoration and everything else
3 * Copyright 2007-2012 by Thomas Lübking <thomas.luebking@gmail.com>
4 *
5 * This library is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU Library General Public License version 2
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU Library General Public License for more details
12 *
13 * You should have received a copy of the GNU Library General Public
14 * License along with this program; if not, write to the
15 * Free Software Foundation, Inc.,
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17 */
18
19#ifndef COLORS_H
20#define COLORS_H
21
22class QWidget;
23#include <QColor>
24#include <QPalette>
25
26// namespace Bespin {
27namespace Colors
28{
29
30const QColor &bg(const QPalette &pal, const QWidget* w);
31int contrast(const QColor &a, const QColor &b);
32QPalette::ColorRole counterRole(QPalette::ColorRole role);
33bool counterRole(QPalette::ColorRole &from, QPalette::ColorRole &to,
34 QPalette::ColorRole defFrom = QPalette::WindowText,
35 QPalette::ColorRole defTo = QPalette::Window);
36QColor emphasize(const QColor &c, int value = 10);
37bool haveContrast(const QColor &a, const QColor &b);
38QColor light(const QColor &c, int value);
39QColor mid(const QColor &oc1, const QColor &c2, int w1 = 1, int w2 = 1);
40int value(const QColor &c);
41
42}
43// }
44
45#endif //COLORS_H
Definition: colors.h:28
QColor mid(const QColor &oc1, const QColor &c2, int w1=1, int w2=1)
Definition: colors.cpp:210
int value(const QColor &c)
Definition: colors.cpp:238
int contrast(const QColor &a, const QColor &b)
Definition: colors.cpp:48
QPalette::ColorRole counterRole(QPalette::ColorRole role)
Definition: colors.cpp:68
QColor light(const QColor &c, int value)
Definition: colors.cpp:184
const QColor & bg(const QPalette &pal, const QWidget *w)
Definition: colors.cpp:29
bool haveContrast(const QColor &a, const QColor &b)
Definition: colors.cpp:165
QColor emphasize(const QColor &c, int value=10)
Definition: colors.cpp:130