umbrello  2.32.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  * 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) 2002-2020 *
8  * Umbrello UML Modeller Authors <umbrello-devel@kde.org> *
9  ***************************************************************************/
10 
11 #ifndef SELECTOPERATIONDIALOG_H
12 #define SELECTOPERATIONDIALOG_H
13 
14 #include "singlepagedialogbase.h"
15 
16 class KComboBox;
17 class KLineEdit;
18 class QCheckBox;
19 class QGroupBox;
20 class QLabel;
21 class UMLClassifier;
22 class UMLView;
23 class LinkWidget;
24 
33 {
34  Q_OBJECT
35 public:
36  SelectOperationDialog(UMLView * parent, UMLClassifier * c, LinkWidget *widget, bool enableAutoIncrement = true);
38 
39  QString getOpText();
40 
41  bool isClassOp() const;
42 
43  QString getSeqNumber();
44 
45  bool autoIncrementSequence();
46  void setAutoIncrementSequence(bool state);
47 
48  void setSeqNumber(const QString &num);
49  void setCustomOp(const QString &op);
50  bool setClassOp(const QString &op);
51 
52  bool apply();
53 
54 protected:
55  void setupDialog();
56  void setupOperationsList();
57 
58 private:
59  static const int OP = 0;
60  static const int CUSTOM = 1;
61 
62  QGroupBox *m_pOpGB;
63  KComboBox *m_pOpCB;
64  QLabel *m_pSeqL;
65  KLineEdit *m_pOpLE, *m_pSeqLE;
66  QLabel *m_pCustomRB, *m_pOpRB;
67  QPushButton *m_newOperationButton;
68  QCheckBox *m_pOpAS;
69  QString m_Text;
71  int m_id;
76 
77 public slots:
78  void slotAutoIncrementChecked(bool state);
79  void slotNewOperation();
80  void slotIndexChanged(int index);
81  void slotTextChanged(const QString &text);
82 };
83 
84 #endif
85 
Interface to FloatingTextWidget for AssociationWidget and MessageWidget.
Definition: linkwidget.h:37
A dialog to select an operation.
Definition: selectoperationdialog.h:33
int m_id
takes on the value OP or CUSTOM according to what the user selected
Definition: selectoperationdialog.h:71
UMLClassifier * m_classifier
Definition: selectoperationdialog.h:73
bool apply()
Definition: selectoperationdialog.cpp:296
void slotIndexChanged(int index)
Definition: selectoperationdialog.cpp:173
QLabel * m_pOpRB
Definition: selectoperationdialog.h:66
QCheckBox * m_pOpAS
Definition: selectoperationdialog.h:68
QGroupBox * m_pOpGB
Definition: selectoperationdialog.h:62
bool isClassOp() const
Definition: selectoperationdialog.cpp:132
QString m_Text
Definition: selectoperationdialog.h:69
QString getOpText()
Definition: selectoperationdialog.cpp:117
bool m_enableAutoIncrement
Definition: selectoperationdialog.h:75
KComboBox * m_pOpCB
Definition: selectoperationdialog.h:63
QLabel * m_pSeqL
Definition: selectoperationdialog.h:64
QLabel * m_pCustomRB
Definition: selectoperationdialog.h:66
LinkWidget * m_widget
Definition: selectoperationdialog.h:74
static const int CUSTOM
Definition: selectoperationdialog.h:60
void slotNewOperation()
Definition: selectoperationdialog.cpp:160
SelectOperationDialog(UMLView *parent, UMLClassifier *c, LinkWidget *widget, bool enableAutoIncrement=true)
Definition: selectoperationdialog.cpp:51
void setCustomOp(const QString &op)
Definition: selectoperationdialog.cpp:142
bool autoIncrementSequence()
Definition: selectoperationdialog.cpp:268
bool setClassOp(const QString &op)
Definition: selectoperationdialog.cpp:206
UMLView * m_pView
Definition: selectoperationdialog.h:72
int m_nOpCount
Definition: selectoperationdialog.h:70
KLineEdit * m_pSeqLE
Definition: selectoperationdialog.h:65
void slotTextChanged(const QString &text)
Definition: selectoperationdialog.cpp:188
void setupDialog()
Definition: selectoperationdialog.cpp:276
void setAutoIncrementSequence(bool state)
Definition: selectoperationdialog.cpp:260
void setSeqNumber(const QString &num)
Definition: selectoperationdialog.cpp:251
void slotAutoIncrementChecked(bool state)
Definition: selectoperationdialog.cpp:151
QPushButton * m_newOperationButton
Definition: selectoperationdialog.h:67
KLineEdit * m_pOpLE
Definition: selectoperationdialog.h:65
~SelectOperationDialog()
Definition: selectoperationdialog.cpp:108
void setupOperationsList()
Definition: selectoperationdialog.cpp:221
static const int OP
Definition: selectoperationdialog.h:59
QString getSeqNumber()
Definition: selectoperationdialog.cpp:241
Definition: singlepagedialogbase.h:36
Information for a non-graphical Concept/Class.
Definition: classifier.h:40
Definition: umlview.h:35