mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-07-12 18:16:30 +02:00
Add some documentation to the new classes
This commit is contained in:
@ -27,20 +27,42 @@
|
|||||||
class QPalette;
|
class QPalette;
|
||||||
class QPainter;
|
class QPainter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \class StyleHelper
|
||||||
|
* \brief A static class that contains Tomahawk's styling details (colors, etc).
|
||||||
|
*/
|
||||||
class StyleHelper
|
class StyleHelper
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Our header BG is a two color gradient. This is the upper color.
|
||||||
|
*/
|
||||||
static QColor headerUpperColor();
|
static QColor headerUpperColor();
|
||||||
|
/**
|
||||||
|
* Our header BG is a two color gradient. This is the lower color.
|
||||||
|
*/
|
||||||
static QColor headerLowerColor();
|
static QColor headerLowerColor();
|
||||||
|
/**
|
||||||
|
* The color of text on a Header.
|
||||||
|
*/
|
||||||
static QColor headerTextColor();
|
static QColor headerTextColor();
|
||||||
|
/**
|
||||||
|
* The widget highlight color for headers
|
||||||
|
*/
|
||||||
static QColor headerHighlightColor();
|
static QColor headerHighlightColor();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Draws a header background on a painter with the specified rectangle
|
||||||
|
*/
|
||||||
static void horizontalHeader(QPainter *painter, const QRect &rect);
|
static void horizontalHeader(QPainter *painter, const QRect &rect);
|
||||||
|
/**
|
||||||
|
* Draws a styled arrow that looks good on a Header (from qwindowstyle.cpp)
|
||||||
|
* \copyright { Licensed under the GPL v3+
|
||||||
|
* Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
|
||||||
|
* Contact: Nokia Corporation (qt-info@nokia.com) }
|
||||||
|
*/
|
||||||
static void drawArrow(QStyle::PrimitiveElement, QPainter *painter, const QStyleOption *opt);
|
static void drawArrow(QStyle::PrimitiveElement, QPainter *painter, const QStyleOption *opt);
|
||||||
private:
|
|
||||||
static QColor m_baseColor;
|
|
||||||
static QColor m_requestedBaseColor;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // STYLEHELPER_H
|
#endif // STYLEHELPER_H
|
||||||
|
@ -23,6 +23,10 @@
|
|||||||
|
|
||||||
#include "dllmacro.h"
|
#include "dllmacro.h"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \class HeaderLabel
|
||||||
|
* \brief A styled label for use in headers.
|
||||||
|
*/
|
||||||
class DLLEXPORT HeaderLabel : public QLabel
|
class DLLEXPORT HeaderLabel : public QLabel
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
@ -25,6 +25,11 @@
|
|||||||
|
|
||||||
#include "dllmacro.h"
|
#include "dllmacro.h"
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \class HeaderWidget
|
||||||
|
* \brief A QWidget subclass with a background for use in headers.
|
||||||
|
*/
|
||||||
class DLLEXPORT HeaderWidget : public QWidget
|
class DLLEXPORT HeaderWidget : public QWidget
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
@ -24,6 +24,10 @@
|
|||||||
|
|
||||||
#include "dllmacro.h"
|
#include "dllmacro.h"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \class ComboBox
|
||||||
|
* \brief A styled combo box that has a header background.
|
||||||
|
*/
|
||||||
class DLLEXPORT ComboBox : public QComboBox
|
class DLLEXPORT ComboBox : public QComboBox
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
@ -43,6 +43,10 @@ namespace Ui
|
|||||||
class WhatsHotWidget;
|
class WhatsHotWidget;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \class
|
||||||
|
* \brief The tomahawk page that shows music charts.
|
||||||
|
*/
|
||||||
class DLLEXPORT WhatsHotWidget : public QWidget, public Tomahawk::ViewPage
|
class DLLEXPORT WhatsHotWidget : public QWidget, public Tomahawk::ViewPage
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
Reference in New Issue
Block a user