mirror of
https://github.com/fralx/LimeReport.git
synced 2025-11-25 00:18: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:
@@ -29,14 +29,14 @@
|
||||
****************************************************************************/
|
||||
#ifndef LRIMAGEITEM_H
|
||||
#define LRIMAGEITEM_H
|
||||
#include "lritemdesignintf.h"
|
||||
#include "lreditableimageitemintf.h"
|
||||
#include "lritemdesignintf.h"
|
||||
|
||||
#include <QtGlobal>
|
||||
|
||||
namespace LimeReport{
|
||||
namespace LimeReport {
|
||||
|
||||
class ImageItem : public ItemDesignIntf, public IPainterProxy, public IEditableImageItem
|
||||
{
|
||||
class ImageItem: public ItemDesignIntf, public IPainterProxy, public IEditableImageItem {
|
||||
Q_OBJECT
|
||||
Q_PROPERTY(QImage image READ image WRITE setImage)
|
||||
Q_PROPERTY(int opacity READ opacity WRITE setOpacity)
|
||||
@@ -54,9 +54,9 @@ class ImageItem : public ItemDesignIntf, public IPainterProxy, public IEditableI
|
||||
|
||||
public:
|
||||
enum Format {
|
||||
Binary = 0,
|
||||
Hex = 1,
|
||||
Base64 = 2
|
||||
Binary = 0,
|
||||
Hex = 1,
|
||||
Base64 = 2
|
||||
};
|
||||
#if QT_VERSION >= 0x050500
|
||||
Q_ENUM(Format)
|
||||
@@ -64,16 +64,16 @@ public:
|
||||
Q_ENUMS(Format)
|
||||
#endif
|
||||
|
||||
ImageItem(QObject *owner, QGraphicsItem *parent);
|
||||
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
|
||||
ImageItem(QObject* owner, QGraphicsItem* parent);
|
||||
void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget);
|
||||
void setImage(QImage value);
|
||||
QImage image() const;
|
||||
void setResourcePath(const QString &value);
|
||||
void setResourcePath(const QString& value);
|
||||
QString resourcePath() const;
|
||||
QString datasource() const;
|
||||
void setDatasource(const QString &datasource);
|
||||
void setDatasource(const QString& datasource);
|
||||
QString field() const;
|
||||
void setField(const QString &field);
|
||||
void setField(const QString& field);
|
||||
|
||||
bool autoSize() const;
|
||||
void setAutoSize(bool autoSize);
|
||||
@@ -87,10 +87,13 @@ public:
|
||||
void setFormat(Format format);
|
||||
qreal minHeight() const;
|
||||
|
||||
QString variable(){ return m_variable;}
|
||||
QString variable() { return m_variable; }
|
||||
void setVariable(const QString& variable);
|
||||
|
||||
void setExternalPainter(IExternalPainter* externalPainter){ m_externalPainter = externalPainter;}
|
||||
void setExternalPainter(IExternalPainter* externalPainter)
|
||||
{
|
||||
m_externalPainter = externalPainter;
|
||||
}
|
||||
|
||||
bool useExternalPainter() const;
|
||||
void setUseExternalPainter(bool value);
|
||||
@@ -100,34 +103,35 @@ public:
|
||||
QByteArray imageAsByteArray() const;
|
||||
void setImageAsByteArray(QByteArray image);
|
||||
QString fileFilter() const;
|
||||
|
||||
protected:
|
||||
BaseDesignIntf* createSameTypeItem(QObject *owner, QGraphicsItem *parent);
|
||||
void updateItemSize(DataSourceManager *dataManager, RenderPass pass, int maxHeight);
|
||||
BaseDesignIntf* createSameTypeItem(QObject* owner, QGraphicsItem* parent);
|
||||
void updateItemSize(DataSourceManager* dataManager, RenderPass pass, int maxHeight);
|
||||
bool isNeedUpdateSize(RenderPass) const;
|
||||
bool drawDesignBorders() const {return m_picture.isNull();}
|
||||
bool drawDesignBorders() const { return m_picture.isNull(); }
|
||||
void loadPictureFromVariant(QVariant& data);
|
||||
void preparePopUpMenu(QMenu &menu);
|
||||
void processPopUpAction(QAction *action);
|
||||
void preparePopUpMenu(QMenu& menu);
|
||||
void processPopUpAction(QAction* action);
|
||||
QImage drawImage() const;
|
||||
|
||||
private:
|
||||
QImage m_picture;
|
||||
QImage m_picture;
|
||||
bool m_useExternalPainter;
|
||||
IExternalPainter* m_externalPainter;
|
||||
QString m_resourcePath;
|
||||
QString m_datasource;
|
||||
QString m_field;
|
||||
bool m_autoSize;
|
||||
bool m_scale;
|
||||
bool m_keepAspectRatio;
|
||||
bool m_center;
|
||||
Format m_format;
|
||||
bool m_autoSize;
|
||||
bool m_scale;
|
||||
bool m_keepAspectRatio;
|
||||
bool m_center;
|
||||
Format m_format;
|
||||
QString m_variable;
|
||||
|
||||
|
||||
// BaseDesignIntf interface
|
||||
public:
|
||||
public:
|
||||
bool isEmpty() const override;
|
||||
};
|
||||
|
||||
}
|
||||
} // namespace LimeReport
|
||||
#endif // LRIMAGEITEM_H
|
||||
|
||||
Reference in New Issue
Block a user