1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
3
4#ifndef QDESIGNER_FORMWINDOW_H
5#define QDESIGNER_FORMWINDOW_H
6
7#include <QtCore/qpointer.h>
8#include <QtWidgets/qwidget.h>
9
10QT_BEGIN_NAMESPACE
11
12class QDesignerWorkbench;
13class QDesignerFormWindowInterface;
14
15class QDesignerFormWindow: public QWidget
16{
17 Q_OBJECT
18public:
19 QDesignerFormWindow(QDesignerFormWindowInterface *formWindow, QDesignerWorkbench *workbench,
20 QWidget *parent = nullptr, Qt::WindowFlags flags = {});
21
22 void firstShow();
23
24 ~QDesignerFormWindow() override;
25
26 QAction *action() const;
27 QDesignerWorkbench *workbench() const;
28 QDesignerFormWindowInterface *editor() const;
29
30 QRect geometryHint() const;
31
32public slots:
33 void updateChanged();
34
35private slots:
36 void updateWindowTitle(const QString &fileName);
37 void slotGeometryChanged();
38
39signals:
40 void minimizationStateChanged(QDesignerFormWindowInterface *formWindow, bool minimized);
41 void triggerAction();
42
43protected:
44 void changeEvent(QEvent *e) override;
45 void closeEvent(QCloseEvent *ev) override;
46 void resizeEvent(QResizeEvent* rev) override;
47
48private:
49 int getNumberOfUntitledWindows() const;
50 QPointer<QDesignerFormWindowInterface> m_editor;
51 QPointer<QDesignerWorkbench> m_workbench;
52 QAction *m_action;
53 bool m_initialized;
54 bool m_windowTitleInitialized;
55};
56
57QT_END_NAMESPACE
58
59#endif // QDESIGNER_FORMWINDOW_H
60

source code of qttools/src/designer/src/designer/qdesigner_formwindow.h