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_internal::PropertyListCommand Class Reference

#include <qdesigner_propertycommand_p.h>

+ Inheritance diagram for qdesigner_internal::PropertyListCommand:
+ Collaboration diagram for qdesigner_internal::PropertyListCommand:

Classes

struct  PropertyDescription
 

Public Member Functions

 PropertyListCommand (QDesignerFormWindowInterface *formWindow, QUndoCommand *parent=nullptr)
 
QObjectobject (int index=0) const
 
QVariant oldValue (int index=0) const
 
void setOldValue (const QVariant &oldValue, int index=0)
 
void undo () override
 Reverts a change to the document.
 
- Public Member Functions inherited from qdesigner_internal::QDesignerFormWindowCommand
 QDesignerFormWindowCommand (const QString &description, QDesignerFormWindowInterface *formWindow, QUndoCommand *parent=nullptr)
 
void undo () override
 Reverts a change to the document.
 
void redo () override
 Applies a change to the document.
 
- Public Member Functions inherited from QUndoCommand
 QUndoCommand (QUndoCommand *parent=nullptr)
 Constructs a QUndoCommand object with parent parent.
 
 QUndoCommand (const QString &text, QUndoCommand *parent=nullptr)
 Constructs a QUndoCommand object with the given parent and text.
 
virtual ~QUndoCommand ()
 Destroys the QUndoCommand object and all child commands.
 
QString text () const
 Returns a short text string describing what this command does; for example, "insert text".
 
QString actionText () const
 
void setText (const QString &text)
 Sets the command's text to be the text specified.
 
bool isObsolete () const
 
void setObsolete (bool obsolete)
 
virtual int id () const
 Returns the ID of this command.
 
virtual bool mergeWith (const QUndoCommand *other)
 Attempts to merge this command with command.
 
int childCount () const
 
const QUndoCommandchild (int index) const
 

Protected Types

using PropertyHelperPtr = std::unique_ptr<PropertyHelper>
 
using PropertyHelperList = std::vector<PropertyHelperPtr>
 

Protected Member Functions

bool add (QObject *object, const QString &propertyName)
 
bool initList (const QObjectList &list, const QString &apropertyName, QObject *referenceObject=nullptr)
 
unsigned setValue (const QVariant &value, bool changed, quint64 subPropertyMask)
 
unsigned restoreOldValue ()
 
unsigned restoreDefaultValue ()
 
void update (unsigned updateMask)
 
bool canMergeLists (const PropertyHelperList &other) const
 
PropertyHelperListpropertyHelperList ()
 
const PropertyHelperListpropertyHelperList () const
 
const QString propertyName () const
 
SpecialProperty specialProperty () const
 
const PropertyDescriptionpropertyDescription () const
 
virtual std::unique_ptr< PropertyHelpercreatePropertyHelper (QObject *o, SpecialProperty sp, QDesignerPropertySheetExtension *sheet, int sheetIndex) const
 
- Protected Member Functions inherited from qdesigner_internal::QDesignerFormWindowCommand
QDesignerFormWindowInterfaceformWindow () const
 
QDesignerFormEditorInterfacecore () const
 
QDesignerPropertySheetExtensionpropertySheet (QObject *object) const
 
void cheapUpdate ()
 
void selectUnmanagedObject (QObject *unmanagedObject)
 

Additional Inherited Members

- Static Public Member Functions inherited from qdesigner_internal::QDesignerFormWindowCommand
static void updateBuddies (QDesignerFormWindowInterface *form, const QString &old_name, const QString &new_name)
 

Detailed Description

Definition at line 114 of file qdesigner_propertycommand_p.h.

Member Typedef Documentation

◆ PropertyHelperList

◆ PropertyHelperPtr

Constructor & Destructor Documentation

◆ PropertyListCommand()

qdesigner_internal::PropertyListCommand::PropertyListCommand ( QDesignerFormWindowInterface * formWindow,
QUndoCommand * parent = nullptr )
explicit

Definition at line 941 of file qdesigner_propertycommand.cpp.

Member Function Documentation

◆ add()

bool qdesigner_internal::PropertyListCommand::add ( QObject * object,
const QString & propertyName )
protected

Definition at line 958 of file qdesigner_propertycommand.cpp.

◆ canMergeLists()

bool qdesigner_internal::PropertyListCommand::canMergeLists ( const PropertyHelperList & other) const
protected

Definition at line 1170 of file qdesigner_propertycommand.cpp.

◆ createPropertyHelper()

std::unique_ptr< PropertyHelper > qdesigner_internal::PropertyListCommand::createPropertyHelper ( QObject * o,
SpecialProperty sp,
QDesignerPropertySheetExtension * sheet,
int sheetIndex ) const
protectedvirtual

◆ initList()

bool qdesigner_internal::PropertyListCommand::initList ( const QObjectList & list,
const QString & apropertyName,
QObject * referenceObject = nullptr )
protected

Definition at line 995 of file qdesigner_propertycommand.cpp.

◆ object()

QObject * qdesigner_internal::PropertyListCommand::object ( int index = 0) const

Definition at line 1013 of file qdesigner_propertycommand.cpp.

◆ oldValue()

QVariant qdesigner_internal::PropertyListCommand::oldValue ( int index = 0) const

Definition at line 1019 of file qdesigner_propertycommand.cpp.

◆ propertyDescription()

const PropertyDescription & qdesigner_internal::PropertyListCommand::propertyDescription ( ) const
inlineprotected

Definition at line 171 of file qdesigner_propertycommand_p.h.

◆ propertyHelperList() [1/2]

PropertyHelperList & qdesigner_internal::PropertyListCommand::propertyHelperList ( )
inlineprotected

Definition at line 151 of file qdesigner_propertycommand_p.h.

◆ propertyHelperList() [2/2]

const PropertyHelperList & qdesigner_internal::PropertyListCommand::propertyHelperList ( ) const
inlineprotected

Definition at line 152 of file qdesigner_propertycommand_p.h.

◆ propertyName()

const QString qdesigner_internal::PropertyListCommand::propertyName ( ) const
protected

Definition at line 947 of file qdesigner_propertycommand.cpp.

◆ restoreDefaultValue()

unsigned qdesigner_internal::PropertyListCommand::restoreDefaultValue ( )
protected

Definition at line 1130 of file qdesigner_propertycommand.cpp.

◆ restoreOldValue()

unsigned qdesigner_internal::PropertyListCommand::restoreOldValue ( )
protected

Definition at line 1120 of file qdesigner_propertycommand.cpp.

◆ setOldValue()

void qdesigner_internal::PropertyListCommand::setOldValue ( const QVariant & oldValue,
int index = 0 )

Definition at line 1025 of file qdesigner_propertycommand.cpp.

◆ setValue()

unsigned qdesigner_internal::PropertyListCommand::setValue ( const QVariant & value,
bool changed,
quint64 subPropertyMask )
protected

Definition at line 1108 of file qdesigner_propertycommand.cpp.

◆ specialProperty()

SpecialProperty qdesigner_internal::PropertyListCommand::specialProperty ( ) const
protected

Definition at line 952 of file qdesigner_propertycommand.cpp.

◆ undo()

void qdesigner_internal::PropertyListCommand::undo ( )
overridevirtual

Reverts a change to the document.

After undo() is called, the state of the document should be the same as before redo() was called. This function must be implemented in the derived class. Calling QUndoStack::push(), QUndoStack::undo() or QUndoStack::redo() from this function leads to undefined beahavior.

The default implementation calls undo() on all child commands in reverse order.

See also
redo()

Reimplemented from QUndoCommand.

Definition at line 1161 of file qdesigner_propertycommand.cpp.

◆ update()

void qdesigner_internal::PropertyListCommand::update ( unsigned updateMask)
protected

Definition at line 1141 of file qdesigner_propertycommand.cpp.


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