![]() |
HAL
|
Utility class to export (save) different hal files. More...
#include <export_registered_format.h>
Public Member Functions | |
ExportRegisteredFormat (const QStringList &exts, const QString &filename=QString()) | |
bool | queryFilename () |
void | exportNetlist () const |
QString | filename () const |
Utility class to export (save) different hal files.
Definition at line 39 of file export_registered_format.h.
hal::ExportRegisteredFormat::ExportRegisteredFormat | ( | const QStringList & | exts, |
const QString & | filename = QString() |
||
) |
The constructor.
exts | - All valid file extensions. |
filename | - The filename to write to. |
Definition at line 13 of file export_registered_format.cpp.
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().
|
inline |
Get the filename to write to.
Definition at line 71 of file export_registered_format.h.
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.
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().