umbrello 2.34.70-5524f40e1
Umbrello UML Modeller is a Unified Modelling Language (UML) diagram program based on KDE Technology
Functions
Dialog_Utils Namespace Reference

Functions

KLineEdit * makeLabeledEditField (QGridLayout *layout, int row, QLabel *&label, const QString &labelText, KLineEdit *&editField, const QString &editFieldText, int columnOffset)
 
void makeTagEditFields (UMLObject *o, QGridLayout *genLayout, QLabel *pTagLabel[N_STEREOATTRS], KLineEdit *pTagLineEdit[N_STEREOATTRS], int row)
 
void remakeTagEditFields (const QString &stereoText, UMLObject *, QGridLayout *genLayout, QLabel *pTagLabel[N_STEREOATTRS], KLineEdit *pTagLineEdit[N_STEREOATTRS], int row)
 
void updateTagsFromEditFields (UMLObject *o, KLineEdit *pTagLineEdit[N_STEREOATTRS])
 
void askNameForWidget (UMLWidget *&targetWidget, const QString &dialogTitle, const QString &dialogPrompt, const QString &defaultName)
 
bool askName (const QString &title, const QString &prompt, QString &name)
 
bool askDeleteAssociation ()
 
bool askDeleteDiagram (const QString &name)
 
bool askNewName (WidgetBase::WidgetType type, QString &name)
 
bool askRenameName (WidgetBase::WidgetType type, QString &name)
 
bool askDefaultNewName (WidgetBase::WidgetType type, QString &name)
 
bool askNewName (UMLObject::ObjectType type, QString &name)
 
bool askRenameName (UMLObject::ObjectType type, QString &name)
 
bool askDefaultNewName (UMLObject::ObjectType type, QString &name)
 
void insertStereotypesSorted (KComboBox *kcb, const QString &type)
 

Detailed Description

Dialog utilities.

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

Function Documentation

◆ askDefaultNewName() [1/2]

bool Dialog_Utils::askDefaultNewName ( UMLObject::ObjectType  type,
QString &  name 
)

Ask the user for a default new widget name

The name is predefined by the widgets type default name

Returns
true on user pressed okay
false on user pressed cancel
Here is the call graph for this function:

◆ askDefaultNewName() [2/2]

bool Dialog_Utils::askDefaultNewName ( WidgetBase::WidgetType  type,
QString &  name 
)

Ask the user for a default new widget name

The name is predefined by the widgets type default name

Returns
true on user pressed okay
false on user pressed cancel
Here is the call graph for this function:

◆ askDeleteAssociation()

bool Dialog_Utils::askDeleteAssociation ( )

Ask the user for permission to delete an association.

Returns
true - user want to continue
false - user want to cancel
Here is the call graph for this function:

◆ askDeleteDiagram()

bool Dialog_Utils::askDeleteDiagram ( const QString &  name)

Ask the user for permission to delete a diagram.

Returns
true - user want to continue
false - user want to cancel
Here is the call graph for this function:

◆ askName()

bool Dialog_Utils::askName ( const QString &  title,
const QString &  prompt,
QString &  name 
)

Helper function for requesting a name using a dialog.

Parameters
titleTitle of the dialog.
promptPrompt of the dialog.
nameDefault value of the name field.
Returns
true on user pressed okay
false on user pressed cancel
Here is the call graph for this function:

◆ askNameForWidget()

void Dialog_Utils::askNameForWidget ( UMLWidget *&  targetWidget,
const QString &  dialogTitle,
const QString &  dialogPrompt,
const QString &  defaultName 
)

Helper function for requesting a name for a UMLWidget using a dialog.

Parameters
targetWidgetBy-reference pointer to the widget to request the name for. The widget may be deallocated, and the pointer returned set to 0, if the user presses Cancel in the dialog.
dialogTitleTitle of the dialog.
dialogPromptPrompt of the dialog.
defaultNameDefault value of the name field.
Here is the call graph for this function:

◆ askNewName() [1/2]

bool Dialog_Utils::askNewName ( UMLObject::ObjectType  type,
QString &  name 
)

Ask the user for a new object name

Returns
true on user pressed okay
false on user pressed cancel
Here is the call graph for this function:

◆ askNewName() [2/2]

bool Dialog_Utils::askNewName ( WidgetBase::WidgetType  type,
QString &  name 
)

Ask the user for a new widget name

Returns
true on user pressed okay
false on user pressed cancel
Here is the call graph for this function:

◆ askRenameName() [1/2]

bool Dialog_Utils::askRenameName ( UMLObject::ObjectType  type,
QString &  name 
)

Ask the user for renaming a widget name

Returns
true on user pressed okay
false on user pressed cancel
Here is the call graph for this function:

◆ askRenameName() [2/2]

bool Dialog_Utils::askRenameName ( WidgetBase::WidgetType  type,
QString &  name 
)

Ask the user for renaming a widget name

Returns
true on user pressed okay
false on user pressed cancel
Here is the call graph for this function:

◆ insertStereotypesSorted()

void Dialog_Utils::insertStereotypesSorted ( KComboBox *  kcb,
const QString &  type 
)

Helper function for inserting available stereotypes into a KComboBox

Parameters
kcbThe KComboBox into which to insert the stereotypes
typeThe stereotype to activate
Here is the call graph for this function:

◆ makeLabeledEditField()

KLineEdit * Dialog_Utils::makeLabeledEditField ( QGridLayout *  layout,
int  row,
QLabel *&  label,
const QString &  labelText,
KLineEdit *&  editField,
const QString &  editFieldText,
int  columnOffset 
)

Create a labeled text lineedit widget.

Parameters
layoutThe QGridLayout to use.
rowThe row number within the QGridLayout.
labelThe QLabel object allocated (return value)
labelTextThe label text.
editFieldThe KLineEdit object allocated (return value)
editFieldTextInitialization text in the editField (optional.)
columnOffsetOptional column number within the QGridLayout (default: 0)
Returns
a pointer to the KLineEdit so you can setFocus() if necessary

◆ makeTagEditFields()

void Dialog_Utils::makeTagEditFields ( UMLObject o,
QGridLayout *  genLayout,
QLabel *  pTagLabel[N_STEREOATTRS],
KLineEdit *  pTagLineEdit[N_STEREOATTRS],
int  row 
)

Make labeled edit fields for stereotype tags. The label/line-edit pairs are arranged horizontally on the same row. The label texts are taken from the AttributeDefs of the object's UMLStereotype.

Here is the call graph for this function:

◆ remakeTagEditFields()

void Dialog_Utils::remakeTagEditFields ( const QString &  stereoText,
UMLObject ,
QGridLayout *  genLayout,
QLabel *  pTagLabel[N_STEREOATTRS],
KLineEdit *  pTagLineEdit[N_STEREOATTRS],
int  row 
)

Remake labeled edit fields for stereotype tags. "Remake" means that the existing label/line-edit pairs are deleted and new ones are created afresh. This is useful when the object's stereotype has changed. The label/line-edit pairs are arranged horizontally on the same row. The label texts are taken from the AttributeDefs of the object's UMLStereotype.

Here is the call graph for this function:

◆ updateTagsFromEditFields()

void Dialog_Utils::updateTagsFromEditFields ( UMLObject o,
KLineEdit *  pTagLineEdit[N_STEREOATTRS] 
)

Update the stereotype tag values of the given UMLObject from the corresponding values in the given array of KLineEdit widgets. This is useful as the action in the slot method when the Apply or OK button is pressed.

Here is the call graph for this function: