abstractformwindow.sip 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. // abstractformwindow.sip generated by MetaSIP
  2. //
  3. // This file is part of the QtDesigner Python extension module.
  4. //
  5. // Copyright (c) 2026 Riverbank Computing Limited <info@riverbankcomputing.com>
  6. //
  7. // This file is part of PyQt6.
  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. class QDesignerFormWindowInterface : public QWidget /Abstract/
  22. {
  23. %TypeHeaderCode
  24. #include <abstractformwindow.h>
  25. %End
  26. public:
  27. enum FeatureFlag /BaseType=Flag/
  28. {
  29. EditFeature,
  30. GridFeature,
  31. TabOrderFeature,
  32. DefaultFeature,
  33. };
  34. typedef QFlags<QDesignerFormWindowInterface::FeatureFlag> Feature;
  35. QDesignerFormWindowInterface(QWidget *parent /TransferThis/ = 0, Qt::WindowFlags flags = {});
  36. virtual ~QDesignerFormWindowInterface();
  37. virtual QString fileName() const = 0;
  38. virtual QDir absoluteDir() const = 0;
  39. virtual QString contents() const = 0;
  40. virtual bool setContents(QIODevice *dev, QString *errorMessage = 0) = 0;
  41. virtual QDesignerFormWindowInterface::Feature features() const = 0;
  42. virtual bool hasFeature(QDesignerFormWindowInterface::Feature f) const = 0;
  43. virtual QString author() const = 0;
  44. virtual void setAuthor(const QString &author) = 0;
  45. virtual QString comment() const = 0;
  46. virtual void setComment(const QString &comment) = 0;
  47. virtual void layoutDefault(int *margin, int *spacing) = 0;
  48. virtual void setLayoutDefault(int margin, int spacing) = 0;
  49. virtual void layoutFunction(QString *margin /Out/, QString *spacing /Out/) = 0;
  50. virtual void setLayoutFunction(const QString &margin, const QString &spacing) = 0;
  51. virtual QString pixmapFunction() const = 0;
  52. virtual void setPixmapFunction(const QString &pixmapFunction) = 0;
  53. virtual QString exportMacro() const = 0;
  54. virtual void setExportMacro(const QString &exportMacro) = 0;
  55. virtual QStringList includeHints() const = 0;
  56. virtual void setIncludeHints(const QStringList &includeHints) = 0;
  57. virtual QDesignerFormEditorInterface *core() const;
  58. virtual QDesignerFormWindowCursorInterface *cursor() const = 0;
  59. virtual QPoint grid() const = 0;
  60. virtual QWidget *mainContainer() const = 0;
  61. virtual void setMainContainer(QWidget *mainContainer /KeepReference/) = 0;
  62. virtual bool isManaged(QWidget *widget) const = 0;
  63. virtual bool isDirty() const = 0;
  64. static QDesignerFormWindowInterface *findFormWindow(QWidget *w);
  65. static QDesignerFormWindowInterface *findFormWindow(QObject *obj);
  66. virtual void emitSelectionChanged() = 0;
  67. virtual QStringList resourceFiles() const = 0;
  68. virtual void addResourceFile(const QString &path) = 0;
  69. virtual void removeResourceFile(const QString &path) = 0;
  70. public slots:
  71. virtual void manageWidget(QWidget *widget) = 0;
  72. virtual void unmanageWidget(QWidget *widget) = 0;
  73. virtual void setFeatures(QDesignerFormWindowInterface::Feature f) = 0;
  74. virtual void setDirty(bool dirty) = 0;
  75. virtual void clearSelection(bool update = true) = 0;
  76. virtual void selectWidget(QWidget *widget, bool select = true) = 0;
  77. virtual void setGrid(const QPoint &grid) = 0;
  78. virtual void setFileName(const QString &fileName) = 0;
  79. virtual bool setContents(const QString &contents) = 0;
  80. signals:
  81. void mainContainerChanged(QWidget *mainContainer);
  82. void fileNameChanged(const QString &fileName);
  83. void featureChanged(QDesignerFormWindowInterface::Feature f /ScopesStripped=1/);
  84. void selectionChanged();
  85. void geometryChanged();
  86. void resourceFilesChanged();
  87. void widgetManaged(QWidget *widget);
  88. void widgetUnmanaged(QWidget *widget);
  89. void aboutToUnmanageWidget(QWidget *widget);
  90. void activated(QWidget *widget);
  91. void changed();
  92. void widgetRemoved(QWidget *w);
  93. void objectRemoved(QObject *o);
  94. public:
  95. virtual QStringList checkContents() const = 0;
  96. QStringList activeResourceFilePaths() const;
  97. virtual QWidget *formContainer() const = 0;
  98. void activateResourceFilePaths(const QStringList &paths, int *errorCount = 0, QString *errorMessages /Out/ = 0);
  99. };