#include <defaultvaluewidget.h>
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
◆ DefaultValueWidget()
DefaultValueWidget::DefaultValueWidget |
( |
UMLObject * |
type, |
|
|
const QString & |
value, |
|
|
QWidget * |
parent = nullptr |
|
) |
| |
|
explicit |
◆ ~DefaultValueWidget()
DefaultValueWidget::~DefaultValueWidget |
( |
| ) |
|
◆ 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
-
◆ 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
-
◆ value()
QString DefaultValueWidget::value |
( |
| ) |
const |
return current text either from list box or from edit field
- Returns
- current text
◆ m_d
The documentation for this class was generated from the following files: