umbrello  2.31.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 {
67  };
68 
74 
76 
77  QLabel *m_typeLabel;
78  QLabel *m_nameLabel;
80  KTextEdit *m_docTE;
82 
83  bool isModified();
84  QLabel* createPixmapLabel();
85  void updateLabel(const QString &name = QString());
86  void toForeground();
87 };
88 
89 #endif
ShowingType
Definition: docwindow.h:61
UMLScene * m_pUMLScene
The UMLScene we are going to show documentation.
Definition: docwindow.h:70
~DocWindow()
Definition: docwindow.cpp:113
Definition: docwindow.h:65
void showDocumentation(UMLObject *object, bool overwrite=false)
Definition: docwindow.cpp:130
void updateLabel(const QString &name=QString())
Definition: docwindow.cpp:428
Definition: docwindow.cpp:41
KTextEdit * m_docTE
documentation widget
Definition: docwindow.h:80
void slotFocusEnabledChanged(int state)
Definition: docwindow.cpp:419
void updateDocumentation(bool clear=false, bool startup=false)
Definition: docwindow.cpp:273
void slotTextChanged()
Definition: docwindow.cpp:411
bool isModified()
Definition: docwindow.cpp:340
void reset()
Definition: docwindow.cpp:309
The base class for UML objects.
Definition: umlobject.h:73
This class represents an association inside a diagram. Bugs and comments to umbrello-devel@kde.org or https://bugs.kde.org.
Definition: associationwidget.h:51
void slotWidgetRemoved(UMLWidget *widget)
Definition: docwindow.cpp:401
DocWindow(UMLDoc *doc, QWidget *parent=0)
Definition: docwindow.cpp:73
Definition: docwindow.h:29
Definition: docwindow.h:64
QLabel * m_nameLabel
label for name text
Definition: docwindow.h:78
UMLWidget * m_pUMLWidget
The UMLWidget we are going to show documentation.
Definition: docwindow.h:72
AssociationWidget * m_pAssocWidget
The association we are going to show documentation.
Definition: docwindow.h:73
void slotAssociationRemoved(AssociationWidget *association)
Definition: docwindow.cpp:385
QLabel * createPixmapLabel()
Definition: docwindow.cpp:457
UMLDoc * m_pUMLDoc
The Project we are going to show documentation.
Definition: docwindow.h:71
Definition: docwindow.h:63
Definition: docwindow.h:66
ModifiedWidget * m_modifiedWidget
label for modified flag icon
Definition: docwindow.h:79
UMLObject * m_pUMLObject
The UMLObject we are going to show documentation.
Definition: docwindow.h:69
void toForeground()
Definition: docwindow.cpp:467
QLabel * m_typeLabel
label for type icon
Definition: docwindow.h:77
bool m_focusEnabled
Definition: docwindow.h:81
void setFocus()
Definition: docwindow.cpp:331
Definition: docwindow.h:62
Definition: umlscene.h:68
bool isTyping()
Definition: docwindow.cpp:323
Definition: umldoc.h:74
ShowingType m_Showing
Which type of documentation we are showing.
Definition: docwindow.h:75
The base class for graphical UML objects.
Definition: umlwidget.h:40