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


Definition at line 872 of file qdesigner_command_p.h.
Public Types | |
| enum | InsertionMode |
Public Member Functions | |
| AddContainerWidgetPageCommand (QDesignerFormWindowInterface *formWindow) | |
| virtual | ~AddContainerWidgetPageCommand () |
| void | init (QWidget *containerWidget) |
| void | init (QWidget *containerWidget, InsertionMode mode) |
| virtual void | redo () |
| virtual void | undo () |
Definition at line 876 of file qdesigner_command_p.h.
00876 { 00877 InsertBefore, 00878 InsertAfter 00879 };
| qdesigner_internal::AddContainerWidgetPageCommand::AddContainerWidgetPageCommand | ( | QDesignerFormWindowInterface * | formWindow | ) |
Definition at line 2201 of file qdesigner_command.cpp.
02202 : ContainerWidgetCommand(formWindow) 02203 { 02204 }
| qdesigner_internal::AddContainerWidgetPageCommand::~AddContainerWidgetPageCommand | ( | ) | [virtual] |
| void qdesigner_internal::AddContainerWidgetPageCommand::init | ( | QWidget * | containerWidget | ) |
Reimplemented from qdesigner_internal::ContainerWidgetCommand.
Definition at line 2210 of file qdesigner_command.cpp.
References InsertBefore.
Referenced by qdesigner_internal::ContainerWidgetTaskMenu::addPage(), and qdesigner_internal::ContainerWidgetTaskMenu::addPageAfter().
02211 { 02212 init(containerWidget, InsertBefore); 02213 }
| void qdesigner_internal::AddContainerWidgetPageCommand::init | ( | QWidget * | containerWidget, | |
| InsertionMode | mode | |||
| ) |
Definition at line 2215 of file qdesigner_command.cpp.
References QDesignerMetaDataBaseInterface::add(), c, qdesigner_internal::ContainerWidgetCommand::containerExtension(), QDesignerFormWindowInterface::core(), qdesigner_internal::QDesignerFormWindowCommand::core(), QDesignerFormWindowInterface::ensureUniqueObjectName(), qdesigner_internal::QDesignerFormWindowCommand::formWindow(), InsertAfter, qdesigner_internal::ContainerWidgetCommand::m_containerWidget, qdesigner_internal::ContainerWidgetCommand::m_index, qdesigner_internal::ContainerWidgetCommand::m_widget, QDesignerFormEditorInterface::metaDataBase(), QUndoCommand::setText(), and QCoreApplication::translate().
02216 { 02217 m_containerWidget = containerWidget; 02218 02219 if (QDesignerContainerExtension *c = containerExtension()) { 02220 m_index = c->currentIndex(); 02221 if (mode == InsertAfter) 02222 m_index++; 02223 m_widget = new QDesignerWidget(formWindow(), m_containerWidget); 02224 m_widget->setObjectName(QApplication::translate("Command", "page")); 02225 formWindow()->ensureUniqueObjectName(m_widget); 02226 02227 setText(QApplication::translate("Command", "Insert Page")); 02228 02229 QDesignerFormEditorInterface *core = formWindow()->core(); 02230 core->metaDataBase()->add(m_widget); 02231 } 02232 }
Here is the call graph for this function:

| void qdesigner_internal::AddContainerWidgetPageCommand::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 2234 of file qdesigner_command.cpp.
References qdesigner_internal::ContainerWidgetCommand::addPage(), and qdesigner_internal::QDesignerFormWindowCommand::cheapUpdate().
02235 { 02236 addPage(); 02237 cheapUpdate(); 02238 }
Here is the call graph for this function:

| void qdesigner_internal::AddContainerWidgetPageCommand::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 2240 of file qdesigner_command.cpp.
References qdesigner_internal::QDesignerFormWindowCommand::cheapUpdate(), and qdesigner_internal::ContainerWidgetCommand::removePage().
02241 { 02242 removePage(); 02243 cheapUpdate(); 02244 }
Here is the call graph for this function:

1.5.1