umbrello 2.32.3 Umbrello UML Modeller is a Unified Modelling Language (UML) diagram program based on KDE Technology

objectsmodel.h
Go to the documentation of this file.
1 /***************************************************************************
2 * This program is free software; you can redistribute it and/or modify *
3 * it under the terms of the GNU General Public License as published by *
4 * the Free Software Foundation; either version 2 of the License, or *
5 * (at your option) any later version. *
6 * *
7 * copyright (C) 2016-2020 *
8 * Umbrello UML Modeller Authors <umbrello-devel@kde.org> *
9 ***************************************************************************/
10
11 #ifndef OBJECTSMODEL_H
12 #define OBJECTSMODEL_H
13
14 // qt includes
15 #include <QAbstractTableModel>
16 #include <QPointer>
17
18 class UMLObject;
19
20 class ObjectsModel : public QAbstractTableModel
21 {
22 Q_OBJECT
23 public:
24 explicit ObjectsModel();
25
26 bool add(UMLObject *o);
27 bool remove(UMLObject *o);
28
29 int rowCount(const QModelIndex &parent) const;
30 int columnCount(const QModelIndex &parent) const;
31
32 QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
33 QVariant data(const QModelIndex & index, int role = Qt::DisplayRole) const;
34
35 void emitDataChanged(const QModelIndex &index);
36 void emitDataChanged(int index);
37 void emitDataChanged(UMLObject *o);
38
39 protected:
40 QList<QPointer<UMLObject>> m_allObjects;
41 };
42
43 #endif // OBJECTSMODEL_H
UMLObject::id
virtual Uml::ID::Type id() const
Definition: umlobject.cpp:425
ObjectsModel::emitDataChanged
void emitDataChanged(const QModelIndex &index)
Definition: objectsmodel.cpp:172
UMLObject::asUMLClassifier
UMLClassifier * asUMLClassifier()
Definition: umlobject.cpp:1309
UMLClassifier::getOpList
UMLOperationList getOpList(bool includeInherited=false, UMLClassifierSet *alreadyTraversed=0)
Definition: classifier.cpp:939
UMLPackage::containedObjects
UMLObjectList containedObjects(bool includeInactive=false)
Definition: package.cpp:266
UMLObject::asUMLOperation
UMLOperation * asUMLOperation()
Definition: umlobject.cpp:1324
UMLObject::name
QString name() const
Definition: umlobject.cpp:211
UMLObject::isUMLOperation
bool isUMLOperation()
Definition: umlobject.h:218
UMLOperation::getParmList
UMLAttributeList getParmList() const
Definition: operation.cpp:178
objectsmodel.h
UMLObject::asUMLAttribute
UMLAttribute * asUMLAttribute()
Definition: umlobject.cpp:1305
ObjectsModel::headerData
QVariant headerData(int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const
Definition: objectsmodel.cpp:72
operation.h
ObjectsModel::add
bool add(UMLObject *o)
Definition: objectsmodel.cpp:35
Uml::ID::toString
QString toString(const ID::Type &id)
Definition: basictypes.cpp:1263
UMLObject::umlParent
UMLObject * umlParent() const
Definition: umlobject.cpp:671
UMLObjectPrivate::isSaved
bool isSaved
Definition: umlobjectprivate.h:17
UMLObject::umlPackage
UMLPackage * umlPackage() const
Definition: umlobject.cpp:646
UMLObject
The base class for UML objects.
Definition: umlobject.h:74
ObjectsModel
Definition: objectsmodel.h:21
UMLObject::asUMLFolder
UMLFolder * asUMLFolder()
Definition: umlobject.cpp:1318
ObjectsModel::columnCount
int columnCount(const QModelIndex &parent) const
Definition: objectsmodel.cpp:65
ObjectsModel::rowCount
int rowCount(const QModelIndex &parent) const
Definition: objectsmodel.cpp:57
ObjectsModel::m_allObjects
QList< QPointer< UMLObject > > m_allObjects
Definition: objectsmodel.h:40
ObjectsModel::remove
bool remove(UMLObject *o)
Definition: objectsmodel.cpp:46
attribute.h
folder.h
i18n
#define i18n
Definition: main.cpp:39
ObjectsModel::ObjectsModel
ObjectsModel()
Definition: objectsmodel.cpp:31
v
std::vector< std::string > v
Definition: cxx11-initializer-lists.h:19
UMLCanvasObject::subordinates
UMLObjectList & subordinates() const
Definition: umlcanvasobject.h:80
UMLObject::isUMLAttribute
bool isUMLAttribute()
Definition: umlobject.h:200
UMLFolder
Non-graphical management of objects and diagrams of a Folder.
Definition: folder.h:35
classifier.h
UMLOperation
Definition: operation.h:25
Q_DECLARE_METATYPE
Q_DECLARE_METATYPE(UMLObject *)
uml.h
UMLObject::baseTypeStr
QLatin1String baseTypeStr() const
Definition: umlobject.cpp:405
UMLClassifier
Information for a non-graphical Concept/Class.
Definition: classifier.h:40
ObjectsModel::data
QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const
Definition: objectsmodel.cpp:99
UMLObject::m_d
UMLObjectPrivate * m_d
private data
Definition: umlobject.h:295
umlobjectprivate.h
UMLObjectList
Definition: umlobjectlist.h:29
umldoc.h