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::MorphWidgetCommand Class Reference
+ Inheritance diagram for qdesigner_internal::MorphWidgetCommand:
+ Collaboration diagram for qdesigner_internal::MorphWidgetCommand:

Public Member Functions

 MorphWidgetCommand (QDesignerFormWindowInterface *formWindow)
 
 ~MorphWidgetCommand () override
 
bool init (QWidget *widget, const QString &newClassName)
 
QString newWidgetName () const
 
void redo () override
 Applies a change to the document.
 
void undo () override
 Reverts a change to the document.
 
 MorphWidgetCommand (QDesignerFormWindowInterface *formWindow)
 
 ~MorphWidgetCommand () override
 
bool init (QWidget *widget, const QString &newClassName)
 
QString newWidgetName () const
 
void redo () override
 Applies a change to the document.
 
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
 

Static Public Member Functions

static bool addMorphMacro (QDesignerFormWindowInterface *formWindow, QWidget *w, const QString &newClass)
 
static QStringList candidateClasses (QDesignerFormWindowInterface *fw, QWidget *w)
 
static bool addMorphMacro (QDesignerFormWindowInterface *formWindow, QWidget *w, const QString &newClass)
 
static QStringList candidateClasses (QDesignerFormWindowInterface *fw, QWidget *w)
 
- Static Public Member Functions inherited from qdesigner_internal::QDesignerFormWindowCommand
static void updateBuddies (QDesignerFormWindowInterface *form, const QString &old_name, const QString &new_name)
 

Additional Inherited Members

- Protected Member Functions inherited from qdesigner_internal::QDesignerFormWindowCommand
QDesignerFormWindowInterfaceformWindow () const
 
QDesignerFormEditorInterfacecore () const
 
QDesignerPropertySheetExtensionpropertySheet (QObject *object) const
 
void cheapUpdate ()
 
void selectUnmanagedObject (QObject *unmanagedObject)
 

Detailed Description

Definition at line 230 of file morphmenu.cpp.

Constructor & Destructor Documentation

◆ MorphWidgetCommand() [1/2]

qdesigner_internal::MorphWidgetCommand::MorphWidgetCommand ( QDesignerFormWindowInterface * formWindow)
explicit

Definition at line 287 of file morphmenu.cpp.

◆ ~MorphWidgetCommand() [1/2]

qdesigner_internal::MorphWidgetCommand::~MorphWidgetCommand ( )
overridedefault

◆ MorphWidgetCommand() [2/2]

qdesigner_internal::MorphWidgetCommand::MorphWidgetCommand ( QDesignerFormWindowInterface * formWindow)
explicit

◆ ~MorphWidgetCommand() [2/2]

qdesigner_internal::MorphWidgetCommand::~MorphWidgetCommand ( )
override

Member Function Documentation

◆ addMorphMacro() [1/2]

bool qdesigner_internal::MorphWidgetCommand::addMorphMacro ( QDesignerFormWindowInterface * formWindow,
QWidget * w,
const QString & newClass )
static

Definition at line 258 of file morphmenu.cpp.

References init().

+ Here is the call graph for this function:

◆ addMorphMacro() [2/2]

static bool qdesigner_internal::MorphWidgetCommand::addMorphMacro ( QDesignerFormWindowInterface * formWindow,
QWidget * w,
const QString & newClass )
static

◆ candidateClasses() [1/2]

QStringList qdesigner_internal::MorphWidgetCommand::candidateClasses ( QDesignerFormWindowInterface * fw,
QWidget * w )
static

Definition at line 496 of file morphmenu.cpp.

◆ candidateClasses() [2/2]

static QStringList qdesigner_internal::MorphWidgetCommand::candidateClasses ( QDesignerFormWindowInterface * fw,
QWidget * w )
static

◆ init() [1/2]

bool qdesigner_internal::MorphWidgetCommand::init ( QWidget * widget,
const QString & newClassName )

Definition at line 296 of file morphmenu.cpp.

References QPainter::QWidget.

Referenced by addMorphMacro().

+ Here is the caller graph for this function:

◆ init() [2/2]

bool qdesigner_internal::MorphWidgetCommand::init ( QWidget * widget,
const QString & newClassName )

◆ newWidgetName() [1/2]

QString qdesigner_internal::MorphWidgetCommand::newWidgetName ( ) const
inline

Definition at line 243 of file morphmenu.cpp.

◆ newWidgetName() [2/2]

QString qdesigner_internal::MorphWidgetCommand::newWidgetName ( ) const
inline

Definition at line 243 of file morphmenu.cpp.

◆ redo() [1/2]

void qdesigner_internal::MorphWidgetCommand::redo ( )
overridevirtual

Applies a change to the document.

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 redo() on all child commands.

See also
undo()

Reimplemented from QUndoCommand.

Definition at line 356 of file morphmenu.cpp.

◆ redo() [2/2]

void qdesigner_internal::MorphWidgetCommand::redo ( )
overridevirtual

Applies a change to the document.

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 redo() on all child commands.

See also
undo()

Reimplemented from QUndoCommand.

◆ undo() [1/2]

void qdesigner_internal::MorphWidgetCommand::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 361 of file morphmenu.cpp.

◆ undo() [2/2]

void qdesigner_internal::MorphWidgetCommand::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.


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