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

docwindow.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) 2002-2020 *
8 * Umbrello UML Modeller Authors <umbrello-devel@kde.org> *
9 ***************************************************************************/
10
11 #ifndef DOCWINDOW_H
12 #define DOCWINDOW_H
13
14 #include <QWidget>
15
16 class AssociationWidget;
17 class KTextEdit;
18 class ModifiedWidget;
19 class QLabel;
20 class UMLObject;
21 class UMLDoc;
22 class UMLScene;
23 class UMLWidget;
24
29 class DocWindow : public QWidget
30 {
31 Q_OBJECT
32 public:
33 explicit DocWindow(UMLDoc * doc, QWidget *parent = 0);
34 ~DocWindow();
35
36 void showDocumentation(UMLObject * object, bool overwrite = false);
37 void showDocumentation(UMLScene * scene, bool overwrite = false);
38 void showDocumentation(UMLWidget * widget, bool overwrite = false);
39 void showDocumentation(AssociationWidget * widget, bool overwrite = false);
40
41 void updateDocumentation(bool clear = false, bool startup = false);
42
43 void reset();
44
45 bool isTyping();
46 void setFocus();
47
48 public slots:
49 void slotAssociationRemoved(AssociationWidget* association);
50 void slotWidgetRemoved(UMLWidget* widget);
51
52 private slots:
53 void slotTextChanged();
54 void slotFocusEnabledChanged(int state);
55
56 private:
61 enum ShowingType {
62 st_Project,
63 st_UMLScene,
64 st_UMLObject,
65 st_UMLWidget,
66 st_Association
67 };
68
69 UMLObject *m_pUMLObject;
70 UMLScene *m_pUMLScene;
71 UMLDoc *m_pUMLDoc;
72 UMLWidget *m_pUMLWidget;
73 AssociationWidget *m_pAssocWidget;
74
75 ShowingType m_Showing;
76
77 QLabel *m_typeLabel;
78 QLabel *m_nameLabel;
79 ModifiedWidget *m_modifiedWidget;
80 KTextEdit *m_docTE;
81 bool m_focusEnabled;
82
83 bool isModified();
84 QLabel* createPixmapLabel();
85 void updateLabel(const QString &name = QString());
86 void toForeground();
87 };
88
89 #endif
DocWindow::st_UMLScene
@ st_UMLScene
Definition: docwindow.h:63
Icon_Utils::it_Document_Edit
@ it_Document_Edit
Definition: icon_utils.h:236
ModifiedWidget::ModifiedWidget
ModifiedWidget(DocWindow *_parent)
Definition: docwindow.cpp:44
AssociationWidget
This class represents an association inside a diagram. Bugs and comments to umbrello-devel@kde....
Definition: associationwidget.h:52
docwindow.h
UMLObject::name
QString name() const
Definition: umlobject.cpp:211
DocWindow::slotFocusEnabledChanged
void slotFocusEnabledChanged(int state)
Definition: docwindow.cpp:419
UMLWidget
The base class for graphical UML objects.
Definition: umlwidget.h:41
DocWindow::~DocWindow
~DocWindow()
Definition: docwindow.cpp:113
WidgetBase::name
QString name() const
Definition: widgetbase.cpp:309
WidgetBase::setDocumentation
virtual void setDocumentation(const QString &doc)
Definition: widgetbase.cpp:294
DocWindow::m_pAssocWidget
AssociationWidget * m_pAssocWidget
The association we are going to show documentation.
Definition: docwindow.h:73
DocWindow::m_focusEnabled
bool m_focusEnabled
Definition: docwindow.h:81
WidgetBase::umlScene
UMLScene * umlScene() const
Definition: widgetbase.cpp:162
DocWindow::ShowingType
ShowingType
Definition: docwindow.h:61
DocWindow::DocWindow
DocWindow(UMLDoc *doc, QWidget *parent=0)
Definition: docwindow.cpp:73
DocWindow::st_UMLObject
@ st_UMLObject
Definition: docwindow.h:64
DocWindow::st_Project
@ st_Project
Definition: docwindow.h:62
WidgetBase::toIcon
static Icon_Utils::IconType toIcon(WidgetType wt)
Definition: widgetbase.cpp:1333
DocWindow::m_pUMLDoc
UMLDoc * m_pUMLDoc
The Project we are going to show documentation.
Definition: docwindow.h:71
DocWindow::slotAssociationRemoved
void slotAssociationRemoved(AssociationWidget *association)
Definition: docwindow.cpp:385
DocWindow::updateDocumentation
void updateDocumentation(bool clear=false, bool startup=false)
Definition: docwindow.cpp:273
Icon_Utils::it_Diagram_Class
@ it_Diagram_Class
Definition: icon_utils.h:125
UMLObject
The base class for UML objects.
Definition: umlobject.h:74
DocWindow::isModified
bool isModified()
Definition: docwindow.cpp:340
UMLObject::baseType
ObjectType baseType() const
Definition: umlobject.cpp:397
DocWindow::m_docTE
KTextEdit * m_docTE
documentation widget
Definition: docwindow.h:80
UMLObject::asUMLFolder
UMLFolder * asUMLFolder()
Definition: umlobject.cpp:1318
AssociationWidget::name
QString name() const
Definition: associationwidget.cpp:870
DocWindow::m_modifiedWidget
ModifiedWidget * m_modifiedWidget
label for modified flag icon
Definition: docwindow.h:79
Icon_Utils::it_Home
@ it_Home
Definition: icon_utils.h:48
WidgetBase::umlObject
UMLObject * umlObject() const
Definition: widgetbase.cpp:182
UMLObject::toIcon
static Icon_Utils::IconType toIcon(ObjectType t)
Definition: umlobject.cpp:1202
UMLDoc::documentation
QString documentation() const
Definition: umldoc.cpp:3286
DocWindow::m_typeLabel
QLabel * m_typeLabel
label for type icon
Definition: docwindow.h:77
DocWindow::m_nameLabel
QLabel * m_nameLabel
label for name text
Definition: docwindow.h:78
umlwidget.h
DocWindow
Definition: docwindow.h:30
DocWindow::toForeground
void toForeground()
Definition: docwindow.cpp:467
folder.h
i18n
#define i18n
Definition: main.cpp:39
DocWindow::updateLabel
void updateLabel(const QString &name=QString())
Definition: docwindow.cpp:428
DocWindow::slotWidgetRemoved
void slotWidgetRemoved(UMLWidget *widget)
Definition: docwindow.cpp:401
UMLFolder::localName
QString localName() const
Definition: folder.cpp:80
DocWindow::slotTextChanged
void slotTextChanged()
Definition: docwindow.cpp:411
WidgetBase::documentation
QString documentation() const
Definition: widgetbase.cpp:269
Icon_Utils::it_Association
@ it_Association
Definition: icon_utils.h:105
Icon_Utils::SmallIcon
QPixmap SmallIcon(IconType type)
Definition: icon_utils.cpp:41
MyProject\connect
connect()
Definition: namespaces-multiple.php:5
UMLObject::doc
QString doc() const
Definition: umlobject.cpp:435
DocWindow::st_Association
@ st_Association
Definition: docwindow.h:66
ModifiedWidget::mousePressEvent
virtual void mousePressEvent(QMouseEvent *ev)
Definition: docwindow.cpp:60
UMLApp::app
static UMLApp * app()
Definition: uml.cpp:278
UMLDoc::name
QString name() const
Definition: umldoc.cpp:2007
UMLDoc
Definition: umldoc.h:75
DocWindow::m_pUMLScene
UMLScene * m_pUMLScene
The UMLScene we are going to show documentation.
Definition: docwindow.h:70
UMLDoc::setModified
void setModified(bool modified=true)
Definition: umldoc.cpp:3136
UMLFolder
Non-graphical management of objects and diagrams of a Folder.
Definition: folder.h:35
UMLScene::setDocumentation
void setDocumentation(const QString &doc)
Definition: umlscene.cpp:364
ModifiedWidget
Definition: docwindow.cpp:42
DocWindow::st_UMLWidget
@ st_UMLWidget
Definition: docwindow.h:65
associationwidget.h
UMLObject::setDoc
void setDoc(const QString &d)
Definition: umlobject.cpp:455
DocWindow::showDocumentation
void showDocumentation(UMLObject *object, bool overwrite=false)
Definition: docwindow.cpp:130
DocWindow::setFocus
void setFocus()
Definition: docwindow.cpp:331
uError
#define uError()
Definition: debug_utils.h:123
DocWindow::createPixmapLabel
QLabel * createPixmapLabel()
Definition: docwindow.cpp:457
umlscene.h
Icon_Utils::IconType
IconType
Definition: icon_utils.h:47
uml.h
DocWindow::isTyping
bool isTyping()
Definition: docwindow.cpp:323
DocWindow::m_Showing
ShowingType m_Showing
Which type of documentation we are showing.
Definition: docwindow.h:75
debug_utils.h
icon_utils.h
UMLScene::name
QString name() const
Definition: umlscene.cpp:410
UMLDoc::setDocumentation
void setDocumentation(const QString &doc)
Definition: umldoc.cpp:3296
UMLScene
Definition: umlscene.h:69
UMLWidget::updateGeometry
void updateGeometry(bool withAssocs=true)
Definition: umlwidget.cpp:1781
umlobject.h
DocWindow::m_pUMLObject
UMLObject * m_pUMLObject
The UMLObject we are going to show documentation.
Definition: docwindow.h:69
Icon_Utils::it_Code_Gen_Wizard
@ it_Code_Gen_Wizard
Definition: icon_utils.h:234
DocWindow::reset
void reset()
Definition: docwindow.cpp:309
ModifiedWidget::setModified
void setModified(bool state)
Definition: docwindow.cpp:52
UMLObject::ot_Folder
@ ot_Folder
Definition: umlobject.h:103
UMLScene::documentation
QString documentation() const
Definition: umlscene.cpp:356
WidgetBase::baseType
WidgetType baseType() const
Definition: widgetbase.cpp:115
umldoc.h
ModifiedWidget::parent
DocWindow * parent
Definition: docwindow.cpp:67
DocWindow::m_pUMLWidget
UMLWidget * m_pUMLWidget
The UMLWidget we are going to show documentation.
Definition: docwindow.h:72