This commit is contained in:
Matthias Koefferlein 2022-05-15 01:14:29 +02:00
parent 5fed1648e6
commit 53490a9faf
24 changed files with 93 additions and 88 deletions

View File

@ -80,10 +80,14 @@ SOURCES += \
INCLUDEPATH += $$TL_INC $$GSI_INC $$LAYBASIC_INC $$DB_INC INCLUDEPATH += $$TL_INC $$GSI_INC $$LAYBASIC_INC $$DB_INC
DEPENDPATH += $$TL_INC $$GSI_INC $$LAYBASIC_INC $$DB_INC DEPENDPATH += $$TL_INC $$GSI_INC $$LAYBASIC_INC $$DB_INC
# Note: this accounts for UI-generated headers placed into the output folders in
# shadow builds:
INCLUDEPATH += $$DESTDIR/laybasic/laybasic
DEPENDPATH += $$DESTDIR/laybasic/laybasic
LIBS += -L$$DESTDIR -lklayout_tl -lklayout_gsi -lklayout_laybasic -lklayout_db LIBS += -L$$DESTDIR -lklayout_tl -lklayout_gsi -lklayout_laybasic -lklayout_db
!equals(HAVE_QT, "0") {
INCLUDEPATH += $$LAYUI_INC
DEPENDPATH += $$LAYUI_INC
LIBS += -lklayout_layui
}

View File

@ -28,7 +28,7 @@
#include "edtDialogs.h" #include "edtDialogs.h"
#include "layObjectInstPath.h" #include "layObjectInstPath.h"
#include "layCellView.h" #include "layCellView.h"
#include "layLayoutView.h" #include "layLayoutViewBase.h"
#include "layMarker.h" #include "layMarker.h"
#include "tlException.h" #include "tlException.h"
#include "tlExceptions.h" #include "tlExceptions.h"
@ -105,7 +105,7 @@ InstantiationForm::double_clicked (QListWidgetItem *item)
} }
void void
InstantiationForm::show (lay::LayoutView *view, const lay::ObjectInstPath &path) InstantiationForm::show (lay::LayoutViewBase *view, const lay::ObjectInstPath &path)
{ {
mp_view = view; mp_view = view;
mp_path = &path; mp_path = &path;
@ -233,7 +233,7 @@ ChangeLayerOptionsDialog::~ChangeLayerOptionsDialog ()
} }
bool bool
ChangeLayerOptionsDialog::exec_dialog (lay::LayoutView *view, int cv_index, unsigned int &new_layer) ChangeLayerOptionsDialog::exec_dialog (lay::LayoutViewBase *view, int cv_index, unsigned int &new_layer)
{ {
std::vector <std::pair <db::LayerProperties, unsigned int> > ll; std::vector <std::pair <db::LayerProperties, unsigned int> > ll;

View File

@ -46,7 +46,7 @@
namespace lay namespace lay
{ {
class LayoutView; class LayoutViewBase;
class Marker; class Marker;
class ObjectInstPath; class ObjectInstPath;
} }
@ -82,7 +82,7 @@ public:
InstantiationForm (QWidget *parent); InstantiationForm (QWidget *parent);
virtual ~InstantiationForm (); virtual ~InstantiationForm ();
void show (lay::LayoutView *view, const lay::ObjectInstPath &path); void show (lay::LayoutViewBase *view, const lay::ObjectInstPath &path);
public slots: public slots:
void display_mode_changed (bool); void display_mode_changed (bool);
@ -91,7 +91,7 @@ public slots:
private: private:
void update (); void update ();
lay::LayoutView *mp_view; lay::LayoutViewBase *mp_view;
const lay::ObjectInstPath *mp_path; const lay::ObjectInstPath *mp_path;
lay::Marker *mp_marker; lay::Marker *mp_marker;
bool m_enable_cb_callbacks; bool m_enable_cb_callbacks;
@ -110,7 +110,7 @@ public:
ChangeLayerOptionsDialog (QWidget *parent); ChangeLayerOptionsDialog (QWidget *parent);
virtual ~ChangeLayerOptionsDialog (); virtual ~ChangeLayerOptionsDialog ();
bool exec_dialog (lay::LayoutView *view, int cv_index, unsigned int &new_layer); bool exec_dialog (lay::LayoutViewBase *view, int cv_index, unsigned int &new_layer);
}; };
/** /**

View File

@ -33,7 +33,7 @@
#include "edtPropertiesPageUtils.h" #include "edtPropertiesPageUtils.h"
#include "tlExceptions.h" #include "tlExceptions.h"
#include "layPlugin.h" #include "layPlugin.h"
#include "layLayoutView.h" #include "layLayoutViewBase.h"
#include "layCellSelectionForm.h" #include "layCellSelectionForm.h"
#include "layQtTools.h" #include "layQtTools.h"
#include "ui_EditorOptionsGeneric.h" #include "ui_EditorOptionsGeneric.h"

View File

@ -52,7 +52,7 @@ namespace lay
{ {
class PluginDeclaration; class PluginDeclaration;
class Dispatcher; class Dispatcher;
class LayoutView; class LayoutViewBase;
class Plugin; class Plugin;
} }
@ -70,7 +70,7 @@ class EditorOptionsGeneric
Q_OBJECT Q_OBJECT
public: public:
EditorOptionsGeneric (lay::LayoutView *view, lay::Dispatcher *dispatcher); EditorOptionsGeneric (lay::LayoutViewBase *view, lay::Dispatcher *dispatcher);
~EditorOptionsGeneric (); ~EditorOptionsGeneric ();
virtual std::string title () const; virtual std::string title () const;
@ -93,7 +93,7 @@ class EditorOptionsText
: public lay::EditorOptionsPage : public lay::EditorOptionsPage
{ {
public: public:
EditorOptionsText (lay::LayoutView *view, lay::Dispatcher *dispatcher); EditorOptionsText (lay::LayoutViewBase *view, lay::Dispatcher *dispatcher);
~EditorOptionsText (); ~EditorOptionsText ();
virtual std::string title () const; virtual std::string title () const;
@ -114,7 +114,7 @@ class EditorOptionsPath
Q_OBJECT Q_OBJECT
public: public:
EditorOptionsPath (lay::LayoutView *view, lay::Dispatcher *dispatcher); EditorOptionsPath (lay::LayoutViewBase *view, lay::Dispatcher *dispatcher);
~EditorOptionsPath (); ~EditorOptionsPath ();
virtual std::string title () const; virtual std::string title () const;
@ -138,7 +138,7 @@ class EditorOptionsInst
Q_OBJECT Q_OBJECT
public: public:
EditorOptionsInst (lay::LayoutView *view, lay::Dispatcher *root); EditorOptionsInst (lay::LayoutViewBase *view, lay::Dispatcher *root);
~EditorOptionsInst (); ~EditorOptionsInst ();
virtual std::string title () const; virtual std::string title () const;
@ -170,7 +170,7 @@ class EditorOptionsInstPCellParam
Q_OBJECT Q_OBJECT
public: public:
EditorOptionsInstPCellParam (lay::LayoutView *view, lay::Dispatcher *root); EditorOptionsInstPCellParam (lay::LayoutViewBase *view, lay::Dispatcher *root);
~EditorOptionsInstPCellParam (); ~EditorOptionsInstPCellParam ();
virtual std::string title () const; virtual std::string title () const;

View File

@ -32,7 +32,7 @@
#include "edtDialogs.h" #include "edtDialogs.h"
#include "layDialogs.h" #include "layDialogs.h"
#include "layObjectInstPath.h" #include "layObjectInstPath.h"
#include "layLayoutView.h" #include "layLayoutViewBase.h"
#include "layCellSelectionForm.h" #include "layCellSelectionForm.h"
#include "layQtTools.h" #include "layQtTools.h"
#include "tlExceptions.h" #include "tlExceptions.h"

View File

@ -26,7 +26,7 @@
#include "dbLibrary.h" #include "dbLibrary.h"
#include "dbLibraryManager.h" #include "dbLibraryManager.h"
#include "tlExceptions.h" #include "tlExceptions.h"
#include "layLayoutView.h" #include "layLayoutViewBase.h"
#include "laySelector.h" #include "laySelector.h"
#include "layFinder.h" #include "layFinder.h"
#include "layLayerProperties.h" #include "layLayerProperties.h"
@ -59,7 +59,7 @@ namespace edt
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
// Main Service implementation // 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::Plugin (view),
lay::Editable (view), lay::Editable (view),
db::Object (manager), db::Object (manager),

View File

@ -64,7 +64,7 @@ public:
/** /**
* @brief The constructor * @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 * @brief The destructor
@ -74,7 +74,7 @@ public:
/** /**
* @brief Access to the view object * @brief Access to the view object
*/ */
lay::LayoutView *view () const lay::LayoutViewBase *view () const
{ {
return mp_view; return mp_view;
} }
@ -196,7 +196,7 @@ public:
private: private:
// The layout view that this service is attached to // The layout view that this service is attached to
lay::LayoutView *mp_view; lay::LayoutViewBase *mp_view;
lay::Dispatcher *mp_root; lay::Dispatcher *mp_root;
bool m_needs_update; bool m_needs_update;

View File

@ -26,7 +26,7 @@
#include "edtPropertiesPageUtils.h" #include "edtPropertiesPageUtils.h"
#include "layWidgets.h" #include "layWidgets.h"
#include "layQtTools.h" #include "layQtTools.h"
#include "layLayoutView.h" #include "layLayoutViewBase.h"
#include "tlScriptError.h" #include "tlScriptError.h"
#include <QFrame> #include <QFrame>
@ -233,7 +233,7 @@ PCellParametersPage::lazy_evaluation ()
} }
void void
PCellParametersPage::setup (lay::LayoutView *view, int cv_index, const db::PCellDeclaration *pcell_decl, const db::pcell_parameters_type &parameters) PCellParametersPage::setup (lay::LayoutViewBase *view, int cv_index, const db::PCellDeclaration *pcell_decl, const db::pcell_parameters_type &parameters)
{ {
mp_pcell_decl.reset (const_cast<db::PCellDeclaration *> (pcell_decl)); // no const weak_ptr ... mp_pcell_decl.reset (const_cast<db::PCellDeclaration *> (pcell_decl)); // no const weak_ptr ...
mp_view = view; mp_view = view;

View File

@ -35,7 +35,7 @@
namespace lay namespace lay
{ {
class LayoutView; class LayoutViewBase;
} }
namespace edt namespace edt
@ -80,7 +80,7 @@ public:
* @param pcell_decl The PCell declaration * @param pcell_decl The PCell declaration
* @param parameters The parameter values to show (if empty, the default values are used) * @param parameters The parameter values to show (if empty, the default values are used)
*/ */
void setup (lay::LayoutView *view, int cv_index, const db::PCellDeclaration *pcell_decl, const db::pcell_parameters_type &parameters); void setup (lay::LayoutViewBase *view, int cv_index, const db::PCellDeclaration *pcell_decl, const db::pcell_parameters_type &parameters);
/** /**
* @brief Gets the pages current state * @brief Gets the pages current state
@ -141,7 +141,7 @@ private:
QFrame *mp_error_frame, *mp_update_frame; QFrame *mp_error_frame, *mp_update_frame;
tl::weak_ptr<db::PCellDeclaration> mp_pcell_decl; tl::weak_ptr<db::PCellDeclaration> mp_pcell_decl;
std::vector<QWidget *> m_widgets; std::vector<QWidget *> m_widgets;
lay::LayoutView *mp_view; lay::LayoutViewBase *mp_view;
int m_cv_index; int m_cv_index;
db::pcell_parameters_type m_parameters; db::pcell_parameters_type m_parameters;
bool m_dense; bool m_dense;

View File

@ -22,7 +22,7 @@
#include "dbVector.h" #include "dbVector.h"
#include "layLayoutView.h" #include "layLayoutViewBase.h"
#include "laySnap.h" #include "laySnap.h"
#include "layFinder.h" #include "layFinder.h"
#include "tlProgress.h" #include "tlProgress.h"
@ -1011,7 +1011,7 @@ PartialShapeFinder::visit_cell (const db::Cell &cell, const db::Box &search_box,
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
// Main Service implementation // 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) :
#if defined(HAVE_QT) #if defined(HAVE_QT)
QObject (), QObject (),
#endif #endif

View File

@ -155,7 +155,7 @@ public:
/** /**
* @brief The constructor * @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 * @brief The destructor
@ -165,7 +165,7 @@ public:
/** /**
* @brief Access to the view object * @brief Access to the view object
*/ */
lay::LayoutView *view () const lay::LayoutViewBase *view () const
{ {
tl_assert (mp_view != 0); tl_assert (mp_view != 0);
return mp_view; return mp_view;
@ -306,7 +306,7 @@ protected:
private: private:
// The layout view that this service is attached to // The layout view that this service is attached to
lay::LayoutView *mp_view; lay::LayoutViewBase *mp_view;
lay::Dispatcher *mp_root; lay::Dispatcher *mp_root;
bool m_dragging; bool m_dragging;
bool m_keep_selection; bool m_keep_selection;

View File

@ -27,7 +27,7 @@
#endif #endif
#include "layDispatcher.h" #include "layDispatcher.h"
#include "layLayoutView.h" #include "layLayoutViewBase.h"
#include "edtPlugin.h" #include "edtPlugin.h"
#include "edtConfig.h" #include "edtConfig.h"
#include "edtService.h" #include "edtService.h"
@ -56,7 +56,7 @@ edt::RecentConfigurationPage::ConfigurationDescriptor shape_cfg_descriptors[] =
#if defined(HAVE_QT) #if defined(HAVE_QT)
static static
void get_shape_editor_options_pages (std::vector<lay::EditorOptionsPage *> &ret, lay::LayoutView *view, lay::Dispatcher *dispatcher) void get_shape_editor_options_pages (std::vector<lay::EditorOptionsPage *> &ret, lay::LayoutViewBase *view, lay::Dispatcher *dispatcher)
{ {
ret.push_back (new RecentConfigurationPage (view, dispatcher, "edit-recent-shape-param", ret.push_back (new RecentConfigurationPage (view, dispatcher, "edit-recent-shape-param",
&shape_cfg_descriptors[0], &shape_cfg_descriptors[sizeof (shape_cfg_descriptors) / sizeof (shape_cfg_descriptors[0])])); &shape_cfg_descriptors[0], &shape_cfg_descriptors[sizeof (shape_cfg_descriptors) / sizeof (shape_cfg_descriptors[0])]));
@ -76,7 +76,7 @@ void get_text_options (std::vector < std::pair<std::string, std::string> > &opti
#if defined(HAVE_QT) #if defined(HAVE_QT)
static static
void get_text_editor_options_pages (std::vector<lay::EditorOptionsPage *> &ret, lay::LayoutView *view, lay::Dispatcher *dispatcher) void get_text_editor_options_pages (std::vector<lay::EditorOptionsPage *> &ret, lay::LayoutViewBase *view, lay::Dispatcher *dispatcher)
{ {
static edt::RecentConfigurationPage::ConfigurationDescriptor text_cfg_descriptors[] = static edt::RecentConfigurationPage::ConfigurationDescriptor text_cfg_descriptors[] =
{ {
@ -106,7 +106,7 @@ void get_path_options (std::vector < std::pair<std::string, std::string> > &opti
#if defined(HAVE_QT) #if defined(HAVE_QT)
static static
void get_path_editor_options_pages (std::vector<lay::EditorOptionsPage *> &ret, lay::LayoutView *view, lay::Dispatcher *dispatcher) void get_path_editor_options_pages (std::vector<lay::EditorOptionsPage *> &ret, lay::LayoutViewBase *view, lay::Dispatcher *dispatcher)
{ {
static edt::RecentConfigurationPage::ConfigurationDescriptor path_cfg_descriptors[] = static edt::RecentConfigurationPage::ConfigurationDescriptor path_cfg_descriptors[] =
{ {
@ -146,7 +146,7 @@ void get_inst_options (std::vector < std::pair<std::string, std::string> > &opti
#if defined(HAVE_QT) #if defined(HAVE_QT)
static static
void get_inst_editor_options_pages (std::vector<lay::EditorOptionsPage *> &ret, lay::LayoutView *view, lay::Dispatcher *dispatcher) void get_inst_editor_options_pages (std::vector<lay::EditorOptionsPage *> &ret, lay::LayoutViewBase *view, lay::Dispatcher *dispatcher)
{ {
static edt::RecentConfigurationPage::ConfigurationDescriptor inst_cfg_descriptors[] = static edt::RecentConfigurationPage::ConfigurationDescriptor inst_cfg_descriptors[] =
{ {
@ -182,7 +182,7 @@ public:
#if defined(HAVE_QT) #if defined(HAVE_QT)
PluginDeclaration (const std::string &title, const std::string &mouse_mode, PluginDeclaration (const std::string &title, const std::string &mouse_mode,
void (*option_get_f) (std::vector < std::pair<std::string, std::string> > &) = 0, void (*option_get_f) (std::vector < std::pair<std::string, std::string> > &) = 0,
void (*pages_f) (std::vector <lay::EditorOptionsPage *> &, lay::LayoutView *, lay::Dispatcher *) = 0) void (*pages_f) (std::vector <lay::EditorOptionsPage *> &, lay::LayoutViewBase *, lay::Dispatcher *) = 0)
: m_title (title), m_mouse_mode (mouse_mode), mp_option_get_f (option_get_f), mp_pages_f (pages_f) : m_title (title), m_mouse_mode (mouse_mode), mp_option_get_f (option_get_f), mp_pages_f (pages_f)
{ {
// .. nothing yet .. // .. nothing yet ..
@ -254,7 +254,7 @@ private:
void (*mp_option_get_f) (std::vector < std::pair<std::string, std::string> > &options); void (*mp_option_get_f) (std::vector < std::pair<std::string, std::string> > &options);
#if defined(HAVE_QT) #if defined(HAVE_QT)
void (*mp_pages_f) (std::vector <lay::EditorOptionsPage *> &, lay::LayoutView *, lay::Dispatcher *); void (*mp_pages_f) (std::vector <lay::EditorOptionsPage *> &, lay::LayoutViewBase *, lay::Dispatcher *);
#else #else
void (*mp_pages_f) (); void (*mp_pages_f) ();
#endif #endif
@ -469,7 +469,7 @@ private:
static tl::RegisteredClass<lay::PluginDeclaration> config_decl_main (new edt::MainPluginDeclaration (tl::to_string (tr ("Instances and shapes"))), 4000, "edt::MainService"); static tl::RegisteredClass<lay::PluginDeclaration> config_decl_main (new edt::MainPluginDeclaration (tl::to_string (tr ("Instances and shapes"))), 4000, "edt::MainService");
void void
commit_recent (lay::LayoutView *view) commit_recent (lay::LayoutViewBase *view)
{ {
#if defined(HAVE_QT) #if defined(HAVE_QT)
lay::EditorOptionsPages *eo_pages = view->editor_options_pages (); lay::EditorOptionsPages *eo_pages = view->editor_options_pages ();

View File

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

View File

@ -28,7 +28,7 @@
#include "edtPropertiesPageUtils.h" #include "edtPropertiesPageUtils.h"
#include "layDialogs.h" #include "layDialogs.h"
#include "layObjectInstPath.h" #include "layObjectInstPath.h"
#include "layLayoutView.h" #include "layLayoutViewBase.h"
#include "layQtTools.h" #include "layQtTools.h"
#include "tlExceptions.h" #include "tlExceptions.h"
#include "tlString.h" #include "tlString.h"

View File

@ -25,7 +25,7 @@
#include "edtRecentConfigurationPage.h" #include "edtRecentConfigurationPage.h"
#include "edtUtils.h" #include "edtUtils.h"
#include "layDispatcher.h" #include "layDispatcher.h"
#include "layLayoutView.h" #include "layLayoutViewBase.h"
#include "layLayerTreeModel.h" #include "layLayerTreeModel.h"
#include "dbLibraryManager.h" #include "dbLibraryManager.h"
#include "dbLibrary.h" #include "dbLibrary.h"
@ -133,7 +133,7 @@ RecentConfigurationPage::set_stored_values (const std::list<std::vector<std::str
} }
static lay::LayerPropertiesConstIterator static lay::LayerPropertiesConstIterator
lp_iter_from_string (lay::LayoutView *view, const std::string &s) lp_iter_from_string (lay::LayoutViewBase *view, const std::string &s)
{ {
// parse the layer spec (<layer-props>[@<cv-index>]) // parse the layer spec (<layer-props>[@<cv-index>])
db::LayerProperties lp; db::LayerProperties lp;
@ -181,7 +181,7 @@ RecentConfigurationPage::render_to (QTreeWidgetItem *item, int column, const std
case RecentConfigurationPage::Layer: case RecentConfigurationPage::Layer:
{ {
int icon_size = view ()->style ()->pixelMetric (QStyle::PM_ButtonIconSize); int icon_size = view ()->widget ()->style ()->pixelMetric (QStyle::PM_ButtonIconSize);
lay::LayerPropertiesConstIterator l; lay::LayerPropertiesConstIterator l;
try { try {
l = lp_iter_from_string (view (), values [column]); l = lp_iter_from_string (view (), values [column]);

View File

@ -33,7 +33,7 @@
namespace lay namespace lay
{ {
class LayoutView; class LayoutViewBase;
} }
namespace edt namespace edt
@ -78,7 +78,7 @@ public:
}; };
template <class Iter> template <class Iter>
RecentConfigurationPage (lay::LayoutView *view, lay::Dispatcher *dispatcher, const std::string &recent_cfg_name, Iter begin_cfg, Iter end_cfg) RecentConfigurationPage (lay::LayoutViewBase *view, lay::Dispatcher *dispatcher, const std::string &recent_cfg_name, Iter begin_cfg, Iter end_cfg)
: EditorOptionsPage (view, dispatcher), m_recent_cfg_name (recent_cfg_name), m_cfg (begin_cfg, end_cfg) : EditorOptionsPage (view, dispatcher), m_recent_cfg_name (recent_cfg_name), m_cfg (begin_cfg, end_cfg)
{ {
init (); init ();

View File

@ -31,7 +31,7 @@
# include "edtDialogs.h" # include "edtDialogs.h"
#endif #endif
#include "layFinder.h" #include "layFinder.h"
#include "layLayoutView.h" #include "layLayoutViewBase.h"
#include "laySnap.h" #include "laySnap.h"
#include "tlProgress.h" #include "tlProgress.h"
#include "tlTimer.h" #include "tlTimer.h"
@ -62,7 +62,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), : lay::EditorServiceBase (view),
db::Object (manager), db::Object (manager),
mp_view (view), mp_view (view),
@ -82,7 +82,7 @@ Service::Service (db::Manager *manager, lay::LayoutView *view, db::ShapeIterator
// .. nothing yet .. // .. nothing yet ..
} }
Service::Service (db::Manager *manager, lay::LayoutView *view) Service::Service (db::Manager *manager, lay::LayoutViewBase *view)
: lay::EditorServiceBase (view), : lay::EditorServiceBase (view),
db::Object (manager), db::Object (manager),
mp_view (view), mp_view (view),

View File

@ -83,12 +83,12 @@ public:
/** /**
* @brief The constructor for an service selecting shapes * @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 * @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 * @brief The destructor
@ -244,7 +244,7 @@ public:
/** /**
* @brief Access to the view object * @brief Access to the view object
*/ */
lay::LayoutView *view () const lay::LayoutViewBase *view () const
{ {
tl_assert (mp_view != 0); tl_assert (mp_view != 0);
return mp_view; return mp_view;
@ -560,7 +560,7 @@ protected:
private: private:
// The layout view that the editor service is attached to // The layout view that the editor service is attached to
lay::LayoutView *mp_view; lay::LayoutViewBase *mp_view;
// The marker objects representing the selection // The marker objects representing the selection
std::vector<lay::ViewObject *> m_markers; std::vector<lay::ViewObject *> m_markers;

View File

@ -37,7 +37,7 @@
#include "dbEdgeProcessor.h" #include "dbEdgeProcessor.h"
#include "layMarker.h" #include "layMarker.h"
#include "layLayerProperties.h" #include "layLayerProperties.h"
#include "layLayoutView.h" #include "layLayoutViewBase.h"
#if defined(HAVE_QT) #if defined(HAVE_QT)
# include "layTipDialog.h" # include "layTipDialog.h"
@ -54,7 +54,7 @@ namespace edt
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
// ShapeEditService implementation // 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), : edt::Service (manager, view, shape_types),
m_layer (0), m_cv_index (0), mp_cell (0), mp_layout (0), m_combine_mode (CM_Add) m_layer (0), m_cv_index (0), mp_cell (0), mp_layout (0), m_combine_mode (CM_Add)
{ {
@ -373,7 +373,7 @@ ShapeEditService::deliver_shape (const db::Box &box)
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
// PolygonService implementation // PolygonService implementation
PolygonService::PolygonService (db::Manager *manager, lay::LayoutView *view) PolygonService::PolygonService (db::Manager *manager, lay::LayoutViewBase *view)
: ShapeEditService (manager, view, db::ShapeIterator::Polygons), : ShapeEditService (manager, view, db::ShapeIterator::Polygons),
m_closure_set (false), m_closure () m_closure_set (false), m_closure ()
{ {
@ -705,7 +705,7 @@ PolygonService::update_marker ()
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
// BoxService implementation // BoxService implementation
BoxService::BoxService (db::Manager *manager, lay::LayoutView *view) BoxService::BoxService (db::Manager *manager, lay::LayoutViewBase *view)
: ShapeEditService (manager, view, db::ShapeIterator::Boxes) : ShapeEditService (manager, view, db::ShapeIterator::Boxes)
{ {
// .. nothing yet .. // .. nothing yet ..
@ -799,7 +799,7 @@ BoxService::selection_applies (const lay::ObjectInstPath &sel) const
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
// TextService implementation // TextService implementation
TextService::TextService (db::Manager *manager, lay::LayoutView *view) TextService::TextService (db::Manager *manager, lay::LayoutViewBase *view)
: ShapeEditService (manager, view, db::ShapeIterator::Texts), : ShapeEditService (manager, view, db::ShapeIterator::Texts),
m_rot (0) m_rot (0)
{ {
@ -991,7 +991,7 @@ TextService::configure (const std::string &name, const std::string &value)
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
// PathService implementation // PathService implementation
PathService::PathService (db::Manager *manager, lay::LayoutView *view) PathService::PathService (db::Manager *manager, lay::LayoutViewBase *view)
: ShapeEditService (manager, view, db::ShapeIterator::Paths), : 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) m_width (0.1), m_bgnext (0.0), m_endext (0.0), m_type (Flush), m_needs_update (true)
{ {
@ -1232,7 +1232,7 @@ PathService::config_finalize ()
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
// InstService implementation // InstService implementation
InstService::InstService (db::Manager *manager, lay::LayoutView *view) InstService::InstService (db::Manager *manager, lay::LayoutViewBase *view)
: edt::Service (manager, view), : edt::Service (manager, view),
m_angle (0.0), m_scale (1.0), m_angle (0.0), m_scale (1.0),
m_mirror (false), m_is_pcell (false), m_mirror (false), m_is_pcell (false),

View File

@ -32,6 +32,7 @@
namespace lay namespace lay
{ {
class CellView; class CellView;
class LayoutViewBase;
class LayerPropertiesConstIterator; class LayerPropertiesConstIterator;
} }
@ -45,7 +46,7 @@ class ShapeEditService
: public edt::Service : public edt::Service
{ {
public: 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: protected:
void get_edit_layer (); void get_edit_layer ();
@ -86,7 +87,7 @@ class PolygonService
: public ShapeEditService : public ShapeEditService
{ {
public: public:
PolygonService (db::Manager *manager, lay::LayoutView *view); PolygonService (db::Manager *manager, lay::LayoutViewBase *view);
#if defined(HAVE_QT) #if defined(HAVE_QT)
virtual lay::PropertiesPage *properties_page (db::Manager *manager, QWidget *parent); virtual lay::PropertiesPage *properties_page (db::Manager *manager, QWidget *parent);
@ -119,7 +120,7 @@ class BoxService
: public ShapeEditService : public ShapeEditService
{ {
public: public:
BoxService (db::Manager *manager, lay::LayoutView *view); BoxService (db::Manager *manager, lay::LayoutViewBase *view);
#if defined(HAVE_QT) #if defined(HAVE_QT)
virtual lay::PropertiesPage *properties_page (db::Manager *manager, QWidget *parent); virtual lay::PropertiesPage *properties_page (db::Manager *manager, QWidget *parent);
@ -146,7 +147,7 @@ class TextService
: public ShapeEditService : public ShapeEditService
{ {
public: public:
TextService (db::Manager *manager, lay::LayoutView *view); TextService (db::Manager *manager, lay::LayoutViewBase *view);
~TextService (); ~TextService ();
#if defined(HAVE_QT) #if defined(HAVE_QT)
@ -180,7 +181,7 @@ class PathService
: public ShapeEditService : public ShapeEditService
{ {
public: public:
PathService (db::Manager *manager, lay::LayoutView *view); PathService (db::Manager *manager, lay::LayoutViewBase *view);
~PathService (); ~PathService ();
#if defined(HAVE_QT) #if defined(HAVE_QT)
@ -219,7 +220,7 @@ class InstService
: public edt::Service : public edt::Service
{ {
public: public:
InstService (db::Manager *manager, lay::LayoutView *view); InstService (db::Manager *manager, lay::LayoutViewBase *view);
#if defined(HAVE_QT) #if defined(HAVE_QT)
virtual lay::PropertiesPage *properties_page (db::Manager *manager, QWidget *parent); virtual lay::PropertiesPage *properties_page (db::Manager *manager, QWidget *parent);

View File

@ -29,7 +29,7 @@
#include "edtService.h" #include "edtService.h"
#include "layCellView.h" #include "layCellView.h"
#include "layLayoutView.h" #include "layLayoutViewBase.h"
#include "layEditable.h" #include "layEditable.h"
#include "tlException.h" #include "tlException.h"
@ -77,7 +77,7 @@ std::map<std::string, tl::Variant> pcell_parameters_from_string (const std::stri
// ------------------------------------------------------------- // -------------------------------------------------------------
// SelectionIterator implementation // SelectionIterator implementation
SelectionIterator::SelectionIterator (lay::LayoutView *view, bool including_transient) SelectionIterator::SelectionIterator (lay::LayoutViewBase *view, bool including_transient)
: m_transient_mode (false) : m_transient_mode (false)
{ {
mp_edt_services = view->get_plugins <edt::Service> (); mp_edt_services = view->get_plugins <edt::Service> ();
@ -145,7 +145,7 @@ SelectionIterator::next ()
// TransformationsVariants implementation // TransformationsVariants implementation
// for a lay::LayoutView // 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 // build the transformation variants cache

View File

@ -38,7 +38,7 @@
namespace lay namespace lay
{ {
class LayoutView; class LayoutViewBase;
} }
namespace edt { namespace edt {
@ -82,7 +82,7 @@ public:
class TransformationVariants class TransformationVariants
{ {
public: 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_and_layer (unsigned int cv, unsigned int layer) const;
const std::vector<db::DCplxTrans> *per_cv (unsigned int cv) const; const std::vector<db::DCplxTrans> *per_cv (unsigned int cv) const;
@ -107,7 +107,7 @@ public:
* *
* If "including_transient" is true, the transient selection will be used as fallback. * 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 * @brief Returns a value indicating whether the transient selection is taken

View File

@ -25,7 +25,7 @@
#include "edtService.h" #include "edtService.h"
#include "dbRecursiveShapeIterator.h" #include "dbRecursiveShapeIterator.h"
#include "layObjectInstPath.h" #include "layObjectInstPath.h"
#include "layLayoutView.h" #include "layLayoutViewBase.h"
namespace gsi namespace gsi
{ {
@ -489,7 +489,7 @@ private:
// extend the layout view by "edtService" specific methods // extend the layout view by "edtService" specific methods
static std::vector<edt::Service::objects::value_type> object_selection (const lay::LayoutView *view) static std::vector<edt::Service::objects::value_type> object_selection (const lay::LayoutViewBase *view)
{ {
std::vector<edt::Service::objects::value_type> result; std::vector<edt::Service::objects::value_type> result;
std::vector<edt::Service *> edt_services = view->get_plugins <edt::Service> (); std::vector<edt::Service *> edt_services = view->get_plugins <edt::Service> ();
@ -501,7 +501,7 @@ static std::vector<edt::Service::objects::value_type> object_selection (const la
return result; return result;
} }
static void set_object_selection (const lay::LayoutView *view, const std::vector<edt::Service::objects::value_type> &all_selected) static void set_object_selection (const lay::LayoutViewBase *view, const std::vector<edt::Service::objects::value_type> &all_selected)
{ {
std::vector<edt::Service::objects::value_type> sel; std::vector<edt::Service::objects::value_type> sel;
@ -521,7 +521,7 @@ static void set_object_selection (const lay::LayoutView *view, const std::vector
} }
} }
static bool has_object_selection (const lay::LayoutView *view) static bool has_object_selection (const lay::LayoutViewBase *view)
{ {
std::vector<edt::Service *> edt_services = view->get_plugins <edt::Service> (); std::vector<edt::Service *> edt_services = view->get_plugins <edt::Service> ();
for (std::vector<edt::Service *>::const_iterator s = edt_services.begin (); s != edt_services.end (); ++s) { for (std::vector<edt::Service *>::const_iterator s = edt_services.begin (); s != edt_services.end (); ++s) {
@ -532,7 +532,7 @@ static bool has_object_selection (const lay::LayoutView *view)
return false; return false;
} }
static void clear_object_selection (const lay::LayoutView *view) static void clear_object_selection (const lay::LayoutViewBase *view)
{ {
std::vector<edt::Service *> edt_services = view->get_plugins <edt::Service> (); std::vector<edt::Service *> edt_services = view->get_plugins <edt::Service> ();
for (std::vector<edt::Service *>::const_iterator s = edt_services.begin (); s != edt_services.end (); ++s) { for (std::vector<edt::Service *>::const_iterator s = edt_services.begin (); s != edt_services.end (); ++s) {
@ -540,7 +540,7 @@ static void clear_object_selection (const lay::LayoutView *view)
} }
} }
static void select_object (const lay::LayoutView *view, const edt::Service::objects::value_type &object) static void select_object (const lay::LayoutViewBase *view, const edt::Service::objects::value_type &object)
{ {
std::vector<edt::Service *> edt_services = view->get_plugins <edt::Service> (); std::vector<edt::Service *> edt_services = view->get_plugins <edt::Service> ();
for (std::vector<edt::Service *>::const_iterator s = edt_services.begin (); s != edt_services.end (); ++s) { for (std::vector<edt::Service *>::const_iterator s = edt_services.begin (); s != edt_services.end (); ++s) {
@ -551,7 +551,7 @@ static void select_object (const lay::LayoutView *view, const edt::Service::obje
} }
} }
static void unselect_object (const lay::LayoutView *view, const edt::Service::objects::value_type &object) static void unselect_object (const lay::LayoutViewBase *view, const edt::Service::objects::value_type &object)
{ {
std::vector<edt::Service *> edt_services = view->get_plugins <edt::Service> (); std::vector<edt::Service *> edt_services = view->get_plugins <edt::Service> ();
for (std::vector<edt::Service *>::const_iterator s = edt_services.begin (); s != edt_services.end (); ++s) { for (std::vector<edt::Service *>::const_iterator s = edt_services.begin (); s != edt_services.end (); ++s) {
@ -562,7 +562,7 @@ static void unselect_object (const lay::LayoutView *view, const edt::Service::ob
} }
} }
static bool has_transient_object_selection (const lay::LayoutView *view) static bool has_transient_object_selection (const lay::LayoutViewBase *view)
{ {
std::vector<edt::Service *> edt_services = view->get_plugins <edt::Service> (); std::vector<edt::Service *> edt_services = view->get_plugins <edt::Service> ();
for (std::vector<edt::Service *>::const_iterator s = edt_services.begin (); s != edt_services.end (); ++s) { for (std::vector<edt::Service *>::const_iterator s = edt_services.begin (); s != edt_services.end (); ++s) {
@ -573,18 +573,18 @@ static bool has_transient_object_selection (const lay::LayoutView *view)
return false; return false;
} }
static EditableSelectionIterator begin_objects_selected (const lay::LayoutView *view) static EditableSelectionIterator begin_objects_selected (const lay::LayoutViewBase *view)
{ {
return EditableSelectionIterator (view->get_plugins <edt::Service> (), false); return EditableSelectionIterator (view->get_plugins <edt::Service> (), false);
} }
static EditableSelectionIterator begin_objects_selected_transient (const lay::LayoutView *view) static EditableSelectionIterator begin_objects_selected_transient (const lay::LayoutViewBase *view)
{ {
return EditableSelectionIterator (view->get_plugins <edt::Service> (), true); return EditableSelectionIterator (view->get_plugins <edt::Service> (), true);
} }
static static
gsi::ClassExt<lay::LayoutView> layout_view_decl ( gsi::ClassExt<lay::LayoutViewBase> layout_view_decl (
gsi::method_ext ("has_object_selection?", &has_object_selection, gsi::method_ext ("has_object_selection?", &has_object_selection,
"@brief Returns true, if geometrical objects (shapes or cell instances) are selected in this view" "@brief Returns true, if geometrical objects (shapes or cell instances) are selected in this view"
) + ) +