OpenLexocad  28.0
IV_Importer.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <OpenLxApp/Document.h>
4 #include <OpenLxApp/Importer.h>
5 
6 namespace Gui
7 {
8 class CmdImportFile;
9 }
10 
11 namespace OpenLxApp
12 {
16 class LX_OPENLXAPP_EXPORT IV_Importer : public Importer
17 {
18 public:
19  IV_Importer(std::shared_ptr<OpenLxApp::Document> aDoc);
20  IV_Importer() = delete;
21  virtual ~IV_Importer() {}
22  static std::shared_ptr<IV_Importer> createIn(std::shared_ptr<OpenLxApp::Document> aDoc);
23 
24  virtual int importFile(const Base::String& filename) override;
25  virtual std::vector<std::shared_ptr<OpenLxApp::Element>> getImportedElems() const override;
26 
27  bool getCreateLayer() const;
28  void setCreateLayer(bool aValue);
29 
30  bool getAsExtenalFile() const;
31  void setAsExternalFile(bool aValue);
32 
33 private:
34  Gui::CmdImportFile* _cmd = nullptr;
35 
36  bool _createLayer = true;
37  bool _asExternalFile = false;
38 };
39 } // namespace OpenLxApp
OpenLxApp
Definition: ActiveScript.h:10
OpenLxApp::IV_Importer::IV_Importer
IV_Importer(std::shared_ptr< OpenLxApp::Document > aDoc)
OpenLxApp::IV_Importer::createIn
static std::shared_ptr< IV_Importer > createIn(std::shared_ptr< OpenLxApp::Document > aDoc)
OpenLxApp::IV_Importer::IV_Importer
IV_Importer()=delete
Importer.h
OpenLxApp::IV_Importer::getImportedElems
virtual std::vector< std::shared_ptr< OpenLxApp::Element > > getImportedElems() const override
OpenLxApp::IV_Importer::setCreateLayer
void setCreateLayer(bool aValue)
OpenLxApp::Importer
Base class of all Importers.
Definition: Importer.h:17
OpenLxApp::IV_Importer::setAsExternalFile
void setAsExternalFile(bool aValue)
OpenLxApp::IV_Importer::~IV_Importer
virtual ~IV_Importer()
Definition: IV_Importer.h:21
OpenLxApp::IV_Importer
Imports an Open Inventor (*iv) file.
Definition: IV_Importer.h:17
OpenLxApp::IV_Importer::getCreateLayer
bool getCreateLayer() const
Base::String
A Utf-16 (windows) or ucs4 (unix) encoded string class.
Definition: String.h:18
OpenLxApp::IV_Importer::getAsExtenalFile
bool getAsExtenalFile() const
Document.h
OpenLxApp::IV_Importer::importFile
virtual int importFile(const Base::String &filename) override