umbrello 26.03.70-1a62d36 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
16 class QGridLayout;
17 class QLabel;
18 class UMLWidget;
19 class QLineEdit;
20 class KComboBox;
21
27 namespace 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
35 void makeTagEditFields(UMLObject * o, QGridLayout * genLayout,
36 QLabel * pTagLabel[N_STEREOATTRS],
37 QLineEdit *pTagLineEdit[N_STEREOATTRS],
38 int row = 1);
39
40 void remakeTagEditFields(const QString &stereoText,
41 UMLObject * o, QGridLayout * genLayout,
42 QLabel * pTagLabel[N_STEREOATTRS],
43 QLineEdit * pTagLineEdit[N_STEREOATTRS],
44 int row = 1);
45
46 void updateTagsFromEditFields(UMLObject * o,
47 QLineEdit *pTagLineEdit[N_STEREOATTRS]);
48
49 void askNameForWidget(UMLWidget * &targetWidget, const QString& dialogTitle,
50 const QString& dialogPrompt, const QString& defaultName);
51
52 bool askName(const QString& title, const QString& prompt, QString& name);
53
54 bool askNewName(WidgetBase::WidgetType type, QString &name);
55 bool askRenameName(WidgetBase::WidgetType type, QString &name);
56 bool askDefaultNewName(WidgetBase::WidgetType type, QString &name);
57
58 bool askNewName(UMLObject::ObjectType type, QString &name);
59 bool askRenameName(UMLObject::ObjectType type, QString &name);
60 bool askDefaultNewName(UMLObject::ObjectType type, QString &name);
61
62 void insertStereotypesSorted(KComboBox *kcb, const QString& type);
63
64 bool askDeleteAssociation();
65 bool askDeleteDiagram(const QString &name = QString());
66
67 int spacingHint();
68
69qreal logicalDpiXForWidget(const QWidget *widget = nullptr);
70QSize screenSizeForWidget(QWidget* widget = nullptr);
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:40
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:54
Dialog_Utils::askRenameName
bool askRenameName(WidgetBase::WidgetType type, QString &name)
Definition: dialog_utils.cpp:261
Dialog_Utils::makeTagEditFields
void makeTagEditFields(UMLObject *o, QGridLayout *genLayout, QLabel *pTagLabel[N_STEREOATTRS], QLineEdit *pTagLineEdit[N_STEREOATTRS], int row)
Definition: dialog_utils.cpp:73
Dialog_Utils::askDeleteDiagram
bool askDeleteDiagram(const QString &name)
Definition: dialog_utils.cpp:228
Dialog_Utils::askDefaultNewName
bool askDefaultNewName(WidgetBase::WidgetType type, QString &name)
Definition: dialog_utils.cpp:276
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:105
Dialog_Utils::updateTagsFromEditFields
void updateTagsFromEditFields(UMLObject *o, QLineEdit *pTagLineEdit[N_STEREOATTRS])
Definition: dialog_utils.cpp:145
Dialog_Utils::askNewName
bool askNewName(WidgetBase::WidgetType type, QString &name)
Definition: dialog_utils.cpp:248
Dialog_Utils::insertStereotypesSorted
void insertStereotypesSorted(KComboBox *kcb, const QString &type)
Definition: dialog_utils.cpp:328
Dialog_Utils::askName
bool askName(const QString &title, const QString &prompt, QString &name)
Definition: dialog_utils.cpp:197
Dialog_Utils::askDeleteAssociation
bool askDeleteAssociation()
Definition: dialog_utils.cpp:211
Dialog_Utils::spacingHint
int spacingHint()
Definition: dialog_utils.cpp:358
Dialog_Utils::screenSizeForWidget
QSize screenSizeForWidget(QWidget *widget)
Definition: dialog_utils.cpp:380
Dialog_Utils::logicalDpiXForWidget
qreal logicalDpiXForWidget(const QWidget *widget)
Definition: dialog_utils.cpp:363
Dialog_Utils::askNameForWidget
void askNameForWidget(UMLWidget *&targetWidget, const QString &dialogTitle, const QString &dialogPrompt, const QString &defaultName)
Definition: dialog_utils.cpp:175
umlobject.h
widgetbase.h