• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdesdk API Reference
  • KDE Home
  • Contact Us
 

umbrello/umbrello

  • sources
  • kde-4.12
  • kdesdk
  • umbrello
  • umbrello
toolbarstate.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) 2004-2013 *
8  * Umbrello UML Modeller Authors <umbrello-devel@kde.org> *
9  ***************************************************************************/
10 
11 #ifndef TOOLBARSTATE_H
12 #define TOOLBARSTATE_H
13 
14 #include <QEvent>
15 #include <QObject>
16 #include <QPointF>
17 
18 class AssociationWidget;
19 class FloatingDashLineWidget;
20 class MessageWidget;
21 class QGraphicsSceneMouseEvent;
22 class UMLScene;
23 class UMLWidget;
24 
69 class ToolBarState: public QObject
70 {
71  Q_OBJECT
72 public:
73  virtual ~ToolBarState();
74 
75  virtual void init();
76 
77  virtual void cleanBeforeChange();
78 
79  virtual void mousePress(QGraphicsSceneMouseEvent* ome);
80  virtual void mouseRelease(QGraphicsSceneMouseEvent* ome);
81  virtual void mouseDoubleClick(QGraphicsSceneMouseEvent* ome);
82  virtual void mouseMove(QGraphicsSceneMouseEvent* ome);
83 
84 public slots:
85  virtual void slotAssociationRemoved(AssociationWidget* association);
86  virtual void slotWidgetRemoved(UMLWidget* widget);
87 
88 protected:
89  ToolBarState(UMLScene* umlScene);
90 
91  virtual void setCurrentElement();
92 
93  virtual void mousePressAssociation();
94  virtual void mousePressWidget();
95  virtual void mousePressEmpty();
96  virtual void mouseReleaseAssociation();
97  virtual void mouseReleaseWidget();
98  virtual void mouseReleaseEmpty();
99  virtual void mouseDoubleClickAssociation();
100  virtual void mouseDoubleClickWidget();
101  virtual void mouseDoubleClickEmpty();
102  virtual void mouseMoveAssociation();
103  virtual void mouseMoveWidget();
104  virtual void mouseMoveEmpty();
105 
106  virtual void changeTool();
107 
108  virtual UMLWidget* currentWidget() const;
109  virtual void setCurrentWidget(UMLWidget* widget);
110 
111  virtual AssociationWidget* currentAssociation() const;
112  virtual void setCurrentAssociation(AssociationWidget* association);
113 
114  void setMouseEvent(QGraphicsSceneMouseEvent* ome, const QEvent::Type &type);
115 
116  AssociationWidget* associationAt(const QPointF& pos);
117  MessageWidget* messageAt(const QPointF& pos);
118  FloatingDashLineWidget* floatingLineAt(const QPointF& pos);
119 
120  UMLScene* m_pUMLScene;
121  QGraphicsSceneMouseEvent* m_pMouseEvent;
122  // This event is the equivalent of the received event after transforming it
123  // using the inverse world matrix in the UMLScene.
124 
125 private:
126  UMLWidget* m_currentWidget;
127  AssociationWidget* m_currentAssociation;
128 
129 };
130 
131 #endif //TOOLBARSTATE_H
ToolBarState::messageAt
MessageWidget * messageAt(const QPointF &pos)
Returns the MessageWidget at the specified position, or null if there is none.
Definition: toolbarstate.cpp:504
ToolBarState::m_pUMLScene
UMLScene * m_pUMLScene
The UMLScene.
Definition: toolbarstate.h:120
ToolBarState::mouseReleaseEmpty
virtual void mouseReleaseEmpty()
Called when the release event happened on an empty space.
Definition: toolbarstate.cpp:352
ToolBarState::mouseReleaseAssociation
virtual void mouseReleaseAssociation()
Called when the release event happened on an association.
Definition: toolbarstate.cpp:336
ToolBarState::floatingLineAt
FloatingDashLineWidget * floatingLineAt(const QPointF &pos)
Returns the FloatingDashLineWidget at the specified position, or null if there is none...
Definition: toolbarstate.cpp:539
ToolBarState::mouseMoveWidget
virtual void mouseMoveWidget()
Called when the move event happened when a widget is currently available.
Definition: toolbarstate.cpp:397
ToolBarState::mouseDoubleClickWidget
virtual void mouseDoubleClickWidget()
Called when the double click event happened on a widget.
Definition: toolbarstate.cpp:368
ToolBarState::mousePressWidget
virtual void mousePressWidget()
Called when the press event happened on a widget.
Definition: toolbarstate.cpp:317
ToolBarState::~ToolBarState
virtual ~ToolBarState()
Destroys this ToolBarState.
Definition: toolbarstate.cpp:32
ToolBarState::mouseRelease
virtual void mouseRelease(QGraphicsSceneMouseEvent *ome)
Handler for mouse release events.
Definition: toolbarstate.cpp:110
QObject
ToolBarState::ToolBarState
ToolBarState(UMLScene *umlScene)
Creates a new ToolBarState.
Definition: toolbarstate.cpp:251
ToolBarState::slotAssociationRemoved
virtual void slotAssociationRemoved(AssociationWidget *association)
An association was removed from the UMLScene.
Definition: toolbarstate.cpp:223
AssociationWidget
This class represents an association inside a diagram.
Definition: associationwidget.h:50
ToolBarState::mouseMove
virtual void mouseMove(QGraphicsSceneMouseEvent *ome)
Handler for mouse move events.
Definition: toolbarstate.cpp:175
ToolBarState::changeTool
virtual void changeTool()
Changes the current tool to the default one if the right button was released.
Definition: toolbarstate.cpp:414
ToolBarState::mousePressEmpty
virtual void mousePressEmpty()
Called when the press event happened on an empty space.
Definition: toolbarstate.cpp:325
MessageWidget
Used to display a message on a sequence diagram.
Definition: messagewidget.h:41
ToolBarState::cleanBeforeChange
virtual void cleanBeforeChange()
Called when the current tool is changed to use another tool.
Definition: toolbarstate.cpp:59
Type
Type
Definition: preprocesslexer.h:59
FloatingDashLineWidget
This class is used to draw dash lines for UML combined fragments.
Definition: floatingdashlinewidget.h:33
ToolBarState::mouseDoubleClick
virtual void mouseDoubleClick(QGraphicsSceneMouseEvent *ome)
Handler for mouse double click events.
Definition: toolbarstate.cpp:143
ToolBarState::mouseDoubleClickEmpty
virtual void mouseDoubleClickEmpty()
Called when the double click event happened on an empty space.
Definition: toolbarstate.cpp:376
ToolBarState::setCurrentWidget
virtual void setCurrentWidget(UMLWidget *widget)
Sets the widget currently in use.
Definition: toolbarstate.cpp:440
ToolBarState::setCurrentAssociation
virtual void setCurrentAssociation(AssociationWidget *association)
Sets the association currently in use.
Definition: toolbarstate.cpp:464
ToolBarState::slotWidgetRemoved
virtual void slotWidgetRemoved(UMLWidget *widget)
A widget was removed from the UMLScene.
Definition: toolbarstate.cpp:236
ToolBarState::mouseMoveAssociation
virtual void mouseMoveAssociation()
Called when the move event happened when an association is currently available.
Definition: toolbarstate.cpp:388
ToolBarState::associationAt
AssociationWidget * associationAt(const QPointF &pos)
Returns the AssociationWidget at the specified position, or null if there is none.
Definition: toolbarstate.cpp:522
ToolBarState::mouseReleaseWidget
virtual void mouseReleaseWidget()
Called when the release event happened on a widget.
Definition: toolbarstate.cpp:344
ToolBarState::mousePressAssociation
virtual void mousePressAssociation()
Called when the press event happened on an association.
Definition: toolbarstate.cpp:309
ToolBarState::init
virtual void init()
Goes back to the initial state.
Definition: toolbarstate.cpp:41
ToolBarState::m_pMouseEvent
QGraphicsSceneMouseEvent * m_pMouseEvent
The mouse event currently in use.
Definition: toolbarstate.h:121
ToolBarState::mouseDoubleClickAssociation
virtual void mouseDoubleClickAssociation()
Called when the double click event happened on an association.
Definition: toolbarstate.cpp:360
ToolBarState::currentWidget
virtual UMLWidget * currentWidget() const
Returns the widget currently in use.
Definition: toolbarstate.cpp:426
ToolBarState::currentAssociation
virtual AssociationWidget * currentAssociation() const
Returns the association currently in use.
Definition: toolbarstate.cpp:450
ToolBarState::setCurrentElement
virtual void setCurrentElement()
Sets the current association or widget.
Definition: toolbarstate.cpp:267
ToolBarState
Base class for toolbar states.
Definition: toolbarstate.h:69
ToolBarState::mousePress
virtual void mousePress(QGraphicsSceneMouseEvent *ome)
Handler for mouse press events.
Definition: toolbarstate.cpp:78
UMLScene
UMLScene instances represent diagrams.
Definition: umlscene.h:70
ToolBarState::mouseMoveEmpty
virtual void mouseMoveEmpty()
Called when the move event happened when no association nor widget are currently available.
Definition: toolbarstate.cpp:406
ToolBarState::setMouseEvent
void setMouseEvent(QGraphicsSceneMouseEvent *ome, const QEvent::Type &type)
Sets m_pMouseEvent as the equivalent of the received event after transforming it using the inverse wo...
Definition: toolbarstate.cpp:477
UMLWidget
This is the base class for nearly all graphical widgets.
Definition: umlwidget.h:40
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:06:00 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

umbrello/umbrello

Skip menu "umbrello/umbrello"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Modules
  • Related Pages

kdesdk API Reference

Skip menu "kdesdk API Reference"
  • kapptemplate
  • kcachegrind
  • kompare
  • lokalize
  • okteta
  • umbrello
  •   umbrello

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal