0
0
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:
Андрей Лухнов
2024-09-04 17:31:16 +03:00
parent c5b9ac265d
commit 0fca7169d3
285 changed files with 19120 additions and 17875 deletions

View File

@@ -30,11 +30,12 @@
#ifndef LRBARCODEITEM_H
#define LRBARCODEITEM_H
#include "lritemdesignintf.h"
#include <QtGlobal>
namespace LimeReport{
namespace LimeReport {
class BarcodeItem : public LimeReport::ContentItemDesignIntf {
class BarcodeItem: public LimeReport::ContentItemDesignIntf {
Q_OBJECT
Q_PROPERTY(QString content READ content WRITE setContent)
Q_PROPERTY(BarcodeType barcodeType READ barcodeType WRITE setBarcodeType)
@@ -54,103 +55,107 @@ class BarcodeItem : public LimeReport::ContentItemDesignIntf {
Q_PROPERTY(bool hideIfEmpty READ hideIfEmpty WRITE setHideIfEmpty)
public:
enum BarcodeType {
CODE11 =1,
C25MATRIX =2,
C25INTER =3,
C25IATA =4,
C25LOGIC =6,
C25IND =7,
CODE39 =8,
EXCODE39 =9,
EANX =13,
EANX_CHK =14,
EAN128 =16,
CODABAR =18,
CODE128 =20,
DPLEIT =21,
DPIDENT =22,
CODE16K =23,
CODE93 =25,
FLAT =28,
RSS14 =29,
RSS_LTD =30,
RSS_EXP =31,
TELEPEN =32,
UPCA =34,
UPCE =37,
POSTNET =40,
MSI_PLESSEY =47,
FIM =49,
LOGMARS =50,
PHARMA =51,
PZN =52,
PHARMA_TWO =53,
PDF417 =55,
PDF417TRUNC =56,
MAXICODE =57,
QRCODE =58,
CODE128B =60,
AUSPOST =63,
AUSREPLY =66,
AUSROUTE =67,
AUSREDIRECT =68,
ISBNX =69,
RM4SCC =70,
DATAMATRIX =71,
ITF14 =72,
CODABLOCKF =74,
NVE18 =75,
KOREAPOST =77,
RSS14STACK =79,
RSS14STACK_OMNI =80,
RSS_EXPSTACK =81,
PLANET =82,
MICROPDF417 =84,
ONECODE =85,
PLESSEY =86,
KIX =90,
AZTEC =92,
DAFT =93,
ITALYPOST =94,
DPD =96,
MICROQR =97,
HIBC_128 =98,
HIBC_39 =99,
HIBC_DM =102,
HIBC_QR =104,
HIBC_PDF =106,
HIBC_MICPDF =108,
HIBC_BLOCKF =110,
HIBC_AZTEC =112,
DOTCODE =115,
HANXIN =116,
TELEPEN_NUM =128,
CODE32 =129,
// EANX_CC =130,
// EAN128_CC =131,
// RSS14_CC =132,
// RSS_LTD_CC =133,
// RSS_EXP_CC =134,
// UPCA_CC =135,
// UPCE_CC =136,
// RSS14STACK_CC =137,
// RSS14_OMNI_CC =138,
// RSS_EXPSTACK_CC =139,
CHANNEL =140,
CODEONE =141,
GRIDMATRIX =142,
UPNQR =143
CODE11 = 1,
C25MATRIX = 2,
C25INTER = 3,
C25IATA = 4,
C25LOGIC = 6,
C25IND = 7,
CODE39 = 8,
EXCODE39 = 9,
EANX = 13,
EANX_CHK = 14,
EAN128 = 16,
CODABAR = 18,
CODE128 = 20,
DPLEIT = 21,
DPIDENT = 22,
CODE16K = 23,
CODE93 = 25,
FLAT = 28,
RSS14 = 29,
RSS_LTD = 30,
RSS_EXP = 31,
TELEPEN = 32,
UPCA = 34,
UPCE = 37,
POSTNET = 40,
MSI_PLESSEY = 47,
FIM = 49,
LOGMARS = 50,
PHARMA = 51,
PZN = 52,
PHARMA_TWO = 53,
PDF417 = 55,
PDF417TRUNC = 56,
MAXICODE = 57,
QRCODE = 58,
CODE128B = 60,
AUSPOST = 63,
AUSREPLY = 66,
AUSROUTE = 67,
AUSREDIRECT = 68,
ISBNX = 69,
RM4SCC = 70,
DATAMATRIX = 71,
ITF14 = 72,
CODABLOCKF = 74,
NVE18 = 75,
KOREAPOST = 77,
RSS14STACK = 79,
RSS14STACK_OMNI = 80,
RSS_EXPSTACK = 81,
PLANET = 82,
MICROPDF417 = 84,
ONECODE = 85,
PLESSEY = 86,
KIX = 90,
AZTEC = 92,
DAFT = 93,
ITALYPOST = 94,
DPD = 96,
MICROQR = 97,
HIBC_128 = 98,
HIBC_39 = 99,
HIBC_DM = 102,
HIBC_QR = 104,
HIBC_PDF = 106,
HIBC_MICPDF = 108,
HIBC_BLOCKF = 110,
HIBC_AZTEC = 112,
DOTCODE = 115,
HANXIN = 116,
TELEPEN_NUM = 128,
CODE32 = 129,
// EANX_CC =130,
// EAN128_CC =131,
// RSS14_CC =132,
// RSS_LTD_CC =133,
// RSS_EXP_CC =134,
// UPCA_CC =135,
// UPCE_CC =136,
// RSS14STACK_CC =137,
// RSS14_OMNI_CC =138,
// RSS_EXPSTACK_CC =139,
CHANNEL = 140,
CODEONE = 141,
GRIDMATRIX = 142,
UPNQR = 143
};
enum AngleType{Angle0,Angle90,Angle180,Angle270};
enum AngleType {
Angle0,
Angle90,
Angle180,
Angle270
};
enum InputMode{
DATA_INPUT_MODE = 0,
UNICODE_INPUT_MODE = 1,
GS1_INPUT_MODE = 2,
KANJI_INPUT_MODE = 3,
SJIS_INPUT_MODE = 4
enum InputMode {
DATA_INPUT_MODE = 0,
UNICODE_INPUT_MODE = 1,
GS1_INPUT_MODE = 2,
KANJI_INPUT_MODE = 3,
SJIS_INPUT_MODE = 4
};
#if QT_VERSION >= 0x050500
Q_ENUM(BarcodeType)
@@ -161,30 +166,30 @@ public:
Q_ENUMS(AngleType)
Q_ENUMS(InputMode)
#endif
BarcodeItem(QObject *owner, QGraphicsItem *parent);
BarcodeItem(QObject* owner, QGraphicsItem* parent);
~BarcodeItem();
virtual BaseDesignIntf* createSameTypeItem(QObject *owner, QGraphicsItem *parent);
virtual void paint(QPainter *ppainter, const QStyleOptionGraphicsItem *option, QWidget *widget);
virtual void updateItemSize(DataSourceManager *dataManager, RenderPass pass, int maxHeight);
virtual BaseDesignIntf* createSameTypeItem(QObject* owner, QGraphicsItem* parent);
virtual void paint(QPainter* ppainter, const QStyleOptionGraphicsItem* option, QWidget* widget);
virtual void updateItemSize(DataSourceManager* dataManager, RenderPass pass, int maxHeight);
virtual bool isNeedUpdateSize(RenderPass pass) const;
void setContent(const QString& content);
QString content() const {return m_content;}
QString content() const { return m_content; }
void setBarcodeType(BarcodeType value);
BarcodeType barcodeType(){return m_barcodeType;}
BarcodeType barcodeType() { return m_barcodeType; }
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);
void setDesignTestValue(QString value);
QString designTestValue(){return m_designTestValue;}
QColor foregroundColor(){return m_foregroundColor;}
QString designTestValue() { return m_designTestValue; }
QColor foregroundColor() { return m_foregroundColor; }
void setForegroundColor(QColor value);
QColor backgroundColor(){return m_backgroundColor;}
QColor backgroundColor() { return m_backgroundColor; }
void setBackgroundColor(QColor value);
int whitespace(){return m_whitespace;}
int whitespace() { return m_whitespace; }
void setWhitespace(int value);
AngleType angle() const;
void setAngle(const AngleType &angle);
void setAngle(const AngleType& angle);
int barcodeWidth() const;
void setBarcodeWidth(int barcodeWidth);
int securityLevel() const;
@@ -192,7 +197,7 @@ public:
int pdf417CodeWords() const;
void setPdf417CodeWords(int pdf417CodeWords);
InputMode inputMode() const;
void setInputMode(const InputMode &inputMode);
void setInputMode(const InputMode& inputMode);
bool hideText() const;
void setHideText(bool hideText);
int option3() const;
@@ -202,7 +207,7 @@ public:
bool isEmpty() const;
private:
void expandContent(QString data, DataSourceManager *dataManager, RenderPass pass);
void expandContent(QString data, DataSourceManager* dataManager, RenderPass pass);
private:
QString m_content;
@@ -223,5 +228,5 @@ private:
bool m_hideIfEmpty;
};
}
} // namespace LimeReport
#endif // LRBARCODEITEM_H