umbrello API Documentation

refactoringassistant.h

00001 /***************************************************************************
00002                           refactoringassistant.h
00003                              -------------------
00004     copyright            : (C) 2003 Luis De la Parra
00005  ***************************************************************************/
00006 /***************************************************************************
00007  *                                                                         *
00008  *   This program is free software; you can redistribute it and/or modify  *
00009  *   it under the terms of the GNU General Public License as published by  *
00010  *   the Free Software Foundation; either version 2 of the License, or     *
00011  *   (at your option) any later version.                                   *
00012  *                                                                         *
00013  *   copyright (C) 2004-2007                                               *
00014  *   Umbrello UML Modeller Authors <uml-devel@uml.sf.net>                  *
00015  ***************************************************************************/
00016 
00017 
00018 #ifndef REFACTORING_ASSISTANT
00019 #define REFACTORING_ASSISTANT
00020 
00021 
00022 #include <klistview.h>
00023 #include <qpixmap.h>
00024 #include <map>
00025 
00026 
00027 class UMLObject;
00028 class UMLClassifier;
00029 class UMLClassifierListItem;
00030 class UMLDoc;
00031 
00032 class QPopupMenu;
00033 class QPoint;
00034 
00035 class RefactoringAssistant : public KListView
00036 {
00037     Q_OBJECT
00038 public:
00039     typedef std::map<QListViewItem*, UMLObject*> UMLObjectMap;
00040 
00041     explicit RefactoringAssistant( UMLDoc *doc, UMLClassifier *obj = 0, QWidget *parent = 0, const char *name = 0 );
00042     virtual ~RefactoringAssistant();
00043 
00044     void refactor( UMLClassifier *obj );
00045 
00046 public slots:
00047 
00048     void addBaseClassifier();
00049     void addDerivedClassifier();
00050     void addInterfaceImplementation();
00051     void createOperation( );
00052     void createAttribute( );
00053     void editProperties( );
00054 
00055     void umlObjectModified( const UMLObject *obj = 0 );
00056 
00057     void operationAdded( UMLClassifierListItem *o );
00058     void operationRemoved( UMLClassifierListItem *o );
00059 
00060     void attributeAdded( UMLClassifierListItem *a );
00061     void attributeRemoved( UMLClassifierListItem *a );
00062 
00063     void itemExecuted( QListViewItem *item );
00064     void showContextMenu( KListView*, QListViewItem*, const QPoint&);
00065 
00066 protected:
00067     struct { QPixmap Public,
00068         Protected,
00069         Private,
00070              Implementation,
00071         Generalization,
00072         Subclass;
00073     } m_pixmaps;
00074 
00075     UMLObject* findUMLObject( const QListViewItem* );
00076     QListViewItem* findListViewItem( const UMLObject *obj );
00077     void editProperties( UMLObject *obj );
00078     void addClassifier( UMLClassifier *classifier, QListViewItem *parent = 0, bool addSuper = true, bool addSub = true, bool recurse = false );
00079     void loadPixmaps();
00080     virtual bool acceptDrag(QDropEvent *event) const;
00081     virtual void movableDropEvent (QListViewItem* parent, QListViewItem* afterme);
00082     void setVisibilityIcon( QListViewItem *item , const UMLObject *obj );
00083     UMLClassifier *m_umlObject;
00084     UMLDoc *m_doc;
00085     QPopupMenu *m_menu;
00086     UMLObjectMap m_umlObjectMap;
00087 
00088 
00089 };
00090 
00091 
00092 #endif
00093 
KDE Logo
This file is part of the documentation for umbrello Version 3.1.0.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Tue Jun 26 08:07:59 2007 by doxygen 1.4.1 written by Dimitri van Heesch, © 1997-2003