diff --git a/src/ant/ant/antPlugin.cc b/src/ant/ant/antPlugin.cc index 10f8643b2..330442a94 100644 --- a/src/ant/ant/antPlugin.cc +++ b/src/ant/ant/antPlugin.cc @@ -91,7 +91,7 @@ PluginDeclaration::get_menu_entries (std::vector &menu_entries) } lay::Plugin * -PluginDeclaration::create_plugin (db::Manager *manager, lay::Dispatcher *, lay::LayoutViewBase *view) const +PluginDeclaration::create_plugin (db::Manager *manager, lay::Dispatcher *, lay::LayoutView *view) const { return new ant::Service (manager, view); } diff --git a/src/ant/ant/antPlugin.h b/src/ant/ant/antPlugin.h index 18950ffac..6d65c03e6 100644 --- a/src/ant/ant/antPlugin.h +++ b/src/ant/ant/antPlugin.h @@ -40,7 +40,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::LayoutViewBase *view) const; + virtual lay::Plugin *create_plugin (db::Manager *manager, lay::Dispatcher *, lay::LayoutView *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/ant/ant/antService.cc b/src/ant/ant/antService.cc index 761b8e059..5c6db1ec2 100644 --- a/src/ant/ant/antService.cc +++ b/src/ant/ant/antService.cc @@ -784,7 +784,7 @@ View::render (const lay::Viewport &vp, lay::ViewObjectCanvas &canvas) // ------------------------------------------------------------- // ant::Service implementation -Service::Service (db::Manager *manager, lay::LayoutViewBase *view) +Service::Service (db::Manager *manager, lay::LayoutView *view) : lay::EditorServiceBase (view), lay::Drawing (1/*number of planes*/, view->drawings ()), db::Object (manager), diff --git a/src/ant/ant/antService.h b/src/ant/ant/antService.h index 9aeee7458..e289800fc 100644 --- a/src/ant/ant/antService.h +++ b/src/ant/ant/antService.h @@ -201,7 +201,7 @@ public: */ enum MoveMode { MoveNone, MoveP1, MoveP2, MoveP12, MoveP21, MoveP1X, MoveP2X, MoveP1Y, MoveP2Y, MoveRuler, MoveSelected }; - Service (db::Manager *manager, lay::LayoutViewBase *view); + Service (db::Manager *manager, lay::LayoutView *view); ~Service (); @@ -427,7 +427,7 @@ public: /** * @brief Access to the view object */ - lay::LayoutViewBase *view () const + lay::LayoutView *view () const { return mp_view; } @@ -510,7 +510,7 @@ private: int m_max_number_of_rulers; // The layout view that the ruler service is attached to - lay::LayoutViewBase *mp_view; + lay::LayoutView *mp_view; // The ruler view objects representing the selection // and the moved rules in move mode diff --git a/src/ant/ant/gsiDeclAnt.cc b/src/ant/ant/gsiDeclAnt.cc index f7391f5cd..a6f28c1a9 100644 --- a/src/ant/ant/gsiDeclAnt.cc +++ b/src/ant/ant/gsiDeclAnt.cc @@ -72,8 +72,8 @@ static int align_up () { return int (ant::Object::AL_up); } static void clear_annotations (lay::LayoutView *view); static void insert_annotation (lay::LayoutView *view, AnnotationRef *obj); -static void erase_annotation_base (lay::LayoutViewBase *view, int id); -static void replace_annotation_base (lay::LayoutViewBase *view, int id, const AnnotationRef &obj); +static void erase_annotation_base (lay::LayoutView *view, int id); +static void replace_annotation_base (lay::LayoutView *view, int id, const AnnotationRef &obj); /** * @brief An extension of the ant::Object that provides "live" updates of the view @@ -88,7 +88,7 @@ public: // .. nothing yet .. } - AnnotationRef (const ant::Object &other, lay::LayoutViewBase *view) + AnnotationRef (const ant::Object &other, lay::LayoutView *view) : ant::Object (other), mp_view (view) { // .. nothing yet .. @@ -140,10 +140,10 @@ public: template AnnotationRef transformed (const T &t) const { - return AnnotationRef (ant::Object::transformed (t), const_cast (mp_view.get ())); + return AnnotationRef (ant::Object::transformed (t), const_cast (mp_view.get ())); } - void set_view (lay::LayoutViewBase *view) + void set_view (lay::LayoutView *view) { mp_view.reset (view); } @@ -157,7 +157,7 @@ protected: } private: - tl::weak_ptr mp_view; + tl::weak_ptr mp_view; }; static void clear_annotations (lay::LayoutView *view) @@ -182,7 +182,7 @@ static void insert_annotation (lay::LayoutView *view, AnnotationRef *obj) } } -static void erase_annotation_base (lay::LayoutViewBase *view, int id) +static void erase_annotation_base (lay::LayoutView *view, int id) { ant::Service *ant_service = view->get_plugin (); if (ant_service) { @@ -200,7 +200,7 @@ static void erase_annotation (lay::LayoutView *view, int id) erase_annotation_base (view, id); } -static void replace_annotation_base (lay::LayoutViewBase *view, int id, const AnnotationRef &obj) +static void replace_annotation_base (lay::LayoutView *view, int id, const AnnotationRef &obj) { ant::Service *ant_service = view->get_plugin (); if (ant_service) { diff --git a/src/edt/edt/edtInstPropertiesPage.cc b/src/edt/edt/edtInstPropertiesPage.cc index 51112874f..cc18336da 100644 --- a/src/edt/edt/edtInstPropertiesPage.cc +++ b/src/edt/edt/edtInstPropertiesPage.cc @@ -207,7 +207,7 @@ void InstPropertiesPage::show_props () { lay::UserPropertiesForm props_form (this); - if (props_form.show (mp_service->view ()->ui (), m_selection_ptrs [m_index]->cv_index (), m_prop_id)) { + if (props_form.show (mp_service->view (), m_selection_ptrs [m_index]->cv_index (), m_prop_id)) { emit edited (); } } @@ -395,7 +395,7 @@ void InstPropertiesPage::show_inst () { InstantiationForm inst_form (this); - inst_form.show (mp_service->view ()->ui (), *m_selection_ptrs [m_index]); + inst_form.show (mp_service->view (), *m_selection_ptrs [m_index]); } bool @@ -912,7 +912,7 @@ InstPropertiesPage::update_pcell_parameters () mp_pcell_parameters = new PCellParametersPage (pcell_tab); connect (mp_pcell_parameters, SIGNAL (edited ()), this, SIGNAL (edited ())); - mp_pcell_parameters->setup (mp_service->view ()->ui (), pos->cv_index (), layout->pcell_declaration (pc.second), parameters); + mp_pcell_parameters->setup (mp_service->view (), pos->cv_index (), layout->pcell_declaration (pc.second), parameters); pcell_tab->layout ()->addWidget (mp_pcell_parameters); } diff --git a/src/edt/edt/edtMainService.cc b/src/edt/edt/edtMainService.cc index 8f1500a3f..efd898f53 100644 --- a/src/edt/edt/edtMainService.cc +++ b/src/edt/edt/edtMainService.cc @@ -55,7 +55,7 @@ namespace edt // ----------------------------------------------------------------------------- // Main Service implementation -MainService::MainService (db::Manager *manager, lay::LayoutViewBase *view, lay::Dispatcher *root) +MainService::MainService (db::Manager *manager, lay::LayoutView *view, lay::Dispatcher *root) : lay::Plugin (view), lay::Editable (view), db::Object (manager), @@ -1751,7 +1751,7 @@ db::DVector compute_alignment_vector (const db::DBox &prim_box, const db::DBox & } static db::DBox -inst_bbox (const db::CplxTrans &tr, lay::LayoutViewBase *view, int cv_index, const db::InstElement &inst_element, bool visible_only) +inst_bbox (const db::CplxTrans &tr, lay::LayoutView *view, int cv_index, const db::InstElement &inst_element, bool visible_only) { db::DBox box; @@ -2296,7 +2296,7 @@ class NewObjectsSelection : public db::ClipboardDataInsertReceiver { public: - NewObjectsSelection (int cv_index, db::cell_index_type topcell, lay::LayoutViewBase *view) + NewObjectsSelection (int cv_index, db::cell_index_type topcell, lay::LayoutView *view) : m_cv_index (cv_index), m_topcell (topcell) { mp_polygon_service = view->get_plugin (); diff --git a/src/edt/edt/edtMainService.h b/src/edt/edt/edtMainService.h index 3ca99c373..60c8c4a8f 100644 --- a/src/edt/edt/edtMainService.h +++ b/src/edt/edt/edtMainService.h @@ -64,7 +64,7 @@ public: /** * @brief The constructor */ - MainService (db::Manager *manager, lay::LayoutViewBase *view, lay::Dispatcher *root); + MainService (db::Manager *manager, lay::LayoutView *view, lay::Dispatcher *root); /** * @brief The destructor @@ -74,7 +74,7 @@ public: /** * @brief Access to the view object */ - lay::LayoutViewBase *view () const + lay::LayoutView *view () const { return mp_view; } @@ -196,7 +196,7 @@ public: private: // The layout view that this service is attached to - lay::LayoutViewBase *mp_view; + lay::LayoutView *mp_view; lay::Dispatcher *mp_root; bool m_needs_update; diff --git a/src/edt/edt/edtPartialService.cc b/src/edt/edt/edtPartialService.cc index f43270b35..a22882651 100644 --- a/src/edt/edt/edtPartialService.cc +++ b/src/edt/edt/edtPartialService.cc @@ -1010,7 +1010,7 @@ PartialShapeFinder::visit_cell (const db::Cell &cell, const db::Box &search_box, // ----------------------------------------------------------------------------- // Main Service implementation -PartialService::PartialService (db::Manager *manager, lay::LayoutViewBase *view, lay::Dispatcher *root) +PartialService::PartialService (db::Manager *manager, lay::LayoutView *view, lay::Dispatcher *root) : QObject (), lay::EditorServiceBase (view), db::Object (manager), diff --git a/src/edt/edt/edtPartialService.h b/src/edt/edt/edtPartialService.h index 4c7018334..0781dcf81 100644 --- a/src/edt/edt/edtPartialService.h +++ b/src/edt/edt/edtPartialService.h @@ -149,7 +149,7 @@ public: /** * @brief The constructor */ - PartialService (db::Manager *manager, lay::LayoutViewBase *view, lay::Dispatcher *root); + PartialService (db::Manager *manager, lay::LayoutView *view, lay::Dispatcher *root); /** * @brief The destructor @@ -159,7 +159,7 @@ public: /** * @brief Access to the view object */ - lay::LayoutViewBase *view () const + lay::LayoutView *view () const { tl_assert (mp_view != 0); return mp_view; @@ -298,7 +298,7 @@ protected: private: // The layout view that this service is attached to - lay::LayoutViewBase *mp_view; + lay::LayoutView *mp_view; lay::Dispatcher *mp_root; bool m_dragging; bool m_keep_selection; diff --git a/src/edt/edt/edtPlugin.cc b/src/edt/edt/edtPlugin.cc index a3cb410dc..1169490ca 100644 --- a/src/edt/edt/edtPlugin.cc +++ b/src/edt/edt/edtPlugin.cc @@ -179,18 +179,18 @@ public: // .. nothing yet .. } - virtual void get_editor_options_pages (std::vector &pages, lay::LayoutViewBase *view, lay::Dispatcher *root) const + virtual void get_editor_options_pages (std::vector &pages, lay::LayoutView *view, lay::Dispatcher *root) const { if (mp_pages_f != 0) { size_t nstart = pages.size (); - (*mp_pages_f) (pages, view->ui (), root); + (*mp_pages_f) (pages, view, root); while (nstart < pages.size ()) { pages [nstart++]->set_plugin_declaration (this); } } } - virtual lay::Plugin *create_plugin (db::Manager *manager, lay::Dispatcher *, lay::LayoutViewBase *view) const + virtual lay::Plugin *create_plugin (db::Manager *manager, lay::Dispatcher *, lay::LayoutView *view) const { Svc *service = new Svc (manager, view); service->set_plugin_declaration (this); @@ -312,7 +312,7 @@ public: return false; } - virtual lay::Plugin *create_plugin (db::Manager *manager, lay::Dispatcher *root, lay::LayoutViewBase *view) const + virtual lay::Plugin *create_plugin (db::Manager *manager, lay::Dispatcher *root, lay::LayoutView *view) const { return new edt::MainService (manager, view, root); } @@ -327,10 +327,10 @@ public: return false; } - virtual void get_editor_options_pages (std::vector &pages, lay::LayoutViewBase *view, lay::Dispatcher *dispatcher) const + virtual void get_editor_options_pages (std::vector &pages, lay::LayoutView *view, lay::Dispatcher *dispatcher) const { // NOTE: we do not set plugin_declaration which makes the page unspecific - EditorOptionsGeneric *generic_opt = new EditorOptionsGeneric (view->ui (), dispatcher); + EditorOptionsGeneric *generic_opt = new EditorOptionsGeneric (view, dispatcher); pages.push_back (generic_opt); } @@ -413,9 +413,9 @@ private: static tl::RegisteredClass config_decl_main (new edt::MainPluginDeclaration (tl::to_string (QObject::tr ("Instances and shapes"))), 4000, "edt::MainService"); void -commit_recent (lay::LayoutViewBase *view) +commit_recent (lay::LayoutView *view) { - lay::EditorOptionsPages *eo_pages = view->ui ()->editor_options_pages (); + lay::EditorOptionsPages *eo_pages = view->editor_options_pages (); if (!eo_pages) { return; } @@ -442,12 +442,12 @@ public: // .. nothing yet .. } - virtual void get_editor_options_pages (std::vector & /*pages*/, lay::LayoutViewBase * /*view*/, lay::Dispatcher * /*root*/) const + virtual void get_editor_options_pages (std::vector & /*pages*/, lay::LayoutView * /*view*/, lay::Dispatcher * /*root*/) const { // .. no specific ones .. } - virtual lay::Plugin *create_plugin (db::Manager *manager, lay::Dispatcher *root, lay::LayoutViewBase *view) const + virtual lay::Plugin *create_plugin (db::Manager *manager, lay::Dispatcher *root, lay::LayoutView *view) const { return new edt::PartialService (manager, view, root); } diff --git a/src/edt/edt/edtPlugin.h b/src/edt/edt/edtPlugin.h index 1baee02fa..d70ade213 100644 --- a/src/edt/edt/edtPlugin.h +++ b/src/edt/edt/edtPlugin.h @@ -49,7 +49,7 @@ namespace edt /** * @brief Commits the current configuration for the recently used configuration list */ - void commit_recent (lay::LayoutViewBase *view); + void commit_recent (lay::LayoutView *view); } #endif diff --git a/src/edt/edt/edtPropertiesPages.cc b/src/edt/edt/edtPropertiesPages.cc index 6f2232da4..5943d609a 100644 --- a/src/edt/edt/edtPropertiesPages.cc +++ b/src/edt/edt/edtPropertiesPages.cc @@ -361,14 +361,14 @@ void ShapePropertiesPage::show_inst () { InstantiationForm inst_form (this); - inst_form.show (mp_service->view ()->ui (), *m_selection_ptrs [m_index]); + inst_form.show (mp_service->view (), *m_selection_ptrs [m_index]); } void ShapePropertiesPage::show_props () { lay::UserPropertiesForm props_form (this); - if (props_form.show (mp_service->view ()->ui (), m_selection_ptrs [m_index]->cv_index (), m_prop_id)) { + if (props_form.show (mp_service->view (), m_selection_ptrs [m_index]->cv_index (), m_prop_id)) { emit edited (); } } diff --git a/src/edt/edt/edtService.cc b/src/edt/edt/edtService.cc index 1f750dad2..de51c832f 100644 --- a/src/edt/edt/edtService.cc +++ b/src/edt/edt/edtService.cc @@ -60,7 +60,7 @@ ac_from_buttons (unsigned int buttons) // ------------------------------------------------------------- -Service::Service (db::Manager *manager, lay::LayoutViewBase *view, db::ShapeIterator::flags_type flags) +Service::Service (db::Manager *manager, lay::LayoutView *view, db::ShapeIterator::flags_type flags) : lay::EditorServiceBase (view), db::Object (manager), mp_view (view), @@ -80,7 +80,7 @@ Service::Service (db::Manager *manager, lay::LayoutViewBase *view, db::ShapeIter // .. nothing yet .. } -Service::Service (db::Manager *manager, lay::LayoutViewBase *view) +Service::Service (db::Manager *manager, lay::LayoutView *view) : lay::EditorServiceBase (view), db::Object (manager), mp_view (view), diff --git a/src/edt/edt/edtService.h b/src/edt/edt/edtService.h index ea420c4cb..2dc67d46a 100644 --- a/src/edt/edt/edtService.h +++ b/src/edt/edt/edtService.h @@ -82,12 +82,12 @@ public: /** * @brief The constructor for an service selecting shapes */ - Service (db::Manager *manager, lay::LayoutViewBase *view, db::ShapeIterator::flags_type shape_types); + Service (db::Manager *manager, lay::LayoutView *view, db::ShapeIterator::flags_type shape_types); /** * @brief The constructor for an service selecting instances */ - Service (db::Manager *manager, lay::LayoutViewBase *view); + Service (db::Manager *manager, lay::LayoutView *view); /** * @brief The destructor @@ -243,7 +243,7 @@ public: /** * @brief Access to the view object */ - lay::LayoutViewBase *view () const + lay::LayoutView *view () const { tl_assert (mp_view != 0); return mp_view; @@ -559,7 +559,7 @@ protected: private: // The layout view that the editor service is attached to - lay::LayoutViewBase *mp_view; + lay::LayoutView *mp_view; // The marker objects representing the selection std::vector m_markers; diff --git a/src/edt/edt/edtServiceImpl.cc b/src/edt/edt/edtServiceImpl.cc index d4aa7413d..b22360339 100644 --- a/src/edt/edt/edtServiceImpl.cc +++ b/src/edt/edt/edtServiceImpl.cc @@ -47,7 +47,7 @@ namespace edt // ----------------------------------------------------------------------------- // ShapeEditService implementation -ShapeEditService::ShapeEditService (db::Manager *manager, lay::LayoutViewBase *view, db::ShapeIterator::flags_type shape_types) +ShapeEditService::ShapeEditService (db::Manager *manager, lay::LayoutView *view, db::ShapeIterator::flags_type shape_types) : edt::Service (manager, view, shape_types), m_layer (0), m_cv_index (0), mp_cell (0), mp_layout (0), m_combine_mode (CM_Add) { @@ -362,7 +362,7 @@ ShapeEditService::deliver_shape (const db::Box &box) // ----------------------------------------------------------------------------- // PolygonService implementation -PolygonService::PolygonService (db::Manager *manager, lay::LayoutViewBase *view) +PolygonService::PolygonService (db::Manager *manager, lay::LayoutView *view) : ShapeEditService (manager, view, db::ShapeIterator::Polygons), m_closure_set (false), m_closure () { @@ -692,7 +692,7 @@ PolygonService::update_marker () // ----------------------------------------------------------------------------- // BoxService implementation -BoxService::BoxService (db::Manager *manager, lay::LayoutViewBase *view) +BoxService::BoxService (db::Manager *manager, lay::LayoutView *view) : ShapeEditService (manager, view, db::ShapeIterator::Boxes) { // .. nothing yet .. @@ -784,7 +784,7 @@ BoxService::selection_applies (const lay::ObjectInstPath &sel) const // ----------------------------------------------------------------------------- // TextService implementation -TextService::TextService (db::Manager *manager, lay::LayoutViewBase *view) +TextService::TextService (db::Manager *manager, lay::LayoutView *view) : ShapeEditService (manager, view, db::ShapeIterator::Texts), m_rot (0) { @@ -972,7 +972,7 @@ TextService::configure (const std::string &name, const std::string &value) // ----------------------------------------------------------------------------- // PathService implementation -PathService::PathService (db::Manager *manager, lay::LayoutViewBase *view) +PathService::PathService (db::Manager *manager, lay::LayoutView *view) : ShapeEditService (manager, view, db::ShapeIterator::Paths), m_width (0.1), m_bgnext (0.0), m_endext (0.0), m_type (Flush), m_needs_update (true) { @@ -1211,7 +1211,7 @@ PathService::config_finalize () // ----------------------------------------------------------------------------- // InstService implementation -InstService::InstService (db::Manager *manager, lay::LayoutViewBase *view) +InstService::InstService (db::Manager *manager, lay::LayoutView *view) : edt::Service (manager, view), m_angle (0.0), m_scale (1.0), m_mirror (false), m_is_pcell (false), diff --git a/src/edt/edt/edtServiceImpl.h b/src/edt/edt/edtServiceImpl.h index 145a8d2ff..c3caf4383 100644 --- a/src/edt/edt/edtServiceImpl.h +++ b/src/edt/edt/edtServiceImpl.h @@ -45,7 +45,7 @@ class ShapeEditService : public edt::Service { public: - ShapeEditService (db::Manager *manager, lay::LayoutViewBase *view, db::ShapeIterator::flags_type shape_types); + ShapeEditService (db::Manager *manager, lay::LayoutView *view, db::ShapeIterator::flags_type shape_types); protected: void get_edit_layer (); @@ -86,7 +86,7 @@ class PolygonService : public ShapeEditService { public: - PolygonService (db::Manager *manager, lay::LayoutViewBase *view); + PolygonService (db::Manager *manager, lay::LayoutView *view); virtual lay::PropertiesPage *properties_page (db::Manager *manager, QWidget *parent); virtual void do_delete (); @@ -117,7 +117,7 @@ class BoxService : public ShapeEditService { public: - BoxService (db::Manager *manager, lay::LayoutViewBase *view); + BoxService (db::Manager *manager, lay::LayoutView *view); virtual lay::PropertiesPage *properties_page (db::Manager *manager, QWidget *parent); virtual void do_begin_edit (const db::DPoint &p); @@ -142,7 +142,7 @@ class TextService : public ShapeEditService { public: - TextService (db::Manager *manager, lay::LayoutViewBase *view); + TextService (db::Manager *manager, lay::LayoutView *view); ~TextService (); virtual lay::PropertiesPage *properties_page (db::Manager *manager, QWidget *parent); @@ -174,7 +174,7 @@ class PathService : public ShapeEditService { public: - PathService (db::Manager *manager, lay::LayoutViewBase *view); + PathService (db::Manager *manager, lay::LayoutView *view); ~PathService (); virtual lay::PropertiesPage *properties_page (db::Manager *manager, QWidget *parent); @@ -211,7 +211,7 @@ class InstService : public edt::Service { public: - InstService (db::Manager *manager, lay::LayoutViewBase *view); + InstService (db::Manager *manager, lay::LayoutView *view); virtual lay::PropertiesPage *properties_page (db::Manager *manager, QWidget *parent); virtual void do_begin_edit (const db::DPoint &p); diff --git a/src/edt/edt/edtUtils.cc b/src/edt/edt/edtUtils.cc index 08ca08827..4b04d9de8 100644 --- a/src/edt/edt/edtUtils.cc +++ b/src/edt/edt/edtUtils.cc @@ -77,7 +77,7 @@ std::map pcell_parameters_from_string (const std::stri // ------------------------------------------------------------- // SelectionIterator implementation -SelectionIterator::SelectionIterator (lay::LayoutViewBase *view, bool including_transient) +SelectionIterator::SelectionIterator (lay::LayoutView *view, bool including_transient) : m_transient_mode (false) { mp_edt_services = view->get_plugins (); @@ -145,7 +145,7 @@ SelectionIterator::next () // TransformationsVariants implementation // for a lay::LayoutView -TransformationVariants::TransformationVariants (const lay::LayoutViewBase *view, bool per_cv_and_layer, bool per_cv) +TransformationVariants::TransformationVariants (const lay::LayoutView *view, bool per_cv_and_layer, bool per_cv) { // build the transformation variants cache diff --git a/src/edt/edt/edtUtils.h b/src/edt/edt/edtUtils.h index 703dcfbf7..af9a81999 100644 --- a/src/edt/edt/edtUtils.h +++ b/src/edt/edt/edtUtils.h @@ -40,7 +40,7 @@ namespace lay { - class LayoutViewBase; + class LayoutView; } namespace edt { @@ -84,7 +84,7 @@ public: class TransformationVariants { public: - TransformationVariants (const lay::LayoutViewBase *view, bool per_cv_and_layer = true, bool per_cv = true); + TransformationVariants (const lay::LayoutView *view, bool per_cv_and_layer = true, bool per_cv = true); const std::vector *per_cv_and_layer (unsigned int cv, unsigned int layer) const; const std::vector *per_cv (unsigned int cv) const; @@ -109,7 +109,7 @@ public: * * If "including_transient" is true, the transient selection will be used as fallback. */ - SelectionIterator (lay::LayoutViewBase *view, bool including_transient = true); + SelectionIterator (lay::LayoutView *view, bool including_transient = true); /** * @brief Returns a value indicating whether the transient selection is taken diff --git a/src/img/img/gsiDeclImg.cc b/src/img/img/gsiDeclImg.cc index bc40cc8c1..0033c38ec 100644 --- a/src/img/img/gsiDeclImg.cc +++ b/src/img/img/gsiDeclImg.cc @@ -299,8 +299,8 @@ gsi::Class decl_ImageDataMapping ("lay", "ImageDataMapping", class ImageRef; -static void replace_image_base (lay::LayoutViewBase *view, size_t id, ImageRef &new_obj); -static void erase_image_base (lay::LayoutViewBase *view, size_t id); +static void replace_image_base (lay::LayoutView *view, size_t id, ImageRef &new_obj); +static void erase_image_base (lay::LayoutView *view, size_t id); /** * @brief An extension of the img::Object that provides "live" updates of the view @@ -321,7 +321,7 @@ public: // .. nothing yet .. } - ImageRef (const img::Object &other, lay::LayoutViewBase *view) + ImageRef (const img::Object &other, lay::LayoutView *view) : img::Object (other), mp_view (view), dm_update_view (this, &ImageRef::do_update_view) { // .. nothing yet .. @@ -373,7 +373,7 @@ public: template ImageRef transformed (const T &t) const { - return ImageRef (img::Object::transformed (t), const_cast (mp_view.get ())); + return ImageRef (img::Object::transformed (t), const_cast (mp_view.get ())); } void set_view (lay::LayoutView *view) @@ -403,7 +403,7 @@ protected: } private: - tl::weak_ptr mp_view; + tl::weak_ptr mp_view; tl::DeferredMethod dm_update_view; }; @@ -1114,7 +1114,7 @@ static void show_image (lay::LayoutView *view, size_t id, bool visible) } } -void replace_image_base (lay::LayoutViewBase *view, size_t id, ImageRef &new_obj) +void replace_image_base (lay::LayoutView *view, size_t id, ImageRef &new_obj) { img::Service *img_service = view->get_plugin (); if (img_service) { @@ -1134,7 +1134,7 @@ static void replace_image (lay::LayoutView *view, size_t id, ImageRef &new_obj) replace_image_base (view, id, new_obj); } -void erase_image_base (lay::LayoutViewBase *view, size_t id) +void erase_image_base (lay::LayoutView *view, size_t id) { img::Service *img_service = view->get_plugin (); if (img_service) { diff --git a/src/img/img/imgPlugin.cc b/src/img/img/imgPlugin.cc index 33b15b146..74d710786 100644 --- a/src/img/img/imgPlugin.cc +++ b/src/img/img/imgPlugin.cc @@ -45,7 +45,7 @@ PluginDeclaration::get_menu_entries (std::vector &menu_entries) } lay::Plugin * -PluginDeclaration::create_plugin (db::Manager *manager, lay::Dispatcher *, lay::LayoutViewBase *view) const +PluginDeclaration::create_plugin (db::Manager *manager, lay::Dispatcher *, lay::LayoutView *view) const { return new img::Service (manager, view); } diff --git a/src/img/img/imgPlugin.h b/src/img/img/imgPlugin.h index 1575ceccb..4dc9fa0bd 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::LayoutViewBase *view) const; + virtual lay::Plugin *create_plugin (db::Manager *manager, lay::Dispatcher *, lay::LayoutView *view) const; virtual bool implements_editable (std::string &title) const; virtual void get_options (std::vector < std::pair > &options) const; }; diff --git a/src/img/img/imgService.cc b/src/img/img/imgService.cc index 86c7cef71..627c03967 100644 --- a/src/img/img/imgService.cc +++ b/src/img/img/imgService.cc @@ -402,7 +402,7 @@ View::render (const lay::Viewport &vp, lay::ViewObjectCanvas &canvas) // ------------------------------------------------------------- // img::Service implementation -Service::Service (db::Manager *manager, lay::LayoutViewBase *view) +Service::Service (db::Manager *manager, lay::LayoutView *view) : lay::BackgroundViewObject (view->view_object_widget ()), lay::Editable (view), lay::Plugin (view), diff --git a/src/img/img/imgService.h b/src/img/img/imgService.h index 167177727..65e7bfa70 100644 --- a/src/img/img/imgService.h +++ b/src/img/img/imgService.h @@ -203,7 +203,7 @@ public: typedef lay::AnnotationShapes::iterator obj_iterator; enum MoveMode { move_none, move_selected, move_landmark, move_l, move_r, move_t, move_b, move_lr, move_tr, move_ll, move_tl, move_all }; - Service (db::Manager *manager, lay::LayoutViewBase *view); + Service (db::Manager *manager, lay::LayoutView *view); ~Service (); @@ -432,7 +432,7 @@ public: /** * @brief Access to the view object */ - lay::LayoutViewBase *view () const + lay::LayoutView *view () const { return mp_view; } @@ -480,7 +480,7 @@ public: private: // The layout view that the image service is attached to - lay::LayoutViewBase *mp_view; + lay::LayoutView *mp_view; // The view objects representing the selection and the moved images in move mode std::vector m_selected_image_views; diff --git a/src/lay/lay/layClipDialog.cc b/src/lay/lay/layClipDialog.cc index 2c28187e0..36679c03e 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::LayoutViewBase *view) const + virtual lay::Plugin *create_plugin (db::Manager *, lay::Dispatcher *root, lay::LayoutView *view) const { return new ClipDialog (root, view); } @@ -66,7 +66,7 @@ static tl::RegisteredClass config_decl (new ClipDialogPl // ------------------------------------------------------------ -ClipDialog::ClipDialog (lay::Dispatcher *root, LayoutViewBase *vw) +ClipDialog::ClipDialog (lay::Dispatcher *root, LayoutView *vw) : lay::Browser (root, vw), Ui::ClipDialog () { diff --git a/src/lay/lay/layClipDialog.h b/src/lay/lay/layClipDialog.h index e84ad2435..bab730bf9 100644 --- a/src/lay/lay/layClipDialog.h +++ b/src/lay/lay/layClipDialog.h @@ -40,7 +40,7 @@ class ClipDialog Q_OBJECT public: - ClipDialog (lay::Dispatcher *root, lay::LayoutViewBase *view); + ClipDialog (lay::Dispatcher *root, lay::LayoutView *view); ~ClipDialog (); public slots: diff --git a/src/lay/lay/layFillDialog.cc b/src/lay/lay/layFillDialog.cc index 458c90afa..63df40cdd 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::LayoutViewBase *view) const + virtual lay::Plugin *create_plugin (db::Manager *, lay::Dispatcher *root, lay::LayoutView *view) const { return new FillDialog (root, view); } @@ -73,7 +73,7 @@ static tl::RegisteredClass config_decl (new FillDialogPl // ------------------------------------------------------------ -FillDialog::FillDialog (lay::Dispatcher *main, LayoutViewBase *view) +FillDialog::FillDialog (lay::Dispatcher *main, LayoutView *view) : QDialog (view->widget ()), lay::Plugin (main), Ui::FillDialog (), diff --git a/src/lay/lay/layFillDialog.h b/src/lay/lay/layFillDialog.h index faa06851a..52deb5826 100644 --- a/src/lay/lay/layFillDialog.h +++ b/src/lay/lay/layFillDialog.h @@ -76,7 +76,7 @@ class LAY_PUBLIC FillDialog Q_OBJECT public: - FillDialog (lay::Dispatcher *root, lay::LayoutViewBase *view); + FillDialog (lay::Dispatcher *root, lay::LayoutView *view); ~FillDialog (); public slots: @@ -95,7 +95,7 @@ private: void generate_fill (const FillParameters &fp); FillParameters get_fill_parameters (); - lay::LayoutViewBase *mp_view; + lay::LayoutView *mp_view; }; } diff --git a/src/lay/lay/laySearchReplacePlugin.cc b/src/lay/lay/laySearchReplacePlugin.cc index 94d53e141..bc603736d 100644 --- a/src/lay/lay/laySearchReplacePlugin.cc +++ b/src/lay/lay/laySearchReplacePlugin.cc @@ -63,9 +63,9 @@ 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::LayoutViewBase *view) const + virtual lay::Plugin *create_plugin (db::Manager *, lay::Dispatcher *root, lay::LayoutView *view) const { - return new SearchReplaceDialog (root, view->ui ()); + return new SearchReplaceDialog (root, view); } }; diff --git a/src/laybasic/laybasic/gsiDeclLayLayers.cc b/src/laybasic/laybasic/gsiDeclLayLayers.cc index df088a76a..76955760f 100644 --- a/src/laybasic/laybasic/gsiDeclLayLayers.cc +++ b/src/laybasic/laybasic/gsiDeclLayLayers.cc @@ -1165,6 +1165,11 @@ static void clear_children (lay::LayerPropertiesNode *node) node->clear_children (); } +static lay::LayoutView *get_view (lay::LayerPropertiesNode *node) +{ + return node->view ()->ui (); +} + Class decl_LayerPropertiesNode ( decl_LayerProperties, "lay", "LayerPropertiesNode", @@ -1222,7 +1227,7 @@ Class decl_LayerPropertiesNode ( "\n" "@return A bbox in micron units\n" ) + - method ("view", &lay::LayerPropertiesNode::view, + 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." diff --git a/src/laybasic/laybasic/gsiDeclLayLayoutView.cc b/src/laybasic/laybasic/gsiDeclLayLayoutView.cc index 1cf36d029..ed41338b1 100644 --- a/src/laybasic/laybasic/gsiDeclLayLayoutView.cc +++ b/src/laybasic/laybasic/gsiDeclLayLayoutView.cc @@ -336,7 +336,9 @@ static QImage get_image_with_options (lay::LayoutView *view, unsigned int width, 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) { +#if defined(HAVE_QT) // @@@ view->save_image_with_options (fn, width, height, linewidth, oversampling, resolution, lay::Color (), lay::Color (), lay::Color (), target_box, monochrome); +#endif } static std::vector @@ -417,11 +419,19 @@ static lay::LayoutView *new_view (QWidget *parent, bool editable, db::Manager *m 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); +#else + return new lay::LayoutView (manager, editable, 0 /*plugin parent*/, options); +#endif } +#if defined(HAVE_QT) Class decl_LayoutView (QT_EXTERNAL_BASE (QWidget) "lay", "LayoutView", -#if defined(HAVE_QTBINDINGS) +#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" @@ -574,12 +584,14 @@ Class decl_LayoutView (QT_EXTERNAL_BASE (QWidget) "lay", "Layou "\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", &lay::LayoutView::stop_redraw, "@brief Stops the redraw thread\n" "\n" @@ -953,11 +965,13 @@ 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", &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", &lay::LayoutView::add_missing_layers, "@brief Adds new layers to layer list\n" "This method was introduced in version 0.19.\n" @@ -1149,7 +1163,6 @@ Class decl_LayoutView (QT_EXTERNAL_BASE (QWidget) "lay", "Layou "\n" "This method has been introduced in 0.23.10.\n" ) + -#endif gsi::method ("save_screenshot", &lay::LayoutView::save_screenshot, gsi::arg ("filename"), "@brief Saves a screenshot to the given file\n" "\n" @@ -1171,6 +1184,7 @@ Class decl_LayoutView (QT_EXTERNAL_BASE (QWidget) "lay", "Layou "The image is written as a PNG file to the given file. " "The image is drawn synchronously with the given width and height. Drawing may take some time. " ) + +#endif gsi::method_ext ("save_image_with_options", &save_image_with_options, gsi::arg ("filename"), gsi::arg ("width"), gsi::arg ("height"), gsi::arg ("linewidth"), gsi::arg ("oversampling"), gsi::arg ("resolution"), gsi::arg ("target"), gsi::arg ("monochrome"), "@brief Saves the layout as an image to the given file (with options)\n" "\n" @@ -1556,6 +1570,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", &lay::LayoutView::close_event, "@brief A event indicating that the view is about to close\n" "\n" @@ -1573,6 +1588,7 @@ Class decl_LayoutView (QT_EXTERNAL_BASE (QWidget) "lay", "Layou "\n" "It has been added in version 0.25." ) + +#endif gsi::event ("on_viewport_changed", &lay::LayoutView::viewport_changed_event, "@brief An event indicating that the viewport (the visible rectangle) has changed\n" "\n" @@ -1690,11 +1706,13 @@ 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", &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", &lay::LayoutView::l2ndb_list_changed_event, "@brief An event that is triggered the list of netlist databases is changed\n" "\n" @@ -1749,6 +1767,7 @@ 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", &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" @@ -1756,6 +1775,7 @@ Class decl_LayoutView (QT_EXTERNAL_BASE (QWidget) "lay", "Layou "\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" @@ -1791,6 +1811,7 @@ 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", &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" @@ -1798,6 +1819,7 @@ Class decl_LayoutView (QT_EXTERNAL_BASE (QWidget) "lay", "Layou "\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. @@ -1985,11 +2007,12 @@ static std::string get_technology (const lay::CellViewRef *cv) static tl::Event &get_technology_changed_event (lay::CellViewRef *cv) { if (! cv->is_valid ()) { - throw tl::Exception (tl::to_string (QObject::tr ("Not a valid cellview"))); + throw tl::Exception (tl::to_string (tr ("Not a valid cellview"))); } return (*cv)->technology_changed_event; } +#if defined(HAVE_QT) static lay::CellViewRef get_active_cellview_ref () { lay::LayoutView *view = lay::LayoutView::current (); @@ -2002,6 +2025,7 @@ static lay::CellViewRef get_active_cellview_ref () return lay::CellViewRef (); } } +#endif static void set_cell (lay::CellViewRef *cv, db::Cell *cell) { @@ -2046,7 +2070,7 @@ static bool cv_is_cell_hidden (lay::CellViewRef *cv, const db::Cell *cell) { if (cv->is_valid () && cell) { if (cell->layout () != &(*cv)->layout ()) { - throw tl::Exception (tl::to_string (QObject::tr ("The cell is not a cell of the view's layout"))); + throw tl::Exception (tl::to_string (tr ("The cell is not a cell of the view's layout"))); } return cv->view ()->is_cell_hidden (cell->cell_index (), cv->index ()); } else { @@ -2058,7 +2082,7 @@ static void cv_hide_cell (lay::CellViewRef *cv, const db::Cell *cell) { if (cv->is_valid () && cell) { if (cell->layout () != &(*cv)->layout ()) { - throw tl::Exception (tl::to_string (QObject::tr ("The cell is not a cell of the view's layout"))); + throw tl::Exception (tl::to_string (tr ("The cell is not a cell of the view's layout"))); } cv->view ()->hide_cell (cell->cell_index (), cv->index ()); } @@ -2068,7 +2092,7 @@ static void cv_show_cell (lay::CellViewRef *cv, const db::Cell *cell) { if (cv->is_valid () && cell) { if (cell->layout () != &(*cv)->layout ()) { - throw tl::Exception (tl::to_string (QObject::tr ("The cell is not a cell of the view's layout"))); + throw tl::Exception (tl::to_string (tr ("The cell is not a cell of the view's layout"))); } cv->view ()->show_cell (cell->cell_index (), cv->index ()); } @@ -2081,6 +2105,11 @@ 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" @@ -2092,11 +2121,12 @@ 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 ("view", &lay::CellViewRef::view, + 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 " @@ -2108,6 +2138,7 @@ Class decl_CellView ("lay", "CellView", "\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 9f5e58bd9..83dfc7ca7 100644 --- a/src/laybasic/laybasic/gsiDeclLayMarker.cc +++ b/src/laybasic/laybasic/gsiDeclLayMarker.cc @@ -29,7 +29,7 @@ namespace gsi { static -lay::DMarker *create_marker (lay::LayoutViewBase *view) +lay::DMarker *create_marker (lay::LayoutView *view) { return new lay::DMarker (view); } diff --git a/src/laybasic/laybasic/gsiDeclLayPlugin.cc b/src/laybasic/laybasic/gsiDeclLayPlugin.cc index 530fd82d7..d1b1f5d6b 100644 --- a/src/laybasic/laybasic/gsiDeclLayPlugin.cc +++ b/src/laybasic/laybasic/gsiDeclLayPlugin.cc @@ -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::LayoutViewBase *sp_view = 0; +static lay::LayoutView *sp_view = 0; static lay::Dispatcher *sp_dispatcher = 0; class PluginBase @@ -51,7 +51,7 @@ public: : lay::Plugin (sp_dispatcher), lay::ViewService (sp_view ? sp_view->view_object_widget () : 0) { if (! s_in_create_plugin) { - throw tl::Exception (tl::to_string (QObject::tr ("A PluginBase object can only be created in the PluginFactory's create_plugin method"))); + throw tl::Exception (tl::to_string (tr ("A PluginBase object can only be created in the PluginFactory's create_plugin method"))); } } @@ -393,7 +393,7 @@ public: } } - virtual lay::Plugin *create_plugin (db::Manager *manager, lay::Dispatcher *root, lay::LayoutViewBase *view) const + virtual lay::Plugin *create_plugin (db::Manager *manager, lay::Dispatcher *root, lay::LayoutView *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::LayoutViewBase *view) const + virtual gsi::PluginBase *create_plugin_gsi (db::Manager *manager, lay::Dispatcher *root, lay::LayoutView *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/layBrowseInstancesForm.cc b/src/laybasic/laybasic/layBrowseInstancesForm.cc index cb2e96b01..0b1214d6f 100644 --- a/src/laybasic/laybasic/layBrowseInstancesForm.cc +++ b/src/laybasic/laybasic/layBrowseInstancesForm.cc @@ -79,7 +79,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::LayoutViewBase *view) const + virtual lay::Plugin *create_plugin (db::Manager *, lay::Dispatcher *root, lay::LayoutView *view) const { return new BrowseInstancesForm (root, view); } @@ -289,7 +289,7 @@ private: // ------------------------------------------------------------ -BrowseInstancesForm::BrowseInstancesForm (lay::Dispatcher *root, LayoutViewBase *vw) +BrowseInstancesForm::BrowseInstancesForm (lay::Dispatcher *root, LayoutView *vw) : lay::Browser (root, vw), Ui::BrowseInstancesForm (), m_cv_index (0), @@ -349,7 +349,7 @@ void BrowseInstancesForm::choose_cell_pressed () { BEGIN_PROTECTED - CellSelectionForm form (this, view ()->ui (), "browse_cell", true /*simple mode*/); + CellSelectionForm form (this, view (), "browse_cell", true /*simple mode*/); if (form.exec ()) { change_cell (form.selected_cellview ().cell_index (), form.selected_cellview_index ()); } diff --git a/src/laybasic/laybasic/layBrowseInstancesForm.h b/src/laybasic/laybasic/layBrowseInstancesForm.h index 61bec73de..ae4d5e2b0 100644 --- a/src/laybasic/laybasic/layBrowseInstancesForm.h +++ b/src/laybasic/laybasic/layBrowseInstancesForm.h @@ -65,7 +65,7 @@ public: enum mode_type { ToCellView = 0, AnyTop, Parent }; enum window_type { DontChange = 0, FitCell, FitMarker, Center, CenterSize }; - BrowseInstancesForm (lay::Dispatcher *root, lay::LayoutViewBase *view); + BrowseInstancesForm (lay::Dispatcher *root, lay::LayoutView *view); ~BrowseInstancesForm (); bool eventFilter (QObject *watched, QEvent *event); diff --git a/src/laybasic/laybasic/layBrowseShapesForm.cc b/src/laybasic/laybasic/layBrowseShapesForm.cc index 78db4af73..d733ac1a2 100644 --- a/src/laybasic/laybasic/layBrowseShapesForm.cc +++ b/src/laybasic/laybasic/layBrowseShapesForm.cc @@ -80,7 +80,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::LayoutViewBase *view) const + virtual lay::Plugin *create_plugin (db::Manager *, lay::Dispatcher *root, lay::LayoutView *view) const { return new BrowseShapesForm (root, view); } @@ -392,7 +392,7 @@ private: // ------------------------------------------------------------ -BrowseShapesForm::BrowseShapesForm (lay::Dispatcher *root, LayoutViewBase *vw) +BrowseShapesForm::BrowseShapesForm (lay::Dispatcher *root, LayoutView *vw) : lay::Browser (root, vw), Ui::BrowseShapesForm (), m_cv_index (-1), diff --git a/src/laybasic/laybasic/layBrowseShapesForm.h b/src/laybasic/laybasic/layBrowseShapesForm.h index 4ff63c739..c13b6b4e3 100644 --- a/src/laybasic/laybasic/layBrowseShapesForm.h +++ b/src/laybasic/laybasic/layBrowseShapesForm.h @@ -64,7 +64,7 @@ public: enum mode_type { ToCellView = 0, AnyTop, Local }; enum window_type { DontChange = 0, FitCell, FitMarker, Center, CenterSize }; - BrowseShapesForm (lay::Dispatcher *root, LayoutViewBase *view); + BrowseShapesForm (lay::Dispatcher *root, LayoutView *view); ~BrowseShapesForm (); bool eventFilter (QObject *watched, QEvent *event); diff --git a/src/laybasic/laybasic/layBrowser.cc b/src/laybasic/laybasic/layBrowser.cc index 07b2a9828..8a9fcc241 100644 --- a/src/laybasic/laybasic/layBrowser.cc +++ b/src/laybasic/laybasic/layBrowser.cc @@ -32,9 +32,9 @@ namespace lay { #if QT_VERSION >= 0x050000 -Browser::Browser (lay::Dispatcher *root, lay::LayoutViewBase *view, const char *name, Qt::WindowFlags fl) +Browser::Browser (lay::Dispatcher *root, lay::LayoutView *view, const char *name, Qt::WindowFlags fl) #else -Browser::Browser (lay::Dispatcher *root, lay::LayoutViewBase *view, const char *name, Qt::WFlags fl) +Browser::Browser (lay::Dispatcher *root, lay::LayoutView *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/laybasic/laybasic/layBrowser.h index fcc490c53..24bafc8e4 100644 --- a/src/laybasic/laybasic/layBrowser.h +++ b/src/laybasic/laybasic/layBrowser.h @@ -47,9 +47,9 @@ public: * @brief Constructor */ #if QT_VERSION >= 0x050000 - Browser (lay::Dispatcher *root, lay::LayoutViewBase *view, const char *name = "", Qt::WindowFlags fl = Qt::Window /*adds minimize button for example*/); + Browser (lay::Dispatcher *root, lay::LayoutView *view, const char *name = "", Qt::WindowFlags fl = Qt::Window /*adds minimize button for example*/); #else - Browser (lay::Dispatcher *root, lay::LayoutViewBase *view, const char *name = "", Qt::WFlags fl = Qt::Window /*adds minimize button for example*/); + Browser (lay::Dispatcher *root, lay::LayoutView *view, const char *name = "", Qt::WFlags fl = Qt::Window /*adds minimize button for example*/); #endif /** @@ -93,7 +93,7 @@ public: /** * @brief Return the pointer to the layout view */ - lay::LayoutViewBase *view () + lay::LayoutView *view () { return mp_view; } @@ -132,7 +132,7 @@ public: private: bool m_active; - lay::LayoutViewBase *mp_view; + lay::LayoutView *mp_view; lay::Dispatcher *mp_root; void closeEvent (QCloseEvent *); diff --git a/src/laybasic/laybasic/layCellSelectionForm.cc b/src/laybasic/laybasic/layCellSelectionForm.cc index be93b86ea..0bd3ff519 100644 --- a/src/laybasic/laybasic/layCellSelectionForm.cc +++ b/src/laybasic/laybasic/layCellSelectionForm.cc @@ -49,7 +49,7 @@ static const std::string cfg_cell_selection_search_use_expressions ("cell-select // ------------------------------------------------------------ -CellSelectionForm::CellSelectionForm (QWidget *parent, LayoutViewBase *view, const char *name, bool simple_mode) +CellSelectionForm::CellSelectionForm (QWidget *parent, LayoutView *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/laybasic/laybasic/layCellSelectionForm.h index f1447eee7..adc0a5cc7 100644 --- a/src/laybasic/laybasic/layCellSelectionForm.h +++ b/src/laybasic/laybasic/layCellSelectionForm.h @@ -49,7 +49,7 @@ class LAYBASIC_PUBLIC CellSelectionForm Q_OBJECT public: - CellSelectionForm (QWidget *parent, LayoutViewBase *view, const char *name, bool simple_mode = false); + CellSelectionForm (QWidget *parent, LayoutView *view, const char *name, bool simple_mode = false); /** * @brief Obtain the selected cellview's index (with changes) @@ -76,7 +76,7 @@ public slots: void find_prev_clicked(); private: - lay::LayoutViewBase *mp_view; + lay::LayoutView *mp_view; std::vector m_cellviews; int m_current_cv; bool m_name_cb_enabled; diff --git a/src/laybasic/laybasic/layCellTreeModel.cc b/src/laybasic/laybasic/layCellTreeModel.cc index d15ddf2fd..d8e4ca573 100644 --- a/src/laybasic/laybasic/layCellTreeModel.cc +++ b/src/laybasic/laybasic/layCellTreeModel.cc @@ -303,7 +303,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::LayoutViewBase *view, int cv_index, unsigned int flags, const db::Cell *base, Sorting sorting) +CellTreeModel::CellTreeModel (QWidget *parent, lay::LayoutView *view, int cv_index, unsigned int flags, const db::Cell *base, Sorting sorting) : QAbstractItemModel (parent), m_flags (flags), m_sorting (sorting), @@ -379,7 +379,7 @@ CellTreeModel::~CellTreeModel () } void -CellTreeModel::configure (lay::LayoutViewBase *view, int cv_index, unsigned int flags, const db::Cell *base, Sorting sorting) +CellTreeModel::configure (lay::LayoutView *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); @@ -398,7 +398,7 @@ CellTreeModel::configure (db::Library *library, unsigned int flags, const db::Ce } void -CellTreeModel::do_configure (db::Layout *layout, db::Library *library, lay::LayoutViewBase *view, int cv_index, unsigned int flags, const db::Cell *base, Sorting sorting) +CellTreeModel::do_configure (db::Layout *layout, db::Library *library, lay::LayoutView *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/laybasic/laybasic/layCellTreeModel.h index b0c6af312..30608ee97 100644 --- a/src/laybasic/laybasic/layCellTreeModel.h +++ b/src/laybasic/laybasic/layCellTreeModel.h @@ -45,7 +45,7 @@ namespace db namespace lay { -class LayoutViewBase; +class LayoutView; class CellTreeItem; /** @@ -85,7 +85,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::LayoutViewBase *view, int cv_index, unsigned int flags = 0, const db::Cell *base = 0, Sorting sorting = ByName); + CellTreeModel (QWidget *parent, lay::LayoutView *view, int cv_index, unsigned int flags = 0, const db::Cell *base = 0, Sorting sorting = ByName); /** * @brief Constructor @@ -120,7 +120,7 @@ public: /** * @brief Reconfigures the model with a LayoutView */ - void configure (LayoutViewBase *view, int cv_index, unsigned int flags = 0, const db::Cell *base = 0, Sorting sorting = ByName); + void configure (LayoutView *view, int cv_index, unsigned int flags = 0, const db::Cell *base = 0, Sorting sorting = ByName); /** * @brief Reconfigures the model with a pure Layout @@ -257,7 +257,7 @@ private: unsigned int m_flags; Sorting m_sorting; QWidget *mp_parent; - lay::LayoutViewBase *mp_view; + lay::LayoutView *mp_view; db::Layout *mp_layout; db::Library *mp_library; int m_cv_index; @@ -271,7 +271,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, LayoutViewBase *view, int cv_index, unsigned int flags, const db::Cell *base, Sorting sorting); + void do_configure (db::Layout *layout, db::Library *library, LayoutView *view, int cv_index, unsigned int flags, const db::Cell *base, Sorting sorting); }; /** diff --git a/src/laybasic/laybasic/layCellView.cc b/src/laybasic/laybasic/layCellView.cc index ee28b6cbc..1fa389ca9 100644 --- a/src/laybasic/laybasic/layCellView.cc +++ b/src/laybasic/laybasic/layCellView.cc @@ -23,7 +23,9 @@ #include "layCellView.h" #include "layLayoutView.h" -#include "layStream.h" +#if defined(HAVE_QT) // @@@ +# include "layStream.h" +#endif #include "dbLayout.h" #include "dbWriter.h" #include "dbReader.h" @@ -64,7 +66,7 @@ LayoutHandle::LayoutHandle (db::Layout *layout, const std::string &filename) // layouts in the managed layouts space participate in spare proxy cleanup layout->do_cleanup (true); - file_watcher ().add_file (m_filename); + add_file_to_watcher (m_filename); if (! m_filename.empty ()) { rename (filename_for_caption (m_filename)); @@ -107,7 +109,23 @@ LayoutHandle::~LayoutHandle () ms_dict.erase (m_name); } - file_watcher ().remove_file (filename ()); + remove_file_from_watcher (filename ()); +} + +void +LayoutHandle::remove_file_from_watcher (const std::string &path) +{ +#if defined(HAVE_QT) + file_watcher ().remove_file (path); +#endif +} + +void +LayoutHandle::add_file_to_watcher (const std::string &path) +{ +#if defined(HAVE_QT) + file_watcher ().add_file (path); +#endif } void @@ -176,9 +194,9 @@ LayoutHandle::layout () const void LayoutHandle::set_filename (const std::string &fn) { - file_watcher ().remove_file (m_filename); + remove_file_from_watcher (m_filename); m_filename = fn; - file_watcher ().add_file (m_filename); + add_file_to_watcher (m_filename); } const std::string & @@ -274,6 +292,7 @@ LayoutHandle::set_save_options (const db::SaveLayoutOptions &options, bool valid void LayoutHandle::update_save_options (db::SaveLayoutOptions &options) { +#if defined(HAVE_QT) // @@@ for (tl::Registrar::iterator cls = tl::Registrar::begin (); cls != tl::Registrar::end (); ++cls) { const lay::StreamWriterPluginDeclaration *decl = dynamic_cast (&*cls); @@ -294,6 +313,7 @@ LayoutHandle::update_save_options (db::SaveLayoutOptions &options) } } +#endif } void @@ -307,7 +327,7 @@ LayoutHandle::save_as (const std::string &fn, tl::OutputStream::OutputStreamMode // reader options. m_load_options = db::LoadLayoutOptions (); - file_watcher ().remove_file (filename ()); + remove_file_from_watcher (filename ()); rename (filename_for_caption (fn)); @@ -331,14 +351,14 @@ LayoutHandle::save_as (const std::string &fn, tl::OutputStream::OutputStreamMode } if (update) { - file_watcher ().add_file (filename ()); + add_file_to_watcher (filename ()); m_dirty = false; } } catch (...) { if (update) { - file_watcher ().add_file (filename ()); + add_file_to_watcher (filename ()); } throw; @@ -366,8 +386,8 @@ LayoutHandle::load (const db::LoadLayoutOptions &options, const std::string &tec } // Update the file's data: - file_watcher ().remove_file (filename ()); - file_watcher ().add_file (filename ()); + remove_file_from_watcher (filename ()); + add_file_to_watcher (filename ()); m_dirty = false; return new_lmap; @@ -391,13 +411,14 @@ LayoutHandle::load () } // Update the file's data: - file_watcher ().remove_file (filename ()); - file_watcher ().add_file (filename ()); + remove_file_from_watcher (filename ()); + add_file_to_watcher (filename ()); m_dirty = false; return new_lmap; } +#if defined(HAVE_QT) tl::FileSystemWatcher & LayoutHandle::file_watcher () { @@ -408,8 +429,10 @@ LayoutHandle::file_watcher () return *mp_file_watcher; } -std::map LayoutHandle::ms_dict; tl::FileSystemWatcher *LayoutHandle::mp_file_watcher = 0; +#endif + +std::map LayoutHandle::ms_dict; // ------------------------------------------------------------- // LayoutHandleRef implementation diff --git a/src/laybasic/laybasic/layCellView.h b/src/laybasic/laybasic/layCellView.h index 4fc1e98b4..632b7d304 100644 --- a/src/laybasic/laybasic/layCellView.h +++ b/src/laybasic/laybasic/layCellView.h @@ -297,6 +297,16 @@ public: static tl::FileSystemWatcher &file_watcher (); #endif + /** + * @brief Removes a file from the watcher + */ + static void remove_file_from_watcher (const std::string &path); + + /** + * @brief Adds a file to the watcher + */ + static void add_file_to_watcher (const std::string &path); + private: db::Layout *mp_layout; int m_ref_count; diff --git a/src/laybasic/laybasic/layEditorOptionsFrame.cc b/src/laybasic/laybasic/layEditorOptionsFrame.cc index 55607c77f..dd593f9e4 100644 --- a/src/laybasic/laybasic/layEditorOptionsFrame.cc +++ b/src/laybasic/laybasic/layEditorOptionsFrame.cc @@ -47,7 +47,7 @@ EditorOptionsFrame::~EditorOptionsFrame () } void -EditorOptionsFrame::populate (LayoutViewBase *view) +EditorOptionsFrame::populate (LayoutView *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/laybasic/laybasic/layEditorOptionsFrame.h index 0922be2ee..fff1f7d40 100644 --- a/src/laybasic/laybasic/layEditorOptionsFrame.h +++ b/src/laybasic/laybasic/layEditorOptionsFrame.h @@ -30,7 +30,7 @@ namespace lay { class EditorOptionsPages; -class LayoutViewBase; +class LayoutView; class LAYBASIC_PUBLIC EditorOptionsFrame : public QFrame @@ -39,7 +39,7 @@ public: EditorOptionsFrame (QWidget *parent); virtual ~EditorOptionsFrame (); - void populate (lay::LayoutViewBase *view); + void populate (lay::LayoutView *view); EditorOptionsPages *pages_widget () const { diff --git a/src/laybasic/laybasic/layEditorServiceBase.cc b/src/laybasic/laybasic/layEditorServiceBase.cc index 2e887fa5b..925f7a82e 100644 --- a/src/laybasic/laybasic/layEditorServiceBase.cc +++ b/src/laybasic/laybasic/layEditorServiceBase.cc @@ -202,7 +202,7 @@ private: // -------------------------------------------------------------------------------------- -EditorServiceBase::EditorServiceBase (LayoutViewBase *view) +EditorServiceBase::EditorServiceBase (LayoutView *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 7316eeba6..276f1a66a 100644 --- a/src/laybasic/laybasic/layEditorServiceBase.h +++ b/src/laybasic/laybasic/layEditorServiceBase.h @@ -46,7 +46,7 @@ public: /** * @brief Constructor */ - EditorServiceBase (lay::LayoutViewBase *view); + EditorServiceBase (lay::LayoutView *view); /** * @brief Destructor diff --git a/src/laybasic/laybasic/layFinder.cc b/src/laybasic/laybasic/layFinder.cc index 214705fc4..cc6ea038a 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::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) +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) { m_layers = layers; m_region = region; @@ -265,7 +265,7 @@ struct LPContextCompareOp }; bool -ShapeFinder::find (LayoutViewBase *view, const db::DBox ®ion_mu) +ShapeFinder::find (LayoutView *view, const db::DBox ®ion_mu) { tl::AbsoluteProgress progress (tl::to_string (tr ("Selecting ..."))); progress.set_unit (1000); @@ -330,7 +330,7 @@ ShapeFinder::find (LayoutViewBase *view, const db::DBox ®ion_mu) } bool -ShapeFinder::find (lay::LayoutViewBase *view, const lay::LayerProperties &lprops, const db::DBox ®ion_mu) +ShapeFinder::find (lay::LayoutView *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::LayoutViewBase *view, const lay::LayerProperties &lprops } bool -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) +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) { 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::LayoutViewBase *view, const db::DBox ®ion_mu) +InstFinder::find (lay::LayoutView *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::LayoutViewBase *view, const db::DBox ®ion_mu) } bool -InstFinder::find (LayoutViewBase *view, unsigned int cv_index, const db::DCplxTrans &trans_mu, const db::DBox ®ion_mu) +InstFinder::find (LayoutView *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 (LayoutViewBase *view, unsigned int cv_index, const db::DCplxTr } bool -InstFinder::find_internal (LayoutViewBase *view, unsigned int cv_index, const db::DCplxTrans &trans_mu, const db::DBox ®ion_mu) +InstFinder::find_internal (LayoutView *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 f411872b6..5b7608de7 100644 --- a/src/laybasic/laybasic/layFinder.h +++ b/src/laybasic/laybasic/layFinder.h @@ -136,7 +136,7 @@ protected: return m_max_level; } - lay::LayoutViewBase *view () const + lay::LayoutView *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 (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 ()); + 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 ()); /** * @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::LayoutViewBase *mp_view; + lay::LayoutView *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 (LayoutViewBase *view, const lay::LayerProperties &lprops, const db::DBox ®ion_mu); - bool find (LayoutViewBase *view, const db::DBox ®ion_mu); + bool find (LayoutView *view, const lay::LayerProperties &lprops, const db::DBox ®ion_mu); + bool find (LayoutView *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 (LayoutViewBase *view, + bool find_internal (LayoutView *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 (LayoutViewBase *view, unsigned int cv_index, const db::DCplxTrans &trans, const db::DBox ®ion_mu); - bool find (LayoutViewBase *view, const db::DBox ®ion_mu); + 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); 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 (LayoutViewBase *view, unsigned int cv_index, const db::DCplxTrans &trans_mu, const db::DBox ®ion_mu); + bool find_internal (LayoutView *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/layGridNet.cc b/src/laybasic/laybasic/layGridNet.cc index d23d7c858..d006ca58c 100644 --- a/src/laybasic/laybasic/layGridNet.cc +++ b/src/laybasic/laybasic/layGridNet.cc @@ -105,7 +105,7 @@ GridNetPluginDeclaration::config_page (QWidget *parent, std::string &title) cons #endif lay::Plugin * -GridNetPluginDeclaration::create_plugin (db::Manager *, Dispatcher *, lay::LayoutViewBase *view) const +GridNetPluginDeclaration::create_plugin (db::Manager *, Dispatcher *, lay::LayoutView *view) const { return new lay::GridNet (view); } @@ -115,7 +115,7 @@ static tl::RegisteredClass config_decl (new GridNetPlugi // ------------------------------------------------------------ // Implementation of the GridNet object -GridNet::GridNet (LayoutViewBase *view) +GridNet::GridNet (LayoutView *view) : lay::BackgroundViewObject (view->view_object_widget ()), lay::Plugin (view), mp_view (view), diff --git a/src/laybasic/laybasic/layGridNet.h b/src/laybasic/laybasic/layGridNet.h index 469d3d232..529b30509 100644 --- a/src/laybasic/laybasic/layGridNet.h +++ b/src/laybasic/laybasic/layGridNet.h @@ -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::LayoutViewBase *view) const; + virtual lay::Plugin *create_plugin (db::Manager *, lay::Dispatcher *, lay::LayoutView *view) const; }; class GridNet @@ -68,7 +68,7 @@ public: CheckerBoard }; - GridNet (lay::LayoutViewBase *view); + GridNet (lay::LayoutView *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::LayoutViewBase *mp_view; + lay::LayoutView *mp_view; bool m_visible; bool m_show_ruler; double m_grid; diff --git a/src/laybasic/laybasic/layLayerProperties.cc b/src/laybasic/laybasic/layLayerProperties.cc index 75aed4563..7b9476a92 100644 --- a/src/laybasic/laybasic/layLayerProperties.cc +++ b/src/laybasic/laybasic/layLayerProperties.cc @@ -23,6 +23,7 @@ #include "layLayerProperties.h" #include "layLayoutViewBase.h" +#include "layLayoutView.h" #include "layConverters.h" #include "tlXMLParser.h" #include "tlException.h" @@ -404,7 +405,7 @@ class LayerSourceEval : public tl::Eval { public: - LayerSourceEval (const lay::LayerProperties &lp, const lay::LayoutViewBase *view, bool real) + LayerSourceEval (const lay::LayerProperties &lp, const lay::LayoutView *view, bool real) : m_lp (lp), mp_view (view), m_real (real) { // .. nothing yet .. @@ -415,14 +416,14 @@ public: return m_lp.source (m_real); } - const lay::LayoutViewBase *view () const + const lay::LayoutView *view () const { return mp_view; } private: const lay::LayerProperties &m_lp; - const lay::LayoutViewBase *mp_view; + const lay::LayoutView *mp_view; bool m_real; }; @@ -498,7 +499,7 @@ LayerProperties::display_string (const lay::LayoutViewBase *view, bool real, boo realize_source (); } - LayerSourceEval eval (*this, view, real); + LayerSourceEval eval (*this, view->ui (), 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 @@ -712,8 +713,7 @@ LayerPropertiesNode::operator== (const LayerPropertiesNode &d) const return m_children == d.m_children; } -LayoutViewBase * -LayerPropertiesNode::view () const +LayoutViewBase *LayerPropertiesNode::view() const { return const_cast (mp_view.get ()); } @@ -1373,7 +1373,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, list_index); + node.attach_view (view->ui (), 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/layLayerProperties.h b/src/laybasic/laybasic/layLayerProperties.h index 3df52ade7..1b6bffcdc 100644 --- a/src/laybasic/laybasic/layLayerProperties.h +++ b/src/laybasic/laybasic/layLayerProperties.h @@ -1170,7 +1170,6 @@ public: * This method attaches the properties node and it's children to a view. * This enables the node to realize itself against the view, i.e. * compute the actual property selection set. - * This method is supposed to be */ void attach_view (LayoutViewBase *view, unsigned int list_index); @@ -1912,7 +1911,7 @@ public: * "load" automatically attaches the view. * This method has the side effect of recomputing the layer source parameters. */ - void attach_view (lay::LayoutViewBase *view, unsigned int list_index); + void attach_view (LayoutViewBase *view, unsigned int list_index); /** * @brief Gets the layout view this list is attached to diff --git a/src/laybasic/laybasic/layLayerTreeModel.cc b/src/laybasic/laybasic/layLayerTreeModel.cc index d52ace764..5a3c09eea 100644 --- a/src/laybasic/laybasic/layLayerTreeModel.cc +++ b/src/laybasic/laybasic/layLayerTreeModel.cc @@ -631,7 +631,7 @@ LayerTreeModel::empty_within_view_predicate (const QModelIndex &index) const LAYBASIC_PUBLIC QIcon -LayerTreeModel::icon_for_layer (const lay::LayerPropertiesConstIterator &iter, lay::LayoutViewBase *view, unsigned int w, unsigned int h, unsigned int di_off, bool no_state) +LayerTreeModel::icon_for_layer (const lay::LayerPropertiesConstIterator &iter, lay::LayoutView *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); diff --git a/src/laybasic/laybasic/layLayerTreeModel.h b/src/laybasic/laybasic/layLayerTreeModel.h index 7da95e367..6e39f2efd 100644 --- a/src/laybasic/laybasic/layLayerTreeModel.h +++ b/src/laybasic/laybasic/layLayerTreeModel.h @@ -48,7 +48,7 @@ namespace lay { class LayoutView; -class LayoutViewBase; +class LayoutView; class LayerPropertiesConstIterator; /** @@ -109,7 +109,7 @@ public: /** * @brief Provides an icon for a given layer style */ - 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); + 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); /** * @brief Gets the preferred icon size diff --git a/src/laybasic/laybasic/layLayoutView.h b/src/laybasic/laybasic/layLayoutView.h index d47a22e89..475926838 100644 --- a/src/laybasic/laybasic/layLayoutView.h +++ b/src/laybasic/laybasic/layLayoutView.h @@ -418,11 +418,6 @@ public: */ virtual QWidget *widget () { return this; } - /** - * @brief Gets the LayoutView interface - */ - virtual LayoutView *ui () { return this; } - /** * @brief Copies to clipboard * @@ -762,6 +757,15 @@ protected: virtual void emit_title_changed (); virtual void emit_dirty_changed (); virtual void emit_layer_order_changed (); + +protected: + /** + * @brief Gets the LayoutView interface + */ + virtual LayoutView *get_ui () { return this; } + +private: + using LayoutViewBase::ui; }; } @@ -792,6 +796,15 @@ public: * @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); + +protected: + /** + * @brief Gets the LayoutView interface + */ + virtual LayoutView *get_ui () { return this; } + +private: + using LayoutViewBase::ui; }; } diff --git a/src/laybasic/laybasic/layLayoutViewBase.cc b/src/laybasic/laybasic/layLayoutViewBase.cc index 233414df7..413204547 100644 --- a/src/laybasic/laybasic/layLayoutViewBase.cc +++ b/src/laybasic/laybasic/layLayoutViewBase.cc @@ -274,7 +274,7 @@ LayoutViewBase::LayoutViewBase (lay::LayoutViewBase *source, db::Manager *manage } else { *m_layer_properties_lists [i] = *source->m_layer_properties_lists [i]; } - m_layer_properties_lists [i]->attach_view (this, (unsigned int) i); + m_layer_properties_lists [i]->attach_view (ui (), (unsigned int) i); } if (! m_layer_properties_lists.empty ()) { @@ -367,7 +367,7 @@ LayoutViewBase::init (db::Manager *mgr) m_search_range_box = 0; m_layer_properties_lists.push_back (new LayerPropertiesList ()); - m_layer_properties_lists.back ()->attach_view (this, (unsigned int) (m_layer_properties_lists.size () - 1)); + m_layer_properties_lists.back ()->attach_view (ui (), (unsigned int) (m_layer_properties_lists.size () - 1)); m_current_layer_list = 0; #if defined(HAVE_QT) @@ -388,16 +388,16 @@ LayoutViewBase::init (db::Manager *mgr) // occupy services and editables: // these services get deleted by the canvas destructor automatically: if ((m_options & LV_NoTracker) == 0) { - mp_tracker = new lay::MouseTracker (this); + mp_tracker = new lay::MouseTracker (ui ()); } if ((m_options & LV_NoZoom) == 0) { - mp_zoom_service = new lay::ZoomService (this); + mp_zoom_service = new lay::ZoomService (ui ()); } if ((m_options & LV_NoSelection) == 0) { - mp_selection_service = new lay::SelectionService (this); + mp_selection_service = new lay::SelectionService (ui ()); } if ((m_options & LV_NoMove) == 0) { - mp_move_service = new lay::MoveService (this); + mp_move_service = new lay::MoveService (ui ()); } create_plugins (); @@ -554,7 +554,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 (), this); + lay::Plugin *p = cls->create_plugin (manager (), dispatcher (), ui ()); if (p) { // unhook the plugin from the script side if created there (prevent GC from destroying it) @@ -1329,7 +1329,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 (this, index); + m_layer_properties_lists [index]->attach_view (ui (), index); merge_dither_pattern (*m_layer_properties_lists [index]); m_current_layer_list = index; @@ -1538,7 +1538,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 (this, (unsigned int) (m_layer_properties_lists.size () - 1)); + m_layer_properties_lists.back ()->attach_view (ui (), (unsigned int) (m_layer_properties_lists.size () - 1)); } } @@ -1557,7 +1557,7 @@ LayoutViewBase::set_properties (unsigned int index, const LayerPropertiesList &p } *m_layer_properties_lists [index] = props; - m_layer_properties_lists [index]->attach_view (this, index); + m_layer_properties_lists [index]->attach_view (ui (), index); merge_dither_pattern (*m_layer_properties_lists [index]); @@ -1975,7 +1975,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 (this, i); + m_layer_properties_lists [i]->attach_view (ui (), i); } // schedule a redraw request - since the layer views might not have changed, this is necessary @@ -1991,7 +1991,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 (this, i); + m_layer_properties_lists [i]->attach_view (ui (), i); } } @@ -2298,7 +2298,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 (this, p - props.begin ()); + p->attach_view (ui (), p - props.begin ()); p->expand (cv_map, add_default); } @@ -3089,7 +3089,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 (this, p - props.begin ()); + p->attach_view (ui (), p - props.begin ()); p->expand (cv_map, add_missing || !loaded); } @@ -3203,7 +3203,7 @@ LayoutViewBase::widget () #endif LayoutView * -LayoutViewBase::ui () +LayoutViewBase::get_ui () { tl_assert (false); } diff --git a/src/laybasic/laybasic/layLayoutViewBase.h b/src/laybasic/laybasic/layLayoutViewBase.h index 0047975fc..16434c38e 100644 --- a/src/laybasic/laybasic/layLayoutViewBase.h +++ b/src/laybasic/laybasic/layLayoutViewBase.h @@ -790,12 +790,12 @@ public: */ void load_layer_props (const std::string &fn, int cv_index, bool add_default); +#if defined(HAVE_QT) // @@@ /** * @brief Save the screen content to a file */ void save_screenshot (const std::string &fn); -#if defined(HAVE_QT) /** * @brief Get the screen content as a QImage object */ @@ -2510,7 +2510,18 @@ public: /** * @brief Gets the LayoutView interface */ - virtual LayoutView *ui (); + LayoutView *ui () + { + return get_ui (); + } + + /** + * @brief Gets the LayoutView interface (const version) + */ + const LayoutView *ui () const + { + return const_cast (this)->get_ui (); + } private: // event handlers used to connect to the layout object's events @@ -2686,6 +2697,8 @@ protected: return mp_active_plugin; } + virtual LayoutView *get_ui (); + bool configure (const std::string &name, const std::string &value); void config_finalize (); diff --git a/src/laybasic/laybasic/layLayoutViewFunctions.cc b/src/laybasic/laybasic/layLayoutViewFunctions.cc index 724e8c137..5ae02957d 100644 --- a/src/laybasic/laybasic/layLayoutViewFunctions.cc +++ b/src/laybasic/laybasic/layLayoutViewFunctions.cc @@ -77,8 +77,8 @@ validate_cell_path (const db::Layout &layout, lay::LayoutView::cell_path_type &p return false; } -LayoutViewFunctions::LayoutViewFunctions (db::Manager *manager, LayoutViewBase *view) - : lay::Plugin (view), mp_view (view->ui ()), mp_manager (manager) +LayoutViewFunctions::LayoutViewFunctions (db::Manager *manager, LayoutView *view) + : lay::Plugin (view), mp_view (view), mp_manager (manager) { m_del_cell_mode = 0; m_move_to_origin_mode_x = 0; @@ -2244,7 +2244,7 @@ public: } } - lay::Plugin *create_plugin (db::Manager *manager, Dispatcher *, LayoutViewBase *view) const + lay::Plugin *create_plugin (db::Manager *manager, Dispatcher *, LayoutView *view) const { return new LayoutViewFunctions (manager, view); } diff --git a/src/laybasic/laybasic/layLayoutViewFunctions.h b/src/laybasic/laybasic/layLayoutViewFunctions.h index 6661a4753..37fdeb676 100644 --- a/src/laybasic/laybasic/layLayoutViewFunctions.h +++ b/src/laybasic/laybasic/layLayoutViewFunctions.h @@ -46,7 +46,7 @@ public: /** * @brief Constructor */ - LayoutViewFunctions (db::Manager *manager, lay::LayoutViewBase *view); + LayoutViewFunctions (db::Manager *manager, lay::LayoutView *view); /** * @brief Destructor diff --git a/src/laybasic/laybasic/layMarker.cc b/src/laybasic/laybasic/layMarker.cc index 29f822673..729f4fbcd 100644 --- a/src/laybasic/laybasic/layMarker.cc +++ b/src/laybasic/laybasic/layMarker.cc @@ -188,7 +188,7 @@ void render_cell_inst (const db::Layout &layout, const db::CellInstArray &inst, // ------------------------------------------------------------------------ -MarkerBase::MarkerBase (lay::LayoutViewBase *view) +MarkerBase::MarkerBase (lay::LayoutView *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::LayoutViewBase *view, unsigned int cv_index) +GenericMarkerBase::GenericMarkerBase (lay::LayoutView *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 (LayoutViewBase *view, unsigned int cv_index, bool draw_outline, size_t max_shapes) +InstanceMarker::InstanceMarker (LayoutView *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 (LayoutViewBase *view, unsigned int cv_index) +ShapeMarker::ShapeMarker (LayoutView *view, unsigned int cv_index) : GenericMarkerBase (view, cv_index), m_shape () { // .. nothing yet .. @@ -643,7 +643,7 @@ ShapeMarker::item_bbox () const // ------------------------------------------------------------------------ -Marker::Marker (lay::LayoutViewBase *view, unsigned int cv_index, bool draw_outline, size_t max_shapes) +Marker::Marker (lay::LayoutView *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 (LayoutViewBase *view) +DMarker::DMarker (LayoutView *view) : MarkerBase (view), mp_view (view) { m_type = None; diff --git a/src/laybasic/laybasic/layMarker.h b/src/laybasic/laybasic/layMarker.h index 2cc4a4133..7b18deab6 100644 --- a/src/laybasic/laybasic/layMarker.h +++ b/src/laybasic/laybasic/layMarker.h @@ -44,7 +44,7 @@ namespace lay { -class LayoutViewBase; +class LayoutView; /** * @brief The marker base class @@ -59,7 +59,7 @@ public: /** * @brief The constructor */ - MarkerBase (lay::LayoutViewBase *view); + MarkerBase (lay::LayoutView *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::LayoutViewBase *mp_view; + lay::LayoutView *mp_view; }; /** @@ -252,7 +252,7 @@ public: /** * @brief The constructor */ - GenericMarkerBase (lay::LayoutViewBase *view, unsigned int cv_index); + GenericMarkerBase (lay::LayoutView *view, unsigned int cv_index); /** * @brief The destructor @@ -321,7 +321,7 @@ public: /** * @brief Gets the view object */ - lay::LayoutViewBase *view () const + lay::LayoutView *view () const { return mp_view; } @@ -344,7 +344,7 @@ public: private: db::CplxTrans m_trans; std::vector *mp_trans_vector; - lay::LayoutViewBase *mp_view; + lay::LayoutView *mp_view; unsigned int m_cv_index; /** @@ -367,7 +367,7 @@ public: /** * @brief The constructor */ - ShapeMarker (lay::LayoutViewBase *view, unsigned int cv_index); + ShapeMarker (lay::LayoutView *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::LayoutViewBase *view, unsigned int cv_index, bool draw_outline = true, size_t max_shapes = 0); + InstanceMarker (lay::LayoutView *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::LayoutViewBase *view, unsigned int cv_index, bool draw_outline = true, size_t max_shapes = 0); + Marker (lay::LayoutView *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::LayoutViewBase *view); + DMarker (lay::LayoutView *view); /** * @brief The destructor @@ -806,7 +806,7 @@ private: void *any; } m_object; - lay::LayoutViewBase *mp_view; + lay::LayoutView *mp_view; }; } diff --git a/src/laybasic/laybasic/layMouseTracker.cc b/src/laybasic/laybasic/layMouseTracker.cc index f84a48779..73caa324b 100644 --- a/src/laybasic/laybasic/layMouseTracker.cc +++ b/src/laybasic/laybasic/layMouseTracker.cc @@ -28,7 +28,7 @@ namespace lay { -MouseTracker::MouseTracker (lay::LayoutViewBase *view) +MouseTracker::MouseTracker (lay::LayoutView *view) : lay::ViewService (view->view_object_widget ()), mp_view (view) { widget ()->grab_mouse (this, false); diff --git a/src/laybasic/laybasic/layMouseTracker.h b/src/laybasic/laybasic/layMouseTracker.h index 2eb5c33e5..3e826606b 100644 --- a/src/laybasic/laybasic/layMouseTracker.h +++ b/src/laybasic/laybasic/layMouseTracker.h @@ -31,17 +31,17 @@ class QMouseEvent; namespace lay { class LayoutCanvas; -class LayoutViewBase; +class LayoutView; class MouseTracker : public lay::ViewService { public: - MouseTracker (lay::LayoutViewBase *view); + MouseTracker (lay::LayoutView *view); virtual bool mouse_move_event (const db::DPoint &p, unsigned int buttons, bool prio); private: - lay::LayoutViewBase *mp_view; + lay::LayoutView *mp_view; }; } diff --git a/src/laybasic/laybasic/layMove.cc b/src/laybasic/laybasic/layMove.cc index 9667ccb77..3d86338ad 100644 --- a/src/laybasic/laybasic/layMove.cc +++ b/src/laybasic/laybasic/layMove.cc @@ -34,7 +34,7 @@ namespace lay // ------------------------------------------------------------- // MoveService implementation -MoveService::MoveService (lay::LayoutViewBase *view) +MoveService::MoveService (lay::LayoutView *view) : lay::ViewService (view->view_object_widget ()), m_dragging (false), m_dragging_transient (false), diff --git a/src/laybasic/laybasic/layMove.h b/src/laybasic/laybasic/layMove.h index 3908c6505..784630d5e 100644 --- a/src/laybasic/laybasic/layMove.h +++ b/src/laybasic/laybasic/layMove.h @@ -31,13 +31,13 @@ namespace lay { class Editables; -class LayoutViewBase; +class LayoutView; class MoveService : public lay::ViewService { public: - MoveService (lay::LayoutViewBase *view); + MoveService (lay::LayoutView *view); ~MoveService (); virtual bool configure (const std::string &name, const std::string &value); @@ -59,7 +59,7 @@ private: bool m_dragging; bool m_dragging_transient; lay::Editables *mp_editables; - lay::LayoutViewBase *mp_view; + lay::LayoutView *mp_view; double m_global_grid; db::DPoint m_shift; db::DPoint m_mouse_pos; diff --git a/src/laybasic/laybasic/layNetlistBrowser.cc b/src/laybasic/laybasic/layNetlistBrowser.cc index ab689cb92..d43501a38 100644 --- a/src/laybasic/laybasic/layNetlistBrowser.cc +++ b/src/laybasic/laybasic/layNetlistBrowser.cc @@ -376,7 +376,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::LayoutViewBase *view) const + virtual lay::Plugin *create_plugin (db::Manager *, lay::Dispatcher *root, lay::LayoutView *view) const { return new lay::NetlistBrowserDialog (root, view); } diff --git a/src/laybasic/laybasic/layNetlistBrowserDialog.cc b/src/laybasic/laybasic/layNetlistBrowserDialog.cc index 577865a3b..820ebdf32 100644 --- a/src/laybasic/laybasic/layNetlistBrowserDialog.cc +++ b/src/laybasic/laybasic/layNetlistBrowserDialog.cc @@ -56,7 +56,7 @@ 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::LayoutViewBase *vw) +NetlistBrowserDialog::NetlistBrowserDialog (lay::Dispatcher *root, lay::LayoutView *vw) : lay::Browser (root, vw), lay::ViewService (vw->view_object_widget ()), Ui::NetlistBrowserDialog (), diff --git a/src/laybasic/laybasic/layNetlistBrowserDialog.h b/src/laybasic/laybasic/layNetlistBrowserDialog.h index d7ad87699..ebebe1c14 100644 --- a/src/laybasic/laybasic/layNetlistBrowserDialog.h +++ b/src/laybasic/laybasic/layNetlistBrowserDialog.h @@ -42,7 +42,7 @@ class NetlistBrowserDialog Q_OBJECT public: - NetlistBrowserDialog (lay::Dispatcher *root, lay::LayoutViewBase *view); + NetlistBrowserDialog (lay::Dispatcher *root, lay::LayoutView *view); ~NetlistBrowserDialog (); void load (int lay_index, int cv_index); diff --git a/src/laybasic/laybasic/layNetlistBrowserPage.cc b/src/laybasic/laybasic/layNetlistBrowserPage.cc index 828be2771..ef1fdc4f0 100644 --- a/src/laybasic/laybasic/layNetlistBrowserPage.cc +++ b/src/laybasic/laybasic/layNetlistBrowserPage.cc @@ -242,7 +242,7 @@ NetlistBrowserPage::set_highlight_style (lay::Color color, int line_width, int v } void -NetlistBrowserPage::set_view (lay::LayoutViewBase *view, int cv_index) +NetlistBrowserPage::set_view (lay::LayoutView *view, int cv_index) { if (mp_view) { mp_view->layer_list_changed_event.remove (this, &NetlistBrowserPage::layer_list_changed); @@ -1424,7 +1424,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::LayoutViewBase *view = mp_view; + lay::LayoutView *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/laybasic/laybasic/layNetlistBrowserPage.h index 2d330b0d7..c268baaa5 100644 --- a/src/laybasic/laybasic/layNetlistBrowserPage.h +++ b/src/laybasic/laybasic/layNetlistBrowserPage.h @@ -86,7 +86,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 (LayoutViewBase *view, int cv_index); + void set_view (LayoutView *view, int cv_index); /** * @brief Attaches the page to a L2N DB @@ -224,7 +224,7 @@ private: int m_marker_dither_pattern; int m_marker_intensity; bool m_use_original_colors; - lay::LayoutViewBase *mp_view; + lay::LayoutView *mp_view; unsigned int m_cv_index; lay::Dispatcher *mp_plugin_root; tl::weak_ptr mp_database; diff --git a/src/laybasic/laybasic/layParsedLayerSource.cc b/src/laybasic/laybasic/layParsedLayerSource.cc index 66130f12f..1b05eaefe 100644 --- a/src/laybasic/laybasic/layParsedLayerSource.cc +++ b/src/laybasic/laybasic/layParsedLayerSource.cc @@ -22,7 +22,7 @@ #include "layParsedLayerSource.h" -#include "layLayoutViewBase.h" +#include "layLayoutView.h" #include "tlString.h" #include "tlGlobPattern.h" diff --git a/src/laybasic/laybasic/layPlugin.h b/src/laybasic/laybasic/layPlugin.h index 4a0b57ff8..fc83a478b 100644 --- a/src/laybasic/laybasic/layPlugin.h +++ b/src/laybasic/laybasic/layPlugin.h @@ -48,7 +48,7 @@ namespace lay class Plugin; class Dispatcher; -class LayoutViewBase; +class LayoutView; 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::LayoutViewBase * /*view*/) const + virtual lay::Plugin *create_plugin (db::Manager * /*manager*/, lay::Dispatcher * /*dispatcher*/, lay::LayoutView * /*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::LayoutViewBase * /*view*/, lay::Dispatcher * /*dispatcher*/) const + virtual void get_editor_options_pages (std::vector & /*pages*/, lay::LayoutView * /*view*/, lay::Dispatcher * /*dispatcher*/) const { // .. no pages in the default implementation .. } diff --git a/src/laybasic/laybasic/laySelector.cc b/src/laybasic/laybasic/laySelector.cc index 029b1cbe1..e1dea2f3b 100644 --- a/src/laybasic/laybasic/laySelector.cc +++ b/src/laybasic/laybasic/laySelector.cc @@ -37,7 +37,7 @@ namespace lay // ------------------------------------------------------------- // SelectionService implementation -SelectionService::SelectionService (lay::LayoutViewBase *view) +SelectionService::SelectionService (lay::LayoutView *view) : QObject (), lay::ViewService (view->view_object_widget ()), mp_view (view), diff --git a/src/laybasic/laybasic/laySelector.h b/src/laybasic/laybasic/laySelector.h index ad81060b3..69c3d4b25 100644 --- a/src/laybasic/laybasic/laySelector.h +++ b/src/laybasic/laybasic/laySelector.h @@ -38,7 +38,7 @@ namespace lay { class RubberBox; -class LayoutViewBase; +class LayoutView; class LayoutCanvas; class LAYBASIC_PUBLIC SelectionService : @@ -52,7 +52,7 @@ Q_OBJECT #endif public: - SelectionService (lay::LayoutViewBase *view); + SelectionService (lay::LayoutView *view); ~SelectionService (); void set_colors (lay::Color background, lay::Color color); @@ -88,7 +88,7 @@ private: db::DPoint m_p1, m_p2; db::DPoint m_current_position; - lay::LayoutViewBase *mp_view; + lay::LayoutView *mp_view; lay::RubberBox *mp_box; unsigned int m_color; unsigned int m_buttons; diff --git a/src/laybasic/laybasic/laySnap.cc b/src/laybasic/laybasic/laySnap.cc index c123da738..14b7d004b 100644 --- a/src/laybasic/laybasic/laySnap.cc +++ b/src/laybasic/laybasic/laySnap.cc @@ -23,7 +23,7 @@ #include "laySnap.h" -#include "layLayoutViewBase.h" +#include "layLayoutView.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::LayoutViewBase *view, double search_range) + void find (lay::LayoutView *view, double search_range) { if (! view) { return; @@ -586,7 +586,7 @@ private: } void - 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) + 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) { db::Box touch_box = t.inverted () * m_region; @@ -727,7 +727,7 @@ private: }; static PointSnapToObjectResult -do_obj_snap (lay::LayoutViewBase *view, const db::DPoint &pt, const db::DVector &grid, double snap_range, const std::vector &cutlines) +do_obj_snap (lay::LayoutView *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::LayoutViewBase *view, const db::DPoint &pt, const db::DVector } static TwoPointSnapToObjectResult -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) +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) { 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::LayoutViewBase *view, const db::DPoint &pt, const db::DVector &grid, double snap_range) +obj_snap (lay::LayoutView *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::LayoutViewBase *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::LayoutView *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::LayoutViewBase *view, const db::DPoint &p1, const db::DPoint &p2, } TwoPointSnapToObjectResult -obj_snap2 (lay::LayoutViewBase *view, const db::DPoint &pt, const db::DVector &grid, double min_search_range, double max_search_range) +obj_snap2 (lay::LayoutView *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::LayoutViewBase *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::LayoutView *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::LayoutViewBase *view, const db::DPoint &pt1, const db::DPoint &pt2, const db::DVector &grid, double min_search_range, double max_search_range) +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) { db::DPoint dp1 = lay::snap_xy (pt1, grid); db::DPoint dp2 = lay::snap_xy (pt2, grid); @@ -950,7 +950,7 @@ obj_snap2 (lay::LayoutViewBase *view, const db::DPoint &pt1, const db::DPoint &p } TwoPointSnapToObjectResult -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) +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) { 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 750ac55a8..19ebcc05c 100644 --- a/src/laybasic/laybasic/laySnap.h +++ b/src/laybasic/laybasic/laySnap.h @@ -41,7 +41,7 @@ namespace lay { - class LayoutViewBase; + class LayoutView; /** * @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::LayoutViewBase *view, const db::DPoint &pt, const db::DVector &grid, double snap_range); + LAYBASIC_PUBLIC PointSnapToObjectResult obj_snap (lay::LayoutView *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::LayoutViewBase *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::LayoutView *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::LayoutViewBase *view, const db::DPoint &pt, const db::DVector &grid, double min_search_range, double max_search_range); + LAYBASIC_PUBLIC TwoPointSnapToObjectResult obj_snap2 (lay::LayoutView *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::LayoutViewBase *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::LayoutView *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::LayoutViewBase *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::LayoutView *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::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); + 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); /** * @brief Reduce a given vector according to the angle constraint diff --git a/src/laybasic/laybasic/layZoomBox.cc b/src/laybasic/laybasic/layZoomBox.cc index 97f080aa5..bef7e40f2 100644 --- a/src/laybasic/laybasic/layZoomBox.cc +++ b/src/laybasic/laybasic/layZoomBox.cc @@ -31,7 +31,7 @@ namespace lay // ------------------------------------------------------------- // ZoomService implementation -ZoomService::ZoomService (lay::LayoutViewBase *view) +ZoomService::ZoomService (lay::LayoutView *view) : lay::ViewService (view->view_object_widget ()), mp_view (view), mp_box (0), diff --git a/src/laybasic/laybasic/layZoomBox.h b/src/laybasic/laybasic/layZoomBox.h index 7794c6473..a0a497a83 100644 --- a/src/laybasic/laybasic/layZoomBox.h +++ b/src/laybasic/laybasic/layZoomBox.h @@ -30,7 +30,7 @@ namespace lay { -class LayoutViewBase; +class LayoutView; class LayoutCanvas; class RubberBox; @@ -38,7 +38,7 @@ class LAYBASIC_PUBLIC ZoomService : public lay::ViewService { public: - ZoomService (lay::LayoutViewBase *view); + ZoomService (lay::LayoutView *view); ~ZoomService (); void set_colors (lay::Color background, lay::Color text); @@ -55,7 +55,7 @@ private: db::DPoint m_p1, m_p2; db::DBox m_vp; - lay::LayoutViewBase *mp_view; + lay::LayoutView *mp_view; lay::RubberBox *mp_box; unsigned int m_color; }; diff --git a/src/laybasic/laybasic/laybasic.pro b/src/laybasic/laybasic/laybasic.pro index 59c6456ac..53e543b71 100644 --- a/src/laybasic/laybasic/laybasic.pro +++ b/src/laybasic/laybasic/laybasic.pro @@ -84,11 +84,8 @@ DEFINES += MAKE_LAYBASIC_LIBRARY SOURCES = \ gsiDeclLayDialogs.cc \ - gsiDeclLayLayoutView.cc \ - gsiDeclLayMarker.cc \ gsiDeclLayMenu.cc \ gsiDeclLayNetlistBrowserDialog.cc \ - gsiDeclLayPlugin.cc \ gsiDeclLayStream.cc \ gtf.cc \ layAbstractMenu.cc \ @@ -105,7 +102,6 @@ DEFINES += MAKE_LAYBASIC_LIBRARY layBusy.cc \ layCellSelectionForm.cc \ layCellTreeModel.cc \ - layCellView.cc \ layConfigurationDialog.cc \ layConverters.cc \ layCursor.cc \ @@ -178,7 +174,6 @@ DEFINES += MAKE_LAYBASIC_LIBRARY layBusy.h \ layCellSelectionForm.h \ layCellTreeModel.h \ - layCellView.h \ layConfigurationDialog.h \ layConverters.h \ layColor.h \ @@ -240,9 +235,13 @@ DEFINES += MAKE_LAYBASIC_LIBRARY SOURCES += \ gsiDeclLayLayers.cc \ + gsiDeclLayLayoutView.cc \ + gsiDeclLayMarker.cc \ + gsiDeclLayPlugin.cc \ layAnnotationShapes.cc \ layBitmap.cc \ layBitmapRenderer.cc \ + layCellView.cc \ layColor.cc \ layColorPalette.cc \ layDispatcher.cc \ @@ -283,6 +282,7 @@ HEADERS += \ layAnnotationShapes.h \ layBitmap.h \ layBitmapRenderer.h \ + layCellView.h \ layColorPalette.h \ layDispatcher.h \ layDisplayState.h \ diff --git a/src/laybasic/laybasic/rdbMarkerBrowser.cc b/src/laybasic/laybasic/rdbMarkerBrowser.cc index 6311b0f1b..2a7e9928a 100644 --- a/src/laybasic/laybasic/rdbMarkerBrowser.cc +++ b/src/laybasic/laybasic/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::LayoutViewBase *view) const + virtual lay::Plugin *create_plugin (db::Manager *, lay::Dispatcher *root, lay::LayoutView *view) const { return new rdb::MarkerBrowserDialog (root, view); } diff --git a/src/laybasic/laybasic/rdbMarkerBrowserDialog.cc b/src/laybasic/laybasic/rdbMarkerBrowserDialog.cc index 51b93ae88..c85b40024 100644 --- a/src/laybasic/laybasic/rdbMarkerBrowserDialog.cc +++ b/src/laybasic/laybasic/rdbMarkerBrowserDialog.cc @@ -54,7 +54,7 @@ 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::LayoutViewBase *vw) +MarkerBrowserDialog::MarkerBrowserDialog (lay::Dispatcher *root, lay::LayoutView *vw) : lay::Browser (root, vw), Ui::MarkerBrowserDialog (), m_context (rdb::AnyCell), @@ -806,7 +806,7 @@ MarkerBrowserDialog::scan_layer () } unsigned int rdb_index = view ()->add_rdb (rdb.release ()); - view ()->ui ()->open_rdb_browser (rdb_index, cv_index); + view ()->open_rdb_browser (rdb_index, cv_index); } void @@ -882,7 +882,7 @@ MarkerBrowserDialog::scan_layer_flat () } unsigned int rdb_index = view ()->add_rdb (rdb.release ()); - view ()->ui ()->open_rdb_browser (rdb_index, cv_index); + view ()->open_rdb_browser (rdb_index, cv_index); } void diff --git a/src/laybasic/laybasic/rdbMarkerBrowserDialog.h b/src/laybasic/laybasic/rdbMarkerBrowserDialog.h index 57836ca33..5e0bd782e 100644 --- a/src/laybasic/laybasic/rdbMarkerBrowserDialog.h +++ b/src/laybasic/laybasic/rdbMarkerBrowserDialog.h @@ -38,7 +38,7 @@ class MarkerBrowserDialog Q_OBJECT public: - MarkerBrowserDialog (lay::Dispatcher *root, lay::LayoutViewBase *view); + MarkerBrowserDialog (lay::Dispatcher *root, lay::LayoutView *view); ~MarkerBrowserDialog (); void load (int rdb_index, int cv_index); diff --git a/src/laybasic/laybasic/rdbMarkerBrowserPage.cc b/src/laybasic/laybasic/rdbMarkerBrowserPage.cc index 6560e3044..df28158db 100644 --- a/src/laybasic/laybasic/rdbMarkerBrowserPage.cc +++ b/src/laybasic/laybasic/rdbMarkerBrowserPage.cc @@ -1620,7 +1620,7 @@ MarkerBrowserPage::set_marker_style (lay::Color color, int line_width, int verte } void -MarkerBrowserPage::set_view (lay::LayoutViewBase *view, unsigned int cv_index) +MarkerBrowserPage::set_view (lay::LayoutView *view, unsigned int cv_index) { mp_view = view; m_cv_index = cv_index; diff --git a/src/laybasic/laybasic/rdbMarkerBrowserPage.h b/src/laybasic/laybasic/rdbMarkerBrowserPage.h index 6c7ab7820..f879884a6 100644 --- a/src/laybasic/laybasic/rdbMarkerBrowserPage.h +++ b/src/laybasic/laybasic/rdbMarkerBrowserPage.h @@ -78,7 +78,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::LayoutViewBase *view, unsigned int cv_index); + void set_view (lay::LayoutView *view, unsigned int cv_index); /** * @brief Attach the page to a RDB @@ -184,7 +184,7 @@ private: rdb::Database *mp_database; bool m_show_all; QAction *m_show_all_action; - lay::LayoutViewBase *mp_view; + lay::LayoutView *mp_view; unsigned int m_cv_index; std::vector mp_markers; db::DBox m_markers_bbox; diff --git a/src/plugins/tools/bool/lay_plugin/layBooleanOperationsPlugin.cc b/src/plugins/tools/bool/lay_plugin/layBooleanOperationsPlugin.cc index af7c219bd..668f159e6 100644 --- a/src/plugins/tools/bool/lay_plugin/layBooleanOperationsPlugin.cc +++ b/src/plugins/tools/bool/lay_plugin/layBooleanOperationsPlugin.cc @@ -494,9 +494,9 @@ public: // .. nothing yet .. } - lay::Plugin *create_plugin (db::Manager *, lay::Dispatcher *root, lay::LayoutViewBase *view) const + lay::Plugin *create_plugin (db::Manager *, lay::Dispatcher *root, lay::LayoutView *view) const { - return new BooleanOperationsPlugin (root, view->ui ()); + 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 8486c8155..986dbbf04 100644 --- a/src/plugins/tools/diff/lay_plugin/layDiffPlugin.cc +++ b/src/plugins/tools/diff/lay_plugin/layDiffPlugin.cc @@ -103,9 +103,9 @@ public: // .. nothing yet .. } - lay::Plugin *create_plugin (db::Manager *, lay::Dispatcher *root, lay::LayoutViewBase *view) const + lay::Plugin *create_plugin (db::Manager *, lay::Dispatcher *root, lay::LayoutView *view) const { - return new DiffPlugin (root, view->ui ()); + 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 27400f4dd..45b5cd290 100644 --- a/src/plugins/tools/net_tracer/lay_plugin/layNetTracerPlugin.cc +++ b/src/plugins/tools/net_tracer/lay_plugin/layNetTracerPlugin.cc @@ -76,9 +76,9 @@ 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::LayoutViewBase *view) const + virtual lay::Plugin *create_plugin (db::Manager * /*manager*/, lay::Dispatcher *root, lay::LayoutView *view) const { - return new NetTracerDialog (root, view->ui ()); + 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 4bb1601c8..c6830127c 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::LayoutViewBase *view) const + lay::Plugin *create_plugin (db::Manager *, lay::Dispatcher *root, lay::LayoutView *view) const { return new D25View (root, view); } diff --git a/src/plugins/tools/view_25d/lay_plugin/layD25View.cc b/src/plugins/tools/view_25d/lay_plugin/layD25View.cc index a00675974..f7f885da3 100644 --- a/src/plugins/tools/view_25d/lay_plugin/layD25View.cc +++ b/src/plugins/tools/view_25d/lay_plugin/layD25View.cc @@ -38,7 +38,7 @@ namespace lay const double initial_elevation = 15.0; -D25View::D25View (lay::Dispatcher *root, LayoutViewBase *view) +D25View::D25View (lay::Dispatcher *root, LayoutView *view) : lay::Browser (root, view, "d25_view"), dm_rerun_macro (this, &D25View::rerun_macro), dm_fit (this, &D25View::fit) diff --git a/src/plugins/tools/view_25d/lay_plugin/layD25View.h b/src/plugins/tools/view_25d/lay_plugin/layD25View.h index 6cc5cb269..724c14e25 100644 --- a/src/plugins/tools/view_25d/lay_plugin/layD25View.h +++ b/src/plugins/tools/view_25d/lay_plugin/layD25View.h @@ -57,7 +57,7 @@ class D25View Q_OBJECT public: - D25View (lay::Dispatcher *root, lay::LayoutViewBase *view); + D25View (lay::Dispatcher *root, lay::LayoutView *view); ~D25View (); virtual void menu_activated (const std::string &symbol); diff --git a/src/plugins/tools/view_25d/lay_plugin/layD25ViewWidget.cc b/src/plugins/tools/view_25d/lay_plugin/layD25ViewWidget.cc index 7be0f8c24..9fa1f77d6 100644 --- a/src/plugins/tools/view_25d/lay_plugin/layD25ViewWidget.cc +++ b/src/plugins/tools/view_25d/lay_plugin/layD25ViewWidget.cc @@ -711,7 +711,7 @@ D25ViewWidget::finish () } void -D25ViewWidget::attach_view (LayoutViewBase *view) +D25ViewWidget::attach_view (LayoutView *view) { mp_view = view; } diff --git a/src/plugins/tools/view_25d/lay_plugin/layD25ViewWidget.h b/src/plugins/tools/view_25d/lay_plugin/layD25ViewWidget.h index 180a9cb89..af5dd0a54 100644 --- a/src/plugins/tools/view_25d/lay_plugin/layD25ViewWidget.h +++ b/src/plugins/tools/view_25d/lay_plugin/layD25ViewWidget.h @@ -57,7 +57,7 @@ namespace tl namespace lay { -class LayoutViewBase; +class LayoutView; class LayerPropertiesNode; class D25ViewWidget; @@ -106,7 +106,7 @@ public: void mouseReleaseEvent (QMouseEvent *event); void mouseMoveEvent (QMouseEvent *event); - void attach_view(lay::LayoutViewBase *view); + void attach_view(lay::LayoutView *view); QVector3D hit_point_with_scene(const QVector3D &line_dir); void refresh (); @@ -187,7 +187,7 @@ private: double m_scale_factor; double m_vscale_factor; QVector3D m_displacement; - lay::LayoutViewBase *mp_view; + lay::LayoutView *mp_view; db::DBox m_bbox; double m_zmin, m_zmax; bool m_zset; diff --git a/src/plugins/tools/xor/lay_plugin/layXORPlugin.cc b/src/plugins/tools/xor/lay_plugin/layXORPlugin.cc index 262969a59..9e0416339 100644 --- a/src/plugins/tools/xor/lay_plugin/layXORPlugin.cc +++ b/src/plugins/tools/xor/lay_plugin/layXORPlugin.cc @@ -111,9 +111,9 @@ public: // .. nothing yet .. } - lay::Plugin *create_plugin (db::Manager *, lay::Dispatcher *root, lay::LayoutViewBase *view) const + lay::Plugin *create_plugin (db::Manager *, lay::Dispatcher *root, lay::LayoutView *view) const { - return new XORPlugin (root, view->ui ()); + return new XORPlugin (root, view); } };