Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qaxwidgetpropertysheet.h
Go to the documentation of this file.
1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QACTIVEXPROPERTYSHEET_H
5#define QACTIVEXPROPERTYSHEET_H
6
7#include <QtDesigner/private/qdesigner_propertysheet_p.h>
8
10
12class QDesignerFormWindowInterface;
13
14/* The propertysheet has a method to delete itself and repopulate
15 * if the "control" property changes. Pre 4.5, the control property
16 * might not be the first one, so, the properties are stored and
17 * re-applied. If the "control" is the first one, it should be
18 * sufficient to reapply the changed flags, however, care must be taken when
19 * resetting the control.
20 * Resetting a control: The current behaviour is that the modified Active X properties are added again
21 * as Fake-Properties, which is a nice side-effect as not cause a loss. */
22
24{
25 Q_OBJECT
26 Q_INTERFACES(QDesignerPropertySheetExtension)
27public:
29
30 bool isEnabled(int index) const override;
31 bool isVisible(int index) const override;
32 QVariant property(int index) const override;
33 void setProperty(int index, const QVariant &value) override;
34 bool reset(int index) override;
35 int indexOf(const QString &name) const override;
37
38 static const char *controlPropertyName;
39
40public slots:
42
43private:
44 QDesignerAxWidget *axWidget() const;
45
46 const QString m_controlProperty;
47 const QString m_propertyGroup;
48 int m_controlIndex;
49 struct SavedProperties {
50 QVariantMap changedProperties;
51 QWidget *widget;
52 QString clsid;
53 } m_currentProperties;
54
55 static void reloadPropertySheet(const struct SavedProperties &properties, QDesignerFormWindowInterface *formWin);
56};
57
58using ActiveXPropertySheetFactory = QDesignerPropertySheetFactory<QDesignerAxWidget, QAxWidgetPropertySheet>;
59
60QT_END_NAMESPACE
61
62#endif
QObject * createExtension(QObject *object, const QString &iid, QObject *parent) const override
Creates an extension specified by iid for the given object.
bool loadWidgetExtraInfo(DomWidget *ui_widget) override
Loads extra information about the specified widget, and returns true if successful; otherwise returns...
bool saveWidgetExtraInfo(DomWidget *ui_widget) override
Saves the information about the specified widget, and returns true if successful; otherwise returns f...
bool saveUiExtraInfo(DomUI *ui) override
Saves the information about the user interface specified by ui, and returns true if successful; other...
QDesignerFormEditorInterface * core() const override
\omit
QWidget * widget() const override
Returns the widget described by this extension.
bool loadUiExtraInfo(DomUI *ui) override
Loads extra information about the user interface specified by ui, and returns true if successful; oth...
int indexOf(const QString &name) const override
void setProperty(int index, const QVariant &value) override
bool reset(int index) override
bool dynamicPropertiesAllowed() const override
bool isEnabled(int index) const override
QVariant property(int index) const override
static const char * controlPropertyName
bool isVisible(int index) const override
QDesignerAxPluginWidget(QWidget *parent)
const QMetaObject * metaObject() const override
int qt_metacall(QMetaObject::Call, int, void **) override
virtual ~QDesignerAxPluginWidget()
QAxWidget * axobject() const
void paintEvent(QPaintEvent *event) override
This event handler can be reimplemented in a subclass to receive paint events passed in event.
QString control() const
unsigned drawFlags() const
QSize minimumSizeHint() const override
bool loadControl(const QString &clsid)
QSize sizeHint() const override
void setControl(const QString &clsid)
void setDrawFlags(unsigned f)
static QPixmap widgetIcon()
QObject * parent
Definition qobject.h:73
Combined button and popup list for selecting options.