umbrello  2.31.70
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 
UMLClassifier * m_classifier
Definition: selectoperationdialog.h:73
QLabel * m_pCustomRB
Definition: selectoperationdialog.h:66
Information for a non-graphical Concept/Class.
Definition: classifier.h:39
void slotIndexChanged(int index)
Definition: selectoperationdialog.cpp:173
bool setClassOp(const QString &op)
Definition: selectoperationdialog.cpp:206
QLabel * m_pOpRB
Definition: selectoperationdialog.h:66
KLineEdit * m_pSeqLE
Definition: selectoperationdialog.h:65
int m_nOpCount
Definition: selectoperationdialog.h:70
void setSeqNumber(const QString &num)
Definition: selectoperationdialog.cpp:251
LinkWidget * m_widget
Definition: selectoperationdialog.h:74
Interface to FloatingTextWidget for AssociationWidget and MessageWidget.
Definition: linkwidget.h:35
Definition: umlview.h:34
void setAutoIncrementSequence(bool state)
Definition: selectoperationdialog.cpp:260
SelectOperationDialog(UMLView *parent, UMLClassifier *c, LinkWidget *widget, bool enableAutoIncrement=true)
Definition: selectoperationdialog.cpp:51
void slotAutoIncrementChecked(bool state)
Definition: selectoperationdialog.cpp:151
UMLView * m_pView
Definition: selectoperationdialog.h:72
bool autoIncrementSequence()
Definition: selectoperationdialog.cpp:268
static const int CUSTOM
Definition: selectoperationdialog.h:60
KComboBox * m_pOpCB
Definition: selectoperationdialog.h:63
QString m_Text
Definition: selectoperationdialog.h:69
void setCustomOp(const QString &op)
Definition: selectoperationdialog.cpp:142
static const int OP
Definition: selectoperationdialog.h:59
bool apply()
Definition: selectoperationdialog.cpp:296
QLabel * m_pSeqL
Definition: selectoperationdialog.h:64
void setupDialog()
Definition: selectoperationdialog.cpp:276
Definition: singlepagedialogbase.h:34
bool isClassOp() const
Definition: selectoperationdialog.cpp:132
~SelectOperationDialog()
Definition: selectoperationdialog.cpp:108
void slotNewOperation()
Definition: selectoperationdialog.cpp:160
QCheckBox * m_pOpAS
Definition: selectoperationdialog.h:68
int m_id
takes on the value OP or CUSTOM according to what the user selected
Definition: selectoperationdialog.h:71
QGroupBox * m_pOpGB
Definition: selectoperationdialog.h:62
bool m_enableAutoIncrement
Definition: selectoperationdialog.h:75
KLineEdit * m_pOpLE
Definition: selectoperationdialog.h:65
A dialog to select an operation.
Definition: selectoperationdialog.h:32
void setupOperationsList()
Definition: selectoperationdialog.cpp:221
QString getOpText()
Definition: selectoperationdialog.cpp:117
QString getSeqNumber()
Definition: selectoperationdialog.cpp:241
void slotTextChanged(const QString &text)
Definition: selectoperationdialog.cpp:188
QPushButton * m_newOperationButton
Definition: selectoperationdialog.h:67