umbrello 2.39.2 Umbrello UML Modeller is a Unified Modelling Language (UML) diagram program based on KDE Technology

- Main Page
- Related Pages
- Topics
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Slots | Public Member Functions | Protected Member Functions | Protected Attributes | Private Slots | Private Member Functions | List of all members
RefactoringAssistant Class Reference

`#include <refactoringassistant.h>`

Inheritance diagram for RefactoringAssistant:

## Public Slots
void | addBaseClassifier ()
void | addDerivedClassifier ()
void | addInterfaceImplementation ()
void | createOperation ()
void | createAttribute ()
void | editProperties ()
void | deleteItem ()
void | objectModified ()
void | operationAdded (UMLClassifierListItem *listItem)
void | operationRemoved (UMLClassifierListItem *listItem)
void | attributeAdded (UMLClassifierListItem *listItem)
void | attributeRemoved (UMLClassifierListItem *listItem)
void | itemExecuted (QTreeWidgetItem *item, int column)

## Public Member Functions
| RefactoringAssistant (UMLDoc *doc, UMLClassifier *obj=0, QWidget *parent=0, const QString &name=QString())
virtual | ~RefactoringAssistant ()
void | refactor (UMLClassifier *obj)

## Protected Member Functions
UMLObject * | findUMLObject (const QTreeWidgetItem *)
QTreeWidgetItem * | findListViewItem (const UMLObject *obj)
void | editProperties (UMLObject *obj)
void | deleteItem (QTreeWidgetItem *item, UMLObject *obj)
void | addClassifier (UMLClassifier *classifier, QTreeWidgetItem *parent=0, bool addSuper=true, bool addSub=true, bool recurse=false)
virtual void | dragMoveEvent (QDragMoveEvent *event)
virtual void | dropEvent (QDropEvent *event)
void | setVisibilityIcon (QTreeWidgetItem *item, const UMLObject *obj)

## Protected Attributes
UMLClassifier * | m_umlObject
UMLDoc * | m_doc
QMenu * | m_menu
QMap< QTreeWidgetItem *, UMLObject * > | m_umlObjectMap
QSet< UMLClassifier * > | m_alreadySeen
| recursive guard

## Private Slots
void | showContextMenu (const QPoint &)

## Private Member Functions
QAction * | createAction (const QString &text, const char *method, const Icon_Utils::IconType icon=Icon_Utils::N_ICONTYPES)

## Constructor & Destructor Documentation

## ◆ RefactoringAssistant()

RefactoringAssistant::RefactoringAssistant | ( | UMLDoc * | doc,
|  | UMLClassifier * | obj = 0,
|  | QWidget * | parent = 0,
|  | 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

Destructor.

## Member Function Documentation

## ◆ addBaseClassifier

void RefactoringAssistant::addBaseClassifier | ( |  | ) |
| slot

Slot for adding a base classifier.

## ◆ addClassifier()

void RefactoringAssistant::addClassifier | ( | UMLClassifier * | classifier,
|  | QTreeWidgetItem * | parent = 0,
|  | 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

void RefactoringAssistant::attributeAdded | ( | UMLClassifierListItem * | listItem | ) |
| slot

Slot for adding an attribute to the tree.

Parameters

  listItem | the new attribute to add

## ◆ attributeRemoved

void RefactoringAssistant::attributeRemoved | ( | UMLClassifierListItem * | listItem | ) |
| slot

Slot for removing an attribute from the tree.

Parameters

  listItem | the attribute to be removed

## ◆ createAction()

QAction * RefactoringAssistant::createAction | ( | const QString & | text,
|  | const char * | method,
|  | const Icon_Utils::IconType | icon = Icon_Utils::N_ICONTYPES )
| private

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

Create new attribute.

## ◆ createOperation

void RefactoringAssistant::createOperation | ( |  | ) |
| slot

Create new operation.

## ◆ 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 | ) |
| protected virtual

Reimplementation of the drag move event.

Parameters

  event | the drag move event

## ◆ dropEvent()

void RefactoringAssistant::dropEvent | ( | QDropEvent * | event | ) |
| protected virtual

Reimplementation of the drop event.

Parameters

  event | the drop event

## ◆ 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

void RefactoringAssistant::operationAdded | ( | UMLClassifierListItem * | listItem | ) |
| slot

Slot for adding an operation to the tree.

Parameters

  listItem | the new operation to add

## ◆ operationRemoved

void RefactoringAssistant::operationRemoved | ( | UMLClassifierListItem * | listItem | ) |
| slot

Slot for removing an operation from the tree.

Parameters

  listItem | the operation to be removed

## ◆ refactor()

void RefactoringAssistant::refactor | ( | UMLClassifier * | obj | ) |

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 | ) |
| private slot

Slot for the context menu by right clicking in the tree widget.

Parameters

  p | point of the right click inside the tree widget

## Member Data Documentation

## ◆ m_alreadySeen

QSet<UMLClassifier *> RefactoringAssistant::m_alreadySeen
| protected

recursive guard

## ◆ m_doc

UMLDoc* RefactoringAssistant::m_doc
| protected

## ◆ m_menu

QMenu* RefactoringAssistant::m_menu
| protected

## ◆ m_umlObject

UMLClassifier* RefactoringAssistant::m_umlObject
| protected

## ◆ m_umlObjectMap

QMap<QTreeWidgetItem*, UMLObject*> RefactoringAssistant::m_umlObjectMap
| protected

The documentation for this class was generated from the following files:

- umbrello/refactoring/refactoringassistant.h
- umbrello/refactoring/refactoringassistant.cpp