mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-01-31 16:39:59 +01:00
Wrap code for better readability
This commit is contained in:
@@ -21,99 +21,112 @@
|
||||
#include <QtCore>
|
||||
#include <QtWidgets>
|
||||
|
||||
|
||||
/* This class exports the project to DXF Format */
|
||||
/**
|
||||
@brief The Createdxf class
|
||||
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 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 drawPolygon(const QString &filepath,
|
||||
const QPolygonF &poly,
|
||||
const int &colorcode);
|
||||
static void drawPolygon(
|
||||
const QString &filepath,
|
||||
const QPolygonF &poly,
|
||||
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,
|
||||
double xScale,
|
||||
int colour);
|
||||
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,
|
||||
double xScale,
|
||||
int colour);
|
||||
|
||||
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user