umbrello  2.38.5
Umbrello UML Modeller is a Unified Modelling Language (UML) diagram program based on KDE Technology
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:
Collaboration 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

Privatem_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 ( UMLObject type,
const QString &  value,
QWidget *  parent = nullptr 
)
explicit
DefaultValueWidget::~DefaultValueWidget ( )

Member Function Documentation

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
layoutThe layout to which the widget should be added
rowThe row in the grid layout where the widget should be placed
void DefaultValueWidget::hideEvent ( QHideEvent *  event)
protected

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

Parameters
eventhide event

Here is the call graph for this function:

void DefaultValueWidget::setType ( UMLObject type)
slot

Update widget with new data type

Parameters
typetype to set widget from

Here is the call graph for this function:

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
_typetype as text to set the widget from

Here is the call graph for this function:

void DefaultValueWidget::showEvent ( QShowEvent *  event)
protected

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

Parameters
eventshow event

Here is the call graph for this function:

QString DefaultValueWidget::value ( ) const

return current text either from list box or from edit field

Returns
current text

Here is the call graph for this function:

Member Data Documentation

Private* DefaultValueWidget::m_d
private

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