Improve code style, Wrap code for better readability

This commit is contained in:
Simon De Backer
2020-08-16 14:22:36 +02:00
parent 60a5a83320
commit 76d16ab600
3 changed files with 167 additions and 61 deletions

View File

@@ -24,38 +24,93 @@
/* This class exports the project to DXF Format */
class Createdxf
{
public:
Createdxf();
~Createdxf();
static void dxfBegin (const QString&);
static void dxfEnd(const QString&);
// you can add more functions to create more drawings.
static void drawCircle(const QString&,double,double,double,int);
static void drawArc(const QString&,double x,double y,double rad,double startAngle,double endAngle,int color);
static void drawDonut(QString,double,double,double,int);
{
public:
Createdxf();
~Createdxf();
static void dxfBegin (const QString&);
static void dxfEnd(const QString&);
// you can add more functions to create more drawings.
static void drawCircle(const QString&,
double,
double,
double,
int);
static void drawArc(const QString&,
double x,
double y,
double rad,
double startAngle,
double endAngle,
int color);
static void drawDonut(QString,double,double,double,int);
static void drawArcEllipse (const QString &file_path, qreal x, qreal y, qreal w, qreal h, qreal startAngle, qreal spanAngle, qreal hotspot_x, qreal hotspot_y, qreal rotation_angle, const int &colorcode);
static void drawArcEllipse (const QString &file_path,
qreal x,
qreal y,
qreal w,
qreal h,
qreal startAngle,
qreal spanAngle,
qreal hotspot_x,
qreal hotspot_y,
qreal rotation_angle,
const int &colorcode);
static void drawEllipse (const QString &filepath, const QRectF &rect, const int &colorcode);
static void drawEllipse (const QString &filepath,
const QRectF &rect,
const int &colorcode);
static void drawRectangle(const QString &filepath,double,double,double,double,const int &colorcode);
static void drawRectangle(const QString &filepath, const QRectF &rect, const int &colorcode);
static void drawRectangle(const QString &filepath,
double,
double,
double,
double,
const int &colorcode);
static void drawRectangle(const QString &filepath,
const QRectF &rect,
const int &colorcode);
static void drawLine(const QString &filapath,double,double,double,double, const int &clorcode);
static void drawLine(const QString &filepath, const QLineF &line,const int &colorcode);
static void drawLine(const QString &filapath,
double,
double,
double,
double,
const int &clorcode);
static void drawLine(const QString &filepath,
const QLineF &line,
const int &colorcode);
static void drawText(const QString&,const QString&,double,double,double,double,int);
static void drawTextAligned(const QString& fileName, const QString& text,double x, double y, double height, double rotation, double oblique,int hAlign, int vAlign, double xAlign, int colour, bool leftAlign = false, float scale = 0);
static void drawText(const QString&,
const QString&,
double,double,
double,
double,
int);
static void drawTextAligned(const QString& fileName,
const QString& text,
double x,
double y,
double height,
double rotation,
double oblique,
int hAlign,
int vAlign,
double xAlign,
int colour,
bool leftAlign = false,
float scale = 0);
static int getcolorCode (const long red, const long green, const long blue);
static long RGBcodeTable[];
static int getcolorCode (const long red,
const long green,
const long blue);
static long RGBcodeTable[];
static const double sheetWidth;
static const double sheetHeight;
static double xScale;
static double yScale;
static const double sheetWidth;
static const double sheetHeight;
static double xScale;
static double yScale;
};
#endif // CREATEDXF_H