QElectroTech 0.200.1-dev
Loading...
Searching...
No Matches
EdzArchive Class Reference

Extracts an EPLAN Data Portal package (.edz) to a temporary folder. More...

#include <edzarchive.h>

Collaboration diagram for EdzArchive:
Collaboration graph

Public Member Functions

 EdzArchive ()
 ~EdzArchive ()
bool extract (const QString &edz_path)
QString extractedDir () const
QString partXmlPath () const
QString errorString () const

Private Attributes

QScopedPointer< QTemporaryDir > m_dir
QString m_error

Detailed Description

Extracts an EPLAN Data Portal package (.edz) to a temporary folder.

A .edz is a 7-Zip archive holding a part definition (part.xml), an EPLAN macro, a product image and metadata. EdzArchive unpacks it so the rest of the import pipeline can read the (portable) part.xml.

Extraction uses the bundled (public-domain) LZMA SDK 7-Zip reader, so no external 7-Zip is required at runtime (see edzsevenzip).

The extracted tree lives in a QTemporaryDir owned by this object and is removed when the EdzArchive is destroyed.

Constructor & Destructor Documentation

◆ EdzArchive()

EdzArchive::EdzArchive ( )
default

◆ ~EdzArchive()

EdzArchive::~EdzArchive ( )
default

Member Function Documentation

◆ errorString()

QString EdzArchive::errorString ( ) const
Here is the caller graph for this function:

◆ extract()

bool EdzArchive::extract ( const QString & edz_path)

Extract the .edz at edz_path into a fresh temporary directory.

Returns
true on success; extractedDir()/partXmlPath() are then valid.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ extractedDir()

QString EdzArchive::extractedDir ( ) const
Returns
the temporary folder holding the extracted tree (empty if none).
Here is the caller graph for this function:

◆ partXmlPath()

QString EdzArchive::partXmlPath ( ) const
Returns
absolute path to the first *.part.xml in the extracted tree.
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ m_dir

QScopedPointer<QTemporaryDir> EdzArchive::m_dir
private

◆ m_error

QString EdzArchive::m_error
private

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