HAL
hal::ExportRegisteredFormat Class Reference

Utility class to export (save) different hal files. More...

#include <export_registered_format.h>

Collaboration diagram for hal::ExportRegisteredFormat:
Collaboration graph

Public Member Functions

 ExportRegisteredFormat (const QStringList &exts, const QString &filename=QString())
 
bool queryFilename ()
 
void exportNetlist () const
 
QString filename () const
 

Detailed Description

Utility class to export (save) different hal files.

Definition at line 39 of file export_registered_format.h.

Constructor & Destructor Documentation

◆ ExportRegisteredFormat()

hal::ExportRegisteredFormat::ExportRegisteredFormat ( const QStringList exts,
const QString filename = QString() 
)

The constructor.

Parameters
exts- All valid file extensions.
filename- The filename to write to.

Definition at line 13 of file export_registered_format.cpp.

Member Function Documentation

◆ exportNetlist()

void hal::ExportRegisteredFormat::exportNetlist ( ) const

Exports (writes) the netlist.

Definition at line 70 of file export_registered_format.cpp.

References hal::gNetlist, QString::toStdString(), and hal::netlist_writer_manager::write().

Referenced by hal::MainWindow::handleActionExport().

◆ filename()

QString hal::ExportRegisteredFormat::filename ( ) const
inline

Get the filename to write to.

Returns
The filename.

Definition at line 71 of file export_registered_format.h.

◆ queryFilename()

bool hal::ExportRegisteredFormat::queryFilename ( )

Opens a save file dialog with all valid extensions to get a filename to write the project (netlist) to. It sets the filename internally.

Returns
True on success, False otherwise.

Definition at line 17 of file export_registered_format.cpp.

References QMessageBox::Cancel, QFileInfo::completeBaseName(), QDir::currentPath(), QString::endsWith(), QFileDialog::getSaveFileName(), QString::isEmpty(), QMessageBox::Ok, QFileInfo::path(), and QMessageBox::question().

Referenced by hal::MainWindow::handleActionExport().


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