mirror of
https://github.com/KLayout/klayout.git
synced 2026-09-04 00:39:53 +02:00
Implementation proposal
The solution tries to be a bit more generic: - four buttons are there to synchronize coordinates - three buttons to snap p1, p2 and auto-measure from p1.
This commit is contained in:
@@ -331,7 +331,7 @@ public:
|
||||
* by the caller. The return value is 0 if the Editable object does
|
||||
* not support a properties page.
|
||||
*/
|
||||
virtual lay::PropertiesPage *properties_page (QWidget * /*parent*/)
|
||||
virtual lay::PropertiesPage *properties_page (db::Manager * /*manager*/, QWidget * /*parent*/)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -27,8 +27,8 @@
|
||||
namespace lay
|
||||
{
|
||||
|
||||
PropertiesPage::PropertiesPage (QWidget *parent, lay::Editable *editable)
|
||||
: QFrame (parent), mp_editable (editable)
|
||||
PropertiesPage::PropertiesPage (QWidget *parent, db::Manager *manager, lay::Editable *editable)
|
||||
: QFrame (parent), mp_manager (manager), mp_editable (editable)
|
||||
{
|
||||
// .. nothing else ..
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@ public:
|
||||
* empty, at_start () is supposed to return true then.
|
||||
* The dialog will call update () to update the display accordingly.
|
||||
*/
|
||||
PropertiesPage (QWidget *parent, lay::Editable *editable);
|
||||
PropertiesPage (QWidget *parent, db::Manager *manager, lay::Editable *editable);
|
||||
|
||||
/**
|
||||
* @brief The destructor
|
||||
@@ -210,7 +210,17 @@ public:
|
||||
return mp_editable;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Gets the transaction manager object
|
||||
* Use this object to implement undable operations on the properties page.
|
||||
*/
|
||||
db::Manager *manager ()
|
||||
{
|
||||
return mp_manager;
|
||||
}
|
||||
|
||||
private:
|
||||
db::Manager *mp_manager;
|
||||
lay::Editable *mp_editable;
|
||||
};
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ PropertiesDialog::PropertiesDialog (QWidget * /*parent*/, db::Manager *manager,
|
||||
mp_stack = new QStackedLayout;
|
||||
|
||||
for (lay::Editables::iterator e = mp_editables->begin (); e != mp_editables->end (); ++e) {
|
||||
mp_properties_pages.push_back (e->properties_page (content_frame));
|
||||
mp_properties_pages.push_back (e->properties_page (mp_manager, content_frame));
|
||||
if (mp_properties_pages.back ()) {
|
||||
mp_stack->addWidget (mp_properties_pages.back ());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user