![Uwe Rathmann](/assets/img/avatar_default.png)
textures now. Implementation is almost complete beside of the not yet done Qt antialiasing mode. Not all sort of linear gradients ( see QLinearGradients ) are implemented - needs 1-2 days more. The aspect flags for box primitives have been substantially changed from too atomic to more strutured units. The skins are currently incomplete - will be fixed later.
55 lines
1.3 KiB
C++
55 lines
1.3 KiB
C++
/******************************************************************************
|
|
* QSkinny - Copyright (C) 2016 Uwe Rathmann
|
|
* This file may be used under the terms of the QSkinny License, Version 1.0
|
|
*****************************************************************************/
|
|
|
|
#ifndef QSK_CORNER_H
|
|
#define QSK_CORNER_H
|
|
|
|
#include "QskGlobal.h"
|
|
#include "QskBoxShapeMetrics.h"
|
|
|
|
#include <QMetaType>
|
|
#include <Qt>
|
|
|
|
class QDebug;
|
|
class QSizeF;
|
|
|
|
class QSK_EXPORT QskCorner
|
|
{
|
|
Q_GADGET
|
|
|
|
Q_PROPERTY( qreal radius READ radius WRITE setRadius )
|
|
Q_PROPERTY( Qt::SizeMode sizeMode READ sizeMode WRITE setSizeMode )
|
|
Q_PROPERTY( Qt::AspectRatioMode aspectRatioMode READ aspectRatioMode WRITE setAspectRatioMode )
|
|
|
|
public:
|
|
QskCorner();
|
|
QskCorner( Qt::SizeMode, qreal radius );
|
|
|
|
qreal radius() const;
|
|
void setRadius( qreal width );
|
|
|
|
Qt::SizeMode sizeMode() const;
|
|
void setSizeMode( Qt::SizeMode );
|
|
|
|
Qt::AspectRatioMode aspectRatioMode() const;
|
|
void setAspectRatioMode( Qt::AspectRatioMode );
|
|
|
|
const QskBoxShapeMetrics& metrics() const;
|
|
|
|
private:
|
|
// QskCorner could be replaced by QskBoxShapeMetrics TODO ...
|
|
QskBoxShapeMetrics m_metrics;
|
|
};
|
|
|
|
inline const QskBoxShapeMetrics& QskCorner::metrics() const
|
|
{
|
|
return m_metrics;
|
|
}
|
|
|
|
Q_DECLARE_TYPEINFO( QskCorner, Q_MOVABLE_TYPE );
|
|
Q_DECLARE_METATYPE( QskCorner )
|
|
|
|
#endif
|