umbrello: umbrello/dialogs/selectoperationdialog.h Source File

umbrello 2.31.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 * 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
32 class SelectOperationDialog : public SinglePageDialogBase
33 {
34 Q_OBJECT
35 public:
36 SelectOperationDialog(UMLView * parent, UMLClassifier * c, LinkWidget *widget, bool enableAutoIncrement = true);
37 ~SelectOperationDialog();
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;
70 int m_nOpCount;
71 int m_id;
72 UMLView *m_pView;
73 UMLClassifier *m_classifier;
74 LinkWidget *m_widget;
75 bool m_enableAutoIncrement;
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
SelectOperationDialog::m_pSeqLE
KLineEdit * m_pSeqLE
Definition: selectoperationdialog.h:65
SelectOperationDialog::m_pOpCB
KComboBox * m_pOpCB
Definition: selectoperationdialog.h:63
SelectOperationDialog::setupDialog
void setupDialog()
Definition: selectoperationdialog.cpp:276
UMLClassifier::getOpList
UMLOperationList getOpList(bool includeInherited=false, UMLClassifierSet *alreadyTraversed=0)
Definition: classifier.cpp:939
Model_Utils::Parse_Status
Parse_Status
Definition: model_utils.h:108
SelectOperationDialog::setSeqNumber
void setSeqNumber(const QString &num)
Definition: selectoperationdialog.cpp:251
UMLObject::asUMLOperation
UMLOperation * asUMLOperation()
Definition: umlobject.cpp:1323
UMLObject::name
QString name() const
Definition: umlobject.cpp:211
umlview.h
UMLScene::autoIncrementSequence
bool autoIncrementSequence() const
Definition: umlscene.cpp:372
UMLScene::autoIncrementSequenceValue
QString autoIncrementSequenceValue()
Definition: umlscene.cpp:385
SelectOperationDialog::setCustomOp
void setCustomOp(const QString &op)
Definition: selectoperationdialog.cpp:142
SelectOperationDialog::m_pOpGB
QGroupBox * m_pOpGB
Definition: selectoperationdialog.h:62
SelectOperationDialog::m_classifier
UMLClassifier * m_classifier
Definition: selectoperationdialog.h:73
LinkWidget::setOperation
virtual void setOperation(UMLOperation *op)=0
SelectOperationDialog::m_Text
QString m_Text
Definition: selectoperationdialog.h:69
SelectOperationDialog::CUSTOM
static const int CUSTOM
Definition: selectoperationdialog.h:60
UMLScene::setAutoIncrementSequence
void setAutoIncrementSequence(bool state)
Definition: umlscene.cpp:377
operation.h
Model_Utils::OpDescriptor
Definition: model_utils.h:129
UMLClassifier::createOperation
UMLOperation * createOperation(const QString &name=QString(), bool *isExistingOp=0, Model_Utils::NameAndType_List *params=0)
Definition: classifier.cpp:236
SelectOperationDialog::apply
bool apply()
Definition: selectoperationdialog.cpp:296
Uml::SignatureType::SigNoVis
@ SigNoVis
Definition: basictypes.h:182
UMLOperation::toString
QString toString(Uml::SignatureType::Enum sig=Uml::SignatureType::NoSig, bool withStereotype=false)
Definition: operation.cpp:205
SinglePageDialogBase
Definition: singlepagedialogbase.h:36
UMLClassifierList
QList< UMLClassifier * > UMLClassifierList
Definition: umlclassifierlist.h:17
LinkWidget::setSequenceNumber
void setSequenceNumber(const QString &sequenceNumber)
Definition: linkwidget.cpp:95
SelectOperationDialog::m_pOpAS
QCheckBox * m_pOpAS
Definition: selectoperationdialog.h:68
singlepagedialogbase.h
LinkWidget::lwOperationText
virtual QString lwOperationText()=0
UMLObject
The base class for UML objects.
Definition: umlobject.h:74
SelectOperationDialog::autoIncrementSequence
bool autoIncrementSequence()
Definition: selectoperationdialog.cpp:268
SelectOperationDialog::m_id
int m_id
takes on the value OP or CUSTOM according to what the user selected
Definition: selectoperationdialog.h:71
umlclassifierlistitemlist.h
SelectOperationDialog::m_pOpLE
KLineEdit * m_pOpLE
Definition: selectoperationdialog.h:65
Dialog_Utils::makeLabeledEditField
KLineEdit * makeLabeledEditField(QGridLayout *layout, int row, QLabel *&label, const QString &labelText, KLineEdit *&editField, const QString &editFieldText)
Definition: dialog_utils.cpp:52
SelectOperationDialog::m_pCustomRB
QLabel * m_pCustomRB
Definition: selectoperationdialog.h:66
Model_Utils::parseOperation
Parse_Status parseOperation(QString m, OpDescriptor &desc, UMLClassifier *owningScope)
Definition: model_utils.cpp:1056
SelectOperationDialog::slotNewOperation
void slotNewOperation()
Definition: selectoperationdialog.cpp:160
UMLView
Definition: umlview.h:35
attribute.h
caseInsensitiveLessThan
bool caseInsensitiveLessThan(const UMLOperation *s1, const UMLOperation *s2)
Definition: selectoperationdialog.cpp:39
UMLClassifier::findSuperClassConcepts
UMLClassifierList findSuperClassConcepts(ClassifierType type=ALL)
Definition: classifier.cpp:609
LinkWidget::setOperationText
virtual void setOperationText(const QString &op)=0
SelectOperationDialog::setupOperationsList
void setupOperationsList()
Definition: selectoperationdialog.cpp:221
SelectOperationDialog::m_nOpCount
int m_nOpCount
Definition: selectoperationdialog.h:70
i18n
#define i18n
Definition: main.cpp:39
SelectOperationDialog::m_enableAutoIncrement
bool m_enableAutoIncrement
Definition: selectoperationdialog.h:75
Model_Utils::OpDescriptor::m_name
QString m_name
< Data structure filled by parseOperation().
Definition: model_utils.h:130
SelectOperationDialog::setAutoIncrementSequence
void setAutoIncrementSequence(bool state)
Definition: selectoperationdialog.cpp:260
SelectOperationDialog::slotTextChanged
void slotTextChanged(const QString &text)
Definition: selectoperationdialog.cpp:188
SelectOperationDialog::slotIndexChanged
void slotIndexChanged(int index)
Definition: selectoperationdialog.cpp:173
SelectOperationDialog::setClassOp
bool setClassOp(const QString &op)
Definition: selectoperationdialog.cpp:206
LinkWidget::sequenceNumber
QString sequenceNumber() const
Definition: linkwidget.cpp:103
LinkWidget::operation
virtual UMLOperation * operation()=0
SelectOperationDialog::getSeqNumber
QString getSeqNumber()
Definition: selectoperationdialog.cpp:241
MyProject\connect
connect()
Definition: namespaces-multiple.php:5
LinkWidget
Interface to FloatingTextWidget for AssociationWidget and MessageWidget.
Definition: linkwidget.h:36
SelectOperationDialog::m_pOpRB
QLabel * m_pOpRB
Definition: selectoperationdialog.h:66
SelectOperationDialog::m_widget
LinkWidget * m_widget
Definition: selectoperationdialog.h:74
SelectOperationDialog
A dialog to select an operation.
Definition: selectoperationdialog.h:33
classifier.h
selectoperationdialog.h
UMLOperation
Definition: operation.h:25
umlscene.h
SelectOperationDialog::m_newOperationButton
QPushButton * m_newOperationButton
Definition: selectoperationdialog.h:67
SelectOperationDialog::slotAutoIncrementChecked
void slotAutoIncrementChecked(bool state)
Definition: selectoperationdialog.cpp:151
SelectOperationDialog::isClassOp
bool isClassOp() const
Definition: selectoperationdialog.cpp:132
Model_Utils::OpDescriptor::m_pReturnType
UMLObject * m_pReturnType
Definition: model_utils.h:132
SelectOperationDialog::~SelectOperationDialog
~SelectOperationDialog()
Definition: selectoperationdialog.cpp:108
UMLClassifier
Information for a non-graphical Concept/Class.
Definition: classifier.h:40
debug_utils.h
SelectOperationDialog::m_pSeqL
QLabel * m_pSeqL
Definition: selectoperationdialog.h:64
Model_Utils::OpDescriptor::m_args
NameAndType_List m_args
Definition: model_utils.h:131
UMLView::umlScene
UMLScene * umlScene() const
Definition: umlview.cpp:56
UMLClassifier::findOperation
UMLOperation * findOperation(const QString &name, Model_Utils::NameAndType_List params)
Definition: classifier.cpp:179
dialog_utils.h
SelectOperationDialog::m_pView
UMLView * m_pView
Definition: selectoperationdialog.h:72
Model_Utils::PS_OK
@ PS_OK
Return type of parseOperation().
Definition: model_utils.h:109
SelectOperationDialog::getOpText
QString getOpText()
Definition: selectoperationdialog.cpp:117
UMLOperation::setType
void setType(UMLObject *type)
Definition: operation.cpp:94
linkwidget.h
UMLClassifier::operations
int operations()
Definition: classifier.cpp:926
UMLOperationList
QList< UMLOperation * > UMLOperationList
Definition: umloperationlist.h:18
SelectOperationDialog::SelectOperationDialog
SelectOperationDialog(UMLView *parent, UMLClassifier *c, LinkWidget *widget, bool enableAutoIncrement=true)
Definition: selectoperationdialog.cpp:51
SelectOperationDialog::OP
static const int OP
Definition: selectoperationdialog.h:59