1// abstractformwindow.sip generated by MetaSIP
2//
3// This file is part of the QtDesigner Python extension module.
4//
5// Copyright (c) 2021 Riverbank Computing Limited <info@riverbankcomputing.com>
6//
7// This file is part of PyQt5.
8//
9// This file may be used under the terms of the GNU General Public License
10// version 3.0 as published by the Free Software Foundation and appearing in
11// the file LICENSE included in the packaging of this file.  Please review the
12// following information to ensure the GNU General Public License version 3.0
13// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
14//
15// If you do not wish to use this file under the terms of the GPL version 3.0
16// then you may purchase a commercial license.  For more information contact
17// info@riverbankcomputing.com.
18//
19// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
20// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
21
22
23class QDesignerFormWindowInterface : QWidget /Abstract/
24{
25%TypeHeaderCode
26#include <abstractformwindow.h>
27%End
28
29public:
30    enum FeatureFlag
31    {
32        EditFeature,
33        GridFeature,
34        TabOrderFeature,
35        DefaultFeature,
36    };
37
38    typedef QFlags<QDesignerFormWindowInterface::FeatureFlag> Feature;
39    QDesignerFormWindowInterface(QWidget *parent /TransferThis/ = 0, Qt::WindowFlags flags = 0);
40    virtual ~QDesignerFormWindowInterface();
41    virtual QString fileName() const = 0;
42    virtual QDir absoluteDir() const = 0;
43    virtual QString contents() const = 0;
44    virtual bool setContents(QIODevice *dev, QString *errorMessage = 0) = 0;
45    virtual QDesignerFormWindowInterface::Feature features() const = 0;
46    virtual bool hasFeature(QDesignerFormWindowInterface::Feature f) const = 0;
47    virtual QString author() const = 0;
48    virtual void setAuthor(const QString &author) = 0;
49    virtual QString comment() const = 0;
50    virtual void setComment(const QString &comment) = 0;
51    virtual void layoutDefault(int *margin, int *spacing) = 0;
52    virtual void setLayoutDefault(int margin, int spacing) = 0;
53    virtual void layoutFunction(QString *margin /Out/, QString *spacing /Out/) = 0;
54    virtual void setLayoutFunction(const QString &margin, const QString &spacing) = 0;
55    virtual QString pixmapFunction() const = 0;
56    virtual void setPixmapFunction(const QString &pixmapFunction) = 0;
57    virtual QString exportMacro() const = 0;
58    virtual void setExportMacro(const QString &exportMacro) = 0;
59    virtual QStringList includeHints() const = 0;
60    virtual void setIncludeHints(const QStringList &includeHints) = 0;
61    virtual QDesignerFormEditorInterface *core() const;
62    virtual QDesignerFormWindowCursorInterface *cursor() const = 0;
63    virtual QPoint grid() const = 0;
64    virtual QWidget *mainContainer() const = 0;
65    virtual void setMainContainer(QWidget *mainContainer /KeepReference/) = 0;
66    virtual bool isManaged(QWidget *widget) const = 0;
67    virtual bool isDirty() const = 0;
68    static QDesignerFormWindowInterface *findFormWindow(QWidget *w);
69    static QDesignerFormWindowInterface *findFormWindow(QObject *obj);
70    virtual void emitSelectionChanged() = 0;
71    virtual QStringList resourceFiles() const = 0;
72    virtual void addResourceFile(const QString &path) = 0;
73    virtual void removeResourceFile(const QString &path) = 0;
74
75public slots:
76    virtual void manageWidget(QWidget *widget) = 0;
77    virtual void unmanageWidget(QWidget *widget) = 0;
78    virtual void setFeatures(QDesignerFormWindowInterface::Feature f) = 0;
79    virtual void setDirty(bool dirty) = 0;
80    virtual void clearSelection(bool update = true) = 0;
81    virtual void selectWidget(QWidget *widget, bool select = true) = 0;
82    virtual void setGrid(const QPoint &grid) = 0;
83    virtual void setFileName(const QString &fileName) = 0;
84    virtual bool setContents(const QString &contents) = 0;
85
86signals:
87    void mainContainerChanged(QWidget *mainContainer);
88    void fileNameChanged(const QString &fileName);
89    void featureChanged(QDesignerFormWindowInterface::Feature f /ScopesStripped=1/);
90    void selectionChanged();
91    void geometryChanged();
92    void resourceFilesChanged();
93    void widgetManaged(QWidget *widget);
94    void widgetUnmanaged(QWidget *widget);
95    void aboutToUnmanageWidget(QWidget *widget);
96    void activated(QWidget *widget);
97    void changed();
98    void widgetRemoved(QWidget *w);
99    void objectRemoved(QObject *o);
100
101public:
102    virtual QStringList checkContents() const = 0;
103    QStringList activeResourceFilePaths() const;
104    virtual QWidget *formContainer() const = 0;
105    void activateResourceFilePaths(const QStringList &paths, int *errorCount = 0, QString *errorMessages /Out/ = 0);
106};
107