QElectroTech  0.70
Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
Createdxf Class Reference

#include <createdxf.h>

Public Member Functions

 Createdxf ()
 
 ~Createdxf ()
 

Static Public Member Functions

static void dxfBegin (const QString &)
 
static void dxfEnd (const QString &)
 
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 drawEllipse (const QString &filepath, const QRectF &rect, const int &colorcode)
 Createdxf::drawEllipse Conveniance function for draw ellipse. More...
 
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)
 Createdxf::drawRectangle Conveniance function for draw rectangle. More...
 
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)
 Createdxf::drawLine Conveniance function to draw line. More...
 
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)
 Createdxf::getcolorCode This function returns the ACI color which is the "nearest" color to the color defined by the red, green and blue (RGB) values passed in argument. More...
 

Static Public Attributes

static long RGBcodeTable []
 
static const double sheetWidth = 4000
 
static const double sheetHeight = 2700
 
static double xScale = 1
 
static double yScale = 1
 

Detailed Description

Definition at line 26 of file createdxf.h.

Constructor & Destructor Documentation

◆ Createdxf()

Createdxf::Createdxf ( )

Definition at line 32 of file createdxf.cpp.

◆ ~Createdxf()

Createdxf::~Createdxf ( )

Definition at line 37 of file createdxf.cpp.

Member Function Documentation

◆ drawArc()

void Createdxf::drawArc ( const QString &  fileName,
double  x,
double  y,
double  rad,
double  startAngle,
double  endAngle,
int  color 
)
static

Definition at line 671 of file createdxf.cpp.

Referenced by drawArcEllipse().

◆ drawArcEllipse()

void Createdxf::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

Definition at line 426 of file createdxf.cpp.

References drawArc(), and ExportDialog::rotation_transformed().

Referenced by drawEllipse(), and ExportDialog::generateDxf().

◆ drawCircle()

void Createdxf::drawCircle ( const QString &  fileName,
double  radius,
double  x,
double  y,
int  colour 
)
static

Definition at line 256 of file createdxf.cpp.

Referenced by ExportDialog::generateDxf().

◆ drawDonut()

static void Createdxf::drawDonut ( QString  ,
double  ,
double  ,
double  ,
int   
)
static

◆ drawEllipse()

void Createdxf::drawEllipse ( const QString &  filepath,
const QRectF &  rect,
const int &  colorcode 
)
static

Createdxf::drawEllipse Conveniance function for draw ellipse.

Parameters
filepath
rect
colorcode

Definition at line 556 of file createdxf.cpp.

References drawArcEllipse(), sheetHeight, xScale, and yScale.

Referenced by QetShapeItem::toDXF().

◆ drawLine() [1/2]

void Createdxf::drawLine ( const QString &  filapath,
double  x1,
double  y1,
double  x2,
double  y2,
const int &  clorcode 
)
static

Definition at line 290 of file createdxf.cpp.

Referenced by drawLine(), ExportDialog::generateDxf(), and QetShapeItem::toDXF().

◆ drawLine() [2/2]

void Createdxf::drawLine ( const QString &  filepath,
const QLineF &  line,
const int &  colorcode 
)
static

Createdxf::drawLine Conveniance function to draw line.

Parameters
filepath
line
colorcode

Definition at line 418 of file createdxf.cpp.

References drawLine(), sheetHeight, xScale, and yScale.

◆ drawRectangle() [1/2]

void Createdxf::drawRectangle ( const QString &  filepath,
double  x1,
double  y1,
double  width,
double  height,
const int &  colorcode 
)
static

◆ drawRectangle() [2/2]

void Createdxf::drawRectangle ( const QString &  filepath,
const QRectF &  rect,
const int &  colorcode 
)
static

Createdxf::drawRectangle Conveniance function for draw rectangle.

Parameters
filepath
rect
color

Definition at line 662 of file createdxf.cpp.

References drawRectangle(), sheetHeight, xScale, and yScale.

◆ drawText()

void Createdxf::drawText ( const QString &  fileName,
const QString &  text,
double  x,
double  y,
double  height,
double  rotation,
int  colour 
)
static

Definition at line 708 of file createdxf.cpp.

Referenced by ExportDialog::generateDxf().

◆ drawTextAligned()

void Createdxf::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

◆ dxfBegin()

void Createdxf::dxfBegin ( const QString &  fileName)
static

Definition at line 42 of file createdxf.cpp.

Referenced by ExportDialog::generateDxf().

◆ dxfEnd()

void Createdxf::dxfEnd ( const QString &  fileName)
static

Definition at line 232 of file createdxf.cpp.

Referenced by ExportDialog::generateDxf().

◆ getcolorCode()

int Createdxf::getcolorCode ( const long  red,
const long  green,
const long  blue 
)
static

Createdxf::getcolorCode This function returns the ACI color which is the "nearest" color to the color defined by the red, green and blue (RGB) values passed in argument.

Parameters
red
green
blue

Definition at line 389 of file createdxf.cpp.

References RGBcodeTable.

Referenced by QetShapeItem::toDXF().

Member Data Documentation

◆ RGBcodeTable

long Createdxf::RGBcodeTable
static

Definition at line 53 of file createdxf.h.

Referenced by getcolorCode().

◆ sheetHeight

const double Createdxf::sheetHeight = 2700
static

◆ sheetWidth

const double Createdxf::sheetWidth = 4000
static

Definition at line 55 of file createdxf.h.

Referenced by ExportDialog::generateDxf().

◆ xScale

double Createdxf::xScale = 1
static

◆ yScale

double Createdxf::yScale = 1
static

The documentation for this class was generated from the following files: