mirror of
https://github.com/KLayout/klayout.git
synced 2026-09-07 11:31:08 +02:00
WIP: basic availability of LayoutView as separate component
- The deferred method scheduler is now automatically created when required and when there is a QApplication - QApplication and related have argv constructors
This commit is contained in:
@@ -23,6 +23,8 @@
|
||||
|
||||
#include "gsiDecl.h"
|
||||
#include "gsiSignals.h"
|
||||
#include "gsiQtGuiExternals.h"
|
||||
#include "gsiQtWidgetsExternals.h" // for Qt5
|
||||
#include "rdb.h"
|
||||
#include "layLayoutView.h"
|
||||
#include "layDitherPattern.h"
|
||||
@@ -367,7 +369,7 @@ static lay::LayoutView *new_view ()
|
||||
return new lay::LayoutView (0, false, 0);
|
||||
}
|
||||
|
||||
Class<lay::LayoutView> decl_LayoutView ("lay", "LayoutView",
|
||||
Class<lay::LayoutView> decl_LayoutView (QT_EXTERNAL_BASE (QWidget) "lay", "LayoutView",
|
||||
gsi::constructor ("new", &new_view,
|
||||
"@brief Creates a standalone view\n"
|
||||
"\n"
|
||||
|
||||
@@ -255,6 +255,9 @@ LayoutView::LayoutView (db::Manager *manager, bool editable, lay::PluginRoot *ro
|
||||
m_annotation_shapes (manager),
|
||||
dm_prop_changed (this, &LayoutView::do_prop_changed)
|
||||
{
|
||||
// ensures the deferred method scheduler is present
|
||||
tl::DeferredMethodScheduler::instance ();
|
||||
|
||||
setObjectName (QString::fromUtf8 (name));
|
||||
init (manager, root, parent);
|
||||
}
|
||||
@@ -267,6 +270,9 @@ LayoutView::LayoutView (lay::LayoutView *source, db::Manager *manager, bool edit
|
||||
m_annotation_shapes (manager),
|
||||
dm_prop_changed (this, &LayoutView::do_prop_changed)
|
||||
{
|
||||
// ensures the deferred method scheduler is present
|
||||
tl::DeferredMethodScheduler::instance ();
|
||||
|
||||
setObjectName (QString::fromUtf8 (name));
|
||||
|
||||
m_annotation_shapes = source->m_annotation_shapes;
|
||||
|
||||
Reference in New Issue
Block a user