2017-10-20 20:26:14 +02:00
|
|
|
/******************************************************************************
|
2024-01-17 14:31:45 +01:00
|
|
|
* QSkinny - Copyright (C) The authors
|
2023-04-06 09:23:37 +02:00
|
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
2017-10-20 20:26:14 +02:00
|
|
|
*****************************************************************************/
|
|
|
|
|
|
|
|
#ifndef QSK_TEXT_COLORS_H
|
|
|
|
#define QSK_TEXT_COLORS_H
|
|
|
|
|
|
|
|
#include "QskGlobal.h"
|
2018-08-03 08:15:28 +02:00
|
|
|
|
2018-07-19 14:10:48 +02:00
|
|
|
#include <qcolor.h>
|
|
|
|
#include <qmetatype.h>
|
2017-10-20 20:26:14 +02:00
|
|
|
|
|
|
|
class QDebug;
|
|
|
|
class QVariant;
|
|
|
|
|
|
|
|
class QSK_EXPORT QskTextColors
|
|
|
|
{
|
2018-08-03 08:15:28 +02:00
|
|
|
public:
|
2017-10-20 20:26:14 +02:00
|
|
|
QskTextColors( const QColor& text = QColor(),
|
|
|
|
const QColor& style = QColor(), const QColor& link = QColor() );
|
|
|
|
|
|
|
|
QskTextColors interpolated( const QskTextColors&, qreal value ) const;
|
|
|
|
|
|
|
|
static QVariant interpolate( const QskTextColors&,
|
|
|
|
const QskTextColors&, qreal ratio );
|
|
|
|
|
2022-03-25 11:21:32 +01:00
|
|
|
QskHashValue hash( QskHashValue seed = 0 ) const noexcept;
|
2017-10-20 20:26:14 +02:00
|
|
|
|
|
|
|
QColor textColor;
|
|
|
|
QColor styleColor;
|
|
|
|
QColor linkColor;
|
|
|
|
};
|
|
|
|
|
|
|
|
inline QskTextColors::QskTextColors(
|
2018-08-03 08:15:28 +02:00
|
|
|
const QColor& text, const QColor& style, const QColor& link )
|
|
|
|
: textColor( text )
|
|
|
|
, styleColor( style )
|
|
|
|
, linkColor( link )
|
2017-10-20 20:26:14 +02:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
#ifndef QT_NO_DEBUG_STREAM
|
|
|
|
|
|
|
|
QSK_EXPORT QDebug operator<<( QDebug, const QskTextColors& );
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
Q_DECLARE_METATYPE( QskTextColors )
|
|
|
|
|
|
|
|
#endif
|