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
qdesigner_propertyeditor_p.h
Go to the documentation of this file.
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//
5// W A R N I N G
6// -------------
7//
8// This file is not part of the Qt API. It exists for the convenience
9// of Qt Designer. This header
10// file may change from version to version without notice, or even be removed.
11//
12// We mean it.
13//
14
15
16#ifndef DESIGNERPROPERTYEDITOR_H
17#define DESIGNERPROPERTYEDITOR_H
18
20#include "shared_enums_p.h"
21#include <QtDesigner/abstractpropertyeditor.h>
22
23QT_BEGIN_NAMESPACE
24
25namespace qdesigner_internal {
26
27// Extends the QDesignerPropertyEditorInterface by property comment handling and
28// a signal for resetproperty.
29
31{
33public:
34 explicit QDesignerPropertyEditor(QWidget *parent = nullptr, Qt::WindowFlags flags = {});
35
36 // A pair <ValidationMode, bool isTranslatable>.
38
39 // Return a pair of validation mode and flag indicating whether property is translatable
40 // for textual properties.
43
51
52public Q_SLOTS:
53 /* Quick update that assumes the actual count of properties has not changed
54 * (as opposed to setObject()). N/A when for example executing a
55 * layout command and margin properties appear. */
56 virtual void updatePropertySheet() = 0;
57 virtual void reloadResourceProperties() = 0;
58
59private Q_SLOTS:
60 void slotPropertyChanged(const QString &name, const QVariant &value);
61
62protected:
64
65private:
67
68};
69
70} // namespace qdesigner_internal
71
72QT_END_NAMESPACE
73
74#endif // DESIGNERPROPERTYEDITOR_H
The QDesignerMetaDataBaseItemInterface class provides an interface to individual items in \QD's meta ...
QtAbstractPropertyBrowser provides a base class for implementing property browsers.
The QtBrowserItem class represents a property in a property browser instance.
The QtButtonPropertyBrowser class provides a drop down QToolButton based property browser.
The QtProperty class encapsulates an instance of a property.
The QtTreePropertyBrowser class provides QTreeWidget based property browser.
The QtVariantProperty class is a convenience class handling QVariant based properties.
QString currentPropertyName() const override
Returns the name of the currently selected property in the property editor.
bool event(QEvent *event) override
This virtual function receives events to an object and should return true if the event e was recogniz...
QDesignerFormEditorInterface * core() const override
Returns a pointer to \QD's current QDesignerFormEditorInterface object.
void setObject(QObject *object) override
Changes the currently selected object in \QD's workspace, to object.
QObject * object() const override
Returns the currently selected object in \QD's workspace.
void setReadOnly(bool readOnly) override
If readOnly is true, the property editor is made write protected; otherwise the write protection is r...
bool isReadOnly() const override
Returns true if the property editor is write protected; otherwise false.
void setPropertyValue(const QString &name, const QVariant &value, bool changed=true) override
Sets the value of the property specified by name to value.
bool loadContents(const QString &contents) override
void dropEvent(QDropEvent *event) override
QString fileName() const override
Returns the name of the XML file \QD is currently using to populate its widget box.
Widget widget(int cat_idx, int wgt_idx) const override
Category category(int cat_idx) const override
bool load() override
Populates \QD's widget box by loading (or reloading) the currently specified XML file.
void dragEnterEvent(QDragEnterEvent *event) override
void dropWidgets(const QList< QDesignerDnDItemInterface * > &item_list, const QPoint &global_mouse_pos) override
void removeCategory(int cat_idx) override
void dragMoveEvent(QDragMoveEvent *event) override
void addWidget(int cat_idx, const Widget &wgt) override
int categoryCount() const override
void setFileName(const QString &file_name) override
Sets the XML file that \QD will use to populate its widget box, to fileName.
bool save() override
Saves the contents of \QD's widget box in the file specified by the fileName() function.
void addCategory(const Category &cat) override
QDesignerFormEditorInterface * core() const
Definition widgetbox.cpp:97
int widgetCount(int cat_idx) const override
void removeWidget(int cat_idx, int wgt_idx) override
QIcon iconForWidget(const QString &className, const QString &category=QString()) const override
Combined button and popup list for selecting options.
Auxiliary methods to store/retrieve settings.
#define QT_PROPERTYEDITOR_EXPORT
#define INIT_PLUGIN_INSTANCE(PLUGIN)
static int qtMajorVersion(int qtVersion)
static QString widgetBoxFileName(int qtVersion, const QDesignerLanguageExtension *lang=nullptr)
static void setMinorVersion(int minorVersion, int *qtVersion)
static int qtMinorVersion(int qtVersion)
#define QDESIGNER_SHARED_EXPORT
#define QT_WIDGETBOX_EXPORT