2019-06-20 12:02:28 +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
|
2019-06-20 12:02:28 +02:00
|
|
|
*****************************************************************************/
|
|
|
|
|
2021-08-04 10:11:12 +02:00
|
|
|
#pragma once
|
2017-10-17 17:29:02 +02:00
|
|
|
|
|
|
|
#include <QskBox.h>
|
|
|
|
|
|
|
|
class Box : public QskBox
|
|
|
|
{
|
2018-08-03 08:15:28 +02:00
|
|
|
public:
|
2017-10-17 17:29:02 +02:00
|
|
|
enum FillType
|
|
|
|
{
|
|
|
|
Unfilled,
|
|
|
|
Solid,
|
|
|
|
Horizontal,
|
|
|
|
Vertical,
|
|
|
|
Diagonal
|
|
|
|
};
|
|
|
|
|
|
|
|
enum BorderType
|
|
|
|
{
|
|
|
|
NoBorder,
|
|
|
|
Flat,
|
|
|
|
Raised1,
|
|
|
|
Sunken1,
|
|
|
|
Raised2,
|
|
|
|
Sunken2
|
|
|
|
};
|
|
|
|
|
|
|
|
Box( QQuickItem* parentItem = nullptr );
|
|
|
|
|
2022-06-25 16:14:08 +02:00
|
|
|
void setBorder( BorderType type, QRgb );
|
2017-10-17 17:29:02 +02:00
|
|
|
|
|
|
|
void setShape( const QskBoxShapeMetrics& );
|
|
|
|
void setShape( qreal radius, Qt::SizeMode );
|
|
|
|
void setShape( qreal radiusX, qreal radiusY, Qt::SizeMode );
|
|
|
|
|
2022-02-04 16:11:11 +01:00
|
|
|
void setBorderGradient( const QskGradient& );
|
|
|
|
void setBorderGradients( const QskGradient& left, const QskGradient& top,
|
|
|
|
const QskGradient& right, const QskGradient& bottom );
|
2017-10-17 17:29:02 +02:00
|
|
|
|
|
|
|
void setBorderWidth( int );
|
|
|
|
void setBorderWidth( qreal left, qreal top, qreal right, qreal bottom );
|
|
|
|
|
|
|
|
void setGradient( QRgb );
|
|
|
|
void setGradient( Qt::GlobalColor );
|
|
|
|
void setGradient( const QColor& );
|
|
|
|
|
2022-10-31 14:42:08 +01:00
|
|
|
void setGradient( FillType, const QColor&, const QColor& );
|
|
|
|
void setGradient( FillType, const QColor&, const QColor&, const QColor& );
|
|
|
|
void setGradient( FillType, const QskGradientStops& );
|
|
|
|
|
|
|
|
void setTonalGradient( FillType, QRgb, bool inverted = false );
|
|
|
|
void setWebGradient( FillType, QGradient::Preset, bool inverted = false );
|
2017-10-17 17:29:02 +02:00
|
|
|
|
2022-10-31 14:42:08 +01:00
|
|
|
void setTonalPalette( FillType, QRgb );
|
2017-10-17 17:29:02 +02:00
|
|
|
|
2022-10-31 14:42:08 +01:00
|
|
|
private:
|
|
|
|
void setPanelGradient( const QskGradient& );
|
2017-10-17 17:29:02 +02:00
|
|
|
};
|