umbrello 2.32.3 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 * 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) 2015-2020 *
8 * Umbrello UML Modeller Authors <umbrello-devel@kde.org> *
9 ***************************************************************************/
10
11 #ifndef DIAGRAMSMODEL_H
12 #define DIAGRAMSMODEL_H
13
14 // app includes
15 #include "umlviewlist.h"
16
17 // qt includes
18 #include <QAbstractTableModel>
19 #include <QPointer>
20
21 class UMLView;
22
23 Q_DECLARE_METATYPE(UMLView*);
24
25 class DiagramsModel : public QAbstractTableModel
26 {
27 Q_OBJECT
28 public:
29 explicit DiagramsModel();
30
31 int rowCount(const QModelIndex &parent) const;
32 int columnCount(const QModelIndex &parent) const;
33
34 QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
35 QVariant data(const QModelIndex & index, int role = Qt::DisplayRole) const;
36
37 bool addDiagram(UMLView *view);
38 bool removeDiagram(UMLView *view);
39
40 void emitDataChanged(const QModelIndex &index);
41 void emitDataChanged(int index);
42 void emitDataChanged(UMLView *view);
43
44 protected:
45 int m_count;
46 UMLViewList m_views;
47 };
48
49 #endif // STEREOTYPESMODEL_H
DiagramsModel
Definition: diagramsmodel.h:26
DiagramsModel::addDiagram
bool addDiagram(UMLView *view)
Definition: diagramsmodel.cpp:98
umlview.h
DiagramsModel::m_count
int m_count
Definition: diagramsmodel.h:45
DiagramsModel::emitDataChanged
void emitDataChanged(const QModelIndex &index)
Definition: diagramsmodel.cpp:120
Q_DECLARE_METATYPE
Q_DECLARE_METATYPE(UMLView *)
DiagramsModel::headerData
QVariant headerData(int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const
Definition: diagramsmodel.cpp:46
DiagramsModel::columnCount
int columnCount(const QModelIndex &parent) const
Definition: diagramsmodel.cpp:39
DiagramsModel::rowCount
int rowCount(const QModelIndex &parent) const
Definition: diagramsmodel.cpp:31
UMLView
Definition: umlview.h:35
umlviewlist.h
Uml::DiagramType::toStringI18n
QString toStringI18n(Enum item)
Definition: basictypes.cpp:203
folder.h
i18n
#define i18n
Definition: main.cpp:39
DiagramsModel::removeDiagram
bool removeDiagram(UMLView *view)
Definition: diagramsmodel.cpp:109
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:67
umlscene.h
uml.h
Icon_Utils::smallIcon
QPixmap smallIcon(Uml::DiagramType::Enum dt)
Definition: icon_utils.cpp:162
DiagramsModel::DiagramsModel
DiagramsModel()
Definition: diagramsmodel.cpp:26
UMLViewList
QList< QPointer< UMLView > > UMLViewList
Definition: umlviewlist.h:26
DiagramsModel::m_views
UMLViewList m_views
Definition: diagramsmodel.h:46
umldoc.h