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


Definition at line 540 of file qdesigner_command_p.h.
Public Types | |
| enum | InsertionMode |
Public Member Functions | |
| AddToolBoxPageCommand (QDesignerFormWindowInterface *formWindow) | |
| virtual | ~AddToolBoxPageCommand () |
| void | init (QToolBox *toolBox) |
| void | init (QToolBox *toolBox, InsertionMode mode) |
| virtual void | redo () |
| virtual void | undo () |
Definition at line 544 of file qdesigner_command_p.h.
00544 { 00545 InsertBefore, 00546 InsertAfter 00547 };
| qdesigner_internal::AddToolBoxPageCommand::AddToolBoxPageCommand | ( | QDesignerFormWindowInterface * | formWindow | ) |
Definition at line 1321 of file qdesigner_command.cpp.
01322 : ToolBoxCommand(formWindow) 01323 { 01324 }
| qdesigner_internal::AddToolBoxPageCommand::~AddToolBoxPageCommand | ( | ) | [virtual] |
| void qdesigner_internal::AddToolBoxPageCommand::init | ( | QToolBox * | toolBox | ) |
Reimplemented from qdesigner_internal::ToolBoxCommand.
Definition at line 1330 of file qdesigner_command.cpp.
References InsertBefore.
Referenced by QDesignerToolBox::addPage(), and QDesignerToolBox::addPageAfter().
01331 { 01332 init(toolBox, InsertBefore); 01333 }
| void qdesigner_internal::AddToolBoxPageCommand::init | ( | QToolBox * | toolBox, | |
| InsertionMode | mode | |||
| ) |
Definition at line 1335 of file qdesigner_command.cpp.
References QDesignerMetaDataBaseInterface::add(), QDesignerFormWindowInterface::core(), qdesigner_internal::QDesignerFormWindowCommand::core(), QDesignerFormWindowInterface::ensureUniqueObjectName(), qdesigner_internal::QDesignerFormWindowCommand::formWindow(), InsertAfter, qdesigner_internal::ToolBoxCommand::m_index, qdesigner_internal::ToolBoxCommand::m_itemIcon, qdesigner_internal::ToolBoxCommand::m_itemText, qdesigner_internal::ToolBoxCommand::m_toolBox, qdesigner_internal::ToolBoxCommand::m_widget, QDesignerFormEditorInterface::metaDataBase(), QUndoCommand::setText(), and QCoreApplication::translate().
01336 { 01337 m_toolBox = toolBox; 01338 01339 m_index = m_toolBox->currentIndex(); 01340 if (mode == InsertAfter) 01341 m_index++; 01342 m_widget = new QDesignerWidget(formWindow(), m_toolBox); 01343 m_itemText = QApplication::translate("Command", "Page"); 01344 m_itemIcon = QIcon(); 01345 m_widget->setObjectName(QApplication::translate("Command", "page")); 01346 formWindow()->ensureUniqueObjectName(m_widget); 01347 01348 setText(QApplication::translate("Command", "Insert Page")); 01349 01350 QDesignerFormEditorInterface *core = formWindow()->core(); 01351 core->metaDataBase()->add(m_widget); 01352 }
Here is the call graph for this function:

| void qdesigner_internal::AddToolBoxPageCommand::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 1354 of file qdesigner_command.cpp.
References qdesigner_internal::ToolBoxCommand::addPage(), and qdesigner_internal::QDesignerFormWindowCommand::cheapUpdate().
01355 { 01356 addPage(); 01357 cheapUpdate(); 01358 }
Here is the call graph for this function:

| void qdesigner_internal::AddToolBoxPageCommand::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 1360 of file qdesigner_command.cpp.
References qdesigner_internal::QDesignerFormWindowCommand::cheapUpdate(), and qdesigner_internal::ToolBoxCommand::removePage().
01361 { 01362 removePage(); 01363 cheapUpdate(); 01364 }
Here is the call graph for this function:

1.5.1