umbrello: umbrello/dialogs/dialog_utils.h Source File

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

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

- File List
- File Members

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#include <QInputDialog>
15
16class QGridLayout;
17class QLabel;
18class UMLWidget;
19class QLineEdit;
20class KComboBox;
21
27namespace Dialog_Utils {
28
29QLineEdit* makeLabeledEditField(QGridLayout *layout, int row,
30 QLabel * &label, const QString& labelText,
31 QLineEdit * &editField,
32 const QString& editFieldText = QString(),
33 int columnOffset = 0);
34
35void makeTagEditFields(UMLObject * o, QGridLayout * genLayout,
36 QLabel * pTagLabel[N_STEREOATTRS],
37 QLineEdit *pTagLineEdit[N_STEREOATTRS],
38 int row = 1);
39
40void remakeTagEditFields(const QString &stereoText,
41 UMLObject * o, QGridLayout * genLayout,
42 QLabel * pTagLabel[N_STEREOATTRS],
43 QLineEdit * pTagLineEdit[N_STEREOATTRS],
44 int row = 1);
45
46void updateTagsFromEditFields(UMLObject * o,
47 QLineEdit *pTagLineEdit[N_STEREOATTRS]);
48
49void askNameForWidget(UMLWidget * &targetWidget, const QString& dialogTitle,
50 const QString& dialogPrompt, const QString& defaultName);
51
52bool askName(const QString& title, const QString& prompt, QString& name);
53
54bool askNewName(WidgetBase::WidgetType type, QString &name);
55bool askRenameName(WidgetBase::WidgetType type, QString &name);
56bool askDefaultNewName(WidgetBase::WidgetType type, QString &name);
57
58bool askNewName(UMLObject::ObjectType type, QString &name);
59bool askRenameName(UMLObject::ObjectType type, QString &name);
60bool askDefaultNewName(UMLObject::ObjectType type, QString &name);
61
62void insertStereotypesSorted(KComboBox *kcb, const QString& type);
63
64bool askDeleteAssociation();
65bool askDeleteDiagram(const QString &name = QString());
66
67int spacingHint();
68}
69
70#endif
71
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:35
Dialog_Utils::makeLabeledEditField
QLineEdit * makeLabeledEditField(QGridLayout *layout, int row, QLabel *&label, const QString &labelText, QLineEdit *&editField, const QString &editFieldText, int columnOffset)
Definition: dialog_utils.cpp:49
Dialog_Utils::askRenameName
bool askRenameName(WidgetBase::WidgetType type, QString &name)
Definition: dialog_utils.cpp:256
Dialog_Utils::makeTagEditFields
void makeTagEditFields(UMLObject *o, QGridLayout *genLayout, QLabel *pTagLabel[N_STEREOATTRS], QLineEdit *pTagLineEdit[N_STEREOATTRS], int row)
Definition: dialog_utils.cpp:68
Dialog_Utils::askDeleteDiagram
bool askDeleteDiagram(const QString &name)
Definition: dialog_utils.cpp:223
Dialog_Utils::askDefaultNewName
bool askDefaultNewName(WidgetBase::WidgetType type, QString &name)
Definition: dialog_utils.cpp:271
Dialog_Utils::remakeTagEditFields
void remakeTagEditFields(const QString &stereoText, UMLObject *, QGridLayout *genLayout, QLabel *pTagLabel[N_STEREOATTRS], QLineEdit *pTagLineEdit[N_STEREOATTRS], int row)
Definition: dialog_utils.cpp:100
Dialog_Utils::updateTagsFromEditFields
void updateTagsFromEditFields(UMLObject *o, QLineEdit *pTagLineEdit[N_STEREOATTRS])
Definition: dialog_utils.cpp:140
Dialog_Utils::askNewName
bool askNewName(WidgetBase::WidgetType type, QString &name)
Definition: dialog_utils.cpp:243
Dialog_Utils::insertStereotypesSorted
void insertStereotypesSorted(KComboBox *kcb, const QString &type)
Definition: dialog_utils.cpp:323
Dialog_Utils::askName
bool askName(const QString &title, const QString &prompt, QString &name)
Definition: dialog_utils.cpp:192
Dialog_Utils::askDeleteAssociation
bool askDeleteAssociation()
Definition: dialog_utils.cpp:206
Dialog_Utils::spacingHint
int spacingHint()
Definition: dialog_utils.cpp:353
Dialog_Utils::askNameForWidget
void askNameForWidget(UMLWidget *&targetWidget, const QString &dialogTitle, const QString &dialogPrompt, const QString &defaultName)
Definition: dialog_utils.cpp:170
umlobject.h
widgetbase.h