mirror of
https://github.com/KLayout/klayout.git
synced 2026-08-31 10:06:28 +02:00
Issue 1071 (GDS2Text format options issues) (#1085)
* Fixed first issue (UI problem with GDS2Text options) * Fixed problem with 'save' when the file extension does not indicate one of the known formats In this case, and when plain 'save' is used, the original format is delivered. The session files also store the original format now. The statistics page will now indicate the format of the file that was loaded.
This commit is contained in:
@@ -118,12 +118,14 @@ GDS2WriterOptionPage::multi_xy_clicked ()
|
||||
// ---------------------------------------------------------------
|
||||
// GDS2WriterPluginDeclaration definition and implementation
|
||||
|
||||
class GDS2WriterPluginDeclaration
|
||||
namespace {
|
||||
|
||||
class GDS2WriterPluginDeclarationBase
|
||||
: public StreamWriterPluginDeclaration
|
||||
{
|
||||
public:
|
||||
GDS2WriterPluginDeclaration ()
|
||||
: StreamWriterPluginDeclaration (db::GDS2WriterOptions ().format_name ())
|
||||
GDS2WriterPluginDeclarationBase (const std::string &name)
|
||||
: StreamWriterPluginDeclaration (name)
|
||||
{
|
||||
// .. nothing yet ..
|
||||
}
|
||||
@@ -152,21 +154,47 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief A dummy plugin for GDS2Text
|
||||
* @brief A plugin for GDS2
|
||||
*/
|
||||
class GDS2WriterPluginDeclaration
|
||||
: public GDS2WriterPluginDeclarationBase
|
||||
{
|
||||
public:
|
||||
GDS2WriterPluginDeclaration ()
|
||||
: GDS2WriterPluginDeclarationBase (db::GDS2WriterOptions ().format_name ())
|
||||
{
|
||||
// .. nothing yet ..
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief A plugin for GDS2Text
|
||||
*
|
||||
* GDS2Text shares the options with GDS2, although some limitations do not exist.
|
||||
* There is not specific option set for GDS2Text. The writer will take the options from GDS2.
|
||||
*/
|
||||
class GDS2TextWriterPluginDeclaration
|
||||
: public StreamWriterPluginDeclaration
|
||||
: public GDS2WriterPluginDeclarationBase
|
||||
{
|
||||
public:
|
||||
GDS2TextWriterPluginDeclaration ()
|
||||
: StreamWriterPluginDeclaration ("GDS2Text")
|
||||
: GDS2WriterPluginDeclarationBase ("GDS2Text")
|
||||
{
|
||||
// .. nothing yet ..
|
||||
}
|
||||
|
||||
virtual const char *options_alias () const
|
||||
{
|
||||
return db::GDS2WriterOptions ().format_name ().c_str ();
|
||||
}
|
||||
|
||||
StreamWriterOptionsPage *format_specific_options_page (QWidget *) const
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
};
|
||||
|
||||
static tl::RegisteredClass<lay::PluginDeclaration> plugin_decl1 (new lay::GDS2WriterPluginDeclaration (), 10000, "GDS2Writer");
|
||||
|
||||
Reference in New Issue
Block a user