umbrello: DocWindow Class Reference

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

Public Slots | Public Member Functions | Private Types | Private Slots | Private Member Functions | Private Attributes | List of all members
DocWindow Class Reference

`#include <docwindow.h>`

Inheritance diagram for DocWindow:

## Public Slots
void | slotAssociationRemoved (AssociationWidget *association)
void | slotWidgetRemoved (UMLWidget *widget)

## Public Member Functions
| DocWindow (UMLDoc *doc, QWidget *parent=0)
| ~DocWindow ()
void | showDocumentation (UMLObject *object, bool overwrite=false)
void | showDocumentation (UMLScene *scene, bool overwrite=false)
void | showDocumentation (UMLWidget *widget, bool overwrite=false)
void | showDocumentation (AssociationWidget *widget, bool overwrite=false)
void | updateDocumentation (bool clear=false, bool startup=false)
void | reset ()
bool | isTyping ()
void | setFocus ()

## Private Types
enum | ShowingType { st_Project , st_UMLScene , st_UMLObject , st_UMLWidget , st_Association }

## Private Slots
void | slotTextChanged ()
void | slotFocusEnabledChanged (int state)

## Private Member Functions
bool | isModified ()
QLabel * | createPixmapLabel ()
void | updateLabel (const QString &name=QString())
void | toForeground ()

## Private Attributes
UMLObject * | m_pUMLObject
| The UMLObject we are going to show documentation. More...
UMLScene * | m_pUMLScene
| The UMLScene we are going to show documentation. More...
UMLDoc * | m_pUMLDoc
| The Project we are going to show documentation. More...
UMLWidget * | m_pUMLWidget
| The UMLWidget we are going to show documentation. More...
AssociationWidget * | m_pAssocWidget
| The association we are going to show documentation. More...
ShowingType | m_Showing
| Which type of documentation we are showing. More...
QLabel * | m_typeLabel
| label for type icon More...
QLabel * | m_nameLabel
| label for name text More...
ModifiedWidget * | m_modifiedWidget
| label for modified flag icon More...
KTextEdit * | m_docTE
| documentation widget More...
bool | m_focusEnabled

## Detailed Description

Author
  Paul Hensgen Bugs and comments to umbre.nosp@m.llo-.nosp@m.devel.nosp@m.@kde.nosp@m..org or https://bugs.kde.org

## Member Enumeration Documentation

## ◆ ShowingType

enum DocWindow::ShowingType
| private

Used internally to know which type of object we are showing documentation for.

Enumerator
st_Project |
st_UMLScene |
st_UMLObject |
st_UMLWidget |
st_Association |

## Constructor & Destructor Documentation

## ◆ DocWindow()

DocWindow::DocWindow | ( | UMLDoc * | doc,
|  | QWidget * | parent = `0`
| ) |  |
| explicit

Constructor.

## ◆ ~DocWindow()

DocWindow::~DocWindow | ( |  | ) |

Destructor.

## Member Function Documentation

## ◆ createPixmapLabel()

QLabel * DocWindow::createPixmapLabel | ( |  | ) |
| private

Creates a QLabel used with a pixmap.

Returns
  the just created QLabel

## ◆ isModified()

bool DocWindow::isModified | ( |  | ) |
| private

Checks if the user is typing in the documentation edit window.

## ◆ isTyping()

bool DocWindow::isTyping | ( |  | ) |

Checks if the user is typing in the documentation edit window.

## ◆ reset()

void DocWindow::reset | ( |  | ) |

Re-initializes the class for a new document.

## ◆ setFocus()

void DocWindow::setFocus | ( |  | ) |

## ◆ showDocumentation() [1/4]

void DocWindow::showDocumentation | ( | AssociationWidget * | widget,
|  | bool | overwrite = `false`
| ) |  |

This method is the same as the one for UMLObjects except it displays documentation for an association instance (AssociationWidget).

## ◆ showDocumentation() [2/4]

void DocWindow::showDocumentation | ( | UMLObject * | object,
|  | bool | overwrite = `false`
| ) |  |

Called when a widget wishes to display its documentation in the doc window. If there was already documentation there, that will be updated before being removed from the view.

Also call this function if you update the documentation in another place, such as a properties dialog. Just set overwrite to true.

Overwrite is used when you believe that the documentation window is already displaying documentation for the widget you wish to display. Overwrite just determines whose version is more up to date.

## ◆ showDocumentation() [3/4]

void DocWindow::showDocumentation | ( | UMLScene * | scene,
|  | bool | overwrite = `false`
| ) |  |

This method is the same as the one for UMLObjects except it displays documentation for a diagram.

## ◆ showDocumentation() [4/4]

void DocWindow::showDocumentation | ( | UMLWidget * | widget,
|  | bool | overwrite = `false`
| ) |  |

This method is the same as the one for UMLObjects except it displays documentation for an object instance (StateWidget/ ObjectWidget).

## ◆ slotAssociationRemoved

void DocWindow::slotAssociationRemoved | ( | AssociationWidget * | association | ) |
| slot

An association was removed from the UMLScene. If the association removed was the association whose documentation is being shown, m_pAssocWidget is set to 0.

## ◆ slotFocusEnabledChanged

void DocWindow::slotFocusEnabledChanged | ( | int | status | ) |
| privateslot

Set state of focus enabled support.

## ◆ slotTextChanged

void DocWindow::slotTextChanged | ( |  | ) |
| privateslot

text from the edit field has been changed

## ◆ slotWidgetRemoved

void DocWindow::slotWidgetRemoved | ( | UMLWidget * | widget | ) |
| slot

A widget was removed from the UMLScene. If the association removed was the association which documentation is being shown, m_pUMLWidget is set to 0.

## ◆ toForeground()

void DocWindow::toForeground | ( |  | ) |
| private

Bring doc window to foreground if it is tabbed with other dock widgets.

## ◆ updateDocumentation()

void DocWindow::updateDocumentation | ( | bool | clear = `false`,
|  | bool | startup = `false`
| ) |  |

Call when you wish move changes in the doc window back into the members documentation.

If clear is true the doc window will display the documentation for the current project instead of the widget documentation.

This is usually called before displaying a properties dialog.

Parameters

  clear | If true, show the documentation of current project
  startup | If true, no setModified(true) calls will be done and nothing is pushed to the undo stack

## ◆ updateLabel()

void DocWindow::updateLabel | ( | const QString & | name = `QString()` | ) |
| private

Updates the info label with the current state. If the given name is empty only the modified icon is set.

## Member Data Documentation

## ◆ m_docTE

KTextEdit* DocWindow::m_docTE
| private

documentation widget

## ◆ m_focusEnabled

bool DocWindow::m_focusEnabled
| private

## ◆ m_modifiedWidget

ModifiedWidget* DocWindow::m_modifiedWidget
| private

label for modified flag icon

## ◆ m_nameLabel

QLabel* DocWindow::m_nameLabel
| private

label for name text

## ◆ m_pAssocWidget

AssociationWidget* DocWindow::m_pAssocWidget
| private

The association we are going to show documentation.

## ◆ m_pUMLDoc

UMLDoc* DocWindow::m_pUMLDoc
| private

The Project we are going to show documentation.

## ◆ m_pUMLObject

UMLObject* DocWindow::m_pUMLObject
| private

The UMLObject we are going to show documentation.

## ◆ m_pUMLScene

UMLScene* DocWindow::m_pUMLScene
| private

The UMLScene we are going to show documentation.

## ◆ m_pUMLWidget

UMLWidget* DocWindow::m_pUMLWidget
| private

The UMLWidget we are going to show documentation.

## ◆ m_Showing

ShowingType DocWindow::m_Showing
| private

Which type of documentation we are showing.

## ◆ m_typeLabel

QLabel* DocWindow::m_typeLabel
| private

label for type icon

The documentation for this class was generated from the following files:

- umbrello/docwindow.h
- umbrello/docwindow.cpp