X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fbase%2Ffilterdxf1.h;fp=src%2Fbase%2Ffilterdxf1.h;h=0000000000000000000000000000000000000000;hb=9f6ad3fe0b9cb30115a5d38e8af3aebed0d70c08;hp=1deea27e6f331c1d4d736a6fcd43bb7933272699;hpb=43c13b052d069ba435277d93867380d00c04931f;p=architektonas diff --git a/src/base/filterdxf1.h b/src/base/filterdxf1.h deleted file mode 100644 index 1deea27..0000000 --- a/src/base/filterdxf1.h +++ /dev/null @@ -1,103 +0,0 @@ -#ifndef __FILTERDXF1_H__ -#define __FILTERDXF1_H__ - -#include - -#include "filterinterface.h" -//#include "file.h" - -/** - * This format filter class can import and export old DXF files - * from QCad 1.x. - * - * This is legacy code from QCad 1.x. - * - * @author Andrew Mustun - */ -class FilterDXF1 : public FilterInterface -{ -public: - FilterDXF1(); - ~FilterDXF1() {} - - /** - * @return RS2::FormatDXF1. - */ - //RS2::FormatType rtti() { - // return RS2::FormatDXF1; - //} - - /* - virtual bool canImport(RS2::FormatType t) { - return (t==RS2::FormatDXF1); - } - - virtual bool canExport(RS2::FormatType t) { - return false; - }*/ - - virtual bool fileImport(Drawing& g, const QString& file, RS2::FormatType /*type*/); - - virtual bool fileExport(Drawing& /*g*/, const QString& /*file*/, - RS2::FormatType /*type*/) { - DEBUG->print(Debug::D_WARNING, - "Exporting of QCad 1.x file not implemented"); - return false; - } - - bool readFromBuffer(); - - void reset(); - void resetBufP(); - - void setBufP(int _fBufP); - int getBufP() { - return fBufP; - } - void delBuffer(); - void dos2unix(); - - QString getBufLine(); - char* getBufLineCh(); - char* getBuf() { - return fBuf; - } - void setBuf(char* _buf) { - fBuf=_buf; - } - void setFSize(uint _s) { - fSize=_s; - } - void copyBufFrom(const char* _buf); - bool gotoBufLine(char* _lstr); - bool gotoBufLineString(char* _lstr); - - void replaceBinaryBytesBy(char _c); - void separateBuf(char _c1=13, - char _c2=10, - char _c3=0, - char _c4=0); - void removeComment(char _fc='(', - char _lc=')'); - - bool readFileInBuffer(char* _name, int _bNum=-1); - bool readFileInBuffer(int _bNum=-1); - - void strDecodeDxfString(QString& str); - bool mtCompFloat(double _v1, double _v2, double _tol=1.0e-6); - -protected: - /** Pointer to the graphic we currently operate on. */ - Drawing* graphic; - FILE* fPointer; // File pointer - char* fBuf; // Filebuffer - int fBufP; // Filebuffer-Pointer (walks through 'fBuf') - uint fSize; // Filesize - bool dosFile; // File is in DOS-format - int numElements; - QString name; - QFile file; -} -; - -#endif