umbrello: umbrello/uml1model/folder.h Source File

umbrello 2.31.0 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:90
Uml::ModelType::Enum
Enum
Definition: basictypes.h:75
UMLDoc::url
const KUrl & url() const
Definition: umldoc.cpp:330
UMLDoc::datatypeFolder
UMLFolder * datatypeFolder() const
Definition: umldoc.cpp:2979
Settings::GeneralState::tabdiagrams
bool tabdiagrams
Definition: optionstate.h:65
UMLObject::name
QString name() const
Definition: umlobject.cpp:211
umlview.h
UMLFolder::saveContents1
void saveContents1(QDomDocument &qDoc, QDomElement &qElement)
Definition: folder.cpp:269
UMLFolder::folderFile
QString folderFile() const
Definition: folder.cpp:259
UMLFolder::setViewOptions
void setViewOptions(const Settings::OptionState &optionState)
Definition: folder.cpp:213
Uml::ID::None
const Type None
special value for uninitialized ID
Definition: basictypes.h:370
Uml::ModelType::Logical
@ Logical
Definition: basictypes.h:93
UMLDoc::rootFolder
UMLFolder * rootFolder(Uml::ModelType::Enum mt)
Definition: umldoc.cpp:3194
Uml::DiagramType::Enum
Enum
Definition: basictypes.h:94
object_factory.h
Uml::ID::toString
QString toString(const ID::Type &id)
Definition: basictypes.cpp:1280
UMLFolder::load1
bool load1(QDomElement &element)
Definition: folder.cpp:472
UMLObject::setName
virtual void setName(const QString &strName)
Definition: umlobject.cpp:192
UMLObject::umlPackage
UMLPackage * umlPackage() const
Definition: umlobject.cpp:645
UMLFolder::loadDiagramsFromXMI1
bool loadDiagramsFromXMI1(QDomNode &node)
Definition: folder.cpp:379
UMLFolder::appendViews
void appendViews(UMLViewList &viewList, bool includeNested=true)
Definition: folder.cpp:106
UMLFolder::~UMLFolder
virtual ~UMLFolder()
Definition: folder.cpp:48
UMLFolder::addView
void addView(UMLView *view)
Definition: folder.cpp:87
UMLFolder::showPropertiesDialog
bool showPropertiesDialog(QWidget *parent)
Definition: folder.cpp:572
Model_Utils::getXmiId
QString getXmiId(QDomElement element)
Definition: model_utils.cpp:748
Uml::ID::Type
std::string Type
Definition: basictypes.h:368
Settings::OptionState::generalState
GeneralState generalState
Definition: optionstate.h:334
model_utils.h
UMLObject
The base class for UML objects.
Definition: umlobject.h:73
UMLObject::baseType
ObjectType baseType() const
Definition: umlobject.cpp:397
UMLScene::saveToXMI1
virtual void saveToXMI1(QDomDocument &qDoc, QDomElement &qElement)
Definition: umlscene.cpp:3736
optionstate.h
UMLFolder::clone
virtual UMLObject * clone() const
Definition: folder.cpp:57
Settings::optionState
OptionState & optionState()
Definition: optionstate.cpp:370
UMLObject::asUMLFolder
UMLFolder * asUMLFolder()
Definition: umlobject.cpp:1317
UMLPackage::appendPackages
void appendPackages(UMLPackageList &packages, bool includeNested=true)
Definition: package.cpp:274
UMLObject::m_BaseType
ObjectType m_BaseType
objects type
Definition: umlobject.h:276
UMLObject::setStereotypeCmd
void setStereotypeCmd(const QString &_name)
Definition: umlobject.cpp:534
Uml::ID::fromString
ID::Type fromString(const QString &id)
Definition: basictypes.cpp:1285
UMLFolder::findView
UMLView * findView(Uml::ID::Type id)
Definition: folder.cpp:154
Model_Utils::treeViewAddViews
void treeViewAddViews(const UMLViewList &viewList)
Definition: model_utils.cpp:400
operator<<
QDebug operator<<(QDebug out, const UMLFolder &item)
Definition: folder.cpp:586
UMLView
Definition: umlview.h:34
UMLDoc::findObjectById
UMLObject * findObjectById(Uml::ID::Type id)
Definition: umldoc.cpp:1036
umlviewlist.h
UMLFolder::setLocalName
void setLocalName(const QString &localName)
Definition: folder.cpp:70
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:833
UMLObject::save1
QDomElement save1(const QString &tag, QDomDocument &qDoc)
Definition: umlobject.cpp:844
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:190
Model_Utils::isCommonXMI1Attribute
bool isCommonXMI1Attribute(const QString &tag)
Definition: model_utils.cpp:762
UMLFolder::localName
QString localName() const
Definition: folder.cpp:79
UMLFolder::saveToXMI1
void saveToXMI1(QDomDocument &qDoc, QDomElement &qElement)
Definition: folder.cpp:322
UMLObject::packages
UMLPackageList packages(bool includeRoot=false) const
Definition: umlobject.cpp:597
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:269
UMLDoc
Definition: umldoc.h:74
UMLCanvasObject::subordinates
UMLObjectList & subordinates() const
Definition: umlcanvasobject.h:88
UMLFolder
Non-graphical management of objects and diagrams of a Folder.
Definition: folder.h:34
UMLFolder::UMLFolder
UMLFolder(const QString &name=QString(), Uml::ID::Type id=Uml::ID::None)
Definition: folder.cpp:38
UMLPackageList
QList< UMLPackage * > UMLPackageList
Definition: umlpackagelist.h:17
UMLDoc::tagEq
static bool tagEq(const QString &tag, const QString &pattern)
Definition: umldoc.cpp:3548
UMLDoc::addView
void addView(UMLView *view)
Definition: umldoc.cpp:224
UMLFolder::activateViews
void activateViews()
Definition: folder.cpp:127
Uml::ModelType::N_MODELTYPES
@ N_MODELTYPES
Definition: basictypes.h:98
UMLFolder::removeView
void removeView(UMLView *view)
Definition: folder.cpp:95
Settings::OptionState
Definition: optionstate.h:322
UMLFolder::operator<<
friend QDebug operator<<(QDebug out, const UMLFolder &item)
Definition: folder.cpp:586
uError
#define uError()
Definition: debug_utils.h:123
UMLFolder::save1
void save1(QDomDocument &qDoc, QDomElement &qElement)
Definition: folder.cpp:304
UMLObject::loadFromXMI1
virtual bool loadFromXMI1(QDomElement &element)
Definition: umlobject.cpp:954
umlscene.h
uml.h
UMLObject::setUMLPackage
bool setUMLPackage(UMLPackage *pPkg)
Definition: umlobject.cpp:615
Object_Factory::makeObjectFromXMI
UMLObject * makeObjectFromXMI(const QString &xmiTag, const QString &stereoID)
Definition: object_factory.cpp:382
debug_utils.h
UMLDoc::addDiagramToLoad
void addDiagramToLoad(UMLFolder *folder, QDomNode node)
Definition: umldoc.cpp:2579
UMLView::umlScene
UMLScene * umlScene() const
Definition: umlview.cpp:56
UMLFolder::removeAllViews
void removeAllViews()
Definition: folder.cpp:224
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:263
UMLScene::loadFromXMI1
virtual bool loadFromXMI1(QDomElement &qElement)
Definition: umlscene.cpp:3811
UMLDoc::setResolution
void setResolution(qreal resolution)
Definition: umldoc.cpp:2015
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:3209
UMLFolder::m_diagrams
UMLViewList m_diagrams
Definition: folder.h:99
Dialog_Utils::askRenameName
bool askRenameName(WidgetBase::WidgetType type, QString &name)
Definition: dialog_utils.cpp:163
UMLFolder::setFolderFile
void setFolderFile(const QString &fileName)
Definition: folder.cpp:251
UMLFolder::loadFolderFile
bool loadFolderFile(const QString &path)
Definition: folder.cpp:431
UMLApp::document
UMLDoc * document() const
Definition: uml.cpp:1055
umldoc.h
UMLPackage
Non-graphical information for a Package.
Definition: package.h:32
UMLFolder::m_folderFile
QString m_folderFile
Definition: folder.h:98