Gui: [skip ci] add sub-classes of the MDIView to the type system

This commit is contained in:
wmayer
2021-11-19 12:51:13 +01:00
parent 740d71b638
commit 3bd3f20e32
9 changed files with 23 additions and 1 deletions

View File

@@ -99,6 +99,7 @@
#include "ExpressionBindingPy.h"
#include "ViewProviderLinkPy.h"
#include "EditorView.h"
#include "TextDocumentEditorView.h"
#include "SplitView3DInventor.h"
#include "View3DInventor.h"
@@ -1782,6 +1783,8 @@ void Application::initTypes(void)
Gui::AbstractSplitView ::init();
Gui::SplitView3DInventor ::init();
Gui::TextDocumentEditorView ::init();
Gui::EditorView ::init();
Gui::PythonEditorView ::init();
// View Provider
Gui::ViewProvider ::init();
Gui::ViewProviderExtension ::init();

View File

@@ -83,6 +83,8 @@ public:
/* TRANSLATOR Gui::EditorView */
TYPESYSTEM_SOURCE_ABSTRACT(Gui::EditorView, Gui::MDIView)
/**
* Constructs a EditorView which is a child of 'parent', with the
* name 'name'.
@@ -586,6 +588,8 @@ void EditorView::focusInEvent (QFocusEvent *)
// ---------------------------------------------------------
TYPESYSTEM_SOURCE_ABSTRACT(Gui::PythonEditorView, Gui::EditorView)
PythonEditorView::PythonEditorView(PythonEditor* editor, QWidget* parent)
: EditorView(editor, parent), _pye(editor)
{

View File

@@ -49,6 +49,8 @@ class GuiExport EditorView : public MDIView, public WindowParameter
{
Q_OBJECT
TYPESYSTEM_HEADER();
public:
enum DisplayName {
FullName,
@@ -118,6 +120,8 @@ class GuiExport PythonEditorView : public EditorView
{
Q_OBJECT
TYPESYSTEM_HEADER();
public:
PythonEditorView(PythonEditor* editor, QWidget* parent);
~PythonEditorView();

View File

@@ -18,6 +18,7 @@
#include <Base/Console.h>
#include <Gui/Application.h>
#include <Gui/Language/Translator.h>
#include "ImageView.h"
#include "Workbench.h"
#include "ViewProviderImagePlane.h"
@@ -50,6 +51,7 @@ PyMOD_INIT_FUNC(ImageGui)
// instantiating the commands
CreateImageCommands();
ImageGui::ImageView::init();
ImageGui::ViewProviderImagePlane::init();
ImageGui::Workbench::init();

View File

@@ -36,6 +36,8 @@ using namespace ImageGui;
/* TRANSLATOR ImageGui::ImageView */
TYPESYSTEM_SOURCE_ABSTRACT(ImageGui::ImageView, Gui::MDIView)
ImageView::ImageView(QWidget* parent)
: MDIView(0, parent), _ignoreCloseEvent(false)
{

View File

@@ -40,6 +40,8 @@ class ImageGuiExport ImageView : public Gui::MDIView
{
Q_OBJECT
TYPESYSTEM_HEADER();
public:
ImageView(QWidget* parent);
virtual ~ImageView();

View File

@@ -170,6 +170,7 @@ PyMOD_INIT_FUNC(WebGui)
// instantiating the commands
CreateWebCommands();
WebGui::BrowserView::init();
WebGui::Workbench::init();
// add resources and reloads the translators

View File

@@ -359,6 +359,8 @@ void WebView::triggerContextMenuAction(int id)
/* TRANSLATOR Gui::BrowserView */
TYPESYSTEM_SOURCE_ABSTRACT(WebGui::BrowserView, Gui::MDIView)
/**
* Constructs a BrowserView which is a child of 'parent', with the
* name 'name'.

View File

@@ -33,7 +33,7 @@
#include <QWebEngineView>
namespace WebGui {
class WebEngineUrlRequestInterceptor;
};
}
#elif defined(QTWEBKIT)
#include <QWebView>
#endif
@@ -79,6 +79,8 @@ class WebGuiExport BrowserView : public Gui::MDIView,
{
Q_OBJECT
TYPESYSTEM_HEADER();
public:
BrowserView(QWidget* parent);
~BrowserView();