umbrello  2.32.0
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 
17 #include <QString>
18 
19 #if QT_VERSION < 0x050000
20 #include <kinputdialog.h>
21 #else
22 #include <QInputDialog>
23 #endif
24 
25 class QGridLayout;
26 class QLabel;
27 class UMLWidget;
28 class KLineEdit;
29 class KComboBox;
30 
36 namespace Dialog_Utils {
37 
38 KLineEdit* makeLabeledEditField(QGridLayout *layout, int row,
39  QLabel * &label, const QString& labelText,
40  KLineEdit * &editField,
41  const QString& editFieldText = QString());
42 
43 void askNameForWidget(UMLWidget * &targetWidget, const QString& dialogTitle,
44  const QString& dialogPrompt, const QString& defaultName);
45 
46 bool askName(const QString& title, const QString& prompt, QString& name);
47 
48 bool askNewName(WidgetBase::WidgetType type, QString &name);
49 bool askRenameName(WidgetBase::WidgetType type, QString &name);
50 bool askDefaultNewName(WidgetBase::WidgetType type, QString &name);
51 
52 bool askNewName(UMLObject::ObjectType type, QString &name);
53 bool askRenameName(UMLObject::ObjectType type, QString &name);
54 bool askDefaultNewName(UMLObject::ObjectType type, QString &name);
55 
56 void insertStereotypesSorted(KComboBox *kcb, const QString& type);
57 
59 bool askDeleteDiagram(const QString &name = QString());
60 }
61 
62 #endif
63 
bool askDeleteDiagram(const QString &name)
Definition: dialog_utils.cpp:130
void askNameForWidget(UMLWidget *&targetWidget, const QString &dialogTitle, const QString &dialogPrompt, const QString &defaultName)
Definition: dialog_utils.cpp:74
bool askNewName(WidgetBase::WidgetType type, QString &name)
Definition: dialog_utils.cpp:150
WidgetType
Definition: widgetbase.h:110
bool askName(const QString &title, const QString &prompt, QString &name)
Definition: dialog_utils.cpp:96
bool askDeleteAssociation()
Definition: dialog_utils.cpp:113
void insertStereotypesSorted(KComboBox *kcb, const QString &type)
Definition: dialog_utils.cpp:230
Definition: dialog_utils.cpp:39
bool askDefaultNewName(WidgetBase::WidgetType type, QString &name)
Definition: dialog_utils.cpp:178
KLineEdit * makeLabeledEditField(QGridLayout *layout, int row, QLabel *&label, const QString &labelText, KLineEdit *&editField, const QString &editFieldText)
Definition: dialog_utils.cpp:52
ObjectType
Definition: umlobject.h:79
bool askRenameName(WidgetBase::WidgetType type, QString &name)
Definition: dialog_utils.cpp:163
The base class for graphical UML objects.
Definition: umlwidget.h:40