umbrello  2.32.1
Umbrello UML Modeller is a Unified Modelling Language (UML) diagram program based on KDE Technology
selectoperationpage.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 SELECTOPERATIONPAGE_H
12 #define SELECTOPERATIONPAGE_H
13 
14 #include "dialogpagebase.h"
15 
16 class KComboBox;
17 class KLineEdit;
18 class QCheckBox;
19 class QGroupBox;
20 class QLabel;
21 class QPushButton;
22 class LinkWidget;
23 class MessageWidget;
24 class UMLClassifier;
25 class UMLView;
27 
36 {
37  Q_OBJECT
38 public:
39  SelectOperationPage(UMLView *parent, UMLClassifier *c, LinkWidget *widget, bool enableAutoIncrement = true);
41 
42  QString getOpText();
43 
44  bool isClassOp() const;
45 
46  QString getSeqNumber();
47 
48  bool autoIncrementSequence();
49  void setAutoIncrementSequence(bool state);
50 
51  void setSeqNumber(const QString &num);
52  void setCustomOp(const QString &op);
53  bool setClassOp(const QString &op);
54 
55  void setupDialog();
56  bool apply();
57 
58 signals:
59  void enableButtonOk(bool state);
60 
61 protected:
62  void setupOperationsList();
63 
64 private:
65  static const int OP = 0;
66  static const int CUSTOM = 1;
67 
68  QGroupBox *m_pOpGB;
69  KComboBox *m_pOpCB;
70  QLabel *m_pSeqL;
71  KLineEdit *m_pOpLE, *m_pSeqLE;
72  QLabel *m_pCustomRB, *m_pOpRB;
73  QPushButton *m_newOperationButton;
74  QCheckBox *m_pOpAS;
75  QString m_Text;
78  int m_id;
83 
84 public slots:
85  void slotAutoIncrementChecked(bool state);
86  void slotNewOperation();
87  void slotIndexChanged(int index);
88  void slotTextChanged(const QString &text);
89 };
90 
91 #endif
92 
Definition: dialogpagebase.h:25
Definition: documentationwidget.h:27
Interface to FloatingTextWidget for AssociationWidget and MessageWidget.
Definition: linkwidget.h:37
Displays a message.
Definition: messagewidget.h:41
A dialog page to select an operation.
Definition: selectoperationpage.h:36
QString getSeqNumber()
Definition: selectoperationpage.cpp:245
int m_id
takes on the value OP or CUSTOM according to what the user selected
Definition: selectoperationpage.h:78
bool m_enableAutoIncrement
Definition: selectoperationpage.h:82
KComboBox * m_pOpCB
Definition: selectoperationpage.h:69
QGroupBox * m_pOpGB
Definition: selectoperationpage.h:68
void setAutoIncrementSequence(bool state)
Definition: selectoperationpage.cpp:264
QString m_Text
Definition: selectoperationpage.h:75
void enableButtonOk(bool state)
QString getOpText()
Definition: selectoperationpage.cpp:121
bool autoIncrementSequence()
Definition: selectoperationpage.cpp:272
UMLClassifier * m_classifier
Definition: selectoperationpage.h:80
bool apply()
Definition: selectoperationpage.cpp:301
QLabel * m_pCustomRB
Definition: selectoperationpage.h:72
void setCustomOp(const QString &op)
Definition: selectoperationpage.cpp:146
UMLView * m_pView
Definition: selectoperationpage.h:79
QCheckBox * m_pOpAS
Definition: selectoperationpage.h:74
bool setClassOp(const QString &op)
Definition: selectoperationpage.cpp:210
void setupOperationsList()
Definition: selectoperationpage.cpp:225
KLineEdit * m_pSeqLE
Definition: selectoperationpage.h:71
QPushButton * m_newOperationButton
Definition: selectoperationpage.h:73
~SelectOperationPage()
Definition: selectoperationpage.cpp:112
SelectOperationPage(UMLView *parent, UMLClassifier *c, LinkWidget *widget, bool enableAutoIncrement=true)
Definition: selectoperationpage.cpp:52
void slotTextChanged(const QString &text)
Definition: selectoperationpage.cpp:192
void slotAutoIncrementChecked(bool state)
Definition: selectoperationpage.cpp:155
void setupDialog()
Definition: selectoperationpage.cpp:280
QLabel * m_pSeqL
Definition: selectoperationpage.h:70
bool isClassOp() const
Definition: selectoperationpage.cpp:136
DocumentationWidget * m_docWidget
Definition: selectoperationpage.h:76
KLineEdit * m_pOpLE
Definition: selectoperationpage.h:71
void setSeqNumber(const QString &num)
Definition: selectoperationpage.cpp:255
LinkWidget * m_widget
Definition: selectoperationpage.h:81
static const int CUSTOM
Definition: selectoperationpage.h:66
QLabel * m_pOpRB
Definition: selectoperationpage.h:72
static const int OP
Definition: selectoperationpage.h:65
int m_nOpCount
Definition: selectoperationpage.h:77
void slotIndexChanged(int index)
Definition: selectoperationpage.cpp:177
void slotNewOperation()
Definition: selectoperationpage.cpp:164
Information for a non-graphical Concept/Class.
Definition: classifier.h:40
Definition: umlview.h:35