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

dialog_utils.h
Go to the documentation of this file.
1/*
2 SPDX-License-Identifier: GPL-2.0-or-later
3 SPDX-FileCopyrightText: 2004-2020 Umbrello UML Modeller Authors <umbrello-devel@kde.org>
4*/
5
6#ifndef DIALOG_UTILS_H
7#define DIALOG_UTILS_H
8
9#include "umlobject.h"
10#include "widgetbase.h"
11#include "n_stereoattrs.h"
12
13#include <QString>
14
15#if QT_VERSION < 0x050000
16#include <kinputdialog.h>
17#else
18#include <QInputDialog>
19#endif
20
21 class QGridLayout;
22 class QLabel;
23 class UMLWidget;
24 class KLineEdit;
25 class KComboBox;
26
32 namespace Dialog_Utils {
33
34KLineEdit* makeLabeledEditField(QGridLayout *layout, int row,
35 QLabel * &label, const QString& labelText,
36 KLineEdit * &editField,
37 const QString& editFieldText = QString(),
38 int columnOffset = 0);
39
40 void makeTagEditFields(UMLObject * o, QGridLayout * genLayout,
41 QLabel * pTagLabel[N_STEREOATTRS],
42 KLineEdit *pTagLineEdit[N_STEREOATTRS],
43 int row = 1);
44
45 void remakeTagEditFields(const QString &stereoText,
46 UMLObject * o, QGridLayout * genLayout,
47 QLabel * pTagLabel[N_STEREOATTRS],
48 KLineEdit * pTagLineEdit[N_STEREOATTRS],
49 int row = 1);
50
51 void updateTagsFromEditFields(UMLObject * o,
52 KLineEdit *pTagLineEdit[N_STEREOATTRS]);
53
54 void askNameForWidget(UMLWidget * &targetWidget, const QString& dialogTitle,
55 const QString& dialogPrompt, const QString& defaultName);
56
57 bool askName(const QString& title, const QString& prompt, QString& name);
58
59 bool askNewName(WidgetBase::WidgetType type, QString &name);
60 bool askRenameName(WidgetBase::WidgetType type, QString &name);
61 bool askDefaultNewName(WidgetBase::WidgetType type, QString &name);
62
63 bool askNewName(UMLObject::ObjectType type, QString &name);
64 bool askRenameName(UMLObject::ObjectType type, QString &name);
65 bool askDefaultNewName(UMLObject::ObjectType type, QString &name);
66
67 void insertStereotypesSorted(KComboBox *kcb, const QString& type);
68
69 bool askDeleteAssociation();
70 bool askDeleteDiagram(const QString &name = QString());
71}
72
73#endif
74
UMLObject
The base class for UML objects.
Definition: umlobject.h:70
UMLObject::ObjectType
ObjectType
Definition: umlobject.h:76
UMLWidget
The base class for graphical UML objects.
Definition: umlwidget.h:36
WidgetBase::WidgetType
WidgetType
Definition: widgetbase.h:107
n_stereoattrs.h
N_STEREOATTRS
#define N_STEREOATTRS
Definition: n_stereoattrs.h:11
Dialog_Utils
Definition: dialog_utils.cpp:34
Dialog_Utils::updateTagsFromEditFields
void updateTagsFromEditFields(UMLObject *o, KLineEdit *pTagLineEdit[N_STEREOATTRS])
Definition: dialog_utils.cpp:138
Dialog_Utils::askRenameName
bool askRenameName(WidgetBase::WidgetType type, QString &name)
Definition: dialog_utils.cpp:257
Dialog_Utils::makeLabeledEditField
KLineEdit * makeLabeledEditField(QGridLayout *layout, int row, QLabel *&label, const QString &labelText, KLineEdit *&editField, const QString &editFieldText, int columnOffset)
Definition: dialog_utils.cpp:47
Dialog_Utils::makeTagEditFields
void makeTagEditFields(UMLObject *o, QGridLayout *genLayout, QLabel *pTagLabel[N_STEREOATTRS], KLineEdit *pTagLineEdit[N_STEREOATTRS], int row)
Definition: dialog_utils.cpp:66
Dialog_Utils::askDeleteDiagram
bool askDeleteDiagram(const QString &name)
Definition: dialog_utils.cpp:224
Dialog_Utils::askDefaultNewName
bool askDefaultNewName(WidgetBase::WidgetType type, QString &name)
Definition: dialog_utils.cpp:272
Dialog_Utils::remakeTagEditFields
void remakeTagEditFields(const QString &stereoText, UMLObject *o, QGridLayout *genLayout, QLabel *pTagLabel[N_STEREOATTRS], KLineEdit *pTagLineEdit[N_STEREOATTRS], int row)
Definition: dialog_utils.cpp:98
Dialog_Utils::askNewName
bool askNewName(WidgetBase::WidgetType type, QString &name)
Definition: dialog_utils.cpp:244
Dialog_Utils::insertStereotypesSorted
void insertStereotypesSorted(KComboBox *kcb, const QString &type)
Definition: dialog_utils.cpp:324
Dialog_Utils::askName
bool askName(const QString &title, const QString &prompt, QString &name)
Definition: dialog_utils.cpp:190
Dialog_Utils::askDeleteAssociation
bool askDeleteAssociation()
Definition: dialog_utils.cpp:207
Dialog_Utils::askNameForWidget
void askNameForWidget(UMLWidget *&targetWidget, const QString &dialogTitle, const QString &dialogPrompt, const QString &defaultName)
Definition: dialog_utils.cpp:168
umlobject.h
widgetbase.h