QCAD Application Framework
CAD Application Development and Automation.
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
RDwgImporter Class Reference

Importer for the DWG format, based on the OpenDesign libraries. More...

#include <RDwgImporter.h>

Inheritance diagram for RDwgImporter:
RFileImporter RImporter

List of all members.

Public Member Functions

QTemporaryFile * collectQCad2Info (const QString &fileName)
 QCAD 2 stores the font name in field 'text style name', DXF code 7 which is not supported by Teigha.
void detectQCad2Format (const QString &fileName)
void fixQCad2String (QString &str) const
QString getFontName (const QString &typeFace, const QString &fontFile, const QString &handle) const
bool getQCad1Compatibility () const
QString getQCad2BlockName (const QString &blockName) const
bool getQCad2Compatibility () const
QString getQCad2DimensionLabel (const QString &handle) const
QString getQCad2Font (const QString &handle) const
QString getQCad2LayerName (const QString &layerName) const
double getQCad2PatternAngle (double angle, const QString &patternName) const
QString getQCad2PatternName (const QString &patternName) const
double getQCad2PatternScale (double scale, const QString &patternName) const
virtual bool importFile (const QString &fileName)
 Must be implemented by file importers to import the given file into the document.
 RDwgImporter (RDocument &document, RMessageHandler *messageHandler=NULL, RProgressHandler *progressHandler=NULL)
virtual ~RDwgImporter ()
- Public Member Functions inherited from RFileImporter
 RFileImporter ()
 RFileImporter (RDocument &document, RMessageHandler *messageHandler=NULL, RProgressHandler *progressHandler=NULL)
virtual ~RFileImporter ()
- Public Member Functions inherited from RImporter
virtual void endImport ()
 Ends the import.
virtual RBlock::Id getCurrentBlockId ()
RDocumentgetDocument ()
virtual void importObject (QSharedPointer< RObject > object)
 Imports an entity into the document.
 RImporter ()
 RImporter (RDocument &document, RMessageHandler *messageHandler=NULL, RProgressHandler *progressHandler=NULL)
virtual void setCurrentBlockId (RBlock::Id id)
void setDocument (RDocument *d)
virtual void startImport ()
 Starts the import.
virtual ~RImporter ()

Static Public Member Functions

static bool check (const QString &fileName, const QString &nameFilter)
static RFileImporterfactory (RDocument &document, RMessageHandler *messageHandler=NULL, RProgressHandler *progressHandler=NULL)
static QStringList getFilterStrings ()
static void registerFileImporter ()

Protected Member Functions

void importBlocks (OdDbDatabase *pDb)
void importEntities (OdDbDatabase *pDb)
void importEntities (OdDbDatabase *pDb, OdDbBlockTableRecordPtr &pBlock)
void importEntity (OdDbObjectId id)
void importHeader (OdDbDatabase *pDb)
void importLayers (OdDbDatabase *pDb)
void importLinetypes (OdDbDatabase *pDb)
 For future use.
void importSetting (OdDbObjectId id, OdString itemName)
void importSettings (OdDbDatabase *pDb)
void importViews (OdDbDatabase *pDb)
void importXData (OdString name, OdResBuf *resbuf)
 Imports global custom data.

Private Attributes

QMap< OdDbObjectId, RLinetype::IdlineTypeIdMapping
QStringList lockedLayers
bool qcad1Compatibility
QMap< QString, QString > qcad2BlockMapping
bool qcad2Compatibility
QMap< QString, QString > qcad2DimensionLabels
bool qcad2GotDIMAZIN
bool qcad2GotDIMZIN
bool qcad2GotInvalidEllipse
QMap< QString, QString > qcad2LayerMapping
QMap< QString, QString > qcad2TextFonts

Friends

class RDwgEntityImporter

Detailed Description

Importer for the DWG format, based on the OpenDesign libraries.

Scriptable:
This class is wrapped for script environments.

Constructor & Destructor Documentation

RDwgImporter::RDwgImporter ( RDocument document,
RMessageHandler messageHandler = NULL,
RProgressHandler progressHandler = NULL 
)
RDwgImporter::~RDwgImporter ( )
virtual

Member Function Documentation

bool RDwgImporter::check ( const QString &  fileName,
const QString &  nameFilter 
)
static
   \par Non-Scriptable:

This function is not available in script environments.

QTemporaryFile * RDwgImporter::collectQCad2Info ( const QString &  fileName)

QCAD 2 stores the font name in field 'text style name', DXF code 7 which is not supported by Teigha.

This function collects all font names of MTEXT entities for use by RDwgMTextImporter.

void RDwgImporter::detectQCad2Format ( const QString &  fileName)
RFileImporter * RDwgImporter::factory ( RDocument document,
RMessageHandler messageHandler = NULL,
RProgressHandler progressHandler = NULL 
)
static
   \par Non-Scriptable:

This function is not available in script environments.

void RDwgImporter::fixQCad2String ( QString &  str) const
QStringList RDwgImporter::getFilterStrings ( )
static
QString RDwgImporter::getFontName ( const QString &  typeFace,
const QString &  fontFile,
const QString &  handle 
) const
bool RDwgImporter::getQCad1Compatibility ( ) const
inline
QString RDwgImporter::getQCad2BlockName ( const QString &  blockName) const
bool RDwgImporter::getQCad2Compatibility ( ) const
inline
QString RDwgImporter::getQCad2DimensionLabel ( const QString &  handle) const
QString RDwgImporter::getQCad2Font ( const QString &  handle) const
QString RDwgImporter::getQCad2LayerName ( const QString &  layerName) const
double RDwgImporter::getQCad2PatternAngle ( double  angle,
const QString &  patternName 
) const
QString RDwgImporter::getQCad2PatternName ( const QString &  patternName) const
double RDwgImporter::getQCad2PatternScale ( double  scale,
const QString &  patternName 
) const
Parameters:
scaleOld QCAD 2 pattern scale.
patternNameOld QCAD 2 pattern name.
void RDwgImporter::importBlocks ( OdDbDatabase *  pDb)
protected
void RDwgImporter::importEntities ( OdDbDatabase *  pDb)
protected
void RDwgImporter::importEntities ( OdDbDatabase *  pDb,
OdDbBlockTableRecordPtr &  pBlock 
)
protected
void RDwgImporter::importEntity ( OdDbObjectId  id)
protected
bool RDwgImporter::importFile ( const QString &  fileName)
virtual

Must be implemented by file importers to import the given file into the document.

Implements RFileImporter.

void RDwgImporter::importHeader ( OdDbDatabase *  pDb)
protected
void RDwgImporter::importLayers ( OdDbDatabase *  pDb)
protected
void RDwgImporter::importLinetypes ( OdDbDatabase *  pDb)
protected

For future use.

void RDwgImporter::importSetting ( OdDbObjectId  id,
OdString  itemName 
)
protected
void RDwgImporter::importSettings ( OdDbDatabase *  pDb)
protected
void RDwgImporter::importViews ( OdDbDatabase *  pDb)
protected
void RDwgImporter::importXData ( OdString  name,
OdResBuf *  resbuf 
)
protected

Imports global custom data.

void RDwgImporter::registerFileImporter ( )
static

Friends And Related Function Documentation

friend class RDwgEntityImporter
friend

Member Data Documentation

QMap<OdDbObjectId, RLinetype::Id> RDwgImporter::lineTypeIdMapping
private
QStringList RDwgImporter::lockedLayers
private
bool RDwgImporter::qcad1Compatibility
private
QMap<QString, QString> RDwgImporter::qcad2BlockMapping
private
bool RDwgImporter::qcad2Compatibility
private
QMap<QString, QString> RDwgImporter::qcad2DimensionLabels
private
bool RDwgImporter::qcad2GotDIMAZIN
private
bool RDwgImporter::qcad2GotDIMZIN
private
bool RDwgImporter::qcad2GotInvalidEllipse
private
QMap<QString, QString> RDwgImporter::qcad2LayerMapping
private
QMap<QString, QString> RDwgImporter::qcad2TextFonts
private

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