umbrello  2.35.1
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 More...
 

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

Here is the call graph for this function:

RefactoringAssistant::~RefactoringAssistant ( )
virtual

Destructor.

Member Function Documentation

void RefactoringAssistant::addBaseClassifier ( )
slot

Slot for adding a base classifier.

Here is the call graph for this function:

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:

void RefactoringAssistant::addDerivedClassifier ( )
slot

Slot for adding a derived classifier.

Here is the call graph for this function:

void RefactoringAssistant::addInterfaceImplementation ( )
slot

Slot for adding an interface implementation.

Todo:
not yet implemented, needs addSuperClassifier() first
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:

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:

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:

void RefactoringAssistant::createAttribute ( )
slot

Create new attribute.

Here is the call graph for this function:

void RefactoringAssistant::createOperation ( )
slot

Create new operation.

Here is the call graph for this function:

void RefactoringAssistant::deleteItem ( )
slot

Slot for deleting an item called from the popup menu.

Here is the call graph for this function:

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:

void RefactoringAssistant::dragMoveEvent ( QDragMoveEvent *  event)
protectedvirtual

Reimplementation of the drag move event.

Parameters
eventthe drag move event
void RefactoringAssistant::dropEvent ( QDropEvent *  event)
protectedvirtual

Reimplementation of the drop event.

Parameters
eventthe drop event

Here is the call graph for this function:

void RefactoringAssistant::editProperties ( )
slot

Slot for calling editProperties with the current item.

Here is the call graph for this function:

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:

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:

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
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:

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:

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:

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:

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:

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:

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

QSet<UMLClassifier *> RefactoringAssistant::m_alreadySeen
protected

recursive guard

UMLDoc* RefactoringAssistant::m_doc
protected
QMenu* RefactoringAssistant::m_menu
protected
UMLClassifier* RefactoringAssistant::m_umlObject
protected
QMap<QTreeWidgetItem*, UMLObject*> RefactoringAssistant::m_umlObjectMap
protected

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