Fixed Qt-less LayoutView (removed QWidget as base class which is no longer true)

This commit is contained in:
Matthias Koefferlein 2022-07-31 00:11:20 +02:00
parent 3c5ca36081
commit 429e43fe37
2 changed files with 6 additions and 12 deletions

View File

@ -33,13 +33,6 @@
#include "dbLayoutVsSchematic.h"
#include "tlStream.h"
#if defined(HAVE_QTBINDINGS)
# include "gsiQtGuiExternals.h"
# include "gsiQtWidgetsExternals.h" // for Qt5
#else
# define QT_EXTERNAL_BASE(x)
#endif
namespace gsi
{
@ -466,11 +459,7 @@ static lay::AbstractMenu *menu (lay::LayoutViewBase *view)
return view->menu ();
}
#if defined(HAVE_QT)
LAYBASIC_PUBLIC Class<lay::LayoutViewBase> decl_LayoutViewBase (QT_EXTERNAL_BASE (QWidget) "lay", "LayoutViewBase",
#else
LAYBASIC_PUBLIC Class<lay::LayoutViewBase> decl_LayoutViewBase (QT_EXTERNAL_BASE (QWidget) "lay", "LayoutViewBase",
#endif
LAYBASIC_PUBLIC Class<lay::LayoutViewBase> decl_LayoutViewBase ("lay", "LayoutViewBase",
gsi::constant ("LV_NoLayers", (unsigned int) lay::LayoutViewBase::LV_NoLayers,
"@brief With this option, no layers view will be provided (see \\layer_control_frame)\n"
"Use this value with the constructor's 'options' argument.\n"

View File

@ -116,6 +116,11 @@ Class<lay::LayoutView> decl_LayoutView (decl_LayoutViewBase, "lay", "LayoutView"
"\n"
"This method has been introduced in version 0.27\n"
) +
gsi::method ("widget", &lay::LayoutView::widget,
"@brief Gets the QWidget object for the layout view\n"
"\n"
"This method has been introduced in version 0.28 where LayoutView is no longer derived from QWidget directly.\n"
) +
#endif
gsi::method ("current", &lay::LayoutView::current,
"@brief Returns the current view\n"