umbrello  2.35.0
Umbrello UML Modeller is a Unified Modelling Language (UML) diagram program based on KDE Technology
diagramsmodel.h
Go to the documentation of this file.
1 /*
2  SPDX-License-Identifier: GPL-2.0-or-later
3  SPDX-FileCopyrightText: 2015-2020 Umbrello UML Modeller Authors <umbrello-devel@kde.org>
4 */
5 
6 #ifndef DIAGRAMSMODEL_H
7 #define DIAGRAMSMODEL_H
8 
9 // app includes
10 #include "umlviewlist.h"
11 
12 // qt includes
13 #include <QAbstractTableModel>
14 #include <QPointer>
15 
16 class UMLView;
17 
19 
20 class DiagramsModel : public QAbstractTableModel
21 {
22  Q_OBJECT
23 public:
24  explicit DiagramsModel();
25 
26  int rowCount(const QModelIndex &parent) const;
27  int columnCount(const QModelIndex &parent) const;
28 
29  QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
30  QVariant data(const QModelIndex & index, int role = Qt::DisplayRole) const;
31 
32  bool addDiagram(UMLView *view);
33  bool removeDiagram(UMLView *view);
34  bool removeAllDiagrams();
35 
36  void emitDataChanged(const QModelIndex &index);
37  void emitDataChanged(int index);
38  void emitDataChanged(UMLView *view);
39 
40 protected:
41  int m_count;
43 };
44 
45 #endif // STEREOTYPESMODEL_H
DiagramsModel
Definition: diagramsmodel.h:20
DiagramsModel::addDiagram
bool addDiagram(UMLView *view)
Definition: diagramsmodel.cpp:93
umlview.h
DiagramsModel::removeAllDiagrams
bool removeAllDiagrams()
Definition: diagramsmodel.cpp:115
DiagramsModel::m_count
int m_count
Definition: diagramsmodel.h:41
DiagramsModel::emitDataChanged
void emitDataChanged(const QModelIndex &index)
Definition: diagramsmodel.cpp:125
Q_DECLARE_METATYPE
Q_DECLARE_METATYPE(UMLView *)
DiagramsModel::headerData
QVariant headerData(int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const
Definition: diagramsmodel.cpp:41
DiagramsModel::columnCount
int columnCount(const QModelIndex &parent) const
Definition: diagramsmodel.cpp:34
DiagramsModel::rowCount
int rowCount(const QModelIndex &parent) const
Definition: diagramsmodel.cpp:26
UMLView
Definition: umlview.h:29
umlviewlist.h
number
it is up to the author donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License If the distribution and or use of the Library is restricted in certain countries either by patents or by copyrighted the original copyright holder who places the Library under this License may add an geographical distribution limitation excluding those so that distribution is permitted only in or among countries not thus excluded In such this License incorporates the limitation as if written in the body of this License The Free Software Foundation may publish revised and or new versions of the Library General Public License from time to time Such new versions will be similar in spirit to the present but may differ in detail to address new problems or concerns Each version is given a distinguishing version number If the Library specifies a version number of this License which applies to it and any later you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation If the Library does not specify a license version number
Definition: LGPL-2.0-only.txt:368
Uml::DiagramType::toStringI18n
QString toStringI18n(Enum item)
Definition: basictypes.cpp:191
folder.h
i18n
#define i18n
Definition: main.cpp:35
DiagramsModel::removeDiagram
bool removeDiagram(UMLView *view)
Definition: diagramsmodel.cpp:104
diagramsmodel.h
v
std::vector< std::string > v
Definition: cxx11-initializer-lists.h:19
DiagramsModel::data
QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const
Definition: diagramsmodel.cpp:62
umlscene.h
uml.h
Icon_Utils::smallIcon
QPixmap smallIcon(Uml::DiagramType::Enum dt)
Definition: icon_utils.cpp:155
DiagramsModel::DiagramsModel
DiagramsModel()
Definition: diagramsmodel.cpp:21
UMLViewList
QList< QPointer< UMLView > > UMLViewList
Definition: umlviewlist.h:14
DiagramsModel::m_views
UMLViewList m_views
Definition: diagramsmodel.h:42
umldoc.h