/src/libtomahawk/utils/stylehelper.h

http://github.com/tomahawk-player/tomahawk · 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. #ifndef STYLEHELPER_H
  19. #define STYLEHELPER_H
  20. #include <QColor>
  21. #include <QStyle>
  22. #include <QStyleOption>
  23. class QPalette;
  24. class QPainter;
  25. /**
  26. * \class StyleHelper
  27. * \brief A static class that contains Tomahawk's styling details (colors, etc).
  28. */
  29. class StyleHelper
  30. {
  31. public:
  32. /**
  33. * Our header BG is a two color gradient. This is the upper color.
  34. */
  35. static QColor headerUpperColor();
  36. /**
  37. * Our header BG is a two color gradient. This is the lower color.
  38. */
  39. static QColor headerLowerColor();
  40. /**
  41. * The color of text on a Header.
  42. */
  43. static QColor headerTextColor();
  44. /**
  45. * The widget highlight color for headers
  46. */
  47. static QColor headerHighlightColor();
  48. /**
  49. * Draws a header background on a painter with the specified rectangle
  50. */
  51. static void horizontalHeader( QPainter* painter, const QRect& rect );
  52. /**
  53. * Draws a styled arrow that looks good on a Header (from qwindowstyle.cpp)
  54. * \copyright { Licensed under the GPL v3+
  55. * Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
  56. * Contact: Nokia Corporation (qt-info@nokia.com) }
  57. */
  58. static void drawArrow( QStyle::PrimitiveElement, QPainter* painter, const QStyleOption* opt );
  59. };
  60. #endif // STYLEHELPER_H