16#ifndef SPACER_WIDGET_H
17#define SPACER_WIDGET_H
21#include <QtWidgets/qwidget.h>
22#include <QtWidgets/qsizepolicy.h>
26class QDesignerFormWindowInterface;
33 Q_PROPERTY(QString spacerName READ objectName WRITE setObjectName)
34 Q_PROPERTY(Qt::Orientation orientation READ orientation WRITE setOrientation)
35 Q_PROPERTY(QSizePolicy::Policy sizeType READ sizeType WRITE setSizeType)
36 Q_PROPERTY(QSize sizeHint READ sizeHintProperty WRITE setSizeHintProperty DESIGNABLE
true STORED
true)
39 Spacer(QWidget *parent =
nullptr);
41 QSize sizeHint()
const override;
43 QSize sizeHintProperty()
const;
44 void setSizeHintProperty(
const QSize &s);
46 QSizePolicy::Policy sizeType()
const;
47 void setSizeType(QSizePolicy::Policy t);
49 Qt::Alignment alignment()
const;
50 Qt::Orientation orientation()
const;
52 void setOrientation(Qt::Orientation o);
53 void setInteractiveMode(
bool b) { m_interactive = b; };
55 bool event(QEvent *e) override;
58 void paintEvent(QPaintEvent *e) override;
59 void resizeEvent(QResizeEvent* e) override;
63 bool isInLayout()
const;
66 const QSize m_SizeOffset = QSize(3, 3);
67 QDesignerFormWindowInterface *m_formWindow;
68 Qt::Orientation m_orientation = Qt::Vertical;
69 bool m_interactive =
true;
71 enum LayoutState { InLayout, OutsideLayout, UnknownLayoutState };
72 mutable LayoutState m_layoutState = UnknownLayoutState;
73 QSize m_sizeHint = QSize(0, 0);
virtual bool dynamicPropertiesAllowed() const =0
virtual bool isDynamicProperty(int index) const =0
virtual int addDynamicProperty(const QString &propertyName, const QVariant &value)=0
virtual bool canAddDynamicProperty(const QString &propertyName) const =0
virtual bool removeDynamicProperty(int index)=0
virtual ~QDesignerDynamicPropertySheetExtension()=default
QDesignerPropertySheetFactory(QExtensionManager *parent=nullptr)
static void registerExtension(QExtensionManager *mgr)
FormEditorOptionsPage(QDesignerFormEditorInterface *core)
QString name() const override
QWidget * createPage(QWidget *parent) override
void remove(int index) override
QWidget * widget(int index) const override
void insertWidget(int index, QWidget *widget) override
void addWidget(QWidget *widget) override
int count() const override
bool canAddWidget() const override
int currentIndex() const override
bool canRemove(int) const override
void setCurrentIndex(int index) override
bool canRemove(int) const override
void addWidget(QWidget *widget) override
bool canAddWidget() const override
int count() const override
void remove(int index) override
static void positionNewMdiChild(const QWidget *area, QWidget *mdiChild)
int currentIndex() const override
QWidget * widget(int index) const override
void insertWidget(int index, QWidget *widget) override
void setCurrentIndex(int index) override
bool isChanged(int index) const override
void setProperty(int index, const QVariant &value) override
static bool checkProperty(const QString &propertyName)
bool isEnabled(int index) const override
bool reset(int index) override
QVariant property(int index) const override
int currentIndex() const override
void addWidget(QWidget *widget) override
int count() const override
QWidget * widget(int index) const override
void remove(int index) override
bool canRemove(int) const override
bool canAddWidget() const override
void insertWidget(int index, QWidget *widget) override
void setCurrentIndex(int index) override
static const char * pageIdProperty
bool reset(int index) override
bool isVisible(int index) const override
void setProperty(int index, const QVariant &value) override
~SpacerPropertySheet() override
bool dynamicPropertiesAllowed() const override
bool isVisible(int index) const override
QString name() const override
QWidget * createPage(QWidget *parent) override
Combined button and popup list for selecting options.
Auxiliary methods to store/retrieve settings.
#define QDESIGNER_SHARED_EXPORT