umbrello 26.03.70-1a62d36 Umbrello UML Modeller is a Unified Modelling Language (UML) diagram program based on KDE Technology

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Classes | Public Slots | Public Member Functions | Protected Member Functions | Private Attributes | List of all members
DefaultValueWidget Class Reference

`#include <defaultvaluewidget.h>`

Inheritance diagram for DefaultValueWidget:

## Classes

class | Private

## Public Slots

void | setType (UMLObject *type)
void | setType (const QString &type)

## Public Member Functions

| DefaultValueWidget (UMLObject *type, const QString &value, QWidget *parent=nullptr)
| ~DefaultValueWidget ()
void | addToLayout (QGridLayout *layout, int row)
QString | value () const

## Protected Member Functions

void | showEvent (QShowEvent *event)
void | hideEvent (QHideEvent *event)

## Private Attributes

Private * | m_d

## Detailed Description

Widget for showing/editing default values

Depending on the given UML data type the widget shows either a simple edit line or a list box with enum literals from which the user can select entries.

Author
  Ralf Habacker ralf..nosp@m.haba.nosp@m.cker@.nosp@m.free.nosp@m.net.d.nosp@m.e

## Constructor & Destructor Documentation

## ◆ DefaultValueWidget()

DefaultValueWidget::DefaultValueWidget | ( | UMLObject * | type,
|  | const QString & | value,
|  | QWidget * | parent = `nullptr`
| ) |  |

explicit

## ◆ ~DefaultValueWidget()

DefaultValueWidget::~DefaultValueWidget | ( |  | ) |

## Member Function Documentation

## ◆ addToLayout()

void DefaultValueWidget::addToLayout | ( | QGridLayout * | layout,
|  | int | row
| ) |  |

Add this widget to a given grid layout. Umbrello dialogs places labels in column 0 and the editable field in column 1.

Parameters

  layout | The layout to which the widget should be added
  row | The row in the grid layout where the widget should be placed

## ◆ hideEvent()

void DefaultValueWidget::hideEvent | ( | QHideEvent * | event | ) |

protected

Reimplemented from QWidget to control widgets visible state in case addToLayout() has been called

Parameters

  event | hide event

## ◆ setType [1/2]

void DefaultValueWidget::setType | ( | const QString & | _type | ) |

slot

Update widget with data type from a text string

The method searches for a uml object with the specified name. If an object was found, the display of the selectable options depends on the type.

Parameters

  _type | type as text to set the widget from

## ◆ setType [2/2]

void DefaultValueWidget::setType | ( | UMLObject * | type | ) |

slot

Update widget with new data type

Parameters

  type | type to set widget from

## ◆ showEvent()

void DefaultValueWidget::showEvent | ( | QShowEvent * | event | ) |

protected

Reimplemented from QWidget to control widgets visible state in case addToLayout() has been called

Parameters

  event | show event

## ◆ value()

QString DefaultValueWidget::value | ( |  | ) | const

return current text either from list box or from edit field

Returns
  current text

## Member Data Documentation

## ◆ m_d

Private* DefaultValueWidget::m_d

private

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

- umbrello/dialogs/widgets/defaultvaluewidget.h
- umbrello/dialogs/widgets/defaultvaluewidget.cpp