mirror of https://github.com/KLayout/klayout.git
WIP: refactoring ongoing.
This commit is contained in:
parent
674d4b45ad
commit
fa1b98c933
|
|
@ -28,6 +28,7 @@
|
|||
#include "ui_RulerConfigPage4.h"
|
||||
#include "antConfig.h"
|
||||
#include "layConverters.h"
|
||||
#include "layDispatcher.h"
|
||||
#include "layQtTools.h"
|
||||
#include "tlExceptions.h"
|
||||
|
||||
|
|
@ -53,7 +54,7 @@ ConfigPage::~ConfigPage ()
|
|||
}
|
||||
|
||||
void
|
||||
ConfigPage::setup (lay::PluginRoot *root)
|
||||
ConfigPage::setup (lay::Dispatcher *root)
|
||||
{
|
||||
// Snap range
|
||||
int snap_range = 0;
|
||||
|
|
@ -69,7 +70,7 @@ ConfigPage::setup (lay::PluginRoot *root)
|
|||
}
|
||||
|
||||
void
|
||||
ConfigPage::commit (lay::PluginRoot *root)
|
||||
ConfigPage::commit (lay::Dispatcher *root)
|
||||
{
|
||||
root->config_set (cfg_ruler_obj_snap, mp_ui->ruler_obj_snap_cbx->isChecked ());
|
||||
root->config_set (cfg_ruler_grid_snap, mp_ui->ruler_grid_snap_cbx->isChecked ());
|
||||
|
|
@ -99,7 +100,7 @@ ConfigPage2::~ConfigPage2 ()
|
|||
}
|
||||
|
||||
void
|
||||
ConfigPage2::setup (lay::PluginRoot *root)
|
||||
ConfigPage2::setup (lay::Dispatcher *root)
|
||||
{
|
||||
// Max. number of rulers
|
||||
int max_number_of_rulers = -1;
|
||||
|
|
@ -122,7 +123,7 @@ ConfigPage2::setup (lay::PluginRoot *root)
|
|||
}
|
||||
|
||||
void
|
||||
ConfigPage2::commit (lay::PluginRoot *root)
|
||||
ConfigPage2::commit (lay::Dispatcher *root)
|
||||
{
|
||||
int mr;
|
||||
try {
|
||||
|
|
@ -153,7 +154,7 @@ ConfigPage3::~ConfigPage3 ()
|
|||
}
|
||||
|
||||
void
|
||||
ConfigPage3::setup (lay::PluginRoot *root)
|
||||
ConfigPage3::setup (lay::Dispatcher *root)
|
||||
{
|
||||
// snap mode
|
||||
lay::angle_constraint_type rm = lay::AC_Any;
|
||||
|
|
@ -166,7 +167,7 @@ ConfigPage3::setup (lay::PluginRoot *root)
|
|||
}
|
||||
|
||||
void
|
||||
ConfigPage3::commit (lay::PluginRoot *root)
|
||||
ConfigPage3::commit (lay::Dispatcher *root)
|
||||
{
|
||||
lay::angle_constraint_type rm = lay::AC_Any;
|
||||
if (mp_ui->ruler_any_angle_rb->isChecked ()) {
|
||||
|
|
@ -215,7 +216,7 @@ ConfigPage4::~ConfigPage4 ()
|
|||
}
|
||||
|
||||
void
|
||||
ConfigPage4::setup (lay::PluginRoot *root)
|
||||
ConfigPage4::setup (lay::Dispatcher *root)
|
||||
{
|
||||
// templates
|
||||
root->config_get (cfg_ruler_templates, m_ruler_templates, TemplatesConverter ());
|
||||
|
|
@ -236,7 +237,7 @@ ConfigPage4::setup (lay::PluginRoot *root)
|
|||
}
|
||||
|
||||
void
|
||||
ConfigPage4::commit (lay::PluginRoot *root)
|
||||
ConfigPage4::commit (lay::Dispatcher *root)
|
||||
{
|
||||
commit ();
|
||||
|
||||
|
|
|
|||
|
|
@ -50,8 +50,8 @@ public:
|
|||
ConfigPage (QWidget *parent);
|
||||
~ConfigPage ();
|
||||
|
||||
virtual void setup (lay::PluginRoot *root);
|
||||
virtual void commit (lay::PluginRoot *root);
|
||||
virtual void setup (lay::Dispatcher *root);
|
||||
virtual void commit (lay::Dispatcher *root);
|
||||
|
||||
private:
|
||||
Ui::RulerConfigPage *mp_ui;
|
||||
|
|
@ -69,8 +69,8 @@ public:
|
|||
ConfigPage2 (QWidget *parent);
|
||||
~ConfigPage2 ();
|
||||
|
||||
virtual void setup (lay::PluginRoot *root);
|
||||
virtual void commit (lay::PluginRoot *root);
|
||||
virtual void setup (lay::Dispatcher *root);
|
||||
virtual void commit (lay::Dispatcher *root);
|
||||
|
||||
private:
|
||||
Ui::RulerConfigPage2 *mp_ui;
|
||||
|
|
@ -88,8 +88,8 @@ public:
|
|||
ConfigPage3 (QWidget *parent);
|
||||
~ConfigPage3 ();
|
||||
|
||||
virtual void setup (lay::PluginRoot *root);
|
||||
virtual void commit (lay::PluginRoot *root);
|
||||
virtual void setup (lay::Dispatcher *root);
|
||||
virtual void commit (lay::Dispatcher *root);
|
||||
|
||||
private:
|
||||
Ui::RulerConfigPage3 *mp_ui;
|
||||
|
|
@ -107,8 +107,8 @@ public:
|
|||
ConfigPage4 (QWidget *parent);
|
||||
~ConfigPage4 ();
|
||||
|
||||
virtual void setup (lay::PluginRoot *root);
|
||||
virtual void commit (lay::PluginRoot *root);
|
||||
virtual void setup (lay::Dispatcher *root);
|
||||
virtual void commit (lay::Dispatcher *root);
|
||||
|
||||
public slots:
|
||||
void add_clicked ();
|
||||
|
|
|
|||
|
|
@ -23,9 +23,9 @@
|
|||
|
||||
#include "layPlugin.h"
|
||||
#include "layAbstractMenu.h"
|
||||
#include "layAbstractMenuProvider.h"
|
||||
#include "layConverters.h"
|
||||
#include "layConfigurationDialog.h"
|
||||
#include "layDispatcher.h"
|
||||
#include "antConfigPage.h"
|
||||
#include "antConfig.h"
|
||||
#include "antPlugin.h"
|
||||
|
|
@ -85,13 +85,13 @@ void
|
|||
PluginDeclaration::get_menu_entries (std::vector<lay::MenuEntry> &menu_entries) const
|
||||
{
|
||||
lay::PluginDeclaration::get_menu_entries (menu_entries);
|
||||
menu_entries.push_back (lay::MenuEntry ("rulers_group", "edit_menu.end"));
|
||||
menu_entries.push_back (lay::MenuEntry ("ant::clear_all_rulers", "clear_all_rulers:edit", "edit_menu.end", tl::to_string (QObject::tr ("Clear All Rulers And Annotations(Ctrl+K)"))));
|
||||
menu_entries.push_back (lay::MenuEntry ("ant::configure", "configure_rulers", "edit_menu.end", tl::to_string (QObject::tr ("Ruler And Annotation Setup"))));
|
||||
menu_entries.push_back (lay::separator ("rulers_group", "edit_menu.end"));
|
||||
menu_entries.push_back (lay::menu_item ("ant::clear_all_rulers", "clear_all_rulers:edit", "edit_menu.end", tl::to_string (QObject::tr ("Clear All Rulers And Annotations(Ctrl+K)"))));
|
||||
menu_entries.push_back (lay::menu_item ("ant::configure", "configure_rulers", "edit_menu.end", tl::to_string (QObject::tr ("Ruler And Annotation Setup"))));
|
||||
}
|
||||
|
||||
lay::Plugin *
|
||||
PluginDeclaration::create_plugin (db::Manager *manager, lay::PluginRoot *, lay::LayoutView *view) const
|
||||
PluginDeclaration::create_plugin (db::Manager *manager, lay::Dispatcher *, lay::LayoutView *view) const
|
||||
{
|
||||
return new ant::Service (manager, view);
|
||||
}
|
||||
|
|
@ -101,7 +101,7 @@ PluginDeclaration::menu_activated (const std::string &symbol) const
|
|||
{
|
||||
if (symbol == "ant::configure") {
|
||||
|
||||
lay::ConfigurationDialog config_dialog (QApplication::activeWindow (), lay::PluginRoot::instance (), "ant::Plugin");
|
||||
lay::ConfigurationDialog config_dialog (QApplication::activeWindow (), lay::Dispatcher::instance (), "ant::Plugin");
|
||||
config_dialog.exec ();
|
||||
|
||||
return true;
|
||||
|
|
@ -165,7 +165,7 @@ PluginDeclaration::config_finalize ()
|
|||
}
|
||||
|
||||
void
|
||||
PluginDeclaration::initialized (lay::PluginRoot *root)
|
||||
PluginDeclaration::initialized (lay::Dispatcher *root)
|
||||
{
|
||||
// Check if we already have templates (initial setup)
|
||||
bool any_templates = false;
|
||||
|
|
@ -201,7 +201,7 @@ PluginDeclaration::initialized (lay::PluginRoot *root)
|
|||
}
|
||||
|
||||
void
|
||||
PluginDeclaration::uninitialize (lay::PluginRoot *)
|
||||
PluginDeclaration::uninitialize (lay::Dispatcher *)
|
||||
{
|
||||
for (std::vector<lay::Action *>::iterator a = m_actions.begin (); a != m_actions.end (); ++a) {
|
||||
delete *a;
|
||||
|
|
@ -212,7 +212,7 @@ PluginDeclaration::uninitialize (lay::PluginRoot *)
|
|||
void
|
||||
PluginDeclaration::update_current_template ()
|
||||
{
|
||||
lay::AbstractMenuProvider *mp = lay::AbstractMenuProvider::instance ();
|
||||
lay::Dispatcher *mp = lay::Dispatcher::instance ();
|
||||
if (! mp || ! mp->menu ()) {
|
||||
return;
|
||||
}
|
||||
|
|
@ -238,7 +238,7 @@ PluginDeclaration::update_current_template ()
|
|||
void
|
||||
PluginDeclaration::update_menu ()
|
||||
{
|
||||
lay::AbstractMenuProvider *mp = lay::AbstractMenuProvider::instance ();
|
||||
lay::Dispatcher *mp = lay::Dispatcher::instance ();
|
||||
if (! mp || ! mp->menu ()) {
|
||||
return;
|
||||
}
|
||||
|
|
@ -296,8 +296,8 @@ PluginDeclaration::register_annotation_template (const ant::Template &t)
|
|||
}
|
||||
|
||||
m_templates.push_back (t);
|
||||
lay::PluginRoot::instance ()->config_set (cfg_ruler_templates, ant::TemplatesConverter ().to_string (m_templates));
|
||||
lay::PluginRoot::instance ()->config_end ();
|
||||
lay::Dispatcher::instance ()->config_set (cfg_ruler_templates, ant::TemplatesConverter ().to_string (m_templates));
|
||||
lay::Dispatcher::instance ()->config_end ();
|
||||
}
|
||||
|
||||
static tl::RegisteredClass<lay::PluginDeclaration> config_decl (new ant::PluginDeclaration (), 3000, "ant::Plugin");
|
||||
|
|
|
|||
|
|
@ -40,14 +40,14 @@ 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::PluginRoot *, lay::LayoutView *view) const;
|
||||
virtual lay::Plugin *create_plugin (db::Manager *manager, lay::Dispatcher *, lay::LayoutView *view) const;
|
||||
virtual bool implements_editable (std::string &title) const;
|
||||
virtual bool implements_mouse_mode (std::string &title) const;
|
||||
virtual bool configure (const std::string &name, const std::string &value);
|
||||
virtual std::vector<std::pair <std::string, lay::ConfigPage *> > config_pages (QWidget *parent) const;
|
||||
virtual void config_finalize ();
|
||||
virtual void initialized (lay::PluginRoot *);
|
||||
virtual void uninitialize (lay::PluginRoot *);
|
||||
virtual void initialized (lay::Dispatcher *);
|
||||
virtual void uninitialize (lay::Dispatcher *);
|
||||
virtual bool menu_activated (const std::string &symbol) const;
|
||||
|
||||
void register_annotation_template (const ant::Template &t);
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@ struct EOPCompareOp
|
|||
}
|
||||
};
|
||||
|
||||
EditorOptionsPages::EditorOptionsPages (const std::vector<edt::EditorOptionsPage *> &pages, lay::PluginRoot *root)
|
||||
EditorOptionsPages::EditorOptionsPages (const std::vector<edt::EditorOptionsPage *> &pages, lay::Dispatcher *root)
|
||||
: mp_root (root)
|
||||
{
|
||||
mp_ui = new Ui::EditorOptionsDialog ();
|
||||
|
|
@ -515,7 +515,7 @@ EditorOptionsPath::setup (lay::Plugin *root)
|
|||
// ------------------------------------------------------------------
|
||||
// EditorOptionsInst implementation
|
||||
|
||||
EditorOptionsInst::EditorOptionsInst (lay::PluginRoot *root)
|
||||
EditorOptionsInst::EditorOptionsInst (lay::Dispatcher *root)
|
||||
: QWidget (), EditorOptionsPage (), mp_root (root), mp_pcell_parameters (0)
|
||||
{
|
||||
mp_ui = new Ui::EditorOptionsInst ();
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ namespace Ui
|
|||
namespace lay
|
||||
{
|
||||
class PluginDeclaration;
|
||||
class PluginRoot;
|
||||
class Dispatcher;
|
||||
class Plugin;
|
||||
}
|
||||
|
||||
|
|
@ -92,7 +92,7 @@ class EditorOptionsPages
|
|||
Q_OBJECT
|
||||
|
||||
public:
|
||||
EditorOptionsPages (const std::vector<edt::EditorOptionsPage *> &pages, lay::PluginRoot *root);
|
||||
EditorOptionsPages (const std::vector<edt::EditorOptionsPage *> &pages, lay::Dispatcher *root);
|
||||
~EditorOptionsPages ();
|
||||
|
||||
void unregister_page (edt::EditorOptionsPage *page);
|
||||
|
|
@ -106,7 +106,7 @@ public slots:
|
|||
private:
|
||||
std::vector <edt::EditorOptionsPage *> m_pages;
|
||||
Ui::EditorOptionsDialog *mp_ui;
|
||||
lay::PluginRoot *mp_root;
|
||||
lay::Dispatcher *mp_root;
|
||||
|
||||
void update (edt::EditorOptionsPage *page);
|
||||
void do_apply ();
|
||||
|
|
@ -195,7 +195,7 @@ class EditorOptionsInst
|
|||
Q_OBJECT
|
||||
|
||||
public:
|
||||
EditorOptionsInst (lay::PluginRoot *root);
|
||||
EditorOptionsInst (lay::Dispatcher *root);
|
||||
~EditorOptionsInst ();
|
||||
|
||||
virtual QWidget *q_frame () { return this; }
|
||||
|
|
@ -214,7 +214,7 @@ public slots:
|
|||
|
||||
private:
|
||||
Ui::EditorOptionsInst *mp_ui;
|
||||
lay::PluginRoot *mp_root;
|
||||
lay::Dispatcher *mp_root;
|
||||
edt::PCellParametersPage *mp_pcell_parameters;
|
||||
int m_cv_index;
|
||||
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ namespace edt
|
|||
// -----------------------------------------------------------------------------
|
||||
// Main Service implementation
|
||||
|
||||
MainService::MainService (db::Manager *manager, lay::LayoutView *view, lay::PluginRoot *root)
|
||||
MainService::MainService (db::Manager *manager, lay::LayoutView *view, lay::Dispatcher *root)
|
||||
: lay::Plugin (view),
|
||||
lay::Editable (view),
|
||||
db::Object (manager),
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@
|
|||
#include <vector>
|
||||
|
||||
namespace lay {
|
||||
class PluginRoot;
|
||||
class Dispatcher;
|
||||
class FlattenInstOptionsDialog;
|
||||
}
|
||||
|
||||
|
|
@ -63,7 +63,7 @@ public:
|
|||
/**
|
||||
* @brief The constructor
|
||||
*/
|
||||
MainService (db::Manager *manager, lay::LayoutView *view, lay::PluginRoot *root);
|
||||
MainService (db::Manager *manager, lay::LayoutView *view, lay::Dispatcher *root);
|
||||
|
||||
/**
|
||||
* @brief The destructor
|
||||
|
|
@ -196,7 +196,7 @@ public:
|
|||
private:
|
||||
// The layout view that this service is attached to
|
||||
lay::LayoutView *mp_view;
|
||||
lay::PluginRoot *mp_root;
|
||||
lay::Dispatcher *mp_root;
|
||||
bool m_needs_update;
|
||||
|
||||
// options
|
||||
|
|
|
|||
|
|
@ -1007,7 +1007,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::PluginRoot *root)
|
||||
PartialService::PartialService (db::Manager *manager, lay::LayoutView *view, lay::Dispatcher *root)
|
||||
: QObject (),
|
||||
lay::ViewService (view->view_object_widget ()),
|
||||
lay::Editable (view),
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ namespace db {
|
|||
}
|
||||
|
||||
namespace lay {
|
||||
class PluginRoot;
|
||||
class Dispatcher;
|
||||
class Marker;
|
||||
class InstanceMarker;
|
||||
}
|
||||
|
|
@ -153,7 +153,7 @@ public:
|
|||
/**
|
||||
* @brief The constructor
|
||||
*/
|
||||
PartialService (db::Manager *manager, lay::LayoutView *view, lay::PluginRoot *root);
|
||||
PartialService (db::Manager *manager, lay::LayoutView *view, lay::Dispatcher *root);
|
||||
|
||||
/**
|
||||
* @brief The destructor
|
||||
|
|
@ -288,7 +288,7 @@ protected:
|
|||
private:
|
||||
// The layout view that this service is attached to
|
||||
lay::LayoutView *mp_view;
|
||||
lay::PluginRoot *mp_root;
|
||||
lay::Dispatcher *mp_root;
|
||||
bool m_dragging;
|
||||
bool m_keep_selection;
|
||||
db::DPoint m_start, m_current;
|
||||
|
|
|
|||
|
|
@ -22,7 +22,6 @@
|
|||
|
||||
|
||||
#include "layTipDialog.h"
|
||||
#include "layAbstractMenuProvider.h"
|
||||
#include "edtPlugin.h"
|
||||
#include "edtConfig.h"
|
||||
#include "edtService.h"
|
||||
|
|
@ -46,7 +45,7 @@ void get_text_options (std::vector < std::pair<std::string, std::string> > &opti
|
|||
}
|
||||
|
||||
static
|
||||
void get_text_editor_options_pages (std::vector<edt::EditorOptionsPage *> &ret, lay::PluginRoot *)
|
||||
void get_text_editor_options_pages (std::vector<edt::EditorOptionsPage *> &ret, lay::Dispatcher *)
|
||||
{
|
||||
ret.push_back (new edt::EditorOptionsText ());
|
||||
}
|
||||
|
|
@ -61,7 +60,7 @@ void get_path_options (std::vector < std::pair<std::string, std::string> > &opti
|
|||
}
|
||||
|
||||
static
|
||||
void get_path_editor_options_pages (std::vector<edt::EditorOptionsPage *> &ret, lay::PluginRoot *)
|
||||
void get_path_editor_options_pages (std::vector<edt::EditorOptionsPage *> &ret, lay::Dispatcher *)
|
||||
{
|
||||
ret.push_back (new EditorOptionsPath ());
|
||||
}
|
||||
|
|
@ -86,7 +85,7 @@ void get_inst_options (std::vector < std::pair<std::string, std::string> > &opti
|
|||
}
|
||||
|
||||
static
|
||||
void get_inst_editor_options_pages (std::vector<edt::EditorOptionsPage *> &ret, lay::PluginRoot *root)
|
||||
void get_inst_editor_options_pages (std::vector<edt::EditorOptionsPage *> &ret, lay::Dispatcher *root)
|
||||
{
|
||||
ret.push_back (new EditorOptionsInst (root));
|
||||
}
|
||||
|
|
@ -98,7 +97,7 @@ class PluginDeclaration
|
|||
public:
|
||||
PluginDeclaration (const std::string &title, const std::string &mouse_mode,
|
||||
void (*option_get_f) (std::vector < std::pair<std::string, std::string> > &) = 0,
|
||||
void (*pages_f) (std::vector <edt::EditorOptionsPage *> &, lay::PluginRoot *) = 0)
|
||||
void (*pages_f) (std::vector <edt::EditorOptionsPage *> &, lay::Dispatcher *) = 0)
|
||||
: m_title (title), m_mouse_mode (mouse_mode), mp_option_get_f (option_get_f), mp_pages_f (pages_f)
|
||||
{
|
||||
// .. nothing yet ..
|
||||
|
|
@ -121,7 +120,7 @@ public:
|
|||
// .. nothing yet ..
|
||||
}
|
||||
|
||||
virtual void get_editor_options_pages (std::vector<edt::EditorOptionsPage *> &pages, lay::PluginRoot *root) const
|
||||
virtual void get_editor_options_pages (std::vector<edt::EditorOptionsPage *> &pages, lay::Dispatcher *root) const
|
||||
{
|
||||
if (mp_pages_f != 0) {
|
||||
size_t nstart = pages.size ();
|
||||
|
|
@ -132,7 +131,7 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
virtual lay::Plugin *create_plugin (db::Manager *manager, lay::PluginRoot *, lay::LayoutView *view) const
|
||||
virtual lay::Plugin *create_plugin (db::Manager *manager, lay::Dispatcher *, lay::LayoutView *view) const
|
||||
{
|
||||
Svc *service = new Svc (manager, view);
|
||||
service->set_plugin_declaration (this);
|
||||
|
|
@ -156,7 +155,7 @@ private:
|
|||
std::string m_mouse_mode;
|
||||
|
||||
void (*mp_option_get_f) (std::vector < std::pair<std::string, std::string> > &options);
|
||||
void (*mp_pages_f) (std::vector <edt::EditorOptionsPage *> &, lay::PluginRoot *);
|
||||
void (*mp_pages_f) (std::vector <edt::EditorOptionsPage *> &, lay::Dispatcher *);
|
||||
};
|
||||
|
||||
static tl::RegisteredClass<lay::PluginDeclaration> config_decl1 (
|
||||
|
|
@ -215,33 +214,33 @@ public:
|
|||
{
|
||||
lay::PluginDeclaration::get_menu_entries (menu_entries);
|
||||
|
||||
menu_entries.push_back (lay::MenuEntry ("edt::hier_group", "zoom_menu.end"));
|
||||
menu_entries.push_back (lay::MenuEntry ("edt::descend", "descend", "zoom_menu.end", tl::to_string (QObject::tr ("Descend")) + "(Ctrl+D)"));
|
||||
menu_entries.push_back (lay::MenuEntry ("edt::ascend", "ascend", "zoom_menu.end", tl::to_string (QObject::tr ("Ascend")) + "(Ctrl+A)"));
|
||||
menu_entries.push_back (lay::separator ("edt::hier_group", "zoom_menu.end"));
|
||||
menu_entries.push_back (lay::menu_item ("edt::descend", "descend", "zoom_menu.end", tl::to_string (QObject::tr ("Descend")) + "(Ctrl+D)"));
|
||||
menu_entries.push_back (lay::menu_item ("edt::ascend", "ascend", "zoom_menu.end", tl::to_string (QObject::tr ("Ascend")) + "(Ctrl+A)"));
|
||||
|
||||
menu_entries.push_back (lay::MenuEntry ("edit_options_group:edit_mode", "edit_menu.end"));
|
||||
menu_entries.push_back (lay::MenuEntry ("edt::edit_options", "edit_options:edit_mode", "edit_menu.end", tl::to_string (QObject::tr ("Editor Options")) + "(F3)"));
|
||||
menu_entries.push_back (lay::MenuEntry ("edt::sel_make_array", "make_array:edit_mode", "edit_menu.selection_menu.end", tl::to_string (QObject::tr ("Make Array"))));
|
||||
menu_entries.push_back (lay::MenuEntry ("selection_group:edit_mode", "edit_menu.selection_menu.end"));
|
||||
menu_entries.push_back (lay::MenuEntry ("edt::sel_change_layer", "change_layer:edit_mode", "edit_menu.selection_menu.end", tl::to_string (QObject::tr ("Change Layer"))));
|
||||
menu_entries.push_back (lay::MenuEntry ("edt::sel_tap", "tap:edit_mode", "edit_menu.selection_menu.end", tl::to_string (QObject::tr ("Tap")) + "(T)"));
|
||||
menu_entries.push_back (lay::MenuEntry ("edt::sel_align", "align:edit_mode", "edit_menu.selection_menu.end", tl::to_string (QObject::tr ("Align"))));
|
||||
menu_entries.push_back (lay::MenuEntry ("edt::sel_round_corners", "round_corners:edit_mode", "edit_menu.selection_menu.end", tl::to_string (QObject::tr ("Round Corners"))));
|
||||
menu_entries.push_back (lay::MenuEntry ("edt::sel_size", "size:edit_mode", "edit_menu.selection_menu.end", tl::to_string (QObject::tr ("Size Shapes"))));
|
||||
menu_entries.push_back (lay::MenuEntry ("edt::sel_union", "union:edit_mode", "edit_menu.selection_menu.end", tl::to_string (QObject::tr ("Merge Shapes"))));
|
||||
menu_entries.push_back (lay::MenuEntry ("edt::sel_intersection", "intersection:edit_mode", "edit_menu.selection_menu.end", tl::to_string (QObject::tr ("Intersection - Others With First"))));
|
||||
menu_entries.push_back (lay::MenuEntry ("edt::sel_difference", "difference:edit_mode", "edit_menu.selection_menu.end", tl::to_string (QObject::tr ("Subtraction - Others From First"))));
|
||||
menu_entries.push_back (lay::MenuEntry ("edt::sel_separate", "separate:edit_mode", "edit_menu.selection_menu.end", tl::to_string (QObject::tr ("Separate - First into Inside/Outside Others"))));
|
||||
menu_entries.push_back (lay::MenuEntry ("hier_group:edit_mode", "edit_menu.selection_menu.end"));
|
||||
menu_entries.push_back (lay::MenuEntry ("edt::sel_flatten_insts", "flatten_insts:edit_mode", "edit_menu.selection_menu.end", tl::to_string (QObject::tr ("Flatten Instances"))));
|
||||
menu_entries.push_back (lay::MenuEntry ("edt::sel_resolve_arefs", "resolve_arefs:edit_mode", "edit_menu.selection_menu.end", tl::to_string (QObject::tr ("Resolve Arrays"))));
|
||||
menu_entries.push_back (lay::MenuEntry ("edt::sel_move_hier_up", "move_hier_up:edit_mode", "edit_menu.selection_menu.end", tl::to_string (QObject::tr ("Move Up In Hierarchy"))));
|
||||
menu_entries.push_back (lay::MenuEntry ("edt::sel_make_cell", "make_cell:edit_mode", "edit_menu.selection_menu.end", tl::to_string (QObject::tr ("Make Cell"))));
|
||||
menu_entries.push_back (lay::MenuEntry ("edt::sel_make_cell_variants", "make_cell_variants:edit_mode", "edit_menu.selection_menu.end", tl::to_string (QObject::tr ("Make Cell Variants"))));
|
||||
menu_entries.push_back (lay::MenuEntry ("edt::sel_convert_to_pcell", "convert_to_pcell:edit_mode", "edit_menu.selection_menu.end", tl::to_string (QObject::tr ("Convert To PCell"))));
|
||||
menu_entries.push_back (lay::MenuEntry ("edt::sel_convert_to_cell", "convert_to_cell:edit_mode", "edit_menu.selection_menu.end", tl::to_string (QObject::tr ("Convert To Static Cell"))));
|
||||
menu_entries.push_back (lay::separator ("edit_options_group:edit_mode", "edit_menu.end"));
|
||||
menu_entries.push_back (lay::menu_item ("edt::edit_options", "edit_options:edit_mode", "edit_menu.end", tl::to_string (QObject::tr ("Editor Options")) + "(F3)"));
|
||||
menu_entries.push_back (lay::menu_item ("edt::sel_make_array", "make_array:edit_mode", "edit_menu.selection_menu.end", tl::to_string (QObject::tr ("Make Array"))));
|
||||
menu_entries.push_back (lay::separator ("selection_group:edit_mode", "edit_menu.selection_menu.end"));
|
||||
menu_entries.push_back (lay::menu_item ("edt::sel_change_layer", "change_layer:edit_mode", "edit_menu.selection_menu.end", tl::to_string (QObject::tr ("Change Layer"))));
|
||||
menu_entries.push_back (lay::menu_item ("edt::sel_tap", "tap:edit_mode", "edit_menu.selection_menu.end", tl::to_string (QObject::tr ("Tap")) + "(T)"));
|
||||
menu_entries.push_back (lay::menu_item ("edt::sel_align", "align:edit_mode", "edit_menu.selection_menu.end", tl::to_string (QObject::tr ("Align"))));
|
||||
menu_entries.push_back (lay::menu_item ("edt::sel_round_corners", "round_corners:edit_mode", "edit_menu.selection_menu.end", tl::to_string (QObject::tr ("Round Corners"))));
|
||||
menu_entries.push_back (lay::menu_item ("edt::sel_size", "size:edit_mode", "edit_menu.selection_menu.end", tl::to_string (QObject::tr ("Size Shapes"))));
|
||||
menu_entries.push_back (lay::menu_item ("edt::sel_union", "union:edit_mode", "edit_menu.selection_menu.end", tl::to_string (QObject::tr ("Merge Shapes"))));
|
||||
menu_entries.push_back (lay::menu_item ("edt::sel_intersection", "intersection:edit_mode", "edit_menu.selection_menu.end", tl::to_string (QObject::tr ("Intersection - Others With First"))));
|
||||
menu_entries.push_back (lay::menu_item ("edt::sel_difference", "difference:edit_mode", "edit_menu.selection_menu.end", tl::to_string (QObject::tr ("Subtraction - Others From First"))));
|
||||
menu_entries.push_back (lay::menu_item ("edt::sel_separate", "separate:edit_mode", "edit_menu.selection_menu.end", tl::to_string (QObject::tr ("Separate - First into Inside/Outside Others"))));
|
||||
menu_entries.push_back (lay::separator ("hier_group:edit_mode", "edit_menu.selection_menu.end"));
|
||||
menu_entries.push_back (lay::menu_item ("edt::sel_flatten_insts", "flatten_insts:edit_mode", "edit_menu.selection_menu.end", tl::to_string (QObject::tr ("Flatten Instances"))));
|
||||
menu_entries.push_back (lay::menu_item ("edt::sel_resolve_arefs", "resolve_arefs:edit_mode", "edit_menu.selection_menu.end", tl::to_string (QObject::tr ("Resolve Arrays"))));
|
||||
menu_entries.push_back (lay::menu_item ("edt::sel_move_hier_up", "move_hier_up:edit_mode", "edit_menu.selection_menu.end", tl::to_string (QObject::tr ("Move Up In Hierarchy"))));
|
||||
menu_entries.push_back (lay::menu_item ("edt::sel_make_cell", "make_cell:edit_mode", "edit_menu.selection_menu.end", tl::to_string (QObject::tr ("Make Cell"))));
|
||||
menu_entries.push_back (lay::menu_item ("edt::sel_make_cell_variants", "make_cell_variants:edit_mode", "edit_menu.selection_menu.end", tl::to_string (QObject::tr ("Make Cell Variants"))));
|
||||
menu_entries.push_back (lay::menu_item ("edt::sel_convert_to_pcell", "convert_to_pcell:edit_mode", "edit_menu.selection_menu.end", tl::to_string (QObject::tr ("Convert To PCell"))));
|
||||
menu_entries.push_back (lay::menu_item ("edt::sel_convert_to_cell", "convert_to_cell:edit_mode", "edit_menu.selection_menu.end", tl::to_string (QObject::tr ("Convert To Static Cell"))));
|
||||
|
||||
menu_entries.push_back (lay::MenuEntry ("edt::combine_mode", "combine_mode:edit_mode", "@toolbar.end_modes", tl::to_string (QObject::tr ("Combine{Select background combination mode}"))));
|
||||
menu_entries.push_back (lay::menu_item ("edt::combine_mode", "combine_mode:edit_mode", "@toolbar.end_modes", tl::to_string (QObject::tr ("Combine{Select background combination mode}"))));
|
||||
}
|
||||
|
||||
bool configure (const std::string &name, const std::string &value)
|
||||
|
|
@ -255,7 +254,7 @@ public:
|
|||
return false;
|
||||
}
|
||||
|
||||
virtual lay::Plugin *create_plugin (db::Manager *manager, lay::PluginRoot *root, lay::LayoutView *view) const
|
||||
virtual lay::Plugin *create_plugin (db::Manager *manager, lay::Dispatcher *root, lay::LayoutView *view) const
|
||||
{
|
||||
return new edt::MainService (manager, view, root);
|
||||
}
|
||||
|
|
@ -270,9 +269,9 @@ public:
|
|||
return false;
|
||||
}
|
||||
|
||||
virtual void initialize (lay::PluginRoot *root)
|
||||
virtual void initialize (lay::Dispatcher *root)
|
||||
{
|
||||
lay::AbstractMenuProvider *mp = lay::AbstractMenuProvider::instance ();
|
||||
lay::Dispatcher *mp = lay::Dispatcher::instance ();
|
||||
if (! mp || ! mp->menu ()) {
|
||||
return;
|
||||
}
|
||||
|
|
@ -311,7 +310,7 @@ public:
|
|||
|
||||
void update_menu (combine_mode_type cm)
|
||||
{
|
||||
lay::AbstractMenuProvider *mp = lay::AbstractMenuProvider::instance ();
|
||||
lay::Dispatcher *mp = lay::Dispatcher::instance ();
|
||||
if (! mp || ! mp->menu ()) {
|
||||
return;
|
||||
}
|
||||
|
|
@ -336,7 +335,7 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
virtual void uninitialize (lay::PluginRoot *)
|
||||
virtual void uninitialize (lay::Dispatcher *)
|
||||
{
|
||||
if (mp_obj_prop_dialog) {
|
||||
delete mp_obj_prop_dialog;
|
||||
|
|
@ -372,9 +371,9 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
void initialized (lay::PluginRoot *root)
|
||||
void initialized (lay::Dispatcher *root)
|
||||
{
|
||||
lay::AbstractMenuProvider *mp = lay::AbstractMenuProvider::instance ();
|
||||
lay::Dispatcher *mp = lay::Dispatcher::instance ();
|
||||
if (! mp || ! mp->menu ()) {
|
||||
return;
|
||||
}
|
||||
|
|
@ -398,7 +397,7 @@ public:
|
|||
}
|
||||
|
||||
private:
|
||||
lay::PluginRoot *mp_root;
|
||||
lay::Dispatcher *mp_root;
|
||||
std::string m_title;
|
||||
edt::EditorOptionsPages *mp_obj_prop_dialog;
|
||||
std::vector<edt::EditorOptionsPage *> m_prop_dialog_pages;
|
||||
|
|
@ -447,7 +446,7 @@ public:
|
|||
// .. nothing yet ..
|
||||
}
|
||||
|
||||
virtual lay::Plugin *create_plugin (db::Manager *manager, lay::PluginRoot *root, lay::LayoutView *view) const
|
||||
virtual lay::Plugin *create_plugin (db::Manager *manager, lay::Dispatcher *root, lay::LayoutView *view) const
|
||||
{
|
||||
return new edt::PartialService (manager, view, root);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@
|
|||
|
||||
namespace lay
|
||||
{
|
||||
class PluginRoot;
|
||||
class Dispatcher;
|
||||
}
|
||||
|
||||
namespace edt
|
||||
|
|
@ -44,7 +44,7 @@ namespace edt
|
|||
: public lay::PluginDeclaration
|
||||
{
|
||||
public:
|
||||
virtual void get_editor_options_pages (std::vector<edt::EditorOptionsPage *> &, lay::PluginRoot *) const = 0;
|
||||
virtual void get_editor_options_pages (std::vector<edt::EditorOptionsPage *> &, lay::Dispatcher *) const = 0;
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -334,8 +334,8 @@ Service::copy_selected ()
|
|||
|
||||
// store the given value "forever"
|
||||
if (dont_ask_again) {
|
||||
plugin_root ()->config_set (cfg_edit_hier_copy_mode, tl::to_string (inst_mode));
|
||||
plugin_root ()->config_end ();
|
||||
dispatcher ()->config_set (cfg_edit_hier_copy_mode, tl::to_string (inst_mode));
|
||||
dispatcher ()->config_end ();
|
||||
}
|
||||
|
||||
// create one ClipboardData object per cv_index because, this one assumes that there is
|
||||
|
|
|
|||
|
|
@ -1282,14 +1282,14 @@ InstService::sync_to_config ()
|
|||
{
|
||||
// push the current setup to configuration so the instance dialog will take these as default
|
||||
// and "apply" of these instance properties doesn't fail because of insistency.
|
||||
plugin_root ()->config_set (cfg_edit_inst_lib_name, m_lib_name);
|
||||
plugin_root ()->config_set (cfg_edit_inst_cell_name, m_cell_or_pcell_name);
|
||||
dispatcher ()->config_set (cfg_edit_inst_lib_name, m_lib_name);
|
||||
dispatcher ()->config_set (cfg_edit_inst_cell_name, m_cell_or_pcell_name);
|
||||
if (m_is_pcell) {
|
||||
plugin_root ()->config_set (cfg_edit_inst_pcell_parameters, pcell_parameters_to_string (m_pcell_parameters));
|
||||
dispatcher ()->config_set (cfg_edit_inst_pcell_parameters, pcell_parameters_to_string (m_pcell_parameters));
|
||||
} else {
|
||||
plugin_root ()->config_set (cfg_edit_inst_pcell_parameters, std::string ());
|
||||
dispatcher ()->config_set (cfg_edit_inst_pcell_parameters, std::string ());
|
||||
}
|
||||
plugin_root ()->config_end ();
|
||||
dispatcher ()->config_end ();
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ PluginDeclaration::get_menu_entries (std::vector<lay::MenuEntry> &menu_entries)
|
|||
}
|
||||
|
||||
lay::Plugin *
|
||||
PluginDeclaration::create_plugin (db::Manager *manager, lay::PluginRoot *, lay::LayoutView *view) const
|
||||
PluginDeclaration::create_plugin (db::Manager *manager, lay::Dispatcher *, lay::LayoutView *view) const
|
||||
{
|
||||
return new img::Service (manager, view);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ public:
|
|||
}
|
||||
|
||||
virtual void get_menu_entries (std::vector<lay::MenuEntry> &menu_entries) const;
|
||||
virtual lay::Plugin *create_plugin (db::Manager *manager, lay::PluginRoot *, lay::LayoutView *view) const;
|
||||
virtual lay::Plugin *create_plugin (db::Manager *manager, lay::Dispatcher *, lay::LayoutView *view) const;
|
||||
virtual bool implements_editable (std::string &title) const;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -605,7 +605,7 @@ ApplicationBase::init_app ()
|
|||
bool editable_from_config = false;
|
||||
|
||||
{
|
||||
lay::PluginRoot cfg;
|
||||
lay::Dispatcher cfg;
|
||||
|
||||
for (std::vector <std::string>::const_iterator c = m_config_files.begin (); c != m_config_files.end (); ++c) {
|
||||
try {
|
||||
|
|
@ -770,11 +770,11 @@ ApplicationBase::init_app ()
|
|||
if (tl::verbosity () >= 20) {
|
||||
tl::info << " " << cls.current_name () << " [" << cls.current_position () << "]";
|
||||
}
|
||||
pd->initialize (plugin_root ());
|
||||
pd->initialize (dispatcher ());
|
||||
}
|
||||
|
||||
// establish the configuration
|
||||
plugin_root ()->config_setup ();
|
||||
dispatcher ()->config_setup ();
|
||||
|
||||
// Some info output
|
||||
if (tl::verbosity () >= 20) {
|
||||
|
|
@ -862,7 +862,7 @@ ApplicationBase::exit (int result)
|
|||
// uninitialize the plugins
|
||||
for (tl::Registrar<lay::PluginDeclaration>::iterator cls = tl::Registrar<lay::PluginDeclaration>::begin (); cls != tl::Registrar<lay::PluginDeclaration>::end (); ++cls) {
|
||||
lay::PluginDeclaration *pd = const_cast<lay::PluginDeclaration *> (&*cls);
|
||||
pd->uninitialize (plugin_root ());
|
||||
pd->uninitialize (dispatcher ());
|
||||
}
|
||||
|
||||
shutdown ();
|
||||
|
|
@ -873,13 +873,13 @@ ApplicationBase::exit (int result)
|
|||
void
|
||||
ApplicationBase::finish ()
|
||||
{
|
||||
if (plugin_root () && m_write_config_file) {
|
||||
if (dispatcher () && m_write_config_file) {
|
||||
|
||||
if (! m_config_file_to_write.empty ()) {
|
||||
if (tl::verbosity () >= 20) {
|
||||
tl::info << tl::to_string (QObject::tr ("Updating configuration file ")) << m_config_file_to_write;
|
||||
}
|
||||
plugin_root ()->write_config (m_config_file_to_write);
|
||||
dispatcher ()->write_config (m_config_file_to_write);
|
||||
}
|
||||
if (! m_config_file_to_delete.empty () && m_config_file_to_delete != m_config_file_to_write) {
|
||||
if (tl::verbosity () >= 20) {
|
||||
|
|
@ -1008,7 +1008,7 @@ ApplicationBase::run ()
|
|||
|
||||
for (std::vector <std::string>::const_iterator c = m_config_files.begin (); c != m_config_files.end (); ++c) {
|
||||
BEGIN_PROTECTED_CLEANUP
|
||||
plugin_root ()->read_config (*c);
|
||||
dispatcher ()->read_config (*c);
|
||||
// if the last config was read successfully no reset will happen:
|
||||
config_failed = false;
|
||||
END_PROTECTED_CLEANUP {
|
||||
|
|
@ -1130,7 +1130,7 @@ ApplicationBase::run ()
|
|||
// Give the plugins a change to do some last-minute initialisation and checks
|
||||
for (tl::Registrar<lay::PluginDeclaration>::iterator cls = tl::Registrar<lay::PluginDeclaration>::begin (); cls != tl::Registrar<lay::PluginDeclaration>::end (); ++cls) {
|
||||
lay::PluginDeclaration *pd = const_cast<lay::PluginDeclaration *> (&*cls);
|
||||
pd->initialized (plugin_root ());
|
||||
pd->initialized (dispatcher ());
|
||||
}
|
||||
|
||||
if (! m_no_gui && m_gtf_replay.empty () && m_gtf_record.empty ()) {
|
||||
|
|
@ -1138,12 +1138,12 @@ ApplicationBase::run ()
|
|||
mw->about_to_exec ();
|
||||
}
|
||||
|
||||
} else if (plugin_root ()) {
|
||||
} else if (dispatcher ()) {
|
||||
|
||||
// Give the plugins a change to do some last-minute initialisation and checks
|
||||
for (tl::Registrar<lay::PluginDeclaration>::iterator cls = tl::Registrar<lay::PluginDeclaration>::begin (); cls != tl::Registrar<lay::PluginDeclaration>::end (); ++cls) {
|
||||
lay::PluginDeclaration *pd = const_cast<lay::PluginDeclaration *> (&*cls);
|
||||
pd->initialized (plugin_root ());
|
||||
pd->initialized (dispatcher ());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1218,7 +1218,7 @@ ApplicationBase::process_events_impl (QEventLoop::ProcessEventsFlags /*flags*/,
|
|||
bool
|
||||
ApplicationBase::write_config (const std::string &config_file)
|
||||
{
|
||||
return plugin_root () ? plugin_root ()->write_config (config_file) : 0;
|
||||
return dispatcher () ? dispatcher ()->write_config (config_file) : 0;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -1235,38 +1235,38 @@ ApplicationBase::reset_config ()
|
|||
void
|
||||
ApplicationBase::clear_config ()
|
||||
{
|
||||
if (plugin_root ()) {
|
||||
plugin_root ()->clear_config ();
|
||||
if (dispatcher ()) {
|
||||
dispatcher ()->clear_config ();
|
||||
}
|
||||
}
|
||||
|
||||
bool
|
||||
ApplicationBase::read_config (const std::string &config_file)
|
||||
{
|
||||
return plugin_root () ? plugin_root ()->read_config (config_file) : true;
|
||||
return dispatcher () ? dispatcher ()->read_config (config_file) : true;
|
||||
}
|
||||
|
||||
void
|
||||
ApplicationBase::set_config (const std::string &name, const std::string &value)
|
||||
{
|
||||
if (plugin_root ()) {
|
||||
plugin_root ()->config_set (name, value);
|
||||
if (dispatcher ()) {
|
||||
dispatcher ()->config_set (name, value);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
ApplicationBase::config_end ()
|
||||
{
|
||||
if (plugin_root ()) {
|
||||
plugin_root ()->config_end ();
|
||||
if (dispatcher ()) {
|
||||
dispatcher ()->config_end ();
|
||||
}
|
||||
}
|
||||
|
||||
std::string
|
||||
ApplicationBase::get_config (const std::string &name) const
|
||||
{
|
||||
if (plugin_root ()) {
|
||||
return plugin_root ()->config_get (name);
|
||||
if (dispatcher ()) {
|
||||
return dispatcher ()->config_get (name);
|
||||
} else {
|
||||
return std::string ();
|
||||
}
|
||||
|
|
@ -1276,8 +1276,8 @@ std::vector<std::string>
|
|||
ApplicationBase::get_config_names () const
|
||||
{
|
||||
std::vector<std::string> names;
|
||||
if (plugin_root ()) {
|
||||
plugin_root ()->get_config_names (names);
|
||||
if (dispatcher ()) {
|
||||
dispatcher ()->get_config_names (names);
|
||||
}
|
||||
return names;
|
||||
}
|
||||
|
|
@ -1313,7 +1313,7 @@ GuiApplication::~GuiApplication ()
|
|||
// uninitialize the plugins
|
||||
for (tl::Registrar<lay::PluginDeclaration>::iterator cls = tl::Registrar<lay::PluginDeclaration>::begin (); cls != tl::Registrar<lay::PluginDeclaration>::end (); ++cls) {
|
||||
lay::PluginDeclaration *pd = const_cast<lay::PluginDeclaration *> (&*cls);
|
||||
pd->uninitialize (plugin_root ());
|
||||
pd->uninitialize (dispatcher ());
|
||||
}
|
||||
|
||||
shutdown ();
|
||||
|
|
@ -1472,8 +1472,8 @@ GuiApplication::start_recording ()
|
|||
}
|
||||
}
|
||||
|
||||
lay::PluginRoot *
|
||||
GuiApplication::plugin_root () const
|
||||
lay::Dispatcher *
|
||||
GuiApplication::dispatcher () const
|
||||
{
|
||||
return mp_plugin_root;
|
||||
}
|
||||
|
|
@ -1529,7 +1529,7 @@ NonGuiApplication::NonGuiApplication (int &argc, char **argv)
|
|||
: QCoreApplication (argc, argv), ApplicationBase (true),
|
||||
mp_pr (0),
|
||||
mp_pb (0),
|
||||
mp_plugin_root (0)
|
||||
mp_dispatcher (0)
|
||||
{
|
||||
// .. nothing yet ..
|
||||
}
|
||||
|
|
@ -1539,7 +1539,7 @@ NonGuiApplication::~NonGuiApplication ()
|
|||
// uninitialize the plugins
|
||||
for (tl::Registrar<lay::PluginDeclaration>::iterator cls = tl::Registrar<lay::PluginDeclaration>::begin (); cls != tl::Registrar<lay::PluginDeclaration>::end (); ++cls) {
|
||||
lay::PluginDeclaration *pd = const_cast<lay::PluginDeclaration *> (&*cls);
|
||||
pd->uninitialize (plugin_root ());
|
||||
pd->uninitialize (dispatcher ());
|
||||
}
|
||||
|
||||
shutdown ();
|
||||
|
|
@ -1555,9 +1555,9 @@ NonGuiApplication::exec ()
|
|||
void
|
||||
NonGuiApplication::shutdown ()
|
||||
{
|
||||
if (mp_plugin_root) {
|
||||
delete mp_plugin_root;
|
||||
mp_plugin_root = 0;
|
||||
if (mp_dispatcher) {
|
||||
delete mp_dispatcher;
|
||||
mp_dispatcher = 0;
|
||||
}
|
||||
|
||||
if (mp_pr) {
|
||||
|
|
@ -1579,7 +1579,7 @@ NonGuiApplication::setup ()
|
|||
mp_pr = new lay::ProgressReporter ();
|
||||
mp_pb = new TextProgress (10 /*verbosity level*/);
|
||||
mp_pr->set_progress_bar (mp_pb);
|
||||
mp_plugin_root = new lay::PluginRoot ();
|
||||
mp_dispatcher = new lay::Dispatcher (0);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ namespace lay
|
|||
|
||||
class MainWindow;
|
||||
class DispatcherToMainWindow;
|
||||
class PluginRoot;
|
||||
class Dispatcher;
|
||||
class ProgressReporter;
|
||||
class ProgressBar;
|
||||
|
||||
|
|
@ -321,7 +321,7 @@ protected:
|
|||
virtual void shutdown ();
|
||||
virtual void prepare_recording (const std::string >f_record, bool gtf_record_incremental);
|
||||
virtual void start_recording ();
|
||||
virtual lay::PluginRoot *plugin_root () const = 0;
|
||||
virtual lay::Dispatcher *dispatcher () const = 0;
|
||||
virtual void finish ();
|
||||
virtual void process_events_impl (QEventLoop::ProcessEventsFlags flags, bool silent = false);
|
||||
|
||||
|
|
@ -441,7 +441,7 @@ protected:
|
|||
virtual void start_recording ();
|
||||
virtual void process_events_impl (QEventLoop::ProcessEventsFlags flags, bool silent);
|
||||
|
||||
virtual lay::PluginRoot *plugin_root () const;
|
||||
virtual lay::Dispatcher *dispatcher () const;
|
||||
|
||||
private:
|
||||
MainWindow *mp_mw;
|
||||
|
|
@ -493,15 +493,15 @@ protected:
|
|||
virtual void setup ();
|
||||
virtual void shutdown ();
|
||||
|
||||
virtual lay::PluginRoot *plugin_root () const
|
||||
virtual lay::Dispatcher *dispatcher () const
|
||||
{
|
||||
return mp_plugin_root;
|
||||
return mp_dispatcher;
|
||||
}
|
||||
|
||||
private:
|
||||
lay::ProgressReporter *mp_pr;
|
||||
lay::ProgressBar *mp_pb;
|
||||
lay::PluginRoot *mp_plugin_root;
|
||||
lay::Dispatcher *mp_dispatcher;
|
||||
};
|
||||
|
||||
} // namespace lay
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ public:
|
|||
menu_entries.push_back (lay::MenuEntry ("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::PluginRoot *root, lay::LayoutView *view) const
|
||||
virtual lay::Plugin *create_plugin (db::Manager *, lay::Dispatcher *root, lay::LayoutView *view) const
|
||||
{
|
||||
return new ClipDialog (root, view);
|
||||
}
|
||||
|
|
@ -66,7 +66,7 @@ static tl::RegisteredClass<lay::PluginDeclaration> config_decl (new ClipDialogPl
|
|||
|
||||
// ------------------------------------------------------------
|
||||
|
||||
ClipDialog::ClipDialog (lay::PluginRoot *root, lay::LayoutView *vw)
|
||||
ClipDialog::ClipDialog (lay::Dispatcher *root, lay::LayoutView *vw)
|
||||
: lay::Browser (root, vw),
|
||||
Ui::ClipDialog ()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ class ClipDialog
|
|||
Q_OBJECT
|
||||
|
||||
public:
|
||||
ClipDialog (lay::PluginRoot *root, lay::LayoutView *view);
|
||||
ClipDialog (lay::Dispatcher *root, lay::LayoutView *view);
|
||||
~ClipDialog ();
|
||||
|
||||
public slots:
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ public:
|
|||
menu_entries.push_back (lay::MenuEntry ("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::PluginRoot *root, lay::LayoutView *view) const
|
||||
virtual lay::Plugin *create_plugin (db::Manager *, lay::Dispatcher *root, lay::LayoutView *view) const
|
||||
{
|
||||
return new FillDialog (root, view);
|
||||
}
|
||||
|
|
@ -73,7 +73,7 @@ static tl::RegisteredClass<lay::PluginDeclaration> config_decl (new FillDialogPl
|
|||
|
||||
// ------------------------------------------------------------
|
||||
|
||||
FillDialog::FillDialog (lay::PluginRoot *main, lay::LayoutView *view)
|
||||
FillDialog::FillDialog (lay::Dispatcher *main, lay::LayoutView *view)
|
||||
: QDialog (view),
|
||||
lay::Plugin (main),
|
||||
Ui::FillDialog (),
|
||||
|
|
|
|||
|
|
@ -98,7 +98,7 @@ public:
|
|||
/**
|
||||
* @brief Constructor
|
||||
*/
|
||||
MacroEditorDialog (lay::PluginRoot *pr, lym::MacroCollection *root);
|
||||
MacroEditorDialog (lay::Dispatcher *pr, lym::MacroCollection *root);
|
||||
|
||||
/**
|
||||
* @brief Destructor
|
||||
|
|
@ -289,7 +289,7 @@ private:
|
|||
bool configure (const std::string &name, const std::string &value);
|
||||
void config_finalize ();
|
||||
|
||||
lay::PluginRoot *mp_plugin_root;
|
||||
lay::Dispatcher *mp_plugin_root;
|
||||
lym::MacroCollection *mp_root;
|
||||
bool m_first_show;
|
||||
bool m_in_processing;
|
||||
|
|
|
|||
Loading…
Reference in New Issue