blob: fe1d17bdc1244e7be2f7d5914f93526e3c8637ec (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#pragma once
#include "designerconstants.h"
#include <utils/fancymainwindow.h>
QT_BEGIN_NAMESPACE
class QDesignerFormWindowInterface;
QT_END_NAMESPACE
namespace SharedTools { class WidgetHost; }
namespace Core { class IEditor; }
namespace Designer {
class FormWindowEditor;
namespace Internal {
class EditorData;
class FormEditorStack;
// Design mode main view.
class EditorWidget : public Utils::FancyMainWindow
{
Q_OBJECT
public:
explicit EditorWidget(QWidget *parent = nullptr);
QDockWidget* const* designerDockWidgets() const;
// Form editor stack API
void add(SharedTools::WidgetHost *widgetHost, FormWindowEditor *formWindowEditor);
void removeFormWindowEditor(Core::IEditor *xmlEditor);
bool setVisibleEditor(Core::IEditor *xmlEditor);
SharedTools::WidgetHost *formWindowEditorForXmlEditor(const Core::IEditor *xmlEditor) const;
SharedTools::WidgetHost *formWindowEditorForFormWindow(const QDesignerFormWindowInterface *fw) const;
EditorData activeEditor() const;
void resetToDefaultLayout();
private:
FormEditorStack *m_stack = nullptr;
QDockWidget *m_designerDockWidgets[Designer::Constants::DesignerSubWindowCount];
};
} // namespace Internal
} // namespace Designer
|