mirror of
https://github.com/KLayout/klayout.git
synced 2026-09-07 03:21:34 +02:00
WIP: refactoring ongoing.
This commit is contained in:
@@ -116,8 +116,13 @@ public:
|
||||
|
||||
/**
|
||||
* @brief Gets the AbstractMenu object
|
||||
*
|
||||
* This will deliver the actual menu - the one that is the root dispatcher's menu
|
||||
*/
|
||||
AbstractMenu *menu () { return &m_menu; }
|
||||
AbstractMenu *menu ()
|
||||
{
|
||||
return (dispatcher () == this) ? &m_menu : dispatcher ()->menu ();
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Creates a configuration action with the given title, parameter name and value
|
||||
|
||||
@@ -272,7 +272,7 @@ LayoutView::LayoutView (db::Manager *manager, bool editable, lay::Plugin *plugin
|
||||
tl::DeferredMethodScheduler::instance ();
|
||||
|
||||
setObjectName (QString::fromUtf8 (name));
|
||||
init (manager, dispatcher (), parent);
|
||||
init (manager, parent);
|
||||
}
|
||||
|
||||
LayoutView::LayoutView (lay::LayoutView *source, db::Manager *manager, bool editable, lay::Plugin *plugin_parent, QWidget *parent, const char *name, unsigned int options)
|
||||
@@ -293,7 +293,7 @@ LayoutView::LayoutView (lay::LayoutView *source, db::Manager *manager, bool edit
|
||||
|
||||
m_annotation_shapes = source->m_annotation_shapes;
|
||||
|
||||
init (manager, dispatcher (), parent);
|
||||
init (manager, parent);
|
||||
|
||||
// set the handle reference and clear all cell related stuff
|
||||
m_cellviews = source->cellview_list ();
|
||||
@@ -355,12 +355,12 @@ LayoutView::eventFilter(QObject *obj, QEvent *event)
|
||||
}
|
||||
|
||||
void
|
||||
LayoutView::init (db::Manager *mgr, lay::Dispatcher *dispatcher, QWidget * /*parent*/)
|
||||
LayoutView::init (db::Manager *mgr, QWidget * /*parent*/)
|
||||
{
|
||||
manager (mgr);
|
||||
|
||||
if (! dispatcher) {
|
||||
// build the context menus, nothing else so far.
|
||||
if (dispatcher () == this) {
|
||||
// if we're the root dispatcher build the context menus, nothing else so far.
|
||||
menu ()->build (0, 0);
|
||||
}
|
||||
|
||||
@@ -6473,13 +6473,6 @@ LayoutView::intrinsic_mouse_modes (std::vector<std::string> *descriptions)
|
||||
return 2;
|
||||
}
|
||||
|
||||
AbstractMenu *
|
||||
LayoutView::menu ()
|
||||
{
|
||||
// NOTE: dispatcher is either this or the real end of the chain
|
||||
return dispatcher ()->menu ();
|
||||
}
|
||||
|
||||
int
|
||||
LayoutView::default_mode ()
|
||||
{
|
||||
|
||||
@@ -220,12 +220,6 @@ public:
|
||||
*/
|
||||
static LayoutView *current ();
|
||||
|
||||
/**
|
||||
* @brief Gets the abstract menu object for this view
|
||||
* This is either the global menu object or the local one.
|
||||
*/
|
||||
AbstractMenu *menu ();
|
||||
|
||||
/**
|
||||
* @brief Determine if there is something to copy
|
||||
*
|
||||
@@ -2892,7 +2886,7 @@ private:
|
||||
bool m_active_cellview_changed_event_enabled;
|
||||
tl::DeferredMethod<lay::LayoutView> dm_prop_changed;
|
||||
|
||||
void init (db::Manager *mgr, lay::Dispatcher *dispatcher, QWidget *parent);
|
||||
void init (db::Manager *mgr, QWidget *parent);
|
||||
|
||||
void do_prop_changed ();
|
||||
void do_redraw (int layer);
|
||||
|
||||
Reference in New Issue
Block a user