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 * 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
WidgetBase::WidgetType
WidgetType
Definition: widgetbase.h:111
Dialog_Utils
Definition: dialog_utils.cpp:39
Dialog_Utils::askRenameName
bool askRenameName(WidgetBase::WidgetType type, QString &name)
Definition: dialog_utils.cpp:164
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::askDeleteDiagram
bool askDeleteDiagram(const QString &name)
Definition: dialog_utils.cpp:131
Dialog_Utils::askDefaultNewName
bool askDefaultNewName(WidgetBase::WidgetType type, QString &name)
Definition: dialog_utils.cpp:179
Dialog_Utils::askNewName
bool askNewName(WidgetBase::WidgetType type, QString &name)
Definition: dialog_utils.cpp:151
Dialog_Utils::insertStereotypesSorted
void insertStereotypesSorted(KComboBox *kcb, const QString &type)
Definition: dialog_utils.cpp:231
Dialog_Utils::askName
bool askName(const QString &title, const QString &prompt, QString &name)
Definition: dialog_utils.cpp:97
Dialog_Utils::askDeleteAssociation
bool askDeleteAssociation()
Definition: dialog_utils.cpp:114
Dialog_Utils::askNameForWidget
void askNameForWidget(UMLWidget *&targetWidget, const QString &dialogTitle, const QString &dialogPrompt, const QString &defaultName)
Definition: dialog_utils.cpp:75
umlobject.h
widgetbase.h