diff --git a/src/ant/ant/antPlugin.cc b/src/ant/ant/antPlugin.cc index 1aecb0792..4ad479762 100644 --- a/src/ant/ant/antPlugin.cc +++ b/src/ant/ant/antPlugin.cc @@ -100,7 +100,7 @@ PluginDeclaration::get_menu_entries (std::vector &menu_entries) } lay::Plugin * -PluginDeclaration::create_plugin (db::Manager *manager, lay::Dispatcher *, lay::LayoutView *view) const +PluginDeclaration::create_plugin (db::Manager *manager, lay::Dispatcher *, lay::LayoutViewBase *view) const { return new ant::Service (manager, view); } diff --git a/src/ant/ant/antPlugin.h b/src/ant/ant/antPlugin.h index 9e7e5e943..0b8b4ac05 100644 --- a/src/ant/ant/antPlugin.h +++ b/src/ant/ant/antPlugin.h @@ -42,7 +42,7 @@ public: virtual void get_options (std::vector < std::pair > &options) const; virtual void get_menu_entries (std::vector &menu_entries) const; - virtual lay::Plugin *create_plugin (db::Manager *manager, lay::Dispatcher *, lay::LayoutView *view) const; + virtual lay::Plugin *create_plugin (db::Manager *manager, lay::Dispatcher *, lay::LayoutViewBase *view) const; virtual bool implements_editable (std::string &title) const; virtual bool implements_mouse_mode (std::string &title) const; virtual bool configure (const std::string &name, const std::string &value); diff --git a/src/edt/edt/edtPlugin.cc b/src/edt/edt/edtPlugin.cc index 939c4843c..0f3d01f22 100644 --- a/src/edt/edt/edtPlugin.cc +++ b/src/edt/edt/edtPlugin.cc @@ -217,7 +217,7 @@ public: } #if defined(HAVE_QT) - virtual void get_editor_options_pages (std::vector &pages, lay::LayoutView *view, lay::Dispatcher *root) const + virtual void get_editor_options_pages (std::vector &pages, lay::LayoutViewBase *view, lay::Dispatcher *root) const { if (mp_pages_f != 0) { size_t nstart = pages.size (); @@ -229,7 +229,7 @@ public: } #endif - virtual lay::Plugin *create_plugin (db::Manager *manager, lay::Dispatcher *, lay::LayoutView *view) const + virtual lay::Plugin *create_plugin (db::Manager *manager, lay::Dispatcher *, lay::LayoutViewBase *view) const { Svc *service = new Svc (manager, view); service->set_plugin_declaration (this); @@ -357,7 +357,7 @@ public: return false; } - virtual lay::Plugin *create_plugin (db::Manager *manager, lay::Dispatcher *root, lay::LayoutView *view) const + virtual lay::Plugin *create_plugin (db::Manager *manager, lay::Dispatcher *root, lay::LayoutViewBase *view) const { return new edt::MainService (manager, view, root); } @@ -373,7 +373,7 @@ public: } #if defined(HAVE_QT) - virtual void get_editor_options_pages (std::vector &pages, lay::LayoutView *view, lay::Dispatcher *dispatcher) const + virtual void get_editor_options_pages (std::vector &pages, lay::LayoutViewBase *view, lay::Dispatcher *dispatcher) const { // NOTE: we do not set plugin_declaration which makes the page unspecific EditorOptionsGeneric *generic_opt = new EditorOptionsGeneric (view, dispatcher); @@ -500,12 +500,12 @@ public: // .. nothing yet .. } - virtual void get_editor_options_pages (std::vector & /*pages*/, lay::LayoutView * /*view*/, lay::Dispatcher * /*root*/) const + virtual void get_editor_options_pages (std::vector & /*pages*/, lay::LayoutViewBase * /*view*/, lay::Dispatcher * /*root*/) const { // .. no specific ones .. } - virtual lay::Plugin *create_plugin (db::Manager *manager, lay::Dispatcher *root, lay::LayoutView *view) const + virtual lay::Plugin *create_plugin (db::Manager *manager, lay::Dispatcher *root, lay::LayoutViewBase *view) const { return new edt::PartialService (manager, view, root); } diff --git a/src/img/img/imgPlugin.cc b/src/img/img/imgPlugin.cc index 4936406f0..a5472c5e7 100644 --- a/src/img/img/imgPlugin.cc +++ b/src/img/img/imgPlugin.cc @@ -44,7 +44,7 @@ PluginDeclaration::get_menu_entries (std::vector &menu_entries) } lay::Plugin * -PluginDeclaration::create_plugin (db::Manager *manager, lay::Dispatcher *, lay::LayoutView *view) const +PluginDeclaration::create_plugin (db::Manager *manager, lay::Dispatcher *, lay::LayoutViewBase *view) const { return new img::Service (manager, view); } diff --git a/src/img/img/imgPlugin.h b/src/img/img/imgPlugin.h index 4dc9fa0bd..1575ceccb 100644 --- a/src/img/img/imgPlugin.h +++ b/src/img/img/imgPlugin.h @@ -36,7 +36,7 @@ class PluginDeclaration { public: virtual void get_menu_entries (std::vector &menu_entries) const; - virtual lay::Plugin *create_plugin (db::Manager *manager, lay::Dispatcher *, lay::LayoutView *view) const; + virtual lay::Plugin *create_plugin (db::Manager *manager, lay::Dispatcher *, lay::LayoutViewBase *view) const; virtual bool implements_editable (std::string &title) const; virtual void get_options (std::vector < std::pair > &options) const; }; diff --git a/src/klayout.pri b/src/klayout.pri index 2bc555e29..9bf6debac 100644 --- a/src/klayout.pri +++ b/src/klayout.pri @@ -11,8 +11,10 @@ RDB_INC = $$PWD/rdb/rdb IMG_INC = $$PWD/img/img LYM_INC = $$PWD/lym/lym LIB_INC = $$PWD/lib/lib -LAY_INC = $$PWD/lay/lay LAYBASIC_INC = $$PWD/laybasic/laybasic +LAYVIEW_INC = $$PWD/layview/layview +LAYUI_INC = $$PWD/layui/layui +LAY_INC = $$PWD/lay/lay QTBASIC_INC = $$PWD/gsiqt/qtbasic diff --git a/src/klayout.pro b/src/klayout.pro index c682bb064..a2ece4bb7 100644 --- a/src/klayout.pro +++ b/src/klayout.pro @@ -14,6 +14,7 @@ SUBDIRS = \ buddies \ lym \ laybasic \ + layview \ ant \ img \ edt \ @@ -28,6 +29,7 @@ equals(HAVE_RUBY, "1") { SUBDIRS += \ klayout_main \ lay \ + layui \ fontgen \ } @@ -66,10 +68,11 @@ buddies.depends += plugins lym $$LANG_DEPENDS lym.depends += gsi $$LANG_DEPENDS laybasic.depends += rdb +layview.depends += laybasic -ant.depends += laybasic -img.depends += laybasic -edt.depends += laybasic +ant.depends += layview +img.depends += layview +edt.depends += layview plugins.depends += lib rdb db ant @@ -98,9 +101,11 @@ equals(HAVE_RUBY, "1") { } - plugins.depends += lay + layui.depends += rdb + layview.depends += layui + lay.depends += laybasic ant img edt layui - lay.depends += laybasic ant img edt + plugins.depends += lay klayout_main.depends += plugins $$MAIN_DEPENDS diff --git a/src/lay/lay/layClipDialog.cc b/src/lay/lay/layClipDialog.cc index 36679c03e..88a3102c7 100644 --- a/src/lay/lay/layClipDialog.cc +++ b/src/lay/lay/layClipDialog.cc @@ -55,7 +55,7 @@ public: menu_entries.push_back (lay::menu_item ("clip_tool::show", "clip_tool:edit_mode", "edit_menu.utils_menu.end", tl::to_string (QObject::tr ("Clip Tool")))); } - virtual lay::Plugin *create_plugin (db::Manager *, lay::Dispatcher *root, lay::LayoutView *view) const + virtual lay::Plugin *create_plugin (db::Manager *, lay::Dispatcher *root, lay::LayoutViewBase *view) const { return new ClipDialog (root, view); } diff --git a/src/lay/lay/layFillDialog.cc b/src/lay/lay/layFillDialog.cc index 63df40cdd..8e3c2cd33 100644 --- a/src/lay/lay/layFillDialog.cc +++ b/src/lay/lay/layFillDialog.cc @@ -62,7 +62,7 @@ public: menu_entries.push_back (lay::menu_item ("fill_tool::show", "fill_tool:edit_mode", "edit_menu.utils_menu.end", tl::to_string (QObject::tr ("Fill Tool")))); } - virtual lay::Plugin *create_plugin (db::Manager *, lay::Dispatcher *root, lay::LayoutView *view) const + virtual lay::Plugin *create_plugin (db::Manager *, lay::Dispatcher *root, lay::LayoutViewBase *view) const { return new FillDialog (root, view); } diff --git a/src/lay/lay/laySearchReplacePlugin.cc b/src/lay/lay/laySearchReplacePlugin.cc index bc603736d..6c4be161b 100644 --- a/src/lay/lay/laySearchReplacePlugin.cc +++ b/src/lay/lay/laySearchReplacePlugin.cc @@ -63,7 +63,7 @@ public: menu_entries.push_back (lay::menu_item ("search_replace::show", "search_replace_viewer:edit:view_mode", "edit_menu.utils_group+", tl::to_string (QObject::tr ("Search")))); } - virtual lay::Plugin *create_plugin (db::Manager *, lay::Dispatcher *root, lay::LayoutView *view) const + virtual lay::Plugin *create_plugin (db::Manager *, lay::Dispatcher *root, lay::LayoutViewBase *view) const { return new SearchReplaceDialog (root, view); } diff --git a/src/laybasic/laybasic/gsiDeclLayLayers.cc b/src/laybasic/laybasic/gsiDeclLayLayers.cc index 76955760f..794d83882 100644 --- a/src/laybasic/laybasic/gsiDeclLayLayers.cc +++ b/src/laybasic/laybasic/gsiDeclLayLayers.cc @@ -23,7 +23,7 @@ #include "gsiDecl.h" #include "layLayerProperties.h" -#include "layLayoutView.h" +#include "layLayoutViewBase.h" namespace gsi { @@ -1227,11 +1227,6 @@ Class decl_LayerPropertiesNode ( "\n" "@return A bbox in micron units\n" ) + - method_ext ("view", &get_view, - "@brief Gets the view this node lives in\n" - "\n" - "This reference can be nil if the node is a orphan node that lives outside a view." - ) + method ("list_index", &lay::LayerPropertiesNode::list_index, "@brief Gets the index of the layer properties list that the node lives in\n" ) + diff --git a/src/laybasic/laybasic/gsiDeclLayLayoutView.cc b/src/laybasic/laybasic/gsiDeclLayLayoutViewBase.cc similarity index 78% rename from src/laybasic/laybasic/gsiDeclLayLayoutView.cc rename to src/laybasic/laybasic/gsiDeclLayLayoutViewBase.cc index 612b28827..3efa7cd32 100644 --- a/src/laybasic/laybasic/gsiDeclLayLayoutView.cc +++ b/src/laybasic/laybasic/gsiDeclLayLayoutViewBase.cc @@ -25,7 +25,7 @@ #include "gsiSignals.h" #include "gsiEnums.h" #include "rdb.h" -#include "layLayoutView.h" +#include "layLayoutViewBase.h" #include "layDitherPattern.h" #include "layLineStyles.h" #include "dbSaveLayoutOptions.h" @@ -43,7 +43,7 @@ namespace gsi { -static void remove_stipple (lay::LayoutView *view, unsigned int index) +static void remove_stipple (lay::LayoutViewBase *view, unsigned int index) { lay::DitherPattern pattern (view->dither_pattern ()); @@ -56,13 +56,13 @@ static void remove_stipple (lay::LayoutView *view, unsigned int index) } } -static void clear_stipples (lay::LayoutView *view) +static void clear_stipples (lay::LayoutViewBase *view) { lay::DitherPattern no_stipples; view->set_dither_pattern (no_stipples); } -static unsigned int add_stipple1 (lay::LayoutView *view, const std::string &name, const std::vector &data, unsigned int bits) +static unsigned int add_stipple1 (lay::LayoutViewBase *view, const std::string &name, const std::vector &data, unsigned int bits) { lay::DitherPattern pattern (view->dither_pattern ()); @@ -78,7 +78,7 @@ static unsigned int add_stipple1 (lay::LayoutView *view, const std::string &name return index; } -static unsigned int add_stipple2 (lay::LayoutView *view, const std::string &name, const std::string &s) +static unsigned int add_stipple2 (lay::LayoutViewBase *view, const std::string &name, const std::string &s) { lay::DitherPattern pattern (view->dither_pattern ()); @@ -92,13 +92,13 @@ static unsigned int add_stipple2 (lay::LayoutView *view, const std::string &name return index; } -static std::string get_stipple (lay::LayoutView *view, unsigned int index) +static std::string get_stipple (lay::LayoutViewBase *view, unsigned int index) { lay::DitherPattern pattern (view->dither_pattern ()); return pattern.pattern (index).to_string (); } -static void remove_line_style (lay::LayoutView *view, unsigned int index) +static void remove_line_style (lay::LayoutViewBase *view, unsigned int index) { lay::LineStyles styles (view->line_styles ()); @@ -111,13 +111,13 @@ static void remove_line_style (lay::LayoutView *view, unsigned int index) } } -static void clear_line_styles (lay::LayoutView *view) +static void clear_line_styles (lay::LayoutViewBase *view) { lay::LineStyles no_styles; view->set_line_styles (no_styles); } -static unsigned int add_line_style1 (lay::LayoutView *view, const std::string &name, unsigned int data, unsigned int bits) +static unsigned int add_line_style1 (lay::LayoutViewBase *view, const std::string &name, unsigned int data, unsigned int bits) { lay::LineStyles styles (view->line_styles ()); @@ -131,7 +131,7 @@ static unsigned int add_line_style1 (lay::LayoutView *view, const std::string &n return index; } -static unsigned int add_line_style2 (lay::LayoutView *view, const std::string &name, const std::string &str) +static unsigned int add_line_style2 (lay::LayoutViewBase *view, const std::string &name, const std::string &str) { lay::LineStyles styles (view->line_styles ()); @@ -145,93 +145,93 @@ static unsigned int add_line_style2 (lay::LayoutView *view, const std::string &n return index; } -static std::string get_line_style (lay::LayoutView *view, unsigned int index) +static std::string get_line_style (lay::LayoutViewBase *view, unsigned int index) { return view->line_styles ().style (index).to_string (); } -static void transaction (lay::LayoutView *view, const std::string &desc) +static void transaction (lay::LayoutViewBase *view, const std::string &desc) { view->manager ()->transaction (desc); } -static void commit (lay::LayoutView *view) +static void commit (lay::LayoutViewBase *view) { view->manager ()->commit (); } -static void clear_transactions (lay::LayoutView *view) +static void clear_transactions (lay::LayoutViewBase *view) { view->manager ()->clear (); } -static bool transacting (lay::LayoutView *view) +static bool transacting (lay::LayoutViewBase *view) { return view->manager ()->transacting (); } -static db::DCplxTrans viewport_trans (const lay::LayoutView *view) +static db::DCplxTrans viewport_trans (const lay::LayoutViewBase *view) { return view->viewport ().trans (); } -static int viewport_width (const lay::LayoutView *view) +static int viewport_width (const lay::LayoutViewBase *view) { return view->viewport ().width (); } -static int viewport_height (const lay::LayoutView *view) +static int viewport_height (const lay::LayoutViewBase *view) { return view->viewport ().height (); } -static std::vector selected_cells_paths (const lay::LayoutView *view, int cv_index) +static std::vector selected_cells_paths (const lay::LayoutViewBase *view, int cv_index) { - std::vector p; + std::vector p; view->selected_cells_paths (cv_index, p); return p; } -static unsigned int create_rdb (lay::LayoutView *view, const std::string &name) +static unsigned int create_rdb (lay::LayoutViewBase *view, const std::string &name) { rdb::Database *db = new rdb::Database (); db->set_name (name); return view->add_rdb (db); } -static unsigned int create_l2ndb (lay::LayoutView *view, const std::string &name) +static unsigned int create_l2ndb (lay::LayoutViewBase *view, const std::string &name) { db::LayoutToNetlist *db = new db::LayoutToNetlist (); db->set_name (name); return view->add_l2ndb (db); } -static unsigned int create_lvsdb (lay::LayoutView *view, const std::string &name) +static unsigned int create_lvsdb (lay::LayoutViewBase *view, const std::string &name) { db::LayoutVsSchematic *db = new db::LayoutVsSchematic (); db->set_name (name); return view->add_l2ndb (db); } -static db::LayoutVsSchematic *get_lvsdb (lay::LayoutView *view, unsigned int index) +static db::LayoutVsSchematic *get_lvsdb (lay::LayoutViewBase *view, unsigned int index) { db::LayoutToNetlist *db = view->get_l2ndb (index); return dynamic_cast (db); } -static unsigned int add_lvsdb (lay::LayoutView *view, db::LayoutVsSchematic *lvsdb) +static unsigned int add_lvsdb (lay::LayoutViewBase *view, db::LayoutVsSchematic *lvsdb) { return view->add_l2ndb (lvsdb); } -static unsigned int replace_lvsdb (lay::LayoutView *view, unsigned int db_index, db::LayoutVsSchematic *lvsdb) +static unsigned int replace_lvsdb (lay::LayoutViewBase *view, unsigned int db_index, db::LayoutVsSchematic *lvsdb) { return view->replace_l2ndb (db_index, lvsdb); } // this binding returns a const pointer which is not converted into a copy by RBA -static lay::LayerPropertiesNodeRef insert_layer1 (lay::LayoutView *view, const lay::LayerPropertiesConstIterator &iter, const lay::LayerProperties &props) +static lay::LayerPropertiesNodeRef insert_layer1 (lay::LayoutViewBase *view, const lay::LayerPropertiesConstIterator &iter, const lay::LayerProperties &props) { const lay::LayerPropertiesNode *lp = dynamic_cast (&props); if (lp) { @@ -241,7 +241,7 @@ static lay::LayerPropertiesNodeRef insert_layer1 (lay::LayoutView *view, const l } } -static void replace_layer_node2 (lay::LayoutView *view, unsigned int index, const lay::LayerPropertiesConstIterator &iter, const lay::LayerProperties &props) +static void replace_layer_node2 (lay::LayoutViewBase *view, unsigned int index, const lay::LayerPropertiesConstIterator &iter, const lay::LayerProperties &props) { const lay::LayerPropertiesNode *lp = dynamic_cast (&props); if (lp) { @@ -251,7 +251,7 @@ static void replace_layer_node2 (lay::LayoutView *view, unsigned int index, cons } } -static void replace_layer_node1 (lay::LayoutView *view, const lay::LayerPropertiesConstIterator &iter, const lay::LayerProperties &props) +static void replace_layer_node1 (lay::LayoutViewBase *view, const lay::LayerPropertiesConstIterator &iter, const lay::LayerProperties &props) { const lay::LayerPropertiesNode *lp = dynamic_cast (&props); if (lp) { @@ -261,7 +261,7 @@ static void replace_layer_node1 (lay::LayoutView *view, const lay::LayerProperti } } -static lay::LayerPropertiesNodeRef insert_layer2 (lay::LayoutView *view, unsigned int index, const lay::LayerPropertiesConstIterator &iter, const lay::LayerProperties &props) +static lay::LayerPropertiesNodeRef insert_layer2 (lay::LayoutViewBase *view, unsigned int index, const lay::LayerPropertiesConstIterator &iter, const lay::LayerProperties &props) { const lay::LayerPropertiesNode *lp = dynamic_cast (&props); if (lp) { @@ -271,7 +271,7 @@ static lay::LayerPropertiesNodeRef insert_layer2 (lay::LayoutView *view, unsigne } } -static void delete_layers1 (lay::LayoutView *view, const std::vector &iters) +static void delete_layers1 (lay::LayoutViewBase *view, const std::vector &iters) { std::vector sorted (iters); std::sort (sorted.begin (), sorted.end (), lay::CompareLayerIteratorBottomUp ()); @@ -280,7 +280,7 @@ static void delete_layers1 (lay::LayoutView *view, const std::vectorkeep (); @@ -288,7 +288,7 @@ static unsigned int show_layout1 (lay::LayoutView *view, db::Layout *layout, boo return view->add_layout (handle, add_cellview); } -static unsigned int show_layout2 (lay::LayoutView *view, db::Layout *layout, std::string &tech, bool add_cellview) +static unsigned int show_layout2 (lay::LayoutViewBase *view, db::Layout *layout, std::string &tech, bool add_cellview) { // the layout gets held by the LayoutHandle object layout->keep (); @@ -297,7 +297,7 @@ static unsigned int show_layout2 (lay::LayoutView *view, db::Layout *layout, std return view->add_layout (handle, add_cellview); } -static unsigned int show_layout3 (lay::LayoutView *view, db::Layout *layout, std::string &tech, bool add_cellview, bool initialize_layers) +static unsigned int show_layout3 (lay::LayoutViewBase *view, db::Layout *layout, std::string &tech, bool add_cellview, bool initialize_layers) { // the layout gets held by the LayoutHandle object layout->keep (); @@ -306,7 +306,7 @@ static unsigned int show_layout3 (lay::LayoutView *view, db::Layout *layout, std return view->add_layout (handle, add_cellview, initialize_layers); } -static void delete_layers2 (lay::LayoutView *view, unsigned int index, const std::vector &iters) +static void delete_layers2 (lay::LayoutViewBase *view, unsigned int index, const std::vector &iters) { std::vector sorted (iters); std::sort (sorted.begin (), sorted.end (), lay::CompareLayerIteratorBottomUp ()); @@ -315,42 +315,42 @@ static void delete_layers2 (lay::LayoutView *view, unsigned int index, const std } } -static void save_as1 (lay::LayoutView *view, unsigned int index, const std::string &filename, const db::SaveLayoutOptions &options) +static void save_as1 (lay::LayoutViewBase *view, unsigned int index, const std::string &filename, const db::SaveLayoutOptions &options) { view->save_as (index, filename, tl::OutputStream::OM_Auto, options, true, 0); } -static void save_as2 (lay::LayoutView *view, unsigned int index, const std::string &filename, bool /*gzip*/, const db::SaveLayoutOptions &options) +static void save_as2 (lay::LayoutViewBase *view, unsigned int index, const std::string &filename, bool /*gzip*/, const db::SaveLayoutOptions &options) { // because set_format_from_name always returns true now, we ignore the gzip option - // it's probably used only in that context. view->save_as (index, filename, tl::OutputStream::OM_Auto, options, true, 0); } -#if defined(HAVE_QT) && defined(HAVE_QTBINDINGS) -static QImage get_image_with_options (lay::LayoutView *view, unsigned int width, unsigned int height, int linewidth, int oversampling, double resolution, const db::DBox &target_box, bool monochrome) +static lay::PixelBuffer get_pixels_with_options (lay::LayoutViewBase *view, unsigned int width, unsigned int height, int linewidth, int oversampling, double resolution, const db::DBox &target_box) +{ + return view->get_pixels_with_options (width, height, linewidth, oversampling, resolution, lay::Color (), lay::Color (), lay::Color (), target_box); +} + +static lay::BitmapBuffer get_pixels_with_options_mono (lay::LayoutViewBase *view, unsigned int width, unsigned int height, int linewidth, const db::DBox &target_box) +{ + return view->get_pixels_with_options_mono (width, height, linewidth, lay::Color (), lay::Color (), lay::Color (), target_box); +} + +static void save_image_with_options (lay::LayoutViewBase *view, const std::string &fn, unsigned int width, unsigned int height, int linewidth, int oversampling, double resolution, const db::DBox &target_box, bool monochrome) +{ + view->save_image_with_options (fn, width, height, linewidth, oversampling, resolution, lay::Color (), lay::Color (), lay::Color (), target_box, monochrome); +} + +#if defined(HAVE_QTBINDINGS) +static QImage get_image_with_options (lay::LayoutViewBase *view, unsigned int width, unsigned int height, int linewidth, int oversampling, double resolution, const db::DBox &target_box, bool monochrome) { return view->get_image_with_options (width, height, linewidth, oversampling, resolution, lay::Color (), lay::Color (), lay::Color (), target_box, monochrome); } #endif -static lay::PixelBuffer get_pixels_with_options (lay::LayoutView *view, unsigned int width, unsigned int height, int linewidth, int oversampling, double resolution, const db::DBox &target_box) -{ - return view->get_pixels_with_options (width, height, linewidth, oversampling, resolution, lay::Color (), lay::Color (), lay::Color (), target_box); -} - -static lay::BitmapBuffer get_pixels_with_options_mono (lay::LayoutView *view, unsigned int width, unsigned int height, int linewidth, const db::DBox &target_box) -{ - return view->get_pixels_with_options_mono (width, height, linewidth, lay::Color (), lay::Color (), lay::Color (), target_box); -} - -static void save_image_with_options (lay::LayoutView *view, const std::string &fn, unsigned int width, unsigned int height, int linewidth, int oversampling, double resolution, const db::DBox &target_box, bool monochrome) -{ - view->save_image_with_options (fn, width, height, linewidth, oversampling, resolution, lay::Color (), lay::Color (), lay::Color (), target_box, monochrome); -} - static std::vector -get_config_names (lay::LayoutView *view) +get_config_names (lay::LayoutViewBase *view) { std::vector names; view->get_config_names (names); @@ -358,49 +358,49 @@ get_config_names (lay::LayoutView *view) } static void -send_key_press_event (lay::LayoutView *view, unsigned int key, unsigned int buttons) +send_key_press_event (lay::LayoutViewBase *view, unsigned int key, unsigned int buttons) { view->view_object_widget ()->send_key_press_event (key, buttons); } static void -send_mouse_move_event (lay::LayoutView *view, const db::DPoint &pt, unsigned int buttons) +send_mouse_move_event (lay::LayoutViewBase *view, const db::DPoint &pt, unsigned int buttons) { view->view_object_widget ()->send_mouse_move_event (pt, buttons); } static void -send_leave_event (lay::LayoutView *view) +send_leave_event (lay::LayoutViewBase *view) { view->view_object_widget ()->send_leave_event (); } static void -send_enter_event (lay::LayoutView *view) +send_enter_event (lay::LayoutViewBase *view) { view->view_object_widget ()->send_enter_event (); } static void -send_mouse_press_event (lay::LayoutView *view, const db::DPoint &pt, unsigned int buttons) +send_mouse_press_event (lay::LayoutViewBase *view, const db::DPoint &pt, unsigned int buttons) { view->view_object_widget ()->send_mouse_press_event (pt, buttons); } static void -send_mouse_double_clicked_event (lay::LayoutView *view, const db::DPoint &pt, unsigned int buttons) +send_mouse_double_clicked_event (lay::LayoutViewBase *view, const db::DPoint &pt, unsigned int buttons) { view->view_object_widget ()->send_mouse_double_clicked_event (pt, buttons); } static void -send_mouse_release_event (lay::LayoutView *view, const db::DPoint &pt, unsigned int buttons) +send_mouse_release_event (lay::LayoutViewBase *view, const db::DPoint &pt, unsigned int buttons) { view->view_object_widget ()->send_mouse_release_event (pt, buttons); } static void -send_wheel_event (lay::LayoutView *view, int delta, bool horizontal, const db::DPoint &pt, unsigned int buttons) +send_wheel_event (lay::LayoutViewBase *view, int delta, bool horizontal, const db::DPoint &pt, unsigned int buttons) { view->view_object_widget ()->send_wheel_event (delta, horizontal, pt, buttons); } @@ -451,146 +451,96 @@ namespace { } -static LayerPropertiesConstIteratorWrapper each_layer (lay::LayoutView *view) +static LayerPropertiesConstIteratorWrapper each_layer (lay::LayoutViewBase *view) { return LayerPropertiesConstIteratorWrapper (view->begin_layers ()); } -static LayerPropertiesConstIteratorWrapper each_layer2 (lay::LayoutView *view, unsigned int list_index) +static LayerPropertiesConstIteratorWrapper each_layer2 (lay::LayoutViewBase *view, unsigned int list_index) { return LayerPropertiesConstIteratorWrapper (view->begin_layers (list_index)); } -#if defined(HAVE_QTBINDINGS) -static lay::LayoutView *new_view (QWidget *parent, bool editable, db::Manager *manager, unsigned int options) -{ - lay::LayoutView *lv = new lay::LayoutView (manager, editable, 0 /*plugin parent*/, parent, "view", options); - if (parent) { - // transfer ownership to the parent - lv->keep (); - } - return lv; -} -#endif - -static lay::LayoutView *new_view2 (bool editable, db::Manager *manager, unsigned int options) -{ #if defined(HAVE_QT) - return new lay::LayoutView (manager, editable, 0 /*plugin parent*/, 0 /*parent*/, "view", options); +Class decl_LayoutViewBase (QT_EXTERNAL_BASE (QWidget) "lay", "LayoutViewBase", #else - return new lay::LayoutView (manager, editable, 0 /*plugin parent*/, options); +Class decl_LayoutViewBase (QT_EXTERNAL_BASE (QWidget) "lay", "LayoutViewBase", #endif -} - -#if defined(HAVE_QT) -Class decl_LayoutView (QT_EXTERNAL_BASE (QWidget) "lay", "LayoutView", -#else -Class decl_LayoutView (QT_EXTERNAL_BASE (QWidget) "lay", "LayoutView", -#endif -#if defined(HAVE_QTBINDINGS) && defined(HAVE_QT) - gsi::constructor ("new", &new_view, gsi::arg ("parent"), gsi::arg ("editable", false), gsi::arg ("manager", (db::Manager *) 0, "nil"), gsi::arg ("options", (unsigned int) 0), - "@brief Creates a standalone view\n" - "\n" - "This constructor is for special purposes only. To create a view in the context of a main window, " - "use \\MainWindow#create_view and related methods.\n" - "\n" - "@param parent The parent widget in which to embed the view\n" - "@param editable True to make the view editable\n" - "@param manager The \\Manager object to enable undo/redo\n" - "@param options A combination of the values in the LV_... constants\n" - "\n" - "This constructor has been introduced in version 0.25.\n" - "It has been enhanced with the arguments in version 0.27.\n" - ) + -#endif - gsi::constructor ("new", &new_view2, gsi::arg ("editable", false), gsi::arg ("manager", (db::Manager *) 0, "nil"), gsi::arg ("options", (unsigned int) 0), - "@brief Creates a standalone view\n" - "\n" - "This constructor is for special purposes only. To create a view in the context of a main window, " - "use \\MainWindow#create_view and related methods.\n" - "\n" - "@param editable True to make the view editable\n" - "@param manager The \\Manager object to enable undo/redo\n" - "@param options A combination of the values in the LV_... constants\n" - "\n" - "This constructor has been introduced in version 0.25.\n" - "It has been enhanced with the arguments in version 0.27.\n" - ) + - gsi::constant ("LV_NoLayers", (unsigned int) lay::LayoutView::LV_NoLayers, + gsi::constant ("LV_NoLayers", (unsigned int) lay::LayoutViewBase::LV_NoLayers, "@brief With this option, no layers view will be provided (see \\layer_control_frame)\n" "Use this value with the constructor's 'options' argument.\n" "\n" "This constant has been introduced in version 0.27.\n" ) + - gsi::constant ("LV_NoHierarchyPanel", (unsigned int) lay::LayoutView::LV_NoHierarchyPanel, + gsi::constant ("LV_NoHierarchyPanel", (unsigned int) lay::LayoutViewBase::LV_NoHierarchyPanel, "@brief With this option, no cell hierarchy view will be provided (see \\hierarchy_control_frame)\n" "Use this value with the constructor's 'options' argument.\n" "\n" "This constant has been introduced in version 0.27.\n" ) + - gsi::constant ("LV_NoLibrariesView", (unsigned int) lay::LayoutView::LV_NoLibrariesView, + gsi::constant ("LV_NoLibrariesView", (unsigned int) lay::LayoutViewBase::LV_NoLibrariesView, "@brief With this option, no library view will be provided (see \\libraries_frame)\n" "Use this value with the constructor's 'options' argument.\n" "\n" "This constant has been introduced in version 0.27.\n" ) + - gsi::constant ("LV_NoEditorOptionsPanel", (unsigned int) lay::LayoutView::LV_NoEditorOptionsPanel, + gsi::constant ("LV_NoEditorOptionsPanel", (unsigned int) lay::LayoutViewBase::LV_NoEditorOptionsPanel, "@brief With this option, no editor options panel will be provided (see \\editor_options_frame)\n" "Use this value with the constructor's 'options' argument.\n" "\n" "This constant has been introduced in version 0.27.\n" ) + - gsi::constant ("LV_NoBookmarksView", (unsigned int) lay::LayoutView::LV_NoBookmarksView, + gsi::constant ("LV_NoBookmarksView", (unsigned int) lay::LayoutViewBase::LV_NoBookmarksView, "@brief With this option, no bookmarks view will be provided (see \\bookmarks_frame)\n" "Use this value with the constructor's 'options' argument.\n" "\n" "This constant has been introduced in version 0.27.\n" ) + - gsi::constant ("LV_Naked", (unsigned int) lay::LayoutView::LV_Naked, + gsi::constant ("LV_Naked", (unsigned int) lay::LayoutViewBase::LV_Naked, "@brief With this option, no separate views will be provided\n" "Use this value with the constructor's 'options' argument.\n" "This option is basically equivalent to using \\LV_NoLayers+\\LV_NoHierarchyPanel+\\LV_NoLibrariesView+\\LV_NoBookmarksView\n" "\n" "This constant has been introduced in version 0.27.\n" ) + - gsi::constant ("LV_NoZoom", (unsigned int) lay::LayoutView::LV_NoZoom, + gsi::constant ("LV_NoZoom", (unsigned int) lay::LayoutViewBase::LV_NoZoom, "@brief With this option, zooming is disabled\n" "Use this value with the constructor's 'options' argument.\n" "\n" "This constant has been introduced in version 0.27.\n" ) + - gsi::constant ("LV_NoGrid", (unsigned int) lay::LayoutView::LV_NoGrid, + gsi::constant ("LV_NoGrid", (unsigned int) lay::LayoutViewBase::LV_NoGrid, "@brief With this option, the grid background is not shown\n" "Use this value with the constructor's 'options' argument.\n" "\n" "This constant has been introduced in version 0.27.\n" ) + - gsi::constant ("LV_NoMove", (unsigned int) lay::LayoutView::LV_NoMove, + gsi::constant ("LV_NoMove", (unsigned int) lay::LayoutViewBase::LV_NoMove, "@brief With this option, move operations are not supported\n" "Use this value with the constructor's 'options' argument.\n" "\n" "This constant has been introduced in version 0.27.\n" ) + - gsi::constant ("LV_NoTracker", (unsigned int) lay::LayoutView::LV_NoTracker, + gsi::constant ("LV_NoTracker", (unsigned int) lay::LayoutViewBase::LV_NoTracker, "@brief With this option, mouse position tracking is not supported\n" "Use this value with the constructor's 'options' argument.\n" "This option is not useful currently as no mouse tracking support is provided.\n" "\n" "This constant has been introduced in version 0.27.\n" ) + - gsi::constant ("LV_NoSelection", (unsigned int) lay::LayoutView::LV_NoSelection, + gsi::constant ("LV_NoSelection", (unsigned int) lay::LayoutViewBase::LV_NoSelection, "@brief With this option, objects cannot be selected\n" "Use this value with the constructor's 'options' argument.\n" "\n" "This constant has been introduced in version 0.27.\n" ) + - gsi::constant ("LV_NoPlugins", (unsigned int) lay::LayoutView::LV_NoPlugins, + gsi::constant ("LV_NoPlugins", (unsigned int) lay::LayoutViewBase::LV_NoPlugins, "@brief With this option, all plugins are disabled\n" "Use this value with the constructor's 'options' argument.\n" "\n" "This constant has been introduced in version 0.27.\n" ) + - gsi::constant ("LV_NoServices", (unsigned int) lay::LayoutView::LV_NoServices, + gsi::constant ("LV_NoServices", (unsigned int) lay::LayoutViewBase::LV_NoServices, "@brief This option disables all services except the ones for pure viewing\n" "Use this value with the constructor's 'options' argument.\n" "With this option, all manipulation features are disabled, except zooming.\n" @@ -598,64 +548,26 @@ Class decl_LayoutView (QT_EXTERNAL_BASE (QWidget) "lay", "Layou "\n" "This constant has been introduced in version 0.27.\n" ) + -#if defined(HAVE_QTBINDINGS) - gsi::method ("layer_control_frame", static_cast (&lay::LayoutView::layer_control_frame), - "@brief Gets the layer control side widget\n" - "A 'side widget' is a widget attached to the view. It does not have a parent, so you can " - "embed it into a different context. Please note that with embedding through 'setParent' it will be " - "destroyed when your parent widget gets destroyed. It will be lost then to the view.\n" - "\n" - "The side widget can be configured through the views configuration interface.\n" - "\n" - "This method has been introduced in version 0.27\n" - ) + - gsi::method ("hierarchy_control_frame", static_cast (&lay::LayoutView::hierarchy_control_frame), - "@brief Gets the cell view (hierarchy view) side widget\n" - "For details about side widgets see \\layer_control_frame.\n" - "\n" - "This method has been introduced in version 0.27\n" - ) + - gsi::method ("libraries_frame", static_cast (&lay::LayoutView::libraries_frame), - "@brief Gets the library view side widget\n" - "For details about side widgets see \\layer_control_frame.\n" - "\n" - "This method has been introduced in version 0.27\n" - ) + - gsi::method ("bookmarks_frame", static_cast (&lay::LayoutView::bookmarks_frame), - "@brief Gets the bookmarks side widget\n" - "For details about side widgets see \\layer_control_frame.\n" - "\n" - "This method has been introduced in version 0.27\n" - ) + -#endif - gsi::method ("call_menu", static_cast (&lay::LayoutView::menu_activated), + gsi::method ("call_menu", static_cast (&lay::LayoutViewBase::menu_activated), "@brief Calls the menu item with the provided symbol.\n" "To obtain all symbols, use get_menu_symbols.\n" "\n" "This method has been introduced in version 0.27." ) + - gsi::method ("menu_symbols", &lay::LayoutView::menu_symbols, + gsi::method ("menu_symbols", &lay::LayoutViewBase::menu_symbols, "@brief Gets all available menu symbols (see \\call_menu).\n" "NOTE: currently this method delivers a superset of all available symbols. Depending on the context, no all symbols may trigger actual functionality.\n" "\n" "This method has been introduced in version 0.27." ) + -#if defined(HAVE_QT) - gsi::method ("current", &lay::LayoutView::current, - "@brief Returns the current view\n" - "The current view is the one that is shown in the current tab. Returns nil if no layout is loaded.\n" - "\n" - "This method has been introduced in version 0.23.\n" - ) + -#endif - gsi::method ("stop_redraw", static_cast (&lay::LayoutView::stop_redraw), + gsi::method ("stop_redraw", static_cast (&lay::LayoutViewBase::stop_redraw), "@brief Stops the redraw thread\n" "\n" "It is very important to stop the redraw thread before applying changes to the " "layout or the cell views and the LayoutView configuration. This is usually done automatically. " "For rare cases, where this is not the case, this method is provided.\n" ) + - gsi::method ("title=|#set_title", static_cast (&lay::LayoutView::set_title), gsi::arg ("title"), + gsi::method ("title=|#set_title", static_cast (&lay::LayoutViewBase::set_title), gsi::arg ("title"), "@brief Sets the title of the view\n" "\n" "@param title The title string to use\n" @@ -664,12 +576,12 @@ Class decl_LayoutView (QT_EXTERNAL_BASE (QWidget) "lay", "Layou "the specified title string. The title string can be reset with \\reset_title to " "the standard title again." ) + - gsi::method ("reset_title", static_cast (&lay::LayoutView::reset_title), + gsi::method ("reset_title", static_cast (&lay::LayoutViewBase::reset_title), "@brief Resets the title to the standard title\n" "\n" "See \\set_title and \\title for a description about how titles are handled." ) + - gsi::method ("title", static_cast (&lay::LayoutView::title), + gsi::method ("title", static_cast (&lay::LayoutViewBase::title), "@brief Returns the view's title string\n" "\n" "@return The title string\n" @@ -677,19 +589,19 @@ Class decl_LayoutView (QT_EXTERNAL_BASE (QWidget) "lay", "Layou "The title string is either a string composed of the file names loaded (in some " "\"readable\" manner) or a customized title string set by \\set_title." ) + - gsi::method ("save_layer_props", static_cast (&lay::LayoutView::save_layer_props), gsi::arg ("fn"), + gsi::method ("save_layer_props", static_cast (&lay::LayoutViewBase::save_layer_props), gsi::arg ("fn"), "@brief Saves the layer properties\n" "\n" "Save the layer properties to the file given in \"fn\"" ) + - gsi::method ("load_layer_props", static_cast (&lay::LayoutView::load_layer_props), gsi::arg ("fn"), + gsi::method ("load_layer_props", static_cast (&lay::LayoutViewBase::load_layer_props), gsi::arg ("fn"), "@brief Loads the layer properties\n" "\n" "@param fn The file name of the .lyp file to load\n" "\n" "Load the layer properties from the file given in \"fn\"" ) + - gsi::method ("load_layer_props", static_cast (&lay::LayoutView::load_layer_props), gsi::arg ("fn"), gsi::arg ("add_default"), + gsi::method ("load_layer_props", static_cast (&lay::LayoutViewBase::load_layer_props), gsi::arg ("fn"), gsi::arg ("add_default"), "@brief Loads the layer properties with options\n" "\n" "@param fn The file name of the .lyp file to load\n" @@ -701,7 +613,7 @@ Class decl_LayoutView (QT_EXTERNAL_BASE (QWidget) "lay", "Layou "\n" "This variant has been added on version 0.21." ) + - gsi::method ("load_layer_props", static_cast (&lay::LayoutView::load_layer_props), gsi::arg ("fn"), gsi::arg ("cv_index"), gsi::arg ("add_default"), + gsi::method ("load_layer_props", static_cast (&lay::LayoutViewBase::load_layer_props), gsi::arg ("fn"), gsi::arg ("cv_index"), gsi::arg ("add_default"), "@brief Loads the layer properties with options\n" "\n" "@param fn The file name of the .lyp file to load\n" @@ -719,7 +631,7 @@ Class decl_LayoutView (QT_EXTERNAL_BASE (QWidget) "lay", "Layou "\n" "This variant has been added on version 0.21." ) + - gsi::method ("min_hier_levels=", static_cast (&lay::LayoutView::set_min_hier_levels), gsi::arg ("level"), + gsi::method ("min_hier_levels=", static_cast (&lay::LayoutViewBase::set_min_hier_levels), gsi::arg ("level"), "@brief Sets the minimum hierarchy level at which to display geometries\n" "\n" "@param level The minimum level above which to display something\n" @@ -727,12 +639,12 @@ Class decl_LayoutView (QT_EXTERNAL_BASE (QWidget) "lay", "Layou "This methods allows setting the minimum hierarchy level above which to display geometries." "This method may cause a redraw if required." ) + - gsi::method ("min_hier_levels", static_cast (&lay::LayoutView::get_min_hier_levels), + gsi::method ("min_hier_levels", static_cast (&lay::LayoutViewBase::get_min_hier_levels), "@brief Returns the minimum hierarchy level at which to display geometries\n" "\n" "@return The minimum level at which to display geometries" ) + - gsi::method ("max_hier_levels=", static_cast (&lay::LayoutView::set_max_hier_levels), gsi::arg ("level"), + gsi::method ("max_hier_levels=", static_cast (&lay::LayoutViewBase::set_max_hier_levels), gsi::arg ("level"), "@brief Sets the maximum hierarchy level up to which to display geometries\n" "\n" "@param level The maximum level below which to display something\n" @@ -740,12 +652,12 @@ Class decl_LayoutView (QT_EXTERNAL_BASE (QWidget) "lay", "Layou "This methods allows setting the maximum hierarchy below which to display geometries." "This method may cause a redraw if required." ) + - gsi::method ("max_hier_levels", static_cast (&lay::LayoutView::get_max_hier_levels), + gsi::method ("max_hier_levels", static_cast (&lay::LayoutViewBase::get_max_hier_levels), "@brief Returns the maximum hierarchy level up to which to display geometries\n" "\n" "@return The maximum level up to which to display geometries" ) + - gsi::method ("enable_edits", static_cast (&lay::LayoutView::enable_edits), gsi::arg ("enable"), + gsi::method ("enable_edits", static_cast (&lay::LayoutViewBase::enable_edits), gsi::arg ("enable"), "@brief Enables or disables edits\n" "\n" "@param enable Enable edits if set to true\n" @@ -758,17 +670,17 @@ Class decl_LayoutView (QT_EXTERNAL_BASE (QWidget) "lay", "Layou "\n" "In 0.25, this method has been moved from MainWindow to LayoutView.\n" ) + - gsi::method ("is_editable?", static_cast (&lay::LayoutView::is_editable), + gsi::method ("is_editable?", static_cast (&lay::LayoutViewBase::is_editable), "@brief Returns true if the view is in editable mode\n" "\n" "This read-only attribute has been added in version 0.27.5.\n" ) + - gsi::method ("reload_layout", static_cast (&lay::LayoutView::reload_layout), gsi::arg ("cv"), + gsi::method ("reload_layout", static_cast (&lay::LayoutViewBase::reload_layout), gsi::arg ("cv"), "@brief Reloads the given cellview\n" "\n" "@param cv The index of the cellview to reload" ) + - gsi::method ("create_layout", static_cast (&lay::LayoutView::create_layout), gsi::arg ("add_cellview"), + gsi::method ("create_layout", static_cast (&lay::LayoutViewBase::create_layout), gsi::arg ("add_cellview"), "@brief Creates a new, empty layout\n" "\n" "The add_cellview parameter controls whether to create a new cellview (true)\n" @@ -778,7 +690,7 @@ Class decl_LayoutView (QT_EXTERNAL_BASE (QWidget) "lay", "Layou "\n" "@return The index of the cellview created.\n" ) + - gsi::method ("create_layout", static_cast (&lay::LayoutView::create_layout), gsi::arg ("tech"), gsi::arg ("add_cellview"), + gsi::method ("create_layout", static_cast (&lay::LayoutViewBase::create_layout), gsi::arg ("tech"), gsi::arg ("add_cellview"), "@brief Create a new, empty layout and associate it with the given technology\n" "\n" "The add_cellview parameter controls whether to create a new cellview (true)\n" @@ -788,7 +700,7 @@ Class decl_LayoutView (QT_EXTERNAL_BASE (QWidget) "lay", "Layou "\n" "This variant has been introduced in version 0.22.\n" ) + - gsi::method ("create_layout", static_cast (&lay::LayoutView::create_layout), gsi::arg ("tech"), gsi::arg ("add_cellview"), gsi::arg ("init_layers"), + gsi::method ("create_layout", static_cast (&lay::LayoutViewBase::create_layout), gsi::arg ("tech"), gsi::arg ("add_cellview"), gsi::arg ("init_layers"), "@brief Create a new, empty layout and associate it with the given technology\n" "\n" "The add_cellview parameter controls whether to create a new cellview (true)\n" @@ -846,12 +758,12 @@ Class decl_LayoutView (QT_EXTERNAL_BASE (QWidget) "lay", "Layou "\n" "This method has been introduced in version 0.22.\n" ) + - gsi::method ("erase_cellview", static_cast (&lay::LayoutView::erase_cellview), gsi::arg ("index"), + gsi::method ("erase_cellview", static_cast (&lay::LayoutViewBase::erase_cellview), gsi::arg ("index"), "@brief Erases the cellview with the given index\n" "\n" "This closes the given cellview and unloads the layout associated with it, unless referred to by another cellview." ) + - gsi::method ("rename_cellview", static_cast (&lay::LayoutView::rename_cellview), gsi::arg ("name"), gsi::arg ("index"), + gsi::method ("rename_cellview", static_cast (&lay::LayoutViewBase::rename_cellview), gsi::arg ("name"), gsi::arg ("index"), "@brief Renames the cellview with the given index\n" "\n" "If the name is not unique, a unique name will be constructed from the name given.\n" @@ -859,7 +771,7 @@ Class decl_LayoutView (QT_EXTERNAL_BASE (QWidget) "lay", "Layou "If a layout is shared between multiple cellviews (which may happen due to a clone of the layout view\n" "for example), all cellviews are renamed.\n" ) + - gsi::method ("load_layout", static_cast (&lay::LayoutView::load_layout), gsi::arg ("filename"), gsi::arg ("options"), gsi::arg ("technology"), gsi::arg ("add_cellview"), + gsi::method ("load_layout", static_cast (&lay::LayoutViewBase::load_layout), gsi::arg ("filename"), gsi::arg ("options"), gsi::arg ("technology"), gsi::arg ("add_cellview"), "@brief Loads a (new) file into the layout view with the given technology\n" "\n" "Loads the file given by the \"filename\" parameter and associates it with the given technology.\n" @@ -871,7 +783,7 @@ Class decl_LayoutView (QT_EXTERNAL_BASE (QWidget) "lay", "Layou "\n" "This version has been introduced in version 0.22.\n" ) + - gsi::method ("load_layout", static_cast (&lay::LayoutView::load_layout), gsi::arg ("filename"), gsi::arg ("options"), gsi::arg ("add_cellview"), + gsi::method ("load_layout", static_cast (&lay::LayoutViewBase::load_layout), gsi::arg ("filename"), gsi::arg ("options"), gsi::arg ("add_cellview"), "@brief Loads a (new) file into the layout view\n" "\n" "Loads the file given by the \"filename\" parameter.\n" @@ -883,7 +795,7 @@ Class decl_LayoutView (QT_EXTERNAL_BASE (QWidget) "lay", "Layou "\n" "This method has been introduced in version 0.18.\n" ) + - gsi::method ("load_layout", static_cast (&lay::LayoutView::load_layout), gsi::arg ("filename"), gsi::arg ("technology"), gsi::arg ("add_cellview"), + gsi::method ("load_layout", static_cast (&lay::LayoutViewBase::load_layout), gsi::arg ("filename"), gsi::arg ("technology"), gsi::arg ("add_cellview"), "@brief Loads a (new) file into the layout view with the given technology\n" "\n" "Loads the file given by the \"filename\" parameter and associates it with the given technology.\n" @@ -894,7 +806,7 @@ Class decl_LayoutView (QT_EXTERNAL_BASE (QWidget) "lay", "Layou "\n" "This version has been introduced in version 0.22.\n" ) + - gsi::method ("load_layout", static_cast (&lay::LayoutView::load_layout), gsi::arg ("filename"), gsi::arg ("add_cellview"), + gsi::method ("load_layout", static_cast (&lay::LayoutViewBase::load_layout), gsi::arg ("filename"), gsi::arg ("add_cellview"), "@brief Loads a (new) file into the layout view\n" "\n" "Loads the file given by the \"filename\" parameter.\n" @@ -903,7 +815,7 @@ Class decl_LayoutView (QT_EXTERNAL_BASE (QWidget) "lay", "Layou "\n" "@return The index of the cellview loaded.\n" ) + - gsi::method ("active_cellview", static_cast (&lay::LayoutView::active_cellview_ref), + gsi::method ("active_cellview", static_cast (&lay::LayoutViewBase::active_cellview_ref), "@brief Gets the active cellview (shown in hierarchy browser)\n" "\n" "This is a convenience method which is equivalent to cellview(active_cellview_index()).\n" @@ -912,10 +824,10 @@ Class decl_LayoutView (QT_EXTERNAL_BASE (QWidget) "lay", "Layou "Starting from version 0.25, the returned object can be manipulated which will have an immediate effect " "on the display." ) + - gsi::method ("active_cellview_index", static_cast (&lay::LayoutView::active_cellview_index), + gsi::method ("active_cellview_index", static_cast (&lay::LayoutViewBase::active_cellview_index), "@brief Gets the index of the active cellview (shown in hierarchy browser)\n" ) + - gsi::method ("active_setview_index=|#set_active_cellview_index", &lay::LayoutView::set_active_cellview_index, gsi::arg ("index"), + gsi::method ("active_setview_index=|#set_active_cellview_index", &lay::LayoutViewBase::set_active_cellview_index, gsi::arg ("index"), "@brief Makes the cellview with the given index the active one (shown in hierarchy browser)\n" "See \\active_cellview_index.\n" "\n" @@ -933,7 +845,7 @@ Class decl_LayoutView (QT_EXTERNAL_BASE (QWidget) "lay", "Layou "\n" "This method has be introduced in version 0.25.\n" ) + - gsi::method ("#get_current_cell_path", static_cast (&lay::LayoutView::get_current_cell_path), gsi::arg ("cv_index"), + gsi::method ("#get_current_cell_path", static_cast (&lay::LayoutViewBase::get_current_cell_path), gsi::arg ("cv_index"), "@brief Gets the cell path of the current cell\n" "\n" "The current cell is the one highlighted in the browser with the focus rectangle. The \n" @@ -944,7 +856,7 @@ Class decl_LayoutView (QT_EXTERNAL_BASE (QWidget) "lay", "Layou "\n" "This method is was deprecated in version 0.25 since from then, the \\CellView object can be used to obtain an manipulate the selected cell." ) + - gsi::method ("#set_current_cell_path", static_cast (&lay::LayoutView::set_current_cell_path), gsi::arg ("cv_index"), gsi::arg ("cell_path"), + gsi::method ("#set_current_cell_path", static_cast (&lay::LayoutViewBase::set_current_cell_path), gsi::arg ("cv_index"), gsi::arg ("cell_path"), "@brief Sets the path to the current cell\n" "\n" "The current cell is the one highlighted in the browser with the focus rectangle. The\n" @@ -956,10 +868,10 @@ Class decl_LayoutView (QT_EXTERNAL_BASE (QWidget) "lay", "Layou "\n" "This method is was deprecated in version 0.25 since from then, the \\CellView object can be used to obtain an manipulate the selected cell." ) + - gsi::method ("cellviews", static_cast (&lay::LayoutView::cellviews), + gsi::method ("cellviews", static_cast (&lay::LayoutViewBase::cellviews), "@brief Gets the number of cellviews\n" ) + - gsi::method ("cellview", static_cast (&lay::LayoutView::cellview_ref), gsi::arg ("cv_index"), + gsi::method ("cellview", static_cast (&lay::LayoutViewBase::cellview_ref), gsi::arg ("cv_index"), "@brief Gets the cellview object for a given index\n" "\n" "@param cv_index The cellview index for which to get the object for\n" @@ -967,43 +879,43 @@ Class decl_LayoutView (QT_EXTERNAL_BASE (QWidget) "lay", "Layou "Starting with version 0.25, this method returns a \\CellView object that can be manipulated to directly reflect " "any changes in the display." ) + - gsi::method ("zoom_fit", static_cast (&lay::LayoutView::zoom_fit), + gsi::method ("zoom_fit", static_cast (&lay::LayoutViewBase::zoom_fit), "@brief Fits the contents of the current view into the window" ) + - gsi::method ("zoom_fit_sel", static_cast (&lay::LayoutView::zoom_fit_sel), + gsi::method ("zoom_fit_sel", static_cast (&lay::LayoutViewBase::zoom_fit_sel), "@brief Fits the contents of the current selection into the window\n" "\n" "This method has been introduced in version 0.25.\n" ) + - gsi::method ("zoom_box", static_cast (&lay::LayoutView::zoom_box), gsi::arg ("box"), + gsi::method ("zoom_box", static_cast (&lay::LayoutViewBase::zoom_box), gsi::arg ("box"), "@brief Sets the viewport to the given box\n" "\n" "@param box The box to which to set the view in micron coordinates\n" ) + - gsi::method ("zoom_in", static_cast (&lay::LayoutView::zoom_in), + gsi::method ("zoom_in", static_cast (&lay::LayoutViewBase::zoom_in), "@brief Zooms in somewhat" ) + - gsi::method ("zoom_out", static_cast (&lay::LayoutView::zoom_out), + gsi::method ("zoom_out", static_cast (&lay::LayoutViewBase::zoom_out), "@brief Zooms out somewhat" ) + - gsi::method ("pan_up", static_cast (&lay::LayoutView::pan_up), + gsi::method ("pan_up", static_cast (&lay::LayoutViewBase::pan_up), "@brief Pans upward" ) + - gsi::method ("pan_down", static_cast (&lay::LayoutView::pan_down), + gsi::method ("pan_down", static_cast (&lay::LayoutViewBase::pan_down), "@brief Pans down" ) + - gsi::method ("pan_left", static_cast (&lay::LayoutView::pan_left), + gsi::method ("pan_left", static_cast (&lay::LayoutViewBase::pan_left), "@brief Pans to the left" ) + - gsi::method ("pan_right", static_cast (&lay::LayoutView::pan_right), + gsi::method ("pan_right", static_cast (&lay::LayoutViewBase::pan_right), "@brief Pans to the right" ) + - gsi::method ("pan_center", static_cast (&lay::LayoutView::pan_center), gsi::arg ("p"), + gsi::method ("pan_center", static_cast (&lay::LayoutViewBase::pan_center), gsi::arg ("p"), "@brief Pans to the given point\n" "\n" "The window is positioned such that \"p\" becomes the new center" ) + - gsi::method ("box", static_cast (&lay::LayoutView::box), + gsi::method ("box", static_cast (&lay::LayoutViewBase::box), "@brief Returns the displayed box in micron space" ) + gsi::method_ext ("viewport_trans", &viewport_trans, @@ -1021,22 +933,15 @@ Class decl_LayoutView (QT_EXTERNAL_BASE (QWidget) "lay", "Layou "@brief Return the viewport height in pixels\n" "This method was introduced in version 0.18.\n" ) + -#if defined(HAVE_QT) - gsi::method ("bookmark_view", static_cast (&lay::LayoutView::bookmark_view), gsi::arg ("name"), - "@brief Bookmarks the current view under the given name\n" - "\n" - "@param name The name under which to bookmark the current state" - ) + -#endif - gsi::method ("add_missing_layers", static_cast (&lay::LayoutView::add_missing_layers), + gsi::method ("add_missing_layers", static_cast (&lay::LayoutViewBase::add_missing_layers), "@brief Adds new layers to layer list\n" "This method was introduced in version 0.19.\n" ) + - gsi::method ("remove_unused_layers", static_cast (&lay::LayoutView::remove_unused_layers), + gsi::method ("remove_unused_layers", static_cast (&lay::LayoutViewBase::remove_unused_layers), "@brief Removes unused layers from layer list\n" "This method was introduced in version 0.19.\n" ) + - gsi::method ("init_layer_properties", (void (lay::LayoutView::*) (lay::LayerProperties &) const) &lay::LayoutView::init_layer_properties, gsi::arg ("props"), + gsi::method ("init_layer_properties", (void (lay::LayoutViewBase::*) (lay::LayerProperties &) const) &lay::LayoutViewBase::init_layer_properties, gsi::arg ("props"), "@brief Fills the layer properties for a new layer\n" "\n" "This method initializes a layer properties object's color and stipples according to " @@ -1047,24 +952,24 @@ Class decl_LayoutView (QT_EXTERNAL_BASE (QWidget) "lay", "Layou "\n" "@param props The layer properties object to initialize." ) + - gsi::method ("cancel", &lay::LayoutView::cancel, + gsi::method ("cancel", &lay::LayoutViewBase::cancel, "@brief Cancels all edit operations\n" "\n" "This method will stop all pending edit operations (i.e. drag and drop) and cancel the current " "selection. Calling this method is useful to ensure there are no potential interactions with the script's " "functionality.\n" ) + - gsi::method ("clear_selection", (void (lay::LayoutView::*) ()) &lay::LayoutView::clear_selection, + gsi::method ("clear_selection", (void (lay::LayoutViewBase::*) ()) &lay::LayoutViewBase::clear_selection, "@brief Clears the selection of all objects (shapes, annotations, images ...)\n" "\n" "This method has been introduced in version 0.26.2\n" ) + - gsi::method ("select_all", (void (lay::LayoutView::*) ()) &lay::LayoutView::select, + gsi::method ("select_all", (void (lay::LayoutViewBase::*) ()) &lay::LayoutViewBase::select, "@brief Selects all objects from the view\n" "\n" "This method has been introduced in version 0.27\n" ) + - gsi::method ("select_from", (void (lay::LayoutView::*) (const db::DPoint &, lay::Editable::SelectionMode)) &lay::LayoutView::select, gsi::arg ("point"), gsi::arg ("mode", lay::Editable::SelectionMode::Replace, "Replace"), + gsi::method ("select_from", (void (lay::LayoutViewBase::*) (const db::DPoint &, lay::Editable::SelectionMode)) &lay::LayoutViewBase::select, gsi::arg ("point"), gsi::arg ("mode", lay::Editable::SelectionMode::Replace, "Replace"), "@brief Selects the objects from a given point\n" "\n" "The mode indicates whether to add to the selection, replace the selection, remove from selection or invert the selected status of the objects " @@ -1072,7 +977,7 @@ Class decl_LayoutView (QT_EXTERNAL_BASE (QWidget) "lay", "Layou "\n" "This method has been introduced in version 0.27\n" ) + - gsi::method ("select_from", (void (lay::LayoutView::*) (const db::DBox &, lay::Editable::SelectionMode)) &lay::LayoutView::select, gsi::arg ("box"), gsi::arg ("mode", lay::Editable::SelectionMode::Replace, "Replace"), + gsi::method ("select_from", (void (lay::LayoutViewBase::*) (const db::DBox &, lay::Editable::SelectionMode)) &lay::LayoutViewBase::select, gsi::arg ("box"), gsi::arg ("mode", lay::Editable::SelectionMode::Replace, "Replace"), "@brief Selects the objects from a given box\n" "\n" "The mode indicates whether to add to the selection, replace the selection, remove from selection or invert the selected status of the objects " @@ -1080,12 +985,12 @@ Class decl_LayoutView (QT_EXTERNAL_BASE (QWidget) "lay", "Layou "\n" "This method has been introduced in version 0.27\n" ) + - gsi::method ("clear_transient_selection", static_cast (&lay::LayoutView::clear_transient_selection), + gsi::method ("clear_transient_selection", static_cast (&lay::LayoutViewBase::clear_transient_selection), "@brief Clears the transient selection (mouse-over hightlights) of all objects (shapes, annotations, images ...)\n" "\n" "This method has been introduced in version 0.26.2\n" ) + - gsi::method ("transient_to_selection", static_cast (&lay::LayoutView::transient_to_selection), + gsi::method ("transient_to_selection", static_cast (&lay::LayoutViewBase::transient_to_selection), "@brief Turns the transient selection into the actual selection\n" "\n" "The current selection is cleared before. All highlighted objects under the mouse will become selected. " @@ -1093,26 +998,26 @@ Class decl_LayoutView (QT_EXTERNAL_BASE (QWidget) "lay", "Layou "\n" "This method has been introduced in version 0.26.2\n" ) + - gsi::method ("selection_bbox", static_cast (&lay::LayoutView::selection_bbox), + gsi::method ("selection_bbox", static_cast (&lay::LayoutViewBase::selection_bbox), "@brief Returns the bounding box of the current selection\n" "\n" "This method has been introduced in version 0.26.2\n" ) + - gsi::method ("selection_size", (size_t (lay::LayoutView::*) ()) &lay::LayoutView::selection_size, + gsi::method ("selection_size", (size_t (lay::LayoutViewBase::*) ()) &lay::LayoutViewBase::selection_size, "@brief Returns the number of selected objects\n" "\n" "This method has been introduced in version 0.27\n" ) + - gsi::method ("has_selection?", (bool (lay::LayoutView::*) ()) &lay::LayoutView::has_selection, + gsi::method ("has_selection?", (bool (lay::LayoutViewBase::*) ()) &lay::LayoutViewBase::has_selection, "@brief Indicates whether any objects are selected\n" "\n" "This method has been introduced in version 0.27\n" ) + - gsi::method ("stop", static_cast (&lay::LayoutView::stop), + gsi::method ("stop", static_cast (&lay::LayoutViewBase::stop), "@brief Stops redraw thread and close any browsers\n" "This method usually does not need to be called explicitly. The redraw thread is stopped automatically." ) + - gsi::method ("#select_cell_path", (void (lay::LayoutView::*) (const lay::LayoutView::cell_path_type &, int)) &lay::LayoutView::select_cell, gsi::arg ("cell_index"), gsi::arg ("cv_index"), + gsi::method ("#select_cell_path", (void (lay::LayoutViewBase::*) (const lay::LayoutViewBase::cell_path_type &, int)) &lay::LayoutViewBase::select_cell, gsi::arg ("cell_index"), gsi::arg ("cv_index"), "@brief Selects a cell by cell index for a certain cell view\n" "\n" "Select the current (top) cell by specifying a cell indexand the cellview index for which this cell should become the currently shown one. The path to the cell is constructed by " @@ -1122,7 +1027,7 @@ Class decl_LayoutView (QT_EXTERNAL_BASE (QWidget) "lay", "Layou "\n" "This method is was deprecated in version 0.25 since from then, the \\CellView object can be used to obtain an manipulate the selected cell." ) + - gsi::method ("#select_cell", (void (lay::LayoutView::*) (lay::LayoutView::cell_index_type, int)) &lay::LayoutView::select_cell, gsi::arg ("cell_index"), gsi::arg ("cv_index"), + gsi::method ("#select_cell", (void (lay::LayoutViewBase::*) (lay::LayoutViewBase::cell_index_type, int)) &lay::LayoutViewBase::select_cell, gsi::arg ("cell_index"), gsi::arg ("cv_index"), "@brief Selects a cell by index for a certain cell view\n" "\n" "Select the current (top) cell by specifying a path (a list of cell indices from top to " @@ -1133,7 +1038,7 @@ Class decl_LayoutView (QT_EXTERNAL_BASE (QWidget) "lay", "Layou "\n" "This method is was deprecated in version 0.25 since from then, the \\CellView object can be used to obtain an manipulate the selected cell." ) + - gsi::method ("descend", static_cast &, int)> (&lay::LayoutView::descend), gsi::arg ("path"), gsi::arg ("index"), + gsi::method ("descend", static_cast &, int)> (&lay::LayoutViewBase::descend), gsi::arg ("path"), gsi::arg ("index"), "@brief Descends further into the hierarchy.\n" "\n" "Adds the given path (given as an array of InstElement objects) to the specific path of the " @@ -1143,33 +1048,33 @@ Class decl_LayoutView (QT_EXTERNAL_BASE (QWidget) "lay", "Layou "The path is assumed to originate from the current cell and contain specific instances sorted from " "top to bottom." ) + - gsi::method ("ascend", static_cast (&lay::LayoutView::ascend), gsi::arg ("index"), + gsi::method ("ascend", static_cast (&lay::LayoutViewBase::ascend), gsi::arg ("index"), "@brief Ascends upwards in the hierarchy.\n" "\n" "Removes one element from the specific path of the cellview with the given index. Returns the element " "removed." ) + - gsi::method ("is_cell_hidden?", static_cast (&lay::LayoutView::is_cell_hidden), gsi::arg ("cell_index"), gsi::arg ("cv_index"), + gsi::method ("is_cell_hidden?", static_cast (&lay::LayoutViewBase::is_cell_hidden), gsi::arg ("cell_index"), gsi::arg ("cv_index"), "@brief Returns true, if the cell is hidden\n" "\n" "@return True, if the cell with \"cell_index\" is hidden for the cellview \"cv_index\"" ) + - gsi::method ("hide_cell", static_cast (&lay::LayoutView::hide_cell), gsi::arg ("cell_index"), gsi::arg ("cv_index"), + gsi::method ("hide_cell", static_cast (&lay::LayoutViewBase::hide_cell), gsi::arg ("cell_index"), gsi::arg ("cv_index"), "@brief Hides the given cell for the given cellview\n" ) + - gsi::method ("show_cell", static_cast (&lay::LayoutView::show_cell), gsi::arg ("cell_index"), gsi::arg ("cv_index"), + gsi::method ("show_cell", static_cast (&lay::LayoutViewBase::show_cell), gsi::arg ("cell_index"), gsi::arg ("cv_index"), "@brief Shows the given cell for the given cellview (cancel effect of \\hide_cell)\n" ) + - gsi::method ("show_all_cells", (void (lay::LayoutView::*) ()) &lay::LayoutView::show_all_cells, + gsi::method ("show_all_cells", (void (lay::LayoutViewBase::*) ()) &lay::LayoutViewBase::show_all_cells, "@brief Makes all cells shown (cancel effects of \\hide_cell)" ) + - gsi::method ("show_all_cells", (void (lay::LayoutView::*) (int)) &lay::LayoutView::show_all_cells, gsi::arg ("cv_index"), + gsi::method ("show_all_cells", (void (lay::LayoutViewBase::*) (int)) &lay::LayoutViewBase::show_all_cells, gsi::arg ("cv_index"), "@brief Makes all cells shown (cancel effects of \\hide_cell) for the specified cell view\n" "Unlike \\show_all_cells, this method will only clear the hidden flag on the cell view selected by \\cv_index.\n" "\n" "This variant has been added in version 0.25." ) + - gsi::method ("update_content", static_cast (&lay::LayoutView::force_update_content), + gsi::method ("update_content", static_cast (&lay::LayoutViewBase::force_update_content), "@brief Updates the layout view to the current state\n" "\n" "This method triggers an update of the hierarchy tree and layer view tree. Usually, this " @@ -1178,26 +1083,26 @@ Class decl_LayoutView (QT_EXTERNAL_BASE (QWidget) "lay", "Layou "Currently, this method should be called however, after the layer view tree has been changed by " "the \\insert_layer, \\replace_layer_node or \\delete_layer methods.\n" ) + - gsi::method ("max_hier", static_cast (&lay::LayoutView::max_hier), + gsi::method ("max_hier", static_cast (&lay::LayoutViewBase::max_hier), "@brief Selects all hierarchy levels available\n" "\n" "Show the layout in full depth down to the deepest level of hierarchy. " "This method may cause a redraw." ) + - gsi::method ("resize", static_cast (&lay::LayoutView::resize), + gsi::method ("resize", static_cast (&lay::LayoutViewBase::resize), "@brief Resizes the layout view to the given dimension\n" "\n" "This method has been made available in all builds in 0.28.\n" ) + #if defined(HAVE_QT) && defined(HAVE_QTBINDINGS) - gsi::method ("get_screenshot", static_cast (&lay::LayoutView::get_screenshot), + gsi::method ("get_screenshot", static_cast (&lay::LayoutViewBase::get_screenshot), "@brief Gets a screenshot as a \\QImage\n" "\n" "Getting the image requires the drawing to be complete. Ideally, synchronous mode is switched on " "for the application to guarantee this condition. The image will have the size of the viewport " "showing the current layout." ) + - gsi::method ("get_image", static_cast (&lay::LayoutView::get_image), gsi::arg ("width"), gsi::arg ("height"), + gsi::method ("get_image", static_cast (&lay::LayoutViewBase::get_image), gsi::arg ("width"), gsi::arg ("height"), "@brief Gets the layout image as a \\QImage\n" "\n" "@param width The width of the image to render in pixel.\n" @@ -1224,7 +1129,7 @@ Class decl_LayoutView (QT_EXTERNAL_BASE (QWidget) "lay", "Layou "This method has been introduced in 0.23.10.\n" ) + #endif - gsi::method ("get_screenshot_pixels", static_cast (&lay::LayoutView::get_screenshot_pb), + gsi::method ("get_screenshot_pixels", static_cast (&lay::LayoutViewBase::get_screenshot_pb), "@brief Gets a screenshot as a \\PixelBuffer\n" "\n" "Getting the image requires the drawing to be complete. Ideally, synchronous mode is switched on " @@ -1233,7 +1138,7 @@ Class decl_LayoutView (QT_EXTERNAL_BASE (QWidget) "lay", "Layou "\n" "This method has been introduced in 0.28.\n" ) + - gsi::method ("get_pixels", static_cast (&lay::LayoutView::get_pixels), gsi::arg ("width"), gsi::arg ("height"), + gsi::method ("get_pixels", static_cast (&lay::LayoutViewBase::get_pixels), gsi::arg ("width"), gsi::arg ("height"), "@brief Gets the layout image as a \\PixelBuffer\n" "\n" "@param width The width of the image to render in pixel.\n" @@ -1273,7 +1178,7 @@ Class decl_LayoutView (QT_EXTERNAL_BASE (QWidget) "lay", "Layou "\n" "This method has been introduced in 0.28.\n" ) + - gsi::method ("save_screenshot", static_cast (&lay::LayoutView::save_screenshot), gsi::arg ("filename"), + gsi::method ("save_screenshot", static_cast (&lay::LayoutViewBase::save_screenshot), gsi::arg ("filename"), "@brief Saves a screenshot to the given file\n" "\n" "@param filename The file to which to write the screenshot to.\n" @@ -1283,7 +1188,7 @@ Class decl_LayoutView (QT_EXTERNAL_BASE (QWidget) "lay", "Layou "for the application to guarantee this condition. The image will have the size of the viewport " "showing the current layout." ) + - gsi::method ("save_image", static_cast (&lay::LayoutView::save_image), gsi::arg ("filename"), gsi::arg ("width"), gsi::arg ("height"), + gsi::method ("save_image", static_cast (&lay::LayoutViewBase::save_image), gsi::arg ("filename"), gsi::arg ("width"), gsi::arg ("height"), "@brief Saves the layout as an image to the given file\n" "\n" "@param filename The file to which to write the screenshot to.\n" @@ -1344,13 +1249,13 @@ Class decl_LayoutView (QT_EXTERNAL_BASE (QWidget) "lay", "Layou "If the file name ends with a suffix \".gz\" or \".gzip\", the file is compressed with the zlib " "algorithm.\n" ) + - gsi::method ("set_layer_properties", static_cast (&lay::LayoutView::set_properties), gsi::arg ("iter"), gsi::arg ("props"), + gsi::method ("set_layer_properties", static_cast (&lay::LayoutViewBase::set_properties), gsi::arg ("iter"), gsi::arg ("props"), "@brief Sets the layer properties of the layer pointed to by the iterator\n" "\n" "This method replaces the layer properties of the element pointed to by \"iter\" by the properties " "given by \"props\". It will not change the hierarchy but just the properties of the given node." ) + - gsi::method ("set_layer_properties", static_cast (&lay::LayoutView::set_properties), gsi::arg ("index"), gsi::arg ("iter"), gsi::arg ("props"), + gsi::method ("set_layer_properties", static_cast (&lay::LayoutViewBase::set_properties), gsi::arg ("index"), gsi::arg ("iter"), gsi::arg ("props"), "@brief Sets the layer properties of the layer pointed to by the iterator\n" "\n" "This method replaces the layer properties of the element pointed to by \"iter\" by the properties " @@ -1358,7 +1263,7 @@ Class decl_LayoutView (QT_EXTERNAL_BASE (QWidget) "lay", "Layou "This version addresses a specific list in a multi-tab layer properties arrangement with the \"index\" parameter. " "This method has been introduced in version 0.21.\n" ) + - gsi::method ("expand_layer_properties", (void (lay::LayoutView::*) ()) &lay::LayoutView::expand_properties, + gsi::method ("expand_layer_properties", (void (lay::LayoutViewBase::*) ()) &lay::LayoutViewBase::expand_properties, "@brief Expands the layer properties for all tabs\n" "\n" "This method will expand all wildcard specifications in the layer properties by iterating over the specified objects (i.e. layers, cellviews) and " @@ -1366,7 +1271,7 @@ Class decl_LayoutView (QT_EXTERNAL_BASE (QWidget) "lay", "Layou "\n" "This method was introduced in version 0.21.\n" ) + - gsi::method ("expand_layer_properties", (void (lay::LayoutView::*) (unsigned int)) &lay::LayoutView::expand_properties, gsi::arg ("index"), + gsi::method ("expand_layer_properties", (void (lay::LayoutViewBase::*) (unsigned int)) &lay::LayoutViewBase::expand_properties, gsi::arg ("index"), "@brief Expands the layer properties for the given tab\n" "\n" "This method will expand all wildcard specifications in the layer properties by iterating over the specified objects (i.e. layers, cellviews) and " @@ -1431,13 +1336,13 @@ Class decl_LayoutView (QT_EXTERNAL_BASE (QWidget) "lay", "Layou "This version addresses a specific list in a multi-tab layer properties arrangement with the \"index\" parameter. " "This method has been introduced in version 0.22.\n" ) + - gsi::method ("delete_layer", (void (lay::LayoutView::*) (lay::LayerPropertiesConstIterator &iter)) &lay::LayoutView::delete_layer, gsi::arg ("iter"), + gsi::method ("delete_layer", (void (lay::LayoutViewBase::*) (lay::LayerPropertiesConstIterator &iter)) &lay::LayoutViewBase::delete_layer, gsi::arg ("iter"), "@brief Deletes the layer properties node specified by the iterator\n" "\n" "This method deletes the object that the iterator points to and invalidates\n" "the iterator since the object that the iterator points to is no longer valid.\n" ) + - gsi::method ("delete_layer", (void (lay::LayoutView::*) (unsigned int index, lay::LayerPropertiesConstIterator &iter)) &lay::LayoutView::delete_layer, gsi::arg ("index"), gsi::arg ("iter"), + gsi::method ("delete_layer", (void (lay::LayoutViewBase::*) (unsigned int index, lay::LayerPropertiesConstIterator &iter)) &lay::LayoutViewBase::delete_layer, gsi::arg ("index"), gsi::arg ("iter"), "@brief Deletes the layer properties node specified by the iterator\n" "\n" "This method deletes the object that the iterator points to and invalidates\n" @@ -1453,7 +1358,7 @@ Class decl_LayoutView (QT_EXTERNAL_BASE (QWidget) "lay", "Layou "apply changes to the layer settings or even the hierarchy of layers:\n" "\n" "@code\n" - "RBA::LayoutView::current.each_layer do |lref|\n" + "RBA::LayoutViewBase::current.each_layer do |lref|\n" " # lref is a RBA::LayerPropertiesNodeRef object\n" " lref.visible = false\n" "end\n" @@ -1470,7 +1375,7 @@ Class decl_LayoutView (QT_EXTERNAL_BASE (QWidget) "lay", "Layou "\n" "This method was introduced in version 0.25." ) + - gsi::method ("begin_layers", (lay::LayerPropertiesConstIterator (lay::LayoutView::*) () const) &lay::LayoutView::begin_layers, + gsi::method ("begin_layers", (lay::LayerPropertiesConstIterator (lay::LayoutViewBase::*) () const) &lay::LayoutViewBase::begin_layers, "@brief Begin iterator for the layers\n" "\n" "This iterator delivers the layers of this view, either in a recursive or non-recursive\n" @@ -1481,11 +1386,11 @@ Class decl_LayoutView (QT_EXTERNAL_BASE (QWidget) "lay", "Layou "Starting from version 0.25, an alternative solution is provided with 'each_layer' which is based on the " "\\LayerPropertiesNodeRef class." ) + - gsi::method ("end_layers", (lay::LayerPropertiesConstIterator (lay::LayoutView::*) () const) &lay::LayoutView::end_layers, + gsi::method ("end_layers", (lay::LayerPropertiesConstIterator (lay::LayoutViewBase::*) () const) &lay::LayoutViewBase::end_layers, "@brief End iterator for the layers\n" "See \\begin_layers for a description about this iterator\n" ) + - gsi::method ("begin_layers", (lay::LayerPropertiesConstIterator (lay::LayoutView::*) (unsigned int index) const) &lay::LayoutView::begin_layers, gsi::arg ("index"), + gsi::method ("begin_layers", (lay::LayerPropertiesConstIterator (lay::LayoutViewBase::*) (unsigned int index) const) &lay::LayoutViewBase::begin_layers, gsi::arg ("index"), "@brief Begin iterator for the layers\n" "\n" "This iterator delivers the layers of this view, either in a recursive or non-recursive\n" @@ -1495,44 +1400,44 @@ Class decl_LayoutView (QT_EXTERNAL_BASE (QWidget) "lay", "Layou "This version addresses a specific list in a multi-tab layer properties arrangement with the \"index\" parameter. " "This method has been introduced in version 0.21.\n" ) + - gsi::method ("end_layers", (lay::LayerPropertiesConstIterator (lay::LayoutView::*) (unsigned int index) const) &lay::LayoutView::end_layers, gsi::arg ("index"), + gsi::method ("end_layers", (lay::LayerPropertiesConstIterator (lay::LayoutViewBase::*) (unsigned int index) const) &lay::LayoutViewBase::end_layers, gsi::arg ("index"), "@brief End iterator for the layers\n" "See \\begin_layers for a description about this iterator\n" "This version addresses a specific list in a multi-tab layer properties arrangement with the \"index\" parameter. " "This method has been introduced in version 0.21.\n" ) + - gsi::method ("clear_layers", (void (lay::LayoutView::*) ()) &lay::LayoutView::clear_layers, + gsi::method ("clear_layers", (void (lay::LayoutViewBase::*) ()) &lay::LayoutViewBase::clear_layers, "@brief Clears all layers\n" ) + - gsi::method ("clear_layers", (void (lay::LayoutView::*) (unsigned int index)) &lay::LayoutView::clear_layers, gsi::arg ("index"), + gsi::method ("clear_layers", (void (lay::LayoutViewBase::*) (unsigned int index)) &lay::LayoutViewBase::clear_layers, gsi::arg ("index"), "@brief Clears all layers for the given layer properties list\n" "This version addresses a specific list in a multi-tab layer properties arrangement with the \"index\" parameter. " "This method has been introduced in version 0.21.\n" ) + - gsi::method ("delete_layer_list", (void (lay::LayoutView::*) (unsigned int index)) &lay::LayoutView::delete_layer_list, gsi::arg ("index"), + gsi::method ("delete_layer_list", (void (lay::LayoutViewBase::*) (unsigned int index)) &lay::LayoutViewBase::delete_layer_list, gsi::arg ("index"), "@brief Deletes the given properties list\n" "At least one layer properties list must remain. This method may change the current properties list.\n" "This method has been introduced in version 0.21.\n" ) + - gsi::method ("insert_layer_list", (void (lay::LayoutView::*) (unsigned int index)) &lay::LayoutView::insert_layer_list, gsi::arg ("index"), + gsi::method ("insert_layer_list", (void (lay::LayoutViewBase::*) (unsigned int index)) &lay::LayoutViewBase::insert_layer_list, gsi::arg ("index"), "@brief Inserts a new layer properties list at the given index\n" "This method inserts a new tab at the given position. The current layer properties list will be changed to " "the new list.\n" "This method has been introduced in version 0.21.\n" ) + - gsi::method ("num_layer_lists", static_cast (&lay::LayoutView::layer_lists), + gsi::method ("num_layer_lists", static_cast (&lay::LayoutViewBase::layer_lists), "@brief Gets the number of layer properties tabs present\n" "This method has been introduced in version 0.23.\n" ) + - gsi::method ("current_layer_list", static_cast (&lay::LayoutView::current_layer_list), + gsi::method ("current_layer_list", static_cast (&lay::LayoutViewBase::current_layer_list), "@brief Gets the index of the currently selected layer properties tab\n" "This method has been introduced in version 0.21.\n" ) + - gsi::method ("current_layer_list=|#set_current_layer_list", static_cast (&lay::LayoutView::set_current_layer_list), gsi::arg ("index"), + gsi::method ("current_layer_list=|#set_current_layer_list", static_cast (&lay::LayoutViewBase::set_current_layer_list), gsi::arg ("index"), "@brief Sets the index of the currently selected layer properties tab\n" "This method has been introduced in version 0.21.\n" ) + - gsi::method ("rename_layer_list", static_cast (&lay::LayoutView::rename_properties), gsi::arg ("index"), gsi::arg ("name"), + gsi::method ("rename_layer_list", static_cast (&lay::LayoutViewBase::rename_properties), gsi::arg ("index"), gsi::arg ("name"), "@brief Sets the title of the given layer properties tab\n" "This method has been introduced in version 0.21.\n" ) + @@ -1622,34 +1527,34 @@ Class decl_LayoutView (QT_EXTERNAL_BASE (QWidget) "lay", "Layou "\n" "This method has been introduced in version 0.25." ) + - gsi::method ("current_layer", static_cast (&lay::LayoutView::current_layer), + gsi::method ("current_layer", static_cast (&lay::LayoutViewBase::current_layer), "@brief Gets the current layer view\n" "\n" "Returns the \\LayerPropertiesIterator pointing to the current layer view (the one that has the focus). " "If no layer view is active currently, a null iterator is returned.\n" ) + - gsi::method ("current_layer=", static_cast (&lay::LayoutView::set_current_layer), gsi::arg ("iter"), + gsi::method ("current_layer=", static_cast (&lay::LayoutViewBase::set_current_layer), gsi::arg ("iter"), "@brief Sets the current layer view\n" "\n" "Specifies an \\LayerPropertiesIterator pointing to the new current layer view.\n" "\n" "This method has been introduced in version 0.23.\n" ) + - gsi::method ("selected_layers", static_cast (lay::LayoutView::*) () const> (&lay::LayoutView::selected_layers), + gsi::method ("selected_layers", static_cast (lay::LayoutViewBase::*) () const> (&lay::LayoutViewBase::selected_layers), "@brief Gets the selected layers\n" "\n" "Returns an array of \\LayerPropertiesIterator objects pointing to the currently selected layers. " "If no layer view is selected currently, an empty array is returned.\n" ) + #if !defined(HAVE_QT) - gsi::event ("on_image_updated_event", static_cast (&lay::LayoutView::image_updated_event), + gsi::event ("on_image_updated_event", static_cast (&lay::LayoutViewBase::image_updated_event), "@brief An event indicating that the image (\"screenshot\") was updated\n" "\n" "This event is triggered when calling \\timer." "\n" "This event has been introduced in version 0.28." ) + - gsi::event ("on_drawing_finished_event", static_cast (&lay::LayoutView::drawing_finished_event), + gsi::event ("on_drawing_finished_event", static_cast (&lay::LayoutViewBase::drawing_finished_event), "@brief An event indicating that the image is fully drawn\n" "\n" "This event is triggered when calling \\timer. " @@ -1657,7 +1562,7 @@ Class decl_LayoutView (QT_EXTERNAL_BASE (QWidget) "lay", "Layou "\n" "This event has been introduced in version 0.28." ) + - gsi::method ("timer", static_cast (&lay::LayoutView::timer), + gsi::method ("timer", static_cast (&lay::LayoutViewBase::timer), "@brief A callback required to be called regularily in the non-Qt case.\n" "\n" "This callback eventually implements the event loop in the non-Qt case. The main task " @@ -1669,7 +1574,7 @@ Class decl_LayoutView (QT_EXTERNAL_BASE (QWidget) "lay", "Layou "This method has been introduced in version 0.28." ) + #endif - gsi::event ("on_active_cellview_changed", static_cast (&lay::LayoutView::active_cellview_changed_event), + gsi::event ("on_active_cellview_changed", static_cast (&lay::LayoutViewBase::active_cellview_changed_event), "@brief An event indicating that the active cellview has changed\n" "\n" "If the active cellview is changed by selecting a new one from the drop-down list, this event is triggered.\n" @@ -1678,7 +1583,7 @@ Class decl_LayoutView (QT_EXTERNAL_BASE (QWidget) "lay", "Layou "Before version 0.25 this event was based on the observer pattern obsolete now. The corresponding methods " "(add_active_cellview_changed/remove_active_cellview_changed) have been removed in 0.25.\n" ) + - gsi::event ("on_cellviews_changed", static_cast (&lay::LayoutView::cellviews_changed_event), + gsi::event ("on_cellviews_changed", static_cast (&lay::LayoutViewBase::cellviews_changed_event), "@brief An event indicating that the cellview collection has changed\n" "\n" "If new cellviews are added or cellviews are removed, this event is triggered.\n" @@ -1687,7 +1592,7 @@ Class decl_LayoutView (QT_EXTERNAL_BASE (QWidget) "lay", "Layou "Before version 0.25 this event was based on the observer pattern obsolete now. The corresponding methods " "(add_cellview_list_observer/remove_cellview_list_observer) have been removed in 0.25.\n" ) + - gsi::event ("on_cellview_changed", static_cast (lay::LayoutView::*)> (&lay::LayoutView::cellview_changed_event), gsi::arg ("cellview_index"), + gsi::event ("on_cellview_changed", static_cast (lay::LayoutViewBase::*)> (&lay::LayoutViewBase::cellview_changed_event), gsi::arg ("cellview_index"), "@brief An event indicating that a cellview has changed\n" "\n" "If a cellview is modified, this event is triggered.\n" @@ -1697,7 +1602,7 @@ Class decl_LayoutView (QT_EXTERNAL_BASE (QWidget) "lay", "Layou "Before version 0.25 this event was based on the observer pattern obsolete now. The corresponding methods " "(add_cellview_observer/remove_cellview_observer) have been removed in 0.25.\n" ) + - gsi::event ("on_file_open", static_cast (&lay::LayoutView::file_open_event), + gsi::event ("on_file_open", static_cast (&lay::LayoutViewBase::file_open_event), "@brief An event indicating that a file was opened\n" "\n" "If a file is loaded, this event is triggered.\n" @@ -1707,26 +1612,7 @@ Class decl_LayoutView (QT_EXTERNAL_BASE (QWidget) "lay", "Layou "Before version 0.25 this event was based on the observer pattern obsolete now. The corresponding methods " "(add_file_open_observer/remove_file_open_observer) have been removed in 0.25.\n" ) + -#if defined(HAVE_QT) - gsi::event ("on_close", static_cast (&lay::LayoutView::close_event), - "@brief A event indicating that the view is about to close\n" - "\n" - "This event is triggered when the view is going to be closed entirely.\n" - "\n" - "It has been added in version 0.25." - ) + - gsi::event ("on_show", static_cast (&lay::LayoutView::show_event), - "@brief A event indicating that the view is going to become visible\n" - "\n" - "It has been added in version 0.25." - ) + - gsi::event ("on_hide", static_cast (&lay::LayoutView::hide_event), - "@brief A event indicating that the view is going to become invisible\n" - "\n" - "It has been added in version 0.25." - ) + -#endif - gsi::event ("on_viewport_changed", static_cast (&lay::LayoutView::viewport_changed_event), + gsi::event ("on_viewport_changed", static_cast (&lay::LayoutViewBase::viewport_changed_event), "@brief An event indicating that the viewport (the visible rectangle) has changed\n" "\n" "This event is triggered after a new display rectangle was chosen - for example, because the user " @@ -1735,7 +1621,7 @@ Class decl_LayoutView (QT_EXTERNAL_BASE (QWidget) "lay", "Layou "Before version 0.25 this event was based on the observer pattern obsolete now. The corresponding methods " "(add_viewport_changed_observer/remove_viewport_changed_observer) have been removed in 0.25.\n" ) + - gsi::event ("on_layer_list_changed", static_cast (lay::LayoutView::*)> (&lay::LayoutView::layer_list_changed_event), gsi::arg ("flags"), + gsi::event ("on_layer_list_changed", static_cast (lay::LayoutViewBase::*)> (&lay::LayoutViewBase::layer_list_changed_event), gsi::arg ("flags"), "@brief An event indicating that the layer list has changed\n" "\n" "This event is triggered after the layer list has changed it's configuration.\n" @@ -1746,7 +1632,7 @@ Class decl_LayoutView (QT_EXTERNAL_BASE (QWidget) "lay", "Layou "Before version 0.25 this event was based on the observer pattern obsolete now. The corresponding methods " "(add_layer_list_observer/remove_layer_list_observer) have been removed in 0.25.\n" ) + - gsi::event ("on_layer_list_inserted", static_cast (lay::LayoutView::*)> (&lay::LayoutView::layer_list_inserted_event), gsi::arg ("index"), + gsi::event ("on_layer_list_inserted", static_cast (lay::LayoutViewBase::*)> (&lay::LayoutViewBase::layer_list_inserted_event), gsi::arg ("index"), "@brief An event indicating that a layer list (a tab) has been inserted\n" "@param index The index of the layer list that was inserted\n" "\n" @@ -1754,7 +1640,7 @@ Class decl_LayoutView (QT_EXTERNAL_BASE (QWidget) "lay", "Layou "\n" "This event was introduced in version 0.25.\n" ) + - gsi::event ("on_layer_list_deleted", static_cast (lay::LayoutView::*)> (&lay::LayoutView::layer_list_deleted_event), gsi::arg ("index"), + gsi::event ("on_layer_list_deleted", static_cast (lay::LayoutViewBase::*)> (&lay::LayoutViewBase::layer_list_deleted_event), gsi::arg ("index"), "@brief An event indicating that a layer list (a tab) has been removed\n" "@param index The index of the layer list that was removed\n" "\n" @@ -1762,7 +1648,7 @@ Class decl_LayoutView (QT_EXTERNAL_BASE (QWidget) "lay", "Layou "\n" "This event was introduced in version 0.25.\n" ) + - gsi::event ("on_current_layer_list_changed", static_cast (lay::LayoutView::*)> (&lay::LayoutView::current_layer_list_changed_event), gsi::arg ("index"), + gsi::event ("on_current_layer_list_changed", static_cast (lay::LayoutViewBase::*)> (&lay::LayoutViewBase::current_layer_list_changed_event), gsi::arg ("index"), "@brief An event indicating the current layer list (the selected tab) has changed\n" "@param index The index of the new current layer list\n" "\n" @@ -1770,7 +1656,7 @@ Class decl_LayoutView (QT_EXTERNAL_BASE (QWidget) "lay", "Layou "\n" "This event was introduced in version 0.25.\n" ) + - gsi::event ("on_cell_visibility_changed", static_cast (&lay::LayoutView::cell_visibility_changed_event), + gsi::event ("on_cell_visibility_changed", static_cast (&lay::LayoutViewBase::cell_visibility_changed_event), "@brief An event indicating that the visibility of one or more cells has changed\n" "\n" "This event is triggered after the visibility of one or more cells has changed.\n" @@ -1780,7 +1666,7 @@ Class decl_LayoutView (QT_EXTERNAL_BASE (QWidget) "lay", "Layou ) + // HINT: the cast is important to direct GSI to the LayoutView member rather than the // Editables member (in which case we get a segmentation violation ..) - gsi::event ("on_transient_selection_changed", (tl::Event (lay::LayoutView::*)) &lay::LayoutView::transient_selection_changed_event, + gsi::event ("on_transient_selection_changed", (tl::Event (lay::LayoutViewBase::*)) &lay::LayoutViewBase::transient_selection_changed_event, "@brief An event that is triggered if the transient selection is changed\n" "\n" "If the transient selection is changed, this event is triggered.\n" @@ -1790,33 +1676,33 @@ Class decl_LayoutView (QT_EXTERNAL_BASE (QWidget) "lay", "Layou ) + // HINT: the cast is important to direct GSI to the LayoutView method rather than the // Editables method (in which case we get a segmentation violation ..) - gsi::event ("on_selection_changed", (tl::Event (lay::LayoutView::*)) &lay::LayoutView::selection_changed_event, + gsi::event ("on_selection_changed", (tl::Event (lay::LayoutViewBase::*)) &lay::LayoutViewBase::selection_changed_event, "@brief An event that is triggered if the selection is changed\n" "\n" "If the selection changed, this event is triggered.\n" "\n" "This event was translated from the Observer pattern to an event in version 0.25." ) + - gsi::event ("on_rdb_list_changed", static_cast (&lay::LayoutView::rdb_list_changed_event), + gsi::event ("on_rdb_list_changed", static_cast (&lay::LayoutViewBase::rdb_list_changed_event), "@brief An event that is triggered the list of report databases is changed\n" "\n" "If a report database is added or removed, this event is triggered.\n" "\n" "This event was translated from the Observer pattern to an event in version 0.25." ) + - gsi::method ("num_rdbs", static_cast (&lay::LayoutView::num_rdbs), + gsi::method ("num_rdbs", static_cast (&lay::LayoutViewBase::num_rdbs), "@brief Gets the number of report databases loaded into this view\n" "@return The number of \\ReportDatabase objects present in this view\n" ) + - gsi::method ("remove_rdb", static_cast (&lay::LayoutView::remove_rdb), gsi::arg ("index"), + gsi::method ("remove_rdb", static_cast (&lay::LayoutViewBase::remove_rdb), gsi::arg ("index"), "@brief Removes a report database with the given index\n" "@param The index of the report database to remove from this view" ) + - gsi::method ("rdb", static_cast (&lay::LayoutView::get_rdb), gsi::arg ("index"), + gsi::method ("rdb", static_cast (&lay::LayoutViewBase::get_rdb), gsi::arg ("index"), "@brief Gets the report database with the given index\n" "@return The \\ReportDatabase object or nil if the index is not valid" ) + - gsi::method ("add_rdb", static_cast (&lay::LayoutView::add_rdb), gsi::arg ("db"), + gsi::method ("add_rdb", static_cast (&lay::LayoutViewBase::add_rdb), gsi::arg ("db"), "@brief Adds the given report database to the view\n" "\n" "This method will add an existing database to the view. It will then appear in the marker database browser.\n" @@ -1826,7 +1712,7 @@ Class decl_LayoutView (QT_EXTERNAL_BASE (QWidget) "lay", "Layou "\n" "This method has been added in version 0.26." ) + - gsi::method ("replace_rdb", static_cast (&lay::LayoutView::replace_rdb), gsi::arg ("db_index"), gsi::arg ("db"), + gsi::method ("replace_rdb", static_cast (&lay::LayoutViewBase::replace_rdb), gsi::arg ("db_index"), gsi::arg ("db"), "@brief Replaces the report database with the given index\n" "\n" "If the index is not valid, the database will be added to the view (see \\add_rdb).\n" @@ -1843,39 +1729,32 @@ Class decl_LayoutView (QT_EXTERNAL_BASE (QWidget) "lay", "Layou "If a report database with the given name already exists, a unique name will be created.\n" "The name will be replaced by the file name when a file is loaded into the report database.\n" ) + -#if defined(HAVE_QT) - gsi::method ("show_rdb", static_cast (&lay::LayoutView::open_rdb_browser), gsi::arg ("rdb_index"), gsi::arg ("cv_index"), - "@brief Shows a report database in the marker browser on a certain layout\n" - "The marker browser is opened showing the report database with the index given by \"rdb_index\".\n" - "It will be attached (i.e. navigate to) the layout with the given cellview index in \"cv_index\".\n" - ) + -#endif - gsi::event ("on_l2ndb_list_changed", static_cast (&lay::LayoutView::l2ndb_list_changed_event), + gsi::event ("on_l2ndb_list_changed", static_cast (&lay::LayoutViewBase::l2ndb_list_changed_event), "@brief An event that is triggered the list of netlist databases is changed\n" "\n" "If a netlist database is added or removed, this event is triggered.\n" "\n" "This method has been added in version 0.26." ) + - gsi::method ("num_l2ndbs", static_cast (&lay::LayoutView::num_l2ndbs), + gsi::method ("num_l2ndbs", static_cast (&lay::LayoutViewBase::num_l2ndbs), "@brief Gets the number of netlist databases loaded into this view\n" "@return The number of \\LayoutToNetlist objects present in this view\n" "\n" "This method has been added in version 0.26." ) + - gsi::method ("remove_l2ndb", static_cast (&lay::LayoutView::remove_l2ndb), gsi::arg ("index"), + gsi::method ("remove_l2ndb", static_cast (&lay::LayoutViewBase::remove_l2ndb), gsi::arg ("index"), "@brief Removes a netlist database with the given index\n" "@param The index of the netlist database to remove from this view" "\n" "This method has been added in version 0.26." ) + - gsi::method ("l2ndb", static_cast (&lay::LayoutView::get_l2ndb), gsi::arg ("index"), + gsi::method ("l2ndb", static_cast (&lay::LayoutViewBase::get_l2ndb), gsi::arg ("index"), "@brief Gets the netlist database with the given index\n" "@return The \\LayoutToNetlist object or nil if the index is not valid" "\n" "This method has been added in version 0.26." ) + - gsi::method ("add_l2ndb", static_cast (&lay::LayoutView::add_l2ndb), gsi::arg ("db"), + gsi::method ("add_l2ndb", static_cast (&lay::LayoutViewBase::add_l2ndb), gsi::arg ("db"), "@brief Adds the given netlist database to the view\n" "\n" "This method will add an existing database to the view. It will then appear in the netlist database browser.\n" @@ -1885,7 +1764,7 @@ Class decl_LayoutView (QT_EXTERNAL_BASE (QWidget) "lay", "Layou "\n" "This method has been added in version 0.26." ) + - gsi::method ("replace_l2ndb", static_cast (&lay::LayoutView::replace_l2ndb), gsi::arg ("db_index"), gsi::arg ("db"), + gsi::method ("replace_l2ndb", static_cast (&lay::LayoutViewBase::replace_l2ndb), gsi::arg ("db_index"), gsi::arg ("db"), "@brief Replaces the netlist database with the given index\n" "\n" "If the index is not valid, the database will be added to the view (see \\add_lvsdb).\n" @@ -1904,15 +1783,6 @@ Class decl_LayoutView (QT_EXTERNAL_BASE (QWidget) "lay", "Layou "\n" "This method has been added in version 0.26." ) + -#if defined(HAVE_QT) - gsi::method ("show_l2ndb", static_cast (&lay::LayoutView::open_l2ndb_browser), gsi::arg ("l2ndb_index"), gsi::arg ("cv_index"), - "@brief Shows a netlist database in the marker browser on a certain layout\n" - "The netlist browser is opened showing the netlist database with the index given by \"l2ndb_index\".\n" - "It will be attached (i.e. navigate to) the layout with the given cellview index in \"cv_index\".\n" - "\n" - "This method has been added in version 0.26." - ) + -#endif gsi::method_ext ("lvsdb", &get_lvsdb, gsi::arg ("index"), "@brief Gets the netlist database with the given index\n" "@return The \\LayoutVsSchematic object or nil if the index is not valid" @@ -1948,21 +1818,12 @@ Class decl_LayoutView (QT_EXTERNAL_BASE (QWidget) "lay", "Layou "\n" "This method has been added in version 0.26." ) + -#if defined(HAVE_QT) - gsi::method ("show_lvsdb", static_cast (&lay::LayoutView::open_l2ndb_browser), gsi::arg ("lvsdb_index"), gsi::arg ("cv_index"), - "@brief Shows a netlist database in the marker browser on a certain layout\n" - "The netlist browser is opened showing the netlist database with the index given by \"lvsdb_index\".\n" - "It will be attached (i.e. navigate to) the layout with the given cellview index in \"cv_index\".\n" - "\n" - "This method has been added in version 0.26." - ) + -#endif // HINT: the cast is important to direct GSI to the LayoutView method rather than the // Plugin method (in which case we get a segmentation violation ..) // TODO: this method belongs to the Plugin interface and should be located there. // Change this once there is a mixin concept available and the Plugin interface can // be mixed into LayoutView. - gsi::method ("clear_config", (void (lay::LayoutView::*)()) &lay::LayoutView::clear_config, + gsi::method ("clear_config", (void (lay::LayoutViewBase::*)()) &lay::LayoutViewBase::clear_config, "@brief Clears the local configuration parameters\n" "\n" "See \\set_config for a description of the local configuration parameters." @@ -1983,7 +1844,7 @@ Class decl_LayoutView (QT_EXTERNAL_BASE (QWidget) "lay", "Layou // TODO: this method belongs to the Plugin interface and should be located there. // Change this once there is a mixin concept available and the Plugin interface can // be mixed into LayoutView. - gsi::method ("get_config", (std::string (lay::LayoutView::*)(const std::string &name) const) &lay::LayoutView::config_get, gsi::arg ("name"), + gsi::method ("get_config", (std::string (lay::LayoutViewBase::*)(const std::string &name) const) &lay::LayoutViewBase::config_get, gsi::arg ("name"), "@brief Gets the value of a local configuration parameter\n" "\n" "@param name The name of the configuration parameter whose value shall be obtained (a string)\n" @@ -1995,7 +1856,7 @@ Class decl_LayoutView (QT_EXTERNAL_BASE (QWidget) "lay", "Layou // TODO: this method belongs to the Plugin interface and should be located there. // Change this once there is a mixin concept available and the Plugin interface can // be mixed into LayoutView. - gsi::method ("set_config", (void (lay::LayoutView::*)(const std::string &name, const std::string &value)) &lay::LayoutView::config_set, gsi::arg ("name"), gsi::arg ("value"), + gsi::method ("set_config", (void (lay::LayoutViewBase::*)(const std::string &name, const std::string &value)) &lay::LayoutViewBase::config_set, gsi::arg ("name"), gsi::arg ("value"), "@brief Sets a local configuration parameter with the given name to the given value\n" "\n" "@param name The name of the configuration parameter to set\n" @@ -2010,7 +1871,7 @@ Class decl_LayoutView (QT_EXTERNAL_BASE (QWidget) "lay", "Layou // TODO: this method belongs to the Plugin interface and should be located there. // Change this once there is a mixin concept available and the Plugin interface can // be mixed into LayoutView. - gsi::method ("commit_config", (void (lay::LayoutView::*)()) &lay::LayoutView::config_end, + gsi::method ("commit_config", (void (lay::LayoutViewBase::*)()) &lay::LayoutViewBase::config_end, "@brief Commits the configuration settings\n" "\n" "Some configuration options are queued for performance reasons and become active only after 'commit_config' has been called. " @@ -2118,14 +1979,11 @@ Class decl_LayoutView (QT_EXTERNAL_BASE (QWidget) "lay", "Layou "\n" "This method was introduced in version 0.28." ), - "@brief The view object presenting one or more layout objects\n" - "\n" - "The visual part of the view is the tab panel in the main window. The non-visual part " - "are the redraw thread, the layout handles, cell lists, layer view lists etc. " - "This object controls these aspects of the view and controls the appearance of the data. " + "@hide\n" + "@alias LayoutView\n" ); -gsi::EnumIn decl_layLayoutView_SelectionMode ("lay", "SelectionMode", +gsi::EnumIn decl_layLayoutView_SelectionMode ("lay", "SelectionMode", gsi::enum_const ("Add", lay::Editable::SelectionMode::Add, "@brief Adds to any existing selection\n" ) + @@ -2144,7 +2002,7 @@ gsi::EnumIn decl_layLayoutView_Se ); // Inject the NetlistCrossReference::Status declarations into NetlistCrossReference: -gsi::ClassExt inject_SelectionMode_in_parent (decl_layLayoutView_SelectionMode.defs ()); +gsi::ClassExt inject_SelectionMode_in_parent (decl_layLayoutView_SelectionMode.defs ()); static db::Layout *get_layout (const lay::CellViewRef *cv) { @@ -2211,21 +2069,6 @@ static tl::Event &get_technology_changed_event (lay::CellViewRef *cv) return (*cv)->technology_changed_event; } -#if defined(HAVE_QT) -static lay::CellViewRef get_active_cellview_ref () -{ - lay::LayoutView *view = lay::LayoutView::current (); - if (! view) { - return lay::CellViewRef (); - } - if (view->active_cellview_index () >= 0) { - return view->active_cellview_ref (); - } else { - return lay::CellViewRef (); - } -} -#endif - static void set_cell (lay::CellViewRef *cv, db::Cell *cell) { if (! cell) { @@ -2304,11 +2147,6 @@ static void cv_show_all_cells (lay::CellViewRef *cv) } } -static lay::LayoutView *get_view (lay::CellViewRef *cv) -{ - return cv->view ()->ui (); -} - Class decl_CellView ("lay", "CellView", method ("==", static_cast (&lay::CellViewRef::operator==), gsi::arg ("other"), "@brief Equality: indicates whether the cellviews refer to the same one\n" @@ -2320,24 +2158,6 @@ Class decl_CellView ("lay", "CellView", "The index will be negative if the cellview is not a valid one.\n" "This method has been added in version 0.25.\n" ) + - method_ext ("view", &get_view, - "@brief Gets the view the cellview resides in\n" - "This reference will be nil if the cellview is not a valid one.\n" - "This method has been added in version 0.25.\n" - ) + -#if defined(HAVE_QT) - method ("active", &get_active_cellview_ref, - "@brief Gets the active CellView\n" - "The active CellView is the one that is selected in the current layout view. This method is " - "equivalent to\n" - "@code\n" - "RBA::LayoutView::current.active_cellview\n" - "@/code\n" - "If no CellView is active, this method returns nil.\n" - "\n" - "This method has been introduced in version 0.23." - ) + -#endif method ("is_valid?", &lay::CellViewRef::is_valid, "@brief Returns true, if the cellview is valid\n" "A cellview may become invalid if the corresponding tab is closed for example." diff --git a/src/laybasic/laybasic/gsiDeclLayMarker.cc b/src/laybasic/laybasic/gsiDeclLayMarker.cc index 83dfc7ca7..8ecfb49bb 100644 --- a/src/laybasic/laybasic/gsiDeclLayMarker.cc +++ b/src/laybasic/laybasic/gsiDeclLayMarker.cc @@ -23,13 +23,13 @@ #include "gsiDecl.h" #include "layMarker.h" -#include "layLayoutView.h" +#include "layLayoutViewBase.h" namespace gsi { static -lay::DMarker *create_marker (lay::LayoutView *view) +lay::DMarker *create_marker (lay::LayoutViewBase *view) { return new lay::DMarker (view); } diff --git a/src/laybasic/laybasic/gsiDeclLayPlugin.cc b/src/laybasic/laybasic/gsiDeclLayPlugin.cc index f45415cf9..bce28aa52 100644 --- a/src/laybasic/laybasic/gsiDeclLayPlugin.cc +++ b/src/laybasic/laybasic/gsiDeclLayPlugin.cc @@ -25,7 +25,7 @@ #include "gsiDeclBasic.h" #include "layPlugin.h" #include "layViewObject.h" -#include "layLayoutView.h" +#include "layLayoutViewBase.h" #include "layCursor.h" namespace gsi @@ -40,7 +40,7 @@ namespace gsi // since PluginBase object are only allowed to be created inside the create_plugin method // of the factory, this hack is a quick but dirty workaround. static bool s_in_create_plugin = false; -static lay::LayoutView *sp_view = 0; +static lay::LayoutViewBase *sp_view = 0; static lay::Dispatcher *sp_dispatcher = 0; class PluginBase @@ -393,7 +393,7 @@ public: } } - virtual lay::Plugin *create_plugin (db::Manager *manager, lay::Dispatcher *root, lay::LayoutView *view) const + virtual lay::Plugin *create_plugin (db::Manager *manager, lay::Dispatcher *root, lay::LayoutViewBase *view) const { if (f_create_plugin.can_issue ()) { return create_plugin_gsi (manager, root, view); @@ -402,7 +402,7 @@ public: } } - virtual gsi::PluginBase *create_plugin_gsi (db::Manager *manager, lay::Dispatcher *root, lay::LayoutView *view) const + virtual gsi::PluginBase *create_plugin_gsi (db::Manager *manager, lay::Dispatcher *root, lay::LayoutViewBase *view) const { // TODO: this is a hack. See notes above at s_in_create_plugin s_in_create_plugin = true; @@ -410,7 +410,7 @@ public: sp_dispatcher = root; gsi::PluginBase *ret = 0; try { - ret = f_create_plugin.issue (&PluginFactoryBase::create_plugin_gsi, manager, root, view); + ret = f_create_plugin.issue (&PluginFactoryBase::create_plugin_gsi, manager, root, view); s_in_create_plugin = false; sp_view = 0; sp_dispatcher = 0; diff --git a/src/laybasic/laybasic/layBookmarkList.cc b/src/laybasic/laybasic/layBookmarkList.cc index dcffe8e15..79e8b2f55 100644 --- a/src/laybasic/laybasic/layBookmarkList.cc +++ b/src/laybasic/laybasic/layBookmarkList.cc @@ -20,8 +20,6 @@ */ -#if defined(HAVE_QT) - #include "layBookmarkList.h" #include "tlXMLParser.h" @@ -118,6 +116,3 @@ BookmarkList::propose_new_bookmark_name () const } } - -#endif - diff --git a/src/laybasic/laybasic/layBookmarkList.h b/src/laybasic/laybasic/layBookmarkList.h index 9d4090d53..86225863d 100644 --- a/src/laybasic/laybasic/layBookmarkList.h +++ b/src/laybasic/laybasic/layBookmarkList.h @@ -20,8 +20,6 @@ */ -#if defined(HAVE_QT) - #ifndef HDR_layBookmarkList #define HDR_layBookmarkList @@ -208,5 +206,3 @@ private: } // namespace lay #endif - -#endif // defined(HAVE_QT) diff --git a/src/laybasic/laybasic/layCellView.cc b/src/laybasic/laybasic/layCellView.cc index f71e1e512..c3d5fe319 100644 --- a/src/laybasic/laybasic/layCellView.cc +++ b/src/laybasic/laybasic/layCellView.cc @@ -22,7 +22,7 @@ #include "layCellView.h" -#include "layLayoutView.h" +#include "layLayoutViewBase.h" #if defined(HAVE_QT) # include "layStream.h" #endif diff --git a/src/laybasic/laybasic/layCellView.h b/src/laybasic/laybasic/layCellView.h index 632b7d304..679ca8854 100644 --- a/src/laybasic/laybasic/layCellView.h +++ b/src/laybasic/laybasic/layCellView.h @@ -36,10 +36,10 @@ #include "dbSaveLayoutOptions.h" #include "dbLoadLayoutOptions.h" #include "dbInstElement.h" +#include "dbTechnology.h" #include "gsi.h" #if defined(HAVE_QT) -# include "layTechnology.h" # include "tlFileSystemWatcher.h" #endif diff --git a/src/laybasic/laybasic/layEditorServiceBase.cc b/src/laybasic/laybasic/layEditorServiceBase.cc index 55b9c44f2..ea6f5fcff 100644 --- a/src/laybasic/laybasic/layEditorServiceBase.cc +++ b/src/laybasic/laybasic/layEditorServiceBase.cc @@ -22,7 +22,7 @@ #include "layEditorServiceBase.h" #include "layViewport.h" -#include "layLayoutView.h" +#include "layLayoutViewBase.h" #include "laybasicConfig.h" #include "layConverters.h" @@ -206,7 +206,7 @@ private: // -------------------------------------------------------------------------------------- -EditorServiceBase::EditorServiceBase (LayoutView *view) +EditorServiceBase::EditorServiceBase (LayoutViewBase *view) : lay::ViewService (view->view_object_widget ()), lay::Editable (view), lay::Plugin (view), diff --git a/src/laybasic/laybasic/layEditorServiceBase.h b/src/laybasic/laybasic/layEditorServiceBase.h index de44983ea..166f85245 100644 --- a/src/laybasic/laybasic/layEditorServiceBase.h +++ b/src/laybasic/laybasic/layEditorServiceBase.h @@ -46,7 +46,7 @@ public: /** * @brief Constructor */ - EditorServiceBase (lay::LayoutView *view); + EditorServiceBase (lay::LayoutViewBase *view); /** * @brief Destructor diff --git a/src/laybasic/laybasic/layFinder.cc b/src/laybasic/laybasic/layFinder.cc index cc6ea038a..214705fc4 100644 --- a/src/laybasic/laybasic/layFinder.cc +++ b/src/laybasic/laybasic/layFinder.cc @@ -86,7 +86,7 @@ Finder::closer (double d) } void -Finder::start (lay::LayoutView *view, const lay::CellView &cv, unsigned int cv_index, const std::vector &trans, const db::Box ®ion, int min_level, int max_level, const std::vector &layers) +Finder::start (lay::LayoutViewBase *view, const lay::CellView &cv, unsigned int cv_index, const std::vector &trans, const db::Box ®ion, int min_level, int max_level, const std::vector &layers) { m_layers = layers; m_region = region; @@ -265,7 +265,7 @@ struct LPContextCompareOp }; bool -ShapeFinder::find (LayoutView *view, const db::DBox ®ion_mu) +ShapeFinder::find (LayoutViewBase *view, const db::DBox ®ion_mu) { tl::AbsoluteProgress progress (tl::to_string (tr ("Selecting ..."))); progress.set_unit (1000); @@ -330,7 +330,7 @@ ShapeFinder::find (LayoutView *view, const db::DBox ®ion_mu) } bool -ShapeFinder::find (lay::LayoutView *view, const lay::LayerProperties &lprops, const db::DBox ®ion_mu) +ShapeFinder::find (lay::LayoutViewBase *view, const lay::LayerProperties &lprops, const db::DBox ®ion_mu) { tl::AbsoluteProgress progress (tl::to_string (tr ("Selecting ..."))); progress.set_unit (1000); @@ -349,7 +349,7 @@ ShapeFinder::find (lay::LayoutView *view, const lay::LayerProperties &lprops, co } bool -ShapeFinder::find_internal (lay::LayoutView *view, unsigned int cv_index, const std::set *prop_sel, bool inv_prop_sel, const lay::HierarchyLevelSelection &hier_sel, const std::vector &trans_mu, const std::vector &layers, const db::DBox ®ion_mu) +ShapeFinder::find_internal (lay::LayoutViewBase *view, unsigned int cv_index, const std::set *prop_sel, bool inv_prop_sel, const lay::HierarchyLevelSelection &hier_sel, const std::vector &trans_mu, const std::vector &layers, const db::DBox ®ion_mu) { m_cv_index = cv_index; @@ -624,7 +624,7 @@ InstFinder::InstFinder (bool point_mode, bool top_level_sel, bool full_arrays, b } bool -InstFinder::find (lay::LayoutView *view, const db::DBox ®ion_mu) +InstFinder::find (lay::LayoutViewBase *view, const db::DBox ®ion_mu) { tl::AbsoluteProgress progress (tl::to_string (tr ("Selecting ..."))); progress.set_unit (1000); @@ -641,7 +641,7 @@ InstFinder::find (lay::LayoutView *view, const db::DBox ®ion_mu) } bool -InstFinder::find (LayoutView *view, unsigned int cv_index, const db::DCplxTrans &trans_mu, const db::DBox ®ion_mu) +InstFinder::find (LayoutViewBase *view, unsigned int cv_index, const db::DCplxTrans &trans_mu, const db::DBox ®ion_mu) { tl::AbsoluteProgress progress (tl::to_string (tr ("Selecting ..."))); progress.set_unit (1000); @@ -655,7 +655,7 @@ InstFinder::find (LayoutView *view, unsigned int cv_index, const db::DCplxTrans } bool -InstFinder::find_internal (LayoutView *view, unsigned int cv_index, const db::DCplxTrans &trans_mu, const db::DBox ®ion_mu) +InstFinder::find_internal (LayoutViewBase *view, unsigned int cv_index, const db::DCplxTrans &trans_mu, const db::DBox ®ion_mu) { const lay::CellView &cv = view->cellview (cv_index); if (! cv.is_valid ()) { diff --git a/src/laybasic/laybasic/layFinder.h b/src/laybasic/laybasic/layFinder.h index 5b7608de7..a89f73a48 100644 --- a/src/laybasic/laybasic/layFinder.h +++ b/src/laybasic/laybasic/layFinder.h @@ -29,7 +29,7 @@ #include #include "tlVector.h" -#include "layLayoutView.h" +#include "layLayoutViewBase.h" #include "dbBoxConvert.h" #include "dbLayout.h" #include "dbBox.h" @@ -136,7 +136,7 @@ protected: return m_max_level; } - lay::LayoutView *view () const + lay::LayoutViewBase *view () const { return mp_view; } @@ -153,7 +153,7 @@ protected: * path of instantiations up to the top cell is maintained and accessible by * the path() accessor. */ - void start (LayoutView *view, const lay::CellView &cv, unsigned int cv_index, const std::vector &trans, const db::Box ®ion, int min_level, int max_level, const std::vector &layers = std::vector ()); + void start (LayoutViewBase *view, const lay::CellView &cv, unsigned int cv_index, const std::vector &trans, const db::Box ®ion, int min_level, int max_level, const std::vector &layers = std::vector ()); /** * @brief Provide a basic edge test facility @@ -186,7 +186,7 @@ private: int m_min_level, m_max_level; std::vector m_path; const db::Layout *mp_layout; - lay::LayoutView *mp_view; + lay::LayoutViewBase *mp_view; unsigned int m_cv_index; db::Box m_region; std::vector m_layers; @@ -214,8 +214,8 @@ public: ShapeFinder (bool point_mode, bool top_level_sel, db::ShapeIterator::flags_type flags, const std::set *excludes = 0); - bool find (LayoutView *view, const lay::LayerProperties &lprops, const db::DBox ®ion_mu); - bool find (LayoutView *view, const db::DBox ®ion_mu); + bool find (LayoutViewBase *view, const lay::LayerProperties &lprops, const db::DBox ®ion_mu); + bool find (LayoutViewBase *view, const db::DBox ®ion_mu); iterator begin () const { @@ -262,7 +262,7 @@ protected: private: virtual void visit_cell (const db::Cell &cell, const db::Box &search_box, const db::ICplxTrans &t, int /*level*/); - bool find_internal (LayoutView *view, + bool find_internal (LayoutViewBase *view, unsigned int cv_index, const std::set *prop_sel, bool inv_prop_sel, @@ -300,8 +300,8 @@ public: InstFinder (bool point_mode, bool top_level_sel, bool full_arrays, bool enclose_inst = true, const std::set *excludes = 0, bool visible_layers = false); - bool find (LayoutView *view, unsigned int cv_index, const db::DCplxTrans &trans, const db::DBox ®ion_mu); - bool find (LayoutView *view, const db::DBox ®ion_mu); + bool find (LayoutViewBase *view, unsigned int cv_index, const db::DCplxTrans &trans, const db::DBox ®ion_mu); + bool find (LayoutViewBase *view, const db::DBox ®ion_mu); iterator begin () const { @@ -315,7 +315,7 @@ public: private: virtual void visit_cell (const db::Cell &cell, const db::Box &search_box, const db::ICplxTrans &t, int level); - bool find_internal (LayoutView *view, unsigned int cv_index, const db::DCplxTrans &trans_mu, const db::DBox ®ion_mu); + bool find_internal (LayoutViewBase *view, unsigned int cv_index, const db::DCplxTrans &trans_mu, const db::DBox ®ion_mu); unsigned int m_cv_index; db::cell_index_type m_topcell; diff --git a/src/laybasic/laybasic/layLayerProperties.cc b/src/laybasic/laybasic/layLayerProperties.cc index 7b9476a92..7855cc1de 100644 --- a/src/laybasic/laybasic/layLayerProperties.cc +++ b/src/laybasic/laybasic/layLayerProperties.cc @@ -23,7 +23,6 @@ #include "layLayerProperties.h" #include "layLayoutViewBase.h" -#include "layLayoutView.h" #include "layConverters.h" #include "tlXMLParser.h" #include "tlException.h" @@ -405,7 +404,7 @@ class LayerSourceEval : public tl::Eval { public: - LayerSourceEval (const lay::LayerProperties &lp, const lay::LayoutView *view, bool real) + LayerSourceEval (const lay::LayerProperties &lp, const lay::LayoutViewBase *view, bool real) : m_lp (lp), mp_view (view), m_real (real) { // .. nothing yet .. @@ -416,14 +415,14 @@ public: return m_lp.source (m_real); } - const lay::LayoutView *view () const + const lay::LayoutViewBase *view () const { return mp_view; } private: const lay::LayerProperties &m_lp; - const lay::LayoutView *mp_view; + const lay::LayoutViewBase *mp_view; bool m_real; }; @@ -499,7 +498,7 @@ LayerProperties::display_string (const lay::LayoutViewBase *view, bool real, boo realize_source (); } - LayerSourceEval eval (*this, view->ui (), real); + LayerSourceEval eval (*this, view, real); eval.define_function ("N", new LayerSourceEvalFunction ('N', &eval)); // layer name eval.define_function ("L", new LayerSourceEvalFunction ('L', &eval)); // layer number eval.define_function ("D", new LayerSourceEvalFunction ('D', &eval)); // datatype @@ -1373,7 +1372,7 @@ expand_wildcard_layers (const LayerPropertiesNode &lp, const LayerPropertiesList // NOTE: initialization through LayerProperties creates a new ID lay::LayerPropertiesNode node ((const LayerProperties &) lp); - node.attach_view (view->ui (), list_index); + node.attach_view (view, list_index); // Build a new ParsedLayerSource combining the transformation, hierarchy levels and // property selections from the wildcard one and the requested layer source diff --git a/src/laybasic/laybasic/layLayoutCanvas.cc b/src/laybasic/laybasic/layLayoutCanvas.cc index 482c5806f..22bddfc51 100644 --- a/src/laybasic/laybasic/layLayoutCanvas.cc +++ b/src/laybasic/laybasic/layLayoutCanvas.cc @@ -32,7 +32,7 @@ #include "tlAssert.h" #include "layLayoutCanvas.h" #include "layRedrawThread.h" -#include "layLayoutView.h" +#include "layLayoutViewBase.h" #include "layMarker.h" #if defined(HAVE_QT) # include "gtf.h" diff --git a/src/laybasic/laybasic/layLayoutViewBase.cc b/src/laybasic/laybasic/layLayoutViewBase.cc index b1d183639..cd8af3a8c 100644 --- a/src/laybasic/laybasic/layLayoutViewBase.cc +++ b/src/laybasic/laybasic/layLayoutViewBase.cc @@ -39,7 +39,6 @@ #include "layViewOp.h" #include "layViewObject.h" #include "layConverters.h" -#include "layGridNet.h" #include "layMove.h" #include "layZoomBox.h" #include "layMouseTracker.h" @@ -236,6 +235,22 @@ struct OpDeleteLayerProps const double animation_interval = 0.5; +LayoutViewBase::LayoutViewBase (db::Manager *manager, bool editable, lay::Plugin *plugin_parent, unsigned int options) + : lay::Dispatcher (plugin_parent, false /*not standalone*/), +#if defined(HAVE_QT) + mp_widget (0), +#endif + mp_ui (0), + m_editable (editable), + m_options (options), + m_annotation_shapes (manager) +{ + // either it's us or the parent has a dispatcher + tl_assert (dispatcher () != 0); + + init (manager); +} + #if defined(HAVE_QT) LayoutViewBase::LayoutViewBase (QWidget *widget, lay::LayoutView *ui, db::Manager *manager, bool editable, lay::Plugin *plugin_parent, unsigned int options) #else @@ -576,7 +591,7 @@ void LayoutViewBase::create_plugins (const lay::PluginDeclaration *except_this) lay::Plugin *LayoutViewBase::create_plugin (const lay::PluginDeclaration *cls) { - lay::Plugin *p = cls->create_plugin (manager (), dispatcher (), ui ()); + lay::Plugin *p = cls->create_plugin (manager (), dispatcher (), this); if (p) { // unhook the plugin from the script side if created there (prevent GC from destroying it) @@ -1351,7 +1366,7 @@ LayoutViewBase::insert_layer_list (unsigned index, const LayerPropertiesList &pr clear_layer_selection (); m_layer_properties_lists.insert (m_layer_properties_lists.begin () + index, new LayerPropertiesList (props)); - m_layer_properties_lists [index]->attach_view (ui (), index); + m_layer_properties_lists [index]->attach_view (this, index); merge_dither_pattern (*m_layer_properties_lists [index]); m_current_layer_list = index; @@ -1560,7 +1575,7 @@ LayoutViewBase::set_properties (unsigned int index, const LayerPropertiesList &p return; } else { m_layer_properties_lists.push_back (new LayerPropertiesList ()); - m_layer_properties_lists.back ()->attach_view (ui (), (unsigned int) (m_layer_properties_lists.size () - 1)); + m_layer_properties_lists.back ()->attach_view (this, (unsigned int) (m_layer_properties_lists.size () - 1)); } } @@ -1579,7 +1594,7 @@ LayoutViewBase::set_properties (unsigned int index, const LayerPropertiesList &p } *m_layer_properties_lists [index] = props; - m_layer_properties_lists [index]->attach_view (ui (), index); + m_layer_properties_lists [index]->attach_view (this, index); merge_dither_pattern (*m_layer_properties_lists [index]); @@ -1997,7 +2012,7 @@ LayoutViewBase::signal_layer_properties_changed () // recompute the source // TODO: this is a side effect of this method - provide a special method for this purpose for (unsigned int i = 0; i < layer_lists (); ++i) { - m_layer_properties_lists [i]->attach_view (ui (), i); + m_layer_properties_lists [i]->attach_view (this, i); } // schedule a redraw request - since the layer views might not have changed, this is necessary @@ -2013,7 +2028,7 @@ LayoutViewBase::signal_prop_ids_changed () // recompute the source // TODO: this is a side effect of this method - provide a special method for this purpose for (unsigned int i = 0; i < layer_lists (); ++i) { - m_layer_properties_lists [i]->attach_view (ui (), i); + m_layer_properties_lists [i]->attach_view (this, i); } } @@ -2278,6 +2293,21 @@ LayoutViewBase::signal_apply_technology (lay::LayoutHandle *layout_handle) } } +void +LayoutViewBase::bookmarks (const BookmarkList &b) +{ + m_bookmarks = b; + bookmarks_changed (); +} + +void +LayoutViewBase::bookmark_view (const std::string &name) +{ + DisplayState state (box (), get_min_hier_levels (), get_max_hier_levels (), cellview_list ()); + m_bookmarks.add (name, state); + bookmarks_changed (); +} + void LayoutViewBase::load_layer_props (const std::string &fn) { @@ -2320,7 +2350,7 @@ LayoutViewBase::do_load_layer_props (const std::string &fn, bool map_cv, int cv_ if (map_cv) { cv_map.insert (std::make_pair (-1, cv_index)); } - p->attach_view (ui (), p - props.begin ()); + p->attach_view (this, p - props.begin ()); p->expand (cv_map, add_default); } @@ -3236,7 +3266,7 @@ LayoutViewBase::create_initial_layer_props (int cv_index, const std::string &lyp // expand the wildcards and map to the target cv. for (std::vector::iterator p = props.begin (); p != props.end (); ++p) { - p->attach_view (ui (), p - props.begin ()); + p->attach_view (this, p - props.begin ()); p->expand (cv_map, add_missing || !loaded); } diff --git a/src/laybasic/laybasic/layLayoutViewBase.h b/src/laybasic/laybasic/layLayoutViewBase.h index 742f3fccc..c4b43ce36 100644 --- a/src/laybasic/laybasic/layLayoutViewBase.h +++ b/src/laybasic/laybasic/layLayoutViewBase.h @@ -35,6 +35,7 @@ #include "layLayerProperties.h" #include "layAnnotationShapes.h" +#include "layBookmarkList.h" #include "layDispatcher.h" #include "layLayoutCanvas.h" #include "layColorPalette.h" @@ -74,8 +75,11 @@ class MouseTracker; class ZoomService; class SelectionService; class MoveService; -class ColorButton; -class ConfigureAction; + +#if defined(HAVE_QT) +class LayerControlPanel; +class HierarchyControlPanel; +#endif /** * @brief Stores a layer reference to create layers which have been added by some action @@ -156,7 +160,6 @@ class LAYBASIC_PUBLIC LayoutViewBase : public: typedef lay::CellView::unspecific_cell_path_type cell_path_type; typedef lay::CellView::cell_index_type cell_index_type; - typedef std::pair bookmark_type; /** * @brief Define some options for the view @@ -180,6 +183,11 @@ public: enum drop_small_cells_cond_type { DSC_Max = 0, DSC_Min = 1, DSC_Sum = 2 }; + /** + * @brief Stand-alone Constructor + */ + LayoutViewBase (db::Manager *mgr, bool editable, lay::Plugin *plugin_parent, unsigned int options = (unsigned int) LV_Normal); + /** * @brief Constructor */ @@ -798,6 +806,24 @@ public: */ void load_layer_props (const std::string &fn, int cv_index, bool add_default); + /** + * @brief Bookmark the current view under the given name + */ + void bookmark_view (const std::string &name); + + /** + * @brief Obtain the bookmarks list + */ + const BookmarkList &bookmarks () const + { + return m_bookmarks; + } + + /** + * @brief Set the bookmarks list + */ + void bookmarks (const BookmarkList &b); + /** * @brief Save the screen content to a file */ @@ -1629,6 +1655,24 @@ public: return mp_canvas; } +#if defined(HAVE_QT) + /** + * @brief Gets the layer control panel + */ + virtual lay::LayerControlPanel *control_panel () + { + return 0; + } + + /** + * @brief Gets the hierarchy panel + */ + virtual lay::HierarchyControlPanel *hierarchy_panel () + { + return 0; + } +#endif + /** * @brief Get the current viewport */ @@ -1839,6 +1883,15 @@ public: */ virtual void drop_url (const std::string &path_or_url); + /** + * @brief Returns true if the layer control panels model got updated + * Internally used by CellTreeModel to synchronize + */ + virtual bool layer_model_updated () + { + return false; + } + /** * @brief Gets a list of all plugins */ @@ -2308,6 +2361,11 @@ public: return (unsigned int) m_rdbs.size (); } + /** + * @brief Open the RDB browser for a given database and associated cv index + */ + virtual void open_rdb_browser (int /*rdb_index*/, int /*cv_index*/) { } + /** * @brief An event signalling a change in the marker database list * @@ -2369,6 +2427,11 @@ public: return (unsigned int) m_l2ndbs.size (); } + /** + * @brief Open the L2NDB browser for a given database and associated cv index + */ + virtual void open_l2ndb_browser (int /*l2ndb_index*/, int /*cv_index*/) { } + /** * @brief An event signalling a change in the netlist database list * @@ -2691,6 +2754,8 @@ private: std::vector m_display_states; unsigned int m_display_state_ptr; + BookmarkList m_bookmarks; + std::vector m_layer_properties_lists; unsigned int m_current_layer_list; @@ -2792,6 +2857,8 @@ protected: virtual void update_content_for_cv (int cv_index); virtual bool set_hier_levels_basic (std::pair l); + virtual void bookmarks_changed () { } + void ensure_layer_selected (); void enable_active_cellview_changed_event (bool enable, bool silent = false); diff --git a/src/laybasic/laybasic/layMarker.cc b/src/laybasic/laybasic/layMarker.cc index 729f4fbcd..93b298099 100644 --- a/src/laybasic/laybasic/layMarker.cc +++ b/src/laybasic/laybasic/layMarker.cc @@ -29,7 +29,7 @@ #include "layCanvasPlane.h" #include "layViewOp.h" #include "layRenderer.h" -#include "layLayoutView.h" +#include "layLayoutViewBase.h" #include "tlAssert.h" namespace lay @@ -188,7 +188,7 @@ void render_cell_inst (const db::Layout &layout, const db::CellInstArray &inst, // ------------------------------------------------------------------------ -MarkerBase::MarkerBase (lay::LayoutView *view) +MarkerBase::MarkerBase (lay::LayoutViewBase *view) : lay::ViewObject (view->view_object_widget ()), m_line_width (-1), m_vertex_size (-1), m_halo (-1), m_text_enabled (true), m_vertex_shape (lay::ViewOp::Rect), m_line_style (-1), m_dither_pattern (-1), m_frame_pattern (0), mp_view (view) { @@ -372,7 +372,7 @@ MarkerBase::get_bitmaps (const Viewport & /*vp*/, ViewObjectCanvas &canvas, lay: // ------------------------------------------------------------------------ -GenericMarkerBase::GenericMarkerBase (lay::LayoutView *view, unsigned int cv_index) +GenericMarkerBase::GenericMarkerBase (lay::LayoutViewBase *view, unsigned int cv_index) : MarkerBase (view), mp_trans_vector (0), mp_view (view), m_cv_index (cv_index) { // .. nothing yet .. @@ -496,7 +496,7 @@ GenericMarkerBase::dbu () const // ------------------------------------------------------------------------ -InstanceMarker::InstanceMarker (LayoutView *view, unsigned int cv_index, bool draw_outline, size_t max_shapes) +InstanceMarker::InstanceMarker (LayoutViewBase *view, unsigned int cv_index, bool draw_outline, size_t max_shapes) : GenericMarkerBase (view, cv_index), m_draw_outline (draw_outline), m_max_shapes (max_shapes), m_inst () { // .. nothing yet .. @@ -576,7 +576,7 @@ InstanceMarker::item_bbox () const // ------------------------------------------------------------------------ -ShapeMarker::ShapeMarker (LayoutView *view, unsigned int cv_index) +ShapeMarker::ShapeMarker (LayoutViewBase *view, unsigned int cv_index) : GenericMarkerBase (view, cv_index), m_shape () { // .. nothing yet .. @@ -643,7 +643,7 @@ ShapeMarker::item_bbox () const // ------------------------------------------------------------------------ -Marker::Marker (lay::LayoutView *view, unsigned int cv_index, bool draw_outline, size_t max_shapes) +Marker::Marker (lay::LayoutViewBase *view, unsigned int cv_index, bool draw_outline, size_t max_shapes) : GenericMarkerBase (view, cv_index), m_draw_outline (draw_outline), m_max_shapes (max_shapes) { m_type = None; @@ -1135,7 +1135,7 @@ Marker::render (const Viewport &vp, ViewObjectCanvas &canvas) // ------------------------------------------------------------------------ -DMarker::DMarker (LayoutView *view) +DMarker::DMarker (LayoutViewBase *view) : MarkerBase (view), mp_view (view) { m_type = None; diff --git a/src/laybasic/laybasic/layMarker.h b/src/laybasic/laybasic/layMarker.h index 7b18deab6..2cc4a4133 100644 --- a/src/laybasic/laybasic/layMarker.h +++ b/src/laybasic/laybasic/layMarker.h @@ -44,7 +44,7 @@ namespace lay { -class LayoutView; +class LayoutViewBase; /** * @brief The marker base class @@ -59,7 +59,7 @@ public: /** * @brief The constructor */ - MarkerBase (lay::LayoutView *view); + MarkerBase (lay::LayoutViewBase *view); /** * @brief Get the color by which the marker is drawn @@ -232,7 +232,7 @@ protected: bool m_text_enabled; lay::ViewOp::Shape m_vertex_shape; int m_line_style, m_dither_pattern, m_frame_pattern; - lay::LayoutView *mp_view; + lay::LayoutViewBase *mp_view; }; /** @@ -252,7 +252,7 @@ public: /** * @brief The constructor */ - GenericMarkerBase (lay::LayoutView *view, unsigned int cv_index); + GenericMarkerBase (lay::LayoutViewBase *view, unsigned int cv_index); /** * @brief The destructor @@ -321,7 +321,7 @@ public: /** * @brief Gets the view object */ - lay::LayoutView *view () const + lay::LayoutViewBase *view () const { return mp_view; } @@ -344,7 +344,7 @@ public: private: db::CplxTrans m_trans; std::vector *mp_trans_vector; - lay::LayoutView *mp_view; + lay::LayoutViewBase *mp_view; unsigned int m_cv_index; /** @@ -367,7 +367,7 @@ public: /** * @brief The constructor */ - ShapeMarker (lay::LayoutView *view, unsigned int cv_index); + ShapeMarker (lay::LayoutViewBase *view, unsigned int cv_index); /** * @brief The destructor @@ -418,7 +418,7 @@ public: * @param draw_outline True to have instances drawing their outline * @param max_shapes The maximum number of shapes to draw for instances (just a box is drawn if more shapes are present) */ - InstanceMarker (lay::LayoutView *view, unsigned int cv_index, bool draw_outline = true, size_t max_shapes = 0); + InstanceMarker (lay::LayoutViewBase *view, unsigned int cv_index, bool draw_outline = true, size_t max_shapes = 0); /** * @brief The destructor @@ -508,7 +508,7 @@ public: * @param draw_outline True to have instances drawing their outline * @param max_shapes The maximum number of shapes to draw for instances (just a box is drawn if more shapes are present) */ - Marker (lay::LayoutView *view, unsigned int cv_index, bool draw_outline = true, size_t max_shapes = 0); + Marker (lay::LayoutViewBase *view, unsigned int cv_index, bool draw_outline = true, size_t max_shapes = 0); /** * @brief The destructor @@ -743,7 +743,7 @@ public: /** * @brief The constructor */ - DMarker (lay::LayoutView *view); + DMarker (lay::LayoutViewBase *view); /** * @brief The destructor @@ -806,7 +806,7 @@ private: void *any; } m_object; - lay::LayoutView *mp_view; + lay::LayoutViewBase *mp_view; }; } diff --git a/src/laybasic/laybasic/layMouseTracker.cc b/src/laybasic/laybasic/layMouseTracker.cc index f84a48779..9afc48058 100644 --- a/src/laybasic/laybasic/layMouseTracker.cc +++ b/src/laybasic/laybasic/layMouseTracker.cc @@ -23,7 +23,7 @@ #include "layMouseTracker.h" #include "layLayoutCanvas.h" -#include "layLayoutView.h" +#include "layLayoutViewBase.h" namespace lay { diff --git a/src/laybasic/laybasic/layMove.cc b/src/laybasic/laybasic/layMove.cc index da4264da4..bc22b0332 100644 --- a/src/laybasic/laybasic/layMove.cc +++ b/src/laybasic/laybasic/layMove.cc @@ -24,7 +24,7 @@ #include "layMove.h" #include "layEditable.h" -#include "layLayoutView.h" +#include "layLayoutViewBase.h" #include "laySelector.h" #include "laybasicConfig.h" diff --git a/src/laybasic/laybasic/layObjectInstPath.cc b/src/laybasic/laybasic/layObjectInstPath.cc index 48ec1167e..8d8f5a870 100644 --- a/src/laybasic/laybasic/layObjectInstPath.cc +++ b/src/laybasic/laybasic/layObjectInstPath.cc @@ -26,7 +26,6 @@ #include "layObjectInstPath.h" #include "layCellView.h" -#include "layLayoutView.h" #include "tlException.h" namespace lay { diff --git a/src/laybasic/laybasic/layParsedLayerSource.cc b/src/laybasic/laybasic/layParsedLayerSource.cc index 1b05eaefe..66130f12f 100644 --- a/src/laybasic/laybasic/layParsedLayerSource.cc +++ b/src/laybasic/laybasic/layParsedLayerSource.cc @@ -22,7 +22,7 @@ #include "layParsedLayerSource.h" -#include "layLayoutView.h" +#include "layLayoutViewBase.h" #include "tlString.h" #include "tlGlobPattern.h" diff --git a/src/laybasic/laybasic/layPlugin.h b/src/laybasic/laybasic/layPlugin.h index 8d95da611..84244ce2c 100644 --- a/src/laybasic/laybasic/layPlugin.h +++ b/src/laybasic/laybasic/layPlugin.h @@ -48,7 +48,7 @@ namespace lay class Plugin; class Dispatcher; -class LayoutView; +class LayoutViewBase; class ViewService; class Editable; class Drawing; @@ -302,7 +302,7 @@ public: * This method may return 0 for "dummy" plugins that just register menu entries * or configuration options. */ - virtual lay::Plugin *create_plugin (db::Manager * /*manager*/, lay::Dispatcher * /*dispatcher*/, lay::LayoutView * /*view*/) const + virtual lay::Plugin *create_plugin (db::Manager * /*manager*/, lay::Dispatcher * /*dispatcher*/, lay::LayoutViewBase * /*view*/) const { return 0; } @@ -329,7 +329,7 @@ public: * * The new pages are returned in the "pages" vector. The layout view will take ownership of these pages. */ - virtual void get_editor_options_pages (std::vector & /*pages*/, lay::LayoutView * /*view*/, lay::Dispatcher * /*dispatcher*/) const + virtual void get_editor_options_pages (std::vector & /*pages*/, lay::LayoutViewBase * /*view*/, lay::Dispatcher * /*dispatcher*/) const { // .. no pages in the default implementation .. } diff --git a/src/laybasic/laybasic/layPluginConfigPage.h b/src/laybasic/laybasic/layPluginConfigPage.h index fa3362281..73c40b82a 100644 --- a/src/laybasic/laybasic/layPluginConfigPage.h +++ b/src/laybasic/laybasic/layPluginConfigPage.h @@ -33,7 +33,6 @@ namespace lay { class Dispatcher; -class EditorOptionsPage; /** * @brief The base class for configuration pages diff --git a/src/laybasic/laybasic/layRedrawThread.h b/src/laybasic/laybasic/layRedrawThread.h index 4dc328aff..dadba6755 100644 --- a/src/laybasic/laybasic/layRedrawThread.h +++ b/src/laybasic/laybasic/layRedrawThread.h @@ -32,7 +32,7 @@ #include "dbTrans.h" #include "dbLayout.h" #include "layRenderer.h" -#include "layLayoutView.h" +#include "layLayoutViewBase.h" #include "layRedrawThreadCanvas.h" #include "layRedrawLayerInfo.h" #include "layCanvasPlane.h" diff --git a/src/laybasic/laybasic/layRedrawThreadWorker.cc b/src/laybasic/laybasic/layRedrawThreadWorker.cc index 2a7614177..16c97bc60 100644 --- a/src/laybasic/laybasic/layRedrawThreadWorker.cc +++ b/src/laybasic/laybasic/layRedrawThreadWorker.cc @@ -70,7 +70,7 @@ RedrawThreadWorker::RedrawThreadWorker (RedrawThread *redraw_thread) m_default_text_size = 0.0; m_drop_small_cells = false; m_drop_small_cells_value = 0; - m_drop_small_cells_cond = lay::LayoutView::DSC_Min; + m_drop_small_cells_cond = lay::LayoutViewBase::DSC_Min; m_draw_array_border_instances = false; m_abstract_mode_width = 0; m_child_context_enabled = false; @@ -2097,9 +2097,9 @@ RedrawThreadWorker::drop_cell (const db::Cell &cell, const db::CplxTrans &trans) db::DBox bbox = trans * cell.bbox (); double value = 0; - if (m_drop_small_cells_cond == lay::LayoutView::DSC_Min) { + if (m_drop_small_cells_cond == lay::LayoutViewBase::DSC_Min) { value = std::min (bbox.width (), bbox.height ()); - } else if (m_drop_small_cells_cond == lay::LayoutView::DSC_Max) { + } else if (m_drop_small_cells_cond == lay::LayoutViewBase::DSC_Max) { value = std::max (bbox.width (), bbox.height ()); } else { value = bbox.width () + bbox.height (); diff --git a/src/laybasic/laybasic/layRedrawThreadWorker.h b/src/laybasic/laybasic/layRedrawThreadWorker.h index 68cc2e264..256ad2ac0 100644 --- a/src/laybasic/laybasic/layRedrawThreadWorker.h +++ b/src/laybasic/laybasic/layRedrawThreadWorker.h @@ -25,7 +25,7 @@ #define HDR_layRedrawThreadWorker #include "dbLayout.h" -#include "layLayoutView.h" +#include "layLayoutViewBase.h" #include "tlThreadedWorkers.h" #include "tlTimer.h" @@ -221,7 +221,7 @@ private: double m_default_text_size; bool m_drop_small_cells; unsigned int m_drop_small_cells_value; - lay::LayoutView::drop_small_cells_cond_type m_drop_small_cells_cond; + lay::LayoutViewBase::drop_small_cells_cond_type m_drop_small_cells_cond; bool m_draw_array_border_instances; double m_abstract_mode_width; bool m_child_context_enabled; @@ -231,7 +231,7 @@ private: std::set , lay::CellVariantCacheCompare> *mp_cell_var_cache; unsigned int m_cache_hits, m_cache_misses; std::set > m_box_variants; - std::vector > m_hidden_cells; + std::vector > m_hidden_cells; std::vector m_cellviews; const db::Layout *mp_layout; int m_cv_index; diff --git a/src/laybasic/laybasic/laySelector.cc b/src/laybasic/laybasic/laySelector.cc index a6bd77b4d..1db1fd427 100644 --- a/src/laybasic/laybasic/laySelector.cc +++ b/src/laybasic/laybasic/laySelector.cc @@ -24,7 +24,7 @@ #include "laySelector.h" #include "layRubberBox.h" -#include "layLayoutView.h" +#include "layLayoutViewBase.h" #include "tlLog.h" #include "tlException.h" diff --git a/src/laybasic/laybasic/laySnap.cc b/src/laybasic/laybasic/laySnap.cc index 14b7d004b..c123da738 100644 --- a/src/laybasic/laybasic/laySnap.cc +++ b/src/laybasic/laybasic/laySnap.cc @@ -23,7 +23,7 @@ #include "laySnap.h" -#include "layLayoutView.h" +#include "layLayoutViewBase.h" #include "dbEdge.h" @@ -282,7 +282,7 @@ public: * This will run the finder on the given view. * "search_range" is the search range in micron units. */ - void find (lay::LayoutView *view, double search_range) + void find (lay::LayoutViewBase *view, double search_range) { if (! view) { return; @@ -586,7 +586,7 @@ private: } void - do_find (lay::LayoutView *view, int cv_index, const db::Cell &cell, unsigned int l, int min_level, int max_level, const db::CplxTrans &t) + do_find (lay::LayoutViewBase *view, int cv_index, const db::Cell &cell, unsigned int l, int min_level, int max_level, const db::CplxTrans &t) { db::Box touch_box = t.inverted () * m_region; @@ -727,7 +727,7 @@ private: }; static PointSnapToObjectResult -do_obj_snap (lay::LayoutView *view, const db::DPoint &pt, const db::DVector &grid, double snap_range, const std::vector &cutlines) +do_obj_snap (lay::LayoutViewBase *view, const db::DPoint &pt, const db::DVector &grid, double snap_range, const std::vector &cutlines) { db::DPoint dp (pt); @@ -792,7 +792,7 @@ do_obj_snap (lay::LayoutView *view, const db::DPoint &pt, const db::DVector &gri } static TwoPointSnapToObjectResult -do_obj_snap2 (lay::LayoutView *view, const db::DPoint &pt1, const db::DPoint &pt2, const db::DVector &grid, double min_search_range, double max_search_range, const std::vector &cutlines) +do_obj_snap2 (lay::LayoutViewBase *view, const db::DPoint &pt1, const db::DPoint &pt2, const db::DVector &grid, double min_search_range, double max_search_range, const std::vector &cutlines) { db::DPoint dp1 (pt1); db::DPoint dp2 (pt2); @@ -915,13 +915,13 @@ make_cutlines (lay::angle_constraint_type snap_mode, const db::DPoint &p1, std:: } PointSnapToObjectResult -obj_snap (lay::LayoutView *view, const db::DPoint &pt, const db::DVector &grid, double snap_range) +obj_snap (lay::LayoutViewBase *view, const db::DPoint &pt, const db::DVector &grid, double snap_range) { return do_obj_snap (view, pt, grid, snap_range, std::vector ()); } PointSnapToObjectResult -obj_snap (lay::LayoutView *view, const db::DPoint &p1, const db::DPoint &p2, const db::DVector &grid, lay::angle_constraint_type snap_mode, double snap_range) +obj_snap (lay::LayoutViewBase *view, const db::DPoint &p1, const db::DPoint &p2, const db::DVector &grid, lay::angle_constraint_type snap_mode, double snap_range) { std::vector cutlines; make_cutlines (snap_mode, p1, cutlines); @@ -929,19 +929,19 @@ obj_snap (lay::LayoutView *view, const db::DPoint &p1, const db::DPoint &p2, con } TwoPointSnapToObjectResult -obj_snap2 (lay::LayoutView *view, const db::DPoint &pt, const db::DVector &grid, double min_search_range, double max_search_range) +obj_snap2 (lay::LayoutViewBase *view, const db::DPoint &pt, const db::DVector &grid, double min_search_range, double max_search_range) { return obj_snap2 (view, pt, pt, grid, min_search_range, max_search_range); } TwoPointSnapToObjectResult -obj_snap2 (lay::LayoutView *view, const db::DPoint &pt, const db::DVector &grid, lay::angle_constraint_type ac, double min_search_range, double max_search_range) +obj_snap2 (lay::LayoutViewBase *view, const db::DPoint &pt, const db::DVector &grid, lay::angle_constraint_type ac, double min_search_range, double max_search_range) { return obj_snap2 (view, pt, pt, grid, ac, min_search_range, max_search_range); } TwoPointSnapToObjectResult -obj_snap2 (lay::LayoutView *view, const db::DPoint &pt1, const db::DPoint &pt2, const db::DVector &grid, double min_search_range, double max_search_range) +obj_snap2 (lay::LayoutViewBase *view, const db::DPoint &pt1, const db::DPoint &pt2, const db::DVector &grid, double min_search_range, double max_search_range) { db::DPoint dp1 = lay::snap_xy (pt1, grid); db::DPoint dp2 = lay::snap_xy (pt2, grid); @@ -950,7 +950,7 @@ obj_snap2 (lay::LayoutView *view, const db::DPoint &pt1, const db::DPoint &pt2, } TwoPointSnapToObjectResult -obj_snap2 (lay::LayoutView *view, const db::DPoint &pt1, const db::DPoint &pt2, const db::DVector &grid, lay::angle_constraint_type snap_mode, double min_search_range, double max_search_range) +obj_snap2 (lay::LayoutViewBase *view, const db::DPoint &pt1, const db::DPoint &pt2, const db::DVector &grid, lay::angle_constraint_type snap_mode, double min_search_range, double max_search_range) { db::DPoint dp1 = lay::snap_xy (pt1, grid); db::DPoint dp2 = lay::snap_xy (pt2, grid); diff --git a/src/laybasic/laybasic/laySnap.h b/src/laybasic/laybasic/laySnap.h index 19ebcc05c..eaa26ae4c 100644 --- a/src/laybasic/laybasic/laySnap.h +++ b/src/laybasic/laybasic/laySnap.h @@ -41,7 +41,7 @@ namespace lay { - class LayoutView; + class LayoutViewBase; /** * @brief An angle constraint type @@ -154,7 +154,7 @@ namespace lay * @param grid Either (0,0) to disable grid snapping or a (gx,gy) value for the (potentially anisotropic grid) * @param snap_range The search range for objects */ - LAYBASIC_PUBLIC PointSnapToObjectResult obj_snap (lay::LayoutView *view, const db::DPoint &pt, const db::DVector &grid, double snap_range); + LAYBASIC_PUBLIC PointSnapToObjectResult obj_snap (lay::LayoutViewBase *view, const db::DPoint &pt, const db::DVector &grid, double snap_range); /** * @brief combined grid-, projection- and object snapping provided to implementing "magnetic features" @@ -162,7 +162,7 @@ namespace lay * This is a convenience method that creates the projection axes from a reference point and an angle mode. * "pr" is the reference point, "pt" is the point to snap. */ - LAYBASIC_PUBLIC PointSnapToObjectResult obj_snap (lay::LayoutView *view, const db::DPoint &pr, const db::DPoint &pt, const db::DVector &grid, lay::angle_constraint_type ac, double snap_range); + LAYBASIC_PUBLIC PointSnapToObjectResult obj_snap (lay::LayoutViewBase *view, const db::DPoint &pr, const db::DPoint &pt, const db::DVector &grid, lay::angle_constraint_type ac, double snap_range); /** * @brief A structure describing the snap result for a two-sided object snap (distance measurement) @@ -208,7 +208,7 @@ namespace lay * This method basically implements "auto measure". The first value of the returned pair * is true if such an edge could be found. Otherwise it's false. */ - LAYBASIC_PUBLIC TwoPointSnapToObjectResult obj_snap2 (lay::LayoutView *view, const db::DPoint &pt, const db::DVector &grid, double min_search_range, double max_search_range); + LAYBASIC_PUBLIC TwoPointSnapToObjectResult obj_snap2 (LayoutViewBase *view, const db::DPoint &pt, const db::DVector &grid, double min_search_range, double max_search_range); /** * @brief Same than obj_snap, but delivers two points on two opposite sides of the initial points @@ -218,14 +218,14 @@ namespace lay * * This version accepts two points defining different search regions for first and second edge. */ - LAYBASIC_PUBLIC TwoPointSnapToObjectResult obj_snap2 (lay::LayoutView *view, const db::DPoint &pt1, const db::DPoint &pt2, const db::DVector &grid, double min_search_range, double max_search_range); + LAYBASIC_PUBLIC TwoPointSnapToObjectResult obj_snap2 (lay::LayoutViewBase *view, const db::DPoint &pt1, const db::DPoint &pt2, const db::DVector &grid, double min_search_range, double max_search_range); /** * @brief Same than the previous obj_snap2, but allows specification of an angle constraint * * Measurements will be confined to the direction specified. */ - LAYBASIC_PUBLIC TwoPointSnapToObjectResult obj_snap2 (lay::LayoutView *view, const db::DPoint &pt, const db::DVector &grid, lay::angle_constraint_type ac, double min_search_range, double max_search_range); + LAYBASIC_PUBLIC TwoPointSnapToObjectResult obj_snap2 (lay::LayoutViewBase *view, const db::DPoint &pt, const db::DVector &grid, lay::angle_constraint_type ac, double min_search_range, double max_search_range); /** * @brief Same than the previous obj_snap2, but allows specification of an angle constraint @@ -234,7 +234,7 @@ namespace lay * * This version accepts two points defining different search regions for first and second edge. */ - LAYBASIC_PUBLIC TwoPointSnapToObjectResult obj_snap2 (lay::LayoutView *view, const db::DPoint &pt1, const db::DPoint &pt2, const db::DVector &grid, lay::angle_constraint_type ac, double min_search_range, double max_search_range); + LAYBASIC_PUBLIC TwoPointSnapToObjectResult obj_snap2 (lay::LayoutViewBase *view, const db::DPoint &pt1, const db::DPoint &pt2, const db::DVector &grid, lay::angle_constraint_type ac, double min_search_range, double max_search_range); /** * @brief Reduce a given vector according to the angle constraint diff --git a/src/laybasic/laybasic/layStream.cc b/src/laybasic/laybasic/layStream.cc index 0da6346ec..e467be83e 100644 --- a/src/laybasic/laybasic/layStream.cc +++ b/src/laybasic/laybasic/layStream.cc @@ -25,7 +25,6 @@ #include "layStream.h" #include "layPlugin.h" #include "laybasicConfig.h" -#include "layTechnology.h" #include "dbStream.h" #include "dbLoadLayoutOptions.h" #include "dbSaveLayoutOptions.h" diff --git a/src/laybasic/laybasic/layZoomBox.cc b/src/laybasic/laybasic/layZoomBox.cc index 97f080aa5..26538d076 100644 --- a/src/laybasic/laybasic/layZoomBox.cc +++ b/src/laybasic/laybasic/layZoomBox.cc @@ -23,7 +23,7 @@ #include "layZoomBox.h" #include "layRubberBox.h" -#include "layLayoutView.h" +#include "layLayoutViewBase.h" namespace lay { diff --git a/src/laybasic/laybasic/laybasic.pro b/src/laybasic/laybasic/laybasic.pro index 95ac373fa..10ed41dd5 100644 --- a/src/laybasic/laybasic/laybasic.pro +++ b/src/laybasic/laybasic/laybasic.pro @@ -6,335 +6,135 @@ include($$PWD/../../lib.pri) DEFINES += MAKE_LAYBASIC_LIBRARY -!equals(HAVE_QT, "0") { +!equals(HAVE_QT, 0) { FORMS = \ - AlignCellOptionsDialog.ui \ - BookmarkManagementForm.ui \ - BrowseInstancesConfigPage.ui \ - BrowseInstancesForm.ui \ - BrowserDialog.ui \ - BrowserPanel.ui \ - BrowseShapesConfigPage.ui \ - BrowseShapesForm.ui \ - CellSelectionForm.ui \ - ClearLayerModeDialog.ui \ - ConfigurationDialog.ui \ - CopyCellModeDialog.ui \ - DeleteCellModeDialog.ui \ - DuplicateLayerDialog.ui \ - EditStipplesForm.ui \ - FlattenInstOptionsDialog.ui \ - GridNetConfigPage.ui \ - LayerMappingWidget.ui \ - LayerSourceDialog.ui \ - LayoutProperties.ui \ - LayoutViewConfigPage1.ui \ - LayoutViewConfigPage2a.ui \ - LayoutViewConfigPage2b.ui \ - LayoutViewConfigPage2c.ui \ - LayoutViewConfigPage2d.ui \ - LayoutViewConfigPage3a.ui \ - LayoutViewConfigPage3b.ui \ - LayoutViewConfigPage3c.ui \ - LayoutViewConfigPage3f.ui \ - LayoutViewConfigPage4.ui \ - LayoutViewConfigPage5.ui \ - LayoutViewConfigPage6.ui \ - LayoutViewConfigPage7.ui \ - LayoutViewConfigPage.ui \ - LibraryCellSelectionForm.ui \ - LoadLayoutOptionsDialog.ui \ - MarkerBrowserConfigPage2.ui \ - MarkerBrowserConfigPage.ui \ - MarkerBrowserDialog.ui \ - MarkerBrowserPage.ui \ - MarkerBrowserSnapshotView.ui \ - MoveOptionsDialog.ui \ - MoveToOptionsDialog.ui \ - NewCellPropertiesDialog.ui \ - NewLayerPropertiesDialog.ui \ - NewLayoutPropertiesDialog.ui \ - OpenLayoutModeDialog.ui \ PropertiesDialog.ui \ - RenameCellDialog.ui \ - ReplaceCellOptionsDialog.ui \ - SaveLayoutOptionsDialog.ui \ - SaveLayoutAsOptionsDialog.ui \ - SelectStippleForm.ui \ - TipDialog.ui \ - UserPropertiesForm.ui \ - UserPropertiesEditForm.ui \ - SpecificLoadLayoutOptionsDialog.ui \ - SelectLineStyleForm.ui \ - LayoutViewConfigPage6a.ui \ - EditLineStylesForm.ui \ - NetlistBrowserPage.ui \ - NetlistBrowserConfigPage.ui \ - NetlistBrowserConfigPage2.ui \ - NetlistBrowserDialog.ui \ - NetInfoDialog.ui \ - NetExportDialog.ui \ - SelectCellViewForm.ui \ - LayoutStatistics.ui \ - RESOURCES = \ - laybasicResources.qrc \ - layLayoutStatistics.qrc \ + SOURCES = \ + gtf.cc \ + layPluginConfigPage.cc \ + layPropertiesDialog.cc \ + layProperties.cc \ + layAbstractMenu.cc \ + layDragDropData.cc \ + layCursor.cc \ + + HEADERS = \ + gtf.h \ + layPluginConfigPage.h \ + layPropertiesDialog.h \ + layProperties.h \ + layAbstractMenu.h \ + layDragDropData.h \ + layCursor.h \ } -# Disabled without Qt: - -SOURCES = \ - gsiDeclLayDialogs.cc \ - gsiDeclLayMenu.cc \ - gsiDeclLayNetlistBrowserDialog.cc \ - gsiDeclLayStream.cc \ - gtf.cc \ - layAbstractMenu.cc \ - layBackgroundAwareTreeStyle.cc \ - layBookmarkList.cc \ - layBookmarkManagementForm.cc \ - layBookmarksView.cc \ - layBrowseInstancesForm.cc \ - layBrowseShapesForm.cc \ - layBrowser.cc \ - layBrowserDialog.cc \ - layBrowserPanel.cc \ - layBusy.cc \ - layCellSelectionForm.cc \ - layCellTreeModel.cc \ - layConfigurationDialog.cc \ - layCursor.cc \ - layDialogs.cc \ - layDragDropData.cc \ - layEditLineStyleWidget.cc \ - layEditLineStylesForm.cc \ - layEditStippleWidget.cc \ - layEditStipplesForm.cc \ - layEditorOptionsFrame.cc \ - layEditorOptionsPage.cc \ - layEditorOptionsPages.cc \ - layFileDialog.cc \ - layGenericSyntaxHighlighter.cc \ - layGridNetConfigPage.cc \ - layHierarchyControlPanel.cc \ - layIndexedNetlistModel.cc \ - layItemDelegates.cc \ - layLayerControlPanel.cc \ - layLayerMappingWidget.cc \ - layLayerToolbox.cc \ - layLayerTreeModel.cc \ - layLayoutPropertiesForm.cc \ - layLayoutStatisticsForm.cc \ - layLayoutViewConfigPages.cc \ - layLayoutViewFunctions.cc \ - layLibrariesView.cc \ - layLoadLayoutOptionsDialog.cc \ - layNetExportDialog.cc \ - layNetInfoDialog.cc \ - layNetlistBrowser.cc \ - layNetlistBrowserDialog.cc \ - layNetlistBrowserModel.cc \ - layNetlistBrowserPage.cc \ - layNetlistBrowserTreeModel.cc \ - layNetlistCrossReferenceModel.cc \ - layPluginConfigPage.cc \ - layProperties.cc \ - layPropertiesDialog.cc \ - layQtTools.cc \ - laySaveLayoutOptionsDialog.cc \ - laySelectCellViewForm.cc \ - laySelectLineStyleForm.cc \ - laySelectStippleForm.cc \ - layStream.cc \ - layTechnology.cc \ - layTipDialog.cc \ - layWidgets.cc \ - rdbInfoWidget.cc \ - rdbMarkerBrowser.cc \ - rdbMarkerBrowserDialog.cc \ - rdbMarkerBrowserPage.cc \ - -# Disabled without Qt: - -HEADERS = \ - gtf.h \ - layAbstractMenu.h \ - layBackgroundAwareTreeStyle.h \ - layBitmap.h \ - layBookmarkList.h \ - layBookmarkManagementForm.h \ - layBookmarksView.h \ - layBrowseInstancesForm.h \ - layBrowseShapesForm.h \ - layBrowser.h \ - layBrowserDialog.h \ - layBrowserPanel.h \ - layBusy.h \ - layCellSelectionForm.h \ - layCellTreeModel.h \ - layConfigurationDialog.h \ - layColor.h \ - layCursor.h \ - layDialogs.h \ - layDragDropData.h \ - layEditLineStyleWidget.h \ - layEditLineStylesForm.h \ - layEditStippleWidget.h \ - layEditStipplesForm.h \ - layEditorOptionsFrame.h \ - layEditorOptionsPage.h \ - layEditorOptionsPages.h \ - layFileDialog.h \ - layGenericSyntaxHighlighter.h \ - layGridNetConfigPage.h \ - layHierarchyControlPanel.h \ - layIndexedNetlistModel.h \ - layItemDelegates.h \ - layLayerControlPanel.h \ - layLayerMappingWidget.h \ - layLayerToolbox.h \ - layLayerTreeModel.h \ - layLayoutPropertiesForm.h \ - layLayoutStatisticsForm.h \ - layLayoutViewConfigPages.h \ - layLayoutViewFunctions.h \ - layLibrariesView.h \ - layLoadLayoutOptionsDialog.h \ - layNetExportDialog.h \ - layNetInfoDialog.h \ - layNetlistBrowser.h \ - layNetlistBrowserDialog.h \ - layNetlistBrowserModel.h \ - layNetlistBrowserPage.h \ - layNetlistBrowserTreeModel.h \ - layNetlistCrossReferenceModel.h \ - layPluginConfigPage.h \ - layProperties.h \ - layPropertiesDialog.h \ - layQtTools.h \ - laySaveLayoutOptionsDialog.h \ - laySelectCellViewForm.h \ - laySelectLineStyleForm.h \ - laySelectStippleForm.h \ - layStream.h \ - layTechnology.h \ - layTipDialog.h \ - layWidgets.h \ - laybasicConfig.h \ - rdbInfoWidget.h \ - rdbMarkerBrowser.h \ - rdbMarkerBrowserDialog.h \ - rdbMarkerBrowserPage.h \ - -# Enabled without Qt: - SOURCES += \ - gsiDeclLayLayers.cc \ - gsiDeclLayLayoutView.cc \ - gsiDeclLayMarker.cc \ - gsiDeclLayPlugin.cc \ - gsiDeclLayPixelBuffer.cc \ - laybasicForceLink.cc \ - layAnnotationShapes.cc \ - layBitmap.cc \ - layBitmapRenderer.cc \ - layBitmapsToImage.cc \ - layCellView.cc \ - layColor.cc \ - layColorPalette.cc \ - layConverters.cc \ - layDispatcher.cc \ - layDisplayState.cc \ - layDitherPattern.cc \ - layDrawing.cc \ - layEditable.cc \ - layEditorServiceBase.cc \ - layFinder.cc \ - layGridNet.cc \ - layFixedFont.cc \ - layLayoutCanvas.cc \ - layLayoutView.cc \ - layLineStylePalette.cc \ - layLineStyles.cc \ - layMarker.cc \ - layMouseTracker.cc \ - layMove.cc \ - layNetColorizer.cc \ - layObjectInstPath.cc \ - layParsedLayerSource.cc \ - layPixelBuffer.cc \ - layPixelBufferPainter.cc \ - layPlugin.cc \ - layRedrawLayerInfo.cc \ - layRedrawThread.cc \ - layRedrawThreadCanvas.cc \ - layRedrawThreadWorker.cc \ - layRenderer.cc \ - layRubberBox.cc \ - laySelector.cc \ - laySnap.cc \ - layStipplePalette.cc \ - layCanvasPlane.cc \ - layLayoutViewBase.cc \ - layLayerProperties.cc \ - layViewObject.cc \ - layViewOp.cc \ - layViewport.cc \ - layZoomBox.cc \ - -# Enabled without Qt: + gsiDeclLayLayers.cc \ + gsiDeclLayLayoutViewBase.cc \ + gsiDeclLayMarker.cc \ + gsiDeclLayPlugin.cc \ + gsiDeclLayPixelBuffer.cc \ + laybasicForceLink.cc \ + layAnnotationShapes.cc \ + layBitmap.cc \ + layBitmapRenderer.cc \ + layBitmapsToImage.cc \ + layBookmarkList.cc \ + layCellView.cc \ + layColor.cc \ + layColorPalette.cc \ + layConverters.cc \ + layDispatcher.cc \ + layDisplayState.cc \ + layDitherPattern.cc \ + layDrawing.cc \ + layEditable.cc \ + layEditorServiceBase.cc \ + layFinder.cc \ + layFixedFont.cc \ + layLayoutCanvas.cc \ + layLineStylePalette.cc \ + layLineStyles.cc \ + layMarker.cc \ + layMouseTracker.cc \ + layMove.cc \ + layNetColorizer.cc \ + layObjectInstPath.cc \ + layParsedLayerSource.cc \ + layPixelBuffer.cc \ + layPixelBufferPainter.cc \ + layPlugin.cc \ + layRedrawLayerInfo.cc \ + layRedrawThread.cc \ + layRedrawThreadCanvas.cc \ + layRedrawThreadWorker.cc \ + layRenderer.cc \ + layRubberBox.cc \ + laySelector.cc \ + laySnap.cc \ + layStream.cc \ + layStipplePalette.cc \ + layCanvasPlane.cc \ + layLayoutViewBase.cc \ + layLayerProperties.cc \ + layViewObject.cc \ + layViewOp.cc \ + layViewport.cc \ + layZoomBox.cc \ HEADERS += \ - laybasicForceLink.h \ - layAnnotationShapes.h \ - layBitmap.h \ - layBitmapRenderer.h \ - layBitmapsToImage.h \ - layCellView.h \ - layColorPalette.h \ - layConverters.h \ - layDispatcher.h \ - layDisplayState.h \ - layDitherPattern.h \ - layDrawing.h \ - layEditable.h \ - layEditorServiceBase.h \ - layLayoutCanvas.h \ - layLayoutView.h \ - layFinder.h \ - layFixedFont.h \ - layGridNet.h \ - layLayoutViewBase.h \ - layLineStylePalette.h \ - layLineStyles.h \ - layMarker.h \ - layMouseTracker.h \ - layMove.h \ - layNetColorizer.h \ - layObjectInstPath.h \ - layParsedLayerSource.h \ - layPixelBuffer.h \ - layPixelBufferPainter.h \ - layPlugin.h \ - layRedrawLayerInfo.h \ - layRedrawThread.h \ - layRedrawThreadCanvas.h \ - layRedrawThreadWorker.h \ - layRenderer.h \ - layRubberBox.h \ - laySelector.h \ - laySnap.h \ - layStipplePalette.h \ - layLayerProperties.h \ - layCanvasPlane.h \ - layViewObject.h \ - layViewOp.h \ - layViewport.h \ - layZoomBox.h \ - laybasicCommon.h \ + laybasicConfig.h \ + laybasicForceLink.h \ + layAnnotationShapes.h \ + layBitmap.h \ + layBitmapRenderer.h \ + layBitmapsToImage.h \ + layBookmarkList.h \ + layCellView.h \ + layColorPalette.h \ + layColor.h \ + layConverters.h \ + layDispatcher.h \ + layDisplayState.h \ + layDitherPattern.h \ + layDrawing.h \ + layEditable.h \ + layEditorServiceBase.h \ + layLayoutCanvas.h \ + layFinder.h \ + layFixedFont.h \ + layLayoutViewBase.h \ + layLineStylePalette.h \ + layLineStyles.h \ + layMarker.h \ + layMouseTracker.h \ + layMove.h \ + layNetColorizer.h \ + layObjectInstPath.h \ + layParsedLayerSource.h \ + layPixelBuffer.h \ + layPixelBufferPainter.h \ + layPlugin.h \ + layRedrawLayerInfo.h \ + layRedrawThread.h \ + layRedrawThreadCanvas.h \ + layRedrawThreadWorker.h \ + layRenderer.h \ + layRubberBox.h \ + laySelector.h \ + laySnap.h \ + layStream.h \ + layStipplePalette.h \ + layLayerProperties.h \ + layCanvasPlane.h \ + layViewObject.h \ + layViewOp.h \ + layViewport.h \ + layZoomBox.h \ + laybasicCommon.h \ INCLUDEPATH += $$TL_INC $$GSI_INC $$DB_INC $$RDB_INC diff --git a/src/laybasic/unit_tests/layLayerProperties.cc b/src/laybasic/unit_tests/layLayerProperties.cc index 3ef24eeea..577fe062c 100644 --- a/src/laybasic/unit_tests/layLayerProperties.cc +++ b/src/laybasic/unit_tests/layLayerProperties.cc @@ -23,7 +23,7 @@ #include "layLayerProperties.h" -#include "layLayoutView.h" +#include "layLayoutViewBase.h" #include "tlXMLParser.h" #include "tlUnitTest.h" #include "dbLayout.h" @@ -1304,7 +1304,7 @@ TEST (16) lay::LayerPropertiesList list; db::Manager mgr (true); - lay::LayoutView view (&mgr, is_editable (), 0); + lay::LayoutViewBase view (&mgr, is_editable (), 0); list.attach_view (&view, 0); int cv1 = view.create_layout ("", true, false); @@ -1356,7 +1356,7 @@ TEST (17) lay::LayerPropertiesList list; db::Manager mgr (true); - lay::LayoutView view (&mgr, is_editable (), 0); + lay::LayoutViewBase view (&mgr, is_editable (), 0); list.attach_view (&view, 0); int cv1 = view.create_layout ("", true, false); @@ -1423,7 +1423,7 @@ TEST (18) lay::LayerPropertiesList list; db::Manager mgr (true); - lay::LayoutView view (&mgr, is_editable (), 0); + lay::LayoutViewBase view (&mgr, is_editable (), 0); list.attach_view (&view, 0); int cv1 = view.create_layout ("", true, false); @@ -1491,7 +1491,7 @@ TEST (19) lay::LayerPropertiesList list; db::Manager mgr (true); - lay::LayoutView view (&mgr, is_editable (), 0); + lay::LayoutViewBase view (&mgr, is_editable (), 0); list.attach_view (&view, 0); int cv1 = view.create_layout ("", true, false); @@ -1560,7 +1560,7 @@ TEST (20) lay::LayerPropertiesList list; db::Manager mgr (true); - lay::LayoutView view (&mgr, is_editable (), 0); + lay::LayoutViewBase view (&mgr, is_editable (), 0); list.attach_view (&view, 0); int cv1 = view.create_layout ("", true, false); @@ -1632,7 +1632,7 @@ TEST (21) lay::LayerPropertiesList list; db::Manager mgr (true); - lay::LayoutView view (&mgr, is_editable (), 0); + lay::LayoutViewBase view (&mgr, is_editable (), 0); list.attach_view (&view, 0); int cv1 = view.create_layout ("", true, false); diff --git a/src/laybasic/unit_tests/laySnapTests.cc b/src/laybasic/unit_tests/laySnapTests.cc index f51e28c11..f975386c8 100644 --- a/src/laybasic/unit_tests/laySnapTests.cc +++ b/src/laybasic/unit_tests/laySnapTests.cc @@ -21,14 +21,14 @@ */ #include "laySnap.h" -#include "layLayoutView.h" +#include "layLayoutViewBase.h" #include "tlUnitTest.h" TEST(1) { db::Manager mgr (true); - lay::LayoutView view (&mgr, is_editable (), 0); + lay::LayoutViewBase view (&mgr, is_editable (), 0); int cv1 = view.create_layout ("", true, false); db::Layout &ly1 = view.cellview (cv1)->layout (); diff --git a/src/laybasic/unit_tests/unit_tests.pro b/src/laybasic/unit_tests/unit_tests.pro index 2fd4d74af..e906d3a46 100644 --- a/src/laybasic/unit_tests/unit_tests.pro +++ b/src/laybasic/unit_tests/unit_tests.pro @@ -14,19 +14,10 @@ SOURCES = \ layLayerProperties.cc \ layParsedLayerSource.cc \ layPixelBufferTests.cc \ - layLayoutViewTests.cc \ layRenderer.cc \ layAbstractMenuTests.cc \ laySnapTests.cc -!equals(HAVE_QT, "0") { - - SOURCES += \ - layNetlistBrowserModelTests.cc \ - layNetlistBrowserTreeModelTests.cc \ - -} - INCLUDEPATH += $$TL_INC $$LAYBASIC_INC $$DB_INC $$GSI_INC $$OUT_PWD/../laybasic DEPENDPATH += $$TL_INC $$LAYBASIC_INC $$DB_INC $$GSI_INC $$OUT_PWD/../laybasic diff --git a/src/layui/layui.pro b/src/layui/layui.pro new file mode 100644 index 000000000..19b992d3c --- /dev/null +++ b/src/layui/layui.pro @@ -0,0 +1,6 @@ + +TEMPLATE = subdirs +SUBDIRS = layui unit_tests + +unit_tests.depends += layui + diff --git a/src/laybasic/laybasic/AlignCellOptionsDialog.ui b/src/layui/layui/AlignCellOptionsDialog.ui similarity index 100% rename from src/laybasic/laybasic/AlignCellOptionsDialog.ui rename to src/layui/layui/AlignCellOptionsDialog.ui diff --git a/src/laybasic/laybasic/BookmarkManagementForm.ui b/src/layui/layui/BookmarkManagementForm.ui similarity index 100% rename from src/laybasic/laybasic/BookmarkManagementForm.ui rename to src/layui/layui/BookmarkManagementForm.ui diff --git a/src/laybasic/laybasic/BrowseInstancesConfigPage.ui b/src/layui/layui/BrowseInstancesConfigPage.ui similarity index 100% rename from src/laybasic/laybasic/BrowseInstancesConfigPage.ui rename to src/layui/layui/BrowseInstancesConfigPage.ui diff --git a/src/laybasic/laybasic/BrowseInstancesForm.ui b/src/layui/layui/BrowseInstancesForm.ui similarity index 100% rename from src/laybasic/laybasic/BrowseInstancesForm.ui rename to src/layui/layui/BrowseInstancesForm.ui diff --git a/src/laybasic/laybasic/BrowseShapesConfigPage.ui b/src/layui/layui/BrowseShapesConfigPage.ui similarity index 100% rename from src/laybasic/laybasic/BrowseShapesConfigPage.ui rename to src/layui/layui/BrowseShapesConfigPage.ui diff --git a/src/laybasic/laybasic/BrowseShapesForm.ui b/src/layui/layui/BrowseShapesForm.ui similarity index 100% rename from src/laybasic/laybasic/BrowseShapesForm.ui rename to src/layui/layui/BrowseShapesForm.ui diff --git a/src/laybasic/laybasic/BrowserDialog.ui b/src/layui/layui/BrowserDialog.ui similarity index 100% rename from src/laybasic/laybasic/BrowserDialog.ui rename to src/layui/layui/BrowserDialog.ui diff --git a/src/laybasic/laybasic/BrowserPanel.ui b/src/layui/layui/BrowserPanel.ui similarity index 100% rename from src/laybasic/laybasic/BrowserPanel.ui rename to src/layui/layui/BrowserPanel.ui diff --git a/src/laybasic/laybasic/CellSelectionForm.ui b/src/layui/layui/CellSelectionForm.ui similarity index 100% rename from src/laybasic/laybasic/CellSelectionForm.ui rename to src/layui/layui/CellSelectionForm.ui diff --git a/src/laybasic/laybasic/ClearLayerModeDialog.ui b/src/layui/layui/ClearLayerModeDialog.ui similarity index 100% rename from src/laybasic/laybasic/ClearLayerModeDialog.ui rename to src/layui/layui/ClearLayerModeDialog.ui diff --git a/src/laybasic/laybasic/ConfigurationDialog.ui b/src/layui/layui/ConfigurationDialog.ui similarity index 100% rename from src/laybasic/laybasic/ConfigurationDialog.ui rename to src/layui/layui/ConfigurationDialog.ui diff --git a/src/laybasic/laybasic/CopyCellModeDialog.ui b/src/layui/layui/CopyCellModeDialog.ui similarity index 100% rename from src/laybasic/laybasic/CopyCellModeDialog.ui rename to src/layui/layui/CopyCellModeDialog.ui diff --git a/src/laybasic/laybasic/DeleteCellModeDialog.ui b/src/layui/layui/DeleteCellModeDialog.ui similarity index 100% rename from src/laybasic/laybasic/DeleteCellModeDialog.ui rename to src/layui/layui/DeleteCellModeDialog.ui diff --git a/src/laybasic/laybasic/DuplicateLayerDialog.ui b/src/layui/layui/DuplicateLayerDialog.ui similarity index 100% rename from src/laybasic/laybasic/DuplicateLayerDialog.ui rename to src/layui/layui/DuplicateLayerDialog.ui diff --git a/src/laybasic/laybasic/EditLineStylesForm.ui b/src/layui/layui/EditLineStylesForm.ui similarity index 100% rename from src/laybasic/laybasic/EditLineStylesForm.ui rename to src/layui/layui/EditLineStylesForm.ui diff --git a/src/laybasic/laybasic/EditStipplesForm.ui b/src/layui/layui/EditStipplesForm.ui similarity index 100% rename from src/laybasic/laybasic/EditStipplesForm.ui rename to src/layui/layui/EditStipplesForm.ui diff --git a/src/laybasic/laybasic/FlattenInstOptionsDialog.ui b/src/layui/layui/FlattenInstOptionsDialog.ui similarity index 100% rename from src/laybasic/laybasic/FlattenInstOptionsDialog.ui rename to src/layui/layui/FlattenInstOptionsDialog.ui diff --git a/src/laybasic/laybasic/GridNetConfigPage.ui b/src/layui/layui/GridNetConfigPage.ui similarity index 100% rename from src/laybasic/laybasic/GridNetConfigPage.ui rename to src/layui/layui/GridNetConfigPage.ui diff --git a/src/laybasic/laybasic/LayerMappingWidget.ui b/src/layui/layui/LayerMappingWidget.ui similarity index 100% rename from src/laybasic/laybasic/LayerMappingWidget.ui rename to src/layui/layui/LayerMappingWidget.ui diff --git a/src/laybasic/laybasic/LayerSourceDialog.ui b/src/layui/layui/LayerSourceDialog.ui similarity index 100% rename from src/laybasic/laybasic/LayerSourceDialog.ui rename to src/layui/layui/LayerSourceDialog.ui diff --git a/src/laybasic/laybasic/LayoutProperties.ui b/src/layui/layui/LayoutProperties.ui similarity index 100% rename from src/laybasic/laybasic/LayoutProperties.ui rename to src/layui/layui/LayoutProperties.ui diff --git a/src/laybasic/laybasic/LayoutStatistics.ui b/src/layui/layui/LayoutStatistics.ui similarity index 100% rename from src/laybasic/laybasic/LayoutStatistics.ui rename to src/layui/layui/LayoutStatistics.ui diff --git a/src/laybasic/laybasic/LayoutViewConfigPage.ui b/src/layui/layui/LayoutViewConfigPage.ui similarity index 100% rename from src/laybasic/laybasic/LayoutViewConfigPage.ui rename to src/layui/layui/LayoutViewConfigPage.ui diff --git a/src/laybasic/laybasic/LayoutViewConfigPage1.ui b/src/layui/layui/LayoutViewConfigPage1.ui similarity index 100% rename from src/laybasic/laybasic/LayoutViewConfigPage1.ui rename to src/layui/layui/LayoutViewConfigPage1.ui diff --git a/src/laybasic/laybasic/LayoutViewConfigPage2a.ui b/src/layui/layui/LayoutViewConfigPage2a.ui similarity index 100% rename from src/laybasic/laybasic/LayoutViewConfigPage2a.ui rename to src/layui/layui/LayoutViewConfigPage2a.ui diff --git a/src/laybasic/laybasic/LayoutViewConfigPage2b.ui b/src/layui/layui/LayoutViewConfigPage2b.ui similarity index 100% rename from src/laybasic/laybasic/LayoutViewConfigPage2b.ui rename to src/layui/layui/LayoutViewConfigPage2b.ui diff --git a/src/laybasic/laybasic/LayoutViewConfigPage2c.ui b/src/layui/layui/LayoutViewConfigPage2c.ui similarity index 100% rename from src/laybasic/laybasic/LayoutViewConfigPage2c.ui rename to src/layui/layui/LayoutViewConfigPage2c.ui diff --git a/src/laybasic/laybasic/LayoutViewConfigPage2d.ui b/src/layui/layui/LayoutViewConfigPage2d.ui similarity index 100% rename from src/laybasic/laybasic/LayoutViewConfigPage2d.ui rename to src/layui/layui/LayoutViewConfigPage2d.ui diff --git a/src/laybasic/laybasic/LayoutViewConfigPage3a.ui b/src/layui/layui/LayoutViewConfigPage3a.ui similarity index 100% rename from src/laybasic/laybasic/LayoutViewConfigPage3a.ui rename to src/layui/layui/LayoutViewConfigPage3a.ui diff --git a/src/laybasic/laybasic/LayoutViewConfigPage3b.ui b/src/layui/layui/LayoutViewConfigPage3b.ui similarity index 100% rename from src/laybasic/laybasic/LayoutViewConfigPage3b.ui rename to src/layui/layui/LayoutViewConfigPage3b.ui diff --git a/src/laybasic/laybasic/LayoutViewConfigPage3c.ui b/src/layui/layui/LayoutViewConfigPage3c.ui similarity index 100% rename from src/laybasic/laybasic/LayoutViewConfigPage3c.ui rename to src/layui/layui/LayoutViewConfigPage3c.ui diff --git a/src/laybasic/laybasic/LayoutViewConfigPage3f.ui b/src/layui/layui/LayoutViewConfigPage3f.ui similarity index 100% rename from src/laybasic/laybasic/LayoutViewConfigPage3f.ui rename to src/layui/layui/LayoutViewConfigPage3f.ui diff --git a/src/laybasic/laybasic/LayoutViewConfigPage4.ui b/src/layui/layui/LayoutViewConfigPage4.ui similarity index 100% rename from src/laybasic/laybasic/LayoutViewConfigPage4.ui rename to src/layui/layui/LayoutViewConfigPage4.ui diff --git a/src/laybasic/laybasic/LayoutViewConfigPage5.ui b/src/layui/layui/LayoutViewConfigPage5.ui similarity index 100% rename from src/laybasic/laybasic/LayoutViewConfigPage5.ui rename to src/layui/layui/LayoutViewConfigPage5.ui diff --git a/src/laybasic/laybasic/LayoutViewConfigPage6.ui b/src/layui/layui/LayoutViewConfigPage6.ui similarity index 100% rename from src/laybasic/laybasic/LayoutViewConfigPage6.ui rename to src/layui/layui/LayoutViewConfigPage6.ui diff --git a/src/laybasic/laybasic/LayoutViewConfigPage6a.ui b/src/layui/layui/LayoutViewConfigPage6a.ui similarity index 100% rename from src/laybasic/laybasic/LayoutViewConfigPage6a.ui rename to src/layui/layui/LayoutViewConfigPage6a.ui diff --git a/src/laybasic/laybasic/LayoutViewConfigPage7.ui b/src/layui/layui/LayoutViewConfigPage7.ui similarity index 100% rename from src/laybasic/laybasic/LayoutViewConfigPage7.ui rename to src/layui/layui/LayoutViewConfigPage7.ui diff --git a/src/laybasic/laybasic/LibraryCellSelectionForm.ui b/src/layui/layui/LibraryCellSelectionForm.ui similarity index 100% rename from src/laybasic/laybasic/LibraryCellSelectionForm.ui rename to src/layui/layui/LibraryCellSelectionForm.ui diff --git a/src/laybasic/laybasic/LoadLayoutOptionsDialog.ui b/src/layui/layui/LoadLayoutOptionsDialog.ui similarity index 100% rename from src/laybasic/laybasic/LoadLayoutOptionsDialog.ui rename to src/layui/layui/LoadLayoutOptionsDialog.ui diff --git a/src/laybasic/laybasic/MarkerBrowserConfigPage.ui b/src/layui/layui/MarkerBrowserConfigPage.ui similarity index 100% rename from src/laybasic/laybasic/MarkerBrowserConfigPage.ui rename to src/layui/layui/MarkerBrowserConfigPage.ui diff --git a/src/laybasic/laybasic/MarkerBrowserConfigPage2.ui b/src/layui/layui/MarkerBrowserConfigPage2.ui similarity index 100% rename from src/laybasic/laybasic/MarkerBrowserConfigPage2.ui rename to src/layui/layui/MarkerBrowserConfigPage2.ui diff --git a/src/laybasic/laybasic/MarkerBrowserDialog.ui b/src/layui/layui/MarkerBrowserDialog.ui similarity index 100% rename from src/laybasic/laybasic/MarkerBrowserDialog.ui rename to src/layui/layui/MarkerBrowserDialog.ui diff --git a/src/laybasic/laybasic/MarkerBrowserPage.ui b/src/layui/layui/MarkerBrowserPage.ui similarity index 100% rename from src/laybasic/laybasic/MarkerBrowserPage.ui rename to src/layui/layui/MarkerBrowserPage.ui diff --git a/src/laybasic/laybasic/MarkerBrowserSnapshotView.ui b/src/layui/layui/MarkerBrowserSnapshotView.ui similarity index 100% rename from src/laybasic/laybasic/MarkerBrowserSnapshotView.ui rename to src/layui/layui/MarkerBrowserSnapshotView.ui diff --git a/src/laybasic/laybasic/MoveOptionsDialog.ui b/src/layui/layui/MoveOptionsDialog.ui similarity index 100% rename from src/laybasic/laybasic/MoveOptionsDialog.ui rename to src/layui/layui/MoveOptionsDialog.ui diff --git a/src/laybasic/laybasic/MoveToOptionsDialog.ui b/src/layui/layui/MoveToOptionsDialog.ui similarity index 100% rename from src/laybasic/laybasic/MoveToOptionsDialog.ui rename to src/layui/layui/MoveToOptionsDialog.ui diff --git a/src/laybasic/laybasic/NetExportDialog.ui b/src/layui/layui/NetExportDialog.ui similarity index 100% rename from src/laybasic/laybasic/NetExportDialog.ui rename to src/layui/layui/NetExportDialog.ui diff --git a/src/laybasic/laybasic/NetInfoDialog.ui b/src/layui/layui/NetInfoDialog.ui similarity index 100% rename from src/laybasic/laybasic/NetInfoDialog.ui rename to src/layui/layui/NetInfoDialog.ui diff --git a/src/laybasic/laybasic/NetlistBrowserConfigPage.ui b/src/layui/layui/NetlistBrowserConfigPage.ui similarity index 100% rename from src/laybasic/laybasic/NetlistBrowserConfigPage.ui rename to src/layui/layui/NetlistBrowserConfigPage.ui diff --git a/src/laybasic/laybasic/NetlistBrowserConfigPage2.ui b/src/layui/layui/NetlistBrowserConfigPage2.ui similarity index 100% rename from src/laybasic/laybasic/NetlistBrowserConfigPage2.ui rename to src/layui/layui/NetlistBrowserConfigPage2.ui diff --git a/src/laybasic/laybasic/NetlistBrowserDialog.ui b/src/layui/layui/NetlistBrowserDialog.ui similarity index 100% rename from src/laybasic/laybasic/NetlistBrowserDialog.ui rename to src/layui/layui/NetlistBrowserDialog.ui diff --git a/src/laybasic/laybasic/NetlistBrowserPage.ui b/src/layui/layui/NetlistBrowserPage.ui similarity index 100% rename from src/laybasic/laybasic/NetlistBrowserPage.ui rename to src/layui/layui/NetlistBrowserPage.ui diff --git a/src/laybasic/laybasic/NewCellPropertiesDialog.ui b/src/layui/layui/NewCellPropertiesDialog.ui similarity index 100% rename from src/laybasic/laybasic/NewCellPropertiesDialog.ui rename to src/layui/layui/NewCellPropertiesDialog.ui diff --git a/src/laybasic/laybasic/NewLayerPropertiesDialog.ui b/src/layui/layui/NewLayerPropertiesDialog.ui similarity index 100% rename from src/laybasic/laybasic/NewLayerPropertiesDialog.ui rename to src/layui/layui/NewLayerPropertiesDialog.ui diff --git a/src/laybasic/laybasic/NewLayoutPropertiesDialog.ui b/src/layui/layui/NewLayoutPropertiesDialog.ui similarity index 100% rename from src/laybasic/laybasic/NewLayoutPropertiesDialog.ui rename to src/layui/layui/NewLayoutPropertiesDialog.ui diff --git a/src/laybasic/laybasic/OpenLayoutModeDialog.ui b/src/layui/layui/OpenLayoutModeDialog.ui similarity index 100% rename from src/laybasic/laybasic/OpenLayoutModeDialog.ui rename to src/layui/layui/OpenLayoutModeDialog.ui diff --git a/src/laybasic/laybasic/RenameCellDialog.ui b/src/layui/layui/RenameCellDialog.ui similarity index 100% rename from src/laybasic/laybasic/RenameCellDialog.ui rename to src/layui/layui/RenameCellDialog.ui diff --git a/src/laybasic/laybasic/ReplaceCellOptionsDialog.ui b/src/layui/layui/ReplaceCellOptionsDialog.ui similarity index 100% rename from src/laybasic/laybasic/ReplaceCellOptionsDialog.ui rename to src/layui/layui/ReplaceCellOptionsDialog.ui diff --git a/src/laybasic/laybasic/SaveLayoutAsOptionsDialog.ui b/src/layui/layui/SaveLayoutAsOptionsDialog.ui similarity index 100% rename from src/laybasic/laybasic/SaveLayoutAsOptionsDialog.ui rename to src/layui/layui/SaveLayoutAsOptionsDialog.ui diff --git a/src/laybasic/laybasic/SaveLayoutOptionsDialog.ui b/src/layui/layui/SaveLayoutOptionsDialog.ui similarity index 100% rename from src/laybasic/laybasic/SaveLayoutOptionsDialog.ui rename to src/layui/layui/SaveLayoutOptionsDialog.ui diff --git a/src/laybasic/laybasic/SelectCellViewForm.ui b/src/layui/layui/SelectCellViewForm.ui similarity index 100% rename from src/laybasic/laybasic/SelectCellViewForm.ui rename to src/layui/layui/SelectCellViewForm.ui diff --git a/src/laybasic/laybasic/SelectLineStyleForm.ui b/src/layui/layui/SelectLineStyleForm.ui similarity index 100% rename from src/laybasic/laybasic/SelectLineStyleForm.ui rename to src/layui/layui/SelectLineStyleForm.ui diff --git a/src/laybasic/laybasic/SelectStippleForm.ui b/src/layui/layui/SelectStippleForm.ui similarity index 100% rename from src/laybasic/laybasic/SelectStippleForm.ui rename to src/layui/layui/SelectStippleForm.ui diff --git a/src/laybasic/laybasic/SpecificLoadLayoutOptionsDialog.ui b/src/layui/layui/SpecificLoadLayoutOptionsDialog.ui similarity index 100% rename from src/laybasic/laybasic/SpecificLoadLayoutOptionsDialog.ui rename to src/layui/layui/SpecificLoadLayoutOptionsDialog.ui diff --git a/src/laybasic/laybasic/TipDialog.ui b/src/layui/layui/TipDialog.ui similarity index 100% rename from src/laybasic/laybasic/TipDialog.ui rename to src/layui/layui/TipDialog.ui diff --git a/src/laybasic/laybasic/UserPropertiesEditForm.ui b/src/layui/layui/UserPropertiesEditForm.ui similarity index 100% rename from src/laybasic/laybasic/UserPropertiesEditForm.ui rename to src/layui/layui/UserPropertiesEditForm.ui diff --git a/src/laybasic/laybasic/UserPropertiesForm.ui b/src/layui/layui/UserPropertiesForm.ui similarity index 100% rename from src/laybasic/laybasic/UserPropertiesForm.ui rename to src/layui/layui/UserPropertiesForm.ui diff --git a/src/laybasic/laybasic/gsiDeclLayDialogs.cc b/src/layui/layui/gsiDeclLayDialogs.cc similarity index 99% rename from src/laybasic/laybasic/gsiDeclLayDialogs.cc rename to src/layui/layui/gsiDeclLayDialogs.cc index 61a598926..db506bb9e 100644 --- a/src/laybasic/laybasic/gsiDeclLayDialogs.cc +++ b/src/layui/layui/gsiDeclLayDialogs.cc @@ -390,7 +390,7 @@ Class decl_BrowserSource ("lay", "BrowserSource_Native", "@hide\n@alias BrowserSource" ); -LAYBASIC_PUBLIC +LAYUI_PUBLIC Class &laybasicdecl_BrowserSource () { return decl_BrowserSource; diff --git a/src/laybasic/laybasic/gsiDeclLayMenu.cc b/src/layui/layui/gsiDeclLayMenu.cc similarity index 100% rename from src/laybasic/laybasic/gsiDeclLayMenu.cc rename to src/layui/layui/gsiDeclLayMenu.cc diff --git a/src/laybasic/laybasic/gsiDeclLayNetlistBrowserDialog.cc b/src/layui/layui/gsiDeclLayNetlistBrowserDialog.cc similarity index 97% rename from src/laybasic/laybasic/gsiDeclLayNetlistBrowserDialog.cc rename to src/layui/layui/gsiDeclLayNetlistBrowserDialog.cc index 0190f3890..7f8d3c971 100644 --- a/src/laybasic/laybasic/gsiDeclLayNetlistBrowserDialog.cc +++ b/src/layui/layui/gsiDeclLayNetlistBrowserDialog.cc @@ -25,8 +25,10 @@ #include "gsiDecl.h" #include "gsiDeclBasic.h" #include "gsiSignals.h" +#include "dbNetlist.h" #include "layNetlistBrowserDialog.h" -#include "layLayoutView.h" +#include "layNetlistBrowserModel.h" +#include "layLayoutViewBase.h" namespace gsi { @@ -205,14 +207,14 @@ Class decl_NetlistBrowserDialog ("lay", "NetlistBrows "This class has been introduced in version 0.27.\n" ); -static lay::NetlistBrowserDialog *netlist_browser (lay::LayoutView *lv) +static lay::NetlistBrowserDialog *netlist_browser (lay::LayoutViewBase *lv) { return lv->get_plugin (); } -// extend lay::LayoutView with the getter for the netlist browser +// extend lay::LayoutViewBase with the getter for the netlist browser static -gsi::ClassExt decl_ext_layout_view ( +gsi::ClassExt decl_ext_layout_view ( gsi::method_ext ("netlist_browser", &netlist_browser, "@brief Gets the netlist browser object for the given layout view\n" "\n" diff --git a/src/laybasic/laybasic/gsiDeclLayStream.cc b/src/layui/layui/gsiDeclLayStream.cc similarity index 100% rename from src/laybasic/laybasic/gsiDeclLayStream.cc rename to src/layui/layui/gsiDeclLayStream.cc diff --git a/src/laybasic/laybasic/images/icon_circuit_16.png b/src/layui/layui/images/icon_circuit_16.png similarity index 100% rename from src/laybasic/laybasic/images/icon_circuit_16.png rename to src/layui/layui/images/icon_circuit_16.png diff --git a/src/laybasic/laybasic/images/icon_circuit_24.png b/src/layui/layui/images/icon_circuit_24.png similarity index 100% rename from src/laybasic/laybasic/images/icon_circuit_24.png rename to src/layui/layui/images/icon_circuit_24.png diff --git a/src/laybasic/laybasic/images/icon_circuit_32.png b/src/layui/layui/images/icon_circuit_32.png similarity index 100% rename from src/laybasic/laybasic/images/icon_circuit_32.png rename to src/layui/layui/images/icon_circuit_32.png diff --git a/src/laybasic/laybasic/images/icon_circuit_48.png b/src/layui/layui/images/icon_circuit_48.png similarity index 100% rename from src/laybasic/laybasic/images/icon_circuit_48.png rename to src/layui/layui/images/icon_circuit_48.png diff --git a/src/laybasic/laybasic/images/icon_conn_16.png b/src/layui/layui/images/icon_conn_16.png similarity index 100% rename from src/laybasic/laybasic/images/icon_conn_16.png rename to src/layui/layui/images/icon_conn_16.png diff --git a/src/laybasic/laybasic/images/icon_conn_24.png b/src/layui/layui/images/icon_conn_24.png similarity index 100% rename from src/laybasic/laybasic/images/icon_conn_24.png rename to src/layui/layui/images/icon_conn_24.png diff --git a/src/laybasic/laybasic/images/icon_conn_32.png b/src/layui/layui/images/icon_conn_32.png similarity index 100% rename from src/laybasic/laybasic/images/icon_conn_32.png rename to src/layui/layui/images/icon_conn_32.png diff --git a/src/laybasic/laybasic/images/icon_conn_48.png b/src/layui/layui/images/icon_conn_48.png similarity index 100% rename from src/laybasic/laybasic/images/icon_conn_48.png rename to src/layui/layui/images/icon_conn_48.png diff --git a/src/laybasic/laybasic/images/icon_conn_light_16.png b/src/layui/layui/images/icon_conn_light_16.png similarity index 100% rename from src/laybasic/laybasic/images/icon_conn_light_16.png rename to src/layui/layui/images/icon_conn_light_16.png diff --git a/src/laybasic/laybasic/images/icon_conn_light_24.png b/src/layui/layui/images/icon_conn_light_24.png similarity index 100% rename from src/laybasic/laybasic/images/icon_conn_light_24.png rename to src/layui/layui/images/icon_conn_light_24.png diff --git a/src/laybasic/laybasic/images/icon_conn_light_32.png b/src/layui/layui/images/icon_conn_light_32.png similarity index 100% rename from src/laybasic/laybasic/images/icon_conn_light_32.png rename to src/layui/layui/images/icon_conn_light_32.png diff --git a/src/laybasic/laybasic/images/icon_conn_light_48.png b/src/layui/layui/images/icon_conn_light_48.png similarity index 100% rename from src/laybasic/laybasic/images/icon_conn_light_48.png rename to src/layui/layui/images/icon_conn_light_48.png diff --git a/src/laybasic/laybasic/images/icon_device_bjt_16.png b/src/layui/layui/images/icon_device_bjt_16.png similarity index 100% rename from src/laybasic/laybasic/images/icon_device_bjt_16.png rename to src/layui/layui/images/icon_device_bjt_16.png diff --git a/src/laybasic/laybasic/images/icon_device_bjt_24.png b/src/layui/layui/images/icon_device_bjt_24.png similarity index 100% rename from src/laybasic/laybasic/images/icon_device_bjt_24.png rename to src/layui/layui/images/icon_device_bjt_24.png diff --git a/src/laybasic/laybasic/images/icon_device_bjt_32.png b/src/layui/layui/images/icon_device_bjt_32.png similarity index 100% rename from src/laybasic/laybasic/images/icon_device_bjt_32.png rename to src/layui/layui/images/icon_device_bjt_32.png diff --git a/src/laybasic/laybasic/images/icon_device_bjt_48.png b/src/layui/layui/images/icon_device_bjt_48.png similarity index 100% rename from src/laybasic/laybasic/images/icon_device_bjt_48.png rename to src/layui/layui/images/icon_device_bjt_48.png diff --git a/src/laybasic/laybasic/images/icon_device_cap_16.png b/src/layui/layui/images/icon_device_cap_16.png similarity index 100% rename from src/laybasic/laybasic/images/icon_device_cap_16.png rename to src/layui/layui/images/icon_device_cap_16.png diff --git a/src/laybasic/laybasic/images/icon_device_cap_24.png b/src/layui/layui/images/icon_device_cap_24.png similarity index 100% rename from src/laybasic/laybasic/images/icon_device_cap_24.png rename to src/layui/layui/images/icon_device_cap_24.png diff --git a/src/laybasic/laybasic/images/icon_device_cap_32.png b/src/layui/layui/images/icon_device_cap_32.png similarity index 100% rename from src/laybasic/laybasic/images/icon_device_cap_32.png rename to src/layui/layui/images/icon_device_cap_32.png diff --git a/src/laybasic/laybasic/images/icon_device_cap_48.png b/src/layui/layui/images/icon_device_cap_48.png similarity index 100% rename from src/laybasic/laybasic/images/icon_device_cap_48.png rename to src/layui/layui/images/icon_device_cap_48.png diff --git a/src/laybasic/laybasic/images/icon_device_diode_16.png b/src/layui/layui/images/icon_device_diode_16.png similarity index 100% rename from src/laybasic/laybasic/images/icon_device_diode_16.png rename to src/layui/layui/images/icon_device_diode_16.png diff --git a/src/laybasic/laybasic/images/icon_device_diode_24.png b/src/layui/layui/images/icon_device_diode_24.png similarity index 100% rename from src/laybasic/laybasic/images/icon_device_diode_24.png rename to src/layui/layui/images/icon_device_diode_24.png diff --git a/src/laybasic/laybasic/images/icon_device_diode_32.png b/src/layui/layui/images/icon_device_diode_32.png similarity index 100% rename from src/laybasic/laybasic/images/icon_device_diode_32.png rename to src/layui/layui/images/icon_device_diode_32.png diff --git a/src/laybasic/laybasic/images/icon_device_diode_48.png b/src/layui/layui/images/icon_device_diode_48.png similarity index 100% rename from src/laybasic/laybasic/images/icon_device_diode_48.png rename to src/layui/layui/images/icon_device_diode_48.png diff --git a/src/laybasic/laybasic/images/icon_device_mos_16.png b/src/layui/layui/images/icon_device_mos_16.png similarity index 100% rename from src/laybasic/laybasic/images/icon_device_mos_16.png rename to src/layui/layui/images/icon_device_mos_16.png diff --git a/src/laybasic/laybasic/images/icon_device_mos_24.png b/src/layui/layui/images/icon_device_mos_24.png similarity index 100% rename from src/laybasic/laybasic/images/icon_device_mos_24.png rename to src/layui/layui/images/icon_device_mos_24.png diff --git a/src/laybasic/laybasic/images/icon_device_mos_32.png b/src/layui/layui/images/icon_device_mos_32.png similarity index 100% rename from src/laybasic/laybasic/images/icon_device_mos_32.png rename to src/layui/layui/images/icon_device_mos_32.png diff --git a/src/laybasic/laybasic/images/icon_device_mos_48.png b/src/layui/layui/images/icon_device_mos_48.png similarity index 100% rename from src/laybasic/laybasic/images/icon_device_mos_48.png rename to src/layui/layui/images/icon_device_mos_48.png diff --git a/src/laybasic/laybasic/images/icon_device_res_16.png b/src/layui/layui/images/icon_device_res_16.png similarity index 100% rename from src/laybasic/laybasic/images/icon_device_res_16.png rename to src/layui/layui/images/icon_device_res_16.png diff --git a/src/laybasic/laybasic/images/icon_device_res_24.png b/src/layui/layui/images/icon_device_res_24.png similarity index 100% rename from src/laybasic/laybasic/images/icon_device_res_24.png rename to src/layui/layui/images/icon_device_res_24.png diff --git a/src/laybasic/laybasic/images/icon_device_res_32.png b/src/layui/layui/images/icon_device_res_32.png similarity index 100% rename from src/laybasic/laybasic/images/icon_device_res_32.png rename to src/layui/layui/images/icon_device_res_32.png diff --git a/src/laybasic/laybasic/images/icon_device_res_48.png b/src/layui/layui/images/icon_device_res_48.png similarity index 100% rename from src/laybasic/laybasic/images/icon_device_res_48.png rename to src/layui/layui/images/icon_device_res_48.png diff --git a/src/laybasic/laybasic/images/icon_net_16.png b/src/layui/layui/images/icon_net_16.png similarity index 100% rename from src/laybasic/laybasic/images/icon_net_16.png rename to src/layui/layui/images/icon_net_16.png diff --git a/src/laybasic/laybasic/images/icon_net_24.png b/src/layui/layui/images/icon_net_24.png similarity index 100% rename from src/laybasic/laybasic/images/icon_net_24.png rename to src/layui/layui/images/icon_net_24.png diff --git a/src/laybasic/laybasic/images/icon_net_32.png b/src/layui/layui/images/icon_net_32.png similarity index 100% rename from src/laybasic/laybasic/images/icon_net_32.png rename to src/layui/layui/images/icon_net_32.png diff --git a/src/laybasic/laybasic/images/icon_net_48.png b/src/layui/layui/images/icon_net_48.png similarity index 100% rename from src/laybasic/laybasic/images/icon_net_48.png rename to src/layui/layui/images/icon_net_48.png diff --git a/src/laybasic/laybasic/images/icon_net_light_16.png b/src/layui/layui/images/icon_net_light_16.png similarity index 100% rename from src/laybasic/laybasic/images/icon_net_light_16.png rename to src/layui/layui/images/icon_net_light_16.png diff --git a/src/laybasic/laybasic/images/icon_net_light_24.png b/src/layui/layui/images/icon_net_light_24.png similarity index 100% rename from src/laybasic/laybasic/images/icon_net_light_24.png rename to src/layui/layui/images/icon_net_light_24.png diff --git a/src/laybasic/laybasic/images/icon_net_light_32.png b/src/layui/layui/images/icon_net_light_32.png similarity index 100% rename from src/laybasic/laybasic/images/icon_net_light_32.png rename to src/layui/layui/images/icon_net_light_32.png diff --git a/src/laybasic/laybasic/images/icon_net_light_48.png b/src/layui/layui/images/icon_net_light_48.png similarity index 100% rename from src/laybasic/laybasic/images/icon_net_light_48.png rename to src/layui/layui/images/icon_net_light_48.png diff --git a/src/laybasic/laybasic/images/icon_pin_16.png b/src/layui/layui/images/icon_pin_16.png similarity index 100% rename from src/laybasic/laybasic/images/icon_pin_16.png rename to src/layui/layui/images/icon_pin_16.png diff --git a/src/laybasic/laybasic/images/icon_pin_24.png b/src/layui/layui/images/icon_pin_24.png similarity index 100% rename from src/laybasic/laybasic/images/icon_pin_24.png rename to src/layui/layui/images/icon_pin_24.png diff --git a/src/laybasic/laybasic/images/icon_pin_32.png b/src/layui/layui/images/icon_pin_32.png similarity index 100% rename from src/laybasic/laybasic/images/icon_pin_32.png rename to src/layui/layui/images/icon_pin_32.png diff --git a/src/laybasic/laybasic/images/icon_pin_48.png b/src/layui/layui/images/icon_pin_48.png similarity index 100% rename from src/laybasic/laybasic/images/icon_pin_48.png rename to src/layui/layui/images/icon_pin_48.png diff --git a/src/laybasic/laybasic/images/icons.svg b/src/layui/layui/images/icons.svg similarity index 100% rename from src/laybasic/laybasic/images/icons.svg rename to src/layui/layui/images/icons.svg diff --git a/src/laybasic/laybasic/images/st_plus_node.png b/src/layui/layui/images/st_plus_node.png similarity index 100% rename from src/laybasic/laybasic/images/st_plus_node.png rename to src/layui/layui/images/st_plus_node.png diff --git a/src/laybasic/laybasic/layBackgroundAwareTreeStyle.cc b/src/layui/layui/layBackgroundAwareTreeStyle.cc similarity index 100% rename from src/laybasic/laybasic/layBackgroundAwareTreeStyle.cc rename to src/layui/layui/layBackgroundAwareTreeStyle.cc diff --git a/src/laybasic/laybasic/layBackgroundAwareTreeStyle.h b/src/layui/layui/layBackgroundAwareTreeStyle.h similarity index 95% rename from src/laybasic/laybasic/layBackgroundAwareTreeStyle.h rename to src/layui/layui/layBackgroundAwareTreeStyle.h index 03ec99000..d0ad1b81a 100644 --- a/src/laybasic/laybasic/layBackgroundAwareTreeStyle.h +++ b/src/layui/layui/layBackgroundAwareTreeStyle.h @@ -25,7 +25,7 @@ #ifndef HDR_layBackgroundAwareTreeStyle #define HDR_layBackgroundAwareTreeStyle -#include "laybasicCommon.h" +#include "layuiCommon.h" #include @@ -39,7 +39,7 @@ namespace lay * The default Gtk style is not, hence making the background dark means the * triangles become invisible. */ -class LAYBASIC_PUBLIC BackgroundAwareTreeStyle +class LAYUI_PUBLIC BackgroundAwareTreeStyle : public QProxyStyle { public: diff --git a/src/laybasic/laybasic/layBookmarkManagementForm.cc b/src/layui/layui/layBookmarkManagementForm.cc similarity index 80% rename from src/laybasic/laybasic/layBookmarkManagementForm.cc rename to src/layui/layui/layBookmarkManagementForm.cc index 51b9358d1..a2f2172f4 100644 --- a/src/laybasic/laybasic/layBookmarkManagementForm.cc +++ b/src/layui/layui/layBookmarkManagementForm.cc @@ -24,7 +24,8 @@ #include "layBookmarkManagementForm.h" #include "dbCellInst.h" -#include "layLayoutView.h" + +#include "ui_BookmarkManagementForm.h" #include @@ -55,17 +56,18 @@ private: // ------------------------------------------------------------ BookmarkManagementForm::BookmarkManagementForm (QWidget *parent, const char *name, const lay::BookmarkList &bookmarks, const std::set &selected) - : QDialog (parent), Ui::BookmarkManagementForm (), + : QDialog (parent), m_bookmarks (bookmarks) { + mp_ui = new Ui::BookmarkManagementForm (); setObjectName (QString::fromUtf8 (name)); - Ui::BookmarkManagementForm::setupUi (this); + mp_ui->setupUi (this); QListWidgetItem *first_item = 0; for (size_t i = 0; i < m_bookmarks.size (); ++i) { - QListWidgetItem *item = new BookmarkListLVI (bookmark_list, m_bookmarks.name (i), m_bookmarks.state (i)); + QListWidgetItem *item = new BookmarkListLVI (mp_ui->bookmark_list, m_bookmarks.name (i), m_bookmarks.state (i)); item->setSelected (selected.find (i) != selected.end ()); if (! first_item && item->isSelected ()) { first_item = item; @@ -73,16 +75,16 @@ BookmarkManagementForm::BookmarkManagementForm (QWidget *parent, const char *nam } if (first_item) { - bookmark_list->scrollToItem (first_item); + mp_ui->bookmark_list->scrollToItem (first_item); } - connect (delete_button, SIGNAL (clicked ()), this, SLOT (delete_pressed ())); + connect (mp_ui->delete_button, SIGNAL (clicked ()), this, SLOT (delete_pressed ())); } void BookmarkManagementForm::delete_pressed () { - QList sel = bookmark_list->selectedItems (); + QList sel = mp_ui->bookmark_list->selectedItems (); for (QList::const_iterator i = sel.begin (); i != sel.end (); ++i) { delete *i; } @@ -92,12 +94,12 @@ void BookmarkManagementForm::accept () { m_bookmarks.clear (); - m_bookmarks.reserve (bookmark_list->count ()); + m_bookmarks.reserve (mp_ui->bookmark_list->count ()); // TODO: is there an iterator? Here we use the trick to select all and then get the // list of items - bookmark_list->selectAll (); - QList sel = bookmark_list->selectedItems (); + mp_ui->bookmark_list->selectAll (); + QList sel = mp_ui->bookmark_list->selectedItems (); for (QList::const_iterator i = sel.begin (); i != sel.end (); ++i) { BookmarkListLVI *bm = dynamic_cast (*i); if (bm) { diff --git a/src/laybasic/laybasic/layBookmarkManagementForm.h b/src/layui/layui/layBookmarkManagementForm.h similarity index 88% rename from src/laybasic/laybasic/layBookmarkManagementForm.h rename to src/layui/layui/layBookmarkManagementForm.h index 0b419c181..6973bf11f 100644 --- a/src/laybasic/laybasic/layBookmarkManagementForm.h +++ b/src/layui/layui/layBookmarkManagementForm.h @@ -25,18 +25,22 @@ #ifndef HDR_layBookmarkManagementForm #define HDR_layBookmarkManagementForm -#include // required during the dependency pass -#include "ui_BookmarkManagementForm.h" +#include -#include "layLayoutView.h" +#include "layLayoutViewBase.h" #include +namespace Ui +{ + class BookmarkManagementForm; +} + namespace lay { class BookmarkManagementForm - : public QDialog, private Ui::BookmarkManagementForm + : public QDialog { Q_OBJECT @@ -57,6 +61,7 @@ public slots: void delete_pressed (); private: + Ui::BookmarkManagementForm *mp_ui; lay::BookmarkList m_bookmarks; }; diff --git a/src/laybasic/laybasic/layBookmarksView.cc b/src/layui/layui/layBookmarksView.cc similarity index 98% rename from src/laybasic/laybasic/layBookmarksView.cc rename to src/layui/layui/layBookmarksView.cc index 88d359385..3bdbe7cee 100644 --- a/src/laybasic/laybasic/layBookmarksView.cc +++ b/src/layui/layui/layBookmarksView.cc @@ -23,7 +23,7 @@ #if defined(HAVE_QT) #include "layBookmarksView.h" -#include "layLayoutView.h" +#include "layLayoutViewBase.h" #include "layAbstractMenu.h" #include "laybasicConfig.h" @@ -89,7 +89,7 @@ private: // -------------------------------------------------------------------------------------------- -BookmarksView::BookmarksView (LayoutView *view, QWidget *parent, const char *name) +BookmarksView::BookmarksView (LayoutViewBase *view, QWidget *parent, const char *name) : QFrame (parent), m_follow_selection (false) { setObjectName (QString::fromUtf8 (name)); diff --git a/src/laybasic/laybasic/layBookmarksView.h b/src/layui/layui/layBookmarksView.h similarity index 90% rename from src/laybasic/laybasic/layBookmarksView.h rename to src/layui/layui/layBookmarksView.h index 3a4f78a63..8393f9fea 100644 --- a/src/laybasic/laybasic/layBookmarksView.h +++ b/src/layui/layui/layBookmarksView.h @@ -25,7 +25,7 @@ #ifndef HDR_layBookmarksView #define HDR_layBookmarksView -#include "laybasicCommon.h" +#include "layuiCommon.h" #include "layBookmarkList.h" #include "layColor.h" @@ -44,13 +44,13 @@ class AbstractMenu; /** * @brief A widget to display a bookmark list */ -class LAYBASIC_PUBLIC BookmarksView +class LAYUI_PUBLIC BookmarksView : public QFrame { Q_OBJECT public: - BookmarksView (LayoutView *view, QWidget *parent, const char *name); + BookmarksView (lay::LayoutViewBase *view, QWidget *parent, const char *name); ~BookmarksView (); void set_background_color (lay::Color c); @@ -67,7 +67,7 @@ public slots: void context_menu (const QPoint &p); private: - LayoutView *mp_view; + LayoutViewBase *mp_view; QListView *mp_bookmarks; bool m_follow_selection; }; diff --git a/src/laybasic/laybasic/layBrowseInstancesForm.cc b/src/layui/layui/layBrowseInstancesForm.cc similarity index 99% rename from src/laybasic/laybasic/layBrowseInstancesForm.cc rename to src/layui/layui/layBrowseInstancesForm.cc index f64695169..b1946ebb9 100644 --- a/src/laybasic/laybasic/layBrowseInstancesForm.cc +++ b/src/layui/layui/layBrowseInstancesForm.cc @@ -80,7 +80,7 @@ public: menu_entries.push_back (lay::menu_item ("browse_instances::show", "browse_instances", "tools_menu.end", tl::to_string (QObject::tr ("Browse Instances")))); } - virtual lay::Plugin *create_plugin (db::Manager *, lay::Dispatcher *root, lay::LayoutView *view) const + virtual lay::Plugin *create_plugin (db::Manager *, lay::Dispatcher *root, lay::LayoutViewBase *view) const { return new BrowseInstancesForm (root, view); } @@ -290,7 +290,7 @@ private: // ------------------------------------------------------------ -BrowseInstancesForm::BrowseInstancesForm (lay::Dispatcher *root, LayoutView *vw) +BrowseInstancesForm::BrowseInstancesForm (lay::Dispatcher *root, LayoutViewBase *vw) : lay::Browser (root, vw), Ui::BrowseInstancesForm (), m_cv_index (0), @@ -533,7 +533,7 @@ BrowseInstancesForm::activated () // obtain active cellview index and cell index int cv_index = view ()->active_cellview_index (); - lay::LayoutView::cell_path_type path; + lay::LayoutViewBase::cell_path_type path; view ()->current_cell_path (path); // no cell to index diff --git a/src/laybasic/laybasic/layBrowseInstancesForm.h b/src/layui/layui/layBrowseInstancesForm.h similarity index 97% rename from src/laybasic/laybasic/layBrowseInstancesForm.h rename to src/layui/layui/layBrowseInstancesForm.h index 8cb36254e..20a5b2479 100644 --- a/src/laybasic/laybasic/layBrowseInstancesForm.h +++ b/src/layui/layui/layBrowseInstancesForm.h @@ -28,7 +28,7 @@ #include "ui_BrowseInstancesForm.h" #include "ui_BrowseInstancesConfigPage.h" -#include "layLayoutView.h" +#include "layLayoutViewBase.h" #include "layPluginConfigPage.h" #include "layBrowser.h" #include "layMarker.h" @@ -66,7 +66,7 @@ public: enum mode_type { ToCellView = 0, AnyTop, Parent }; enum window_type { DontChange = 0, FitCell, FitMarker, Center, CenterSize }; - BrowseInstancesForm (lay::Dispatcher *root, lay::LayoutView *view); + BrowseInstancesForm (lay::Dispatcher *root, lay::LayoutViewBase *view); ~BrowseInstancesForm (); bool eventFilter (QObject *watched, QEvent *event); diff --git a/src/laybasic/laybasic/layBrowseShapesForm.cc b/src/layui/layui/layBrowseShapesForm.cc similarity index 99% rename from src/laybasic/laybasic/layBrowseShapesForm.cc rename to src/layui/layui/layBrowseShapesForm.cc index 01df4fc13..e75fd9bbb 100644 --- a/src/laybasic/laybasic/layBrowseShapesForm.cc +++ b/src/layui/layui/layBrowseShapesForm.cc @@ -81,7 +81,7 @@ public: menu_entries.push_back (lay::menu_item ("browse_shapes::show", "browse_shapes", "tools_menu.end", tl::to_string (QObject::tr ("Browse Shapes")))); } - virtual lay::Plugin *create_plugin (db::Manager *, lay::Dispatcher *root, lay::LayoutView *view) const + virtual lay::Plugin *create_plugin (db::Manager *, lay::Dispatcher *root, lay::LayoutViewBase *view) const { return new BrowseShapesForm (root, view); } @@ -393,7 +393,7 @@ private: // ------------------------------------------------------------ -BrowseShapesForm::BrowseShapesForm (lay::Dispatcher *root, LayoutView *vw) +BrowseShapesForm::BrowseShapesForm (lay::Dispatcher *root, LayoutViewBase *vw) : lay::Browser (root, vw), Ui::BrowseShapesForm (), m_cv_index (-1), diff --git a/src/laybasic/laybasic/layBrowseShapesForm.h b/src/layui/layui/layBrowseShapesForm.h similarity index 97% rename from src/laybasic/laybasic/layBrowseShapesForm.h rename to src/layui/layui/layBrowseShapesForm.h index 9e79ff62a..e12a193b5 100644 --- a/src/laybasic/laybasic/layBrowseShapesForm.h +++ b/src/layui/layui/layBrowseShapesForm.h @@ -28,7 +28,7 @@ #include "ui_BrowseShapesForm.h" #include "ui_BrowseShapesConfigPage.h" -#include "layLayoutView.h" +#include "layLayoutViewBase.h" #include "layPluginConfigPage.h" #include "layBrowser.h" #include "layMarker.h" @@ -65,7 +65,7 @@ public: enum mode_type { ToCellView = 0, AnyTop, Local }; enum window_type { DontChange = 0, FitCell, FitMarker, Center, CenterSize }; - BrowseShapesForm (lay::Dispatcher *root, LayoutView *view); + BrowseShapesForm (lay::Dispatcher *root, LayoutViewBase *view); ~BrowseShapesForm (); bool eventFilter (QObject *watched, QEvent *event); diff --git a/src/laybasic/laybasic/layBrowser.cc b/src/layui/layui/layBrowser.cc similarity index 88% rename from src/laybasic/laybasic/layBrowser.cc rename to src/layui/layui/layBrowser.cc index 049076bf5..27a32a324 100644 --- a/src/laybasic/laybasic/layBrowser.cc +++ b/src/layui/layui/layBrowser.cc @@ -25,7 +25,7 @@ #include #include "layBrowser.h" -#include "layLayoutView.h" +#include "layLayoutViewBase.h" #include @@ -33,9 +33,9 @@ namespace lay { #if QT_VERSION >= 0x050000 -Browser::Browser (lay::Dispatcher *root, lay::LayoutView *view, const char *name, Qt::WindowFlags fl) +Browser::Browser (lay::Dispatcher *root, lay::LayoutViewBase *view, const char *name, Qt::WindowFlags fl) #else -Browser::Browser (lay::Dispatcher *root, lay::LayoutView *view, const char *name, Qt::WFlags fl) +Browser::Browser (lay::Dispatcher *root, lay::LayoutViewBase *view, const char *name, Qt::WFlags fl) #endif // TODO: clarify whether to keep the browsers as separate (potentially hidden) windows : QDialog (0 /*view*/, fl), diff --git a/src/laybasic/laybasic/layBrowser.h b/src/layui/layui/layBrowser.h similarity index 87% rename from src/laybasic/laybasic/layBrowser.h rename to src/layui/layui/layBrowser.h index b5ae1b70d..f10434e75 100644 --- a/src/laybasic/laybasic/layBrowser.h +++ b/src/layui/layui/layBrowser.h @@ -25,7 +25,7 @@ #ifndef HDR_layBrowser #define HDR_layBrowser -#include "laybasicCommon.h" +#include "layuiCommon.h" #include "layPlugin.h" @@ -36,10 +36,10 @@ class QCloseEvent; namespace lay { -class LayoutView; +class LayoutViewBase; class Dispatcher; -class LAYBASIC_PUBLIC Browser +class LAYUI_PUBLIC Browser : public QDialog, public lay::Plugin { @@ -48,9 +48,9 @@ public: * @brief Constructor */ #if QT_VERSION >= 0x050000 - Browser (lay::Dispatcher *root, lay::LayoutView *view, const char *name = "", Qt::WindowFlags fl = Qt::Window /*adds minimize button for example*/); + Browser (lay::Dispatcher *root, lay::LayoutViewBase *view, const char *name = "", Qt::WindowFlags fl = Qt::Window /*adds minimize button for example*/); #else - Browser (lay::Dispatcher *root, lay::LayoutView *view, const char *name = "", Qt::WFlags fl = Qt::Window /*adds minimize button for example*/); + Browser (lay::Dispatcher *root, lay::LayoutViewBase *view, const char *name = "", Qt::WFlags fl = Qt::Window /*adds minimize button for example*/); #endif /** @@ -94,7 +94,7 @@ public: /** * @brief Return the pointer to the layout view */ - lay::LayoutView *view () + lay::LayoutViewBase *view () { return mp_view; } @@ -133,7 +133,7 @@ public: private: bool m_active; - lay::LayoutView *mp_view; + lay::LayoutViewBase *mp_view; lay::Dispatcher *mp_root; void closeEvent (QCloseEvent *); diff --git a/src/laybasic/laybasic/layBrowserDialog.cc b/src/layui/layui/layBrowserDialog.cc similarity index 100% rename from src/laybasic/laybasic/layBrowserDialog.cc rename to src/layui/layui/layBrowserDialog.cc diff --git a/src/laybasic/laybasic/layBrowserDialog.h b/src/layui/layui/layBrowserDialog.h similarity index 98% rename from src/laybasic/laybasic/layBrowserDialog.h rename to src/layui/layui/layBrowserDialog.h index 80bd01b41..959277f99 100644 --- a/src/laybasic/laybasic/layBrowserDialog.h +++ b/src/layui/layui/layBrowserDialog.h @@ -42,7 +42,7 @@ namespace lay * URL's with the special scheme "int" are retrieved from a BrowserSource object. * This will act as a kind of "server" for these URL's. */ -class LAYBASIC_PUBLIC BrowserDialog +class LAYUI_PUBLIC BrowserDialog : public QDialog, private Ui::BrowserDialog { diff --git a/src/laybasic/laybasic/layBrowserPanel.cc b/src/layui/layui/layBrowserPanel.cc similarity index 100% rename from src/laybasic/laybasic/layBrowserPanel.cc rename to src/layui/layui/layBrowserPanel.cc diff --git a/src/laybasic/laybasic/layBrowserPanel.h b/src/layui/layui/layBrowserPanel.h similarity index 97% rename from src/laybasic/laybasic/layBrowserPanel.h rename to src/layui/layui/layBrowserPanel.h index e97851b3d..70627b0e2 100644 --- a/src/laybasic/laybasic/layBrowserPanel.h +++ b/src/layui/layui/layBrowserPanel.h @@ -25,7 +25,7 @@ #ifndef HDR_layBrowserPanel #define HDR_layBrowserPanel -#include "laybasicCommon.h" +#include "layuiCommon.h" #include "tlDeferredExecution.h" #include "tlObject.h" #include "gsiObject.h" @@ -58,7 +58,7 @@ class Dispatcher; * The outline is a hierarchical tree of items. Each node has a title, a URL to navigate to and * optional child items. */ -class LAYBASIC_PUBLIC BrowserOutline +class LAYUI_PUBLIC BrowserOutline { public: typedef std::list::const_iterator const_child_iterator; @@ -170,7 +170,7 @@ private: /** * @brief The source for BrowserDialog's "int" URL's */ -class LAYBASIC_PUBLIC BrowserSource +class LAYUI_PUBLIC BrowserSource : public gsi::ObjectBase, public tl::Object { public: @@ -262,7 +262,7 @@ private: /** * @brief A specialization of QTextBrowser that allows loading a specific resource through BrowserPanel */ -class LAYBASIC_PUBLIC BrowserTextWidget +class LAYUI_PUBLIC BrowserTextWidget : public QTextBrowser { public: @@ -286,7 +286,7 @@ private: /** * @brief A structure describing a bookmark item */ -struct LAYBASIC_PUBLIC BookmarkItem +struct LAYUI_PUBLIC BookmarkItem { BookmarkItem () : position (0) { } @@ -306,7 +306,7 @@ struct LAYBASIC_PUBLIC BookmarkItem /** * @brief A specialization of QWidget around a TextBrowser that allows loading a specific resource */ -class LAYBASIC_PUBLIC BrowserPanel +class LAYUI_PUBLIC BrowserPanel : public QWidget { friend class BrowserTextWidget; diff --git a/src/laybasic/laybasic/layBusy.cc b/src/layui/layui/layBusy.cc similarity index 100% rename from src/laybasic/laybasic/layBusy.cc rename to src/layui/layui/layBusy.cc diff --git a/src/laybasic/laybasic/layBusy.h b/src/layui/layui/layBusy.h similarity index 93% rename from src/laybasic/laybasic/layBusy.h rename to src/layui/layui/layBusy.h index 9996faef9..cda8c2e32 100644 --- a/src/laybasic/laybasic/layBusy.h +++ b/src/layui/layui/layBusy.h @@ -25,7 +25,7 @@ #ifndef HDR_layBusy #define HDR_layBusy -#include "laybasicCommon.h" +#include "layuiCommon.h" namespace lay { @@ -35,7 +35,7 @@ namespace lay * * There must be one provider implementing this interface. */ -class LAYBASIC_PUBLIC BusyMode +class LAYUI_PUBLIC BusyMode { public: BusyMode (); @@ -48,7 +48,7 @@ public: /** * @brief A RAII implementation of the busy mode setter */ -class LAYBASIC_PUBLIC BusySection +class LAYUI_PUBLIC BusySection { public: BusySection (); diff --git a/src/laybasic/laybasic/layCellSelectionForm.cc b/src/layui/layui/layCellSelectionForm.cc similarity index 99% rename from src/laybasic/laybasic/layCellSelectionForm.cc rename to src/layui/layui/layCellSelectionForm.cc index 80011e089..c9496b4b0 100644 --- a/src/laybasic/laybasic/layCellSelectionForm.cc +++ b/src/layui/layui/layCellSelectionForm.cc @@ -37,7 +37,7 @@ #include "tlAssert.h" #include "layCellTreeModel.h" -#include "layLayoutView.h" +#include "layLayoutViewBase.h" #include "tlExceptions.h" #include @@ -50,7 +50,7 @@ static const std::string cfg_cell_selection_search_use_expressions ("cell-select // ------------------------------------------------------------ -CellSelectionForm::CellSelectionForm (QWidget *parent, LayoutView *view, const char *name, bool simple_mode) +CellSelectionForm::CellSelectionForm (QWidget *parent, LayoutViewBase *view, const char *name, bool simple_mode) : QDialog (parent), Ui::CellSelectionForm (), mp_view (view), m_current_cv (-1), diff --git a/src/laybasic/laybasic/layCellSelectionForm.h b/src/layui/layui/layCellSelectionForm.h similarity index 95% rename from src/laybasic/laybasic/layCellSelectionForm.h rename to src/layui/layui/layCellSelectionForm.h index 0c3fd9027..f878e9116 100644 --- a/src/laybasic/laybasic/layCellSelectionForm.h +++ b/src/layui/layui/layCellSelectionForm.h @@ -44,13 +44,13 @@ class LayoutView; /** * @brief A form to select a cell and a cell view index */ -class LAYBASIC_PUBLIC CellSelectionForm +class LAYUI_PUBLIC CellSelectionForm : public QDialog, private Ui::CellSelectionForm { Q_OBJECT public: - CellSelectionForm (QWidget *parent, LayoutView *view, const char *name, bool simple_mode = false); + CellSelectionForm (QWidget *parent, LayoutViewBase *view, const char *name, bool simple_mode = false); /** * @brief Obtain the selected cellview's index (with changes) @@ -77,7 +77,7 @@ public slots: void find_prev_clicked(); private: - lay::LayoutView *mp_view; + lay::LayoutViewBase *mp_view; std::vector m_cellviews; int m_current_cv; bool m_name_cb_enabled; @@ -103,7 +103,7 @@ private: /** * @brief A form to select a cell from a library */ -class LAYBASIC_PUBLIC LibraryCellSelectionForm +class LAYUI_PUBLIC LibraryCellSelectionForm : public QDialog, private Ui::LibraryCellSelectionForm { Q_OBJECT diff --git a/src/laybasic/laybasic/layCellTreeModel.cc b/src/layui/layui/layCellTreeModel.cc similarity index 98% rename from src/laybasic/laybasic/layCellTreeModel.cc rename to src/layui/layui/layCellTreeModel.cc index 0c45b929b..6568a2c3c 100644 --- a/src/laybasic/laybasic/layCellTreeModel.cc +++ b/src/layui/layui/layCellTreeModel.cc @@ -23,7 +23,7 @@ #if defined(HAVE_QT) #include "layCellTreeModel.h" -#include "layLayoutView.h" +#include "layLayoutViewBase.h" #include "layDragDropData.h" #include "tlGlobPattern.h" #include "dbPCellHeader.h" @@ -305,7 +305,7 @@ CellTreeItem::by_area_equal_than (const CellTreeItem *b) const // valid ("under construction"). In this case, the model will return defaults or void // objects. -CellTreeModel::CellTreeModel (QWidget *parent, lay::LayoutView *view, int cv_index, unsigned int flags, const db::Cell *base, Sorting sorting) +CellTreeModel::CellTreeModel (QWidget *parent, lay::LayoutViewBase *view, int cv_index, unsigned int flags, const db::Cell *base, Sorting sorting) : QAbstractItemModel (parent), m_flags (flags), m_sorting (sorting), @@ -381,7 +381,7 @@ CellTreeModel::~CellTreeModel () } void -CellTreeModel::configure (lay::LayoutView *view, int cv_index, unsigned int flags, const db::Cell *base, Sorting sorting) +CellTreeModel::configure (lay::LayoutViewBase *view, int cv_index, unsigned int flags, const db::Cell *base, Sorting sorting) { db::Layout *layout = & view->cellview (cv_index)->layout (); do_configure (layout, 0, view, cv_index, flags, base, sorting); @@ -400,7 +400,7 @@ CellTreeModel::configure (db::Library *library, unsigned int flags, const db::Ce } void -CellTreeModel::do_configure (db::Layout *layout, db::Library *library, lay::LayoutView *view, int cv_index, unsigned int flags, const db::Cell *base, Sorting sorting) +CellTreeModel::do_configure (db::Layout *layout, db::Library *library, lay::LayoutViewBase *view, int cv_index, unsigned int flags, const db::Cell *base, Sorting sorting) { bool flat = ((flags & Flat) != 0) && ((flags & TopCells) == 0); diff --git a/src/laybasic/laybasic/layCellTreeModel.h b/src/layui/layui/layCellTreeModel.h similarity index 95% rename from src/laybasic/laybasic/layCellTreeModel.h rename to src/layui/layui/layCellTreeModel.h index 590f3dfb0..0ddf88dce 100644 --- a/src/laybasic/laybasic/layCellTreeModel.h +++ b/src/layui/layui/layCellTreeModel.h @@ -46,7 +46,7 @@ namespace db namespace lay { -class LayoutView; +class LayoutViewBase; class CellTreeItem; /** @@ -86,7 +86,7 @@ public: * If flags "Children" or "Parents" are given, "base" must be set to the cell of which * the children or parents should be derived. */ - CellTreeModel (QWidget *parent, lay::LayoutView *view, int cv_index, unsigned int flags = 0, const db::Cell *base = 0, Sorting sorting = ByName); + CellTreeModel (QWidget *parent, lay::LayoutViewBase *view, int cv_index, unsigned int flags = 0, const db::Cell *base = 0, Sorting sorting = ByName); /** * @brief Constructor @@ -121,7 +121,7 @@ public: /** * @brief Reconfigures the model with a LayoutView */ - void configure (LayoutView *view, int cv_index, unsigned int flags = 0, const db::Cell *base = 0, Sorting sorting = ByName); + void configure (LayoutViewBase *view, int cv_index, unsigned int flags = 0, const db::Cell *base = 0, Sorting sorting = ByName); /** * @brief Reconfigures the model with a pure Layout @@ -258,7 +258,7 @@ private: unsigned int m_flags; Sorting m_sorting; QWidget *mp_parent; - lay::LayoutView *mp_view; + lay::LayoutViewBase *mp_view; db::Layout *mp_layout; db::Library *mp_library; int m_cv_index; @@ -272,7 +272,7 @@ private: void build_top_level (); void clear_top_level (); bool search_children (const tl::GlobPattern &pattern, CellTreeItem *item); - void do_configure (db::Layout *layout, db::Library *library, LayoutView *view, int cv_index, unsigned int flags, const db::Cell *base, Sorting sorting); + void do_configure (db::Layout *layout, db::Library *library, LayoutViewBase *view, int cv_index, unsigned int flags, const db::Cell *base, Sorting sorting); }; /** diff --git a/src/laybasic/laybasic/layConfigurationDialog.cc b/src/layui/layui/layConfigurationDialog.cc similarity index 100% rename from src/laybasic/laybasic/layConfigurationDialog.cc rename to src/layui/layui/layConfigurationDialog.cc diff --git a/src/laybasic/laybasic/layConfigurationDialog.h b/src/layui/layui/layConfigurationDialog.h similarity index 97% rename from src/laybasic/laybasic/layConfigurationDialog.h rename to src/layui/layui/layConfigurationDialog.h index 95627bf07..13e0a86c5 100644 --- a/src/laybasic/laybasic/layConfigurationDialog.h +++ b/src/layui/layui/layConfigurationDialog.h @@ -43,7 +43,7 @@ class Dispatcher; class ConfigPage; class PluginDeclaration; -class LAYBASIC_PUBLIC ConfigurationDialog +class LAYUI_PUBLIC ConfigurationDialog : public QDialog { Q_OBJECT diff --git a/src/laybasic/laybasic/layDialogs.cc b/src/layui/layui/layDialogs.cc similarity index 99% rename from src/laybasic/laybasic/layDialogs.cc rename to src/layui/layui/layDialogs.cc index 1a93cf670..5128640d3 100644 --- a/src/laybasic/laybasic/layDialogs.cc +++ b/src/layui/layui/layDialogs.cc @@ -33,8 +33,7 @@ #include "layLayerProperties.h" #include "layFileDialog.h" -#include "layLayoutView.h" -#include "layLayoutView.h" +#include "layLayoutViewBase.h" #include "layCellTreeModel.h" #include "layQtTools.h" #include "layGenericSyntaxHighlighter.h" @@ -824,7 +823,7 @@ DuplicateLayerDialog::cv_changed (int) } bool -DuplicateLayerDialog::exec_dialog (lay::LayoutView *view, int &cv, int &layer, int &cv_r, int &layer_r, int &hier_mode, bool &clear_before) +DuplicateLayerDialog::exec_dialog (lay::LayoutViewBase *view, int &cv, int &layer, int &cv_r, int &layer_r, int &hier_mode, bool &clear_before) { mp_view = view; @@ -1180,7 +1179,7 @@ UserPropertiesForm::set_properties (const db::PropertiesRepository::properties_s } bool -UserPropertiesForm::show (lay::LayoutView *view, unsigned int cv_index, db::properties_id_type &prop_id) +UserPropertiesForm::show (LayoutViewBase *view, unsigned int cv_index, db::properties_id_type &prop_id) { bool ret = false; diff --git a/src/laybasic/laybasic/layDialogs.h b/src/layui/layui/layDialogs.h similarity index 88% rename from src/laybasic/laybasic/layDialogs.h rename to src/layui/layui/layDialogs.h index 0e35fb555..b78de3731 100644 --- a/src/laybasic/laybasic/layDialogs.h +++ b/src/layui/layui/layDialogs.h @@ -29,7 +29,7 @@ #include "dbVector.h" #include "dbTypes.h" #include "dbPropertiesRepository.h" -#include "laybasicCommon.h" +#include "layuiCommon.h" #include #include @@ -72,12 +72,12 @@ namespace lay { class CellView; -class LayoutView; +class LayoutViewBase; /** * @brief The layer source dialog */ -class LAYBASIC_PUBLIC LayerSourceDialog +class LAYUI_PUBLIC LayerSourceDialog : public QDialog { Q_OBJECT @@ -95,7 +95,7 @@ private: /** * @brief The new cell properties dialog */ -class LAYBASIC_PUBLIC NewCellPropertiesDialog +class LAYUI_PUBLIC NewCellPropertiesDialog : public QDialog { Q_OBJECT @@ -116,7 +116,7 @@ private: /** * @brief The new layer properties dialog */ -class LAYBASIC_PUBLIC NewLayerPropertiesDialog +class LAYUI_PUBLIC NewLayerPropertiesDialog : public QDialog { Q_OBJECT @@ -138,7 +138,7 @@ private: /** * @brief The move options dialog */ -class LAYBASIC_PUBLIC MoveOptionsDialog +class LAYUI_PUBLIC MoveOptionsDialog : public QDialog { Q_OBJECT @@ -158,7 +158,7 @@ private: /** * @brief The move "to" options dialog */ -class LAYBASIC_PUBLIC MoveToOptionsDialog +class LAYUI_PUBLIC MoveToOptionsDialog : public QDialog { Q_OBJECT @@ -181,7 +181,7 @@ private: /** * @brief The rename cell options dialog */ -class LAYBASIC_PUBLIC RenameCellDialog +class LAYUI_PUBLIC RenameCellDialog : public QDialog { Q_OBJECT @@ -202,7 +202,7 @@ private: /** * @brief The replace cell options dialog */ -class LAYBASIC_PUBLIC ReplaceCellOptionsDialog +class LAYUI_PUBLIC ReplaceCellOptionsDialog : public QDialog { Q_OBJECT @@ -228,7 +228,7 @@ private: /** * @brief The copy cell options dialog */ -class LAYBASIC_PUBLIC CopyCellModeDialog +class LAYUI_PUBLIC CopyCellModeDialog : public QDialog { Q_OBJECT @@ -251,7 +251,7 @@ private: /** * @brief The delete cell options dialog */ -class LAYBASIC_PUBLIC DeleteCellModeDialog +class LAYUI_PUBLIC DeleteCellModeDialog : public QDialog { Q_OBJECT @@ -274,7 +274,7 @@ private: /** * @brief The delete cell options dialog */ -class LAYBASIC_PUBLIC ClearLayerModeDialog +class LAYUI_PUBLIC ClearLayerModeDialog : public QDialog { Q_OBJECT @@ -297,7 +297,7 @@ private: /** * @brief The open layout mode dialog */ -class LAYBASIC_PUBLIC OpenLayoutModeDialog +class LAYUI_PUBLIC OpenLayoutModeDialog : public QDialog { Q_OBJECT @@ -320,7 +320,7 @@ private: /** * @brief The new layout properties dialog */ -class LAYBASIC_PUBLIC NewLayoutPropertiesDialog +class LAYUI_PUBLIC NewLayoutPropertiesDialog : public QDialog { Q_OBJECT @@ -343,7 +343,7 @@ private: /** * @brief The duplicate layer operation options */ -class LAYBASIC_PUBLIC DuplicateLayerDialog +class LAYUI_PUBLIC DuplicateLayerDialog : public QDialog { Q_OBJECT @@ -352,7 +352,7 @@ public: DuplicateLayerDialog (QWidget *parent); virtual ~DuplicateLayerDialog (); - bool exec_dialog (lay::LayoutView *view, int &cv, int &layer, int &cv_res, int &layer_res, int &hier_mode, bool &clear_before); + bool exec_dialog (lay::LayoutViewBase *view, int &cv, int &layer, int &cv_res, int &layer_res, int &hier_mode, bool &clear_before); public slots: void cv_changed (int); @@ -361,13 +361,13 @@ private: virtual void accept (); Ui::DuplicateLayerDialog *mp_ui; - lay::LayoutView *mp_view; + lay::LayoutViewBase *mp_view; }; /** * @brief A data structure holding the options for the "align cell" dialog */ -struct LAYBASIC_PUBLIC AlignCellOptions +struct LAYUI_PUBLIC AlignCellOptions { AlignCellOptions () : mode_x (-1), mode_y (-1), xpos (0.0), ypos (0.0), visible_only (false), adjust_parents (true) @@ -382,7 +382,7 @@ struct LAYBASIC_PUBLIC AlignCellOptions /** * @brief The merge operation options */ -class LAYBASIC_PUBLIC AlignCellOptionsDialog +class LAYUI_PUBLIC AlignCellOptionsDialog : public QDialog { Q_OBJECT @@ -404,7 +404,7 @@ private: /** * @brief Options dialog for the "flatten instances" function */ -class LAYBASIC_PUBLIC FlattenInstOptionsDialog +class LAYUI_PUBLIC FlattenInstOptionsDialog : public QDialog { public: @@ -420,7 +420,7 @@ private: /** * @brief The user properties report form */ -class LAYBASIC_PUBLIC UserPropertiesForm +class LAYUI_PUBLIC UserPropertiesForm : public QDialog { Q_OBJECT @@ -429,7 +429,7 @@ public: UserPropertiesForm (QWidget *parent); virtual ~UserPropertiesForm (); - bool show (lay::LayoutView *view, unsigned int cv_index, db::properties_id_type &prop_id); + bool show (lay::LayoutViewBase *view, unsigned int cv_index, db::properties_id_type &prop_id); public slots: void add (); @@ -452,7 +452,7 @@ private: /** * @brief The user properties report form */ -class LAYBASIC_PUBLIC UserPropertiesEditForm +class LAYUI_PUBLIC UserPropertiesEditForm : public QDialog { public: diff --git a/src/laybasic/laybasic/layEditLineStyleWidget.cc b/src/layui/layui/layEditLineStyleWidget.cc similarity index 100% rename from src/laybasic/laybasic/layEditLineStyleWidget.cc rename to src/layui/layui/layEditLineStyleWidget.cc diff --git a/src/laybasic/laybasic/layEditLineStyleWidget.h b/src/layui/layui/layEditLineStyleWidget.h similarity index 100% rename from src/laybasic/laybasic/layEditLineStyleWidget.h rename to src/layui/layui/layEditLineStyleWidget.h diff --git a/src/laybasic/laybasic/layEditLineStylesForm.cc b/src/layui/layui/layEditLineStylesForm.cc similarity index 98% rename from src/laybasic/laybasic/layEditLineStylesForm.cc rename to src/layui/layui/layEditLineStylesForm.cc index a0cca3f00..ece6f7bca 100644 --- a/src/laybasic/laybasic/layEditLineStylesForm.cc +++ b/src/layui/layui/layEditLineStylesForm.cc @@ -25,7 +25,7 @@ #include "layEditLineStylesForm.h" #include "ui_EditLineStylesForm.h" -#include "layLayoutView.h" +#include "layLayoutViewBase.h" #include "tlExceptions.h" #include "tlString.h" @@ -50,8 +50,8 @@ struct CurrentStyleOp int prev_index, new_index; }; -EditLineStylesForm::EditLineStylesForm (lay::LayoutView *view, const lay::LineStyles &styles) - : QDialog (view), db::Object (0), +EditLineStylesForm::EditLineStylesForm (lay::LayoutViewBase *view, const lay::LineStyles &styles) + : QDialog (view->widget ()), db::Object (0), m_selected (-1), m_styles (styles), m_manager (true), mp_view (view) { m_selection_changed_enabled = false; diff --git a/src/laybasic/laybasic/layEditLineStylesForm.h b/src/layui/layui/layEditLineStylesForm.h similarity index 94% rename from src/laybasic/laybasic/layEditLineStylesForm.h rename to src/layui/layui/layEditLineStylesForm.h index a7e94a3a3..1eab57563 100644 --- a/src/laybasic/laybasic/layEditLineStylesForm.h +++ b/src/layui/layui/layEditLineStylesForm.h @@ -40,7 +40,7 @@ namespace Ui namespace lay { -class LayoutView; +class LayoutViewBase; class EditLineStylesForm : public QDialog, public db::Object @@ -48,7 +48,7 @@ class EditLineStylesForm Q_OBJECT public: - EditLineStylesForm (lay::LayoutView *view, const lay::LineStyles &styles); + EditLineStylesForm (lay::LayoutViewBase *view, const lay::LineStyles &styles); ~EditLineStylesForm (); // ... @@ -100,7 +100,7 @@ private: int m_selected; lay::LineStyles m_styles; db::Manager m_manager; - lay::LayoutView *mp_view; + lay::LayoutViewBase *mp_view; bool m_selection_changed_enabled; }; diff --git a/src/laybasic/laybasic/layEditStippleWidget.cc b/src/layui/layui/layEditStippleWidget.cc similarity index 100% rename from src/laybasic/laybasic/layEditStippleWidget.cc rename to src/layui/layui/layEditStippleWidget.cc diff --git a/src/laybasic/laybasic/layEditStippleWidget.h b/src/layui/layui/layEditStippleWidget.h similarity index 100% rename from src/laybasic/laybasic/layEditStippleWidget.h rename to src/layui/layui/layEditStippleWidget.h diff --git a/src/laybasic/laybasic/layEditStipplesForm.cc b/src/layui/layui/layEditStipplesForm.cc similarity index 99% rename from src/laybasic/laybasic/layEditStipplesForm.cc rename to src/layui/layui/layEditStipplesForm.cc index 6005880ce..eef978271 100644 --- a/src/laybasic/laybasic/layEditStipplesForm.cc +++ b/src/layui/layui/layEditStipplesForm.cc @@ -25,7 +25,7 @@ #include "layEditStipplesForm.h" #include "ui_EditStipplesForm.h" -#include "layLayoutView.h" +#include "layLayoutViewBase.h" #include "tlExceptions.h" #include "tlString.h" @@ -50,8 +50,8 @@ struct CurrentPatternOp int prev_index, new_index; }; -EditStipplesForm::EditStipplesForm (lay::LayoutView *view, const lay::DitherPattern &pattern) - : QDialog (view), db::Object (0), +EditStipplesForm::EditStipplesForm (lay::LayoutViewBase *view, const lay::DitherPattern &pattern) + : QDialog (view->widget ()), db::Object (0), m_selected (-1), m_pattern (pattern), m_manager (true), mp_view (view) { m_selection_changed_enabled = false; diff --git a/src/laybasic/laybasic/layEditStipplesForm.h b/src/layui/layui/layEditStipplesForm.h similarity index 94% rename from src/laybasic/laybasic/layEditStipplesForm.h rename to src/layui/layui/layEditStipplesForm.h index e8ca40ce8..9d3e55cd0 100644 --- a/src/laybasic/laybasic/layEditStipplesForm.h +++ b/src/layui/layui/layEditStipplesForm.h @@ -40,7 +40,7 @@ namespace Ui namespace lay { -class LayoutView; +class LayoutViewBase; class EditStipplesForm : public QDialog, public db::Object @@ -48,7 +48,7 @@ class EditStipplesForm Q_OBJECT public: - EditStipplesForm (lay::LayoutView *view, const lay::DitherPattern &pattern); + EditStipplesForm (lay::LayoutViewBase *view, const lay::DitherPattern &pattern); ~EditStipplesForm (); // ... @@ -104,7 +104,7 @@ private: int m_selected; lay::DitherPattern m_pattern; db::Manager m_manager; - lay::LayoutView *mp_view; + lay::LayoutViewBase *mp_view; bool m_selection_changed_enabled; }; diff --git a/src/laybasic/laybasic/layEditorOptionsFrame.cc b/src/layui/layui/layEditorOptionsFrame.cc similarity index 96% rename from src/laybasic/laybasic/layEditorOptionsFrame.cc rename to src/layui/layui/layEditorOptionsFrame.cc index d7db2e458..9061e74cc 100644 --- a/src/laybasic/laybasic/layEditorOptionsFrame.cc +++ b/src/layui/layui/layEditorOptionsFrame.cc @@ -26,7 +26,7 @@ #include "layEditorOptionsPage.h" #include "layEditorOptionsPages.h" #include "layPlugin.h" -#include "layLayoutView.h" +#include "layLayoutViewBase.h" #include @@ -49,7 +49,7 @@ EditorOptionsFrame::~EditorOptionsFrame () } void -EditorOptionsFrame::populate (LayoutView *view) +EditorOptionsFrame::populate (LayoutViewBase *view) { std::vector prop_dialog_pages; for (tl::Registrar::iterator cls = tl::Registrar::begin (); cls != tl::Registrar::end (); ++cls) { diff --git a/src/laybasic/laybasic/layEditorOptionsFrame.h b/src/layui/layui/layEditorOptionsFrame.h similarity index 90% rename from src/laybasic/laybasic/layEditorOptionsFrame.h rename to src/layui/layui/layEditorOptionsFrame.h index 396f0d9b7..e9ccb73c9 100644 --- a/src/laybasic/laybasic/layEditorOptionsFrame.h +++ b/src/layui/layui/layEditorOptionsFrame.h @@ -25,23 +25,23 @@ #ifndef HDR_layEditorOptionsFrame #define HDR_layEditorOptionsFrame -#include "laybasicCommon.h" +#include "layuiCommon.h" #include namespace lay { class EditorOptionsPages; -class LayoutView; +class LayoutViewBase; -class LAYBASIC_PUBLIC EditorOptionsFrame +class LAYUI_PUBLIC EditorOptionsFrame : public QFrame { public: EditorOptionsFrame (QWidget *parent); virtual ~EditorOptionsFrame (); - void populate (lay::LayoutView *view); + void populate (lay::LayoutViewBase *view); EditorOptionsPages *pages_widget () const { diff --git a/src/laybasic/laybasic/layEditorOptionsPage.cc b/src/layui/layui/layEditorOptionsPage.cc similarity index 94% rename from src/laybasic/laybasic/layEditorOptionsPage.cc rename to src/layui/layui/layEditorOptionsPage.cc index ba8dadb2d..0b093e259 100644 --- a/src/laybasic/laybasic/layEditorOptionsPage.cc +++ b/src/layui/layui/layEditorOptionsPage.cc @@ -25,7 +25,7 @@ #include "tlInternational.h" #include "layEditorOptionsPage.h" #include "layEditorOptionsPages.h" -#include "layLayoutView.h" +#include "layLayoutViewBase.h" namespace lay { @@ -33,7 +33,7 @@ namespace lay // ------------------------------------------------------------------ // EditorOptionsPage implementation -EditorOptionsPage::EditorOptionsPage (lay::LayoutView *view, lay::Dispatcher *dispatcher) +EditorOptionsPage::EditorOptionsPage (lay::LayoutViewBase *view, lay::Dispatcher *dispatcher) : QWidget (0), mp_owner (0), m_active (true), mp_plugin_declaration (0), mp_dispatcher (dispatcher), mp_view (view) { attach_events (); diff --git a/src/laybasic/laybasic/layEditorOptionsPage.h b/src/layui/layui/layEditorOptionsPage.h similarity index 90% rename from src/laybasic/laybasic/layEditorOptionsPage.h rename to src/layui/layui/layEditorOptionsPage.h index 36356dcf3..51486fae9 100644 --- a/src/laybasic/laybasic/layEditorOptionsPage.h +++ b/src/layui/layui/layEditorOptionsPage.h @@ -25,7 +25,7 @@ #ifndef HDR_layEditorOptionsPage #define HDR_layEditorOptionsPage -#include "laybasicCommon.h" +#include "layuiCommon.h" #include "tlObject.h" @@ -36,7 +36,7 @@ namespace lay class PluginDeclaration; class Dispatcher; -class LayoutView; +class LayoutViewBase; class Plugin; class CellView; class EditorOptionsPages; @@ -44,13 +44,13 @@ class EditorOptionsPages; /** * @brief The base class for a object properties page */ -class LAYBASIC_PUBLIC EditorOptionsPage +class LAYUI_PUBLIC EditorOptionsPage : public QWidget, public tl::Object { Q_OBJECT public: - EditorOptionsPage (lay::LayoutView *view, lay::Dispatcher *dispatcher); + EditorOptionsPage (lay::LayoutViewBase *view, lay::Dispatcher *dispatcher); virtual ~EditorOptionsPage (); virtual std::string title () const = 0; @@ -78,7 +78,7 @@ protected: return mp_dispatcher; } - lay::LayoutView *view () const + lay::LayoutViewBase *view () const { return mp_view; } @@ -91,7 +91,7 @@ private: bool m_active; const lay::PluginDeclaration *mp_plugin_declaration; lay::Dispatcher *mp_dispatcher; - lay::LayoutView *mp_view; + lay::LayoutViewBase *mp_view; void on_active_cellview_changed (); void on_technology_changed (); diff --git a/src/laybasic/laybasic/layEditorOptionsPages.cc b/src/layui/layui/layEditorOptionsPages.cc similarity index 99% rename from src/laybasic/laybasic/layEditorOptionsPages.cc rename to src/layui/layui/layEditorOptionsPages.cc index 2c8d443fa..6dc7cc653 100644 --- a/src/laybasic/laybasic/layEditorOptionsPages.cc +++ b/src/layui/layui/layEditorOptionsPages.cc @@ -26,7 +26,7 @@ #include "layEditorOptionsPages.h" #include "tlExceptions.h" #include "layPlugin.h" -#include "layLayoutView.h" +#include "layLayoutViewBase.h" #include "layQtTools.h" #include diff --git a/src/laybasic/laybasic/layEditorOptionsPages.h b/src/layui/layui/layEditorOptionsPages.h similarity index 96% rename from src/laybasic/laybasic/layEditorOptionsPages.h rename to src/layui/layui/layEditorOptionsPages.h index a21f82fd0..8e40676d6 100644 --- a/src/laybasic/laybasic/layEditorOptionsPages.h +++ b/src/layui/layui/layEditorOptionsPages.h @@ -25,7 +25,7 @@ #ifndef HDR_layEditorOptionsPages #define HDR_layEditorOptionsPages -#include "laybasicCommon.h" +#include "layuiCommon.h" #include "layEditorOptionsPage.h" #include @@ -47,7 +47,7 @@ class Plugin; /** * @brief The object properties dialog */ -class LAYBASIC_PUBLIC EditorOptionsPages +class LAYUI_PUBLIC EditorOptionsPages : public QFrame { Q_OBJECT diff --git a/src/laybasic/laybasic/layFileDialog.cc b/src/layui/layui/layFileDialog.cc similarity index 100% rename from src/laybasic/laybasic/layFileDialog.cc rename to src/layui/layui/layFileDialog.cc diff --git a/src/laybasic/laybasic/layFileDialog.h b/src/layui/layui/layFileDialog.h similarity index 97% rename from src/laybasic/laybasic/layFileDialog.h rename to src/layui/layui/layFileDialog.h index 2ec220dd2..cb1bdb635 100644 --- a/src/laybasic/laybasic/layFileDialog.h +++ b/src/layui/layui/layFileDialog.h @@ -25,7 +25,7 @@ #ifndef HDR_layFileDialog #define HDR_layFileDialog -#include "laybasicCommon.h" +#include "layuiCommon.h" #include #include @@ -45,7 +45,7 @@ namespace lay * we need to use the static functions since these use the * system dialogs. */ -class LAYBASIC_PUBLIC FileDialog +class LAYUI_PUBLIC FileDialog : public QObject { public: diff --git a/src/laybasic/laybasic/layGenericSyntaxHighlighter.cc b/src/layui/layui/layGenericSyntaxHighlighter.cc similarity index 100% rename from src/laybasic/laybasic/layGenericSyntaxHighlighter.cc rename to src/layui/layui/layGenericSyntaxHighlighter.cc diff --git a/src/laybasic/laybasic/layGenericSyntaxHighlighter.h b/src/layui/layui/layGenericSyntaxHighlighter.h similarity index 96% rename from src/laybasic/laybasic/layGenericSyntaxHighlighter.h rename to src/layui/layui/layGenericSyntaxHighlighter.h index cbc0f684f..dea49a5a2 100644 --- a/src/laybasic/laybasic/layGenericSyntaxHighlighter.h +++ b/src/layui/layui/layGenericSyntaxHighlighter.h @@ -26,7 +26,7 @@ #define HDR_layGenericSyntaxHighlighter #include "tlString.h" -#include "laybasicCommon.h" +#include "layuiCommon.h" #include #include @@ -42,7 +42,7 @@ namespace lay /** * @brief Specifies one element in the text block's user data */ -struct LAYBASIC_PUBLIC SyntaxHighlighterElement +struct LAYUI_PUBLIC SyntaxHighlighterElement { public: /** @@ -63,7 +63,7 @@ public: * * The user data will contain useful data for bracket detection and other things */ -class LAYBASIC_PUBLIC SyntaxHighlighterUserData +class LAYUI_PUBLIC SyntaxHighlighterUserData : public QTextBlockUserData { public: @@ -94,7 +94,7 @@ public: * Rule implementations must implement this base class in order to plug into the * generic syntax highlighter framework. */ -class LAYBASIC_PUBLIC GenericSyntaxHighlighterRuleBase +class LAYUI_PUBLIC GenericSyntaxHighlighterRuleBase { public: /** @@ -133,7 +133,7 @@ public: /** * @brief A specialization of GenericSyntaxHighlighterRuleBase which looks for a choice of strings */ -class LAYBASIC_PUBLIC GenericSyntaxHighlighterRuleStringList +class LAYUI_PUBLIC GenericSyntaxHighlighterRuleStringList : public GenericSyntaxHighlighterRuleBase { public: @@ -154,7 +154,7 @@ private: * * This object will forward the match request to the actual implementation. */ -class LAYBASIC_PUBLIC GenericSyntaxHighlighterRule +class LAYUI_PUBLIC GenericSyntaxHighlighterRule { public: /** @@ -321,7 +321,7 @@ private: * Special context ID's are 0 (#stay), -n (#pop n times). * A context is associated with an attribute, which is given by an integer ID. */ -class LAYBASIC_PUBLIC GenericSyntaxHighlighterContext +class LAYUI_PUBLIC GenericSyntaxHighlighterContext { public: enum { @@ -480,7 +480,7 @@ private: /** * @brief A collection of (named) contexts */ -class LAYBASIC_PUBLIC GenericSyntaxHighlighterContexts +class LAYUI_PUBLIC GenericSyntaxHighlighterContexts { public: GenericSyntaxHighlighterContexts (); @@ -581,7 +581,7 @@ enum def_style { /** * @brief A collection of attributes */ -class LAYBASIC_PUBLIC GenericSyntaxHighlighterAttributes +class LAYUI_PUBLIC GenericSyntaxHighlighterAttributes { public: typedef std::map::const_iterator const_iterator; @@ -674,7 +674,7 @@ private: /** * @brief The parser's state */ -class LAYBASIC_PUBLIC GenericSyntaxHighlighterState +class LAYUI_PUBLIC GenericSyntaxHighlighterState { public: GenericSyntaxHighlighterState (const GenericSyntaxHighlighterContexts *contexts); @@ -712,7 +712,7 @@ private: /** * @brief A generic syntax highlighter using "Kate"'s syntax highlight scripts */ -class LAYBASIC_PUBLIC GenericSyntaxHighlighter +class LAYUI_PUBLIC GenericSyntaxHighlighter : public QSyntaxHighlighter { public: diff --git a/src/laybasic/laybasic/layGridNet.cc b/src/layui/layui/layGridNet.cc similarity index 99% rename from src/laybasic/laybasic/layGridNet.cc rename to src/layui/layui/layGridNet.cc index 612f58fc9..f17061177 100644 --- a/src/laybasic/laybasic/layGridNet.cc +++ b/src/layui/layui/layGridNet.cc @@ -24,10 +24,11 @@ #include "laybasicConfig.h" #include "layGridNet.h" #include "layConverters.h" -#include "layLayoutView.h" +#include "layLayoutViewBase.h" #include "layFixedFont.h" #include "layPixelBufferPainter.h" #include "laySnap.h" +#include "layColor.h" #include "dbTrans.h" #if defined(HAVE_QT) @@ -106,7 +107,7 @@ GridNetPluginDeclaration::config_page (QWidget *parent, std::string &title) cons #endif lay::Plugin * -GridNetPluginDeclaration::create_plugin (db::Manager *, Dispatcher *, lay::LayoutView *view) const +GridNetPluginDeclaration::create_plugin (db::Manager *, Dispatcher *, lay::LayoutViewBase *view) const { return new lay::GridNet (view); } @@ -116,7 +117,7 @@ static tl::RegisteredClass config_decl (new GridNetPlugi // ------------------------------------------------------------ // Implementation of the GridNet object -GridNet::GridNet (LayoutView *view) +GridNet::GridNet (LayoutViewBase *view) : lay::BackgroundViewObject (view->view_object_widget ()), lay::Plugin (view), mp_view (view), diff --git a/src/laybasic/laybasic/layGridNet.h b/src/layui/layui/layGridNet.h similarity index 94% rename from src/laybasic/laybasic/layGridNet.h rename to src/layui/layui/layGridNet.h index 529b30509..3991f948a 100644 --- a/src/laybasic/laybasic/layGridNet.h +++ b/src/layui/layui/layGridNet.h @@ -39,7 +39,7 @@ namespace Ui { namespace lay { -class LayoutView; +class LayoutViewBase; class ColorButton; class GridNetPluginDeclaration @@ -50,7 +50,7 @@ public: #if defined(HAVE_QT) virtual lay::ConfigPage *config_page (QWidget *parent, std::string &title) const; #endif - virtual lay::Plugin *create_plugin (db::Manager *, lay::Dispatcher *, lay::LayoutView *view) const; + virtual lay::Plugin *create_plugin (db::Manager *, lay::Dispatcher *, lay::LayoutViewBase *view) const; }; class GridNet @@ -68,7 +68,7 @@ public: CheckerBoard }; - GridNet (lay::LayoutView *view); + GridNet (lay::LayoutViewBase *view); private: virtual void render_bg (const lay::Viewport &vp, lay::ViewObjectCanvas &canvas); @@ -76,7 +76,7 @@ private: // implementation of the lay::Plugin interface virtual bool configure (const std::string &name, const std::string &value); - lay::LayoutView *mp_view; + lay::LayoutViewBase *mp_view; bool m_visible; bool m_show_ruler; double m_grid; diff --git a/src/laybasic/laybasic/layGridNetConfigPage.cc b/src/layui/layui/layGridNetConfigPage.cc similarity index 100% rename from src/laybasic/laybasic/layGridNetConfigPage.cc rename to src/layui/layui/layGridNetConfigPage.cc diff --git a/src/laybasic/laybasic/layGridNetConfigPage.h b/src/layui/layui/layGridNetConfigPage.h similarity index 100% rename from src/laybasic/laybasic/layGridNetConfigPage.h rename to src/layui/layui/layGridNetConfigPage.h diff --git a/src/laybasic/laybasic/layHierarchyControlPanel.cc b/src/layui/layui/layHierarchyControlPanel.cc similarity index 99% rename from src/laybasic/laybasic/layHierarchyControlPanel.cc rename to src/layui/layui/layHierarchyControlPanel.cc index 59293709d..304126ba0 100644 --- a/src/laybasic/laybasic/layHierarchyControlPanel.cc +++ b/src/layui/layui/layHierarchyControlPanel.cc @@ -46,7 +46,7 @@ #include "layBusy.h" #include "layHierarchyControlPanel.h" #include "layCellTreeModel.h" -#include "layLayoutView.h" +#include "layLayoutViewBase.h" #include "layAbstractMenu.h" #include "layQtTools.h" #include "layDialogs.h" @@ -209,7 +209,7 @@ HCPCellTreeWidget::mouseReleaseEvent (QMouseEvent *event) const int max_cellviews_in_split_mode = 5; -HierarchyControlPanel::HierarchyControlPanel (lay::LayoutView *view, QWidget *parent, const char *name) +HierarchyControlPanel::HierarchyControlPanel (lay::LayoutViewBase *view, QWidget *parent, const char *name) : QFrame (parent), m_enable_cb (true), mp_view (view), diff --git a/src/laybasic/laybasic/layHierarchyControlPanel.h b/src/layui/layui/layHierarchyControlPanel.h similarity index 97% rename from src/laybasic/laybasic/layHierarchyControlPanel.h rename to src/layui/layui/layHierarchyControlPanel.h index b5dab0ebc..8ac5a69a5 100644 --- a/src/laybasic/laybasic/layHierarchyControlPanel.h +++ b/src/layui/layui/layHierarchyControlPanel.h @@ -35,7 +35,7 @@ #include "dbLayout.h" #include "layCanvasPlane.h" #include "layViewOp.h" -#include "layLayoutView.h" +#include "layLayoutViewBase.h" #include "layCellTreeModel.h" #include "layWidgets.h" #include "tlDeferredExecution.h" @@ -111,7 +111,7 @@ public: * @param parent The Qt parent widget * @param name The layer control panel's widget name */ - HierarchyControlPanel (lay::LayoutView *view, QWidget *parent = 0, const char *name = "control_panel"); + HierarchyControlPanel (lay::LayoutViewBase *view, QWidget *parent = 0, const char *name = "control_panel"); /** * @brief Destructor @@ -258,7 +258,7 @@ public: /** * @brief Gets the layout view this panel is attached to */ - lay::LayoutView *view () + lay::LayoutViewBase *view () { return mp_view; } @@ -284,7 +284,7 @@ public slots: private: db::Layout *mp_layout; bool m_enable_cb; - lay::LayoutView *mp_view; + lay::LayoutViewBase *mp_view; std::vector m_cellviews; std::vector mp_cell_lists; std::vector mp_cell_list_headers; diff --git a/src/laybasic/laybasic/layIndexedNetlistModel.cc b/src/layui/layui/layIndexedNetlistModel.cc similarity index 100% rename from src/laybasic/laybasic/layIndexedNetlistModel.cc rename to src/layui/layui/layIndexedNetlistModel.cc diff --git a/src/laybasic/laybasic/layIndexedNetlistModel.h b/src/layui/layui/layIndexedNetlistModel.h similarity index 98% rename from src/laybasic/laybasic/layIndexedNetlistModel.h rename to src/layui/layui/layIndexedNetlistModel.h index 188a732af..4f6bc4c6a 100644 --- a/src/laybasic/laybasic/layIndexedNetlistModel.h +++ b/src/layui/layui/layIndexedNetlistModel.h @@ -25,7 +25,7 @@ #ifndef HDR_layIndexedNetlistModel #define HDR_layIndexedNetlistModel -#include "laybasicCommon.h" +#include "layuiCommon.h" #include "dbNetlistCrossReference.h" // for Status enum #include @@ -55,7 +55,7 @@ const size_t no_netlist_index = std::numeric_limits::max (); /** * @brief An interface to supply the netlist browser model with indexed items */ -class LAYBASIC_PUBLIC IndexedNetlistModel +class LAYUI_PUBLIC IndexedNetlistModel { public: typedef db::NetlistCrossReference::Status Status; @@ -127,7 +127,7 @@ private: /** * @brief An incarnation of the indexed netlist model for a single netlist */ -class LAYBASIC_PUBLIC SingleIndexedNetlistModel +class LAYUI_PUBLIC SingleIndexedNetlistModel : public IndexedNetlistModel { public: diff --git a/src/laybasic/laybasic/layItemDelegates.cc b/src/layui/layui/layItemDelegates.cc similarity index 100% rename from src/laybasic/laybasic/layItemDelegates.cc rename to src/layui/layui/layItemDelegates.cc diff --git a/src/laybasic/laybasic/layItemDelegates.h b/src/layui/layui/layItemDelegates.h similarity index 97% rename from src/laybasic/laybasic/layItemDelegates.h rename to src/layui/layui/layItemDelegates.h index ab0db7116..f3e5f7e49 100644 --- a/src/laybasic/laybasic/layItemDelegates.h +++ b/src/layui/layui/layItemDelegates.h @@ -25,7 +25,7 @@ #ifndef HDR_layItemDelegates #define HDR_layItemDelegates -#include "laybasicCommon.h" +#include "layuiCommon.h" #include @@ -37,7 +37,7 @@ namespace lay /** * @brief A delegate displaying the display text as HTML formatted text */ -class LAYBASIC_PUBLIC HTMLItemDelegate +class LAYUI_PUBLIC HTMLItemDelegate : public QStyledItemDelegate { Q_OBJECT diff --git a/src/laybasic/laybasic/layLayerControlPanel.cc b/src/layui/layui/layLayerControlPanel.cc similarity index 99% rename from src/laybasic/laybasic/layLayerControlPanel.cc rename to src/layui/layui/layLayerControlPanel.cc index 5be142020..372064b74 100644 --- a/src/laybasic/laybasic/layLayerControlPanel.cc +++ b/src/layui/layui/layLayerControlPanel.cc @@ -199,7 +199,7 @@ LCPTreeWidget::expand_all () // -------------------------------------------------------------------- // LayerControlPanel implementation -LayerControlPanel::LayerControlPanel (lay::LayoutView *view, db::Manager *manager, QWidget *parent, const char *name) +LayerControlPanel::LayerControlPanel (lay::LayoutViewBase *view, db::Manager *manager, QWidget *parent, const char *name) : QFrame (parent), db::Object (manager), mp_view (view), @@ -1307,7 +1307,7 @@ struct LDSortingProps struct LayerSorter { - LayerSorter (const lay::LayoutView *view, lay::LayerControlPanel::SortOrder order) + LayerSorter (const lay::LayoutViewBase *view, lay::LayerControlPanel::SortOrder order) : m_order (order), mp_view (view) { // .. nothing yet .. @@ -1390,7 +1390,7 @@ struct LayerSorter private: lay::LayerControlPanel::SortOrder m_order; - const lay::LayoutView *mp_view; + const lay::LayoutViewBase *mp_view; }; void diff --git a/src/laybasic/laybasic/layLayerControlPanel.h b/src/layui/layui/layLayerControlPanel.h similarity index 98% rename from src/laybasic/laybasic/layLayerControlPanel.h rename to src/layui/layui/layLayerControlPanel.h index 8a7d6904a..872e0b691 100644 --- a/src/laybasic/laybasic/layLayerControlPanel.h +++ b/src/layui/layui/layLayerControlPanel.h @@ -39,7 +39,7 @@ #include "layCanvasPlane.h" #include "layViewOp.h" -#include "layLayoutView.h" +#include "layLayoutViewBase.h" #include "layColorPalette.h" #include "layStipplePalette.h" #include "layDitherPattern.h" @@ -127,7 +127,7 @@ public: * @param parent The Qt parent widget * @param name The layer control panel's widget name */ - LayerControlPanel (lay::LayoutView *view, db::Manager *manager, QWidget *parent = 0, const char *name = "control_panel"); + LayerControlPanel (LayoutViewBase *view, db::Manager *manager, QWidget *parent = 0, const char *name = "control_panel"); /** * @brief Destructor @@ -339,7 +339,7 @@ private: LCPTreeWidget *mp_layer_list; std::unique_ptr mp_ll_style; LayerTreeModel *mp_model; - lay::LayoutView *mp_view; + lay::LayoutViewBase *mp_view; bool m_needs_update; bool m_tabs_need_update; bool m_hidden_flags_need_update; diff --git a/src/laybasic/laybasic/layLayerMappingWidget.cc b/src/layui/layui/layLayerMappingWidget.cc similarity index 100% rename from src/laybasic/laybasic/layLayerMappingWidget.cc rename to src/layui/layui/layLayerMappingWidget.cc diff --git a/src/laybasic/laybasic/layLayerMappingWidget.h b/src/layui/layui/layLayerMappingWidget.h similarity index 96% rename from src/laybasic/laybasic/layLayerMappingWidget.h rename to src/layui/layui/layLayerMappingWidget.h index b0898381e..706c2c355 100644 --- a/src/laybasic/laybasic/layLayerMappingWidget.h +++ b/src/layui/layui/layLayerMappingWidget.h @@ -27,7 +27,7 @@ #include -#include "laybasicCommon.h" +#include "layuiCommon.h" #include "dbStreamLayers.h" namespace Ui @@ -43,7 +43,7 @@ class FileDialog; /** * @brief A widget for editing the layer mapping for the reader options */ -class LAYBASIC_PUBLIC LayerMappingWidget +class LAYUI_PUBLIC LayerMappingWidget : public QFrame { Q_OBJECT diff --git a/src/laybasic/laybasic/layLayerToolbox.cc b/src/layui/layui/layLayerToolbox.cc similarity index 99% rename from src/laybasic/laybasic/layLayerToolbox.cc rename to src/layui/layui/layLayerToolbox.cc index 0be03095e..416858fdd 100644 --- a/src/laybasic/laybasic/layLayerToolbox.cc +++ b/src/layui/layui/layLayerToolbox.cc @@ -34,7 +34,7 @@ #include #include "tlExceptions.h" -#include "layLayoutView.h" +#include "layLayoutViewBase.h" #include "layEditStipplesForm.h" #include "layEditLineStylesForm.h" #include "laySelectStippleForm.h" @@ -928,7 +928,7 @@ LayerToolbox::~LayerToolbox () } void -LayerToolbox::set_view (LayoutView *view) +LayerToolbox::set_view (LayoutViewBase *view) { mp_dither_palette->set_view (view); mp_style_palette->set_view (view); diff --git a/src/laybasic/laybasic/layLayerToolbox.h b/src/layui/layui/layLayerToolbox.h similarity index 96% rename from src/laybasic/laybasic/layLayerToolbox.h rename to src/layui/layui/layLayerToolbox.h index b9fd59d6e..a635254b7 100644 --- a/src/laybasic/laybasic/layLayerToolbox.h +++ b/src/layui/layui/layLayerToolbox.h @@ -33,6 +33,7 @@ #include #include +#include "layuiCommon.h" #include "layColorPalette.h" #include "layStipplePalette.h" #include "layLineStylePalette.h" @@ -40,7 +41,7 @@ namespace lay { -class LayoutView; +class LayoutViewBase; class LCPDitherPalette; class LCPColorPalette; class LCPActiveLabel; @@ -143,7 +144,7 @@ Q_OBJECT public: LCPStylePalette (QWidget *parent, const char *name = 0); - void set_view (LayoutView *view) + void set_view (LayoutViewBase *view) { mp_view = view; } @@ -164,7 +165,7 @@ private: void create_pixmap_for_line_style (LCPActiveLabel *b, int n); lay::LineStylePalette m_palette; - lay::LayoutView *mp_view; + lay::LayoutViewBase *mp_view; std::vector m_style_buttons; }; @@ -185,7 +186,7 @@ public: void set_palette (const lay::StipplePalette &p); - void set_view (LayoutView *view) + void set_view (LayoutViewBase *view) { mp_view = view; } @@ -199,7 +200,7 @@ signals: private: lay::StipplePalette m_palette; - lay::LayoutView *mp_view; + lay::LayoutViewBase *mp_view; std::vector m_stipple_buttons; void create_pixmap_for (LCPActiveLabel *b, int n); @@ -259,7 +260,7 @@ private: /** * @brief A widget implementing the layer toolbox */ -class LAYBASIC_PUBLIC LayerToolbox +class LAYUI_PUBLIC LayerToolbox : public QWidget { Q_OBJECT @@ -280,7 +281,7 @@ public: * * This will make the toolbox control the given layout view */ - void set_view (LayoutView *view); + void set_view (LayoutViewBase *view); /** * @brief Changing of the color palette @@ -335,7 +336,7 @@ protected slots: void animation_changed (int mode); private: - LayoutView *mp_view; + LayoutViewBase *mp_view; std::vector > m_tool_panels; LCPDitherPalette *mp_dither_palette; LCPStylePalette *mp_style_palette; diff --git a/src/laybasic/laybasic/layLayerTreeModel.cc b/src/layui/layui/layLayerTreeModel.cc similarity index 99% rename from src/laybasic/laybasic/layLayerTreeModel.cc rename to src/layui/layui/layLayerTreeModel.cc index 741f26957..e53bd19fc 100644 --- a/src/laybasic/laybasic/layLayerTreeModel.cc +++ b/src/layui/layui/layLayerTreeModel.cc @@ -23,7 +23,7 @@ #if defined(HAVE_QT) #include "layLayerTreeModel.h" -#include "layLayoutView.h" +#include "layLayoutViewBase.h" #include "layBitmapsToImage.h" #include "dbLayoutUtils.h" #include "tlLog.h" @@ -179,7 +179,7 @@ EmptyWithinViewCache::determine_empty_layers (const db::Layout *layout, unsigned // -------------------------------------------------------------------- // LayerTreeModel implementation -LayerTreeModel::LayerTreeModel (QWidget *parent, lay::LayoutView *view) +LayerTreeModel::LayerTreeModel (QWidget *parent, lay::LayoutViewBase *view) : QAbstractItemModel (parent), mp_view (view), m_filter_mode (false), m_id_start (0), m_id_end (0), m_phase ((unsigned int) -1), m_test_shapes_in_view (false), m_hide_empty_layers (false) { @@ -636,9 +636,9 @@ LayerTreeModel::empty_within_view_predicate (const QModelIndex &index) const } } -LAYBASIC_PUBLIC +LAYUI_PUBLIC QIcon -LayerTreeModel::icon_for_layer (const lay::LayerPropertiesConstIterator &iter, lay::LayoutView *view, unsigned int w, unsigned int h, unsigned int di_off, bool no_state) +LayerTreeModel::icon_for_layer (const lay::LayerPropertiesConstIterator &iter, lay::LayoutViewBase *view, unsigned int w, unsigned int h, unsigned int di_off, bool no_state) { h = std::max ((unsigned int) 16, h); w = std::max ((unsigned int) 16, w); @@ -851,7 +851,7 @@ LayerTreeModel::data (const QModelIndex &index, int role) const if (m_selected_ids.find (size_t (index.internalPointer ())) != m_selected_ids.end ()) { // for selected items pick a color between Highlight and Base - QPalette pl (mp_view->palette ()); + QPalette pl (mp_view->widget ()->palette ()); QColor c1 = pl.color (QPalette::Highlight); QColor cb = pl.color (QPalette::Base); return QVariant (QColor ((c1.red () + cb.red ()) / 2, (c1.green () + cb.green ()) / 2, (c1.blue () + cb.blue ()) / 2)); diff --git a/src/laybasic/laybasic/layLayerTreeModel.h b/src/layui/layui/layLayerTreeModel.h similarity index 95% rename from src/laybasic/laybasic/layLayerTreeModel.h rename to src/layui/layui/layLayerTreeModel.h index 8eab10b20..b5a0b49d5 100644 --- a/src/laybasic/laybasic/layLayerTreeModel.h +++ b/src/layui/layui/layLayerTreeModel.h @@ -26,7 +26,7 @@ #define HDR_layLayerTreeModel #include "dbBox.h" -#include "laybasicCommon.h" +#include "layuiCommon.h" #include #include @@ -48,8 +48,7 @@ namespace tl namespace lay { -class LayoutView; -class LayoutView; +class LayoutViewBase; class LayerPropertiesConstIterator; /** @@ -80,7 +79,7 @@ private: * representation or a hierarchical one. */ -class LAYBASIC_PUBLIC LayerTreeModel +class LAYUI_PUBLIC LayerTreeModel : public QAbstractItemModel { Q_OBJECT @@ -91,7 +90,7 @@ public: * * The LayoutView reference is required to obtain hidden cell state and current state flags. */ - LayerTreeModel (QWidget *parent, lay::LayoutView *view); + LayerTreeModel (QWidget *parent, lay::LayoutViewBase *view); /** * @brief Dtor @@ -110,7 +109,7 @@ public: /** * @brief Provides an icon for a given layer style */ - static QIcon icon_for_layer (const lay::LayerPropertiesConstIterator &iter, lay::LayoutView *view, unsigned int w, unsigned int h, unsigned int di_offset, bool no_state = false); + static QIcon icon_for_layer (const lay::LayerPropertiesConstIterator &iter, lay::LayoutViewBase *view, unsigned int w, unsigned int h, unsigned int di_offset, bool no_state = false); /** * @brief Gets the preferred icon size @@ -252,7 +251,7 @@ signals: void hidden_flags_need_update (); private: - lay::LayoutView *mp_view; + lay::LayoutViewBase *mp_view; bool m_filter_mode; size_t m_id_start, m_id_end; unsigned int m_phase; diff --git a/src/laybasic/laybasic/layLayoutPropertiesForm.cc b/src/layui/layui/layLayoutPropertiesForm.cc similarity index 98% rename from src/laybasic/laybasic/layLayoutPropertiesForm.cc rename to src/layui/layui/layLayoutPropertiesForm.cc index 00eeff068..283a2a08f 100644 --- a/src/laybasic/laybasic/layLayoutPropertiesForm.cc +++ b/src/layui/layui/layLayoutPropertiesForm.cc @@ -23,7 +23,7 @@ #if defined(HAVE_QT) #include "layLayoutPropertiesForm.h" -#include "layLayoutView.h" +#include "layLayoutViewBase.h" #include "tlExceptions.h" #include "layDialogs.h" #include "tlInternational.h" @@ -40,7 +40,7 @@ namespace lay // ------------------------------------------------------------ -LayoutPropertiesForm::LayoutPropertiesForm (QWidget *parent, lay::LayoutView *view, const char *name) +LayoutPropertiesForm::LayoutPropertiesForm (QWidget *parent, lay::LayoutViewBase *view, const char *name) : QDialog (parent), Ui::LayoutPropertiesForm () { m_editable = view->is_editable (); diff --git a/src/laybasic/laybasic/layLayoutPropertiesForm.h b/src/layui/layui/layLayoutPropertiesForm.h similarity index 86% rename from src/laybasic/laybasic/layLayoutPropertiesForm.h rename to src/layui/layui/layLayoutPropertiesForm.h index 5a033616d..5a5e8d664 100644 --- a/src/laybasic/laybasic/layLayoutPropertiesForm.h +++ b/src/layui/layui/layLayoutPropertiesForm.h @@ -25,23 +25,26 @@ #ifndef HDR_layLayoutPropertiesForm #define HDR_layLayoutPropertiesForm -#include -#include "ui_LayoutProperties.h" +#include "layuiCommon.h" #include "layCellView.h" +#include "ui_LayoutProperties.h" + +#include + #include namespace lay { -class LayoutView; +class LayoutViewBase; -class LAYBASIC_PUBLIC LayoutPropertiesForm +class LAYUI_PUBLIC LayoutPropertiesForm : public QDialog, private Ui::LayoutPropertiesForm { Q_OBJECT public: - LayoutPropertiesForm (QWidget *parent, lay::LayoutView *view, const char *name); + LayoutPropertiesForm (QWidget *parent, lay::LayoutViewBase *view, const char *name); void accept (); void commit (); @@ -54,7 +57,7 @@ private slots: private: std::vector m_handles; - lay::LayoutView *mp_view; + lay::LayoutViewBase *mp_view; int m_index; bool m_editable; }; diff --git a/src/laybasic/laybasic/layLayoutStatistics.qrc b/src/layui/layui/layLayoutStatistics.qrc similarity index 100% rename from src/laybasic/laybasic/layLayoutStatistics.qrc rename to src/layui/layui/layLayoutStatistics.qrc diff --git a/src/laybasic/laybasic/layLayoutStatisticsForm.cc b/src/layui/layui/layLayoutStatisticsForm.cc similarity index 99% rename from src/laybasic/laybasic/layLayoutStatisticsForm.cc rename to src/layui/layui/layLayoutStatisticsForm.cc index a3e847ab5..52b3fc9f1 100644 --- a/src/laybasic/laybasic/layLayoutStatisticsForm.cc +++ b/src/layui/layui/layLayoutStatisticsForm.cc @@ -23,7 +23,7 @@ #if defined(HAVE_QT) #include "layLayoutStatisticsForm.h" -#include "layLayoutView.h" +#include "layLayoutViewBase.h" #include "tlInternational.h" #include "tlString.h" #include "tlExpression.h" @@ -790,7 +790,7 @@ StatisticsSource::get (const std::string &url) // ------------------------------------------------------------ -LayoutStatisticsForm::LayoutStatisticsForm (QWidget *parent, lay::LayoutView *view, const char *name) +LayoutStatisticsForm::LayoutStatisticsForm (QWidget *parent, lay::LayoutViewBase *view, const char *name) : QDialog (parent), Ui::LayoutStatisticsForm (), mp_source (0) { setObjectName (QString::fromUtf8 (name)); diff --git a/src/laybasic/laybasic/layLayoutStatisticsForm.h b/src/layui/layui/layLayoutStatisticsForm.h similarity index 92% rename from src/laybasic/laybasic/layLayoutStatisticsForm.h rename to src/layui/layui/layLayoutStatisticsForm.h index f8ee0835c..e2abaef50 100644 --- a/src/laybasic/laybasic/layLayoutStatisticsForm.h +++ b/src/layui/layui/layLayoutStatisticsForm.h @@ -33,7 +33,7 @@ namespace lay { -class LayoutView; +class LayoutViewBase; class StatisticsSource; class LayoutStatisticsForm @@ -42,7 +42,7 @@ class LayoutStatisticsForm Q_OBJECT public: - LayoutStatisticsForm (QWidget *parent, lay::LayoutView *view, const char *name); + LayoutStatisticsForm (QWidget *parent, lay::LayoutViewBase *view, const char *name); ~LayoutStatisticsForm (); public slots: diff --git a/src/laybasic/laybasic/layLayoutViewConfigPages.cc b/src/layui/layui/layLayoutViewConfigPages.cc similarity index 100% rename from src/laybasic/laybasic/layLayoutViewConfigPages.cc rename to src/layui/layui/layLayoutViewConfigPages.cc diff --git a/src/laybasic/laybasic/layLayoutViewConfigPages.h b/src/layui/layui/layLayoutViewConfigPages.h similarity index 100% rename from src/laybasic/laybasic/layLayoutViewConfigPages.h rename to src/layui/layui/layLayoutViewConfigPages.h diff --git a/src/laybasic/laybasic/layLayoutViewFunctions.cc b/src/layui/layui/layLayoutViewFunctions.cc similarity index 94% rename from src/laybasic/laybasic/layLayoutViewFunctions.cc rename to src/layui/layui/layLayoutViewFunctions.cc index 0596afaed..b25017d5b 100644 --- a/src/laybasic/laybasic/layLayoutViewFunctions.cc +++ b/src/layui/layui/layLayoutViewFunctions.cc @@ -23,7 +23,7 @@ #if defined(HAVE_QT) #include "layLayoutViewFunctions.h" -#include "layLayoutView.h" +#include "layLayoutViewBase.h" #include "layCellSelectionForm.h" #include "layLayoutStatisticsForm.h" #include "layLayoutPropertiesForm.h" @@ -57,7 +57,7 @@ collect_cells_to_delete (const db::Layout &layout, const db::Cell &cell, std::se } static bool -validate_cell_path (const db::Layout &layout, lay::LayoutView::cell_path_type &path) +validate_cell_path (const db::Layout &layout, lay::LayoutViewBase::cell_path_type &path) { for (size_t i = 0; i < path.size (); ++i) { @@ -79,7 +79,7 @@ validate_cell_path (const db::Layout &layout, lay::LayoutView::cell_path_type &p return false; } -LayoutViewFunctions::LayoutViewFunctions (db::Manager *manager, LayoutView *view) +LayoutViewFunctions::LayoutViewFunctions (db::Manager *manager, LayoutViewBase *view) : lay::Plugin (view), mp_view (view), mp_manager (manager) { m_del_cell_mode = 0; @@ -112,7 +112,7 @@ LayoutViewFunctions::menu_activated (const std::string &symbol) if (symbol == "cm_show_properties") { - view ()->show_properties (view ()); + view ()->show_properties (view ()->widget ()); } else if (symbol == "cm_delete") { @@ -179,7 +179,7 @@ LayoutViewFunctions::menu_activated (const std::string &symbol) } else if (symbol == "cm_select_current_cell") { if (view ()->active_cellview_index () >= 0) { - lay::LayoutView::cell_path_type path; + lay::LayoutViewBase::cell_path_type path; int cvi = view ()->active_cellview_index (); view ()->current_cell_path (path); view ()->select_cell_fit (path, cvi); @@ -305,10 +305,10 @@ LayoutViewFunctions::menu_activated (const std::string &symbol) cm_new_layer (); } } else if (symbol == "cm_layout_props") { - lay::LayoutPropertiesForm lp_form (view (), view (), "layout_props_form"); + lay::LayoutPropertiesForm lp_form (view ()->widget (), view (), "layout_props_form"); lp_form.exec (); } else if (symbol == "cm_layout_stats") { - lay::LayoutStatisticsForm lp_form (view (), view (), "layout_props_form"); + lay::LayoutStatisticsForm lp_form (view ()->widget (), view (), "layout_props_form"); lp_form.exec (); } else if (symbol == "cm_reload") { cm_reload (); @@ -418,13 +418,9 @@ LayoutViewFunctions::menu_activated (const std::string &symbol) void LayoutViewFunctions::cm_cell_user_properties () { - if (! view ()->hierarchy_panel ()) { - return; - } - int cv_index = view ()->active_cellview_index (); - lay::LayoutView::cell_path_type path; - view ()->hierarchy_panel ()->current_cell (cv_index, path); + lay::LayoutViewBase::cell_path_type path; + view ()->current_cell_path (cv_index, path); if (cv_index >= 0 && path.size () > 0) { @@ -432,7 +428,7 @@ LayoutViewFunctions::cm_cell_user_properties () db::Cell &cell = layout.cell (path.back ()); db::properties_id_type prop_id = cell.prop_id (); - lay::UserPropertiesForm props_form (view ()); + lay::UserPropertiesForm props_form (view ()->widget ()); if (props_form.show (view (), cv_index, prop_id)) { view ()->transaction (tl::to_string (tr ("Edit cell's user properties"))); @@ -447,13 +443,9 @@ LayoutViewFunctions::cm_cell_user_properties () void LayoutViewFunctions::cm_cell_replace () { - if (! view ()->hierarchy_panel ()) { - return; - } - int cv_index = view ()->active_cellview_index (); - std::vector paths; - view ()->hierarchy_panel ()->selected_cells (cv_index, paths); + std::vector paths; + view ()->selected_cells_paths (cv_index, paths); if (cv_index >= 0 && paths.size () > 0) { @@ -464,14 +456,14 @@ LayoutViewFunctions::cm_cell_replace () db::Layout &layout = view ()->cellview (cv_index)->layout (); bool needs_to_ask = false; - for (std::vector::const_iterator p = paths.begin (); p != paths.end () && ! needs_to_ask; ++p) { + for (std::vector::const_iterator p = paths.begin (); p != paths.end () && ! needs_to_ask; ++p) { if (layout.is_valid_cell_index (p->back ()) && ! layout.cell (p->back ()).is_leaf ()) { needs_to_ask = true; } } - lay::ReplaceCellOptionsDialog mode_dialog (view ()); + lay::ReplaceCellOptionsDialog mode_dialog (view ()->widget ()); db::cell_index_type with_cell = paths.front ().back (); int mode = needs_to_ask ? m_del_cell_mode : 0; @@ -485,7 +477,7 @@ LayoutViewFunctions::cm_cell_replace () if (with_cell != paths.front ().back ()) { // remember the current path - lay::LayoutView::cell_path_type cell_path (view ()->cellview (cv_index).combined_unspecific_path ()); + lay::LayoutViewBase::cell_path_type cell_path (view ()->cellview (cv_index).combined_unspecific_path ()); view ()->clear_selection (); @@ -507,7 +499,7 @@ LayoutViewFunctions::cm_cell_replace () } std::set cells_to_delete; - for (std::vector::const_iterator p = paths.begin (); p != paths.end (); ++p) { + for (std::vector::const_iterator p = paths.begin (); p != paths.end (); ++p) { if (! p->empty () && layout.is_valid_cell_index (p->back ())) { cells_to_delete.insert (p->back ()); if (mode == 2) { @@ -596,20 +588,16 @@ LayoutViewFunctions::cm_lay_convert_to_static () void LayoutViewFunctions::cm_cell_convert_to_static () { - if (! view ()->hierarchy_panel ()) { - return; - } - int cv_index = view ()->active_cellview_index (); - std::vector paths; - view ()->hierarchy_panel ()->selected_cells (cv_index, paths); + std::vector paths; + view ()->selected_cells_paths (cv_index, paths); if (cv_index >= 0 && paths.size () > 0) { db::Layout &layout = view ()->cellview (cv_index)->layout (); // remember the current path - lay::LayoutView::cell_path_type cell_path (view ()->cellview (cv_index).combined_unspecific_path ()); + lay::LayoutViewBase::cell_path_type cell_path (view ()->cellview (cv_index).combined_unspecific_path ()); view ()->clear_selection (); @@ -617,7 +605,7 @@ LayoutViewFunctions::cm_cell_convert_to_static () std::map cell_map; - for (std::vector::iterator p = paths.begin (); p != paths.end (); ++p) { + for (std::vector::iterator p = paths.begin (); p != paths.end (); ++p) { if (! p->empty () && layout.is_valid_cell_index (p->back ())) { db::cell_index_type new_cell = layout.convert_cell_to_static (p->back ()); if (new_cell != p->back ()) { @@ -653,20 +641,16 @@ LayoutViewFunctions::cm_cell_convert_to_static () void LayoutViewFunctions::cm_cell_delete () { - if (! view ()->hierarchy_panel ()) { - return; - } - int cv_index = view ()->active_cellview_index (); - std::vector paths; - view ()->hierarchy_panel ()->selected_cells (cv_index, paths); + std::vector paths; + view ()->selected_cells_paths (cv_index, paths); if (cv_index >= 0 && paths.size () > 0) { db::Layout &layout = view ()->cellview (cv_index)->layout (); bool needs_to_ask = false; - for (std::vector::const_iterator p = paths.begin (); p != paths.end () && ! needs_to_ask; ++p) { + for (std::vector::const_iterator p = paths.begin (); p != paths.end () && ! needs_to_ask; ++p) { if (layout.is_valid_cell_index (p->back ()) && ! layout.cell (p->back ()).is_leaf ()) { needs_to_ask = true; } @@ -677,7 +661,7 @@ LayoutViewFunctions::cm_cell_delete () mode = 0; } - lay::DeleteCellModeDialog mode_dialog (view ()); + lay::DeleteCellModeDialog mode_dialog (view ()->widget ()); if (! needs_to_ask || mode_dialog.exec_dialog (mode)) { if (needs_to_ask) { @@ -685,12 +669,12 @@ LayoutViewFunctions::cm_cell_delete () } // remember the current path - lay::LayoutView::cell_path_type cell_path (view ()->cellview (cv_index).combined_unspecific_path ()); + lay::LayoutViewBase::cell_path_type cell_path (view ()->cellview (cv_index).combined_unspecific_path ()); view ()->clear_selection (); std::set cells_to_delete; - for (std::vector::const_iterator p = paths.begin (); p != paths.end (); ++p) { + for (std::vector::const_iterator p = paths.begin (); p != paths.end (); ++p) { if (! p->empty () && layout.is_valid_cell_index (p->back ())) { cells_to_delete.insert (p->back ()); if (mode == 2) { @@ -789,7 +773,7 @@ LayoutViewFunctions::cm_cell_flatten () if (cv.is_valid ()) { std::vector paths; - view ()->hierarchy_panel ()->selected_cells (cv_index, paths); + view ()->selected_cells_paths (cv_index, paths); if (paths.empty ()) { throw tl::Exception (tl::to_string (tr ("No cells selected for flattening"))); } @@ -800,7 +784,7 @@ LayoutViewFunctions::cm_cell_flatten () } } - FlattenInstOptionsDialog options_dialog (view ()); + FlattenInstOptionsDialog options_dialog (view ()->widget ()); int flatten_insts_levels = -1; bool prune = true; @@ -876,17 +860,13 @@ LayoutViewFunctions::cm_cell_flatten () void LayoutViewFunctions::cm_cell_rename () { - if (! view ()->hierarchy_panel ()) { - return; - } - int cv_index = view ()->active_cellview_index (); - lay::LayoutView::cell_path_type path; - view ()->hierarchy_panel ()->current_cell (cv_index, path); + lay::LayoutViewBase::cell_path_type path; + view ()->current_cell_path (cv_index, path); if (cv_index >= 0 && path.size () > 0) { - lay::RenameCellDialog name_dialog (view ()); + lay::RenameCellDialog name_dialog (view ()->widget ()); db::Layout &layout = view ()->cellview (cv_index)->layout (); std::string name (layout.cell_name (path.back ())); @@ -918,53 +898,43 @@ LayoutViewFunctions::cm_open_current_cell () void LayoutViewFunctions::cm_cell_hide () { - if (view ()->hierarchy_panel ()) { + std::vector paths; + view ()->selected_cells_paths (view ()->active_cellview_index (), paths); - std::vector paths; - view ()->hierarchy_panel ()->selected_cells (view ()->active_cellview_index (), paths); + view ()->transaction (tl::to_string (tr ("Hide cell"))); - view ()->transaction (tl::to_string (tr ("Hide cell"))); - - for (std::vector::const_iterator p = paths.begin (); p != paths.end (); ++p) { - if (! p->empty ()) { - view ()->hide_cell (p->back (), view ()->active_cellview_index ()); - } + for (std::vector::const_iterator p = paths.begin (); p != paths.end (); ++p) { + if (! p->empty ()) { + view ()->hide_cell (p->back (), view ()->active_cellview_index ()); } - - view ()->commit (); - } + + view ()->commit (); } void LayoutViewFunctions::cm_cell_show () { - if (view ()->hierarchy_panel ()) { + std::vector paths; + view ()->selected_cells_paths (view ()->active_cellview_index (), paths); - std::vector paths; - view ()->hierarchy_panel ()->selected_cells (view ()->active_cellview_index (), paths); + view ()->transaction (tl::to_string (tr ("Show cell"))); - view ()->transaction (tl::to_string (tr ("Show cell"))); - - for (std::vector::const_iterator p = paths.begin (); p != paths.end (); ++p) { - if (! p->empty ()) { - view ()->show_cell (p->back (), view ()->active_cellview_index ()); - } + for (std::vector::const_iterator p = paths.begin (); p != paths.end (); ++p) { + if (! p->empty ()) { + view ()->show_cell (p->back (), view ()->active_cellview_index ()); } - - view ()->commit (); - } + + view ()->commit (); } void LayoutViewFunctions::cm_cell_show_all () { - if (view ()->hierarchy_panel ()) { - view ()->transaction (tl::to_string (tr ("Show all cells"))); - view ()->show_all_cells (); - view ()->commit (); - } + view ()->transaction (tl::to_string (tr ("Show all cells"))); + view ()->show_all_cells (); + view ()->commit (); } void @@ -1246,7 +1216,7 @@ LayoutViewFunctions::cm_new_cell () static double s_new_cell_window_size = 2.0; static std::string s_new_cell_cell_name; - NewCellPropertiesDialog cell_prop_dia (view ()); + NewCellPropertiesDialog cell_prop_dia (view ()->widget ()); if (cell_prop_dia.exec_dialog (& cv->layout (), s_new_cell_cell_name, s_new_cell_window_size)) { db::cell_index_type new_ci = view ()->new_cell (view ()->active_cellview_index (), s_new_cell_cell_name.c_str ()); @@ -1309,7 +1279,7 @@ LayoutViewFunctions::cm_reload () bool can_reload = true; if (dirty_layouts != 0) { - QMessageBox mbox (view ()); + QMessageBox mbox (view ()->widget ()); mbox.setText (tl::to_qstring (tl::to_string (tr ("The following layouts need saving:\n\n")) + dirty_files + "\n\nPress 'Reload Without Saving' to reload anyhow and discard changes.")); mbox.setWindowTitle (tr ("Save Needed")); mbox.setIcon (QMessageBox::Warning); @@ -1362,7 +1332,7 @@ LayoutViewFunctions::transform_layout (const db::DCplxTrans &tr_mic) } if (has_proxy && - QMessageBox::question (view (), + QMessageBox::question (view ()->widget (), tr ("Transforming PCells Or Library Cells"), tr ("The layout contains PCells or library cells or both.\n" "Any changes to such cells may be lost when their layout is refreshed later.\n" @@ -1449,7 +1419,7 @@ LayoutViewFunctions::cm_lay_scale () void LayoutViewFunctions::cm_lay_move () { - lay::MoveOptionsDialog options (view ()); + lay::MoveOptionsDialog options (view ()->widget ()); if (options.exec_dialog (m_move_dist)) { transform_layout (db::DCplxTrans (m_move_dist)); } @@ -1569,7 +1539,7 @@ LayoutViewFunctions::cm_sel_move_to () double y = sel_bbox.bottom () + (sel_bbox.height () * (1 + m_move_to_origin_mode_y) * 0.5); db::DPoint move_target (x, y); - lay::MoveToOptionsDialog options (view ()); + lay::MoveToOptionsDialog options (view ()->widget ()); if (options.exec_dialog (m_move_to_origin_mode_x, m_move_to_origin_mode_y, move_target)) { x = sel_bbox.left () + (sel_bbox.width () * (1 + m_move_to_origin_mode_x) * 0.5); @@ -1583,7 +1553,7 @@ LayoutViewFunctions::cm_sel_move_to () void LayoutViewFunctions::cm_sel_move () { - lay::MoveOptionsDialog options (view ()); + lay::MoveOptionsDialog options (view ()->widget ()); if (options.exec_dialog (m_move_dist)) { do_transform (db::DCplxTrans (m_move_dist)); } @@ -1617,7 +1587,7 @@ LayoutViewFunctions::cm_copy_layer () } - lay::DuplicateLayerDialog dialog (view ()); + lay::DuplicateLayerDialog dialog (view ()->widget ()); if (dialog.exec_dialog (view (), m_copy_cva, m_copy_layera, m_copy_cvr, m_copy_layerr, m_duplicate_hier_mode, m_clear_before)) { bool supports_undo = true; @@ -1777,7 +1747,7 @@ LayoutViewFunctions::cm_new_layer () const lay::CellView &cv = view ()->cellview (index); - lay::NewLayerPropertiesDialog prop_dia (view ()); + lay::NewLayerPropertiesDialog prop_dia (view ()->widget ()); if (prop_dia.exec_dialog (cv, m_new_layer_props)) { for (unsigned int l = 0; l < cv->layout ().layers (); ++l) { @@ -1815,7 +1785,7 @@ LayoutViewFunctions::cm_align_cell_origin () throw tl::Exception (tl::to_string (tr ("Cannot use this function on a PCell or library cell"))); } - lay::AlignCellOptionsDialog dialog (view ()); + lay::AlignCellOptionsDialog dialog (view ()->widget ()); if (dialog.exec_dialog (m_align_cell_options)) { view ()->clear_selection (); @@ -1914,7 +1884,7 @@ LayoutViewFunctions::cm_edit_layer () db::LayerProperties layer_props = cv->layout ().get_properties ((unsigned int) sel->layer_index ()); - lay::NewLayerPropertiesDialog prop_dia (view ()); + lay::NewLayerPropertiesDialog prop_dia (view ()->widget ()); if (prop_dia.exec_dialog (cv, layer_props)) { for (unsigned int l = 0; l < cv->layout ().layers (); ++l) { @@ -2007,7 +1977,7 @@ LayoutViewFunctions::cm_clear_layer () throw tl::Exception (tl::to_string (tr ("No layer selected for clearing"))); } - lay::ClearLayerModeDialog mode_dialog (view ()); + lay::ClearLayerModeDialog mode_dialog (view ()->widget ()); if (mode_dialog.exec_dialog (m_layer_hier_mode)) { view ()->cancel_edits (); @@ -2237,7 +2207,7 @@ public: void implements_primary_mouse_modes (std::vector > > &modes) { std::vector mode_titles; - lay::LayoutView::intrinsic_mouse_modes (&mode_titles); + lay::LayoutViewBase::intrinsic_mouse_modes (&mode_titles); int mode_id = 0; for (std::vector ::const_iterator t = mode_titles.begin (); t != mode_titles.end (); ++t, --mode_id) { @@ -2246,7 +2216,7 @@ public: } } - lay::Plugin *create_plugin (db::Manager *manager, Dispatcher *, LayoutView *view) const + lay::Plugin *create_plugin (db::Manager *manager, Dispatcher *, LayoutViewBase *view) const { return new LayoutViewFunctions (manager, view); } diff --git a/src/laybasic/laybasic/layLayoutViewFunctions.h b/src/layui/layui/layLayoutViewFunctions.h similarity index 94% rename from src/laybasic/laybasic/layLayoutViewFunctions.h rename to src/layui/layui/layLayoutViewFunctions.h index 6f25e5eb7..9950ebcf2 100644 --- a/src/laybasic/laybasic/layLayoutViewFunctions.h +++ b/src/layui/layui/layLayoutViewFunctions.h @@ -25,7 +25,7 @@ #ifndef HDR_layLayoutViewFunctions #define HDR_layLayoutViewFunctions -#include "laybasicCommon.h" +#include "layuiCommon.h" #include "layPlugin.h" #include "layDialogs.h" // For AlignCellOptions @@ -35,19 +35,19 @@ namespace lay { -class LayoutView; +class LayoutViewBase; /** * @brief The layout view's functions implementation */ -class LAYBASIC_PUBLIC LayoutViewFunctions +class LAYUI_PUBLIC LayoutViewFunctions : public lay::Plugin { public: /** * @brief Constructor */ - LayoutViewFunctions (db::Manager *manager, lay::LayoutView *view); + LayoutViewFunctions (db::Manager *manager, lay::LayoutViewBase *view); /** * @brief Destructor @@ -133,7 +133,7 @@ public: void cm_cell_convert_to_static (); protected: - lay::LayoutView *view () + lay::LayoutViewBase *view () { return mp_view; } @@ -152,7 +152,7 @@ protected: void transform_layout (const db::DCplxTrans &tr); private: - lay::LayoutView *mp_view; + lay::LayoutViewBase *mp_view; db::Manager *mp_manager; db::LayerProperties m_new_layer_props; db::DVector m_move_dist; diff --git a/src/laybasic/laybasic/layLibrariesView.cc b/src/layui/layui/layLibrariesView.cc similarity index 99% rename from src/laybasic/laybasic/layLibrariesView.cc rename to src/layui/layui/layLibrariesView.cc index 2aac160a3..203213bf9 100644 --- a/src/laybasic/laybasic/layLibrariesView.cc +++ b/src/layui/layui/layLibrariesView.cc @@ -48,7 +48,7 @@ #include "layBusy.h" #include "layLibrariesView.h" #include "layCellTreeModel.h" -#include "layLayoutView.h" +#include "layLayoutViewBase.h" #include "layAbstractMenu.h" #include "layDialogs.h" #include "tlExceptions.h" @@ -199,7 +199,7 @@ LibraryTreeWidget::mouseReleaseEvent (QMouseEvent *event) const int max_cellviews_in_split_mode = 5; -LibrariesView::LibrariesView (lay::LayoutView *view, QWidget *parent, const char *name) +LibrariesView::LibrariesView (lay::LayoutViewBase *view, QWidget *parent, const char *name) : QFrame (parent), m_enable_cb (true), mp_view (view), diff --git a/src/laybasic/laybasic/layLibrariesView.h b/src/layui/layui/layLibrariesView.h similarity index 97% rename from src/laybasic/laybasic/layLibrariesView.h rename to src/layui/layui/layLibrariesView.h index 537556044..4017e611d 100644 --- a/src/laybasic/laybasic/layLibrariesView.h +++ b/src/layui/layui/layLibrariesView.h @@ -35,7 +35,7 @@ #include "dbLayout.h" #include "layCanvasPlane.h" #include "layViewOp.h" -#include "layLayoutView.h" +#include "layLayoutViewBase.h" #include "layCellTreeModel.h" #include "layWidgets.h" #include "tlDeferredExecution.h" @@ -108,7 +108,7 @@ public: * @param parent The Qt parent widget * @param name The layer control panel's widget name */ - LibrariesView (lay::LayoutView *view, QWidget *parent = 0, const char *name = "libraries_view"); + LibrariesView (LayoutViewBase *view, QWidget *parent = 0, const char *name = "libraries_view"); /** * @brief Destructor @@ -207,7 +207,7 @@ public: /** * @brief Gets the layout view this panel is attached to */ - lay::LayoutView *view () + lay::LayoutViewBase *view () { return mp_view; } @@ -231,7 +231,7 @@ public slots: private: db::Layout *mp_layout; bool m_enable_cb; - lay::LayoutView *mp_view; + lay::LayoutViewBase *mp_view; std::vector mp_cell_lists; std::vector mp_cell_list_headers; std::vector mp_cell_list_frames; diff --git a/src/laybasic/laybasic/layLoadLayoutOptionsDialog.cc b/src/layui/layui/layLoadLayoutOptionsDialog.cc similarity index 99% rename from src/laybasic/laybasic/layLoadLayoutOptionsDialog.cc rename to src/layui/layui/layLoadLayoutOptionsDialog.cc index 08dbf35b0..b36ba0ac1 100644 --- a/src/laybasic/laybasic/layLoadLayoutOptionsDialog.cc +++ b/src/layui/layui/layLoadLayoutOptionsDialog.cc @@ -22,7 +22,7 @@ #if defined(HAVE_QT) -#include "layLayoutView.h" +#include "layLayoutViewBase.h" #include "layLoadLayoutOptionsDialog.h" #include "layStream.h" #include "layFileDialog.h" diff --git a/src/laybasic/laybasic/layLoadLayoutOptionsDialog.h b/src/layui/layui/layLoadLayoutOptionsDialog.h similarity index 95% rename from src/laybasic/laybasic/layLoadLayoutOptionsDialog.h rename to src/layui/layui/layLoadLayoutOptionsDialog.h index 2ac954128..f276b783b 100644 --- a/src/laybasic/laybasic/layLoadLayoutOptionsDialog.h +++ b/src/layui/layui/layLoadLayoutOptionsDialog.h @@ -25,6 +25,7 @@ #ifndef HDR_layLoadLayoutOptionsDialog #define HDR_layLoadLayoutOptionsDialog +#include "layuiCommon.h" #include "dbStream.h" #include "dbLayout.h" #include "layStream.h" @@ -51,11 +52,10 @@ namespace Ui namespace lay { -class LayoutView; class Dispatcher; class FileDialog; -class LAYBASIC_PUBLIC LoadLayoutOptionsDialog +class LAYUI_PUBLIC LoadLayoutOptionsDialog : public QDialog { Q_OBJECT @@ -96,7 +96,7 @@ private: bool get_options_internal (); }; -class LAYBASIC_PUBLIC SpecificLoadLayoutOptionsDialog +class LAYUI_PUBLIC SpecificLoadLayoutOptionsDialog : public QDialog { public: diff --git a/src/laybasic/laybasic/layNetExportDialog.cc b/src/layui/layui/layNetExportDialog.cc similarity index 100% rename from src/laybasic/laybasic/layNetExportDialog.cc rename to src/layui/layui/layNetExportDialog.cc diff --git a/src/laybasic/laybasic/layNetExportDialog.h b/src/layui/layui/layNetExportDialog.h similarity index 100% rename from src/laybasic/laybasic/layNetExportDialog.h rename to src/layui/layui/layNetExportDialog.h diff --git a/src/laybasic/laybasic/layNetInfoDialog.cc b/src/layui/layui/layNetInfoDialog.cc similarity index 100% rename from src/laybasic/laybasic/layNetInfoDialog.cc rename to src/layui/layui/layNetInfoDialog.cc diff --git a/src/laybasic/laybasic/layNetInfoDialog.h b/src/layui/layui/layNetInfoDialog.h similarity index 100% rename from src/laybasic/laybasic/layNetInfoDialog.h rename to src/layui/layui/layNetInfoDialog.h diff --git a/src/laybasic/laybasic/layNetlistBrowser.cc b/src/layui/layui/layNetlistBrowser.cc similarity index 81% rename from src/laybasic/laybasic/layNetlistBrowser.cc rename to src/layui/layui/layNetlistBrowser.cc index 33d312f3f..4069e9166 100644 --- a/src/laybasic/laybasic/layNetlistBrowser.cc +++ b/src/layui/layui/layNetlistBrowser.cc @@ -22,11 +22,14 @@ #if defined(HAVE_QT) -#include "laybasicCommon.h" +#include "layuiCommon.h" #include "layNetlistBrowserDialog.h" #include "layConverters.h" #include "layDispatcher.h" +#include "ui_NetlistBrowserConfigPage.h" +#include "ui_NetlistBrowserConfigPage2.h" + #include #include @@ -100,9 +103,10 @@ NetlistBrowserWindowModeConverter::to_string (lay::NetlistBrowserConfig::net_win NetlistBrowserConfigPage::NetlistBrowserConfigPage (QWidget *parent) : lay::ConfigPage (parent) { - Ui::NetlistBrowserConfigPage::setupUi (this); + mp_ui = new Ui::NetlistBrowserConfigPage (); + mp_ui->setupUi (this); - connect (cbx_window, SIGNAL (currentIndexChanged (int)), this, SLOT (window_changed (int))); + connect (mp_ui->cbx_window, SIGNAL (currentIndexChanged (int)), this, SLOT (window_changed (int))); } void @@ -111,17 +115,17 @@ NetlistBrowserConfigPage::setup (lay::Dispatcher *root) // window mode lay::NetlistBrowserConfig::net_window_type wmode = lay::NetlistBrowserConfig::FitNet; root->config_get (cfg_l2ndb_window_mode, wmode, NetlistBrowserWindowModeConverter ()); - cbx_window->setCurrentIndex (int (wmode)); + mp_ui->cbx_window->setCurrentIndex (int (wmode)); // window dimension double wdim = 1.0; root->config_get (cfg_l2ndb_window_dim, wdim); - le_window->setText (tl::to_qstring (tl::to_string (wdim))); + mp_ui->le_window->setText (tl::to_qstring (tl::to_string (wdim))); // max. shapes highlighted unsigned int max_marker_count = 10000; root->config_get (cfg_l2ndb_max_shapes_highlighted, max_marker_count); - le_max_markers->setText (tl::to_qstring (tl::to_string (max_marker_count))); + mp_ui->le_max_markers->setText (tl::to_qstring (tl::to_string (max_marker_count))); // enable controls window_changed (int (wmode)); @@ -130,19 +134,19 @@ NetlistBrowserConfigPage::setup (lay::Dispatcher *root) void NetlistBrowserConfigPage::window_changed (int m) { - le_window->setEnabled (m == int (lay::NetlistBrowserConfig::FitNet) || m == int (lay::NetlistBrowserConfig::CenterSize)); + mp_ui->le_window->setEnabled (m == int (lay::NetlistBrowserConfig::FitNet) || m == int (lay::NetlistBrowserConfig::CenterSize)); } void NetlistBrowserConfigPage::commit (lay::Dispatcher *root) { double dim = 1.0; - tl::from_string_ext (tl::to_string (le_window->text ()), dim); + tl::from_string_ext (tl::to_string (mp_ui->le_window->text ()), dim); unsigned int max_shapes_highlighted = 10000; - tl::from_string_ext (tl::to_string (le_max_markers->text ()), max_shapes_highlighted); + tl::from_string_ext (tl::to_string (mp_ui->le_max_markers->text ()), max_shapes_highlighted); - root->config_set (cfg_l2ndb_window_mode, lay::NetlistBrowserConfig::net_window_type (cbx_window->currentIndex ()), NetlistBrowserWindowModeConverter ()); + root->config_set (cfg_l2ndb_window_mode, lay::NetlistBrowserConfig::net_window_type (mp_ui->cbx_window->currentIndex ()), NetlistBrowserWindowModeConverter ()); root->config_set (cfg_l2ndb_window_dim, dim); root->config_set (cfg_l2ndb_max_shapes_highlighted, max_shapes_highlighted); } @@ -163,10 +167,11 @@ static QToolButton * (Ui::NetlistBrowserConfigPage2::*cc_buttons []) = { NetlistBrowserConfigPage2::NetlistBrowserConfigPage2 (QWidget *parent) : lay::ConfigPage (parent) { - Ui::NetlistBrowserConfigPage2::setupUi (this); + mp_ui = new Ui::NetlistBrowserConfigPage2 (); + mp_ui->setupUi (this); for (unsigned int i = 0; i < sizeof (cc_buttons) / sizeof (cc_buttons [0]); ++i) { - connect (this->*(cc_buttons [i]), SIGNAL (clicked ()), this, SLOT (color_button_clicked ())); + connect (mp_ui->*(cc_buttons [i]), SIGNAL (clicked ()), this, SLOT (color_button_clicked ())); } } @@ -175,7 +180,7 @@ NetlistBrowserConfigPage2::color_button_clicked () { for (unsigned int i = 0; i < sizeof (cc_buttons) / sizeof (cc_buttons [0]); ++i) { - if (sender () == this->*(cc_buttons [i])) { + if (sender () == mp_ui->*(cc_buttons [i])) { QColor c; if (m_palette.colors () > i) { @@ -200,7 +205,7 @@ NetlistBrowserConfigPage2::setup (lay::Dispatcher *root) { bool cycle_enabled = false; root->config_get (cfg_l2ndb_marker_cycle_colors_enabled, cycle_enabled); - cycle_colors_cb->setChecked (cycle_enabled); + mp_ui->cycle_colors_cb->setChecked (cycle_enabled); std::string cc; root->config_get (cfg_l2ndb_marker_cycle_colors, cc); @@ -218,47 +223,47 @@ NetlistBrowserConfigPage2::setup (lay::Dispatcher *root) // marker color QColor color; root->config_get (cfg_l2ndb_marker_color, color, lay::ColorConverter ()); - color_pb->set_color (color); + mp_ui->color_pb->set_color (color); // use original color bool original_colors = false; root->config_get (cfg_l2ndb_marker_use_original_colors, original_colors); - brightness_cb->setChecked (original_colors); - brightness_sb->setEnabled (original_colors); - brightness_label->setEnabled (original_colors); + mp_ui->brightness_cb->setChecked (original_colors); + mp_ui->brightness_sb->setEnabled (original_colors); + mp_ui->brightness_label->setEnabled (original_colors); // brightness offset int brightness = 0; root->config_get (cfg_l2ndb_marker_intensity, brightness); - brightness_sb->setValue (brightness); + mp_ui->brightness_sb->setValue (brightness); // marker line width int lw = 0; root->config_get (cfg_l2ndb_marker_line_width, lw); if (lw < 0) { - lw_le->setText (QString ()); + mp_ui->lw_le->setText (QString ()); } else { - lw_le->setText (tl::to_qstring (tl::to_string (lw))); + mp_ui->lw_le->setText (tl::to_qstring (tl::to_string (lw))); } // marker vertex size int vs = 0; root->config_get (cfg_l2ndb_marker_vertex_size, vs); if (vs < 0) { - vs_le->setText (QString ()); + mp_ui->vs_le->setText (QString ()); } else { - vs_le->setText (tl::to_qstring (tl::to_string (vs))); + mp_ui->vs_le->setText (tl::to_qstring (tl::to_string (vs))); } // stipple pattern int dp = 0; root->config_get (cfg_l2ndb_marker_dither_pattern, dp); - stipple_pb->set_dither_pattern (dp); + mp_ui->stipple_pb->set_dither_pattern (dp); // halo int halo = 0; root->config_get (cfg_l2ndb_marker_halo, halo); - halo_cb->setCheckState (halo < 0 ? Qt::PartiallyChecked : (halo ? Qt::Checked : Qt::Unchecked)); + mp_ui->halo_cb->setCheckState (halo < 0 ? Qt::PartiallyChecked : (halo ? Qt::Checked : Qt::Unchecked)); } void @@ -281,8 +286,8 @@ NetlistBrowserConfigPage2::update_colors () QRect r (0, 0, pxmp.width () - 1, pxmp.height () - 1); pxpainter.drawRect (r); - (this->*(cc_buttons [i]))->setIconSize (pxmp.size ()); - (this->*(cc_buttons [i]))->setIcon (QIcon (pxmp)); + (mp_ui->*(cc_buttons [i]))->setIconSize (pxmp.size ()); + (mp_ui->*(cc_buttons [i]))->setIcon (QIcon (pxmp)); } } @@ -290,45 +295,45 @@ NetlistBrowserConfigPage2::update_colors () void NetlistBrowserConfigPage2::commit (lay::Dispatcher *root) { - root->config_set (cfg_l2ndb_marker_cycle_colors_enabled, cycle_colors_cb->isChecked ()); + root->config_set (cfg_l2ndb_marker_cycle_colors_enabled, mp_ui->cycle_colors_cb->isChecked ()); root->config_set (cfg_l2ndb_marker_cycle_colors, m_palette.to_string ()); - QColor color = color_pb->get_color (); + QColor color = mp_ui->color_pb->get_color (); root->config_set (cfg_l2ndb_marker_color, color, lay::ColorConverter ()); - if (lw_le->text ().isEmpty ()) { + if (mp_ui->lw_le->text ().isEmpty ()) { root->config_set (cfg_l2ndb_marker_line_width, -1); } else { try { int s; - tl::from_string_ext (tl::to_string (lw_le->text ()), s); + tl::from_string_ext (tl::to_string (mp_ui->lw_le->text ()), s); root->config_set (cfg_l2ndb_marker_line_width, s); } catch (...) { } } - if (vs_le->text ().isEmpty ()) { + if (mp_ui->vs_le->text ().isEmpty ()) { root->config_set (cfg_l2ndb_marker_vertex_size, -1); } else { try { int s; - tl::from_string_ext (tl::to_string (vs_le->text ()), s); + tl::from_string_ext (tl::to_string (mp_ui->vs_le->text ()), s); root->config_set (cfg_l2ndb_marker_vertex_size, s); } catch (...) { } } - root->config_set (cfg_l2ndb_marker_dither_pattern, stipple_pb->dither_pattern ()); + root->config_set (cfg_l2ndb_marker_dither_pattern, mp_ui->stipple_pb->dither_pattern ()); - if (halo_cb->checkState () == Qt::PartiallyChecked) { + if (mp_ui->halo_cb->checkState () == Qt::PartiallyChecked) { root->config_set (cfg_l2ndb_marker_halo, -1); - } else if (halo_cb->checkState () == Qt::Unchecked) { + } else if (mp_ui->halo_cb->checkState () == Qt::Unchecked) { root->config_set (cfg_l2ndb_marker_halo, 0); - } else if (halo_cb->checkState () == Qt::Checked) { + } else if (mp_ui->halo_cb->checkState () == Qt::Checked) { root->config_set (cfg_l2ndb_marker_halo, 1); } - root->config_set (cfg_l2ndb_marker_intensity, brightness_sb->value ()); + root->config_set (cfg_l2ndb_marker_intensity, mp_ui->brightness_sb->value ()); - root->config_set (cfg_l2ndb_marker_use_original_colors, brightness_cb->isChecked ()); + root->config_set (cfg_l2ndb_marker_use_original_colors, mp_ui->brightness_cb->isChecked ()); } // ------------------------------------------------------------ @@ -377,7 +382,7 @@ public: menu_entries.push_back (lay::menu_item ("netlist_browser::show", "browse_netlists", "tools_menu.end", tl::to_string (QObject::tr ("Netlist Browser")))); } - virtual lay::Plugin *create_plugin (db::Manager *, lay::Dispatcher *root, lay::LayoutView *view) const + virtual lay::Plugin *create_plugin (db::Manager *, lay::Dispatcher *root, lay::LayoutViewBase *view) const { return new lay::NetlistBrowserDialog (root, view); } diff --git a/src/laybasic/laybasic/layNetlistBrowser.h b/src/layui/layui/layNetlistBrowser.h similarity index 89% rename from src/laybasic/laybasic/layNetlistBrowser.h rename to src/layui/layui/layNetlistBrowser.h index 8e848d669..1bea24283 100644 --- a/src/laybasic/laybasic/layNetlistBrowser.h +++ b/src/layui/layui/layNetlistBrowser.h @@ -28,13 +28,17 @@ #include "layPlugin.h" #include "layPluginConfigPage.h" #include "layColorPalette.h" -#include "ui_NetlistBrowserConfigPage.h" -#include "ui_NetlistBrowserConfigPage2.h" #include "dbTrans.h" #include +namespace Ui +{ + class NetlistBrowserConfigPage; + class NetlistBrowserConfigPage2; +} + namespace lay { @@ -44,8 +48,7 @@ struct NetlistBrowserConfig }; class NetlistBrowserConfigPage - : public lay::ConfigPage, - private Ui::NetlistBrowserConfigPage + : public lay::ConfigPage { Q_OBJECT @@ -57,11 +60,13 @@ public: public slots: void window_changed (int); + +private: + Ui::NetlistBrowserConfigPage *mp_ui; }; class NetlistBrowserConfigPage2 - : public lay::ConfigPage, - private Ui::NetlistBrowserConfigPage2 + : public lay::ConfigPage { Q_OBJECT @@ -77,6 +82,7 @@ public slots: private: void update_colors (); + Ui::NetlistBrowserConfigPage2 *mp_ui; lay::ColorPalette m_palette; }; diff --git a/src/laybasic/laybasic/layNetlistBrowserDialog.cc b/src/layui/layui/layNetlistBrowserDialog.cc similarity index 82% rename from src/laybasic/laybasic/layNetlistBrowserDialog.cc rename to src/layui/layui/layNetlistBrowserDialog.cc index 7247effd1..8c54ccb54 100644 --- a/src/laybasic/laybasic/layNetlistBrowserDialog.cc +++ b/src/layui/layui/layNetlistBrowserDialog.cc @@ -25,7 +25,7 @@ #include "layNetlistBrowserDialog.h" #include "tlProgress.h" #include "tlExceptions.h" -#include "layLayoutView.h" +#include "layLayoutViewBase.h" #include "layFinder.h" #include "layFileDialog.h" #include "layConverters.h" @@ -34,6 +34,8 @@ #include "dbLayoutToNetlist.h" #include "dbRecursiveShapeIterator.h" +#include "ui_NetlistBrowserDialog.h" + #include #include @@ -57,10 +59,9 @@ extern const std::string cfg_l2ndb_max_shapes_highlighted; extern const std::string cfg_l2ndb_show_all; extern const std::string cfg_l2ndb_window_state; -NetlistBrowserDialog::NetlistBrowserDialog (lay::Dispatcher *root, lay::LayoutView *vw) +NetlistBrowserDialog::NetlistBrowserDialog (lay::Dispatcher *root, LayoutViewBase *vw) : lay::Browser (root, vw), lay::ViewService (vw->view_object_widget ()), - Ui::NetlistBrowserDialog (), m_window (lay::NetlistBrowserConfig::FitNet), m_window_dim (0.0), m_max_shape_count (0), @@ -75,9 +76,10 @@ NetlistBrowserDialog::NetlistBrowserDialog (lay::Dispatcher *root, lay::LayoutVi m_l2n_index (-1), m_mouse_state (0) { - Ui::NetlistBrowserDialog::setupUi (this); + mp_ui = new Ui::NetlistBrowserDialog (); + mp_ui->setupUi (this); - browser_page->set_dispatcher (root); + mp_ui->browser_page->set_dispatcher (root); if (view ()) { view ()->cellviews_changed_event.add (this, &NetlistBrowserDialog::cellviews_changed); @@ -85,12 +87,12 @@ NetlistBrowserDialog::NetlistBrowserDialog (lay::Dispatcher *root, lay::LayoutVi view ()->l2ndb_list_changed_event.add (this, &NetlistBrowserDialog::l2ndbs_changed); } - m_open_action = new QAction (QObject::tr ("Open"), file_menu); - m_saveas_action = new QAction (QObject::tr ("Save As"), file_menu); - m_export_action = new QAction (QObject::tr ("Export To Layout"), file_menu); - m_reload_action = new QAction (QObject::tr ("Reload"), file_menu); - m_unload_action = new QAction (QObject::tr ("Unload"), file_menu); - m_unload_all_action = new QAction (QObject::tr ("Unload All"), file_menu); + m_open_action = new QAction (QObject::tr ("Open"), mp_ui->file_menu); + m_saveas_action = new QAction (QObject::tr ("Save As"), mp_ui->file_menu); + m_export_action = new QAction (QObject::tr ("Export To Layout"), mp_ui->file_menu); + m_reload_action = new QAction (QObject::tr ("Reload"), mp_ui->file_menu); + m_unload_action = new QAction (QObject::tr ("Unload"), mp_ui->file_menu); + m_unload_all_action = new QAction (QObject::tr ("Unload All"), mp_ui->file_menu); connect (m_open_action, SIGNAL (triggered ()), this, SLOT (open_clicked ())); connect (m_saveas_action, SIGNAL (triggered ()), this, SLOT (saveas_clicked ())); @@ -99,30 +101,30 @@ NetlistBrowserDialog::NetlistBrowserDialog (lay::Dispatcher *root, lay::LayoutVi connect (m_unload_action, SIGNAL (triggered ()), this, SLOT (unload_clicked ())); connect (m_unload_all_action, SIGNAL (triggered ()), this, SLOT (unload_all_clicked ())); - file_menu->addAction (m_open_action); - file_menu->addAction (m_saveas_action); - QAction *sep0 = new QAction (file_menu); + mp_ui->file_menu->addAction (m_open_action); + mp_ui->file_menu->addAction (m_saveas_action); + QAction *sep0 = new QAction (mp_ui->file_menu); sep0->setSeparator (true); - file_menu->addAction (m_export_action); - QAction *sep1 = new QAction (file_menu); + mp_ui->file_menu->addAction (m_export_action); + QAction *sep1 = new QAction (mp_ui->file_menu); sep1->setSeparator (true); - file_menu->addAction (sep1); - file_menu->addAction (m_reload_action); - QAction *sep2 = new QAction (file_menu); + mp_ui->file_menu->addAction (sep1); + mp_ui->file_menu->addAction (m_reload_action); + QAction *sep2 = new QAction (mp_ui->file_menu); sep2->setSeparator (true); - file_menu->addAction (sep2); - file_menu->addAction (m_unload_action); - file_menu->addAction (m_unload_all_action); + mp_ui->file_menu->addAction (sep2); + mp_ui->file_menu->addAction (m_unload_action); + mp_ui->file_menu->addAction (m_unload_all_action); - connect (layout_cb, SIGNAL (activated (int)), this, SLOT (cv_index_changed (int))); - connect (l2ndb_cb, SIGNAL (activated (int)), this, SLOT (l2ndb_index_changed (int))); - connect (configure_pb, SIGNAL (clicked ()), this, SLOT (configure_clicked ())); - connect (probe_pb, SIGNAL (clicked ()), this, SLOT (probe_button_pressed ())); - connect (sticky_cbx, SIGNAL (clicked ()), this, SLOT (sticky_mode_clicked ())); + connect (mp_ui->layout_cb, SIGNAL (activated (int)), this, SLOT (cv_index_changed (int))); + connect (mp_ui->l2ndb_cb, SIGNAL (activated (int)), this, SLOT (l2ndb_index_changed (int))); + connect (mp_ui->configure_pb, SIGNAL (clicked ()), this, SLOT (configure_clicked ())); + connect (mp_ui->probe_pb, SIGNAL (clicked ()), this, SLOT (probe_button_pressed ())); + connect (mp_ui->sticky_cbx, SIGNAL (clicked ()), this, SLOT (sticky_mode_clicked ())); cellviews_changed (); - browser_page->selection_changed_event.add (this, &NetlistBrowserDialog::selection_changed); + mp_ui->browser_page->selection_changed_event.add (this, &NetlistBrowserDialog::selection_changed); } NetlistBrowserDialog::~NetlistBrowserDialog () @@ -133,14 +135,14 @@ NetlistBrowserDialog::~NetlistBrowserDialog () db::LayoutToNetlist * NetlistBrowserDialog::db () { - return browser_page->db (); + return mp_ui->browser_page->db (); } const lay::NetlistObjectsPath & NetlistBrowserDialog::current_path () const { - if (browser_page) { - return browser_page->current_path (); + if (mp_ui->browser_page) { + return mp_ui->browser_page->current_path (); } else { static lay::NetlistObjectsPath empty; return empty; @@ -150,8 +152,8 @@ NetlistBrowserDialog::current_path () const const std::vector & NetlistBrowserDialog::selected_paths () const { - if (browser_page) { - return browser_page->selected_paths (); + if (mp_ui->browser_page) { + return mp_ui->browser_page->selected_paths (); } else { static std::vector empty; return empty; @@ -181,7 +183,7 @@ void NetlistBrowserDialog::sticky_mode_clicked () { BEGIN_PROTECTED - if (! sticky_cbx->isChecked ()) { + if (! mp_ui->sticky_cbx->isChecked ()) { release_mouse (); } else { probe_button_pressed (); @@ -206,7 +208,7 @@ NetlistBrowserDialog::mouse_click_event (const db::DPoint &p, unsigned int butto bool trace_path = (m_mouse_state == 3); - if (trace_path || ! sticky_cbx->isChecked ()) { + if (trace_path || ! mp_ui->sticky_cbx->isChecked ()) { release_mouse (); } @@ -333,12 +335,12 @@ NetlistBrowserDialog::probe_net (const db::DPoint &p, bool trace_path) path.path = lay::NetlistObjectPath::path_type (sc_path.begin (), sc_path.end ()); } - browser_page->select_path (path); + mp_ui->browser_page->select_path (path); // emits the probe event // NOTE: browser_page->current_path () will hold the paired path with the schematic side being // expanded. - probe_event (browser_page->current_path ().first (), browser_page->current_path ().second ()); + probe_event (mp_ui->browser_page->current_path ().first (), mp_ui->browser_page->current_path ().second ()); } void @@ -410,7 +412,7 @@ void NetlistBrowserDialog::export_clicked () { if (m_l2n_index < int (view ()->num_l2ndbs ()) && m_l2n_index >= 0) { - browser_page->export_all (); + mp_ui->browser_page->export_all (); } } @@ -424,7 +426,7 @@ BEGIN_PROTECTED db::LayoutToNetlist *l2ndb = view ()->get_l2ndb (m_l2n_index); db::LayoutVsSchematic *lvsdb = dynamic_cast (l2ndb); - if (lvsdb && ! browser_page->is_netlist_mode ()) { + if (lvsdb && ! mp_ui->browser_page->is_netlist_mode ()) { // prepare and open the file dialog lay::FileDialog save_dialog (this, tl::to_string (QObject::tr ("Save LVS Database")), "KLayout LVS DB files (*.lvsdb)"); @@ -472,10 +474,10 @@ BEGIN_PROTECTED tl::log << tl::to_string (QObject::tr ("Loading file: ")) << l2ndb->filename (); tl::SelfTimer timer (tl::verbosity () >= 11, tl::to_string (QObject::tr ("Loading"))); - browser_page->set_db (0); + mp_ui->browser_page->set_db (0); try { l2ndb->load (l2ndb->filename ()); - browser_page->set_db (l2ndb); + mp_ui->browser_page->set_db (l2ndb); current_db_changed_event (); } catch (...) { current_db_changed_event (); @@ -513,7 +515,7 @@ BEGIN_PROTECTED tl::SelfTimer timer (tl::verbosity () >= 11, tl::to_string (QObject::tr ("Loading"))); int l2n_index = view ()->add_l2ndb (db::LayoutToNetlist::create_from_file (m_open_filename)); - l2ndb_cb->setCurrentIndex (l2n_index); + mp_ui->l2ndb_cb->setCurrentIndex (l2n_index); // it looks like the setCurrentIndex does not issue this signal: l2ndb_index_changed (l2n_index); @@ -527,7 +529,7 @@ NetlistBrowserDialog::configure (const std::string &name, const std::string &val { bool need_update = false; bool taken = true; - bool show_all = browser_page->show_all (); + bool show_all = mp_ui->browser_page->show_all (); if (name == cfg_l2ndb_show_all) { @@ -624,12 +626,12 @@ NetlistBrowserDialog::configure (const std::string &name, const std::string &val } if (active () && need_update) { - browser_page->set_max_shape_count (m_max_shape_count); - browser_page->set_window (m_window, m_window_dim); - browser_page->set_highlight_style (m_marker_color, m_marker_line_width, m_marker_vertex_size, m_marker_halo, m_marker_dither_pattern, m_marker_intensity, m_use_original_colors, m_auto_color_enabled ? &m_auto_colors : 0); + mp_ui->browser_page->set_max_shape_count (m_max_shape_count); + mp_ui->browser_page->set_window (m_window, m_window_dim); + mp_ui->browser_page->set_highlight_style (m_marker_color, m_marker_line_width, m_marker_vertex_size, m_marker_halo, m_marker_dither_pattern, m_marker_intensity, m_use_original_colors, m_auto_color_enabled ? &m_auto_colors : 0); } - browser_page->show_all (show_all); + mp_ui->browser_page->show_all (show_all); return taken; } @@ -662,11 +664,11 @@ NetlistBrowserDialog::l2ndbs_changed () { int l2n_index = -1; - l2ndb_cb->clear (); + mp_ui->l2ndb_cb->clear (); for (unsigned int i = 0; i < view ()->num_l2ndbs (); ++i) { const db::LayoutToNetlist *l2ndb = view ()->get_l2ndb (i); - l2ndb_cb->addItem (tl::to_qstring (l2ndb->name ())); + mp_ui->l2ndb_cb->addItem (tl::to_qstring (l2ndb->name ())); if (l2ndb->name () == m_l2ndb_name) { l2n_index = i; } @@ -674,7 +676,7 @@ NetlistBrowserDialog::l2ndbs_changed () // force an update m_l2n_index = l2n_index; - l2ndb_cb->setCurrentIndex (l2n_index); + mp_ui->l2ndb_cb->setCurrentIndex (l2n_index); if (active ()) { update_content (); } @@ -683,7 +685,7 @@ NetlistBrowserDialog::l2ndbs_changed () void NetlistBrowserDialog::cellview_changed (int) { - browser_page->update_highlights (); + mp_ui->browser_page->update_highlights (); } void @@ -691,17 +693,17 @@ NetlistBrowserDialog::cellviews_changed () { int cv_index = -1; - layout_cb->clear (); + mp_ui->layout_cb->clear (); for (unsigned int i = 0; i < view ()->cellviews (); ++i) { const lay::CellView &cv = view ()->cellview (i); - layout_cb->addItem (tl::to_qstring (cv->name ())); + mp_ui->layout_cb->addItem (tl::to_qstring (cv->name ())); if (cv.is_valid () && cv->name () == m_layout_name) { cv_index = i; } } - layout_cb->setCurrentIndex (cv_index); + mp_ui->layout_cb->setCurrentIndex (cv_index); cv_index_changed (cv_index); } @@ -757,11 +759,11 @@ NetlistBrowserDialog::update_content () db::LayoutToNetlist *l2ndb = view ()->get_l2ndb (m_l2n_index); - probe_pb->setEnabled (l2ndb != 0); + mp_ui->probe_pb->setEnabled (l2ndb != 0); release_mouse (); if (! l2ndb) { - central_stack->setCurrentIndex (1); + mp_ui->central_stack->setCurrentIndex (1); } bool db_changed = false; @@ -772,18 +774,18 @@ NetlistBrowserDialog::update_content () m_unload_all_action->setEnabled (l2ndb != 0); m_reload_action->setEnabled (l2ndb != 0); - browser_page->enable_updates (false); // Avoid building the internal lists several times ... - db_changed = browser_page->set_db (l2ndb); - browser_page->set_max_shape_count (m_max_shape_count); - browser_page->set_highlight_style (m_marker_color, m_marker_line_width, m_marker_vertex_size, m_marker_halo, m_marker_dither_pattern, m_marker_intensity, m_use_original_colors, m_auto_color_enabled ? &m_auto_colors : 0); - browser_page->set_window (m_window, m_window_dim); - browser_page->set_view (view (), m_cv_index); - browser_page->enable_updates (true); + mp_ui->browser_page->enable_updates (false); // Avoid building the internal lists several times ... + db_changed = mp_ui->browser_page->set_db (l2ndb); + mp_ui->browser_page->set_max_shape_count (m_max_shape_count); + mp_ui->browser_page->set_highlight_style (m_marker_color, m_marker_line_width, m_marker_vertex_size, m_marker_halo, m_marker_dither_pattern, m_marker_intensity, m_use_original_colors, m_auto_color_enabled ? &m_auto_colors : 0); + mp_ui->browser_page->set_window (m_window, m_window_dim); + mp_ui->browser_page->set_view (view (), m_cv_index); + mp_ui->browser_page->enable_updates (true); if (l2ndb) { // Note: it appears to be required to show the browser page after it has been configured. // Otherwise the header gets messed up and the configuration is reset. - central_stack->setCurrentIndex (0); + mp_ui->central_stack->setCurrentIndex (0); } lay::CellView cv = view ()->cellview (m_cv_index); @@ -792,12 +794,12 @@ NetlistBrowserDialog::update_content () m_layout_name = cv->name (); } - if (layout_cb->currentIndex () != m_cv_index) { - layout_cb->setCurrentIndex (m_cv_index); + if (mp_ui->layout_cb->currentIndex () != m_cv_index) { + mp_ui->layout_cb->setCurrentIndex (m_cv_index); } - if (l2ndb_cb->currentIndex () != m_l2n_index) { - l2ndb_cb->setCurrentIndex (m_l2n_index); + if (mp_ui->l2ndb_cb->currentIndex () != m_l2n_index) { + mp_ui->l2ndb_cb->setCurrentIndex (m_l2n_index); } if (db_changed) { @@ -815,11 +817,11 @@ NetlistBrowserDialog::deactivated () } bool db_changed = false; - if (browser_page->db () != 0) { + if (mp_ui->browser_page->db () != 0) { db_changed = true; - browser_page->set_db (0); + mp_ui->browser_page->set_db (0); } - browser_page->set_view (0, 0); + mp_ui->browser_page->set_view (0, 0); if (db_changed) { current_db_changed_event (); diff --git a/src/laybasic/laybasic/layNetlistBrowserDialog.h b/src/layui/layui/layNetlistBrowserDialog.h similarity index 93% rename from src/laybasic/laybasic/layNetlistBrowserDialog.h rename to src/layui/layui/layNetlistBrowserDialog.h index e63d91957..d7cf015fb 100644 --- a/src/laybasic/laybasic/layNetlistBrowserDialog.h +++ b/src/layui/layui/layNetlistBrowserDialog.h @@ -25,25 +25,36 @@ #ifndef HDR_layNetlistBrowserDialog #define HDR_layNetlistBrowserDialog -#include "ui_NetlistBrowserDialog.h" #include "layBrowser.h" #include "layNetlistBrowser.h" #include "layViewObject.h" #include "layColorPalette.h" #include "tlEvents.h" +namespace Ui +{ + class NetlistBrowserDialog; +} + +namespace db +{ + class LayoutToNetlist; +} + namespace lay { +class NetlistObjectPath; +class NetlistObjectsPath; + class NetlistBrowserDialog : public lay::Browser, - public lay::ViewService, - private Ui::NetlistBrowserDialog + public lay::ViewService { Q_OBJECT public: - NetlistBrowserDialog (lay::Dispatcher *root, lay::LayoutView *view); + NetlistBrowserDialog (lay::Dispatcher *root, lay::LayoutViewBase *view); ~NetlistBrowserDialog (); void load (int lay_index, int cv_index); @@ -117,6 +128,7 @@ public slots: void sticky_mode_clicked (); private: + Ui::NetlistBrowserDialog *mp_ui; lay::NetlistBrowserConfig::net_window_type m_window; double m_window_dim; unsigned int m_max_shape_count; diff --git a/src/laybasic/laybasic/layNetlistBrowserModel.cc b/src/layui/layui/layNetlistBrowserModel.cc similarity index 100% rename from src/laybasic/laybasic/layNetlistBrowserModel.cc rename to src/layui/layui/layNetlistBrowserModel.cc diff --git a/src/laybasic/laybasic/layNetlistBrowserModel.h b/src/layui/layui/layNetlistBrowserModel.h similarity index 98% rename from src/laybasic/laybasic/layNetlistBrowserModel.h rename to src/layui/layui/layNetlistBrowserModel.h index 8a86696ba..0a634aebd 100644 --- a/src/laybasic/laybasic/layNetlistBrowserModel.h +++ b/src/layui/layui/layNetlistBrowserModel.h @@ -27,7 +27,7 @@ #include "layColorPalette.h" #include "layColor.h" -#include "laybasicCommon.h" +#include "layuiCommon.h" #include "dbLayoutToNetlist.h" #include "dbLayoutVsSchematic.h" @@ -135,8 +135,9 @@ private: * This object applies to pairs of these objects. A class providing a path for a single * object is NetlistObjectPath */ -struct LAYBASIC_PUBLIC NetlistObjectPath +class LAYUI_PUBLIC NetlistObjectPath { +public: typedef std::list path_type; typedef path_type::const_iterator path_iterator; @@ -169,8 +170,9 @@ struct LAYBASIC_PUBLIC NetlistObjectPath * This object applies to pairs of these objects. A class providing a path for a single * object is NetlistObjectPath */ -struct LAYBASIC_PUBLIC NetlistObjectsPath +class LAYUI_PUBLIC NetlistObjectsPath { +public: typedef std::list > path_type; typedef path_type::const_iterator path_iterator; @@ -221,7 +223,7 @@ struct LAYBASIC_PUBLIC NetlistObjectsPath * - #pins+#nets+#subcircuits..: devices * - terminals and nets */ -class LAYBASIC_PUBLIC NetlistBrowserModel +class LAYUI_PUBLIC NetlistBrowserModel : public QAbstractItemModel, public tl::Object { Q_OBJECT diff --git a/src/laybasic/laybasic/layNetlistBrowserPage.cc b/src/layui/layui/layNetlistBrowserPage.cc similarity index 99% rename from src/laybasic/laybasic/layNetlistBrowserPage.cc rename to src/layui/layui/layNetlistBrowserPage.cc index 1085d4c1e..ebe686886 100644 --- a/src/laybasic/laybasic/layNetlistBrowserPage.cc +++ b/src/layui/layui/layNetlistBrowserPage.cc @@ -27,7 +27,7 @@ #include "layNetlistBrowserTreeModel.h" #include "layItemDelegates.h" #include "layCellView.h" -#include "layLayoutView.h" +#include "layLayoutViewBase.h" #include "layMarker.h" #include "layNetInfoDialog.h" #include "layNetExportDialog.h" @@ -243,7 +243,7 @@ NetlistBrowserPage::set_highlight_style (lay::Color color, int line_width, int v } void -NetlistBrowserPage::set_view (lay::LayoutView *view, int cv_index) +NetlistBrowserPage::set_view (lay::LayoutViewBase *view, int cv_index) { if (mp_view) { mp_view->layer_list_changed_event.remove (this, &NetlistBrowserPage::layer_list_changed); @@ -1425,7 +1425,7 @@ NetlistBrowserPage::export_nets (const std::vector *nets) if (dialog->exec_dialog (mp_plugin_root)) { // NOTE: mp_view and database might get reset to 0 in create_layout - lay::LayoutView *view = mp_view; + lay::LayoutViewBase *view = mp_view; db::LayoutToNetlist *database = mp_database.get (); unsigned int cv_index = view->create_layout (true); diff --git a/src/laybasic/laybasic/layNetlistBrowserPage.h b/src/layui/layui/layNetlistBrowserPage.h similarity index 98% rename from src/laybasic/laybasic/layNetlistBrowserPage.h rename to src/layui/layui/layNetlistBrowserPage.h index ac135245d..4fb4281ac 100644 --- a/src/laybasic/laybasic/layNetlistBrowserPage.h +++ b/src/layui/layui/layNetlistBrowserPage.h @@ -28,7 +28,7 @@ #include "ui_NetlistBrowserPage.h" #include "layNetlistBrowserModel.h" #include "layNetlistBrowser.h" -#include "laybasicCommon.h" +#include "layuiCommon.h" #include "dbLayoutToNetlist.h" #include "dbLayoutVsSchematic.h" #include "dbLayoutUtils.h" @@ -43,7 +43,7 @@ class QAction; namespace lay { -class LayoutView; +class LayoutViewBase; class Dispatcher; class Marker; class NetInfoDialog; @@ -87,7 +87,7 @@ public: * If that pointer is non-null, the browser will attach itself to * the view and provide highlights for the selected markers inside the given cellview. */ - void set_view (LayoutView *view, int cv_index); + void set_view (LayoutViewBase *view, int cv_index); /** * @brief Attaches the page to a L2N DB @@ -225,7 +225,7 @@ private: int m_marker_dither_pattern; int m_marker_intensity; bool m_use_original_colors; - lay::LayoutView *mp_view; + lay::LayoutViewBase *mp_view; unsigned int m_cv_index; lay::Dispatcher *mp_plugin_root; tl::weak_ptr mp_database; diff --git a/src/laybasic/laybasic/layNetlistBrowserTreeModel.cc b/src/layui/layui/layNetlistBrowserTreeModel.cc similarity index 100% rename from src/laybasic/laybasic/layNetlistBrowserTreeModel.cc rename to src/layui/layui/layNetlistBrowserTreeModel.cc diff --git a/src/laybasic/laybasic/layNetlistBrowserTreeModel.h b/src/layui/layui/layNetlistBrowserTreeModel.h similarity index 97% rename from src/laybasic/laybasic/layNetlistBrowserTreeModel.h rename to src/layui/layui/layNetlistBrowserTreeModel.h index 19fdf20b4..021694e8a 100644 --- a/src/laybasic/laybasic/layNetlistBrowserTreeModel.h +++ b/src/layui/layui/layNetlistBrowserTreeModel.h @@ -26,7 +26,7 @@ #define HDR_layNetlistBrowserTreeModel #include "layColorPalette.h" -#include "laybasicCommon.h" +#include "layuiCommon.h" #include "dbLayoutToNetlist.h" #include "dbLayoutVsSchematic.h" @@ -43,7 +43,7 @@ namespace lay { class IndexedNetlistModel; -struct NetlistObjectsPath; +class NetlistObjectsPath; // ---------------------------------------------------------------------------------- // NetlistBrowserTreeModel definition @@ -51,7 +51,7 @@ struct NetlistObjectsPath; /** * @brief The model for the circuit hierarchy tree */ -class LAYBASIC_PUBLIC NetlistBrowserTreeModel +class LAYUI_PUBLIC NetlistBrowserTreeModel : public QAbstractItemModel { Q_OBJECT diff --git a/src/laybasic/laybasic/layNetlistCrossReferenceModel.cc b/src/layui/layui/layNetlistCrossReferenceModel.cc similarity index 100% rename from src/laybasic/laybasic/layNetlistCrossReferenceModel.cc rename to src/layui/layui/layNetlistCrossReferenceModel.cc diff --git a/src/laybasic/laybasic/layNetlistCrossReferenceModel.h b/src/layui/layui/layNetlistCrossReferenceModel.h similarity index 98% rename from src/laybasic/laybasic/layNetlistCrossReferenceModel.h rename to src/layui/layui/layNetlistCrossReferenceModel.h index 01475b35b..9a721c56a 100644 --- a/src/laybasic/laybasic/layNetlistCrossReferenceModel.h +++ b/src/layui/layui/layNetlistCrossReferenceModel.h @@ -25,7 +25,7 @@ #ifndef HDR_layNetlistCrossReference #define HDR_layNetlistCrossReference -#include "laybasicCommon.h" +#include "layuiCommon.h" #include "layIndexedNetlistModel.h" #include "dbNetlistCrossReference.h" @@ -36,7 +36,7 @@ namespace lay /** * @brief An indexed netlist model for the netlist cross-reference */ -class LAYBASIC_PUBLIC NetlistCrossReferenceModel +class LAYUI_PUBLIC NetlistCrossReferenceModel : public lay::IndexedNetlistModel { public: diff --git a/src/laybasic/laybasic/layQtTools.cc b/src/layui/layui/layQtTools.cc similarity index 100% rename from src/laybasic/laybasic/layQtTools.cc rename to src/layui/layui/layQtTools.cc diff --git a/src/laybasic/laybasic/layQtTools.h b/src/layui/layui/layQtTools.h similarity index 76% rename from src/laybasic/laybasic/layQtTools.h rename to src/layui/layui/layQtTools.h index 7b49c8aff..f5c4ae97f 100644 --- a/src/laybasic/laybasic/layQtTools.h +++ b/src/layui/layui/layQtTools.h @@ -25,7 +25,7 @@ #ifndef HDR_layQtTools #define HDR_layQtTools -#include "laybasicCommon.h" +#include "layuiCommon.h" #include #include @@ -48,27 +48,27 @@ namespace lay * * The state can be recovered from the string using restore_dialog_state; */ -LAYBASIC_PUBLIC std::string save_dialog_state (QWidget *dialog, bool with_section_sizes = true); +LAYUI_PUBLIC std::string save_dialog_state (QWidget *dialog, bool with_section_sizes = true); /** * @brief Restore the dialog's state from the given string */ -LAYBASIC_PUBLIC void restore_dialog_state (QWidget *dialog, const std::string &s, bool with_section_sizes = true); +LAYUI_PUBLIC void restore_dialog_state (QWidget *dialog, const std::string &s, bool with_section_sizes = true); /** * @brief A utility function connecting a label's linkActivated event with the help browser */ -LAYBASIC_PUBLIC void activate_help_links (QLabel *label); +LAYUI_PUBLIC void activate_help_links (QLabel *label); /** * @brief A utility function connecting a label's linkActivated event with the help browser (modal help dialogs) */ -LAYBASIC_PUBLIC void activate_modal_help_links (QLabel *label); +LAYUI_PUBLIC void activate_modal_help_links (QLabel *label); /** * @brief Register the help handler (object and slots for non-modal and modal help dialogs) */ -LAYBASIC_PUBLIC void register_help_handler (QObject *object, const char *slot, const char *modal_slot); +LAYUI_PUBLIC void register_help_handler (QObject *object, const char *slot, const char *modal_slot); /** * @brief Configures a QLineEdit or other widget to indicate an error @@ -77,24 +77,24 @@ LAYBASIC_PUBLIC void register_help_handler (QObject *object, const char *slot, c * and the exception's text will be used as tooltip. Use this function with * a null ex pointer to clear the error condition. */ -LAYBASIC_PUBLIC void indicate_error (QWidget *le, const tl::Exception *ex); +LAYUI_PUBLIC void indicate_error (QWidget *le, const tl::Exception *ex); /** * @brief Configures a QLineEdit or other widget to indicate an error */ -LAYBASIC_PUBLIC void indicate_error (QWidget *le, bool error); +LAYUI_PUBLIC void indicate_error (QWidget *le, bool error); /** * @brief Gets the system monospace font */ -LAYBASIC_PUBLIC QFont monospace_font (); +LAYUI_PUBLIC QFont monospace_font (); #if QT_VERSION < 0x050000 // Provide missing QSignalBlocker for Qt4 -class LAYBASIC_PUBLIC SignalBlocker +class LAYUI_PUBLIC SignalBlocker { public: SignalBlocker (QWidget *w); diff --git a/src/laybasic/laybasic/laySaveLayoutOptionsDialog.cc b/src/layui/layui/laySaveLayoutOptionsDialog.cc similarity index 98% rename from src/laybasic/laybasic/laySaveLayoutOptionsDialog.cc rename to src/layui/layui/laySaveLayoutOptionsDialog.cc index ff5b28002..d629ba568 100644 --- a/src/laybasic/laybasic/laySaveLayoutOptionsDialog.cc +++ b/src/layui/layui/laySaveLayoutOptionsDialog.cc @@ -22,7 +22,7 @@ #if defined(HAVE_QT) -#include "layLayoutView.h" +#include "layLayoutViewBase.h" #include "laySaveLayoutOptionsDialog.h" #include "layStream.h" #include "laybasicConfig.h" @@ -406,7 +406,7 @@ SaveLayoutAsOptionsDialog::ok_button_pressed () } bool -SaveLayoutAsOptionsDialog::get_options (lay::LayoutView *view, unsigned int cv_index, const std::string &fn, tl::OutputStream::OutputStreamMode &om, db::SaveLayoutOptions &options) +SaveLayoutAsOptionsDialog::get_options (lay::LayoutViewBase *view, unsigned int cv_index, const std::string &fn, tl::OutputStream::OutputStreamMode &om, db::SaveLayoutOptions &options) { const lay::CellView &cv = view->cellview (cv_index); if (! cv.is_valid ()) { diff --git a/src/laybasic/laybasic/laySaveLayoutOptionsDialog.h b/src/layui/layui/laySaveLayoutOptionsDialog.h similarity index 88% rename from src/laybasic/laybasic/laySaveLayoutOptionsDialog.h rename to src/layui/layui/laySaveLayoutOptionsDialog.h index a8dcb6554..db37f3c4d 100644 --- a/src/laybasic/laybasic/laySaveLayoutOptionsDialog.h +++ b/src/layui/layui/laySaveLayoutOptionsDialog.h @@ -25,6 +25,7 @@ #ifndef HDR_laySaveLayoutOptionsDialog #define HDR_laySaveLayoutOptionsDialog +#include "layuiCommon.h" #include "ui_SaveLayoutOptionsDialog.h" #include "ui_SaveLayoutAsOptionsDialog.h" #include "dbStream.h" @@ -46,9 +47,9 @@ namespace db namespace lay { -class LayoutView; +class LayoutViewBase; -class LAYBASIC_PUBLIC SaveLayoutAsOptionsDialog +class LAYUI_PUBLIC SaveLayoutAsOptionsDialog : public QDialog, private Ui::SaveLayoutAsOptionsDialog { Q_OBJECT @@ -57,7 +58,7 @@ public: SaveLayoutAsOptionsDialog (QWidget *parent, const std::string &title); ~SaveLayoutAsOptionsDialog (); - bool get_options (lay::LayoutView *view, unsigned int cv_index, const std::string &fn, tl::OutputStream::OutputStreamMode &compression, db::SaveLayoutOptions &options); + bool get_options (lay::LayoutViewBase *view, unsigned int cv_index, const std::string &fn, tl::OutputStream::OutputStreamMode &compression, db::SaveLayoutOptions &options); public slots: void ok_button_pressed (); @@ -71,7 +72,7 @@ private: const db::Technology *mp_tech; }; -class LAYBASIC_PUBLIC SaveLayoutOptionsDialog +class LAYUI_PUBLIC SaveLayoutOptionsDialog : public QDialog, private Ui::SaveLayoutOptionsDialog { Q_OBJECT diff --git a/src/laybasic/laybasic/laySelectCellViewForm.cc b/src/layui/layui/laySelectCellViewForm.cc similarity index 97% rename from src/laybasic/laybasic/laySelectCellViewForm.cc rename to src/layui/layui/laySelectCellViewForm.cc index 1ae4b1da7..ccdb27d1d 100644 --- a/src/laybasic/laybasic/laySelectCellViewForm.cc +++ b/src/layui/layui/laySelectCellViewForm.cc @@ -24,14 +24,14 @@ #include "laySelectCellViewForm.h" #include "layCellView.h" -#include "layLayoutView.h" +#include "layLayoutViewBase.h" namespace lay { // ------------------------------------------------------------ -SelectCellViewForm::SelectCellViewForm (QWidget *parent, lay::LayoutView *view, const std::string &title, bool single) +SelectCellViewForm::SelectCellViewForm (QWidget *parent, lay::LayoutViewBase *view, const std::string &title, bool single) : QDialog (parent), Ui::SelectCellViewForm () { setObjectName (QString::fromUtf8 ("select_cv")); diff --git a/src/laybasic/laybasic/laySelectCellViewForm.h b/src/layui/layui/laySelectCellViewForm.h similarity index 90% rename from src/laybasic/laybasic/laySelectCellViewForm.h rename to src/layui/layui/laySelectCellViewForm.h index 5abd7efe2..9d3a1d63c 100644 --- a/src/laybasic/laybasic/laySelectCellViewForm.h +++ b/src/layui/layui/laySelectCellViewForm.h @@ -25,7 +25,7 @@ #ifndef HDR_SelectCellViewForm #define HDR_SelectCellViewForm -#include "laybasicCommon.h" +#include "layuiCommon.h" #include #include @@ -38,15 +38,15 @@ namespace lay { class CellView; -class LayoutView; +class LayoutViewBase; -class LAYBASIC_PUBLIC SelectCellViewForm +class LAYUI_PUBLIC SelectCellViewForm : public QDialog, private Ui::SelectCellViewForm { Q_OBJECT public: - SelectCellViewForm (QWidget *parent, lay::LayoutView *view, const std::string &title, bool single = false); + SelectCellViewForm (QWidget *parent, lay::LayoutViewBase *view, const std::string &title, bool single = false); /** * @brief Set the selection to a single selection diff --git a/src/laybasic/laybasic/laySelectLineStyleForm.cc b/src/layui/layui/laySelectLineStyleForm.cc similarity index 100% rename from src/laybasic/laybasic/laySelectLineStyleForm.cc rename to src/layui/layui/laySelectLineStyleForm.cc diff --git a/src/laybasic/laybasic/laySelectLineStyleForm.h b/src/layui/layui/laySelectLineStyleForm.h similarity index 100% rename from src/laybasic/laybasic/laySelectLineStyleForm.h rename to src/layui/layui/laySelectLineStyleForm.h diff --git a/src/laybasic/laybasic/laySelectStippleForm.cc b/src/layui/layui/laySelectStippleForm.cc similarity index 100% rename from src/laybasic/laybasic/laySelectStippleForm.cc rename to src/layui/layui/laySelectStippleForm.cc diff --git a/src/laybasic/laybasic/laySelectStippleForm.h b/src/layui/layui/laySelectStippleForm.h similarity index 100% rename from src/laybasic/laybasic/laySelectStippleForm.h rename to src/layui/layui/laySelectStippleForm.h diff --git a/src/laybasic/laybasic/layTechnology.cc b/src/layui/layui/layTechnology.cc similarity index 100% rename from src/laybasic/laybasic/layTechnology.cc rename to src/layui/layui/layTechnology.cc diff --git a/src/laybasic/laybasic/layTechnology.h b/src/layui/layui/layTechnology.h similarity index 95% rename from src/laybasic/laybasic/layTechnology.h rename to src/layui/layui/layTechnology.h index c7168b313..1dcf693a1 100644 --- a/src/laybasic/laybasic/layTechnology.h +++ b/src/layui/layui/layTechnology.h @@ -25,7 +25,7 @@ #ifndef HDR_layTechnology #define HDR_layTechnology -#include "laybasicCommon.h" +#include "layuiCommon.h" #include "dbTechnology.h" @@ -41,7 +41,7 @@ namespace lay * To do so, it must implement a TechnologyComponentEditor that provides an * editor for it's component. */ -class LAYBASIC_PUBLIC TechnologyComponentEditor +class LAYUI_PUBLIC TechnologyComponentEditor : public QFrame { public: @@ -106,7 +106,7 @@ private: /** * @brief A base class for a technology component provider */ -class LAYBASIC_PUBLIC TechnologyEditorProvider +class LAYUI_PUBLIC TechnologyEditorProvider { public: /** diff --git a/src/laybasic/laybasic/layTipDialog.cc b/src/layui/layui/layTipDialog.cc similarity index 100% rename from src/laybasic/laybasic/layTipDialog.cc rename to src/layui/layui/layTipDialog.cc diff --git a/src/laybasic/laybasic/layTipDialog.h b/src/layui/layui/layTipDialog.h similarity index 98% rename from src/laybasic/laybasic/layTipDialog.h rename to src/layui/layui/layTipDialog.h index fc6ffaf27..80748bef9 100644 --- a/src/laybasic/laybasic/layTipDialog.h +++ b/src/layui/layui/layTipDialog.h @@ -25,7 +25,7 @@ #ifndef HDR_layTipDialog #define HDR_layTipDialog -#include "laybasicCommon.h" +#include "layuiCommon.h" #include #include @@ -42,7 +42,7 @@ namespace lay { * A tip window is basically a message box with the ability to hide the box forever (or at least until the * configuration is reset). */ -class LAYBASIC_PUBLIC TipDialog +class LAYUI_PUBLIC TipDialog : public QDialog { Q_OBJECT diff --git a/src/laybasic/laybasic/layWidgets.cc b/src/layui/layui/layWidgets.cc similarity index 99% rename from src/laybasic/laybasic/layWidgets.cc rename to src/layui/layui/layWidgets.cc index aa31b339a..7f8207279 100644 --- a/src/laybasic/laybasic/layWidgets.cc +++ b/src/layui/layui/layWidgets.cc @@ -31,7 +31,7 @@ #include "layWidgets.h" -#include "layLayoutView.h" +#include "layLayoutViewBase.h" #include "layDialogs.h" #include "tlExceptions.h" #include "layStipplePalette.h" @@ -69,7 +69,7 @@ DitherPatternSelectionButton::~DitherPatternSelectionButton () } void -DitherPatternSelectionButton::set_view (lay::LayoutView *view) +DitherPatternSelectionButton::set_view (lay::LayoutViewBase *view) { if (view != mp_view) { mp_view = view; @@ -228,7 +228,7 @@ DitherPatternSelectionButton::update_menu () struct CellViewSelectionComboBoxPrivateData { - const lay::LayoutView *layout_view; + const lay::LayoutViewBase *layout_view; }; CellViewSelectionComboBox::CellViewSelectionComboBox (QWidget *parent) @@ -244,14 +244,14 @@ CellViewSelectionComboBox::~CellViewSelectionComboBox () mp_private = 0; } -const lay::LayoutView * +const lay::LayoutViewBase * CellViewSelectionComboBox::layout_view () const { return mp_private->layout_view; } void -CellViewSelectionComboBox::set_layout_view (const lay::LayoutView *layout_view) +CellViewSelectionComboBox::set_layout_view (const lay::LayoutViewBase *layout_view) { // TODO: should register a listener, so it does the update automatically. mp_private->layout_view = layout_view; @@ -297,7 +297,7 @@ struct LayerSelectionComboBoxPrivateData bool new_layer_enabled; bool all_layers; const db::Layout *layout; - lay::LayoutView *view; + lay::LayoutViewBase *view; int cv_index; db::LayerProperties last_props; }; @@ -414,7 +414,7 @@ struct LPIPairCompareOp }; void -LayerSelectionComboBox::set_view (lay::LayoutView *view, int cv_index, bool all_layers) +LayerSelectionComboBox::set_view (lay::LayoutViewBase *view, int cv_index, bool all_layers) { if (view == 0 || cv_index < 0) { set_layout (0); diff --git a/src/laybasic/laybasic/layWidgets.h b/src/layui/layui/layWidgets.h similarity index 94% rename from src/laybasic/laybasic/layWidgets.h rename to src/layui/layui/layWidgets.h index eb3ef708f..02d9666f4 100644 --- a/src/laybasic/laybasic/layWidgets.h +++ b/src/layui/layui/layWidgets.h @@ -25,7 +25,7 @@ #ifndef HDR_layWidgets #define HDR_layWidgets -#include "laybasicCommon.h" +#include "layuiCommon.h" #include "tlObject.h" @@ -47,14 +47,14 @@ namespace db namespace lay { -class LayoutView; +class LayoutViewBase; struct LayerSelectionComboBoxPrivateData; struct CellViewSelectionComboBoxPrivateData; /** * @brief A selection button for dither pattern */ -class LAYBASIC_PUBLIC DitherPatternSelectionButton +class LAYUI_PUBLIC DitherPatternSelectionButton : public QPushButton { Q_OBJECT @@ -75,7 +75,7 @@ public: * * This method is required to select the proper dither pattern */ - void set_view (lay::LayoutView *view); + void set_view (lay::LayoutViewBase *view); /** * @brief Set the dither pattern index @@ -106,7 +106,7 @@ private slots: void menu_about_to_show (); private: - lay::LayoutView *mp_view; + lay::LayoutViewBase *mp_view; int m_dither_pattern; void update_pattern (); @@ -118,7 +118,7 @@ private: * * This combo box allows selecting a library */ -class LAYBASIC_PUBLIC LibrarySelectionComboBox +class LAYUI_PUBLIC LibrarySelectionComboBox : public QComboBox { Q_OBJECT @@ -172,7 +172,7 @@ private: * * This combo box allows selecting a (physical) layer from a layout */ -class LAYBASIC_PUBLIC LayerSelectionComboBox +class LAYUI_PUBLIC LayerSelectionComboBox : public QComboBox, public tl::Object { Q_OBJECT @@ -204,7 +204,7 @@ public: * If all_layers is set to true, layers are shown which are in the layer list, but * not created as layers yet. */ - void set_view (lay::LayoutView *view, int cv_index, bool all_layers = false); + void set_view (lay::LayoutViewBase *view, int cv_index, bool all_layers = false); /** * @brief Sets a flag indicating whether the "new layer" option is available @@ -261,7 +261,7 @@ private: * * This combo box allows selecting a cellview from a lay::LayoutView */ -class LAYBASIC_PUBLIC CellViewSelectionComboBox +class LAYUI_PUBLIC CellViewSelectionComboBox : public QComboBox { Q_OBJECT @@ -270,8 +270,8 @@ public: CellViewSelectionComboBox (QWidget *parent); ~CellViewSelectionComboBox (); - void set_layout_view (const lay::LayoutView *view); - const lay::LayoutView *layout_view () const; + void set_layout_view (const lay::LayoutViewBase *view); + const lay::LayoutViewBase *layout_view () const; void set_current_cv_index (int l); int current_cv_index () const; @@ -287,7 +287,7 @@ private: * usual push button and supplies a color chooser without the * capability to switch to "auto" color mode. */ -class LAYBASIC_PUBLIC SimpleColorButton +class LAYUI_PUBLIC SimpleColorButton : public QPushButton { Q_OBJECT @@ -320,7 +320,7 @@ private slots: * usual push button and supplies a color chooser with the * capability to switch to "auto" color mode. */ -class LAYBASIC_PUBLIC ColorButton +class LAYUI_PUBLIC ColorButton : public QPushButton { Q_OBJECT @@ -355,7 +355,7 @@ private slots: /** * @brief An edit box with a clear button and options menu */ -class LAYBASIC_PUBLIC DecoratedLineEdit +class LAYUI_PUBLIC DecoratedLineEdit : public QLineEdit { Q_OBJECT @@ -468,7 +468,7 @@ private: /** * @brief An interactive list widget which offers slots to delete and move items and interfaces to std::vector */ -class LAYBASIC_PUBLIC InteractiveListWidget +class LAYUI_PUBLIC InteractiveListWidget : public QListWidget { Q_OBJECT diff --git a/src/laybasic/laybasic/laybasicResources.qrc b/src/layui/layui/laybasicResources.qrc similarity index 100% rename from src/laybasic/laybasic/laybasicResources.qrc rename to src/layui/layui/laybasicResources.qrc diff --git a/src/layui/layui/layui.pro b/src/layui/layui/layui.pro new file mode 100644 index 000000000..733082897 --- /dev/null +++ b/src/layui/layui/layui.pro @@ -0,0 +1,218 @@ + +DESTDIR = $$OUT_PWD/../.. +TARGET = klayout_layui + +include($$PWD/../../lib.pri) + +DEFINES += MAKE_LAYUI_LIBRARY + +FORMS = \ + AlignCellOptionsDialog.ui \ + BookmarkManagementForm.ui \ + BrowseInstancesConfigPage.ui \ + BrowseInstancesForm.ui \ + BrowserDialog.ui \ + BrowserPanel.ui \ + BrowseShapesConfigPage.ui \ + BrowseShapesForm.ui \ + CellSelectionForm.ui \ + ClearLayerModeDialog.ui \ + ConfigurationDialog.ui \ + CopyCellModeDialog.ui \ + DeleteCellModeDialog.ui \ + DuplicateLayerDialog.ui \ + EditStipplesForm.ui \ + FlattenInstOptionsDialog.ui \ + GridNetConfigPage.ui \ + LayerMappingWidget.ui \ + LayerSourceDialog.ui \ + LayoutProperties.ui \ + LayoutViewConfigPage1.ui \ + LayoutViewConfigPage2a.ui \ + LayoutViewConfigPage2b.ui \ + LayoutViewConfigPage2c.ui \ + LayoutViewConfigPage2d.ui \ + LayoutViewConfigPage3a.ui \ + LayoutViewConfigPage3b.ui \ + LayoutViewConfigPage3c.ui \ + LayoutViewConfigPage3f.ui \ + LayoutViewConfigPage4.ui \ + LayoutViewConfigPage5.ui \ + LayoutViewConfigPage6.ui \ + LayoutViewConfigPage7.ui \ + LayoutViewConfigPage.ui \ + LibraryCellSelectionForm.ui \ + LoadLayoutOptionsDialog.ui \ + MarkerBrowserConfigPage2.ui \ + MarkerBrowserConfigPage.ui \ + MarkerBrowserDialog.ui \ + MarkerBrowserPage.ui \ + MarkerBrowserSnapshotView.ui \ + MoveOptionsDialog.ui \ + MoveToOptionsDialog.ui \ + NewCellPropertiesDialog.ui \ + NewLayerPropertiesDialog.ui \ + NewLayoutPropertiesDialog.ui \ + OpenLayoutModeDialog.ui \ + RenameCellDialog.ui \ + ReplaceCellOptionsDialog.ui \ + SaveLayoutOptionsDialog.ui \ + SaveLayoutAsOptionsDialog.ui \ + SelectStippleForm.ui \ + TipDialog.ui \ + UserPropertiesForm.ui \ + UserPropertiesEditForm.ui \ + SpecificLoadLayoutOptionsDialog.ui \ + SelectLineStyleForm.ui \ + LayoutViewConfigPage6a.ui \ + EditLineStylesForm.ui \ + NetlistBrowserPage.ui \ + NetlistBrowserConfigPage.ui \ + NetlistBrowserConfigPage2.ui \ + NetlistBrowserDialog.ui \ + NetInfoDialog.ui \ + NetExportDialog.ui \ + SelectCellViewForm.ui \ + LayoutStatistics.ui \ + +RESOURCES = \ + laybasicResources.qrc \ + layLayoutStatistics.qrc \ + +SOURCES = \ + gsiDeclLayDialogs.cc \ + gsiDeclLayMenu.cc \ + gsiDeclLayNetlistBrowserDialog.cc \ + gsiDeclLayStream.cc \ + layBackgroundAwareTreeStyle.cc \ + layBookmarkManagementForm.cc \ + layBookmarksView.cc \ + layBrowseInstancesForm.cc \ + layBrowseShapesForm.cc \ + layBrowser.cc \ + layBrowserDialog.cc \ + layBrowserPanel.cc \ + layBusy.cc \ + layCellSelectionForm.cc \ + layCellTreeModel.cc \ + layConfigurationDialog.cc \ + layDialogs.cc \ + layEditLineStyleWidget.cc \ + layEditLineStylesForm.cc \ + layEditStippleWidget.cc \ + layEditStipplesForm.cc \ + layEditorOptionsFrame.cc \ + layEditorOptionsPage.cc \ + layEditorOptionsPages.cc \ + layFileDialog.cc \ + layGridNetConfigPage.cc \ + layGridNet.cc \ + layGenericSyntaxHighlighter.cc \ + layHierarchyControlPanel.cc \ + layIndexedNetlistModel.cc \ + layItemDelegates.cc \ + layLayerControlPanel.cc \ + layLayerMappingWidget.cc \ + layLayerToolbox.cc \ + layLayerTreeModel.cc \ + layLayoutPropertiesForm.cc \ + layLayoutStatisticsForm.cc \ + layLayoutViewConfigPages.cc \ + layLayoutViewFunctions.cc \ + layLibrariesView.cc \ + layLoadLayoutOptionsDialog.cc \ + layNetExportDialog.cc \ + layNetInfoDialog.cc \ + layNetlistBrowser.cc \ + layNetlistBrowserDialog.cc \ + layNetlistBrowserModel.cc \ + layNetlistBrowserPage.cc \ + layNetlistBrowserTreeModel.cc \ + layNetlistCrossReferenceModel.cc \ + layQtTools.cc \ + laySaveLayoutOptionsDialog.cc \ + laySelectCellViewForm.cc \ + laySelectLineStyleForm.cc \ + laySelectStippleForm.cc \ + layTechnology.cc \ + layTipDialog.cc \ + layWidgets.cc \ + rdbInfoWidget.cc \ + rdbMarkerBrowser.cc \ + rdbMarkerBrowserDialog.cc \ + rdbMarkerBrowserPage.cc \ + +HEADERS = \ + layBackgroundAwareTreeStyle.h \ + layBookmarkManagementForm.h \ + layBookmarksView.h \ + layBrowseInstancesForm.h \ + layBrowseShapesForm.h \ + layBrowser.h \ + layBrowserDialog.h \ + layBrowserPanel.h \ + layBusy.h \ + layCellSelectionForm.h \ + layCellTreeModel.h \ + layConfigurationDialog.h \ + layDialogs.h \ + layEditLineStyleWidget.h \ + layEditLineStylesForm.h \ + layEditStippleWidget.h \ + layEditStipplesForm.h \ + layEditorOptionsFrame.h \ + layEditorOptionsPage.h \ + layEditorOptionsPages.h \ + layFileDialog.h \ + layGenericSyntaxHighlighter.h \ + layGridNetConfigPage.h \ + layGridNet.h \ + layHierarchyControlPanel.h \ + layIndexedNetlistModel.h \ + layItemDelegates.h \ + layLayerControlPanel.h \ + layLayerMappingWidget.h \ + layLayerToolbox.h \ + layLayerTreeModel.h \ + layLayoutPropertiesForm.h \ + layLayoutStatisticsForm.h \ + layLayoutViewConfigPages.h \ + layLayoutViewFunctions.h \ + layLibrariesView.h \ + layLoadLayoutOptionsDialog.h \ + layNetExportDialog.h \ + layNetInfoDialog.h \ + layNetlistBrowser.h \ + layNetlistBrowserDialog.h \ + layNetlistBrowserModel.h \ + layNetlistBrowserPage.h \ + layNetlistBrowserTreeModel.h \ + layNetlistCrossReferenceModel.h \ + layQtTools.h \ + laySaveLayoutOptionsDialog.h \ + laySelectCellViewForm.h \ + laySelectLineStyleForm.h \ + laySelectStippleForm.h \ + layTechnology.h \ + layTipDialog.h \ + layWidgets.h \ + laybasicConfig.h \ + rdbInfoWidget.h \ + rdbMarkerBrowser.h \ + rdbMarkerBrowserDialog.h \ + rdbMarkerBrowserPage.h \ + +INCLUDEPATH += $$LAYBASIC_INC $$TL_INC $$GSI_INC $$DB_INC $$RDB_INC +DEPENDPATH += $$LAYBASIC_INC $$TL_INC $$GSI_INC $$DB_INC $$RDB_INC +LIBS += -L$$DESTDIR -lklayout_laybasic -lklayout_tl -lklayout_gsi -lklayout_db -lklayout_rdb + +INCLUDEPATH += $$QTBASIC_INC +DEPENDPATH += $$QTBASIC_INC + +equals(HAVE_QTBINDINGS, "1") { + LIBS += -lklayout_qtbasic -lklayout_QtGui -lklayout_QtCore + greaterThan(QT_MAJOR_VERSION, 4) { + LIBS += -lklayout_QtWidgets + } +} + diff --git a/src/layui/layui/layuiCommon.h b/src/layui/layui/layuiCommon.h new file mode 100644 index 000000000..b6c807d2f --- /dev/null +++ b/src/layui/layui/layuiCommon.h @@ -0,0 +1,51 @@ + +/* + + KLayout Layout Viewer + Copyright (C) 2006-2022 Matthias Koefferlein + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +*/ + + +#if !defined(HDR_layuiCommon_h) +# define HDR_layuiCommon_h + +# if defined _WIN32 || defined __CYGWIN__ + +# ifdef MAKE_LAYUI_LIBRARY +# define LAYUI_PUBLIC __declspec(dllexport) +# else +# define LAYUI_PUBLIC __declspec(dllimport) +# endif +# define LAYUI_LOCAL +# define LAYUI_PUBLIC_TEMPLATE + +# else + +# if __GNUC__ >= 4 || defined(__clang__) +# define LAYUI_PUBLIC __attribute__ ((visibility ("default"))) +# define LAYUI_PUBLIC_TEMPLATE __attribute__ ((visibility ("default"))) +# define LAYUI_LOCAL __attribute__ ((visibility ("hidden"))) +# else +# define LAYUI_PUBLIC +# define LAYUI_PUBLIC_TEMPLATE +# define LAYUI_LOCAL +# endif + +# endif + +#endif diff --git a/src/laybasic/laybasic/rdbInfoWidget.cc b/src/layui/layui/rdbInfoWidget.cc similarity index 100% rename from src/laybasic/laybasic/rdbInfoWidget.cc rename to src/layui/layui/rdbInfoWidget.cc diff --git a/src/laybasic/laybasic/rdbInfoWidget.h b/src/layui/layui/rdbInfoWidget.h similarity index 100% rename from src/laybasic/laybasic/rdbInfoWidget.h rename to src/layui/layui/rdbInfoWidget.h diff --git a/src/laybasic/laybasic/rdbMarkerBrowser.cc b/src/layui/layui/rdbMarkerBrowser.cc similarity index 99% rename from src/laybasic/laybasic/rdbMarkerBrowser.cc rename to src/layui/layui/rdbMarkerBrowser.cc index b0093decf..06b2df327 100644 --- a/src/laybasic/laybasic/rdbMarkerBrowser.cc +++ b/src/layui/layui/rdbMarkerBrowser.cc @@ -302,7 +302,7 @@ public: menu_entries.push_back (lay::menu_item ("marker_browser::scan_layers_flat", "scan_layers_flat", "tools_menu.shapes_to_markers.end", tl::to_string (QObject::tr ("Flat")))); } - virtual lay::Plugin *create_plugin (db::Manager *, lay::Dispatcher *root, lay::LayoutView *view) const + virtual lay::Plugin *create_plugin (db::Manager *, lay::Dispatcher *root, lay::LayoutViewBase *view) const { return new rdb::MarkerBrowserDialog (root, view); } diff --git a/src/laybasic/laybasic/rdbMarkerBrowser.h b/src/layui/layui/rdbMarkerBrowser.h similarity index 100% rename from src/laybasic/laybasic/rdbMarkerBrowser.h rename to src/layui/layui/rdbMarkerBrowser.h diff --git a/src/laybasic/laybasic/rdbMarkerBrowserDialog.cc b/src/layui/layui/rdbMarkerBrowserDialog.cc similarity index 88% rename from src/laybasic/laybasic/rdbMarkerBrowserDialog.cc rename to src/layui/layui/rdbMarkerBrowserDialog.cc index 644d0c089..b3c7de898 100644 --- a/src/laybasic/laybasic/rdbMarkerBrowserDialog.cc +++ b/src/layui/layui/rdbMarkerBrowserDialog.cc @@ -26,7 +26,7 @@ #include "rdb.h" #include "rdbReader.h" #include "tlProgress.h" -#include "layLayoutView.h" +#include "layLayoutViewBase.h" #include "tlExceptions.h" #include "layFileDialog.h" #include "layConverters.h" @@ -35,6 +35,8 @@ #include "dbLayoutUtils.h" #include "dbRecursiveShapeIterator.h" +#include "ui_MarkerBrowserDialog.h" + #include #include @@ -55,9 +57,8 @@ extern std::string cfg_rdb_marker_vertex_size; extern std::string cfg_rdb_marker_halo; extern std::string cfg_rdb_marker_dither_pattern; -MarkerBrowserDialog::MarkerBrowserDialog (lay::Dispatcher *root, lay::LayoutView *vw) +MarkerBrowserDialog::MarkerBrowserDialog (lay::Dispatcher *root, lay::LayoutViewBase *vw) : lay::Browser (root, vw), - Ui::MarkerBrowserDialog (), m_context (rdb::AnyCell), m_window (rdb::FitMarker), m_window_dim (0.0), @@ -69,9 +70,10 @@ MarkerBrowserDialog::MarkerBrowserDialog (lay::Dispatcher *root, lay::LayoutView m_cv_index (-1), m_rdb_index (-1) { - Ui::MarkerBrowserDialog::setupUi (this); + mp_ui = new Ui::MarkerBrowserDialog (); + mp_ui->setupUi (this); - browser_frame->set_dispatcher (root); + mp_ui->browser_frame->set_dispatcher (root); if (view ()) { view ()->cellviews_changed_event.add (this, &MarkerBrowserDialog::cellviews_changed); @@ -79,12 +81,12 @@ MarkerBrowserDialog::MarkerBrowserDialog (lay::Dispatcher *root, lay::LayoutView view ()->rdb_list_changed_event.add (this, &MarkerBrowserDialog::rdbs_changed); } - m_open_action = new QAction (QObject::tr ("Open"), file_menu); - m_saveas_action = new QAction (QObject::tr ("Save As"), file_menu); - m_export_action = new QAction (QObject::tr ("Export To Layout"), file_menu); - m_reload_action = new QAction (QObject::tr ("Reload"), file_menu); - m_unload_action = new QAction (QObject::tr ("Unload"), file_menu); - m_unload_all_action = new QAction (QObject::tr ("Unload All"), file_menu); + m_open_action = new QAction (QObject::tr ("Open"), mp_ui->file_menu); + m_saveas_action = new QAction (QObject::tr ("Save As"), mp_ui->file_menu); + m_export_action = new QAction (QObject::tr ("Export To Layout"), mp_ui->file_menu); + m_reload_action = new QAction (QObject::tr ("Reload"), mp_ui->file_menu); + m_unload_action = new QAction (QObject::tr ("Unload"), mp_ui->file_menu); + m_unload_all_action = new QAction (QObject::tr ("Unload All"), mp_ui->file_menu); connect (m_open_action, SIGNAL (triggered ()), this, SLOT (open_clicked ())); connect (m_saveas_action, SIGNAL (triggered ()), this, SLOT (saveas_clicked ())); @@ -93,24 +95,24 @@ MarkerBrowserDialog::MarkerBrowserDialog (lay::Dispatcher *root, lay::LayoutView connect (m_unload_action, SIGNAL (triggered ()), this, SLOT (unload_clicked ())); connect (m_unload_all_action, SIGNAL (triggered ()), this, SLOT (unload_all_clicked ())); - file_menu->addAction (m_open_action); - file_menu->addAction (m_saveas_action); - QAction *sep0 = new QAction (file_menu); + mp_ui->file_menu->addAction (m_open_action); + mp_ui->file_menu->addAction (m_saveas_action); + QAction *sep0 = new QAction (mp_ui->file_menu); sep0->setSeparator (true); - file_menu->addAction (m_export_action); - QAction *sep1 = new QAction (file_menu); + mp_ui->file_menu->addAction (m_export_action); + QAction *sep1 = new QAction (mp_ui->file_menu); sep1->setSeparator (true); - file_menu->addAction (sep1); - file_menu->addAction (m_reload_action); - QAction *sep2 = new QAction (file_menu); + mp_ui->file_menu->addAction (sep1); + mp_ui->file_menu->addAction (m_reload_action); + QAction *sep2 = new QAction (mp_ui->file_menu); sep2->setSeparator (true); - file_menu->addAction (sep2); - file_menu->addAction (m_unload_action); - file_menu->addAction (m_unload_all_action); + mp_ui->file_menu->addAction (sep2); + mp_ui->file_menu->addAction (m_unload_action); + mp_ui->file_menu->addAction (m_unload_all_action); - connect (layout_cb, SIGNAL (activated (int)), this, SLOT (cv_index_changed (int))); - connect (rdb_cb, SIGNAL (activated (int)), this, SLOT (rdb_index_changed (int))); - connect (configure_pb, SIGNAL (clicked ()), this, SLOT (configure_clicked ())); + connect (mp_ui->layout_cb, SIGNAL (activated (int)), this, SLOT (cv_index_changed (int))); + connect (mp_ui->rdb_cb, SIGNAL (activated (int)), this, SLOT (rdb_index_changed (int))); + connect (mp_ui->configure_pb, SIGNAL (clicked ()), this, SLOT (configure_clicked ())); cellviews_changed (); } @@ -397,9 +399,9 @@ BEGIN_PROTECTED rdb::Database *rdb = view ()->get_rdb (m_rdb_index); if (rdb && ! rdb->filename ().empty ()) { - browser_frame->set_rdb (0); + mp_ui->browser_frame->set_rdb (0); rdb->load (rdb->filename ()); - browser_frame->set_rdb (rdb); + mp_ui->browser_frame->set_rdb (rdb); } @@ -426,7 +428,7 @@ BEGIN_PROTECTED db->load (m_open_filename); int rdb_index = view ()->add_rdb (db.release ()); - rdb_cb->setCurrentIndex (rdb_index); + mp_ui->rdb_cb->setCurrentIndex (rdb_index); // it looks like the setCurrentIndex does not issue this signal: rdb_index_changed (rdb_index); @@ -440,7 +442,7 @@ MarkerBrowserDialog::configure (const std::string &name, const std::string &valu { bool need_update = false; bool taken = true; - bool show_all = browser_frame->show_all (); + bool show_all = mp_ui->browser_frame->show_all (); if (name == cfg_rdb_context_mode) { @@ -530,12 +532,12 @@ MarkerBrowserDialog::configure (const std::string &name, const std::string &valu } if (active () && need_update) { - browser_frame->set_max_marker_count (m_max_marker_count); - browser_frame->set_window (m_window, m_window_dim, m_context); - browser_frame->set_marker_style (m_marker_color, m_marker_line_width, m_marker_vertex_size, m_marker_halo, m_marker_dither_pattern); + mp_ui->browser_frame->set_max_marker_count (m_max_marker_count); + mp_ui->browser_frame->set_window (m_window, m_window_dim, m_context); + mp_ui->browser_frame->set_marker_style (m_marker_color, m_marker_line_width, m_marker_vertex_size, m_marker_halo, m_marker_dither_pattern); } - browser_frame->show_all (show_all); + mp_ui->browser_frame->show_all (show_all); return taken; } @@ -568,11 +570,11 @@ MarkerBrowserDialog::rdbs_changed () { int rdb_index = -1; - rdb_cb->clear (); + mp_ui->rdb_cb->clear (); for (unsigned int i = 0; i < view ()->num_rdbs (); ++i) { const rdb::Database *rdb = view ()->get_rdb (i); - rdb_cb->addItem (tl::to_qstring (rdb->name ())); + mp_ui->rdb_cb->addItem (tl::to_qstring (rdb->name ())); if (rdb->name () == m_rdb_name) { rdb_index = i; } @@ -580,7 +582,7 @@ MarkerBrowserDialog::rdbs_changed () // force an update m_rdb_index = rdb_index; - rdb_cb->setCurrentIndex (rdb_index); + mp_ui->rdb_cb->setCurrentIndex (rdb_index); if (active ()) { update_content (); } @@ -589,7 +591,7 @@ MarkerBrowserDialog::rdbs_changed () void MarkerBrowserDialog::cellview_changed (int) { - browser_frame->update_markers (); + mp_ui->browser_frame->update_markers (); } void @@ -597,17 +599,17 @@ MarkerBrowserDialog::cellviews_changed () { int cv_index = -1; - layout_cb->clear (); + mp_ui->layout_cb->clear (); for (unsigned int i = 0; i < view ()->cellviews (); ++i) { const lay::CellView &cv = view ()->cellview (i); - layout_cb->addItem (tl::to_qstring (cv->name ())); + mp_ui->layout_cb->addItem (tl::to_qstring (cv->name ())); if (cv.is_valid () && cv->name () == m_layout_name) { cv_index = i; } } - layout_cb->setCurrentIndex (cv_index); + mp_ui->layout_cb->setCurrentIndex (cv_index); cv_index_changed (cv_index); } @@ -662,7 +664,7 @@ MarkerBrowserDialog::update_content () rdb::Database *rdb = view ()->get_rdb (m_rdb_index); if (!rdb ) { - central_stack->setCurrentIndex (1); + mp_ui->central_stack->setCurrentIndex (1); } m_saveas_action->setEnabled (rdb != 0); @@ -671,19 +673,19 @@ MarkerBrowserDialog::update_content () m_unload_all_action->setEnabled (rdb != 0); m_reload_action->setEnabled (rdb != 0); - browser_frame->enable_updates (false); // Avoid building the internal lists several times ... - browser_frame->set_rdb (0); // force update - browser_frame->set_rdb (rdb); - browser_frame->set_max_marker_count (m_max_marker_count); - browser_frame->set_marker_style (m_marker_color, m_marker_line_width, m_marker_vertex_size, m_marker_halo, m_marker_dither_pattern); - browser_frame->set_window (m_window, m_window_dim, m_context); - browser_frame->set_view (view (), m_cv_index); - browser_frame->enable_updates (true); + mp_ui->browser_frame->enable_updates (false); // Avoid building the internal lists several times ... + mp_ui->browser_frame->set_rdb (0); // force update + mp_ui->browser_frame->set_rdb (rdb); + mp_ui->browser_frame->set_max_marker_count (m_max_marker_count); + mp_ui->browser_frame->set_marker_style (m_marker_color, m_marker_line_width, m_marker_vertex_size, m_marker_halo, m_marker_dither_pattern); + mp_ui->browser_frame->set_window (m_window, m_window_dim, m_context); + mp_ui->browser_frame->set_view (view (), m_cv_index); + mp_ui->browser_frame->enable_updates (true); if (rdb) { // Note: it appears to be required to show the browser page after it has been configured. // Otherwise the header gets messed up and the configuration is reset. - central_stack->setCurrentIndex (0); + mp_ui->central_stack->setCurrentIndex (0); } lay::CellView cv = view ()->cellview (m_cv_index); @@ -692,12 +694,12 @@ MarkerBrowserDialog::update_content () m_layout_name = cv->name (); } - if (layout_cb->currentIndex () != m_cv_index) { - layout_cb->setCurrentIndex (m_cv_index); + if (mp_ui->layout_cb->currentIndex () != m_cv_index) { + mp_ui->layout_cb->setCurrentIndex (m_cv_index); } - if (rdb_cb->currentIndex () != m_rdb_index) { - rdb_cb->setCurrentIndex (m_rdb_index); + if (mp_ui->rdb_cb->currentIndex () != m_rdb_index) { + mp_ui->rdb_cb->setCurrentIndex (m_rdb_index); } } @@ -708,8 +710,8 @@ MarkerBrowserDialog::deactivated () lay::Dispatcher::instance ()->config_set (cfg_rdb_window_state, lay::save_dialog_state (this).c_str ()); } - browser_frame->set_rdb (0); - browser_frame->set_view (0, 0); + mp_ui->browser_frame->set_rdb (0); + mp_ui->browser_frame->set_view (0, 0); } void diff --git a/src/laybasic/laybasic/rdbMarkerBrowserDialog.h b/src/layui/layui/rdbMarkerBrowserDialog.h similarity index 92% rename from src/laybasic/laybasic/rdbMarkerBrowserDialog.h rename to src/layui/layui/rdbMarkerBrowserDialog.h index a8c6703d1..118aac720 100644 --- a/src/laybasic/laybasic/rdbMarkerBrowserDialog.h +++ b/src/layui/layui/rdbMarkerBrowserDialog.h @@ -25,21 +25,25 @@ #ifndef HDR_rdbMarkerBrowserDialog #define HDR_rdbMarkerBrowserDialog -#include "ui_MarkerBrowserDialog.h" #include "layBrowser.h" +#include "layColor.h" #include "rdbMarkerBrowser.h" +namespace Ui +{ + class MarkerBrowserDialog; +} + namespace rdb { class MarkerBrowserDialog - : public lay::Browser, - private Ui::MarkerBrowserDialog + : public lay::Browser { Q_OBJECT public: - MarkerBrowserDialog (lay::Dispatcher *root, lay::LayoutView *view); + MarkerBrowserDialog (lay::Dispatcher *root, lay::LayoutViewBase *view); ~MarkerBrowserDialog (); void load (int rdb_index, int cv_index); @@ -70,6 +74,7 @@ public slots: void configure_clicked (); private: + Ui::MarkerBrowserDialog *mp_ui; context_mode_type m_context; window_type m_window; double m_window_dim; diff --git a/src/laybasic/laybasic/rdbMarkerBrowserPage.cc b/src/layui/layui/rdbMarkerBrowserPage.cc similarity index 99% rename from src/laybasic/laybasic/rdbMarkerBrowserPage.cc rename to src/layui/layui/rdbMarkerBrowserPage.cc index 2efedbc0f..52bd2b58a 100644 --- a/src/laybasic/laybasic/rdbMarkerBrowserPage.cc +++ b/src/layui/layui/rdbMarkerBrowserPage.cc @@ -28,7 +28,7 @@ #include "dbLayoutUtils.h" #include "tlRecipe.h" -#include "layLayoutView.h" +#include "layLayoutViewBase.h" #include "layMarker.h" #include "tlExceptions.h" @@ -1621,7 +1621,7 @@ MarkerBrowserPage::set_marker_style (lay::Color color, int line_width, int verte } void -MarkerBrowserPage::set_view (lay::LayoutView *view, unsigned int cv_index) +MarkerBrowserPage::set_view (lay::LayoutViewBase *view, unsigned int cv_index) { mp_view = view; m_cv_index = cv_index; diff --git a/src/laybasic/laybasic/rdbMarkerBrowserPage.h b/src/layui/layui/rdbMarkerBrowserPage.h similarity index 98% rename from src/laybasic/laybasic/rdbMarkerBrowserPage.h rename to src/layui/layui/rdbMarkerBrowserPage.h index 2982cb045..21448553d 100644 --- a/src/laybasic/laybasic/rdbMarkerBrowserPage.h +++ b/src/layui/layui/rdbMarkerBrowserPage.h @@ -37,7 +37,7 @@ class QAction; namespace lay { - class LayoutView; + class LayoutViewBase; class DMarker; class Dispatcher; } @@ -79,7 +79,7 @@ public: * If that pointer is non-null, the browser will attach itself to * the view and provide highlights for the selected markers inside the given cellview. */ - void set_view (lay::LayoutView *view, unsigned int cv_index); + void set_view (lay::LayoutViewBase *view, unsigned int cv_index); /** * @brief Attach the page to a RDB @@ -185,7 +185,7 @@ private: rdb::Database *mp_database; bool m_show_all; QAction *m_show_all_action; - lay::LayoutView *mp_view; + lay::LayoutViewBase *mp_view; unsigned int m_cv_index; std::vector mp_markers; db::DBox m_markers_bbox; diff --git a/src/laybasic/laybasic/syntax/d25_text.xml b/src/layui/layui/syntax/d25_text.xml similarity index 100% rename from src/laybasic/laybasic/syntax/d25_text.xml rename to src/layui/layui/syntax/d25_text.xml diff --git a/src/laybasic/laybasic/syntax/ur_text.xml b/src/layui/layui/syntax/ur_text.xml similarity index 100% rename from src/laybasic/laybasic/syntax/ur_text.xml rename to src/layui/layui/syntax/ur_text.xml diff --git a/src/laybasic/laybasic/tree.stxml b/src/layui/layui/tree.stxml similarity index 100% rename from src/laybasic/laybasic/tree.stxml rename to src/layui/layui/tree.stxml diff --git a/src/laybasic/unit_tests/layNetlistBrowserModelTests.cc b/src/layui/unit_tests/layNetlistBrowserModelTests.cc similarity index 100% rename from src/laybasic/unit_tests/layNetlistBrowserModelTests.cc rename to src/layui/unit_tests/layNetlistBrowserModelTests.cc diff --git a/src/laybasic/unit_tests/layNetlistBrowserTreeModelTests.cc b/src/layui/unit_tests/layNetlistBrowserTreeModelTests.cc similarity index 100% rename from src/laybasic/unit_tests/layNetlistBrowserTreeModelTests.cc rename to src/layui/unit_tests/layNetlistBrowserTreeModelTests.cc diff --git a/src/layui/unit_tests/unit_tests.pro b/src/layui/unit_tests/unit_tests.pro new file mode 100644 index 000000000..d9772a389 --- /dev/null +++ b/src/layui/unit_tests/unit_tests.pro @@ -0,0 +1,26 @@ + +DESTDIR_UT = $$OUT_PWD/../.. +DESTDIR = $$OUT_PWD/.. + +TARGET = layui_tests + +include($$PWD/../../lib_ut.pri) + +SOURCES = \ + layAbstractMenuTests.cc \ + +SOURCES = \ + +!equals(HAVE_QT, "0") { + + SOURCES += \ + layNetlistBrowserModelTests.cc \ + layNetlistBrowserTreeModelTests.cc \ + +} + +INCLUDEPATH += $$LAYUI_INC $$LAYBASIC_INC $$TL_INC $$UI_INC $$DB_INC $$RDB_INC $$GSI_INC $$OUT_PWD/../ui +DEPENDPATH += $$LAYUI_INC $$LAYBASIC_INC $$TL_INC $$UI_INC $$DB_INC $$RDB_INC $$GSI_INC $$OUT_PWD/../ui + +LIBS += -L$$DESTDIR_UT -lklayout_laybasic -lklayout_layui -lklayout_db -lklayout_tl -lklayout_gsi + diff --git a/src/layview/layview.pro b/src/layview/layview.pro new file mode 100644 index 000000000..7a08952e9 --- /dev/null +++ b/src/layview/layview.pro @@ -0,0 +1,6 @@ + +TEMPLATE = subdirs +SUBDIRS = layview unit_tests + +unit_tests.depends += layview + diff --git a/src/layview/layview/gsiDeclLayLayoutView_noqt.cc b/src/layview/layview/gsiDeclLayLayoutView_noqt.cc new file mode 100644 index 000000000..528636548 --- /dev/null +++ b/src/layview/layview/gsiDeclLayLayoutView_noqt.cc @@ -0,0 +1,84 @@ + +/* + + KLayout Layout Viewer + Copyright (C) 2006-2022 Matthias Koefferlein + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +*/ + +#include "gsiDecl.h" +#include "layLayoutView.h" + +namespace gsi +{ + +static lay::LayoutView *new_view2 (bool editable, db::Manager *manager, unsigned int options) +{ + return new lay::LayoutView (manager, editable, 0 /*plugin parent*/, options); +} + +extern Class decl_LayoutViewBase; + +Class decl_LayoutView (decl_LayoutViewBase, "lay", "LayoutView", + gsi::constructor ("new", &new_view2, gsi::arg ("editable", false), gsi::arg ("manager", (db::Manager *) 0, "nil"), gsi::arg ("options", (unsigned int) 0), + "@brief Creates a standalone view\n" + "\n" + "This constructor is for special purposes only. To create a view in the context of a main window, " + "use \\MainWindow#create_view and related methods.\n" + "\n" + "@param editable True to make the view editable\n" + "@param manager The \\Manager object to enable undo/redo\n" + "@param options A combination of the values in the LV_... constants\n" + "\n" + "This constructor has been introduced in version 0.25.\n" + "It has been enhanced with the arguments in version 0.27.\n" + ), + "@brief The view object presenting one or more layout objects\n" + "\n" + "The visual part of the view is the tab panel in the main window. The non-visual part " + "are the redraw thread, the layout handles, cell lists, layer view lists etc. " + "This object controls these aspects of the view and controls the appearance of the data. " +); + +static lay::LayoutView *get_view (lay::CellViewRef *cv) +{ + return cv->view ()->ui (); +} + +static ClassExt extdecl_CellView ( + method_ext ("view", &get_view, + "@brief Gets the view the cellview resides in\n" + "This reference will be nil if the cellview is not a valid one.\n" + "This method has been added in version 0.25.\n" + ) +); + +static lay::LayoutView *get_view_from_lp (lay::LayerPropertiesNode *node) +{ + return node->view ()->ui (); +} + +static ClassExt extdecl_LayerPropertiesNode ( + method_ext ("view", &get_view_from_lp, + "@brief Gets the view this node lives in\n" + "\n" + "This reference can be nil if the node is a orphan node that lives outside a view." + ) +); + +} + diff --git a/src/layview/layview/gsiDeclLayLayoutView_qt.cc b/src/layview/layview/gsiDeclLayLayoutView_qt.cc new file mode 100644 index 000000000..7ea2ef2e2 --- /dev/null +++ b/src/layview/layview/gsiDeclLayLayoutView_qt.cc @@ -0,0 +1,223 @@ + +/* + + KLayout Layout Viewer + Copyright (C) 2006-2022 Matthias Koefferlein + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +*/ + + +#include "gsiDecl.h" +#include "gsiSignals.h" +#include "gsiEnums.h" +#include "rdb.h" +#include "layLayoutView.h" +#include "layLayerProperties.h" +#include "layDitherPattern.h" +#include "layLineStyles.h" +#include "dbSaveLayoutOptions.h" +#include "dbLayoutToNetlist.h" +#include "dbLayoutVsSchematic.h" +#include "tlStream.h" + +namespace gsi +{ + +#if defined(HAVE_QTBINDINGS) +static lay::LayoutView *new_view (QWidget *parent, bool editable, db::Manager *manager, unsigned int options) +{ + lay::LayoutView *lv = new lay::LayoutView (manager, editable, 0 /*plugin parent*/, parent, "view", options); + if (parent) { + // transfer ownership to the parent + lv->keep (); + } + return lv; +} +#endif + +static lay::LayoutView *new_view2 (bool editable, db::Manager *manager, unsigned int options) +{ + return new lay::LayoutView (manager, editable, 0 /*plugin parent*/, 0 /*parent*/, "view", options); +} + +extern Class decl_LayoutViewBase; + +Class decl_LayoutView (decl_LayoutViewBase, "lay", "LayoutView", +#if defined(HAVE_QTBINDINGS) + gsi::constructor ("new", &new_view, gsi::arg ("parent"), gsi::arg ("editable", false), gsi::arg ("manager", (db::Manager *) 0, "nil"), gsi::arg ("options", (unsigned int) 0), + "@brief Creates a standalone view\n" + "\n" + "This constructor is for special purposes only. To create a view in the context of a main window, " + "use \\MainWindow#create_view and related methods.\n" + "\n" + "@param parent The parent widget in which to embed the view\n" + "@param editable True to make the view editable\n" + "@param manager The \\Manager object to enable undo/redo\n" + "@param options A combination of the values in the LV_... constants\n" + "\n" + "This constructor has been introduced in version 0.25.\n" + "It has been enhanced with the arguments in version 0.27.\n" + ) + +#endif + gsi::constructor ("new", &new_view2, gsi::arg ("editable", false), gsi::arg ("manager", (db::Manager *) 0, "nil"), gsi::arg ("options", (unsigned int) 0), + "@brief Creates a standalone view\n" + "\n" + "This constructor is for special purposes only. To create a view in the context of a main window, " + "use \\MainWindow#create_view and related methods.\n" + "\n" + "@param editable True to make the view editable\n" + "@param manager The \\Manager object to enable undo/redo\n" + "@param options A combination of the values in the LV_... constants\n" + "\n" + "This constructor has been introduced in version 0.25.\n" + "It has been enhanced with the arguments in version 0.27.\n" + ) + +#if defined(HAVE_QTBINDINGS) + gsi::method ("layer_control_frame", static_cast (&lay::LayoutView::layer_control_frame), + "@brief Gets the layer control side widget\n" + "A 'side widget' is a widget attached to the view. It does not have a parent, so you can " + "embed it into a different context. Please note that with embedding through 'setParent' it will be " + "destroyed when your parent widget gets destroyed. It will be lost then to the view.\n" + "\n" + "The side widget can be configured through the views configuration interface.\n" + "\n" + "This method has been introduced in version 0.27\n" + ) + + gsi::method ("hierarchy_control_frame", static_cast (&lay::LayoutView::hierarchy_control_frame), + "@brief Gets the cell view (hierarchy view) side widget\n" + "For details about side widgets see \\layer_control_frame.\n" + "\n" + "This method has been introduced in version 0.27\n" + ) + + gsi::method ("libraries_frame", static_cast (&lay::LayoutView::libraries_frame), + "@brief Gets the library view side widget\n" + "For details about side widgets see \\layer_control_frame.\n" + "\n" + "This method has been introduced in version 0.27\n" + ) + + gsi::method ("bookmarks_frame", static_cast (&lay::LayoutView::bookmarks_frame), + "@brief Gets the bookmarks side widget\n" + "For details about side widgets see \\layer_control_frame.\n" + "\n" + "This method has been introduced in version 0.27\n" + ) + +#endif + gsi::method ("current", &lay::LayoutView::current, + "@brief Returns the current view\n" + "The current view is the one that is shown in the current tab. Returns nil if no layout is loaded.\n" + "\n" + "This method has been introduced in version 0.23.\n" + ) + + gsi::method ("bookmark_view", static_cast (&lay::LayoutView::bookmark_view), gsi::arg ("name"), + "@brief Bookmarks the current view under the given name\n" + "\n" + "@param name The name under which to bookmark the current state" + ) + + gsi::event ("on_close", static_cast (&lay::LayoutView::close_event), + "@brief A event indicating that the view is about to close\n" + "\n" + "This event is triggered when the view is going to be closed entirely.\n" + "\n" + "It has been added in version 0.25." + ) + + gsi::event ("on_show", static_cast (&lay::LayoutView::show_event), + "@brief A event indicating that the view is going to become visible\n" + "\n" + "It has been added in version 0.25." + ) + + gsi::event ("on_hide", static_cast (&lay::LayoutView::hide_event), + "@brief A event indicating that the view is going to become invisible\n" + "\n" + "It has been added in version 0.25." + ) + + gsi::method ("show_rdb", static_cast (&lay::LayoutView::open_rdb_browser), gsi::arg ("rdb_index"), gsi::arg ("cv_index"), + "@brief Shows a report database in the marker browser on a certain layout\n" + "The marker browser is opened showing the report database with the index given by \"rdb_index\".\n" + "It will be attached (i.e. navigate to) the layout with the given cellview index in \"cv_index\".\n" + ) + + gsi::method ("show_l2ndb", static_cast (&lay::LayoutView::open_l2ndb_browser), gsi::arg ("l2ndb_index"), gsi::arg ("cv_index"), + "@brief Shows a netlist database in the marker browser on a certain layout\n" + "The netlist browser is opened showing the netlist database with the index given by \"l2ndb_index\".\n" + "It will be attached (i.e. navigate to) the layout with the given cellview index in \"cv_index\".\n" + "\n" + "This method has been added in version 0.26." + ) + + gsi::method ("show_lvsdb", static_cast (&lay::LayoutView::open_l2ndb_browser), gsi::arg ("lvsdb_index"), gsi::arg ("cv_index"), + "@brief Shows a netlist database in the marker browser on a certain layout\n" + "The netlist browser is opened showing the netlist database with the index given by \"lvsdb_index\".\n" + "It will be attached (i.e. navigate to) the layout with the given cellview index in \"cv_index\".\n" + "\n" + "This method has been added in version 0.26." + ), + "@brief The view object presenting one or more layout objects\n" + "\n" + "The visual part of the view is the tab panel in the main window. The non-visual part " + "are the redraw thread, the layout handles, cell lists, layer view lists etc. " + "This object controls these aspects of the view and controls the appearance of the data. " +); + +static lay::CellViewRef get_active_cellview_ref () +{ + lay::LayoutView *view = lay::LayoutView::current (); + if (! view) { + return lay::CellViewRef (); + } + if (view->active_cellview_index () >= 0) { + return view->active_cellview_ref (); + } else { + return lay::CellViewRef (); + } +} + +static lay::LayoutView *get_view (lay::CellViewRef *cv) +{ + return cv->view ()->ui (); +} + +static ClassExt extdecl_CellView ( + method ("active", &get_active_cellview_ref, + "@brief Gets the active CellView\n" + "The active CellView is the one that is selected in the current layout view. This method is " + "equivalent to\n" + "@code\n" + "RBA::LayoutView::current.active_cellview\n" + "@/code\n" + "If no CellView is active, this method returns nil.\n" + "\n" + "This method has been introduced in version 0.23." + ) + + method_ext ("view", &get_view, + "@brief Gets the view the cellview resides in\n" + "This reference will be nil if the cellview is not a valid one.\n" + "This method has been added in version 0.25.\n" + ) +); + +static lay::LayoutView *get_view_from_lp (lay::LayerPropertiesNode *node) +{ + return node->view ()->ui (); +} + +static ClassExt extdecl_LayerPropertiesNode ( + method_ext ("view", &get_view_from_lp, + "@brief Gets the view this node lives in\n" + "\n" + "This reference can be nil if the node is a orphan node that lives outside a view." + ) +); + +} diff --git a/src/layview/layview/layLayoutView.h b/src/layview/layview/layLayoutView.h new file mode 100644 index 000000000..16d5cc9cf --- /dev/null +++ b/src/layview/layview/layLayoutView.h @@ -0,0 +1,33 @@ + +/* + + KLayout Layout Viewer + Copyright (C) 2006-2022 Matthias Koefferlein + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +*/ + + +#ifndef HDR_layLayoutView +#define HDR_layLayoutView + +#if defined(HAVE_QT) +# include "layLayoutView_qt.h" +#else +# include "layLayoutView_noqt.h" +#endif + +#endif diff --git a/src/layview/layview/layLayoutView_noqt.cc b/src/layview/layview/layLayoutView_noqt.cc new file mode 100644 index 000000000..20c612067 --- /dev/null +++ b/src/layview/layview/layLayoutView_noqt.cc @@ -0,0 +1,60 @@ + +/* + + KLayout Layout Viewer + Copyright (C) 2006-2022 Matthias Koefferlein + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +*/ + +#include "layLayoutView.h" + +namespace lay +{ + +LayoutView::LayoutView (db::Manager *mgr, bool editable, lay::Plugin *plugin_parent, unsigned int options) + : LayoutViewBase (this, mgr, editable, plugin_parent, options) +{ + config_setup (); +} + +LayoutView::LayoutView (lay::LayoutView *source, db::Manager *mgr, bool editable, lay::Plugin *plugin_parent, unsigned int options) + : LayoutViewBase (this, source, mgr, editable, plugin_parent, options) +{ + config_setup (); +} + +// NOTE: this methods needs to be called "frequently" +void +LayoutView::timer () +{ + LayoutViewBase::timer (); + + // Without Qt, this is also the opportunity to execute deferred methods + tl::DeferredMethodScheduler::execute (); + + // We also issue the "image_updated" event if the image ("screenshot") has been updated + if (canvas ()->image_updated ()) { + image_updated_event (); + } + + // And also the drawing_finished event + if (canvas ()->drawing_finished ()) { + drawing_finished_event (); + } +} + +} // namespace lay diff --git a/src/layview/layview/layLayoutView_noqt.h b/src/layview/layview/layLayoutView_noqt.h new file mode 100644 index 000000000..9c1d16c52 --- /dev/null +++ b/src/layview/layview/layLayoutView_noqt.h @@ -0,0 +1,80 @@ + +/* + + KLayout Layout Viewer + Copyright (C) 2006-2022 Matthias Koefferlein + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +*/ + + +#ifndef HDR_layLayoutViewNoQt +#define HDR_layLayoutViewNoQt + +#include "layviewCommon.h" +#include "layLayoutViewBase.h" + +namespace lay +{ + +/** + * @brief The layout view object + * + * The layout view is responsible for displaying one or a set of layouts. + * It manages the layer display list and many other components. + */ +class LAYVIEW_PUBLIC LayoutView + : public LayoutViewBase +{ +public: + /** + * @brief Constructor + */ + LayoutView (db::Manager *mgr, bool editable, lay::Plugin *plugin_parent, unsigned int options = (unsigned int) LV_Normal); + + /** + * @brief Constructor (clone from another view) + */ + LayoutView (lay::LayoutView *source, db::Manager *mgr, bool editable, lay::Plugin *plugin_parent, unsigned int options = (unsigned int) LV_Normal); + + /** + * @brief This event is triggered in the "timer" callback when the image ("screenshot") was updated. + */ + tl::Event image_updated_event; + + /** + * @brief This event is triggered in the "timer" callback when the drawing thread has finished. + */ + tl::Event drawing_finished_event; + + /** + * @brief A callback that needs to be called "frequently" + */ + void timer (); + +protected: + /** + * @brief Gets the LayoutView interface + */ + virtual LayoutView *get_ui () { return this; } + +private: + using LayoutViewBase::ui; +}; + +} + +#endif diff --git a/src/laybasic/laybasic/layLayoutView.cc b/src/layview/layview/layLayoutView_qt.cc similarity index 95% rename from src/laybasic/laybasic/layLayoutView.cc rename to src/layview/layview/layLayoutView_qt.cc index 3101d5c65..82fbe3c3e 100644 --- a/src/laybasic/laybasic/layLayoutView.cc +++ b/src/layview/layview/layLayoutView_qt.cc @@ -20,8 +20,6 @@ */ -#if defined(HAVE_QT) - #include #include #include @@ -709,7 +707,7 @@ LayoutView::layer_model_updated () void LayoutView::bookmark_current_view () { - QString proposed_name = tl::to_qstring (m_bookmarks.propose_new_bookmark_name ()); + QString proposed_name = tl::to_qstring (bookmarks ().propose_new_bookmark_name ()); while (true) { bool ok = false; @@ -740,24 +738,14 @@ LayoutView::manage_bookmarks () } } -void -LayoutView::bookmarks (const BookmarkList &b) +void +LayoutView::bookmarks_changed () { - m_bookmarks = b; mp_bookmarks_view->refresh (); emit menu_needs_update (); } void -LayoutView::bookmark_view (const std::string &name) -{ - DisplayState state (box (), get_min_hier_levels (), get_max_hier_levels (), cellview_list ()); - m_bookmarks.add (name, state); - mp_bookmarks_view->refresh (); - emit menu_needs_update (); -} - -void LayoutView::layer_tab_changed () { update_content (); @@ -1129,46 +1117,3 @@ LayoutView::sizeHint () const } } // namespace lay - -#else // defined(HAVE_QT) - -#include "layLayoutView.h" - -namespace lay -{ - -LayoutView::LayoutView (db::Manager *mgr, bool editable, lay::Plugin *plugin_parent, unsigned int options) - : LayoutViewBase (this, mgr, editable, plugin_parent, options) -{ - config_setup (); -} - -LayoutView::LayoutView (lay::LayoutView *source, db::Manager *mgr, bool editable, lay::Plugin *plugin_parent, unsigned int options) - : LayoutViewBase (this, source, mgr, editable, plugin_parent, options) -{ - config_setup (); -} - -// NOTE: this methods needs to be called "frequently" -void -LayoutView::timer () -{ - LayoutViewBase::timer (); - - // Without Qt, this is also the opportunity to execute deferred methods - tl::DeferredMethodScheduler::execute (); - - // We also issue the "image_updated" event if the image ("screenshot") has been updated - if (canvas ()->image_updated ()) { - image_updated_event (); - } - - // And also the drawing_finished event - if (canvas ()->drawing_finished ()) { - drawing_finished_event (); - } -} - -} // namespace lay - -#endif diff --git a/src/laybasic/laybasic/layLayoutView.h b/src/layview/layview/layLayoutView_qt.h similarity index 89% rename from src/laybasic/laybasic/layLayoutView.h rename to src/layview/layview/layLayoutView_qt.h index 0ce115255..6d87a57ad 100644 --- a/src/laybasic/laybasic/layLayoutView.h +++ b/src/layview/layview/layLayoutView_qt.h @@ -21,22 +21,10 @@ */ -#ifndef HDR_layLayoutView -#define HDR_layLayoutView +#ifndef HDR_layLayoutViewQt +#define HDR_layLayoutViewQt -#include "laybasicCommon.h" - -#if defined(HAVE_QT) - -#include -#include -#include -#include -#include -#include - -#include -#include +#include "layviewCommon.h" #include "layLayoutViewBase.h" #include "layLayerProperties.h" @@ -59,6 +47,16 @@ #include "tlEvents.h" #include "dbInstElement.h" +#include +#include +#include +#include +#include +#include + +#include +#include + class QSpinBox; namespace rdb { @@ -95,7 +93,7 @@ class EditorOptionsPages; * It is composed of a canvas and controls to control the appearance. * It manages the layer display list, bookmark list etc. */ -class LAYBASIC_PUBLIC LayoutView +class LAYVIEW_PUBLIC LayoutView : public QFrame, public LayoutViewBase { @@ -143,7 +141,7 @@ public: virtual bool has_selection (); /** - * @brief Display a status message + * @brief Displays a status message */ void message (const std::string &s = "", int timeout = 10); @@ -314,11 +312,6 @@ public: */ virtual void current_pos (double x, double y); - /** - * @brief Bookmark the current view under the given name - */ - void bookmark_view (const std::string &name); - /** * @brief Asks for a bookmark name and bookmark the current view under this name */ @@ -329,28 +322,15 @@ public: */ void manage_bookmarks (); - /** - * @brief Obtain the bookmarks list - */ - const BookmarkList &bookmarks () const - { - return m_bookmarks; - } - - /** - * @brief Set the bookmarks list - */ - void bookmarks (const BookmarkList &b); - /** * @brief Open the RDB browser for a given database and associated cv index */ - void open_rdb_browser (int rdb_index, int cv_index); + virtual void open_rdb_browser (int rdb_index, int cv_index); /** * @brief Open the L2NDB browser for a given database and associated cv index */ - void open_l2ndb_browser (int l2ndb_index, int cv_index); + virtual void open_l2ndb_browser (int l2ndb_index, int cv_index); /** * @brief Gets the editor options pages @@ -368,7 +348,7 @@ public: /** * @brief Gets the layer control panel */ - lay::LayerControlPanel *control_panel () + virtual lay::LayerControlPanel *control_panel () { return mp_control_panel; } @@ -384,7 +364,7 @@ public: /** * @brief Gets the hierarchy panel */ - lay::HierarchyControlPanel *hierarchy_panel () + virtual lay::HierarchyControlPanel *hierarchy_panel () { return mp_hierarchy_panel; } @@ -719,7 +699,6 @@ private: lay::EditorOptionsFrame *mp_editor_options_frame; QSpinBox *mp_min_hier_spbx; QSpinBox *mp_max_hier_spbx; - BookmarkList m_bookmarks; bool m_always_show_source; bool m_always_show_ld; bool m_always_show_layout_index; @@ -752,6 +731,7 @@ protected: virtual bool set_hier_levels_basic (std::pair l); virtual void do_change_active_cellview (); virtual bool is_activated () const; + virtual void bookmarks_changed (); // overrides Editables method to display a message void signal_selection_changed (); @@ -767,60 +747,4 @@ private: } -#else // defined(HAVE_QT) - -#include "layLayoutViewBase.h" - -namespace lay -{ - -/** - * @brief The layout view object - * - * The layout view is responsible for displaying one or a set of layouts. - * It manages the layer display list and many other components. - */ -class LAYBASIC_PUBLIC LayoutView - : public LayoutViewBase -{ -public: - /** - * @brief Constructor - */ - LayoutView (db::Manager *mgr, bool editable, lay::Plugin *plugin_parent, unsigned int options = (unsigned int) LV_Normal); - - /** - * @brief Constructor (clone from another view) - */ - LayoutView (lay::LayoutView *source, db::Manager *mgr, bool editable, lay::Plugin *plugin_parent, unsigned int options = (unsigned int) LV_Normal); - - /** - * @brief This event is triggered in the "timer" callback when the image ("screenshot") was updated. - */ - tl::Event image_updated_event; - - /** - * @brief This event is triggered in the "timer" callback when the drawing thread has finished. - */ - tl::Event drawing_finished_event; - - /** - * @brief A callback that needs to be called "frequently" - */ - void timer (); - -protected: - /** - * @brief Gets the LayoutView interface - */ - virtual LayoutView *get_ui () { return this; } - -private: - using LayoutViewBase::ui; -}; - -} - -#endif - #endif diff --git a/src/layview/layview/layview.pro b/src/layview/layview/layview.pro new file mode 100644 index 000000000..097295239 --- /dev/null +++ b/src/layview/layview/layview.pro @@ -0,0 +1,55 @@ + +DESTDIR = $$OUT_PWD/../.. +TARGET = klayout_ui + +include($$PWD/../../lib.pri) + +DEFINES += MAKE_UI_LIBRARY + +FORMS = \ + +RESOURCES = \ + +SOURCES = \ + +HEADERS = \ + layLayoutView.h + +!equals(HAVE_QT, "0") { + + SOURCES += \ + layLayoutView_qt.cc \ + gsiDeclLayLayoutView_qt.cc \ + + HEADERS += \ + layLayoutView_qt.h \ + +} else { + + SOURCES += \ + layLayoutView_noqt.cc \ + gsiDeclLayLayoutView_noqt.cc \ + + HEADERS += \ + layLayoutView_noqt.h \ + +} + +INCLUDEPATH += $$LAYBASIC_INC $$TL_INC $$GSI_INC $$DB_INC $$RDB_INC +DEPENDPATH += $$LAYBASIC_INC $$TL_INC $$GSI_INC $$DB_INC $$RDB_INC +LIBS += -L$$DESTDIR -lklayout_laybasic -lklayout_tl -lklayout_gsi -lklayout_db -lklayout_rdb + +!equals(HAVE_QT, "0") { + + INCLUDEPATH += $$QTBASIC_INC $$LAYUI_INC + DEPENDPATH += $$QTBASIC_INC $$LAYUI_INC + LIBS += -lklayout_layui + + equals(HAVE_QTBINDINGS, "1") { + LIBS += -lklayout_qtbasic -lklayout_QtGui -lklayout_QtCore + greaterThan(QT_MAJOR_VERSION, 4) { + LIBS += -lklayout_QtWidgets + } + } + +} diff --git a/src/layview/layview/layviewCommon.h b/src/layview/layview/layviewCommon.h new file mode 100644 index 000000000..dced42bd8 --- /dev/null +++ b/src/layview/layview/layviewCommon.h @@ -0,0 +1,51 @@ + +/* + + KLayout Layout Viewer + Copyright (C) 2006-2022 Matthias Koefferlein + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +*/ + + +#if !defined(HDR_layviewCommon_h) +# define HDR_layviewCommon_h + +# if defined _WIN32 || defined __CYGWIN__ + +# ifdef MAKE_LAYVIEW_LIBRARY +# define LAYVIEW_PUBLIC __declspec(dllexport) +# else +# define LAYVIEW_PUBLIC __declspec(dllimport) +# endif +# define LAYVIEW_LOCAL +# define LAYVIEW_PUBLIC_TEMPLATE + +# else + +# if __GNUC__ >= 4 || defined(__clang__) +# define LAYVIEW_PUBLIC __attribute__ ((visibility ("default"))) +# define LAYVIEW_PUBLIC_TEMPLATE __attribute__ ((visibility ("default"))) +# define LAYVIEW_LOCAL __attribute__ ((visibility ("hidden"))) +# else +# define LAYVIEW_PUBLIC +# define LAYVIEW_PUBLIC_TEMPLATE +# define LAYVIEW_LOCAL +# endif + +# endif + +#endif diff --git a/src/laybasic/unit_tests/layLayoutViewTests.cc b/src/layview/unit_tests/layLayoutViewTests.cc similarity index 100% rename from src/laybasic/unit_tests/layLayoutViewTests.cc rename to src/layview/unit_tests/layLayoutViewTests.cc diff --git a/src/layview/unit_tests/unit_tests.pro b/src/layview/unit_tests/unit_tests.pro new file mode 100644 index 000000000..52017fc45 --- /dev/null +++ b/src/layview/unit_tests/unit_tests.pro @@ -0,0 +1,16 @@ + +DESTDIR_UT = $$OUT_PWD/../.. +DESTDIR = $$OUT_PWD/.. + +TARGET = layview_tests + +include($$PWD/../../lib_ut.pri) + +SOURCES = \ + layLayoutViewTests.cc \ + +INCLUDEPATH += $$TL_INC $$LAYBASIC_INC $$LAYVIEW_INC $$LAYUI_INC $$DB_INC $$RDB_INC $$GSI_INC $$OUT_PWD/../layview +DEPENDPATH += $$TL_INC $$LAYBASIC_INC $$LAYVIEW_INC $$LAYUI_INC $$DB_INC $$RDB_INC $$GSI_INC $$OUT_PWD/../layview + +LIBS += -L$$DESTDIR_UT -lklayout_layview -lklayout_db -lklayout_tl -lklayout_gsi + diff --git a/src/plugins/tools/bool/lay_plugin/layBooleanOperationsPlugin.cc b/src/plugins/tools/bool/lay_plugin/layBooleanOperationsPlugin.cc index 668f159e6..7202d66e1 100644 --- a/src/plugins/tools/bool/lay_plugin/layBooleanOperationsPlugin.cc +++ b/src/plugins/tools/bool/lay_plugin/layBooleanOperationsPlugin.cc @@ -494,7 +494,7 @@ public: // .. nothing yet .. } - lay::Plugin *create_plugin (db::Manager *, lay::Dispatcher *root, lay::LayoutView *view) const + lay::Plugin *create_plugin (db::Manager *, lay::Dispatcher *root, lay::LayoutViewBase *view) const { return new BooleanOperationsPlugin (root, view); } diff --git a/src/plugins/tools/diff/lay_plugin/layDiffPlugin.cc b/src/plugins/tools/diff/lay_plugin/layDiffPlugin.cc index 986dbbf04..cde5bed10 100644 --- a/src/plugins/tools/diff/lay_plugin/layDiffPlugin.cc +++ b/src/plugins/tools/diff/lay_plugin/layDiffPlugin.cc @@ -103,7 +103,7 @@ public: // .. nothing yet .. } - lay::Plugin *create_plugin (db::Manager *, lay::Dispatcher *root, lay::LayoutView *view) const + lay::Plugin *create_plugin (db::Manager *, lay::Dispatcher *root, lay::LayoutViewBase *view) const { return new DiffPlugin (root, view); } diff --git a/src/plugins/tools/net_tracer/lay_plugin/layNetTracerPlugin.cc b/src/plugins/tools/net_tracer/lay_plugin/layNetTracerPlugin.cc index 45b5cd290..619d12e53 100644 --- a/src/plugins/tools/net_tracer/lay_plugin/layNetTracerPlugin.cc +++ b/src/plugins/tools/net_tracer/lay_plugin/layNetTracerPlugin.cc @@ -76,7 +76,7 @@ public: menu_entries.push_back (lay::menu_item ("lay::edit_layer_stack", "edit_layer_stack", "tools_menu.end", tl::to_string (QObject::tr ("Edit Layer Stack")))); } - virtual lay::Plugin *create_plugin (db::Manager * /*manager*/, lay::Dispatcher *root, lay::LayoutView *view) const + virtual lay::Plugin *create_plugin (db::Manager * /*manager*/, lay::Dispatcher *root, lay::LayoutViewBase *view) const { return new NetTracerDialog (root, view); } diff --git a/src/plugins/tools/view_25d/lay_plugin/layD25Plugin.cc b/src/plugins/tools/view_25d/lay_plugin/layD25Plugin.cc index c6830127c..4bb1601c8 100644 --- a/src/plugins/tools/view_25d/lay_plugin/layD25Plugin.cc +++ b/src/plugins/tools/view_25d/lay_plugin/layD25Plugin.cc @@ -67,7 +67,7 @@ public: // .. nothing yet .. } - lay::Plugin *create_plugin (db::Manager *, lay::Dispatcher *root, lay::LayoutView *view) const + lay::Plugin *create_plugin (db::Manager *, lay::Dispatcher *root, lay::LayoutViewBase *view) const { return new D25View (root, view); } diff --git a/src/plugins/tools/xor/lay_plugin/layXORPlugin.cc b/src/plugins/tools/xor/lay_plugin/layXORPlugin.cc index 9e0416339..0a3f60b65 100644 --- a/src/plugins/tools/xor/lay_plugin/layXORPlugin.cc +++ b/src/plugins/tools/xor/lay_plugin/layXORPlugin.cc @@ -111,7 +111,7 @@ public: // .. nothing yet .. } - lay::Plugin *create_plugin (db::Manager *, lay::Dispatcher *root, lay::LayoutView *view) const + lay::Plugin *create_plugin (db::Manager *, lay::Dispatcher *root, lay::LayoutViewBase *view) const { return new XORPlugin (root, view); }