#include <refactoringassistant.h>
◆ RefactoringAssistant()
RefactoringAssistant::RefactoringAssistant |
( |
UMLDoc * |
doc, |
|
|
UMLClassifier * |
obj = nullptr , |
|
|
QWidget * |
parent = nullptr , |
|
|
const QString & |
name = QString() |
|
) |
| |
|
explicit |
Constructor.
- Parameters
-
doc | the UML document |
obj | the UML classifier to refactor |
parent | the parent widget |
name | the object name |
◆ ~RefactoringAssistant()
RefactoringAssistant::~RefactoringAssistant |
( |
| ) |
|
|
virtual |
◆ addBaseClassifier
void RefactoringAssistant::addBaseClassifier |
( |
| ) |
|
|
slot |
Slot for adding a base classifier.
◆ addClassifier()
void RefactoringAssistant::addClassifier |
( |
UMLClassifier * |
classifier, |
|
|
QTreeWidgetItem * |
parent = nullptr , |
|
|
bool |
addSuper = true , |
|
|
bool |
addSub = true , |
|
|
bool |
recurse = false |
|
) |
| |
|
protected |
Add a classifier to the data structure.
- Parameters
-
classifier | the classifier to add |
parent | the tree item under which the classifier is placed |
addSuper | add it to the base classifier folder |
addSub | add it to the derived classifier folder |
recurse | ... |
◆ addDerivedClassifier
void RefactoringAssistant::addDerivedClassifier |
( |
| ) |
|
|
slot |
Slot for adding a derived classifier.
◆ addInterfaceImplementation
void RefactoringAssistant::addInterfaceImplementation |
( |
| ) |
|
|
slot |
Slot for adding an interface implementation.
- Todo:
- not yet implemented, needs addSuperClassifier() first
◆ attributeAdded
Slot for adding an attribute to the tree.
- Parameters
-
listItem | the new attribute to add |
◆ attributeRemoved
Slot for removing an attribute from the tree.
- Parameters
-
listItem | the attribute to be removed |
◆ createAction()
Create an action for an entry in the context menu.
- Parameters
-
text | the text of the action |
method | the method to call when triggered |
icon | the shown icon |
- Returns
- the created action
◆ createAttribute
void RefactoringAssistant::createAttribute |
( |
| ) |
|
|
slot |
◆ createOperation
void RefactoringAssistant::createOperation |
( |
| ) |
|
|
slot |
◆ deleteItem [1/2]
void RefactoringAssistant::deleteItem |
( |
| ) |
|
|
slot |
Slot for deleting an item called from the popup menu.
◆ deleteItem() [2/2]
void RefactoringAssistant::deleteItem |
( |
QTreeWidgetItem * |
item, |
|
|
UMLObject * |
obj |
|
) |
| |
|
protected |
Delete an item from the tree.
- Parameters
-
item | the tree widget item |
obj | the uml object |
◆ dragMoveEvent()
void RefactoringAssistant::dragMoveEvent |
( |
QDragMoveEvent * |
event | ) |
|
|
protectedvirtual |
Reimplementation of the drag move event.
- Parameters
-
◆ dropEvent()
void RefactoringAssistant::dropEvent |
( |
QDropEvent * |
event | ) |
|
|
protectedvirtual |
Reimplementation of the drop event.
- Parameters
-
◆ editProperties [1/2]
void RefactoringAssistant::editProperties |
( |
| ) |
|
|
slot |
Slot for calling editProperties with the current item.
◆ editProperties() [2/2]
void RefactoringAssistant::editProperties |
( |
UMLObject * |
obj | ) |
|
|
protected |
Show the dialog with data from the given UML object.
- Parameters
-
obj | the UML object to edit |
◆ findListViewItem()
QTreeWidgetItem * RefactoringAssistant::findListViewItem |
( |
const UMLObject * |
obj | ) |
|
|
protected |
Find tree item from UML object.
- Parameters
-
obj | the UML object to search in tree |
- Returns
- the found tree widget item or 0
◆ findUMLObject()
UMLObject * RefactoringAssistant::findUMLObject |
( |
const QTreeWidgetItem * |
item | ) |
|
|
protected |
Find UML object from tree item.
- Parameters
-
item | the item from the tree widget |
- Returns
- the UML object behind the item
◆ itemExecuted
void RefactoringAssistant::itemExecuted |
( |
QTreeWidgetItem * |
item, |
|
|
int |
column |
|
) |
| |
|
slot |
Slot for double clicking on a tree widget item.
- Parameters
-
item | tree widget item on which the user clicked |
column | the column of the tree on which the user clicked. |
◆ objectModified
void RefactoringAssistant::objectModified |
( |
| ) |
|
|
slot |
Slot for updating the tree item properties according to the given UML object.
◆ operationAdded
Slot for adding an operation to the tree.
- Parameters
-
listItem | the new operation to add |
◆ operationRemoved
Slot for removing an operation from the tree.
- Parameters
-
listItem | the operation to be removed |
◆ refactor()
Builds up the tree for the classifier.
- Parameters
-
obj | the classifier which has to be refactored |
◆ setVisibilityIcon()
void RefactoringAssistant::setVisibilityIcon |
( |
QTreeWidgetItem * |
item, |
|
|
const UMLObject * |
obj |
|
) |
| |
|
protected |
Set the icon representing the visibility of the given item.
- Parameters
-
item | the tree item |
obj | the UML object behind the tree item |
◆ showContextMenu
void RefactoringAssistant::showContextMenu |
( |
const QPoint & |
p | ) |
|
|
privateslot |
Slot for the context menu by right clicking in the tree widget.
- Parameters
-
p | point of the right click inside the tree widget |
◆ m_alreadySeen
◆ m_doc
UMLDoc* RefactoringAssistant::m_doc |
|
protected |
◆ m_menu
QMenu* RefactoringAssistant::m_menu |
|
protected |
◆ m_umlObject
◆ m_umlObjectMap
QMap<QTreeWidgetItem*, UMLObject*> RefactoringAssistant::m_umlObjectMap |
|
protected |
The documentation for this class was generated from the following files: