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

folder.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) 2006-2020 *
8 * Umbrello UML Modeller Authors <umbrello-devel@kde.org> *
9 ***************************************************************************/
10
11 #ifndef UMLFOLDER_H
12 #define UMLFOLDER_H
13
14 #include "package.h"
15 #include "umlviewlist.h"
16 #include "optionstate.h"
17
34 class UMLFolder : public UMLPackage
35 {
36 Q_OBJECT
37 public:
38 explicit UMLFolder(const QString & name = QString(), Uml::ID::Type id = Uml::ID::None);
39 virtual ~UMLFolder();
40
41 virtual UMLObject* clone() const;
42
43 void setLocalName(const QString& localName);
44 QString localName() const;
45
46 void addView(UMLView *view);
47
48 void removeView(UMLView *view);
49
50 void appendViews(UMLViewList& viewList, bool includeNested = true);
51
52 void activateViews();
53
54 UMLView* findView(Uml::ID::Type id);
55 UMLView* findView(Uml::DiagramType::Enum type, const QString &name, bool searchAllScopes = true);
56
57 void setViewOptions(const Settings::OptionState& optionState);
58
59 void removeAllViews();
60
61 void setFolderFile(const QString& fileName);
62 QString folderFile() const;
63
64 bool showPropertiesDialog(QWidget *parent);
65
66 void saveToXMI1(QDomDocument & qDoc, QDomElement & qElement);
67
68 friend QDebug operator<<(QDebug out, const UMLFolder& item);
69
70 protected:
71 void saveContents1(QDomDocument& qDoc, QDomElement& qElement);
72
73 void save1(QDomDocument& qDoc, QDomElement& qElement);
74
75 bool loadDiagramsFromXMI1(QDomNode& node);
76
77 bool loadFolderFile(const QString& path);
78
79 bool load1(QDomElement & element);
80
81 private:
82 QString m_localName;
83
90 QString m_folderFile;
91 UMLViewList m_diagrams;
92
93 friend class UMLDoc;
94 };
95
96 #endif
UMLFolder::m_localName
QString m_localName
i18n name, only used for predefined root folders
Definition: folder.h:82
datatype.h
Uml::ModelType::Enum
Enum
Definition: basictypes.h:41
UMLDoc::url
const KUrl & url() const
Definition: umldoc.cpp:331
UMLDoc::datatypeFolder
UMLFolder * datatypeFolder() const
Definition: umldoc.cpp:2988
Settings::GeneralState::tabdiagrams
bool tabdiagrams
Definition: optionstate.h:57
UMLObject::name
QString name() const
Definition: umlobject.cpp:211
umlview.h
UMLDatatype::setActive
void setActive(bool active=true)
Definition: datatype.cpp:73
UMLFolder::saveContents1
void saveContents1(QDomDocument &qDoc, QDomElement &qElement)
Definition: folder.cpp:270
UMLFolder::folderFile
QString folderFile() const
Definition: folder.cpp:260
UMLDatatype
Non-graphical information for a Datatype.
Definition: datatype.h:26
UMLFolder::setViewOptions
void setViewOptions(const Settings::OptionState &optionState)
Definition: folder.cpp:214
Uml::ID::None
const Type None
special value for uninitialized ID
Definition: basictypes.h:353
Uml::ModelType::Logical
@ Logical
Definition: basictypes.h:42
UMLDoc::rootFolder
UMLFolder * rootFolder(Uml::ModelType::Enum mt)
Definition: umldoc.cpp:3205
Uml::DiagramType::Enum
Enum
Definition: basictypes.h:77
object_factory.h
Uml::ID::toString
QString toString(const ID::Type &id)
Definition: basictypes.cpp:1263
UMLFolder::load1
bool load1(QDomElement &element)
Definition: folder.cpp:473
UMLObject::setName
virtual void setName(const QString &strName)
Definition: umlobject.cpp:192
UMLObject::umlPackage
UMLPackage * umlPackage() const
Definition: umlobject.cpp:646
UMLFolder::loadDiagramsFromXMI1
bool loadDiagramsFromXMI1(QDomNode &node)
Definition: folder.cpp:380
UMLFolder::appendViews
void appendViews(UMLViewList &viewList, bool includeNested=true)
Definition: folder.cpp:107
UMLFolder::~UMLFolder
virtual ~UMLFolder()
Definition: folder.cpp:49
UMLFolder::addView
void addView(UMLView *view)
Definition: folder.cpp:88
UMLFolder::showPropertiesDialog
bool showPropertiesDialog(QWidget *parent)
Definition: folder.cpp:589
Model_Utils::getXmiId
QString getXmiId(QDomElement element)
Definition: model_utils.cpp:747
Uml::ID::Type
std::string Type
Definition: basictypes.h:351
Settings::OptionState::generalState
GeneralState generalState
Definition: optionstate.h:326
model_utils.h
UMLObject
The base class for UML objects.
Definition: umlobject.h:74
UMLObject::baseType
ObjectType baseType() const
Definition: umlobject.cpp:397
UMLScene::saveToXMI1
virtual void saveToXMI1(QDomDocument &qDoc, QDomElement &qElement)
Definition: umlscene.cpp:3753
UMLObject::asUMLDatatype
UMLDatatype * asUMLDatatype()
Definition: umlobject.cpp:1312
optionstate.h
UMLFolder::clone
virtual UMLObject * clone() const
Definition: folder.cpp:58
Settings::optionState
OptionState & optionState()
Definition: optionstate.cpp:362
UMLObject::asUMLFolder
UMLFolder * asUMLFolder()
Definition: umlobject.cpp:1318
UMLPackage::appendPackages
void appendPackages(UMLPackageList &packages, bool includeNested=true)
Definition: package.cpp:327
UMLObject::m_BaseType
ObjectType m_BaseType
objects type
Definition: umlobject.h:276
UMLObject::setStereotypeCmd
void setStereotypeCmd(const QString &_name)
Definition: umlobject.cpp:535
Uml::ID::fromString
ID::Type fromString(const QString &id)
Definition: basictypes.cpp:1268
UMLFolder::findView
UMLView * findView(Uml::ID::Type id)
Definition: folder.cpp:155
Model_Utils::treeViewAddViews
void treeViewAddViews(const UMLViewList &viewList)
Definition: model_utils.cpp:399
operator<<
QDebug operator<<(QDebug out, const UMLFolder &item)
Definition: folder.cpp:603
UMLView
Definition: umlview.h:35
UMLDoc::findObjectById
UMLObject * findObjectById(Uml::ID::Type id)
Definition: umldoc.cpp:1038
umlviewlist.h
UMLFolder::setLocalName
void setLocalName(const QString &localName)
Definition: folder.cpp:71
uWarning
#define uWarning()
Definition: debug_utils.h:124
UMLObject::fullyQualifiedName
virtual QString fullyQualifiedName(const QString &separator=QString(), bool includeRoot=false) const
Definition: umlobject.cpp:227
UMLObject::saveToXMI1
virtual void saveToXMI1(QDomDocument &qDoc, QDomElement &qElement)
Definition: umlobject.cpp:834
UMLObject::save1
QDomElement save1(const QString &tag, QDomDocument &qDoc)
Definition: umlobject.cpp:845
UMLObject::copyInto
virtual void copyInto(UMLObject *lhs) const
Definition: umlobject.cpp:314
folder.h
i18n
#define i18n
Definition: main.cpp:39
UMLPackage::removeObject
void removeObject(UMLObject *pObject)
Definition: package.cpp:210
Model_Utils::isCommonXMI1Attribute
bool isCommonXMI1Attribute(const QString &tag)
Definition: model_utils.cpp:761
UMLFolder::localName
QString localName() const
Definition: folder.cpp:80
UMLFolder::saveToXMI1
void saveToXMI1(QDomDocument &qDoc, QDomElement &qElement)
Definition: folder.cpp:323
UMLObject::packages
UMLPackageList packages(bool includeRoot=false) const
Definition: umlobject.cpp:598
uDebug
#define uDebug()
Definition: debug_utils.h:122
v
std::vector< std::string > v
Definition: cxx11-initializer-lists.h:19
UMLPackage::m_objects
UMLObjectList m_objects
Definition: package.h:75
UMLObject::doc
QString doc() const
Definition: umlobject.cpp:435
UMLApp::app
static UMLApp * app()
Definition: uml.cpp:278
UMLDoc
Definition: umldoc.h:75
UMLCanvasObject::subordinates
UMLObjectList & subordinates() const
Definition: umlcanvasobject.h:80
UMLFolder
Non-graphical management of objects and diagrams of a Folder.
Definition: folder.h:35
UMLFolder::UMLFolder
UMLFolder(const QString &name=QString(), Uml::ID::Type id=Uml::ID::None)
Definition: folder.cpp:39
UMLPackageList
QList< UMLPackage * > UMLPackageList
Definition: umlpackagelist.h:17
UMLDoc::tagEq
static bool tagEq(const QString &tag, const QString &pattern)
Definition: umldoc.cpp:3582
UMLDoc::addView
void addView(UMLView *view)
Definition: umldoc.cpp:225
UMLFolder::activateViews
void activateViews()
Definition: folder.cpp:128
Uml::ModelType::N_MODELTYPES
@ N_MODELTYPES
Definition: basictypes.h:47
UMLFolder::removeView
void removeView(UMLView *view)
Definition: folder.cpp:96
Settings::OptionState
Definition: optionstate.h:314
UMLFolder::operator<<
friend QDebug operator<<(QDebug out, const UMLFolder &item)
Definition: folder.cpp:603
uError
#define uError()
Definition: debug_utils.h:123
UMLFolder::save1
void save1(QDomDocument &qDoc, QDomElement &qElement)
Definition: folder.cpp:305
UMLObject::loadFromXMI1
virtual bool loadFromXMI1(QDomElement &element)
Definition: umlobject.cpp:955
umlscene.h
uml.h
UMLObject::setUMLPackage
bool setUMLPackage(UMLPackage *pPkg)
Definition: umlobject.cpp:616
Object_Factory::makeObjectFromXMI
UMLObject * makeObjectFromXMI(const QString &xmiTag, const QString &stereoID)
Definition: object_factory.cpp:374
debug_utils.h
UMLDoc::addDiagramToLoad
void addDiagramToLoad(UMLFolder *folder, QDomNode node)
Definition: umldoc.cpp:2586
UMLView::umlScene
UMLScene * umlScene() const
Definition: umlview.cpp:56
UMLFolder::removeAllViews
void removeAllViews()
Definition: folder.cpp:225
uIgnoreZeroPointer
#define uIgnoreZeroPointer(a)
Definition: debug_utils.h:134
UMLScene::setOptionState
void setOptionState(const Settings::OptionState &options)
Definition: umlscene.cpp:579
dialog_utils.h
package.h
UMLDoc::removeView
void removeView(UMLView *view, bool enforceOneView=true)
Definition: umldoc.cpp:264
UMLScene::loadFromXMI1
virtual bool loadFromXMI1(QDomElement &qElement)
Definition: umlscene.cpp:3828
UMLDoc::setResolution
void setResolution(qreal resolution)
Definition: umldoc.cpp:2017
UMLObject::ot_Folder
@ ot_Folder
Definition: umlobject.h:103
UMLViewList
QList< QPointer< UMLView > > UMLViewList
Definition: umlviewlist.h:26
UMLDoc::rootFolderType
Uml::ModelType::Enum rootFolderType(UMLObject *obj)
Definition: umldoc.cpp:3220
UMLFolder::m_diagrams
UMLViewList m_diagrams
Definition: folder.h:91
Dialog_Utils::askRenameName
bool askRenameName(WidgetBase::WidgetType type, QString &name)
Definition: dialog_utils.cpp:164
UMLFolder::setFolderFile
void setFolderFile(const QString &fileName)
Definition: folder.cpp:252
UMLFolder::loadFolderFile
bool loadFolderFile(const QString &path)
Definition: folder.cpp:432
UMLApp::document
UMLDoc * document() const
Definition: uml.cpp:1064
umldoc.h
UMLPackage
Non-graphical information for a Package.
Definition: package.h:33
UMLFolder::m_folderFile
QString m_folderFile
Definition: folder.h:90