#include <qdesigner_command_p.h>
Inheritance diagram for qdesigner_internal::AddMenuActionCommand:


Definition at line 1038 of file qdesigner_command_p.h.
Public Member Functions | |
| AddMenuActionCommand (QDesignerFormWindowInterface *formWindow) | |
| void | init (QAction *action, QWidget *parent) |
| virtual void | redo () |
| virtual void | undo () |
Private Attributes | |
| QAction * | m_action |
| QWidget * | m_parent |
| qdesigner_internal::AddMenuActionCommand::AddMenuActionCommand | ( | QDesignerFormWindowInterface * | formWindow | ) |
Definition at line 2756 of file qdesigner_command.cpp.
References m_action, and m_parent.
02757 : QDesignerFormWindowCommand(QApplication::translate("Command", "Add menu"), formWindow) 02758 { 02759 m_action = 0; 02760 m_parent = 0; 02761 }
Definition at line 2763 of file qdesigner_command.cpp.
References m_action, m_parent, and QAction::menu().
Referenced by QDesignerMenuBar::createAction().
02764 { 02765 Q_ASSERT(action->menu() != 0); 02766 m_action = action; 02767 m_parent = parent; 02768 }
Here is the call graph for this function:

| void qdesigner_internal::AddMenuActionCommand::redo | ( | ) | [virtual] |
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 funciton leads to undefined beahavior.
The default implementation calls redo() on all child commands.
Reimplemented from qdesigner_internal::QDesignerFormWindowCommand.
Definition at line 2770 of file qdesigner_command.cpp.
References QDesignerMetaDataBaseInterface::add(), qdesigner_internal::QDesignerFormWindowCommand::cheapUpdate(), qdesigner_internal::QDesignerFormWindowCommand::core(), m_action, QAction::menu(), QDesignerFormEditorInterface::metaDataBase(), QDesignerFormEditorInterface::propertyEditor(), and QDesignerPropertyEditorInterface::setObject().
02771 { 02772 core()->metaDataBase()->add(m_action); 02773 core()->metaDataBase()->add(m_action->menu()); 02774 02775 core()->propertyEditor()->setObject(m_action->menu()); 02776 cheapUpdate(); 02777 }
Here is the call graph for this function:

| void qdesigner_internal::AddMenuActionCommand::undo | ( | ) | [virtual] |
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 funciton leads to undefined beahavior.
The default implementation calls undo() on all child commands in reverse order.
Reimplemented from qdesigner_internal::QDesignerFormWindowCommand.
Definition at line 2779 of file qdesigner_command.cpp.
References qdesigner_internal::QDesignerFormWindowCommand::cheapUpdate(), qdesigner_internal::QDesignerFormWindowCommand::core(), m_action, m_parent, QAction::menu(), QDesignerFormEditorInterface::metaDataBase(), QDesignerFormEditorInterface::propertyEditor(), QDesignerMetaDataBaseInterface::remove(), and QDesignerPropertyEditorInterface::setObject().
02780 { 02781 core()->metaDataBase()->remove(m_action->menu()); 02782 core()->metaDataBase()->remove(m_action); 02783 02784 core()->propertyEditor()->setObject(m_parent); 02785 cheapUpdate(); 02786 }
Here is the call graph for this function:

Definition at line 1047 of file qdesigner_command_p.h.
Referenced by AddMenuActionCommand(), init(), redo(), and undo().
Definition at line 1048 of file qdesigner_command_p.h.
Referenced by AddMenuActionCommand(), init(), and undo().
1.5.1