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

umbrello/umbrello

umlobject.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  *                                                                         *
00003  *   This program is free software; you can redistribute it and/or modify  *
00004  *   it under the terms of the GNU General Public License as published by  *
00005  *   the Free Software Foundation; either version 2 of the License, or     *
00006  *   (at your option) any later version.                                   *
00007  *                                                                         *
00008  *   copyright (C) 2002-2007                                               *
00009  *   Umbrello UML Modeller Authors <uml-devel@uml.sf.net>                  *
00010  ***************************************************************************/
00011 
00012 #ifndef UMLOBJECT_H
00013 #define UMLOBJECT_H
00014 
00015 //qt includes
00016 #include <qobject.h>
00017 #include <qstring.h>
00018 #include <qdom.h>
00019 
00020 #include "umlnamespace.h"
00021 #include "umlpackagelist.h"
00022 
00023 class UMLStereotype;
00024 class UMLObject;
00025 
00035 class UMLObject : public QObject {
00036     Q_OBJECT
00037 public:
00038 
00047     UMLObject(UMLObject * parent, const QString &name, Uml::IDType id = Uml::id_None);
00048 
00054     UMLObject(UMLObject * parent);
00055 
00062     explicit UMLObject(const QString &name = QString() , Uml::IDType id = Uml::id_None);
00063 
00067     virtual bool operator==(const UMLObject & rhs );
00068 
00072     virtual ~UMLObject();
00073 
00078     virtual void copyInto(UMLObject *lhs) const;
00079 
00084     virtual UMLObject* clone() const = 0;
00085 
00091     Uml::Object_Type getBaseType() const;
00092 
00098     virtual void setBaseType(Uml::Object_Type ot);
00099 
00105     virtual Uml::IDType getID() const;
00106 
00112     void setDoc(const QString &d);
00113 
00119     QString getDoc() const;
00120 
00126     Uml::Visibility getVisibility() const;
00127 
00133     virtual void setVisibility(Uml::Visibility s);
00134 
00138      void setVisibilitycmd(Uml::Visibility s);
00139 
00146     void setStereotype(const QString &_name);
00147 
00151     void setStereotypecmd(const QString &_name);
00152 
00162     void setUMLStereotype(UMLStereotype *s);
00163 
00170     void setPackage(const QString &_name);
00171 
00177     void setUMLPackage(UMLPackage* pPkg);
00178 
00184     const UMLStereotype * getUMLStereotype();
00185 
00194     QString getStereotype(bool includeAdornments = false) const;
00195 
00208     QString getPackage(const QString& separator = QString(),
00209                        bool includeRoot = false);
00210 
00219     UMLPackageList getPackages(bool includeRoot = false) const;
00220 
00226     UMLPackage* getUMLPackage();
00227 
00231     virtual void setID(Uml::IDType NewID);
00232 
00236     QString getName() const;
00237 
00241     virtual void setName(const QString &strName);
00242 
00246     void setNamecmd(const QString &strName) ;
00247 
00248 
00260     virtual QString getFullyQualifiedName(const QString& separator = QString(),
00261                                           bool includeRoot = false) const;
00262 
00266     bool getAbstract() const;
00267 
00271     void setAbstract(bool bAbstract);
00272 
00276     void setInPaste(bool bInPaste = true);
00277 
00287     virtual bool showProperties(int page = 0, bool assoc = false);
00288 
00300     virtual bool resolveRef();
00301 
00308     virtual void saveToXMI( QDomDocument & qDoc, QDomElement & qElement ) = 0;
00309 
00318     virtual bool loadFromXMI( QDomElement & element );
00319 
00326     bool loadStereotype(QDomElement & element);
00327 
00332     bool getStatic() const;
00333 
00334 
00338     void setStatic(bool bStatic);
00339 
00352     virtual bool acceptAssociationType(Uml::Association_Type);
00353 
00357     QString getSecondaryId() const;
00358 
00364     void setSecondaryId(const QString& id);
00365 
00370     QString getSecondaryFallback() const;
00371 
00376     void setSecondaryFallback(const QString& id);
00377 
00384     QDomElement save( const QString &tag, QDomDocument & qDoc );
00385 
00386 public slots:
00392     void emitModified();
00393 
00394 signals:
00400     void modified();
00401 
00402 protected:
00406     virtual void init();
00407 
00412     void maybeSignalObjectCreated();
00413 
00420     virtual bool load( QDomElement& element );
00421 
00425     Uml::IDType m_nId;
00426 
00430     QString m_Doc;
00431 
00435     UMLPackage* m_pUMLPackage;
00436 
00440     UMLStereotype* m_pStereotype;
00441 
00445     QString m_Name;
00446 
00450     Uml::Object_Type m_BaseType;
00451 
00455     Uml::Visibility m_Vis;
00456 
00460     bool m_bAbstract;
00461 
00466     bool m_bStatic;
00467 
00471     bool m_bInPaste;
00472 
00476     bool m_bCreationWasSignalled;
00477 
00484     UMLObject* m_pSecondary;
00485 
00491     QString m_SecondaryId;
00492 
00501     QString m_SecondaryFallback;
00502 };
00503 
00504 #ifndef QT_NO_DEBUG_STREAM
00505 
00509 QDebug operator<< (QDebug s, const UMLObject& a);
00510 #endif
00511 
00512 #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"
  • kate
  •     kate
  • umbrello
  •   umbrello
Generated for kdesdk by doxygen 1.5.4
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