• Skip to content
  • Skip to link menu
KDE 4.4 API Reference
  • KDE API Reference
  • kdesdk
  • Sitemap
  • Contact Us
 

umbrello/umbrello

umlobject.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  *   This program is free software; you can redistribute it and/or modify  *
00003  *   it under the terms of the GNU General Public License as published by  *
00004  *   the Free Software Foundation; either version 2 of the License, or     *
00005  *   (at your option) any later version.                                   *
00006  *                                                                         *
00007  *   copyright (C) 2002-2009                                               *
00008  *   Umbrello UML Modeller Authors <uml-devel@uml.sf.net>                  *
00009  ***************************************************************************/
00010 
00011 #ifndef UMLOBJECT_H
00012 #define UMLOBJECT_H
00013 
00014 //qt includes
00015 #include <QtCore/QObject>
00016 #include <QtCore/QString>
00017 #include <QtXml/QDomDocument>
00018 #include <QtXml/QDomElement>
00019 
00020 #include "umlnamespace.h"
00021 #include "umlpackagelist.h"
00022 
00023 class UMLStereotype;
00024 
00041 class UMLObject : public QObject
00042 {
00043     Q_OBJECT
00044 public:
00045 
00046     explicit UMLObject(UMLObject * parent, const QString &name, Uml::IDType id = Uml::id_None);
00047     explicit UMLObject(UMLObject * parent);
00048     explicit UMLObject(const QString &name = QString() , Uml::IDType id = Uml::id_None);
00049     virtual ~UMLObject();
00050 
00051     bool operator==(const UMLObject & rhs );
00052 
00053     virtual void copyInto(UMLObject *lhs) const;
00054 
00055     virtual UMLObject* clone() const = 0;
00056 
00057     virtual void setBaseType(Uml::Object_Type ot);
00058     Uml::Object_Type getBaseType() const;
00059 
00060     virtual void setID(Uml::IDType NewID);
00061     virtual Uml::IDType getID() const;
00062 
00063     void setDoc(const QString &d);
00064     QString getDoc() const;
00065 
00066     void setVisibility(Uml::Visibility s);
00067     void setVisibilitycmd(Uml::Visibility s);
00068     Uml::Visibility getVisibility() const;
00069 
00070     void setStereotype(const QString &_name);
00071     void setStereotypecmd(const QString &_name);
00072     QString getStereotype(bool includeAdornments = false) const;
00073 
00074     void setUMLStereotype(UMLStereotype *stereo);
00075     const UMLStereotype * getUMLStereotype();
00076 
00077     void setPackage(const QString &_name);
00078     QString getPackage(const QString& separator = QString(),
00079                        bool includeRoot = false);
00080 
00081     void setUMLPackage(UMLPackage* pPkg);
00082     UMLPackage* getUMLPackage();
00083 
00084     UMLPackageList getPackages(bool includeRoot = false) const;
00085 
00086     virtual void setName(const QString &strName);
00087     void setNamecmd(const QString &strName) ;
00088     QString getName() const;
00089 
00090     virtual QString getFullyQualifiedName(const QString& separator = QString(),
00091                                           bool includeRoot = false) const;
00092 
00093     void setAbstract(bool bAbstract);
00094     bool getAbstract() const;
00095 
00096     void setInPaste(bool bInPaste = true);
00097 
00098     virtual bool showProperties(int page = 0, bool assoc = false);
00099 
00100     virtual bool resolveRef();
00101 
00102     virtual void saveToXMI( QDomDocument & qDoc, QDomElement & qElement ) = 0;
00103     virtual bool loadFromXMI( QDomElement & element );
00104 
00105     bool loadStereotype(QDomElement & element);
00106 
00107     void setStatic(bool bStatic);
00108     bool getStatic() const;
00109 
00110     virtual bool acceptAssociationType(Uml::Association_Type);
00111 
00112     void setSecondaryId(const QString& id);
00113     QString getSecondaryId() const;
00114 
00115     void setSecondaryFallback(const QString& id);
00116     QString getSecondaryFallback() const;
00117 
00118     QDomElement save( const QString &tag, QDomDocument & qDoc );
00119 
00120 public slots:
00121 
00122     void emitModified();
00123 
00124 signals:
00125 
00126     void modified();
00127 
00128 protected:
00129 
00130     void init();
00131 
00132     void maybeSignalObjectCreated();
00133 
00134     virtual bool load( QDomElement& element );
00135 
00136     Uml::IDType      m_nId;          
00137     QString          m_Doc;          
00138     UMLPackage*      m_pUMLPackage;  
00139     UMLStereotype*   m_pStereotype;  
00140     QString          m_Name;         
00141     Uml::Object_Type m_BaseType;     
00142     Uml::Visibility  m_Vis;          
00143     bool             m_bAbstract;    
00144     bool             m_bStatic;      
00145     bool             m_bInPaste;     
00146     bool  m_bCreationWasSignalled;   
00147 
00154     UMLObject* m_pSecondary;
00155 
00161     QString m_SecondaryId;
00162 
00171     QString m_SecondaryFallback;
00172 };
00173 
00174 #ifndef QT_NO_DEBUG_STREAM
00175 
00180 QDebug operator<< (QDebug s, const UMLObject& a);
00181 
00182 #endif
00183 
00184 #endif

umbrello/umbrello

Skip menu "umbrello/umbrello"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdesdk

Skip menu "kdesdk"
  • kapptemplate
  • kate
  •     kate
  • kbugbuster
  • kcachegrind
  • kompare
  • lokalize
  • umbrello
  •   umbrello
Generated for kdesdk by doxygen 1.5.9-20090814
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal