umbrello  2.35.1
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 KLineEdit;
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  KLineEdit *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 
UMLClassifier * m_classifier
Definition: selectoperationdialog.h:68
QLabel * m_pCustomRB
Definition: selectoperationdialog.h:61
Information for a non-graphical Concept/Class.
Definition: classifier.h:34
void slotIndexChanged(int index)
Definition: selectoperationdialog.cpp:170
bool setClassOp(const QString &op)
Definition: selectoperationdialog.cpp:203
QLabel * m_pOpRB
Definition: selectoperationdialog.h:61
KLineEdit * m_pSeqLE
Definition: selectoperationdialog.h:60
int m_nOpCount
Definition: selectoperationdialog.h:65
void setSeqNumber(const QString &num)
Definition: selectoperationdialog.cpp:248
LinkWidget * m_widget
Definition: selectoperationdialog.h:69
Interface to FloatingTextWidget for AssociationWidget and MessageWidget.
Definition: linkwidget.h:31
Definition: umlview.h:29
void setAutoIncrementSequence(bool state)
Definition: selectoperationdialog.cpp:257
SelectOperationDialog(UMLView *parent, UMLClassifier *c, LinkWidget *widget, bool enableAutoIncrement=true)
Definition: selectoperationdialog.cpp:47
void slotAutoIncrementChecked(bool state)
Definition: selectoperationdialog.cpp:147
bool isClassOp() const
Definition: selectoperationdialog.cpp:128
UMLView * m_pView
Definition: selectoperationdialog.h:67
bool autoIncrementSequence()
Definition: selectoperationdialog.cpp:265
static const int CUSTOM
Definition: selectoperationdialog.h:55
KComboBox * m_pOpCB
Definition: selectoperationdialog.h:58
QString m_Text
Definition: selectoperationdialog.h:64
void setCustomOp(const QString &op)
Definition: selectoperationdialog.cpp:138
static const int OP
Definition: selectoperationdialog.h:54
bool apply()
Definition: selectoperationdialog.cpp:293
QLabel * m_pSeqL
Definition: selectoperationdialog.h:59
void setupDialog()
Definition: selectoperationdialog.cpp:273
Definition: singlepagedialogbase.h:29
~SelectOperationDialog()
Definition: selectoperationdialog.cpp:104
void slotNewOperation()
Definition: selectoperationdialog.cpp:157
QCheckBox * m_pOpAS
Definition: selectoperationdialog.h:63
int m_id
takes on the value OP or CUSTOM according to what the user selected
Definition: selectoperationdialog.h:66
QGroupBox * m_pOpGB
Definition: selectoperationdialog.h:57
bool m_enableAutoIncrement
Definition: selectoperationdialog.h:70
KLineEdit * m_pOpLE
Definition: selectoperationdialog.h:60
A dialog to select an operation.
Definition: selectoperationdialog.h:27
void setupOperationsList()
Definition: selectoperationdialog.cpp:218
QString getOpText()
Definition: selectoperationdialog.cpp:113
QString getSeqNumber()
Definition: selectoperationdialog.cpp:238
void slotTextChanged(const QString &text)
Definition: selectoperationdialog.cpp:185
QPushButton * m_newOperationButton
Definition: selectoperationdialog.h:62