WIP, some refactoring and bug fixing. Move toolkit widget works

This commit is contained in:
Matthias Koefferlein 2026-01-14 00:27:53 +01:00
parent e058c47c02
commit cca73a8ebb
8 changed files with 10 additions and 8 deletions

View File

@ -470,6 +470,7 @@ public:
{ {
lay::EditorOptionsPage *page = lay::EditorOptionsPageFactoryBase::create_page_by_name (move_editor_options_name, view, dispatcher); lay::EditorOptionsPage *page = lay::EditorOptionsPageFactoryBase::create_page_by_name (move_editor_options_name, view, dispatcher);
if (page) { if (page) {
page->set_plugin_declaration (this);
pages.push_back (page); pages.push_back (page);
} }
} }

View File

@ -36,8 +36,6 @@ SOURCES += \
gsiDeclLayTextInfo.cc \ gsiDeclLayTextInfo.cc \
gsiDeclLayTlAdded.cc \ gsiDeclLayTlAdded.cc \
gsiDeclLayRdbAdded.cc \ gsiDeclLayRdbAdded.cc \
gsiDeclLayConfigPage.cc \
gsiDeclLayEditorOptionsPage.cc \
gsiDeclLayPlugin.cc \ gsiDeclLayPlugin.cc \
gsiDeclLayPluginFactory.cc \ gsiDeclLayPluginFactory.cc \
layAbstractMenu.cc \ layAbstractMenu.cc \
@ -95,8 +93,6 @@ SOURCES += \
layUtils.cc \ layUtils.cc \
HEADERS += \ HEADERS += \
gsiDeclLayConfigPage.h \
gsiDeclLayEditorOptionsPage.h \
gsiDeclLayPlugin.h \ gsiDeclLayPlugin.h \
layEditorOptionsPage.h \ layEditorOptionsPage.h \
layEditorUtils.h \ layEditorUtils.h \

View File

@ -30,7 +30,7 @@
namespace gsi namespace gsi
{ {
Class<lay::EditorOptionsPage> decl_EditorOptionsPageBase (QT_EXTERNAL_BASE (QWidget) "lay", "EditorOptionsPageBase", Class<lay::EditorOptionsPageWidget> decl_EditorOptionsPageBase (QT_EXTERNAL_BASE (QWidget) "lay", "EditorOptionsPageBase",
method ("view", &lay::EditorOptionsPage::view, method ("view", &lay::EditorOptionsPage::view,
"@brief Gets the view object this page is associated with\n" "@brief Gets the view object this page is associated with\n"
) + ) +

View File

@ -28,14 +28,14 @@
#include "gsiDecl.h" #include "gsiDecl.h"
#include "gsiDeclBasic.h" #include "gsiDeclBasic.h"
#include "layEditorOptionsPage.h" #include "layEditorOptionsPageWidget.h"
#include "layLayoutViewBase.h" #include "layLayoutViewBase.h"
namespace gsi namespace gsi
{ {
class EditorOptionsPageImpl class EditorOptionsPageImpl
: public lay::EditorOptionsPage, public gsi::ObjectBase : public lay::EditorOptionsPageWidget, public gsi::ObjectBase
{ {
public: public:
EditorOptionsPageImpl (const std::string &title, int index); EditorOptionsPageImpl (const std::string &title, int index);

View File

@ -98,7 +98,8 @@ EditorOptionsPages::editor_options_pages (const lay::PluginDeclaration *plugin_d
{ {
std::vector<lay::EditorOptionsPage *> pages; std::vector<lay::EditorOptionsPage *> pages;
for (auto p = m_pages.begin (); p != m_pages.end (); ++p) { for (auto p = m_pages.begin (); p != m_pages.end (); ++p) {
if (p->plugin_declaration () == plugin_declaration) { if (p->plugin_declaration () == plugin_declaration ||
(p->plugin_declaration () == 0 && plugin_declaration->enable_catchall_editor_options_pages ())) {
pages.push_back (const_cast<lay::EditorOptionsPage *> (p.operator-> ())); pages.push_back (const_cast<lay::EditorOptionsPage *> (p.operator-> ()));
} }
} }

View File

@ -9,6 +9,8 @@ DEFINES += MAKE_LAYVIEW_LIBRARY
RESOURCES = \ RESOURCES = \
SOURCES = \ SOURCES = \
gsiDeclLayEditorOptionsPage.cc \
gsiDeclLayConfigPage.cc \
layEditorOptionsPageWidget.cc \ layEditorOptionsPageWidget.cc \
layGridNet.cc \ layGridNet.cc \
layEditorOptionsFrame.cc \ layEditorOptionsFrame.cc \
@ -18,6 +20,8 @@ SOURCES = \
gsiDeclLayAdditional.cc \ gsiDeclLayAdditional.cc \
HEADERS = \ HEADERS = \
gsiDeclLayEditorOptionsPage.h \
gsiDeclLayConfigPage.h \
layEditorOptionsPageWidget.h \ layEditorOptionsPageWidget.h \
layGridNet.h \ layGridNet.h \
layEditorOptionsFrame.h \ layEditorOptionsFrame.h \