Scanframe Modular Application 0.1.0
Loading...
Searching...
No Matches
Reader.h
Go to the documentation of this file.
1#pragma once
2#include "Entities.h"
3#include <QObject>
4#include <dxf/global.h>
5
6namespace sf::dxf
7{
8
12class _DXF_CLASS Reader final : public QObject
13{
14 public:
19 explicit Reader(QObject* parent = nullptr);
20
24 ~Reader() override;
25
31 bool read(const QString& filepath);
32
38
43 const Layers& getLayerInfo() const;
44
45 class Adapter;
46 Adapter* _adapter;
47
48 private:
49 Layers _layerInfo;
50 LayerEntities _entitiesByLayer;
51};
52
53}// namespace sf::dxf
The Reader class parses DXF files using dxflib and stores entities by layer.
Definition Reader.h:13
bool read(const QString &filepath)
Reads and parses a DXF file.
Reader(QObject *parent=nullptr)
Constructs a Reader object.
~Reader() override
Destroys the Reader object.
Adapter * _adapter
Definition Reader.h:46
const LayerEntities & getEntitiesByLayer() const
Gets the parsed entities organized by layer.
const Layers & getLayerInfo() const
Gets the parsed layer information.
#define _DXF_CLASS
Definition dxf/global.h:38
Definition Entities.h:10
QMap< QString, LayerInfo > Layers
Layers holds information for all layers in the DXF file.
Definition Entities.h:193
QMap< QString, EntityList > LayerEntities
Definition Entities.h:156