umbrello: umbrello/dialogs/dialog_utils.h Source File

umbrello 2.32.1 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 * This program is free software; you can redistribute it and/or modify *
3 * it under the terms of the GNU General Public License as published by *
4 * the Free Software Foundation; either version 2 of the License, or *
5 * (at your option) any later version. *
6 * *
7 * copyright (C) 2004-2020 *
8 * Umbrello UML Modeller Authors <umbrello-devel@kde.org> *
9 ***************************************************************************/
10
11 #ifndef DIALOG_UTILS_H
12 #define DIALOG_UTILS_H
13
14 #include "umlobject.h"
15 #include "widgetbase.h"
16 #include "n_stereoattrs.h"
17
18 #include <QString>
19
20 #if QT_VERSION < 0x050000
21 #include <kinputdialog.h>
22 #else
23 #include <QInputDialog>
24 #endif
25
26 class QGridLayout;
27 class QLabel;
28 class UMLWidget;
29 class KLineEdit;
30 class KComboBox;
31
37 namespace Dialog_Utils {
38
39 KLineEdit* makeLabeledEditField(QGridLayout *layout, int row,
40 QLabel * &label, const QString& labelText,
41 KLineEdit * &editField,
42 const QString& editFieldText = QString(),
43 int columnOffset = 0);
44
45 void makeTagEditFields(UMLObject * o, QGridLayout * genLayout,
46 QLabel * pTagLabel[N_STEREOATTRS],
47 KLineEdit *pTagLineEdit[N_STEREOATTRS],
48 int row = 1);
49
50 void remakeTagEditFields(const QString &stereoText,
51 UMLObject * o, QGridLayout * genLayout,
52 QLabel * pTagLabel[N_STEREOATTRS],
53 KLineEdit * pTagLineEdit[N_STEREOATTRS],
54 int row = 1);
55
56 void updateTagsFromEditFields(UMLObject * o,
57 KLineEdit *pTagLineEdit[N_STEREOATTRS]);
58
59 void askNameForWidget(UMLWidget * &targetWidget, const QString& dialogTitle,
60 const QString& dialogPrompt, const QString& defaultName);
61
62 bool askName(const QString& title, const QString& prompt, QString& name);
63
64 bool askNewName(WidgetBase::WidgetType type, QString &name);
65 bool askRenameName(WidgetBase::WidgetType type, QString &name);
66 bool askDefaultNewName(WidgetBase::WidgetType type, QString &name);
67
68 bool askNewName(UMLObject::ObjectType type, QString &name);
69 bool askRenameName(UMLObject::ObjectType type, QString &name);
70 bool askDefaultNewName(UMLObject::ObjectType type, QString &name);
71
72 void insertStereotypesSorted(KComboBox *kcb, const QString& type);
73
74 bool askDeleteAssociation();
75 bool askDeleteDiagram(const QString &name = QString());
76 }
77
78 #endif
79
UMLObject
The base class for UML objects.
Definition: umlobject.h:75
UMLObject::ObjectType
ObjectType
Definition: umlobject.h:81
UMLWidget
The base class for graphical UML objects.
Definition: umlwidget.h:41
WidgetBase::WidgetType
WidgetType
Definition: widgetbase.h:112
n_stereoattrs.h
N_STEREOATTRS
#define N_STEREOATTRS
Definition: n_stereoattrs.h:15
Dialog_Utils
Definition: dialog_utils.cpp:39
Dialog_Utils::updateTagsFromEditFields
void updateTagsFromEditFields(UMLObject *o, KLineEdit *pTagLineEdit[N_STEREOATTRS])
Definition: dialog_utils.cpp:143
Dialog_Utils::askRenameName
bool askRenameName(WidgetBase::WidgetType type, QString &name)
Definition: dialog_utils.cpp:262
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:52
Dialog_Utils::makeTagEditFields
void makeTagEditFields(UMLObject *o, QGridLayout *genLayout, QLabel *pTagLabel[N_STEREOATTRS], KLineEdit *pTagLineEdit[N_STEREOATTRS], int row)
Definition: dialog_utils.cpp:71
Dialog_Utils::askDeleteDiagram
bool askDeleteDiagram(const QString &name)
Definition: dialog_utils.cpp:229
Dialog_Utils::askDefaultNewName
bool askDefaultNewName(WidgetBase::WidgetType type, QString &name)
Definition: dialog_utils.cpp:277
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:103
Dialog_Utils::askNewName
bool askNewName(WidgetBase::WidgetType type, QString &name)
Definition: dialog_utils.cpp:249
Dialog_Utils::insertStereotypesSorted
void insertStereotypesSorted(KComboBox *kcb, const QString &type)
Definition: dialog_utils.cpp:329
Dialog_Utils::askName
bool askName(const QString &title, const QString &prompt, QString &name)
Definition: dialog_utils.cpp:195
Dialog_Utils::askDeleteAssociation
bool askDeleteAssociation()
Definition: dialog_utils.cpp:212
Dialog_Utils::askNameForWidget
void askNameForWidget(UMLWidget *&targetWidget, const QString &dialogTitle, const QString &dialogPrompt, const QString &defaultName)
Definition: dialog_utils.cpp:173
umlobject.h
widgetbase.h