mirror of
https://github.com/fralx/LimeReport.git
synced 2025-11-25 08:28:06 +03:00
Define code style and format all source file using clang-format-14
except those placed in 3rdparty directories.
This commit is contained in:
@@ -30,12 +30,12 @@
|
||||
#ifndef LRSHAPEITEM_H
|
||||
#define LRSHAPEITEM_H
|
||||
#include "lritemdesignintf.h"
|
||||
|
||||
#include <QtGlobal>
|
||||
|
||||
namespace LimeReport{
|
||||
namespace LimeReport {
|
||||
|
||||
class ShapeItem: public LimeReport::ItemDesignIntf
|
||||
{
|
||||
class ShapeItem: public LimeReport::ItemDesignIntf {
|
||||
Q_OBJECT
|
||||
Q_PROPERTY(ShapeType shape READ shapeType WRITE setShapeType)
|
||||
Q_PROPERTY(QColor shapeColor READ shapeColor WRITE setShapeColor)
|
||||
@@ -46,32 +46,38 @@ class ShapeItem: public LimeReport::ItemDesignIntf
|
||||
Q_PROPERTY(int opacity READ opacity WRITE setOpacity)
|
||||
Q_PROPERTY(int cornerRadius READ cornerRadius WRITE setCornerRadius)
|
||||
public:
|
||||
enum ShapeType{HorizontalLine,VerticalLine,Ellipse,Rectangle};
|
||||
enum ShapeType {
|
||||
HorizontalLine,
|
||||
VerticalLine,
|
||||
Ellipse,
|
||||
Rectangle
|
||||
};
|
||||
#if QT_VERSION >= 0x050500
|
||||
Q_ENUM(ShapeType)
|
||||
#else
|
||||
Q_ENUMS(ShapeType)
|
||||
#endif
|
||||
ShapeItem(QObject *owner, QGraphicsItem *parent);
|
||||
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
|
||||
void setShapeColor(QColor value);
|
||||
QColor shapeColor() const {return m_shapeColor;}
|
||||
void setShapeBrushColor(QColor value);
|
||||
QColor shapeBrushColor() const {return m_shapeBrushColor;}
|
||||
void setShapeBrushType(Qt::BrushStyle value);
|
||||
Qt::BrushStyle shapeBrushType() const {return m_shapeBrushType;}
|
||||
void setShapeType(ShapeType value);
|
||||
ShapeType shapeType() const {return m_shape;}
|
||||
void setLineWidth(qreal value);
|
||||
qreal lineWidth() const {return m_lineWidth;}
|
||||
ShapeItem(QObject* owner, QGraphicsItem* parent);
|
||||
virtual void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget);
|
||||
void setShapeColor(QColor value);
|
||||
QColor shapeColor() const { return m_shapeColor; }
|
||||
void setShapeBrushColor(QColor value);
|
||||
QColor shapeBrushColor() const { return m_shapeBrushColor; }
|
||||
void setShapeBrushType(Qt::BrushStyle value);
|
||||
Qt::BrushStyle shapeBrushType() const { return m_shapeBrushType; }
|
||||
void setShapeType(ShapeType value);
|
||||
ShapeType shapeType() const { return m_shape; }
|
||||
void setLineWidth(qreal value);
|
||||
qreal lineWidth() const { return m_lineWidth; }
|
||||
Qt::PenStyle penStyle() const;
|
||||
void setPenStyle(const Qt::PenStyle &value);
|
||||
void setPenStyle(const Qt::PenStyle& value);
|
||||
int cornerRadius() const;
|
||||
void setCornerRadius(int cornerRadius);
|
||||
|
||||
protected:
|
||||
BaseDesignIntf* createSameTypeItem(QObject *owner, QGraphicsItem *parent);
|
||||
bool drawDesignBorders() const {return false;}
|
||||
BaseDesignIntf* createSameTypeItem(QObject* owner, QGraphicsItem* parent);
|
||||
bool drawDesignBorders() const { return false; }
|
||||
|
||||
private:
|
||||
ShapeType m_shape;
|
||||
QColor m_shapeColor;
|
||||
@@ -79,9 +85,9 @@ private:
|
||||
Qt::BrushStyle m_shapeBrushType;
|
||||
qreal m_lineWidth;
|
||||
Qt::PenStyle m_penStyle;
|
||||
// int m_opacity;
|
||||
// int m_opacity;
|
||||
int m_cornerRadius;
|
||||
};
|
||||
|
||||
}
|
||||
} // namespace LimeReport
|
||||
#endif // LRSHAPEITEM_H
|
||||
|
||||
Reference in New Issue
Block a user