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 * 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 int columnOffset = 0);
43
44 void askNameForWidget(UMLWidget * &targetWidget, const QString& dialogTitle,
45 const QString& dialogPrompt, const QString& defaultName);
46
47 bool askName(const QString& title, const QString& prompt, QString& name);
48
49 bool askNewName(WidgetBase::WidgetType type, QString &name);
50 bool askRenameName(WidgetBase::WidgetType type, QString &name);
51 bool askDefaultNewName(WidgetBase::WidgetType type, QString &name);
52
53 bool askNewName(UMLObject::ObjectType type, QString &name);
54 bool askRenameName(UMLObject::ObjectType type, QString &name);
55 bool askDefaultNewName(UMLObject::ObjectType type, QString &name);
56
57 void insertStereotypesSorted(KComboBox *kcb, const QString& type);
58
59 bool askDeleteAssociation();
60 bool askDeleteDiagram(const QString &name = QString());
61 }
62
63 #endif
64
UMLObject::ObjectType
ObjectType
Definition: umlobject.h:80
UMLWidget
The base class for graphical UML objects.
Definition: umlwidget.h:41
stereotype.h
Model_Utils::renameText
QString renameText(UMLObject::ObjectType type)
Definition: model_utils.cpp:706
Dialog_Utils::askNameForWidget
void askNameForWidget(UMLWidget *&targetWidget, const QString &dialogTitle, const QString &dialogPrompt, const QString &defaultName)
Definition: dialog_utils.cpp:75
Dialog_Utils::askNewName
bool askNewName(WidgetBase::WidgetType type, QString &name)
Definition: dialog_utils.cpp:151
DefineDontAskAgainItem
DefineDontAskAgainItem(allItem, QLatin1String("all"), i18n("Enable all messages"))
Dialog_Utils::askName
bool askName(const QString &title, const QString &prompt, QString &name)
Definition: dialog_utils.cpp:97
UMLDoc::stereotypes
const UMLStereotypeList & stereotypes() const
Definition: umldoc.cpp:1387
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
UMLStereotype::name
QString name(bool includeAdornments=false) const
Definition: stereotype.cpp:147
model_utils.h
Widget_Utils::defaultWidgetName
QString defaultWidgetName(WidgetBase::WidgetType type)
Definition: widget_utils.cpp:834
UMLStereotype
Sets up stereotype information.
Definition: stereotype.h:41
Widget_Utils::renameText
QString renameText(WidgetBase::WidgetType type)
Definition: widget_utils.cpp:1019
Dialog_Utils
Definition: dialog_utils.cpp:39
Widget_Utils::renameTitle
QString renameTitle(WidgetBase::WidgetType type)
Definition: widget_utils.cpp:973
Model_Utils::uniqObjectName
QString uniqObjectName(UMLObject::ObjectType type, UMLPackage *parentPkg, QString prefix)
Definition: model_utils.cpp:526
umlwidget.h
Dialog_Utils::askDeleteAssociation
bool askDeleteAssociation()
Definition: dialog_utils.cpp:114
i18n
#define i18n
Definition: main.cpp:39
Dialog_Utils::insertStereotypesSorted
void insertStereotypesSorted(KComboBox *kcb, const QString &type)
Definition: dialog_utils.cpp:231
Dialog_Utils::askDefaultNewName
bool askDefaultNewName(WidgetBase::WidgetType type, QString &name)
Definition: dialog_utils.cpp:179
types
Definition: types.py:1
Model_Utils::renameTitle
QString renameTitle(UMLObject::ObjectType type)
Definition: model_utils.cpp:663
Model_Utils::newTitle
QString newTitle(UMLObject::ObjectType type)
Definition: model_utils.cpp:577
UMLApp::app
static UMLApp * app()
Definition: uml.cpp:278
widget_utils.h
UMLDoc
Definition: umldoc.h:75
Widget_Utils::newTitle
QString newTitle(WidgetBase::WidgetType type)
Definition: widget_utils.cpp:881
widgetbase.h
uml.h
Widget_Utils::newText
QString newText(WidgetBase::WidgetType type)
Definition: widget_utils.cpp:927
debug_utils.h
WidgetBase::WidgetType
WidgetType
Definition: widgetbase.h:111
Model_Utils::newText
QString newText(UMLObject::ObjectType type)
Definition: model_utils.cpp:620
umlobject.h
dontaskagain.h
WidgetBase::setName
virtual void setName(const QString &strName)
Definition: widgetbase.cpp:322
dialog_utils.h
Dialog_Utils::askRenameName
bool askRenameName(WidgetBase::WidgetType type, QString &name)
Definition: dialog_utils.cpp:164
UMLApp::document
UMLDoc * document() const
Definition: uml.cpp:1064
umldoc.h
Dialog_Utils::askDeleteDiagram
bool askDeleteDiagram(const QString &name)
Definition: dialog_utils.cpp:131