This commit is contained in:
Matthias Koefferlein 2022-04-30 23:08:05 +02:00
parent c4be80bb2f
commit 63a1b24d24
87 changed files with 421 additions and 288 deletions

View File

@ -91,7 +91,7 @@ PluginDeclaration::get_menu_entries (std::vector<lay::MenuEntry> &menu_entries)
}
lay::Plugin *
PluginDeclaration::create_plugin (db::Manager *manager, lay::Dispatcher *, lay::LayoutView *view) const
PluginDeclaration::create_plugin (db::Manager *manager, lay::Dispatcher *, lay::LayoutViewBase *view) const
{
return new ant::Service (manager, view);
}

View File

@ -40,7 +40,7 @@ public:
virtual void get_options (std::vector < std::pair<std::string, std::string> > &options) const;
virtual void get_menu_entries (std::vector<lay::MenuEntry> &menu_entries) const;
virtual lay::Plugin *create_plugin (db::Manager *manager, lay::Dispatcher *, lay::LayoutView *view) const;
virtual lay::Plugin *create_plugin (db::Manager *manager, lay::Dispatcher *, lay::LayoutViewBase *view) const;
virtual bool implements_editable (std::string &title) const;
virtual bool implements_mouse_mode (std::string &title) const;
virtual bool configure (const std::string &name, const std::string &value);

View File

@ -784,7 +784,7 @@ View::render (const lay::Viewport &vp, lay::ViewObjectCanvas &canvas)
// -------------------------------------------------------------
// ant::Service implementation
Service::Service (db::Manager *manager, lay::LayoutView *view)
Service::Service (db::Manager *manager, lay::LayoutViewBase *view)
: lay::EditorServiceBase (view),
lay::Drawing (1/*number of planes*/, view->drawings ()),
db::Object (manager),

View File

@ -41,7 +41,7 @@
namespace ant {
class LayoutView;
class LayoutViewBase;
class LayoutCanvas;
class Service;
@ -201,7 +201,7 @@ public:
*/
enum MoveMode { MoveNone, MoveP1, MoveP2, MoveP12, MoveP21, MoveP1X, MoveP2X, MoveP1Y, MoveP2Y, MoveRuler, MoveSelected };
Service (db::Manager *manager, lay::LayoutView *view);
Service (db::Manager *manager, lay::LayoutViewBase *view);
~Service ();
@ -427,7 +427,7 @@ public:
/**
* @brief Access to the view object
*/
lay::LayoutView *view () const
lay::LayoutViewBase *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::LayoutView *mp_view;
lay::LayoutViewBase *mp_view;
// The ruler view objects representing the selection
// and the moved rules in move mode

View File

@ -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 (lay::LayoutView *view, int id);
static void replace_annotation (lay::LayoutView *view, int id, const 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);
/**
* @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::LayoutView *view)
AnnotationRef (const ant::Object &other, lay::LayoutViewBase *view)
: ant::Object (other), mp_view (view)
{
// .. nothing yet ..
@ -132,7 +132,7 @@ public:
void erase ()
{
if (mp_view && id () >= 0) {
erase_annotation (mp_view.get (), id ());
erase_annotation_base (mp_view.get (), id ());
detach ();
}
}
@ -140,10 +140,10 @@ public:
template <class T>
AnnotationRef transformed (const T &t) const
{
return AnnotationRef (ant::Object::transformed<T> (t), const_cast<lay::LayoutView *> (mp_view.get ()));
return AnnotationRef (ant::Object::transformed<T> (t), const_cast<lay::LayoutViewBase *> (mp_view.get ()));
}
void set_view (lay::LayoutView *view)
void set_view (lay::LayoutViewBase *view)
{
mp_view.reset (view);
}
@ -152,12 +152,12 @@ protected:
void property_changed ()
{
if (mp_view && id () >= 0) {
replace_annotation (mp_view.get (), id (), *this);
replace_annotation_base (mp_view.get (), id (), *this);
}
}
private:
tl::weak_ptr<lay::LayoutView> mp_view;
tl::weak_ptr<lay::LayoutViewBase> 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 (lay::LayoutView *view, int id)
static void erase_annotation_base (lay::LayoutViewBase *view, int id)
{
ant::Service *ant_service = view->get_plugin <ant::Service> ();
if (ant_service) {
@ -195,7 +195,12 @@ static void erase_annotation (lay::LayoutView *view, int id)
}
}
static void replace_annotation (lay::LayoutView *view, int id, const AnnotationRef &obj)
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)
{
ant::Service *ant_service = view->get_plugin <ant::Service> ();
if (ant_service) {
@ -208,6 +213,11 @@ static void replace_annotation (lay::LayoutView *view, int id, const AnnotationR
}
}
static void replace_annotation (lay::LayoutView *view, int id, const AnnotationRef &obj)
{
replace_annotation_base (view, id, obj);
}
static AnnotationRef create_measure_ruler (lay::LayoutView *view, const db::DPoint &pt, int angle_constraint)
{
std::vector<ant::Service *> ant_services = view->get_plugins <ant::Service> ();

View File

@ -280,7 +280,7 @@ AlignOptionsDialog::~AlignOptionsDialog ()
}
bool
AlignOptionsDialog::exec_dialog (lay::LayoutView * /*view*/, int &hmode, int &vmode, bool &visible_layers)
AlignOptionsDialog::exec_dialog (int &hmode, int &vmode, bool &visible_layers)
{
QRadioButton *hmode_buttons [] = { this->h_none_rb, this->h_left_rb, this->h_center_rb, this->h_right_rb };
QRadioButton *vmode_buttons [] = { this->v_none_rb, this->v_top_rb, this->v_center_rb, this->v_bottom_rb };
@ -343,7 +343,7 @@ DistributeOptionsDialog::~DistributeOptionsDialog ()
}
bool
DistributeOptionsDialog::exec_dialog (lay::LayoutView * /*view*/, bool &hdistribute, int &hmode, double &hpitch, double &hspace, bool &vdistribute, int &vmode, double &vpitch, double &vspace, bool &visible_layers)
DistributeOptionsDialog::exec_dialog (bool &hdistribute, int &hmode, double &hpitch, double &hspace, bool &vdistribute, int &vmode, double &vpitch, double &vspace, bool &visible_layers)
{
QRadioButton *hmode_buttons [] = { this->h_none_rb, this->h_left_rb, this->h_center_rb, this->h_right_rb };
QRadioButton *vmode_buttons [] = { this->v_none_rb, this->v_top_rb, this->v_center_rb, this->v_bottom_rb };

View File

@ -125,7 +125,7 @@ public:
AlignOptionsDialog (QWidget *parent);
virtual ~AlignOptionsDialog ();
bool exec_dialog (lay::LayoutView *view, int &hmode, int &vmode, bool &visible_layers);
bool exec_dialog (int &hmode, int &vmode, bool &visible_layers);
};
/**
@ -141,7 +141,7 @@ public:
DistributeOptionsDialog (QWidget *parent);
virtual ~DistributeOptionsDialog ();
bool exec_dialog (lay::LayoutView *view, bool &hdistribute, int &hmode, double &hpitch, double &hspace, bool &vdistribute, int &vmode, double &vpitch, double &vspace, bool &visible_layers);
bool exec_dialog (bool &hdistribute, int &hmode, double &hpitch, double &hspace, bool &vdistribute, int &vmode, double &vpitch, double &vspace, bool &visible_layers);
};
/**

View File

@ -206,8 +206,11 @@ END_PROTECTED
void
InstPropertiesPage::show_props ()
{
lay::LayoutView *lv = dynamic_cast<lay::LayoutView *> (mp_service->view ());
tl_assert (lv != 0);
lay::UserPropertiesForm props_form (this);
if (props_form.show (mp_service->view (), m_selection_ptrs [m_index]->cv_index (), m_prop_id)) {
if (props_form.show (lv, m_selection_ptrs [m_index]->cv_index (), m_prop_id)) {
emit edited ();
}
}
@ -381,21 +384,27 @@ InstPropertiesPage::update ()
void
InstPropertiesPage::show_cell ()
{
lay::LayoutView *lv = dynamic_cast<lay::LayoutView *> (mp_service->view ());
tl_assert (lv != 0);
edt::Service::obj_iterator pos = m_selection_ptrs [m_index];
lay::CellView::unspecific_cell_path_type path (mp_service->view ()->cellview (pos->cv_index ()).combined_unspecific_path ());
lay::CellView::unspecific_cell_path_type path (lv->cellview (pos->cv_index ()).combined_unspecific_path ());
for (lay::ObjectInstPath::iterator p = pos->begin (); p != pos->end (); ++p) {
path.push_back (p->inst_ptr.cell_index ());
}
mp_service->view ()->set_current_cell_path (pos->cv_index (), path);
lv->set_current_cell_path (pos->cv_index (), path);
}
void
InstPropertiesPage::show_inst ()
{
lay::LayoutView *lv = dynamic_cast<lay::LayoutView *> (mp_service->view ());
tl_assert (lv != 0);
InstantiationForm inst_form (this);
inst_form.show (mp_service->view (), *m_selection_ptrs [m_index]);
inst_form.show (lv, *m_selection_ptrs [m_index]);
}
bool
@ -843,6 +852,9 @@ InstPropertiesPage::apply_to_all (bool relative)
void
InstPropertiesPage::update_pcell_parameters ()
{
lay::LayoutView *lv = dynamic_cast<lay::LayoutView *> (mp_service->view ());
tl_assert (lv != 0);
db::Layout *layout;
// find the layout the cell has to be looked up: that is either the layout of the current instance or
@ -854,7 +866,7 @@ InstPropertiesPage::update_pcell_parameters ()
} else {
edt::Service::obj_iterator pos = m_selection_ptrs [m_index];
const lay::CellView &cv = mp_service->view ()->cellview (pos->cv_index ());
const lay::CellView &cv = lv->cellview (pos->cv_index ());
layout = &cv->layout ();
}
@ -878,7 +890,7 @@ InstPropertiesPage::update_pcell_parameters ()
std::vector<tl::Variant> parameters;
edt::Service::obj_iterator pos = m_selection_ptrs [m_index];
const lay::CellView &cv = mp_service->view ()->cellview (pos->cv_index ());
const lay::CellView &cv = lv->cellview (pos->cv_index ());
db::Cell &cell = cv->layout ().cell (pos->cell_index ());
std::pair<bool, db::pcell_id_type> pci = cell.is_pcell_instance (pos->back ().inst_ptr);
const db::Library *pci_lib = cv->layout ().defining_library (pos->back ().inst_ptr.cell_index ()).first;
@ -912,7 +924,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 (), pos->cv_index (), layout->pcell_declaration (pc.second), parameters);
mp_pcell_parameters->setup (lv, pos->cv_index (), layout->pcell_declaration (pc.second), parameters);
pcell_tab->layout ()->addWidget (mp_pcell_parameters);
}

View File

@ -55,7 +55,7 @@ namespace edt
// -----------------------------------------------------------------------------
// Main Service implementation
MainService::MainService (db::Manager *manager, lay::LayoutView *view, lay::Dispatcher *root)
MainService::MainService (db::Manager *manager, lay::LayoutViewBase *view, lay::Dispatcher *root)
: lay::Plugin (view),
lay::Editable (view),
db::Object (manager),
@ -93,7 +93,7 @@ edt::RoundCornerOptionsDialog *
MainService::round_corners_dialog ()
{
if (! mp_round_corners_dialog) {
mp_round_corners_dialog = new edt::RoundCornerOptionsDialog (view ());
mp_round_corners_dialog = new edt::RoundCornerOptionsDialog (view ()->widget ());
}
return mp_round_corners_dialog;
}
@ -102,7 +102,7 @@ edt::AlignOptionsDialog *
MainService::align_options_dialog ()
{
if (! mp_align_options_dialog) {
mp_align_options_dialog = new edt::AlignOptionsDialog (view ());
mp_align_options_dialog = new edt::AlignOptionsDialog (view ()->widget ());
}
return mp_align_options_dialog;
}
@ -111,7 +111,7 @@ edt::DistributeOptionsDialog *
MainService::distribute_options_dialog ()
{
if (! mp_distribute_options_dialog) {
mp_distribute_options_dialog = new edt::DistributeOptionsDialog (view ());
mp_distribute_options_dialog = new edt::DistributeOptionsDialog (view ()->widget ());
}
return mp_distribute_options_dialog;
}
@ -120,7 +120,7 @@ lay::FlattenInstOptionsDialog *
MainService::flatten_inst_options_dialog ()
{
if (! mp_flatten_inst_options_dialog) {
mp_flatten_inst_options_dialog = new lay::FlattenInstOptionsDialog (view (), false /*don't allow pruning*/);
mp_flatten_inst_options_dialog = new lay::FlattenInstOptionsDialog (view ()->widget (), false /*don't allow pruning*/);
}
return mp_flatten_inst_options_dialog;
}
@ -129,7 +129,7 @@ edt::MakeCellOptionsDialog *
MainService::make_cell_options_dialog ()
{
if (! mp_make_cell_options_dialog) {
mp_make_cell_options_dialog = new edt::MakeCellOptionsDialog (view ());
mp_make_cell_options_dialog = new edt::MakeCellOptionsDialog (view ()->widget ());
}
return mp_make_cell_options_dialog;
}
@ -138,7 +138,7 @@ edt::MakeArrayOptionsDialog *
MainService::make_array_options_dialog ()
{
if (! mp_make_array_options_dialog) {
mp_make_array_options_dialog = new edt::MakeArrayOptionsDialog (view ());
mp_make_array_options_dialog = new edt::MakeArrayOptionsDialog (view ()->widget ());
}
return mp_make_array_options_dialog;
}
@ -1188,9 +1188,10 @@ MainService::cm_convert_to_pcell ()
}
bool ok = false;
QString item = QInputDialog::getItem (view (), QObject::tr ("Select Target PCell"),
QObject::tr ("Select the PCell the shape should be converted into"),
items, 0, false, &ok);
QString item = QInputDialog::getItem (view ()->widget (),
QObject::tr ("Select Target PCell"),
QObject::tr ("Select the PCell the shape should be converted into"),
items, 0, false, &ok);
if (! ok) {
return;
}
@ -1289,7 +1290,7 @@ MainService::cm_convert_to_pcell ()
}
if (any_non_converted) {
QMessageBox::warning (view (), QObject::tr ("Warning"), QObject::tr ("Some of the shapes could not be converted to the desired PCell"));
QMessageBox::warning (view ()->widget (), QObject::tr ("Warning"), QObject::tr ("Some of the shapes could not be converted to the desired PCell"));
}
manager ()->commit ();
@ -1505,7 +1506,7 @@ MainService::cm_size ()
}
bool ok = false;
QString s = QInputDialog::getText (view (),
QString s = QInputDialog::getText (view ()->widget (),
QObject::tr ("Sizing"),
QObject::tr ("Sizing (in micron, positive or negative). Two values (dx, dy) for anisotropic sizing."),
QLineEdit::Normal, QString::fromUtf8 ("0.0"),
@ -1750,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::LayoutView *view, int cv_index, const db::InstElement &inst_element, bool visible_only)
inst_bbox (const db::CplxTrans &tr, lay::LayoutViewBase *view, int cv_index, const db::InstElement &inst_element, bool visible_only)
{
db::DBox box;
@ -1779,7 +1780,7 @@ MainService::cm_align ()
std::vector<edt::Service *> edt_services = view ()->get_plugins <edt::Service> ();
if (! align_options_dialog ()->exec_dialog (view (), m_align_hmode, m_align_vmode, m_align_visible_layers)) {
if (! align_options_dialog ()->exec_dialog (m_align_hmode, m_align_vmode, m_align_visible_layers)) {
return;
}
@ -1865,9 +1866,9 @@ MainService::cm_distribute ()
std::vector<edt::Service *> edt_services = view ()->get_plugins <edt::Service> ();
if (! distribute_options_dialog ()->exec_dialog (view (), m_hdistribute, m_distribute_hmode, m_distribute_hpitch, m_distribute_hspace,
m_vdistribute, m_distribute_vmode, m_distribute_vpitch, m_distribute_vspace,
m_distribute_visible_layers)) {
if (! distribute_options_dialog ()->exec_dialog (m_hdistribute, m_distribute_hmode, m_distribute_hpitch, m_distribute_hspace,
m_vdistribute, m_distribute_vmode, m_distribute_vpitch, m_distribute_vspace,
m_distribute_visible_layers)) {
return;
}
@ -2107,7 +2108,7 @@ MainService::cm_tap ()
// List the layers under the cursor as pop up a menu
std::unique_ptr<QMenu> menu (new QMenu (view ()));
std::unique_ptr<QMenu> menu (new QMenu (view ()->widget ()));
menu->show ();
int icon_size = menu->style ()->pixelMetric (QStyle::PM_ButtonIconSize);
@ -2294,7 +2295,7 @@ class NewObjectsSelection
: public db::ClipboardDataInsertReceiver
{
public:
NewObjectsSelection (int cv_index, db::cell_index_type topcell, lay::LayoutView *view)
NewObjectsSelection (int cv_index, db::cell_index_type topcell, lay::LayoutViewBase *view)
: m_cv_index (cv_index), m_topcell (topcell)
{
mp_polygon_service = view->get_plugin <edt::PolygonService> ();

View File

@ -64,7 +64,7 @@ public:
/**
* @brief The constructor
*/
MainService (db::Manager *manager, lay::LayoutView *view, lay::Dispatcher *root);
MainService (db::Manager *manager, lay::LayoutViewBase *view, lay::Dispatcher *root);
/**
* @brief The destructor
@ -74,7 +74,7 @@ public:
/**
* @brief Access to the view object
*/
lay::LayoutView *view () const
lay::LayoutViewBase *view () const
{
return mp_view;
}
@ -196,7 +196,7 @@ public:
private:
// The layout view that this service is attached to
lay::LayoutView *mp_view;
lay::LayoutViewBase *mp_view;
lay::Dispatcher *mp_root;
bool m_needs_update;

View File

@ -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::LayoutView *view, lay::Dispatcher *root)
PartialService::PartialService (db::Manager *manager, lay::LayoutViewBase *view, lay::Dispatcher *root)
: QObject (),
lay::EditorServiceBase (view),
db::Object (manager),

View File

@ -149,7 +149,7 @@ public:
/**
* @brief The constructor
*/
PartialService (db::Manager *manager, lay::LayoutView *view, lay::Dispatcher *root);
PartialService (db::Manager *manager, lay::LayoutViewBase *view, lay::Dispatcher *root);
/**
* @brief The destructor
@ -159,7 +159,7 @@ public:
/**
* @brief Access to the view object
*/
lay::LayoutView *view () const
lay::LayoutViewBase *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::LayoutView *mp_view;
lay::LayoutViewBase *mp_view;
lay::Dispatcher *mp_root;
bool m_dragging;
bool m_keep_selection;

View File

@ -179,18 +179,21 @@ public:
// .. nothing yet ..
}
virtual void get_editor_options_pages (std::vector<lay::EditorOptionsPage *> &pages, lay::LayoutView *view, lay::Dispatcher *root) const
virtual void get_editor_options_pages (std::vector<lay::EditorOptionsPage *> &pages, lay::LayoutViewBase *view, lay::Dispatcher *root) const
{
lay::LayoutView *lv = dynamic_cast<lay::LayoutView *> (view);
tl_assert (lv != 0);
if (mp_pages_f != 0) {
size_t nstart = pages.size ();
(*mp_pages_f) (pages, view, root);
(*mp_pages_f) (pages, lv, root);
while (nstart < pages.size ()) {
pages [nstart++]->set_plugin_declaration (this);
}
}
}
virtual lay::Plugin *create_plugin (db::Manager *manager, lay::Dispatcher *, lay::LayoutView *view) const
virtual lay::Plugin *create_plugin (db::Manager *manager, lay::Dispatcher *, lay::LayoutViewBase *view) const
{
Svc *service = new Svc (manager, view);
service->set_plugin_declaration (this);
@ -312,7 +315,7 @@ public:
return false;
}
virtual lay::Plugin *create_plugin (db::Manager *manager, lay::Dispatcher *root, lay::LayoutView *view) const
virtual lay::Plugin *create_plugin (db::Manager *manager, lay::Dispatcher *root, lay::LayoutViewBase *view) const
{
return new edt::MainService (manager, view, root);
}
@ -327,10 +330,13 @@ public:
return false;
}
virtual void get_editor_options_pages (std::vector<lay::EditorOptionsPage *> &pages, lay::LayoutView *view, lay::Dispatcher *dispatcher) const
virtual void get_editor_options_pages (std::vector<lay::EditorOptionsPage *> &pages, lay::LayoutViewBase *view, lay::Dispatcher *dispatcher) const
{
lay::LayoutView *lv = dynamic_cast<lay::LayoutView *> (view);
tl_assert (lv != 0);
// NOTE: we do not set plugin_declaration which makes the page unspecific
EditorOptionsGeneric *generic_opt = new EditorOptionsGeneric (view, dispatcher);
EditorOptionsGeneric *generic_opt = new EditorOptionsGeneric (lv, dispatcher);
pages.push_back (generic_opt);
}
@ -413,9 +419,14 @@ private:
static tl::RegisteredClass<lay::PluginDeclaration> config_decl_main (new edt::MainPluginDeclaration (tl::to_string (QObject::tr ("Instances and shapes"))), 4000, "edt::MainService");
void
commit_recent (lay::LayoutView *view)
commit_recent (lay::LayoutViewBase *view)
{
lay::EditorOptionsPages *eo_pages = view->editor_options_pages ();;
lay::LayoutView *lv = dynamic_cast<lay::LayoutView *> (view);
if (!lv) {
return;
}
lay::EditorOptionsPages *eo_pages = lv->editor_options_pages ();
if (!eo_pages) {
return;
}
@ -442,12 +453,12 @@ public:
// .. nothing yet ..
}
virtual void get_editor_options_pages (std::vector<lay::EditorOptionsPage *> & /*pages*/, lay::LayoutView * /*view*/, lay::Dispatcher * /*root*/) const
virtual void get_editor_options_pages (std::vector<lay::EditorOptionsPage *> & /*pages*/, lay::LayoutViewBase * /*view*/, lay::Dispatcher * /*root*/) const
{
// .. no specific ones ..
}
virtual lay::Plugin *create_plugin (db::Manager *manager, lay::Dispatcher *root, lay::LayoutView *view) const
virtual lay::Plugin *create_plugin (db::Manager *manager, lay::Dispatcher *root, lay::LayoutViewBase *view) const
{
return new edt::PartialService (manager, view, root);
}

View File

@ -32,6 +32,7 @@ namespace lay
{
class Dispatcher;
class EditorOptionsPage;
class LayoutView;
}
namespace edt
@ -48,7 +49,7 @@ namespace edt
/**
* @brief Commits the current configuration for the recently used configuration list
*/
void commit_recent (lay::LayoutView *view);
void commit_recent (lay::LayoutViewBase *view);
}
#endif

View File

@ -360,15 +360,21 @@ ShapePropertiesPage::update_shape ()
void
ShapePropertiesPage::show_inst ()
{
lay::LayoutView *lv = dynamic_cast<lay::LayoutView *> (mp_service->view ());
tl_assert (lv != 0);
InstantiationForm inst_form (this);
inst_form.show (mp_service->view (), *m_selection_ptrs [m_index]);
inst_form.show (lv, *m_selection_ptrs [m_index]);
}
void
ShapePropertiesPage::show_props ()
{
lay::LayoutView *lv = dynamic_cast<lay::LayoutView *> (mp_service->view ());
tl_assert (lv != 0);
lay::UserPropertiesForm props_form (this);
if (props_form.show (mp_service->view (), m_selection_ptrs [m_index]->cv_index (), m_prop_id)) {
if (props_form.show (lv, m_selection_ptrs [m_index]->cv_index (), m_prop_id)) {
emit edited ();
}
}

View File

@ -60,7 +60,7 @@ ac_from_buttons (unsigned int buttons)
// -------------------------------------------------------------
Service::Service (db::Manager *manager, lay::LayoutView *view, db::ShapeIterator::flags_type flags)
Service::Service (db::Manager *manager, lay::LayoutViewBase *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::LayoutView *view, db::ShapeIterator
// .. nothing yet ..
}
Service::Service (db::Manager *manager, lay::LayoutView *view)
Service::Service (db::Manager *manager, lay::LayoutViewBase *view)
: lay::EditorServiceBase (view),
db::Object (manager),
mp_view (view),
@ -312,7 +312,7 @@ Service::copy ()
void
Service::copy_selected ()
{
edt::CopyModeDialog mode_dialog (view ());
edt::CopyModeDialog mode_dialog (view ()->widget ());
bool need_to_ask_for_copy_mode = false;
unsigned int inst_mode = 0;

View File

@ -82,12 +82,12 @@ public:
/**
* @brief The constructor for an service selecting shapes
*/
Service (db::Manager *manager, lay::LayoutView *view, db::ShapeIterator::flags_type shape_types);
Service (db::Manager *manager, lay::LayoutViewBase *view, db::ShapeIterator::flags_type shape_types);
/**
* @brief The constructor for an service selecting instances
*/
Service (db::Manager *manager, lay::LayoutView *view);
Service (db::Manager *manager, lay::LayoutViewBase *view);
/**
* @brief The destructor
@ -243,7 +243,7 @@ public:
/**
* @brief Access to the view object
*/
lay::LayoutView *view () const
lay::LayoutViewBase *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::LayoutView *mp_view;
lay::LayoutViewBase *mp_view;
// The marker objects representing the selection
std::vector<lay::ViewObject *> m_markers;

View File

@ -47,7 +47,7 @@ namespace edt
// -----------------------------------------------------------------------------
// ShapeEditService implementation
ShapeEditService::ShapeEditService (db::Manager *manager, lay::LayoutView *view, db::ShapeIterator::flags_type shape_types)
ShapeEditService::ShapeEditService (db::Manager *manager, lay::LayoutViewBase *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::LayoutView *view)
PolygonService::PolygonService (db::Manager *manager, lay::LayoutViewBase *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::LayoutView *view)
BoxService::BoxService (db::Manager *manager, lay::LayoutViewBase *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::LayoutView *view)
TextService::TextService (db::Manager *manager, lay::LayoutViewBase *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::LayoutView *view)
PathService::PathService (db::Manager *manager, lay::LayoutViewBase *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::LayoutView *view)
InstService::InstService (db::Manager *manager, lay::LayoutViewBase *view)
: edt::Service (manager, view),
m_angle (0.0), m_scale (1.0),
m_mirror (false), m_is_pcell (false),

View File

@ -45,7 +45,7 @@ class ShapeEditService
: public edt::Service
{
public:
ShapeEditService (db::Manager *manager, lay::LayoutView *view, db::ShapeIterator::flags_type shape_types);
ShapeEditService (db::Manager *manager, lay::LayoutViewBase *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::LayoutView *view);
PolygonService (db::Manager *manager, lay::LayoutViewBase *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::LayoutView *view);
BoxService (db::Manager *manager, lay::LayoutViewBase *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::LayoutView *view);
TextService (db::Manager *manager, lay::LayoutViewBase *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::LayoutView *view);
PathService (db::Manager *manager, lay::LayoutViewBase *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::LayoutView *view);
InstService (db::Manager *manager, lay::LayoutViewBase *view);
virtual lay::PropertiesPage *properties_page (db::Manager *manager, QWidget *parent);
virtual void do_begin_edit (const db::DPoint &p);

View File

@ -77,7 +77,7 @@ std::map<std::string, tl::Variant> pcell_parameters_from_string (const std::stri
// -------------------------------------------------------------
// SelectionIterator implementation
SelectionIterator::SelectionIterator (lay::LayoutView *view, bool including_transient)
SelectionIterator::SelectionIterator (lay::LayoutViewBase *view, bool including_transient)
: m_transient_mode (false)
{
mp_edt_services = view->get_plugins <edt::Service> ();
@ -145,7 +145,7 @@ SelectionIterator::next ()
// TransformationsVariants implementation
// for a lay::LayoutView
TransformationVariants::TransformationVariants (const lay::LayoutView *view, bool per_cv_and_layer, bool per_cv)
TransformationVariants::TransformationVariants (const lay::LayoutViewBase *view, bool per_cv_and_layer, bool per_cv)
{
// build the transformation variants cache

View File

@ -40,7 +40,7 @@
namespace lay
{
class LayoutView;
class LayoutViewBase;
}
namespace edt {
@ -84,7 +84,7 @@ public:
class TransformationVariants
{
public:
TransformationVariants (const lay::LayoutView *view, bool per_cv_and_layer = true, bool per_cv = true);
TransformationVariants (const lay::LayoutViewBase *view, bool per_cv_and_layer = true, bool per_cv = true);
const std::vector<db::DCplxTrans> *per_cv_and_layer (unsigned int cv, unsigned int layer) const;
const std::vector<db::DCplxTrans> *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::LayoutView *view, bool including_transient = true);
SelectionIterator (lay::LayoutViewBase *view, bool including_transient = true);
/**
* @brief Returns a value indicating whether the transient selection is taken

View File

@ -299,8 +299,8 @@ gsi::Class<img::DataMapping> decl_ImageDataMapping ("lay", "ImageDataMapping",
class ImageRef;
static void replace_image (lay::LayoutView *view, size_t id, ImageRef &new_obj);
static void erase_image (lay::LayoutView *view, size_t id);
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);
/**
* @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::LayoutView *view)
ImageRef (const img::Object &other, lay::LayoutViewBase *view)
: img::Object (other), mp_view (view), dm_update_view (this, &ImageRef::do_update_view)
{
// .. nothing yet ..
@ -365,7 +365,7 @@ public:
void erase ()
{
if (mp_view) {
erase_image (mp_view.get (), id ());
erase_image_base (mp_view.get (), id ());
detach ();
}
}
@ -373,7 +373,7 @@ public:
template <class T>
ImageRef transformed (const T &t) const
{
return ImageRef (img::Object::transformed<T> (t), const_cast<lay::LayoutView *> (mp_view.get ()));
return ImageRef (img::Object::transformed<T> (t), const_cast<lay::LayoutViewBase *> (mp_view.get ()));
}
void set_view (lay::LayoutView *view)
@ -398,12 +398,12 @@ protected:
void do_update_view ()
{
if (mp_view) {
replace_image (mp_view.get (), id (), *this);
replace_image_base (mp_view.get (), id (), *this);
}
}
private:
tl::weak_ptr<lay::LayoutView> mp_view;
tl::weak_ptr<lay::LayoutViewBase> mp_view;
tl::DeferredMethod<ImageRef> dm_update_view;
};
@ -1114,7 +1114,7 @@ static void show_image (lay::LayoutView *view, size_t id, bool visible)
}
}
static void replace_image (lay::LayoutView *view, size_t id, ImageRef &new_obj)
void replace_image_base (lay::LayoutViewBase *view, size_t id, ImageRef &new_obj)
{
img::Service *img_service = view->get_plugin <img::Service> ();
if (img_service) {
@ -1129,7 +1129,12 @@ static void replace_image (lay::LayoutView *view, size_t id, ImageRef &new_obj)
}
}
static void erase_image (lay::LayoutView *view, size_t id)
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)
{
img::Service *img_service = view->get_plugin <img::Service> ();
if (img_service) {
@ -1144,6 +1149,11 @@ static void erase_image (lay::LayoutView *view, size_t id)
}
}
static void erase_image (lay::LayoutView *view, size_t id)
{
erase_image_base (view, id);
}
static void insert_image (lay::LayoutView *view, ImageRef &obj)
{
if (obj.is_valid ()) {

View File

@ -45,7 +45,7 @@ PluginDeclaration::get_menu_entries (std::vector<lay::MenuEntry> &menu_entries)
}
lay::Plugin *
PluginDeclaration::create_plugin (db::Manager *manager, lay::Dispatcher *, lay::LayoutView *view) const
PluginDeclaration::create_plugin (db::Manager *manager, lay::Dispatcher *, lay::LayoutViewBase *view) const
{
return new img::Service (manager, view);
}

View File

@ -36,7 +36,7 @@ class PluginDeclaration
{
public:
virtual void get_menu_entries (std::vector<lay::MenuEntry> &menu_entries) const;
virtual lay::Plugin *create_plugin (db::Manager *manager, lay::Dispatcher *, lay::LayoutView *view) const;
virtual lay::Plugin *create_plugin (db::Manager *manager, lay::Dispatcher *, lay::LayoutViewBase *view) const;
virtual bool implements_editable (std::string &title) const;
virtual void get_options (std::vector < std::pair<std::string, std::string> > &options) const;
};

View File

@ -402,7 +402,7 @@ View::render (const lay::Viewport &vp, lay::ViewObjectCanvas &canvas)
// -------------------------------------------------------------
// img::Service implementation
Service::Service (db::Manager *manager, lay::LayoutView *view)
Service::Service (db::Manager *manager, lay::LayoutViewBase *view)
: lay::BackgroundViewObject (view->view_object_widget ()),
lay::Editable (view),
lay::Plugin (view),

View File

@ -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::LayoutView *view);
Service (db::Manager *manager, lay::LayoutViewBase *view);
~Service ();
@ -432,7 +432,7 @@ public:
/**
* @brief Access to the view object
*/
lay::LayoutView *view () const
lay::LayoutViewBase *view () const
{
return mp_view;
}
@ -480,7 +480,7 @@ public:
private:
// The layout view that the image service is attached to
lay::LayoutView *mp_view;
lay::LayoutViewBase *mp_view;
// The view objects representing the selection and the moved images in move mode
std::vector<View *> m_selected_image_views;

View File

@ -55,7 +55,7 @@ public:
menu_entries.push_back (lay::menu_item ("clip_tool::show", "clip_tool:edit_mode", "edit_menu.utils_menu.end", tl::to_string (QObject::tr ("Clip Tool"))));
}
virtual lay::Plugin *create_plugin (db::Manager *, lay::Dispatcher *root, lay::LayoutView *view) const
virtual lay::Plugin *create_plugin (db::Manager *, lay::Dispatcher *root, lay::LayoutViewBase *view) const
{
return new ClipDialog (root, view);
}

View File

@ -62,7 +62,7 @@ public:
menu_entries.push_back (lay::menu_item ("fill_tool::show", "fill_tool:edit_mode", "edit_menu.utils_menu.end", tl::to_string (QObject::tr ("Fill Tool"))));
}
virtual lay::Plugin *create_plugin (db::Manager *, lay::Dispatcher *root, lay::LayoutView *view) const
virtual lay::Plugin *create_plugin (db::Manager *, lay::Dispatcher *root, lay::LayoutViewBase *view) const
{
return new FillDialog (root, view);
}

View File

@ -63,7 +63,7 @@ public:
menu_entries.push_back (lay::menu_item ("search_replace::show", "search_replace_viewer:edit:view_mode", "edit_menu.utils_group+", tl::to_string (QObject::tr ("Search"))));
}
virtual lay::Plugin *create_plugin (db::Manager *, lay::Dispatcher *root, lay::LayoutView *view) const
virtual lay::Plugin *create_plugin (db::Manager *, lay::Dispatcher *root, lay::LayoutViewBase *view) const
{
return new SearchReplaceDialog (root, view);
}

View File

@ -29,7 +29,7 @@ namespace gsi
{
static
lay::DMarker *create_marker (lay::LayoutView *view)
lay::DMarker *create_marker (lay::LayoutViewBase *view)
{
return new lay::DMarker (view);
}

View File

@ -40,7 +40,7 @@ namespace gsi
// since PluginBase object are only allowed to be created inside the create_plugin method
// of the factory, this hack is a quick but dirty workaround.
static bool s_in_create_plugin = false;
static lay::LayoutView *sp_view = 0;
static lay::LayoutViewBase *sp_view = 0;
static lay::Dispatcher *sp_dispatcher = 0;
class PluginBase
@ -393,7 +393,7 @@ public:
}
}
virtual lay::Plugin *create_plugin (db::Manager *manager, lay::Dispatcher *root, lay::LayoutView *view) const
virtual lay::Plugin *create_plugin (db::Manager *manager, lay::Dispatcher *root, lay::LayoutViewBase *view) const
{
if (f_create_plugin.can_issue ()) {
return create_plugin_gsi (manager, root, view);
@ -402,7 +402,7 @@ public:
}
}
virtual gsi::PluginBase *create_plugin_gsi (db::Manager *manager, lay::Dispatcher *root, lay::LayoutView *view) const
virtual gsi::PluginBase *create_plugin_gsi (db::Manager *manager, lay::Dispatcher *root, lay::LayoutViewBase *view) const
{
// TODO: this is a hack. See notes above at s_in_create_plugin
s_in_create_plugin = true;
@ -410,7 +410,7 @@ public:
sp_dispatcher = root;
gsi::PluginBase *ret = 0;
try {
ret = f_create_plugin.issue<PluginFactoryBase, gsi::PluginBase *, db::Manager *, lay::Dispatcher *, lay::LayoutView *> (&PluginFactoryBase::create_plugin_gsi, manager, root, view);
ret = f_create_plugin.issue<PluginFactoryBase, gsi::PluginBase *, db::Manager *, lay::Dispatcher *, lay::LayoutViewBase *> (&PluginFactoryBase::create_plugin_gsi, manager, root, view);
s_in_create_plugin = false;
sp_view = 0;
sp_dispatcher = 0;

View File

@ -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::LayoutView *view) const
virtual lay::Plugin *create_plugin (db::Manager *, lay::Dispatcher *root, lay::LayoutViewBase *view) const
{
return new BrowseInstancesForm (root, view);
}
@ -289,7 +289,7 @@ private:
// ------------------------------------------------------------
BrowseInstancesForm::BrowseInstancesForm (lay::Dispatcher *root, lay::LayoutView *vw)
BrowseInstancesForm::BrowseInstancesForm (lay::Dispatcher *root, LayoutViewBase *vw)
: lay::Browser (root, vw),
Ui::BrowseInstancesForm (),
m_cv_index (0),
@ -349,9 +349,12 @@ void
BrowseInstancesForm::choose_cell_pressed ()
{
BEGIN_PROTECTED
CellSelectionForm form (this, view (), "browse_cell", true /*simple mode*/);
if (form.exec ()) {
change_cell (form.selected_cellview ().cell_index (), form.selected_cellview_index ());
lay::LayoutView *lv = dynamic_cast<lay::LayoutView *> (view ());
if (lv) {
CellSelectionForm form (this, lv, "browse_cell", true /*simple mode*/);
if (form.exec ()) {
change_cell (form.selected_cellview ().cell_index (), form.selected_cellview_index ());
}
}
END_PROTECTED
}
@ -522,18 +525,21 @@ struct BrowseInstancesCellInfo
void
BrowseInstancesForm::activated ()
{
view ()->save_view (m_display_state);
lay::LayoutView *lv = dynamic_cast<lay::LayoutView *> (view ());
tl_assert (lv != 0);
lv->save_view (m_display_state);
// if no cellviews are available, don't do anything
if (! view ()->cellviews ()) {
if (! lv->cellviews ()) {
return;
}
// obtain active cellview index and cell index
int cv_index = view ()->active_cellview_index ();
int cv_index = lv->active_cellview_index ();
lay::LayoutView::cell_path_type path;
view ()->current_cell_path (path);
lv->current_cell_path (path);
// no cell to index
if (path.empty ()) {

View File

@ -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::LayoutView *view);
BrowseInstancesForm (lay::Dispatcher *root, lay::LayoutViewBase *view);
~BrowseInstancesForm ();
bool eventFilter (QObject *watched, QEvent *event);

View File

@ -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::LayoutView *view) const
virtual lay::Plugin *create_plugin (db::Manager *, lay::Dispatcher *root, lay::LayoutViewBase *view) const
{
return new BrowseShapesForm (root, view);
}
@ -392,7 +392,7 @@ private:
// ------------------------------------------------------------
BrowseShapesForm::BrowseShapesForm (lay::Dispatcher *root, lay::LayoutView *vw)
BrowseShapesForm::BrowseShapesForm (lay::Dispatcher *root, LayoutViewBase *vw)
: lay::Browser (root, vw),
Ui::BrowseShapesForm (),
m_cv_index (-1),
@ -660,9 +660,12 @@ BrowseShapesForm::cell_inst_changed (QTreeWidgetItem *, QTreeWidgetItem *)
void
BrowseShapesForm::activated ()
{
view ()->save_view (m_display_state);
lay::LayoutView *lv = dynamic_cast<lay::LayoutView *> (view ());
tl_assert (lv != 0);
std::vector <lay::LayerPropertiesConstIterator> sel_layers = view ()->selected_layers ();
lv->save_view (m_display_state);
std::vector <lay::LayerPropertiesConstIterator> sel_layers = lv->selected_layers ();
if (sel_layers.empty ()) {
throw tl::Exception (tl::to_string (QObject::tr ("No layer selected")));
@ -688,7 +691,7 @@ BrowseShapesForm::activated ()
}
} else {
m_cv_index = cv_index;
m_cellview = view ()->cellview (m_cv_index);
m_cellview = lv->cellview (m_cv_index);
}
}

View File

@ -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, lay::LayoutView *view);
BrowseShapesForm (lay::Dispatcher *root, LayoutViewBase *view);
~BrowseShapesForm ();
bool eventFilter (QObject *watched, QEvent *event);

View File

@ -32,9 +32,9 @@ namespace lay
{
#if QT_VERSION >= 0x050000
Browser::Browser (lay::Dispatcher *root, lay::LayoutView *view, const char *name, Qt::WindowFlags fl)
Browser::Browser (lay::Dispatcher *root, lay::LayoutViewBase *view, const char *name, Qt::WindowFlags fl)
#else
Browser::Browser (lay::Dispatcher *root, lay::LayoutView *view, const char *name, Qt::WFlags fl)
Browser::Browser (lay::Dispatcher *root, lay::LayoutViewBase *view, const char *name, Qt::WFlags fl)
#endif
// TODO: clarify whether to keep the browsers as separate (potentially hidden) windows
: QDialog (0 /*view*/, fl),

View File

@ -47,9 +47,9 @@ public:
* @brief Constructor
*/
#if QT_VERSION >= 0x050000
Browser (lay::Dispatcher *root, lay::LayoutView *view, const char *name = "", Qt::WindowFlags fl = Qt::Window /*adds minimize button for example*/);
Browser (lay::Dispatcher *root, lay::LayoutViewBase *view, const char *name = "", Qt::WindowFlags fl = Qt::Window /*adds minimize button for example*/);
#else
Browser (lay::Dispatcher *root, lay::LayoutView *view, const char *name = "", Qt::WFlags fl = Qt::Window /*adds minimize button for example*/);
Browser (lay::Dispatcher *root, lay::LayoutViewBase *view, const char *name = "", Qt::WFlags fl = Qt::Window /*adds minimize button for example*/);
#endif
/**
@ -93,7 +93,7 @@ public:
/**
* @brief Return the pointer to the layout view
*/
lay::LayoutView *view ()
lay::LayoutViewBase *view ()
{
return mp_view;
}
@ -132,7 +132,7 @@ public:
private:
bool m_active;
lay::LayoutView *mp_view;
lay::LayoutViewBase *mp_view;
lay::Dispatcher *mp_root;
void closeEvent (QCloseEvent *);

View File

@ -49,7 +49,7 @@ static const std::string cfg_cell_selection_search_use_expressions ("cell-select
// ------------------------------------------------------------
CellSelectionForm::CellSelectionForm (QWidget *parent, lay::LayoutView *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),

View File

@ -49,7 +49,7 @@ class LAYBASIC_PUBLIC CellSelectionForm
Q_OBJECT
public:
CellSelectionForm (QWidget *parent, lay::LayoutView *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)

View File

@ -674,7 +674,7 @@ CellViewRef::CellViewRef ()
// .. nothing yet ..
}
CellViewRef::CellViewRef (lay::CellView *cv, lay::LayoutView *view)
CellViewRef::CellViewRef (lay::CellView *cv, lay::LayoutViewBase *view)
: mp_cv (cv), mp_view (view)
{
// .. nothing yet ..
@ -706,7 +706,7 @@ CellViewRef::index () const
}
}
lay::LayoutView *
lay::LayoutViewBase *
CellViewRef::view ()
{
return mp_view.get ();

View File

@ -46,21 +46,6 @@ Dispatcher::Dispatcher (Plugin *parent, bool standalone)
}
}
#if defined(HAVE_QT)
Dispatcher::Dispatcher (QWidget *menu_parent_widget, Plugin *parent, bool standalone)
: Plugin (parent, standalone),
mp_menu_parent_widget (menu_parent_widget),
mp_delegate (0)
{
if (mp_menu_parent_widget) {
mp_menu.reset (new lay::AbstractMenu (this));
}
if (! parent && ! ms_dispatcher_instance) {
ms_dispatcher_instance = this;
}
}
#endif
Dispatcher::Dispatcher (DispatcherDelegate *delegate, Plugin *parent, bool standalone)
: Plugin (parent, standalone),
#if defined(HAVE_QT)

View File

@ -47,7 +47,7 @@ EditorOptionsFrame::~EditorOptionsFrame ()
}
void
EditorOptionsFrame::populate (LayoutView *view)
EditorOptionsFrame::populate (LayoutViewBase *view)
{
std::vector<lay::EditorOptionsPage *> prop_dialog_pages;
for (tl::Registrar<lay::PluginDeclaration>::iterator cls = tl::Registrar<lay::PluginDeclaration>::begin (); cls != tl::Registrar<lay::PluginDeclaration>::end (); ++cls) {

View File

@ -30,7 +30,7 @@ namespace lay
{
class EditorOptionsPages;
class LayoutView;
class LayoutViewBase;
class LAYBASIC_PUBLIC EditorOptionsFrame
: public QFrame
@ -39,7 +39,7 @@ public:
EditorOptionsFrame (QWidget *parent);
virtual ~EditorOptionsFrame ();
void populate (LayoutView *view);
void populate (lay::LayoutViewBase *view);
EditorOptionsPages *pages_widget () const
{

View File

@ -202,7 +202,7 @@ private:
// --------------------------------------------------------------------------------------
EditorServiceBase::EditorServiceBase (lay::LayoutView *view)
EditorServiceBase::EditorServiceBase (LayoutViewBase *view)
: lay::ViewService (view->view_object_widget ()),
lay::Editable (view),
lay::Plugin (view),

View File

@ -46,7 +46,7 @@ public:
/**
* @brief Constructor
*/
EditorServiceBase (lay::LayoutView *view);
EditorServiceBase (lay::LayoutViewBase *view);
/**
* @brief Destructor

View File

@ -86,7 +86,7 @@ Finder::closer (double d)
}
void
Finder::start (lay::LayoutView *view, const lay::CellView &cv, unsigned int cv_index, const std::vector<db::ICplxTrans> &trans, const db::Box &region, int min_level, int max_level, const std::vector<int> &layers)
Finder::start (lay::LayoutViewBase *view, const lay::CellView &cv, unsigned int cv_index, const std::vector<db::ICplxTrans> &trans, const db::Box &region, int min_level, int max_level, const std::vector<int> &layers)
{
m_layers = layers;
m_region = region;
@ -265,7 +265,7 @@ struct LPContextCompareOp
};
bool
ShapeFinder::find (lay::LayoutView *view, const db::DBox &region_mu)
ShapeFinder::find (LayoutViewBase *view, const db::DBox &region_mu)
{
tl::AbsoluteProgress progress (tl::to_string (QObject::tr ("Selecting ...")));
progress.set_unit (1000);
@ -330,7 +330,7 @@ ShapeFinder::find (lay::LayoutView *view, const db::DBox &region_mu)
}
bool
ShapeFinder::find (lay::LayoutView *view, const lay::LayerProperties &lprops, const db::DBox &region_mu)
ShapeFinder::find (lay::LayoutViewBase *view, const lay::LayerProperties &lprops, const db::DBox &region_mu)
{
tl::AbsoluteProgress progress (tl::to_string (QObject::tr ("Selecting ...")));
progress.set_unit (1000);
@ -349,7 +349,7 @@ ShapeFinder::find (lay::LayoutView *view, const lay::LayerProperties &lprops, co
}
bool
ShapeFinder::find_internal (lay::LayoutView *view, unsigned int cv_index, const std::set<db::properties_id_type> *prop_sel, bool inv_prop_sel, const lay::HierarchyLevelSelection &hier_sel, const std::vector<db::DCplxTrans> &trans_mu, const std::vector<int> &layers, const db::DBox &region_mu)
ShapeFinder::find_internal (lay::LayoutViewBase *view, unsigned int cv_index, const std::set<db::properties_id_type> *prop_sel, bool inv_prop_sel, const lay::HierarchyLevelSelection &hier_sel, const std::vector<db::DCplxTrans> &trans_mu, const std::vector<int> &layers, const db::DBox &region_mu)
{
m_cv_index = cv_index;
@ -624,7 +624,7 @@ InstFinder::InstFinder (bool point_mode, bool top_level_sel, bool full_arrays, b
}
bool
InstFinder::find (lay::LayoutView *view, const db::DBox &region_mu)
InstFinder::find (lay::LayoutViewBase *view, const db::DBox &region_mu)
{
tl::AbsoluteProgress progress (tl::to_string (QObject::tr ("Selecting ...")));
progress.set_unit (1000);
@ -641,7 +641,7 @@ InstFinder::find (lay::LayoutView *view, const db::DBox &region_mu)
}
bool
InstFinder::find (lay::LayoutView *view, unsigned int cv_index, const db::DCplxTrans &trans_mu, const db::DBox &region_mu)
InstFinder::find (LayoutViewBase *view, unsigned int cv_index, const db::DCplxTrans &trans_mu, const db::DBox &region_mu)
{
tl::AbsoluteProgress progress (tl::to_string (QObject::tr ("Selecting ...")));
progress.set_unit (1000);
@ -655,7 +655,7 @@ InstFinder::find (lay::LayoutView *view, unsigned int cv_index, const db::DCplxT
}
bool
InstFinder::find_internal (lay::LayoutView *view, unsigned int cv_index, const db::DCplxTrans &trans_mu, const db::DBox &region_mu)
InstFinder::find_internal (LayoutViewBase *view, unsigned int cv_index, const db::DCplxTrans &trans_mu, const db::DBox &region_mu)
{
const lay::CellView &cv = view->cellview (cv_index);
if (! cv.is_valid ()) {

View File

@ -136,7 +136,7 @@ protected:
return m_max_level;
}
lay::LayoutView *view () const
lay::LayoutViewBase *view () const
{
return mp_view;
}
@ -153,7 +153,7 @@ protected:
* path of instantiations up to the top cell is maintained and accessible by
* the path() accessor.
*/
void start (lay::LayoutView *view, const lay::CellView &cv, unsigned int cv_index, const std::vector<db::ICplxTrans> &trans, const db::Box &region, int min_level, int max_level, const std::vector<int> &layers = std::vector<int> ());
void start (LayoutViewBase *view, const lay::CellView &cv, unsigned int cv_index, const std::vector<db::ICplxTrans> &trans, const db::Box &region, int min_level, int max_level, const std::vector<int> &layers = std::vector<int> ());
/**
* @brief Provide a basic edge test facility
@ -186,7 +186,7 @@ private:
int m_min_level, m_max_level;
std::vector<db::InstElement> m_path;
const db::Layout *mp_layout;
lay::LayoutView *mp_view;
lay::LayoutViewBase *mp_view;
unsigned int m_cv_index;
db::Box m_region;
std::vector<int> m_layers;
@ -214,8 +214,8 @@ public:
ShapeFinder (bool point_mode, bool top_level_sel, db::ShapeIterator::flags_type flags, const std::set<lay::ObjectInstPath> *excludes = 0);
bool find (lay::LayoutView *view, const lay::LayerProperties &lprops, const db::DBox &region_mu);
bool find (lay::LayoutView *view, const db::DBox &region_mu);
bool find (LayoutViewBase *view, const lay::LayerProperties &lprops, const db::DBox &region_mu);
bool find (LayoutViewBase *view, const db::DBox &region_mu);
iterator begin () const
{
@ -262,13 +262,13 @@ protected:
private:
virtual void visit_cell (const db::Cell &cell, const db::Box &search_box, const db::ICplxTrans &t, int /*level*/);
bool find_internal (lay::LayoutView *view,
unsigned int cv_index,
const std::set<db::properties_id_type> *prop_sel,
bool inv_prop_sel,
bool find_internal (LayoutViewBase *view,
unsigned int cv_index,
const std::set<db::properties_id_type> *prop_sel,
bool inv_prop_sel,
const lay::HierarchyLevelSelection &hier_sel,
const std::vector<db::DCplxTrans> &trans_mu,
const std::vector<int> &layers,
const std::vector<int> &layers,
const db::DBox &region_mu);
const std::set<lay::ObjectInstPath> *mp_excludes;
@ -300,8 +300,8 @@ public:
InstFinder (bool point_mode, bool top_level_sel, bool full_arrays, bool enclose_inst = true, const std::set<lay::ObjectInstPath> *excludes = 0, bool visible_layers = false);
bool find (lay::LayoutView *view, unsigned int cv_index, const db::DCplxTrans &trans, const db::DBox &region_mu);
bool find (lay::LayoutView *view, const db::DBox &region_mu);
bool find (LayoutViewBase *view, unsigned int cv_index, const db::DCplxTrans &trans, const db::DBox &region_mu);
bool find (LayoutViewBase *view, const db::DBox &region_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 (lay::LayoutView *view, unsigned int cv_index, const db::DCplxTrans &trans_mu, const db::DBox &region_mu);
bool find_internal (LayoutViewBase *view, unsigned int cv_index, const db::DCplxTrans &trans_mu, const db::DBox &region_mu);
unsigned int m_cv_index;
db::cell_index_type m_topcell;
@ -326,7 +326,7 @@ private:
bool m_enclose_insts;
bool m_visible_layers;
std::vector<int> m_visible_layer_indexes;
lay::LayoutView *mp_view;
LayoutViewBase *mp_view;
tl::AbsoluteProgress *mp_progress;
};

View File

@ -105,7 +105,7 @@ GridNetPluginDeclaration::config_page (QWidget *parent, std::string &title) cons
}
lay::Plugin *
GridNetPluginDeclaration::create_plugin (db::Manager *, Dispatcher *, lay::LayoutView *view) const
GridNetPluginDeclaration::create_plugin (db::Manager *, Dispatcher *, lay::LayoutViewBase *view) const
{
return new lay::GridNet (view);
}
@ -192,7 +192,7 @@ GridNetConfigPage::commit (lay::Dispatcher *root)
// ------------------------------------------------------------
// Implementation of the GridNet object
GridNet::GridNet (lay::LayoutView *view)
GridNet::GridNet (LayoutViewBase *view)
: lay::BackgroundViewObject (view->view_object_widget ()),
lay::Plugin (view),
mp_view (view),

View File

@ -45,7 +45,7 @@ class GridNetPluginDeclaration
public:
virtual void get_options (std::vector < std::pair<std::string, std::string> > &options) const;
virtual lay::ConfigPage *config_page (QWidget *parent, std::string &title) const;
virtual lay::Plugin *create_plugin (db::Manager *, lay::Dispatcher *, lay::LayoutView *view) const;
virtual lay::Plugin *create_plugin (db::Manager *, lay::Dispatcher *, lay::LayoutViewBase *view) const;
};
class GridNetConfigPage
@ -83,7 +83,7 @@ public:
CheckerBoard
};
GridNet (lay::LayoutView *view);
GridNet (lay::LayoutViewBase *view);
private:
virtual void render_bg (const lay::Viewport &vp, lay::ViewObjectCanvas &canvas);
@ -91,7 +91,7 @@ private:
// implementation of the lay::Plugin interface
virtual bool configure (const std::string &name, const std::string &value);
lay::LayoutView *mp_view;
lay::LayoutViewBase *mp_view;
bool m_visible;
bool m_show_ruler;
double m_grid;

View File

@ -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::LayoutView *view, unsigned int w, unsigned int h, unsigned int di_off, bool no_state)
LayerTreeModel::icon_for_layer (const lay::LayerPropertiesConstIterator &iter, lay::LayoutViewBase *view, unsigned int w, unsigned int h, unsigned int di_off, bool no_state)
{
h = std::max ((unsigned int) 16, h);
w = std::max ((unsigned int) 16, w);

View File

@ -48,6 +48,7 @@ namespace lay
{
class LayoutView;
class LayoutViewBase;
class LayerPropertiesConstIterator;
/**
@ -108,7 +109,7 @@ public:
/**
* @brief Provides an icon for a given layer style
*/
static QIcon icon_for_layer (const lay::LayerPropertiesConstIterator &iter, lay::LayoutView *view, unsigned int w, unsigned int h, unsigned int di_offset, bool no_state = false);
static QIcon icon_for_layer (const lay::LayerPropertiesConstIterator &iter, lay::LayoutViewBase *view, unsigned int w, unsigned int h, unsigned int di_offset, bool no_state = false);
/**
* @brief Gets the preferred icon size

View File

@ -274,7 +274,7 @@ invert (unsigned char *data, unsigned int width, unsigned int height)
}
}
LayoutCanvas::LayoutCanvas (QWidget *parent, lay::LayoutView *view, const char *name)
LayoutCanvas::LayoutCanvas (QWidget *parent, lay::LayoutViewBase *view, const char *name)
: lay::ViewObjectWidget (parent, name),
mp_view (view),
mp_image (0), mp_image_bg (0), mp_pixmap (0),

View File

@ -689,6 +689,7 @@ LayoutView::ensure_layer_selected ()
void
LayoutView::remove_unused_layers ()
{
// @@@ should not be in control panel
if (mp_control_panel) {
mp_control_panel->cm_remove_unused ();
}
@ -702,6 +703,18 @@ LayoutView::begin_layer_updates ()
}
}
bool
LayoutView::layer_model_updated ()
{
// because check_updated is called in the initialization phase, we check if the pointers
// to the widgets are non-null:
if (mp_control_panel) {
return mp_control_panel->model_updated ();
} else {
return false;
}
}
void
LayoutView::bookmark_current_view ()
{

View File

@ -322,10 +322,20 @@ public:
*/
void remove_unused_layers ();
/**
* @brief Internal method: check, if the layer tree is and an consistent state.
*
* This method is used by the layer tree model to check, if the tree has been brought into
* a consistent state.
* HINT: for the layout this is solved more consistently with the "under construction" attribute
* of the layout. There is no equivalent object for the layer tree currently.
*/
bool layer_model_updated ();
/**
* @brief Returns true, if the layer source shall be shown always in the layer properties tree
*/
bool always_show_source () const
virtual bool always_show_source () const
{
return m_always_show_source;
}
@ -333,7 +343,7 @@ public:
/**
* @brief Returns true, if the layer/datatype shall be shown always in the layer properties tree
*/
bool always_show_ld () const
virtual bool always_show_ld () const
{
return m_always_show_ld;
}
@ -341,7 +351,7 @@ public:
/**
* @brief Returns true, if the layout index shall be shown always in the layer properties tree
*/
bool always_show_layout_index () const
virtual bool always_show_layout_index () const
{
return m_always_show_layout_index;
}
@ -389,6 +399,11 @@ public:
*/
void open_l2ndb_browser (int l2ndb_index, int cv_index);
/**
* @brief Gets the editor options pages
*/
lay::EditorOptionsPages *editor_options_pages ();
/**
* @brief Gets the container with the layer control panel
*/
@ -763,7 +778,6 @@ private:
void init_ui ();
void init_menu ();
lay::EditorOptionsPages *editor_options_pages ();
void do_setup_editor_options_pages ();
protected:

View File

@ -613,6 +613,12 @@ LayoutViewBase::set_synchronous (bool s)
m_synchronous = s;
}
void
LayoutViewBase::message (const std::string & /*s*/, int /*timeout*/)
{
// .. nothing yet ..
}
bool
LayoutViewBase::is_dirty () const
{
@ -1401,6 +1407,24 @@ LayoutViewBase::merge_dither_pattern (lay::LayerPropertiesList &props)
}
}
bool
LayoutViewBase::always_show_source () const
{
return false;
}
bool
LayoutViewBase::always_show_ld () const
{
return true;
}
bool
LayoutViewBase::always_show_layout_index () const
{
return false;
}
void
LayoutViewBase::set_properties (unsigned int index, const LayerPropertiesList &props)
{

View File

@ -243,6 +243,11 @@ public:
return m_title;
}
/**
* @brief Display a status message
*/
void message (const std::string &s = "", int timeout = 10);
/**
* @brief The "dirty" flag indicates that one of the layout has been modified
*
@ -250,6 +255,21 @@ public:
*/
bool is_dirty () const;
/**
* @brief Returns true, if the layer source shall be shown always in the layer properties tree
*/
virtual bool always_show_source () const;
/**
* @brief Returns true, if the layer/datatype shall be shown always in the layer properties tree
*/
virtual bool always_show_ld () const;
/**
* @brief Returns true, if the layout index shall be shown always in the layer properties tree
*/
virtual bool always_show_layout_index () const;
/**
* @brief Fill the layer properties for a new layer
*
@ -402,6 +422,11 @@ public:
return get_properties (index).end_const_recursive ();
}
/**
* @brief Rename a layer properties list
*/
void rename_properties (unsigned int index, const std::string &new_name);
/**
* @brief Replace the current layer properties list
*/
@ -410,11 +435,6 @@ public:
set_properties (current_layer_list (), list);
}
/**
* @brief Rename a layer properties list
*/
void rename_properties (unsigned int index, const std::string &new_name);
/**
* @brief Replace the specified layer properties list
*/
@ -2314,6 +2334,12 @@ public:
void redraw_cell_boxes ();
void timer ();
virtual void deactivate_all_browsers ();
#if defined(HAVE_QT)
virtual QWidget *widget () { return 0; }
#endif
private:
// event handlers used to connect to the layout object's events
void signal_hier_changed ();
@ -2505,7 +2531,6 @@ protected:
virtual void do_set_current_layer (const lay::LayerPropertiesConstIterator &l);
virtual void do_set_no_stipples (bool no_stipples);
virtual void do_set_phase (int phase);
virtual void deactivate_all_browsers ();
virtual bool is_activated () const;
virtual void update_content_for_cv (int cv_index);
virtual void set_active_cellview_index (int index);
@ -2517,10 +2542,6 @@ protected:
virtual void emit_title_changed () { }
virtual void emit_dirty_changed () { }
virtual void emit_layer_order_changed () { }
#if defined(HAVE_QT)
virtual QWidget *widget () { return 0; }
#endif
};
}

View File

@ -77,8 +77,8 @@ validate_cell_path (const db::Layout &layout, lay::LayoutView::cell_path_type &p
return false;
}
LayoutViewFunctions::LayoutViewFunctions (db::Manager *manager, LayoutView *view)
: lay::Plugin (view), mp_view (view), mp_manager (manager)
LayoutViewFunctions::LayoutViewFunctions (db::Manager *manager, LayoutViewBase *view)
: lay::Plugin (view), mp_view (dynamic_cast <lay::LayoutView *> (view)), mp_manager (manager)
{
m_del_cell_mode = 0;
m_move_to_origin_mode_x = 0;
@ -104,6 +104,10 @@ LayoutViewFunctions::~LayoutViewFunctions ()
void
LayoutViewFunctions::menu_activated (const std::string &symbol)
{
if (! view ()) {
return;
}
if (symbol == "cm_show_properties") {
view ()->show_properties (view ());
@ -2240,7 +2244,7 @@ public:
}
}
lay::Plugin *create_plugin (db::Manager *manager, Dispatcher *, LayoutView *view) const
lay::Plugin *create_plugin (db::Manager *manager, Dispatcher *, LayoutViewBase *view) const
{
return new LayoutViewFunctions (manager, view);
}

View File

@ -46,7 +46,7 @@ public:
/**
* @brief Constructor
*/
LayoutViewFunctions (db::Manager *manager, lay::LayoutView *view);
LayoutViewFunctions (db::Manager *manager, lay::LayoutViewBase *view);
/**
* @brief Destructor

View File

@ -188,7 +188,7 @@ void render_cell_inst (const db::Layout &layout, const db::CellInstArray &inst,
// ------------------------------------------------------------------------
MarkerBase::MarkerBase (lay::LayoutView *view)
MarkerBase::MarkerBase (lay::LayoutViewBase *view)
: lay::ViewObject (view->view_object_widget ()),
m_line_width (-1), m_vertex_size (-1), m_halo (-1), m_text_enabled (true), m_vertex_shape (lay::ViewOp::Rect), m_line_style (-1), m_dither_pattern (-1), m_frame_pattern (0), mp_view (view)
{
@ -372,7 +372,7 @@ MarkerBase::get_bitmaps (const Viewport & /*vp*/, ViewObjectCanvas &canvas, lay:
// ------------------------------------------------------------------------
GenericMarkerBase::GenericMarkerBase (lay::LayoutView *view, unsigned int cv_index)
GenericMarkerBase::GenericMarkerBase (lay::LayoutViewBase *view, unsigned int cv_index)
: MarkerBase (view), mp_trans_vector (0), mp_view (view), m_cv_index (cv_index)
{
// .. nothing yet ..
@ -496,7 +496,7 @@ GenericMarkerBase::dbu () const
// ------------------------------------------------------------------------
InstanceMarker::InstanceMarker (lay::LayoutView *view, unsigned int cv_index, bool draw_outline, size_t max_shapes)
InstanceMarker::InstanceMarker (LayoutViewBase *view, unsigned int cv_index, bool draw_outline, size_t max_shapes)
: GenericMarkerBase (view, cv_index), m_draw_outline (draw_outline), m_max_shapes (max_shapes), m_inst ()
{
// .. nothing yet ..
@ -576,7 +576,7 @@ InstanceMarker::item_bbox () const
// ------------------------------------------------------------------------
ShapeMarker::ShapeMarker (lay::LayoutView *view, unsigned int cv_index)
ShapeMarker::ShapeMarker (LayoutViewBase *view, unsigned int cv_index)
: GenericMarkerBase (view, cv_index), m_shape ()
{
// .. nothing yet ..
@ -643,7 +643,7 @@ ShapeMarker::item_bbox () const
// ------------------------------------------------------------------------
Marker::Marker (lay::LayoutView *view, unsigned int cv_index, bool draw_outline, size_t max_shapes)
Marker::Marker (lay::LayoutViewBase *view, unsigned int cv_index, bool draw_outline, size_t max_shapes)
: GenericMarkerBase (view, cv_index), m_draw_outline (draw_outline), m_max_shapes (max_shapes)
{
m_type = None;
@ -1135,7 +1135,7 @@ Marker::render (const Viewport &vp, ViewObjectCanvas &canvas)
// ------------------------------------------------------------------------
DMarker::DMarker (lay::LayoutView *view)
DMarker::DMarker (LayoutViewBase *view)
: MarkerBase (view), mp_view (view)
{
m_type = None;

View File

@ -44,7 +44,7 @@
namespace lay
{
class LayoutView;
class LayoutViewBase;
/**
* @brief The marker base class
@ -59,7 +59,7 @@ public:
/**
* @brief The constructor
*/
MarkerBase (lay::LayoutView *view);
MarkerBase (lay::LayoutViewBase *view);
/**
* @brief Get the color by which the marker is drawn
@ -232,7 +232,7 @@ protected:
bool m_text_enabled;
lay::ViewOp::Shape m_vertex_shape;
int m_line_style, m_dither_pattern, m_frame_pattern;
lay::LayoutView *mp_view;
lay::LayoutViewBase *mp_view;
};
/**
@ -252,7 +252,7 @@ public:
/**
* @brief The constructor
*/
GenericMarkerBase (lay::LayoutView *view, unsigned int cv_index);
GenericMarkerBase (lay::LayoutViewBase *view, unsigned int cv_index);
/**
* @brief The destructor
@ -321,7 +321,7 @@ public:
/**
* @brief Gets the view object
*/
lay::LayoutView *view () const
lay::LayoutViewBase *view () const
{
return mp_view;
}
@ -344,7 +344,7 @@ public:
private:
db::CplxTrans m_trans;
std::vector<db::DCplxTrans> *mp_trans_vector;
lay::LayoutView *mp_view;
lay::LayoutViewBase *mp_view;
unsigned int m_cv_index;
/**
@ -367,7 +367,7 @@ public:
/**
* @brief The constructor
*/
ShapeMarker (lay::LayoutView *view, unsigned int cv_index);
ShapeMarker (lay::LayoutViewBase *view, unsigned int cv_index);
/**
* @brief The destructor
@ -418,7 +418,7 @@ public:
* @param draw_outline True to have instances drawing their outline
* @param max_shapes The maximum number of shapes to draw for instances (just a box is drawn if more shapes are present)
*/
InstanceMarker (lay::LayoutView *view, unsigned int cv_index, bool draw_outline = true, size_t max_shapes = 0);
InstanceMarker (lay::LayoutViewBase *view, unsigned int cv_index, bool draw_outline = true, size_t max_shapes = 0);
/**
* @brief The destructor
@ -508,7 +508,7 @@ public:
* @param draw_outline True to have instances drawing their outline
* @param max_shapes The maximum number of shapes to draw for instances (just a box is drawn if more shapes are present)
*/
Marker (lay::LayoutView *view, unsigned int cv_index, bool draw_outline = true, size_t max_shapes = 0);
Marker (lay::LayoutViewBase *view, unsigned int cv_index, bool draw_outline = true, size_t max_shapes = 0);
/**
* @brief The destructor
@ -743,7 +743,7 @@ public:
/**
* @brief The constructor
*/
DMarker (lay::LayoutView *view);
DMarker (lay::LayoutViewBase *view);
/**
* @brief The destructor
@ -806,7 +806,7 @@ private:
void *any;
} m_object;
lay::LayoutView *mp_view;
lay::LayoutViewBase *mp_view;
};
}

View File

@ -34,9 +34,8 @@ namespace lay
// -------------------------------------------------------------
// MoveService implementation
MoveService::MoveService (lay::LayoutView *view)
: QObject (),
lay::ViewService (view->view_object_widget ()),
MoveService::MoveService (lay::LayoutViewBase *view)
: lay::ViewService (view->view_object_widget ()),
m_dragging (false),
m_dragging_transient (false),
mp_editables (view),

View File

@ -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::LayoutView *view) const
virtual lay::Plugin *create_plugin (db::Manager *, lay::Dispatcher *root, lay::LayoutViewBase *view) const
{
return new lay::NetlistBrowserDialog (root, view);
}

View File

@ -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::LayoutView *vw)
NetlistBrowserDialog::NetlistBrowserDialog (lay::Dispatcher *root, lay::LayoutViewBase *vw)
: lay::Browser (root, vw),
lay::ViewService (vw->view_object_widget ()),
Ui::NetlistBrowserDialog (),
@ -729,19 +729,22 @@ NetlistBrowserDialog::cv_index_changed (int index)
void
NetlistBrowserDialog::activated ()
{
lay::LayoutView *lv = dynamic_cast<lay::LayoutView *> (view ());
tl_assert (lv != 0);
std::string state;
view ()->config_get (cfg_l2ndb_window_state, state);
lv->config_get (cfg_l2ndb_window_state, state);
lay::restore_dialog_state (this, state, false /*don't adjust the section sizes*/);
// Switch to the active cellview index when no valid one is set.
lay::CellView cv = view ()->cellview (m_cv_index);
lay::CellView cv = lv->cellview (m_cv_index);
if (! cv.is_valid ()) {
m_cv_index = view ()->active_cellview_index ();
m_cv_index = lv->active_cellview_index ();
}
if (m_l2n_index < 0 && view ()->get_l2ndb (0) != 0) {
if (m_l2n_index < 0 && lv->get_l2ndb (0) != 0) {
m_l2ndb_name = view ()->get_l2ndb (0)->name ();
m_l2ndb_name = lv->get_l2ndb (0)->name ();
l2ndbs_changed ();
} else {

View File

@ -42,7 +42,7 @@ class NetlistBrowserDialog
Q_OBJECT
public:
NetlistBrowserDialog (lay::Dispatcher *root, lay::LayoutView *view);
NetlistBrowserDialog (lay::Dispatcher *root, lay::LayoutViewBase *view);
~NetlistBrowserDialog ();
void load (int lay_index, int cv_index);

View File

@ -242,7 +242,7 @@ NetlistBrowserPage::set_highlight_style (lay::Color color, int line_width, int v
}
void
NetlistBrowserPage::set_view (lay::LayoutView *view, int cv_index)
NetlistBrowserPage::set_view (lay::LayoutViewBase *view, int cv_index)
{
if (mp_view) {
mp_view->layer_list_changed_event.remove (this, &NetlistBrowserPage::layer_list_changed);
@ -1424,7 +1424,7 @@ NetlistBrowserPage::export_nets (const std::vector<const db::Net *> *nets)
if (dialog->exec_dialog (mp_plugin_root)) {
// NOTE: mp_view and database might get reset to 0 in create_layout
lay::LayoutView *view = mp_view;
lay::LayoutViewBase *view = mp_view;
db::LayoutToNetlist *database = mp_database.get ();
unsigned int cv_index = view->create_layout (true);

View File

@ -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 (lay::LayoutView *view, int cv_index);
void set_view (LayoutViewBase *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::LayoutView *mp_view;
lay::LayoutViewBase *mp_view;
unsigned int m_cv_index;
lay::Dispatcher *mp_plugin_root;
tl::weak_ptr<db::LayoutToNetlist> mp_database;

View File

@ -39,7 +39,7 @@ namespace lay
// -------------------------------------------------------------
// RedrawThread implementation
RedrawThread::RedrawThread (lay::RedrawThreadCanvas *canvas, lay::LayoutView *view)
RedrawThread::RedrawThread (lay::RedrawThreadCanvas *canvas, LayoutViewBase *view)
: tl::Object ()
{
m_initial_update = false;

View File

@ -55,7 +55,7 @@ class RedrawThread
public tl::JobBase
{
public:
RedrawThread (lay::RedrawThreadCanvas *canvas, lay::LayoutView *view);
RedrawThread (lay::RedrawThreadCanvas *canvas, lay::LayoutViewBase *view);
virtual ~RedrawThread ();
void commit (const std::vector <lay::RedrawLayerInfo> &layers, const lay::Viewport &vp, double resolution);
@ -116,7 +116,7 @@ private:
db::DFTrans m_stored_fp;
lay::RedrawThreadCanvas *mp_canvas;
lay::LayoutView *mp_view;
lay::LayoutViewBase *mp_view;
bool m_start_recursion_sentinel;
tl::Clock m_clock;

View File

@ -496,7 +496,7 @@ RedrawThreadWorker::finish ()
}
void
RedrawThreadWorker::setup (LayoutView *view, RedrawThreadCanvas *canvas, const std::vector<db::Box> &redraw_region, const db::DCplxTrans &vp_trans)
RedrawThreadWorker::setup (LayoutViewBase *view, RedrawThreadCanvas *canvas, const std::vector<db::Box> &redraw_region, const db::DCplxTrans &vp_trans)
{
m_redraw_region = redraw_region;
m_vp_trans = vp_trans;

View File

@ -168,7 +168,7 @@ public:
RedrawThreadWorker (RedrawThread *redraw_thread);
virtual ~RedrawThreadWorker ();
void setup (LayoutView *view, RedrawThreadCanvas *canvas, const std::vector<db::Box> &redraw_region, const db::DCplxTrans &vp_trans);
void setup (LayoutViewBase *view, RedrawThreadCanvas *canvas, const std::vector<db::Box> &redraw_region, const db::DCplxTrans &vp_trans);
void finish ();
protected:

View File

@ -37,7 +37,7 @@ namespace lay
// -------------------------------------------------------------
// SelectionService implementation
SelectionService::SelectionService (lay::LayoutView *view)
SelectionService::SelectionService (lay::LayoutViewBase *view)
: QObject (),
lay::ViewService (view->view_object_widget ()),
mp_view (view),

View File

@ -88,7 +88,7 @@ private:
db::DPoint m_p1, m_p2;
db::DPoint m_current_position;
lay::LayoutView *mp_view;
lay::LayoutViewBase *mp_view;
lay::RubberBox *mp_box;
unsigned int m_color;
unsigned int m_buttons;

View File

@ -23,7 +23,7 @@
#include "laySnap.h"
#include "layLayoutView.h"
#include "layLayoutViewBase.h"
#include "dbEdge.h"
@ -282,7 +282,7 @@ public:
* This will run the finder on the given view.
* "search_range" is the search range in micron units.
*/
void find (lay::LayoutView *view, double search_range)
void find (lay::LayoutViewBase *view, double search_range)
{
if (! view) {
return;
@ -586,7 +586,7 @@ private:
}
void
do_find (lay::LayoutView *view, int cv_index, const db::Cell &cell, unsigned int l, int min_level, int max_level, const db::CplxTrans &t)
do_find (lay::LayoutViewBase *view, int cv_index, const db::Cell &cell, unsigned int l, int min_level, int max_level, const db::CplxTrans &t)
{
db::Box touch_box = t.inverted () * m_region;
@ -727,7 +727,7 @@ private:
};
static PointSnapToObjectResult
do_obj_snap (lay::LayoutView *view, const db::DPoint &pt, const db::DVector &grid, double snap_range, const std::vector <db::DEdge> &cutlines)
do_obj_snap (lay::LayoutViewBase *view, const db::DPoint &pt, const db::DVector &grid, double snap_range, const std::vector <db::DEdge> &cutlines)
{
db::DPoint dp (pt);
@ -792,7 +792,7 @@ do_obj_snap (lay::LayoutView *view, const db::DPoint &pt, const db::DVector &gri
}
static TwoPointSnapToObjectResult
do_obj_snap2 (lay::LayoutView *view, const db::DPoint &pt1, const db::DPoint &pt2, const db::DVector &grid, double min_search_range, double max_search_range, const std::vector <db::DEdge> &cutlines)
do_obj_snap2 (lay::LayoutViewBase *view, const db::DPoint &pt1, const db::DPoint &pt2, const db::DVector &grid, double min_search_range, double max_search_range, const std::vector <db::DEdge> &cutlines)
{
db::DPoint dp1 (pt1);
db::DPoint dp2 (pt2);
@ -915,13 +915,13 @@ make_cutlines (lay::angle_constraint_type snap_mode, const db::DPoint &p1, std::
}
PointSnapToObjectResult
obj_snap (lay::LayoutView *view, const db::DPoint &pt, const db::DVector &grid, double snap_range)
obj_snap (lay::LayoutViewBase *view, const db::DPoint &pt, const db::DVector &grid, double snap_range)
{
return do_obj_snap (view, pt, grid, snap_range, std::vector<db::DEdge> ());
}
PointSnapToObjectResult
obj_snap (lay::LayoutView *view, const db::DPoint &p1, const db::DPoint &p2, const db::DVector &grid, lay::angle_constraint_type snap_mode, double snap_range)
obj_snap (lay::LayoutViewBase *view, const db::DPoint &p1, const db::DPoint &p2, const db::DVector &grid, lay::angle_constraint_type snap_mode, double snap_range)
{
std::vector <db::DEdge> cutlines;
make_cutlines (snap_mode, p1, cutlines);
@ -929,19 +929,19 @@ obj_snap (lay::LayoutView *view, const db::DPoint &p1, const db::DPoint &p2, con
}
TwoPointSnapToObjectResult
obj_snap2 (lay::LayoutView *view, const db::DPoint &pt, const db::DVector &grid, double min_search_range, double max_search_range)
obj_snap2 (lay::LayoutViewBase *view, const db::DPoint &pt, const db::DVector &grid, double min_search_range, double max_search_range)
{
return obj_snap2 (view, pt, pt, grid, min_search_range, max_search_range);
}
TwoPointSnapToObjectResult
obj_snap2 (lay::LayoutView *view, const db::DPoint &pt, const db::DVector &grid, lay::angle_constraint_type ac, double min_search_range, double max_search_range)
obj_snap2 (lay::LayoutViewBase *view, const db::DPoint &pt, const db::DVector &grid, lay::angle_constraint_type ac, double min_search_range, double max_search_range)
{
return obj_snap2 (view, pt, pt, grid, ac, min_search_range, max_search_range);
}
TwoPointSnapToObjectResult
obj_snap2 (lay::LayoutView *view, const db::DPoint &pt1, const db::DPoint &pt2, const db::DVector &grid, double min_search_range, double max_search_range)
obj_snap2 (lay::LayoutViewBase *view, const db::DPoint &pt1, const db::DPoint &pt2, const db::DVector &grid, double min_search_range, double max_search_range)
{
db::DPoint dp1 = lay::snap_xy (pt1, grid);
db::DPoint dp2 = lay::snap_xy (pt2, grid);
@ -950,7 +950,7 @@ obj_snap2 (lay::LayoutView *view, const db::DPoint &pt1, const db::DPoint &pt2,
}
TwoPointSnapToObjectResult
obj_snap2 (lay::LayoutView *view, const db::DPoint &pt1, const db::DPoint &pt2, const db::DVector &grid, lay::angle_constraint_type snap_mode, double min_search_range, double max_search_range)
obj_snap2 (lay::LayoutViewBase *view, const db::DPoint &pt1, const db::DPoint &pt2, const db::DVector &grid, lay::angle_constraint_type snap_mode, double min_search_range, double max_search_range)
{
db::DPoint dp1 = lay::snap_xy (pt1, grid);
db::DPoint dp2 = lay::snap_xy (pt2, grid);

View File

@ -41,7 +41,7 @@
namespace lay
{
class LayoutView;
class LayoutViewBase;
/**
* @brief An angle constraint type
@ -154,7 +154,7 @@ namespace lay
* @param grid Either (0,0) to disable grid snapping or a (gx,gy) value for the (potentially anisotropic grid)
* @param snap_range The search range for objects
*/
LAYBASIC_PUBLIC PointSnapToObjectResult obj_snap (lay::LayoutView *view, const db::DPoint &pt, const db::DVector &grid, double snap_range);
LAYBASIC_PUBLIC PointSnapToObjectResult obj_snap (lay::LayoutViewBase *view, const db::DPoint &pt, const db::DVector &grid, double snap_range);
/**
* @brief combined grid-, projection- and object snapping provided to implementing "magnetic features"
@ -162,7 +162,7 @@ namespace lay
* This is a convenience method that creates the projection axes from a reference point and an angle mode.
* "pr" is the reference point, "pt" is the point to snap.
*/
LAYBASIC_PUBLIC PointSnapToObjectResult obj_snap (lay::LayoutView *view, const db::DPoint &pr, const db::DPoint &pt, const db::DVector &grid, lay::angle_constraint_type ac, double snap_range);
LAYBASIC_PUBLIC PointSnapToObjectResult obj_snap (lay::LayoutViewBase *view, const db::DPoint &pr, const db::DPoint &pt, const db::DVector &grid, lay::angle_constraint_type ac, double snap_range);
/**
* @brief A structure describing the snap result for a two-sided object snap (distance measurement)
@ -208,7 +208,7 @@ namespace lay
* This method basically implements "auto measure". The first value of the returned pair
* is true if such an edge could be found. Otherwise it's false.
*/
LAYBASIC_PUBLIC TwoPointSnapToObjectResult obj_snap2 (lay::LayoutView *view, const db::DPoint &pt, const db::DVector &grid, double min_search_range, double max_search_range);
LAYBASIC_PUBLIC TwoPointSnapToObjectResult obj_snap2 (lay::LayoutViewBase *view, const db::DPoint &pt, const db::DVector &grid, double min_search_range, double max_search_range);
/**
* @brief Same than obj_snap, but delivers two points on two opposite sides of the initial points
@ -218,14 +218,14 @@ namespace lay
*
* This version accepts two points defining different search regions for first and second edge.
*/
LAYBASIC_PUBLIC TwoPointSnapToObjectResult obj_snap2 (lay::LayoutView *view, const db::DPoint &pt1, const db::DPoint &pt2, const db::DVector &grid, double min_search_range, double max_search_range);
LAYBASIC_PUBLIC TwoPointSnapToObjectResult obj_snap2 (lay::LayoutViewBase *view, const db::DPoint &pt1, const db::DPoint &pt2, const db::DVector &grid, double min_search_range, double max_search_range);
/**
* @brief Same than the previous obj_snap2, but allows specification of an angle constraint
*
* Measurements will be confined to the direction specified.
*/
LAYBASIC_PUBLIC TwoPointSnapToObjectResult obj_snap2 (lay::LayoutView *view, const db::DPoint &pt, const db::DVector &grid, lay::angle_constraint_type ac, double min_search_range, double max_search_range);
LAYBASIC_PUBLIC TwoPointSnapToObjectResult obj_snap2 (lay::LayoutViewBase *view, const db::DPoint &pt, const db::DVector &grid, lay::angle_constraint_type ac, double min_search_range, double max_search_range);
/**
* @brief Same than the previous obj_snap2, but allows specification of an angle constraint
@ -234,7 +234,7 @@ namespace lay
*
* This version accepts two points defining different search regions for first and second edge.
*/
LAYBASIC_PUBLIC TwoPointSnapToObjectResult obj_snap2 (lay::LayoutView *view, const db::DPoint &pt1, const db::DPoint &pt2, const db::DVector &grid, lay::angle_constraint_type ac, double min_search_range, double max_search_range);
LAYBASIC_PUBLIC TwoPointSnapToObjectResult obj_snap2 (lay::LayoutViewBase *view, const db::DPoint &pt1, const db::DPoint &pt2, const db::DVector &grid, lay::angle_constraint_type ac, double min_search_range, double max_search_range);
/**
* @brief Reduce a given vector according to the angle constraint

View File

@ -31,7 +31,7 @@ namespace lay
// -------------------------------------------------------------
// ZoomService implementation
ZoomService::ZoomService (lay::LayoutView *view)
ZoomService::ZoomService (lay::LayoutViewBase *view)
: lay::ViewService (view->view_object_widget ()),
mp_view (view),
mp_box (0),

View File

@ -302,7 +302,7 @@ public:
menu_entries.push_back (lay::menu_item ("marker_browser::scan_layers_flat", "scan_layers_flat", "tools_menu.shapes_to_markers.end", tl::to_string (QObject::tr ("Flat"))));
}
virtual lay::Plugin *create_plugin (db::Manager *, lay::Dispatcher *root, lay::LayoutView *view) const
virtual lay::Plugin *create_plugin (db::Manager *, lay::Dispatcher *root, lay::LayoutViewBase *view) const
{
return new rdb::MarkerBrowserDialog (root, view);
}

View File

@ -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::LayoutView *vw)
MarkerBrowserDialog::MarkerBrowserDialog (lay::Dispatcher *root, lay::LayoutViewBase *vw)
: lay::Browser (root, vw),
Ui::MarkerBrowserDialog (),
m_context (rdb::AnyCell),
@ -635,19 +635,22 @@ MarkerBrowserDialog::cv_index_changed (int index)
void
MarkerBrowserDialog::activated ()
{
lay::LayoutView *lv = dynamic_cast<lay::LayoutView *> (view ());
tl_assert (lv != 0);
std::string state;
view ()->config_get (cfg_rdb_window_state, state);
lv->config_get (cfg_rdb_window_state, state);
lay::restore_dialog_state (this, state);
// Switch to the active cellview index when no valid one is set.
lay::CellView cv = view ()->cellview (m_cv_index);
lay::CellView cv = lv->cellview (m_cv_index);
if (! cv.is_valid ()) {
m_cv_index = view ()->active_cellview_index ();
m_cv_index = lv->active_cellview_index ();
}
if (m_rdb_index < 0 && view ()->get_rdb (0) != 0) {
if (m_rdb_index < 0 && lv->get_rdb (0) != 0) {
m_rdb_name = view ()->get_rdb (0)->name ();
m_rdb_name = lv->get_rdb (0)->name ();
rdbs_changed ();
} else {
@ -714,7 +717,10 @@ MarkerBrowserDialog::deactivated ()
void
MarkerBrowserDialog::scan_layer ()
{
std::vector<lay::LayerPropertiesConstIterator> layers = view ()->selected_layers ();
lay::LayoutView *lv = dynamic_cast<lay::LayoutView *> (view ());
tl_assert (lv != 0);
std::vector<lay::LayerPropertiesConstIterator> layers = lv->selected_layers ();
if (layers.empty ()) {
throw tl::Exception (tl::to_string (QObject::tr ("No layer selected to get shapes from")));
}
@ -806,13 +812,16 @@ MarkerBrowserDialog::scan_layer ()
}
unsigned int rdb_index = view ()->add_rdb (rdb.release ());
view ()->open_rdb_browser (rdb_index, cv_index);
lv->open_rdb_browser (rdb_index, cv_index);
}
void
MarkerBrowserDialog::scan_layer_flat ()
{
std::vector<lay::LayerPropertiesConstIterator> layers = view ()->selected_layers ();
lay::LayoutView *lv = dynamic_cast<lay::LayoutView *> (view ());
tl_assert (lv != 0);
std::vector<lay::LayerPropertiesConstIterator> layers = lv->selected_layers ();
if (layers.empty ()) {
throw tl::Exception (tl::to_string (QObject::tr ("No layer selected to get shapes from")));
}
@ -882,7 +891,7 @@ MarkerBrowserDialog::scan_layer_flat ()
}
unsigned int rdb_index = view ()->add_rdb (rdb.release ());
view ()->open_rdb_browser (rdb_index, cv_index);
lv->open_rdb_browser (rdb_index, cv_index);
}
void

View File

@ -38,7 +38,7 @@ class MarkerBrowserDialog
Q_OBJECT
public:
MarkerBrowserDialog (lay::Dispatcher *root, lay::LayoutView *view);
MarkerBrowserDialog (lay::Dispatcher *root, lay::LayoutViewBase *view);
~MarkerBrowserDialog ();
void load (int rdb_index, int cv_index);

View File

@ -1620,7 +1620,7 @@ MarkerBrowserPage::set_marker_style (lay::Color color, int line_width, int verte
}
void
MarkerBrowserPage::set_view (lay::LayoutView *view, unsigned int cv_index)
MarkerBrowserPage::set_view (lay::LayoutViewBase *view, unsigned int cv_index)
{
mp_view = view;
m_cv_index = cv_index;

View File

@ -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::LayoutView *view, unsigned int cv_index);
void set_view (lay::LayoutViewBase *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::LayoutView *mp_view;
lay::LayoutViewBase *mp_view;
unsigned int m_cv_index;
std::vector<lay::DMarker *> mp_markers;
db::DBox m_markers_bbox;

View File

@ -494,7 +494,7 @@ public:
// .. nothing yet ..
}
lay::Plugin *create_plugin (db::Manager *, lay::Dispatcher *root, lay::LayoutView *view) const
lay::Plugin *create_plugin (db::Manager *, lay::Dispatcher *root, lay::LayoutViewBase *view) const
{
return new BooleanOperationsPlugin (root, view);
}

View File

@ -102,7 +102,7 @@ public:
// .. nothing yet ..
}
lay::Plugin *create_plugin (db::Manager *, lay::Dispatcher *root, lay::LayoutView *view) const
lay::Plugin *create_plugin (db::Manager *, lay::Dispatcher *root, lay::LayoutViewBase *view) const
{
return new DiffPlugin (root, view);
}

View File

@ -75,7 +75,7 @@ public:
menu_entries.push_back (lay::menu_item ("lay::edit_layer_stack", "edit_layer_stack", "tools_menu.end", tl::to_string (QObject::tr ("Edit Layer Stack"))));
}
virtual lay::Plugin *create_plugin (db::Manager * /*manager*/, lay::Dispatcher *root, lay::LayoutView *view) const
virtual lay::Plugin *create_plugin (db::Manager * /*manager*/, lay::Dispatcher *root, lay::LayoutViewBase *view) const
{
return new NetTracerDialog (root, view);
}

View File

@ -67,7 +67,7 @@ public:
// .. nothing yet ..
}
lay::Plugin *create_plugin (db::Manager *, lay::Dispatcher *root, lay::LayoutView *view) const
lay::Plugin *create_plugin (db::Manager *, lay::Dispatcher *root, lay::LayoutViewBase *view) const
{
return new D25View (root, view);
}

View File

@ -34,7 +34,7 @@ class XORPlugin
: public lay::Plugin
{
public:
XORPlugin (Plugin *parent, lay::LayoutView *view)
XORPlugin (Plugin *parent, lay::LayoutViewBase *view)
: lay::Plugin (parent), mp_view (view)
{
mp_dialog = new lay::XORToolDialog (0);
@ -110,7 +110,7 @@ public:
// .. nothing yet ..
}
lay::Plugin *create_plugin (db::Manager *, lay::Dispatcher *root, lay::LayoutView *view) const
lay::Plugin *create_plugin (db::Manager *, lay::Dispatcher *root, lay::LayoutViewBase *view) const
{
return new XORPlugin (root, view);
}

View File

@ -186,7 +186,7 @@ XORToolDialog::~XORToolDialog ()
}
int
XORToolDialog::exec_dialog (lay::LayoutView *view)
XORToolDialog::exec_dialog (lay::LayoutViewBase *view)
{
mp_view = view;

View File

@ -61,7 +61,7 @@ public:
XORToolDialog (QWidget *parent);
~XORToolDialog ();
int exec_dialog (lay::LayoutView *view);
int exec_dialog (lay::LayoutViewBase *view);
protected:
void accept ();