umbrello: umbrello/dialogs/dialog_utils.h Source File

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
21class QGridLayout;
22class QLabel;
23class UMLWidget;
24class KLineEdit;
25class KComboBox;
26
32namespace 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
40void makeTagEditFields(UMLObject * o, QGridLayout * genLayout,
41 QLabel * pTagLabel[N_STEREOATTRS],
42 KLineEdit *pTagLineEdit[N_STEREOATTRS],
43 int row = 1);
44
45void remakeTagEditFields(const QString &stereoText,
46 UMLObject * o, QGridLayout * genLayout,
47 QLabel * pTagLabel[N_STEREOATTRS],
48 KLineEdit * pTagLineEdit[N_STEREOATTRS],
49 int row = 1);
50
51void updateTagsFromEditFields(UMLObject * o,
52 KLineEdit *pTagLineEdit[N_STEREOATTRS]);
53
54void askNameForWidget(UMLWidget * &targetWidget, const QString& dialogTitle,
55 const QString& dialogPrompt, const QString& defaultName);
56
57bool askName(const QString& title, const QString& prompt, QString& name);
58
59bool askNewName(WidgetBase::WidgetType type, QString &name);
60bool askRenameName(WidgetBase::WidgetType type, QString &name);
61bool askDefaultNewName(WidgetBase::WidgetType type, QString &name);
62
63bool askNewName(UMLObject::ObjectType type, QString &name);
64bool askRenameName(UMLObject::ObjectType type, QString &name);
65bool askDefaultNewName(UMLObject::ObjectType type, QString &name);
66
67void insertStereotypesSorted(KComboBox *kcb, const QString& type);
68
69bool askDeleteAssociation();
70bool 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::askNewName
bool askNewName(WidgetBase::WidgetType type, QString &name)
Definition: dialog_utils.cpp:244
Dialog_Utils::remakeTagEditFields
void remakeTagEditFields(const QString &stereoText, UMLObject *, QGridLayout *genLayout, QLabel *pTagLabel[N_STEREOATTRS], KLineEdit *pTagLineEdit[N_STEREOATTRS], int row)
Definition: dialog_utils.cpp:98
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