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:
Matthias Koefferlein
2018-06-03 00:54:58 +02:00
parent 40b2e9a1a5
commit bfbd8732f3
11 changed files with 106 additions and 45 deletions
@@ -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"
+6
View File
@@ -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;