

Definition at line 144 of file connectionedit.cpp.
Public Member Functions | |
| AdjustConnectionCommand (ConnectionEdit *edit, Connection *con, const QPoint &old_source_pos, const QPoint &old_target_pos, const QPoint &new_source_pos, const QPoint &new_target_pos) | |
| virtual void | redo () |
| virtual void | undo () |
Private Attributes | |
| Connection * | m_con |
| QPoint | m_old_source_pos |
| QPoint | m_old_target_pos |
| QPoint | m_new_source_pos |
| QPoint | m_new_target_pos |
| qdesigner_internal::AdjustConnectionCommand::AdjustConnectionCommand | ( | ConnectionEdit * | edit, | |
| Connection * | con, | |||
| const QPoint & | old_source_pos, | |||
| const QPoint & | old_target_pos, | |||
| const QPoint & | new_source_pos, | |||
| const QPoint & | new_target_pos | |||
| ) |
Definition at line 160 of file connectionedit.cpp.
References m_con, m_new_source_pos, m_new_target_pos, m_old_source_pos, m_old_target_pos, QUndoCommand::setText(), and QCoreApplication::translate().
00165 : CECommand(edit) 00166 { 00167 setText(QApplication::translate("Command", "Adjust connection")); 00168 m_con = con; 00169 m_old_source_pos = old_source_pos; 00170 m_old_target_pos = old_target_pos; 00171 m_new_source_pos = new_source_pos; 00172 m_new_target_pos = new_target_pos; 00173 }
Here is the call graph for this function:

| void qdesigner_internal::AdjustConnectionCommand::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 QUndoCommand.
Definition at line 181 of file connectionedit.cpp.
References m_con, m_new_source_pos, m_new_target_pos, qdesigner_internal::Connection::setEndPoint(), and qdesigner_internal::Connection::widget().
00182 { 00183 m_con->setEndPoint(EndPoint::Source, m_con->widget(EndPoint::Source), m_new_source_pos); 00184 m_con->setEndPoint(EndPoint::Target, m_con->widget(EndPoint::Target), m_new_target_pos); 00185 }
Here is the call graph for this function:

| void qdesigner_internal::AdjustConnectionCommand::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 QUndoCommand.
Definition at line 175 of file connectionedit.cpp.
References m_con, m_old_source_pos, m_old_target_pos, qdesigner_internal::Connection::setEndPoint(), and qdesigner_internal::Connection::widget().
00176 { 00177 m_con->setEndPoint(EndPoint::Source, m_con->widget(EndPoint::Source), m_old_source_pos); 00178 m_con->setEndPoint(EndPoint::Target, m_con->widget(EndPoint::Target), m_old_target_pos); 00179 }
Here is the call graph for this function:

Definition at line 155 of file connectionedit.cpp.
Referenced by AdjustConnectionCommand(), redo(), and undo().
Definition at line 156 of file connectionedit.cpp.
Referenced by AdjustConnectionCommand(), and undo().
Definition at line 156 of file connectionedit.cpp.
Referenced by AdjustConnectionCommand(), and undo().
Definition at line 156 of file connectionedit.cpp.
Referenced by AdjustConnectionCommand(), and redo().
Definition at line 156 of file connectionedit.cpp.
Referenced by AdjustConnectionCommand(), and redo().
1.5.1