umbrello  2.32.3
Umbrello UML Modeller is a Unified Modelling Language (UML) diagram program based on KDE Technology
defaultvaluewidget.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) 2018-2020 *
8  * Umbrello UML Modeller Authors <umbrello-devel@kde.org> *
9  ***************************************************************************/
10 
11 #ifndef DEFAULTVALUEWIDGET_H
12 #define DEFAULTVALUEWIDGET_H
13 
14 #include <QWidget>
15 
16 class UMLObject;
17 
18 class QGridLayout;
19 class QString;
20 
30 class DefaultValueWidget : public QWidget
31 {
32  Q_OBJECT
33 public:
34  explicit DefaultValueWidget(UMLObject *type, const QString &value, QWidget *parent = nullptr);
36 
37  void addToLayout(QGridLayout *layout, int row);
38 
39  QString value() const;
40 
41 public slots:
42  void setType(UMLObject *type);
43  void setType(const QString &type);
44 
45 protected:
46  void showEvent(QShowEvent *event);
47  void hideEvent(QHideEvent *event);
48 
49 private:
50  class Private;
52 };
53 
54 #endif // DEFAULTVALUEWIDGET_H
Definition: defaultvaluewidget.cpp:25
Definition: defaultvaluewidget.h:31
QString value() const
Definition: defaultvaluewidget.cpp:164
void hideEvent(QHideEvent *event)
Definition: defaultvaluewidget.cpp:187
~DefaultValueWidget()
Definition: defaultvaluewidget.cpp:113
void addToLayout(QGridLayout *layout, int row)
Definition: defaultvaluewidget.cpp:153
Private * m_d
Definition: defaultvaluewidget.h:50
void showEvent(QShowEvent *event)
Definition: defaultvaluewidget.cpp:175
DefaultValueWidget(UMLObject *type, const QString &value, QWidget *parent=nullptr)
Definition: defaultvaluewidget.cpp:107
void setType(UMLObject *type)
Definition: defaultvaluewidget.cpp:123
The base class for UML objects.
Definition: umlobject.h:75