umbrello 2.39.2 Umbrello UML Modeller is a Unified Modelling Language (UML) diagram program based on KDE Technology

- Main Page
- Related Pages
- Topics
- Namespaces
- Classes
- Files

- File List
- File Members

worktoolbar.h
Go to the documentation of this file.
1/*
2 SPDX-License-Identifier: GPL-2.0-or-later
3 SPDX-FileCopyrightText: 2002-2021 Umbrello UML Modeller Authors <umbrello-devel@kde.org>
4*/
5
6#ifndef WORKTOOLBAR_H
7#define WORKTOOLBAR_H
8
9#include "basictypes.h"
10
11#include <ktoolbar.h>
12
13#include <QCursor>
14#include <QMap>
15#include <QPixmap>
16
17 class QMainWindow;
18 class KAction;
19
35 class WorkToolBar : public KToolBar
36{
37 Q_OBJECT
38 Q_ENUMS(ToolBar_Buttons)
39 public:
40
41 explicit WorkToolBar(QMainWindow *parentWindow);
42 ~WorkToolBar();
43
44 void setOldTool();
45 void setDefaultTool();
46
47 void setupActions();
48
52 enum ToolBar_Buttons {
53 tbb_Undefined = -1,
54 tbb_Arrow,
55 tbb_Generalization,
56 tbb_Aggregation,
57 tbb_Dependency,
58 tbb_Association,
59 tbb_Containment,
60 tbb_Coll_Mesg_Sync,
61 tbb_Coll_Mesg_Async,
62 tbb_Seq_Message_Creation,
63 tbb_Seq_Message_Destroy,
64 tbb_Seq_Message_Synchronous,
65 tbb_Seq_Message_Asynchronous,
66 tbb_Seq_Message_Found,
67 tbb_Seq_Message_Lost,
68 tbb_Seq_Combined_Fragment,
69 tbb_Seq_Precondition,
70 tbb_Composition,
71 tbb_Relationship,
72 tbb_UniAssociation,
73 tbb_State_Transition,
74 tbb_Activity_Transition,
75 tbb_Send_Signal,
76 tbb_Accept_Signal,
77 tbb_Accept_Time_Event,
78 tbb_Anchor, //keep anchor as last association until code uses better algorithm for testing
79 tbb_Note,
80 tbb_Box,
81 tbb_Text,
82 tbb_Actor,
83 tbb_UseCase,
84 tbb_Class,
85 tbb_Interface,
86 tbb_Interface_Provider,
87 tbb_Interface_Requirement,
88 tbb_Datatype,
89 tbb_Enum,
90 tbb_Entity,
91 tbb_Package,
92 tbb_Component,
93 tbb_Node,
94 tbb_Artifact,
95 tbb_Object,
96 tbb_Initial_State,
97 tbb_State,
98 tbb_Region,
99 tbb_End_State,
100 tbb_Initial_Activity,
101 tbb_Activity,
102 tbb_End_Activity,
103 tbb_Final_Activity,
104 tbb_Pin,
105 tbb_Port,
106 tbb_Branch,
107 tbb_Fork,
108 tbb_DeepHistory,
109 tbb_ShallowHistory,
110 tbb_StateFork,
111 tbb_StateJoin,
112 tbb_Junction,
113 tbb_Choice,
114 tbb_Andline,
115 tbb_Exception,
116 tbb_Object_Node,
117 tbb_PrePostCondition,
118 tbb_Category,
119 tbb_Category2Parent,
120 tbb_Child2Category,
121 tbb_Instance,
122 tbb_SubSystem
123 };
124
125 private:
126
127 typedef QMap<Uml::DiagramType::Enum, ToolBar_Buttons> OldToolMap;
128 typedef QMap<ToolBar_Buttons, QCursor> CursorMap;
129 typedef QMap<ToolBar_Buttons, QAction*> ActionsMap;
130
131 ToolBar_Buttons m_CurrentButtonID;
132 OldToolMap m_map;
133 Uml::DiagramType::Enum m_Type;
134 CursorMap m_cursors;
135 ActionsMap m_actions;
136
137 void loadPixmaps();
138
139 QCursor currentCursor();
140 QCursor defaultCursor();
141
142 QAction* insertHotBtn(ToolBar_Buttons tbb);
143
144 void insertBasicAssociations();
145
146signals:
147 void sigButtonChanged(int);
148
149 public slots:
150 void slotCheckToolBar(Uml::DiagramType::Enum dt);
151 void buttonChanged(int b);
152 void slotResetToolBar();
153
158 void slotArrow();
159 void slotGeneralization();
160 void slotAggregation();
161 void slotDependency();
162 void slotAssociation();
163 void slotContainment();
164 void slotColl_Mesg_Sync();
165 void slotColl_Mesg_Async();
166 void slotSeq_Message_Creation();
167 void slotSeq_Message_Destroy();
168 void slotSeq_Message_Synchronous();
169 void slotSeq_Message_Asynchronous();
170 void slotSeq_Message_Found();
171 void slotSeq_Message_Lost();
172 void slotSeq_Combined_Fragment();
173 void slotSeq_Precondition();
174 void slotComposition();
175 void slotRelationship();
176 void slotUniAssociation();
177 void slotState_Transition();
178 void slotActivity_Transition();
179 void slotAnchor(); // keep anchor as last association until code uses better algorithm for testing
180 void slotNote();
181 void slotBox();
182 void slotText();
183 void slotActor();
184 void slotUseCase();
185 void slotClass();
186 void slotInterface();
187 void slotInterfaceProvider();
188 void slotInterfaceRequired();
189 void slotDatatype();
190 void slotEnum();
191 void slotEntity();
192 void slotPackage();
193 void slotComponent();
194 void slotNode();
195 void slotArtifact();
196 void slotObject();
197 void slotRegion();
198 void slotInitial_State();
199 void slotState();
200 void slotEnd_State();
201 void slotInitial_Activity();
202 void slotActivity();
203 void slotEnd_Activity();
204 void slotFinal_Activity();
205 void slotBranch();
206 void slotSend_Signal();
207 void slotAccept_Signal();
208 void slotAccept_Time_Event();
209 void slotFork();
210 void slotDeepHistory();
211 void slotShallowHistory();
212 void slotStateJoin();
213 void slotStateFork();
214 void slotJunction();
215 void slotChoice();
216 void slotAndline();
217 void slotException();
218 void slotPrePostCondition();
219 void slotPin();
220 void slotPort();
221 void slotObject_Node();
222 void slotCategory();
223 void slotCategory2Parent();
224 void slotChild2Category();
225 void slotInstance();
226 void slotSubsystem();
227};
228
229#endif
basictypes.h
WorkToolBar
The toolbar that is different for each type of diagram.
Definition worktoolbar.h:36
WorkToolBar::slotColl_Mesg_Sync
void slotColl_Mesg_Sync()
Definition worktoolbar.cpp:419
WorkToolBar::slotShallowHistory
void slotShallowHistory()
Definition worktoolbar.cpp:466
WorkToolBar::slotSeq_Combined_Fragment
void slotSeq_Combined_Fragment()
Definition worktoolbar.cpp:427
WorkToolBar::ToolBar_Buttons
ToolBar_Buttons
Definition worktoolbar.h:52
WorkToolBar::tbb_DeepHistory
@ tbb_DeepHistory
Definition worktoolbar.h:108
WorkToolBar::tbb_Activity_Transition
@ tbb_Activity_Transition
Definition worktoolbar.h:74
WorkToolBar::tbb_Interface_Provider
@ tbb_Interface_Provider
Definition worktoolbar.h:86
WorkToolBar::tbb_State_Transition
@ tbb_State_Transition
Definition worktoolbar.h:73
WorkToolBar::tbb_Entity
@ tbb_Entity
Definition worktoolbar.h:90
WorkToolBar::tbb_Instance
@ tbb_Instance
Definition worktoolbar.h:121
WorkToolBar::tbb_StateJoin
@ tbb_StateJoin
Definition worktoolbar.h:111
WorkToolBar::tbb_Category
@ tbb_Category
Definition worktoolbar.h:118
WorkToolBar::tbb_Choice
@ tbb_Choice
Definition worktoolbar.h:113
WorkToolBar::tbb_Component
@ tbb_Component
Definition worktoolbar.h:92
WorkToolBar::tbb_Interface
@ tbb_Interface
Definition worktoolbar.h:85
WorkToolBar::tbb_Junction
@ tbb_Junction
Definition worktoolbar.h:112
WorkToolBar::tbb_Package
@ tbb_Package
Definition worktoolbar.h:91
WorkToolBar::tbb_ShallowHistory
@ tbb_ShallowHistory
Definition worktoolbar.h:109
WorkToolBar::tbb_Seq_Message_Found
@ tbb_Seq_Message_Found
Definition worktoolbar.h:66
WorkToolBar::tbb_Object
@ tbb_Object
Definition worktoolbar.h:95
WorkToolBar::tbb_UseCase
@ tbb_UseCase
Definition worktoolbar.h:83
WorkToolBar::tbb_Seq_Message_Creation
@ tbb_Seq_Message_Creation
Definition worktoolbar.h:62
WorkToolBar::tbb_Coll_Mesg_Async
@ tbb_Coll_Mesg_Async
Definition worktoolbar.h:61
WorkToolBar::tbb_Seq_Message_Destroy
@ tbb_Seq_Message_Destroy
Definition worktoolbar.h:63
WorkToolBar::tbb_PrePostCondition
@ tbb_PrePostCondition
Definition worktoolbar.h:117
WorkToolBar::tbb_Activity
@ tbb_Activity
Definition worktoolbar.h:101
WorkToolBar::tbb_Child2Category
@ tbb_Child2Category
Definition worktoolbar.h:120
WorkToolBar::tbb_Initial_State
@ tbb_Initial_State
Definition worktoolbar.h:96
WorkToolBar::tbb_Fork
@ tbb_Fork
Definition worktoolbar.h:107
WorkToolBar::tbb_Exception
@ tbb_Exception
Definition worktoolbar.h:115
WorkToolBar::tbb_Text
@ tbb_Text
Definition worktoolbar.h:81
WorkToolBar::tbb_Seq_Message_Asynchronous
@ tbb_Seq_Message_Asynchronous
Definition worktoolbar.h:65
WorkToolBar::tbb_Class
@ tbb_Class
Definition worktoolbar.h:84
WorkToolBar::tbb_Send_Signal
@ tbb_Send_Signal
Definition worktoolbar.h:75
WorkToolBar::tbb_Undefined
@ tbb_Undefined
Definition worktoolbar.h:53
WorkToolBar::tbb_Datatype
@ tbb_Datatype
Definition worktoolbar.h:88
WorkToolBar::tbb_Enum
@ tbb_Enum
Definition worktoolbar.h:89
WorkToolBar::tbb_Branch
@ tbb_Branch
Definition worktoolbar.h:106
WorkToolBar::tbb_Category2Parent
@ tbb_Category2Parent
Definition worktoolbar.h:119
WorkToolBar::tbb_Note
@ tbb_Note
Definition worktoolbar.h:79
WorkToolBar::tbb_Object_Node
@ tbb_Object_Node
Definition worktoolbar.h:116
WorkToolBar::tbb_Port
@ tbb_Port
Definition worktoolbar.h:105
WorkToolBar::tbb_UniAssociation
@ tbb_UniAssociation
Definition worktoolbar.h:72
WorkToolBar::tbb_Final_Activity
@ tbb_Final_Activity
Definition worktoolbar.h:103
WorkToolBar::tbb_Actor
@ tbb_Actor
Definition worktoolbar.h:82
WorkToolBar::tbb_Initial_Activity
@ tbb_Initial_Activity
Definition worktoolbar.h:100
WorkToolBar::tbb_Containment
@ tbb_Containment
Definition worktoolbar.h:59
WorkToolBar::tbb_StateFork
@ tbb_StateFork
Definition worktoolbar.h:110
WorkToolBar::tbb_Node
@ tbb_Node
Definition worktoolbar.h:93
WorkToolBar::tbb_Accept_Time_Event
@ tbb_Accept_Time_Event
Definition worktoolbar.h:77
WorkToolBar::tbb_Andline
@ tbb_Andline
Definition worktoolbar.h:114
WorkToolBar::tbb_State
@ tbb_State
Definition worktoolbar.h:97
WorkToolBar::tbb_Arrow
@ tbb_Arrow
Definition worktoolbar.h:54
WorkToolBar::tbb_Seq_Message_Synchronous
@ tbb_Seq_Message_Synchronous
Definition worktoolbar.h:64
WorkToolBar::tbb_Association
@ tbb_Association
Definition worktoolbar.h:58
WorkToolBar::tbb_Coll_Mesg_Sync
@ tbb_Coll_Mesg_Sync
Definition worktoolbar.h:60
WorkToolBar::tbb_Seq_Precondition
@ tbb_Seq_Precondition
Definition worktoolbar.h:69
WorkToolBar::tbb_End_State
@ tbb_End_State
Definition worktoolbar.h:99
WorkToolBar::tbb_Interface_Requirement
@ tbb_Interface_Requirement
Definition worktoolbar.h:87
WorkToolBar::tbb_Dependency
@ tbb_Dependency
Definition worktoolbar.h:57
WorkToolBar::tbb_Box
@ tbb_Box
Definition worktoolbar.h:80
WorkToolBar::tbb_Seq_Message_Lost
@ tbb_Seq_Message_Lost
Definition worktoolbar.h:67
WorkToolBar::tbb_Seq_Combined_Fragment
@ tbb_Seq_Combined_Fragment
Definition worktoolbar.h:68
WorkToolBar::tbb_Composition
@ tbb_Composition
Definition worktoolbar.h:70
WorkToolBar::tbb_Artifact
@ tbb_Artifact
Definition worktoolbar.h:94
WorkToolBar::tbb_Relationship
@ tbb_Relationship
Definition worktoolbar.h:71
WorkToolBar::tbb_End_Activity
@ tbb_End_Activity
Definition worktoolbar.h:102
WorkToolBar::tbb_Region
@ tbb_Region
Definition worktoolbar.h:98
WorkToolBar::tbb_Pin
@ tbb_Pin
Definition worktoolbar.h:104
WorkToolBar::tbb_Generalization
@ tbb_Generalization
Definition worktoolbar.h:55
WorkToolBar::tbb_Accept_Signal
@ tbb_Accept_Signal
Definition worktoolbar.h:76
WorkToolBar::tbb_Aggregation
@ tbb_Aggregation
Definition worktoolbar.h:56
WorkToolBar::tbb_Anchor
@ tbb_Anchor
Definition worktoolbar.h:78
WorkToolBar::tbb_SubSystem
@ tbb_SubSystem
Definition worktoolbar.h:122
WorkToolBar::slotAnchor
void slotAnchor()
Definition worktoolbar.cpp:434
WorkToolBar::slotNote
void slotNote()
Definition worktoolbar.cpp:435
WorkToolBar::slotComposition
void slotComposition()
Definition worktoolbar.cpp:429
WorkToolBar::slotUniAssociation
void slotUniAssociation()
Definition worktoolbar.cpp:431
WorkToolBar::slotArtifact
void slotArtifact()
Definition worktoolbar.cpp:450
WorkToolBar::slotSubsystem
void slotSubsystem()
Definition worktoolbar.cpp:481
WorkToolBar::~WorkToolBar
~WorkToolBar()
Definition worktoolbar.cpp:55
WorkToolBar::slotAccept_Signal
void slotAccept_Signal()
Definition worktoolbar.cpp:455
WorkToolBar::slotPrePostCondition
void slotPrePostCondition()
Definition worktoolbar.cpp:476
WorkToolBar::slotEnd_State
void slotEnd_State()
Definition worktoolbar.cpp:457
WorkToolBar::slotAssociation
void slotAssociation()
Definition worktoolbar.cpp:417
WorkToolBar::slotContainment
void slotContainment()
Definition worktoolbar.cpp:418
WorkToolBar::slotActivity_Transition
void slotActivity_Transition()
Definition worktoolbar.cpp:433
WorkToolBar::slotSend_Signal
void slotSend_Signal()
Definition worktoolbar.cpp:454
WorkToolBar::slotGeneralization
void slotGeneralization()
Definition worktoolbar.cpp:414
WorkToolBar::slotText
void slotText()
Definition worktoolbar.cpp:437
WorkToolBar::slotSeq_Message_Lost
void slotSeq_Message_Lost()
Definition worktoolbar.cpp:426
WorkToolBar::defaultCursor
QCursor defaultCursor()
Definition worktoolbar.cpp:263
WorkToolBar::currentCursor
QCursor currentCursor()
Definition worktoolbar.cpp:255
WorkToolBar::slotObject_Node
void slotObject_Node()
Definition worktoolbar.cpp:475
WorkToolBar::m_actions
ActionsMap m_actions
Definition worktoolbar.h:135
WorkToolBar::slotChild2Category
void slotChild2Category()
Definition worktoolbar.cpp:479
WorkToolBar::setupActions
void setupActions()
Definition worktoolbar.cpp:485
WorkToolBar::slotObject
void slotObject()
Definition worktoolbar.cpp:451
WorkToolBar::slotAggregation
void slotAggregation()
Definition worktoolbar.cpp:415
WorkToolBar::slotRelationship
void slotRelationship()
Definition worktoolbar.cpp:430
WorkToolBar::slotAndline
void slotAndline()
Definition worktoolbar.cpp:473
WorkToolBar::slotEnum
void slotEnum()
Definition worktoolbar.cpp:445
WorkToolBar::slotInterfaceProvider
void slotInterfaceProvider()
Definition worktoolbar.cpp:442
WorkToolBar::slotChoice
void slotChoice()
Definition worktoolbar.cpp:472
WorkToolBar::OldToolMap
QMap< Uml::DiagramType::Enum, ToolBar_Buttons > OldToolMap
Definition worktoolbar.h:127
WorkToolBar::slotJunction
void slotJunction()
Definition worktoolbar.cpp:471
WorkToolBar::setDefaultTool
void setDefaultTool()
Definition worktoolbar.cpp:301
WorkToolBar::slotSeq_Message_Destroy
void slotSeq_Message_Destroy()
Definition worktoolbar.cpp:422
WorkToolBar::slotFork
void slotFork()
Definition worktoolbar.cpp:464
WorkToolBar::slotCheckToolBar
void slotCheckToolBar(Uml::DiagramType::Enum dt)
Definition worktoolbar.cpp:88
WorkToolBar::sigButtonChanged
void sigButtonChanged(int)
WorkToolBar::slotEntity
void slotEntity()
Definition worktoolbar.cpp:446
WorkToolBar::slotInstance
void slotInstance()
Definition worktoolbar.cpp:480
WorkToolBar::slotPort
void slotPort()
Definition worktoolbar.cpp:469
WorkToolBar::slotSeq_Message_Asynchronous
void slotSeq_Message_Asynchronous()
Definition worktoolbar.cpp:424
WorkToolBar::slotStateFork
void slotStateFork()
Definition worktoolbar.cpp:470
WorkToolBar::slotSeq_Message_Synchronous
void slotSeq_Message_Synchronous()
Definition worktoolbar.cpp:423
WorkToolBar::slotBox
void slotBox()
Definition worktoolbar.cpp:436
WorkToolBar::insertBasicAssociations
void insertBasicAssociations()
Definition worktoolbar.cpp:75
WorkToolBar::slotInterface
void slotInterface()
Definition worktoolbar.cpp:441
WorkToolBar::m_cursors
CursorMap m_cursors
Definition worktoolbar.h:134
WorkToolBar::slotActivity
void slotActivity()
Definition worktoolbar.cpp:460
WorkToolBar::m_map
OldToolMap m_map
Definition worktoolbar.h:132
WorkToolBar::setOldTool
void setOldTool()
Definition worktoolbar.cpp:289
WorkToolBar::slotState_Transition
void slotState_Transition()
Definition worktoolbar.cpp:432
WorkToolBar::slotSeq_Precondition
void slotSeq_Precondition()
Definition worktoolbar.cpp:428
WorkToolBar::slotClass
void slotClass()
Definition worktoolbar.cpp:440
WorkToolBar::slotColl_Mesg_Async
void slotColl_Mesg_Async()
Definition worktoolbar.cpp:420
WorkToolBar::buttonChanged
void buttonChanged(int b)
Definition worktoolbar.cpp:219
WorkToolBar::slotComponent
void slotComponent()
Definition worktoolbar.cpp:448
WorkToolBar::slotCategory2Parent
void slotCategory2Parent()
Definition worktoolbar.cpp:478
WorkToolBar::loadPixmaps
void loadPixmaps()
Definition worktoolbar.cpp:311
WorkToolBar::slotState
void slotState()
Definition worktoolbar.cpp:453
WorkToolBar::slotResetToolBar
void slotResetToolBar()
Definition worktoolbar.cpp:268
WorkToolBar::CursorMap
QMap< ToolBar_Buttons, QCursor > CursorMap
Definition worktoolbar.h:128
WorkToolBar::slotDeepHistory
void slotDeepHistory()
Definition worktoolbar.cpp:465
WorkToolBar::slotFinal_Activity
void slotFinal_Activity()
Definition worktoolbar.cpp:462
WorkToolBar::slotBranch
void slotBranch()
Definition worktoolbar.cpp:463
WorkToolBar::WorkToolBar
WorkToolBar(QMainWindow *parentWindow)
Definition worktoolbar.cpp:29
WorkToolBar::slotActor
void slotActor()
Definition worktoolbar.cpp:438
WorkToolBar::slotInitial_State
void slotInitial_State()
Definition worktoolbar.cpp:452
WorkToolBar::slotNode
void slotNode()
Definition worktoolbar.cpp:449
WorkToolBar::slotUseCase
void slotUseCase()
Definition worktoolbar.cpp:439
WorkToolBar::slotArrow
void slotArrow()
Definition worktoolbar.cpp:413
WorkToolBar::slotPackage
void slotPackage()
Definition worktoolbar.cpp:447
WorkToolBar::slotRegion
void slotRegion()
Definition worktoolbar.cpp:458
WorkToolBar::slotSeq_Message_Found
void slotSeq_Message_Found()
Definition worktoolbar.cpp:425
WorkToolBar::slotInterfaceRequired
void slotInterfaceRequired()
Definition worktoolbar.cpp:443
WorkToolBar::slotException
void slotException()
Definition worktoolbar.cpp:474
WorkToolBar::insertHotBtn
QAction * insertHotBtn(ToolBar_Buttons tbb)
Definition worktoolbar.cpp:63
WorkToolBar::slotDatatype
void slotDatatype()
Definition worktoolbar.cpp:444
WorkToolBar::slotEnd_Activity
void slotEnd_Activity()
Definition worktoolbar.cpp:461
WorkToolBar::m_CurrentButtonID
ToolBar_Buttons m_CurrentButtonID
Definition worktoolbar.h:131
WorkToolBar::slotDependency
void slotDependency()
Definition worktoolbar.cpp:416
WorkToolBar::slotSeq_Message_Creation
void slotSeq_Message_Creation()
Definition worktoolbar.cpp:421
WorkToolBar::ActionsMap
QMap< ToolBar_Buttons, QAction * > ActionsMap
Definition worktoolbar.h:129
WorkToolBar::slotAccept_Time_Event
void slotAccept_Time_Event()
Definition worktoolbar.cpp:456
WorkToolBar::slotInitial_Activity
void slotInitial_Activity()
Definition worktoolbar.cpp:459
WorkToolBar::slotStateJoin
void slotStateJoin()
Definition worktoolbar.cpp:467
WorkToolBar::slotPin
void slotPin()
Definition worktoolbar.cpp:468
WorkToolBar::m_Type
Uml::DiagramType::Enum m_Type
Definition worktoolbar.h:133
WorkToolBar::slotCategory
void slotCategory()
Definition worktoolbar.cpp:477
b
bool b
Definition cxx11-null-pointer-constant.h:6
Uml::DiagramType::Enum
Enum
Definition basictypes.h:63