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
QDesignerPromotionInterface Class Referenceabstract

The QDesignerPromotionInterface provides functions for modifying the promoted classes in Designer. More...

#include <abstractpromotioninterface.h>

+ Inheritance diagram for QDesignerPromotionInterface:
+ Collaboration diagram for QDesignerPromotionInterface:

Classes

class  PromotedClass
 \inmodule QtDesigner A pair of database items containing the base class and the promoted class. More...
 

Public Types

using PromotedClasses = QList<PromotedClass>
 A list of PromotedClass items.
 

Public Member Functions

 QDesignerPromotionInterface ()=default
 
virtual ~QDesignerPromotionInterface ()=default
 
virtual PromotedClasses promotedClasses () const =0
 Returns a list of promoted classes along with their base classes in alphabetical order.
 
virtual QSet< QStringreferencedPromotedClassNames () const =0
 Returns a set of promoted classed that are referenced by the currently opened forms.
 
virtual bool addPromotedClass (const QString &baseClass, const QString &className, const QString &includeFile, QString *errorMessage)=0
 Add a promoted class named with the base class and include file includeFile.
 
virtual bool removePromotedClass (const QString &className, QString *errorMessage)=0
 Remove the promoted class named className unless it is referenced by a form.
 
virtual bool changePromotedClassName (const QString &oldClassName, const QString &newClassName, QString *errorMessage)=0
 Change the class name of a promoted class from oldClassName to newClassName.
 
virtual bool setPromotedClassIncludeFile (const QString &className, const QString &includeFile, QString *errorMessage)=0
 Change the include file of a promoted class named className to be includeFile.
 
virtual QList< QDesignerWidgetDataBaseItemInterface * > promotionBaseClasses () const =0
 Return a list of base classes that are suitable for promotion.
 

Detailed Description

The QDesignerPromotionInterface provides functions for modifying the promoted classes in Designer.

\inmodule QtDesigner

Since
4.3

Definition at line 17 of file abstractpromotioninterface.h.

Member Typedef Documentation

◆ PromotedClasses

Constructor & Destructor Documentation

◆ QDesignerPromotionInterface()

QDesignerPromotionInterface::QDesignerPromotionInterface ( )
default

◆ ~QDesignerPromotionInterface()

virtual QDesignerPromotionInterface::~QDesignerPromotionInterface ( )
virtualdefault

Member Function Documentation

◆ addPromotedClass()

virtual bool QDesignerPromotionInterface::addPromotedClass ( const QString & baseClass,
const QString & className,
const QString & includeFile,
QString * errorMessage )
pure virtual

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.

Implemented in qdesigner_internal::QDesignerPromotion.

◆ changePromotedClassName()

virtual bool QDesignerPromotionInterface::changePromotedClassName ( const QString & oldClassName,
const QString & newClassName,
QString * errorMessage )
pure virtual

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.

Implemented in qdesigner_internal::QDesignerPromotion.

◆ promotedClasses()

virtual PromotedClasses QDesignerPromotionInterface::promotedClasses ( ) const
pure virtual

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.

Implemented in qdesigner_internal::QDesignerPromotion.

◆ promotionBaseClasses()

virtual QList< QDesignerWidgetDataBaseItemInterface * > QDesignerPromotionInterface::promotionBaseClasses ( ) const
pure virtual

Return a list of base classes that are suitable for promotion.

Implemented in qdesigner_internal::QDesignerPromotion.

◆ referencedPromotedClassNames()

virtual QSet< QString > QDesignerPromotionInterface::referencedPromotedClassNames ( ) const
pure virtual

Returns a set of promoted classed that are referenced by the currently opened forms.

Implemented in qdesigner_internal::QDesignerPromotion.

◆ removePromotedClass()

virtual bool QDesignerPromotionInterface::removePromotedClass ( const QString & className,
QString * errorMessage )
pure virtual

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.

Implemented in qdesigner_internal::QDesignerPromotion.

◆ setPromotedClassIncludeFile()

virtual bool QDesignerPromotionInterface::setPromotedClassIncludeFile ( const QString & className,
const QString & includeFile,
QString * errorMessage )
pure virtual

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.

Implemented in qdesigner_internal::QDesignerPromotion.


The documentation for this class was generated from the following files: