umbrello 2.38.4
Umbrello UML Modeller is a Unified Modelling Language (UML) diagram program based on KDE Technology
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:
Collaboration 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

UMLObjectfindUMLObject (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

UMLClassifierm_umlObject
 
UMLDocm_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
docthe UML document
objthe UML classifier to refactor
parentthe parent widget
namethe object name

◆ ~RefactoringAssistant()

RefactoringAssistant::~RefactoringAssistant ( )
virtual

Destructor.

Member Function Documentation

◆ addBaseClassifier

void RefactoringAssistant::addBaseClassifier ( )
slot

Slot for adding a base classifier.

Here is the call graph for this function:

◆ 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
classifierthe classifier to add
parentthe tree item under which the classifier is placed
addSuperadd it to the base classifier folder
addSubadd it to the derived classifier folder
recurse...
Here is the call graph for this function:

◆ addDerivedClassifier

void RefactoringAssistant::addDerivedClassifier ( )
slot

Slot for adding a derived classifier.

Here is the call graph for this function:

◆ 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
listItemthe new attribute to add
Here is the call graph for this function:

◆ attributeRemoved

void RefactoringAssistant::attributeRemoved ( UMLClassifierListItem listItem)
slot

Slot for removing an attribute from the tree.

Parameters
listItemthe attribute to be removed
Here is the call graph for this function:

◆ 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
textthe text of the action
methodthe method to call when triggered
iconthe shown icon
Returns
the created action
Here is the call graph for this function:

◆ createAttribute

void RefactoringAssistant::createAttribute ( )
slot

Create new attribute.

Here is the call graph for this function:

◆ createOperation

void RefactoringAssistant::createOperation ( )
slot

Create new operation.

Here is the call graph for this function:

◆ deleteItem [1/2]

void RefactoringAssistant::deleteItem ( )
slot

Slot for deleting an item called from the popup menu.

Here is the call graph for this function:

◆ deleteItem() [2/2]

void RefactoringAssistant::deleteItem ( QTreeWidgetItem *  item,
UMLObject obj 
)
protected

Delete an item from the tree.

Parameters
itemthe tree widget item
objthe uml object
Here is the call graph for this function:

◆ dragMoveEvent()

void RefactoringAssistant::dragMoveEvent ( QDragMoveEvent *  event)
protectedvirtual

Reimplementation of the drag move event.

Parameters
eventthe drag move event

◆ dropEvent()

void RefactoringAssistant::dropEvent ( QDropEvent *  event)
protectedvirtual

Reimplementation of the drop event.

Parameters
eventthe drop event
Here is the call graph for this function:

◆ editProperties [1/2]

void RefactoringAssistant::editProperties ( )
slot

Slot for calling editProperties with the current item.

Here is the call graph for this function:

◆ editProperties() [2/2]

void RefactoringAssistant::editProperties ( UMLObject obj)
protected

Show the dialog with data from the given UML object.

Parameters
objthe UML object to edit
Here is the call graph for this function:

◆ findListViewItem()

QTreeWidgetItem * RefactoringAssistant::findListViewItem ( const UMLObject obj)
protected

Find tree item from UML object.

Parameters
objthe UML object to search in tree
Returns
the found tree widget item or 0
Here is the call graph for this function:

◆ findUMLObject()

UMLObject * RefactoringAssistant::findUMLObject ( const QTreeWidgetItem *  item)
protected

Find UML object from tree item.

Parameters
itemthe 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
itemtree widget item on which the user clicked
columnthe column of the tree on which the user clicked.
Here is the call graph for this function:

◆ objectModified

void RefactoringAssistant::objectModified ( )
slot

Slot for updating the tree item properties according to the given UML object.

Here is the call graph for this function:

◆ operationAdded

void RefactoringAssistant::operationAdded ( UMLClassifierListItem listItem)
slot

Slot for adding an operation to the tree.

Parameters
listItemthe new operation to add
Here is the call graph for this function:

◆ operationRemoved

void RefactoringAssistant::operationRemoved ( UMLClassifierListItem listItem)
slot

Slot for removing an operation from the tree.

Parameters
listItemthe operation to be removed
Here is the call graph for this function:

◆ refactor()

void RefactoringAssistant::refactor ( UMLClassifier obj)

Builds up the tree for the classifier.

Parameters
objthe classifier which has to be refactored
Here is the call graph for this function:

◆ setVisibilityIcon()

void RefactoringAssistant::setVisibilityIcon ( QTreeWidgetItem *  item,
const UMLObject obj 
)
protected

Set the icon representing the visibility of the given item.

Parameters
itemthe tree item
objthe UML object behind the tree item
Here is the call graph for this function:

◆ showContextMenu

void RefactoringAssistant::showContextMenu ( const QPoint &  p)
privateslot

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

Parameters
ppoint of the right click inside the tree widget
Here is the call graph for this function:

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: