umbrello  2.39.2
Umbrello UML Modeller is a Unified Modelling Language (UML) diagram program based on KDE Technology
selectoperationdialog.h
Go to the documentation of this file.
1 /*
2  SPDX-License-Identifier: GPL-2.0-or-later
3  SPDX-FileCopyrightText: 2002-2020 Umbrello UML Modeller Authors <umbrello-devel@kde.org>
4 */
5 
6 #ifndef SELECTOPERATIONDIALOG_H
7 #define SELECTOPERATIONDIALOG_H
8 
9 #include "singlepagedialogbase.h"
10 
11 class KComboBox;
12 class QLineEdit;
13 class QCheckBox;
14 class QGroupBox;
15 class QLabel;
16 class UMLClassifier;
17 class UMLView;
18 class LinkWidget;
19 
28 {
29  Q_OBJECT
30 public:
31  SelectOperationDialog(UMLView * parent, UMLClassifier * c, LinkWidget *widget, bool enableAutoIncrement = true);
33 
34  QString getOpText();
35 
36  bool isClassOp() const;
37 
38  QString getSeqNumber();
39 
40  bool autoIncrementSequence();
41  void setAutoIncrementSequence(bool state);
42 
43  void setSeqNumber(const QString &num);
44  void setCustomOp(const QString &op);
45  bool setClassOp(const QString &op);
46 
47  bool apply();
48 
49 protected:
50  void setupDialog();
51  void setupOperationsList();
52 
53 private:
54  static const int OP = 0;
55  static const int CUSTOM = 1;
56 
57  QGroupBox *m_pOpGB;
58  KComboBox *m_pOpCB;
59  QLabel *m_pSeqL;
60  QLineEdit *m_pOpLE, *m_pSeqLE;
61  QLabel *m_pCustomRB, *m_pOpRB;
62  QPushButton *m_newOperationButton;
63  QCheckBox *m_pOpAS;
64  QString m_Text;
66  int m_id;
71 
72 public slots:
73  void slotAutoIncrementChecked(bool state);
74  void slotNewOperation();
75  void slotIndexChanged(int index);
76  void slotTextChanged(const QString &text);
77 };
78 
79 #endif
80 
Interface to FloatingTextWidget for AssociationWidget and MessageWidget.
Definition: linkwidget.h:32
A dialog to select an operation.
Definition: selectoperationdialog.h:28
int m_id
takes on the value OP or CUSTOM according to what the user selected
Definition: selectoperationdialog.h:66
UMLClassifier * m_classifier
Definition: selectoperationdialog.h:68
bool apply()
Definition: selectoperationdialog.cpp:290
void slotIndexChanged(int index)
Definition: selectoperationdialog.cpp:167
QLabel * m_pOpRB
Definition: selectoperationdialog.h:61
QCheckBox * m_pOpAS
Definition: selectoperationdialog.h:63
QGroupBox * m_pOpGB
Definition: selectoperationdialog.h:57
bool isClassOp() const
Definition: selectoperationdialog.cpp:125
QString m_Text
Definition: selectoperationdialog.h:64
QString getOpText()
Definition: selectoperationdialog.cpp:110
bool m_enableAutoIncrement
Definition: selectoperationdialog.h:70
KComboBox * m_pOpCB
Definition: selectoperationdialog.h:58
QLabel * m_pSeqL
Definition: selectoperationdialog.h:59
QLabel * m_pCustomRB
Definition: selectoperationdialog.h:61
LinkWidget * m_widget
Definition: selectoperationdialog.h:69
static const int CUSTOM
Definition: selectoperationdialog.h:55
void slotNewOperation()
Definition: selectoperationdialog.cpp:154
SelectOperationDialog(UMLView *parent, UMLClassifier *c, LinkWidget *widget, bool enableAutoIncrement=true)
Definition: selectoperationdialog.cpp:47
void setCustomOp(const QString &op)
Definition: selectoperationdialog.cpp:135
bool autoIncrementSequence()
Definition: selectoperationdialog.cpp:262
bool setClassOp(const QString &op)
Definition: selectoperationdialog.cpp:200
UMLView * m_pView
Definition: selectoperationdialog.h:67
int m_nOpCount
Definition: selectoperationdialog.h:65
void slotTextChanged(const QString &text)
Definition: selectoperationdialog.cpp:182
void setupDialog()
Definition: selectoperationdialog.cpp:270
void setAutoIncrementSequence(bool state)
Definition: selectoperationdialog.cpp:254
void setSeqNumber(const QString &num)
Definition: selectoperationdialog.cpp:245
void slotAutoIncrementChecked(bool state)
Definition: selectoperationdialog.cpp:144
QPushButton * m_newOperationButton
Definition: selectoperationdialog.h:62
~SelectOperationDialog()
Definition: selectoperationdialog.cpp:101
void setupOperationsList()
Definition: selectoperationdialog.cpp:215
QLineEdit * m_pOpLE
Definition: selectoperationdialog.h:60
QLineEdit * m_pSeqLE
Definition: selectoperationdialog.h:60
static const int OP
Definition: selectoperationdialog.h:54
QString getSeqNumber()
Definition: selectoperationdialog.cpp:235
Definition: singlepagedialogbase.h:23
Information for a non-graphical Concept/Class.
Definition: classifier.h:35
Definition: umlview.h:30