/src/libtomahawk/utils/stylehelper.h
C++ Header | 68 lines | 18 code | 8 blank | 42 comment | 0 complexity | 437a14caeabb7550ed73a7fdc10142a0 MD5 | raw file
1/* === This file is part of Tomahawk Player - <http://tomahawk-player.org> === 2 * 3 * Copyright 2011, Casey Link <unnamedrambler@gmail.com> 4 * 5 * Tomahawk 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 * Tomahawk 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 Tomahawk. If not, see <http://www.gnu.org/licenses/>. 17 */ 18 19#ifndef STYLEHELPER_H 20#define STYLEHELPER_H 21 22#include <QColor> 23#include <QStyle> 24#include <QStyleOption> 25 26class QPalette; 27class QPainter; 28 29/** 30 * \class StyleHelper 31 * \brief A static class that contains Tomahawk's styling details (colors, etc). 32 */ 33class StyleHelper 34{ 35public: 36 37 /** 38 * Our header BG is a two color gradient. This is the upper color. 39 */ 40 static QColor headerUpperColor(); 41 /** 42 * Our header BG is a two color gradient. This is the lower color. 43 */ 44 static QColor headerLowerColor(); 45 /** 46 * The color of text on a Header. 47 */ 48 static QColor headerTextColor(); 49 /** 50 * The widget highlight color for headers 51 */ 52 static QColor headerHighlightColor(); 53 54 /** 55 * Draws a header background on a painter with the specified rectangle 56 */ 57 static void horizontalHeader( QPainter* painter, const QRect& rect ); 58 59 /** 60 * Draws a styled arrow that looks good on a Header (from qwindowstyle.cpp) 61 * \copyright { Licensed under the GPL v3+ 62 * Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 63 * Contact: Nokia Corporation (qt-info@nokia.com) } 64 */ 65 static void drawArrow( QStyle::PrimitiveElement, QPainter* painter, const QStyleOption* opt ); 66}; 67 68#endif // STYLEHELPER_H