QDesignerPromotionInterface Class
The QDesignerPromotionInterface provides functions for modifying the promoted classes in Designer. \inmodule
QtDesigner \internal
\since
4.3. More...
Header: | #include <QDesignerPromotionInterface> |
Public Types
struct | PromotedClass |
PromotedClasses |
Public Functions
virtual bool | addPromotedClass(const QString &baseClass, const QString &className, const QString &includeFile, QString *errorMessage) = 0 |
virtual bool | changePromotedClassName(const QString &oldClassName, const QString &newClassName, QString *errorMessage) = 0 |
virtual PromotedClasses | promotedClasses() const = 0 |
virtual QList<QDesignerWidgetDataBaseItemInterface *> | promotionBaseClasses() const = 0 |
virtual QSet<QString> | referencedPromotedClassNames() const = 0 |
virtual bool | removePromotedClass(const QString &className, QString *errorMessage) = 0 |
virtual bool | setPromotedClassIncludeFile(const QString &className, const QString &includeFile, QString *errorMessage) = 0 |
Detailed Description
Member Type Documentation
[alias]
QDesignerPromotionInterface::PromotedClasses
A list of PromotedClass items.
Member Function Documentation
[pure virtual]
bool QDesignerPromotionInterface::addPromotedClass(const QString &baseClass, const QString &className, const QString &includeFile, QString *errorMessage)
Add a promoted class named with the base class and include file includeFile. Returns true
on success or false
along with an error message in errorMessage on failure.
[pure virtual]
bool QDesignerPromotionInterface::changePromotedClassName(const QString &oldClassName, const QString &newClassName, QString *errorMessage)
Change the class name of a promoted class from oldClassName to newClassName. Returns true
on success or false
along with an error message in errorMessage on failure.
[pure virtual]
PromotedClasses QDesignerPromotionInterface::promotedClasses() const
Returns a list of promoted classes along with their base classes in alphabetical order. It can be used to populate tree models for editing promoted widgets.
[pure virtual]
QList<QDesignerWidgetDataBaseItemInterface *> QDesignerPromotionInterface::promotionBaseClasses() const
Return a list of base classes that are suitable for promotion.
[pure virtual]
QSet<QString> QDesignerPromotionInterface::referencedPromotedClassNames() const
Returns a set of promoted classed that are referenced by the currently opened forms.
[pure virtual]
bool QDesignerPromotionInterface::removePromotedClass(const QString &className, QString *errorMessage)
Remove the promoted class named className unless it is referenced by a form. Returns true
on success or false
along with an error message in errorMessage on failure.
[pure virtual]
bool QDesignerPromotionInterface::setPromotedClassIncludeFile(const QString &className, const QString &includeFile, QString *errorMessage)
Change the include file of a promoted class named className to be includeFile. Returns true
on success or false
along with an error message in errorMessage on failure.