• 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
toolbarstateassociation.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 TOOLBARSTATEASSOCIATION_H
12 #define TOOLBARSTATEASSOCIATION_H
13 
14 #include "basictypes.h"
15 #include "toolbarstatepool.h"
16 
17 class QGraphicsLineItem;
18 
38 class ToolBarStateAssociation : public ToolBarStatePool
39 {
40  Q_OBJECT
41 public:
42 
43  explicit ToolBarStateAssociation(UMLScene *umlScene);
44  virtual ~ToolBarStateAssociation();
45 
46  virtual void init();
47 
48  virtual void cleanBeforeChange();
49 
50  virtual void mouseMove(QGraphicsSceneMouseEvent* ome);
51 
52 public slots:
53 
54  virtual void slotWidgetRemoved(UMLWidget* widget);
55 
56 protected:
57 
58  virtual void mouseReleaseAssociation();
59  virtual void mouseReleaseWidget();
60  virtual void mouseReleaseEmpty();
61 
62 private:
63 
64  void setFirstWidget();
65  void setSecondWidget();
66 
67  Uml::AssociationType::Enum getAssociationType();
68 
69  bool addAssociationInViewAndDoc(AssociationWidget* assoc);
70 
71  void cleanAssociation();
72 
76  UMLWidget* m_firstWidget;
77 
82  QGraphicsLineItem* m_associationLine;
83 
84 };
85 
86 #endif //TOOLBARSTATEASSOCIATION_H
ToolBarStatePool
Base class for tools that can use the same state but with different button.
Definition: toolbarstatepool.h:22
ToolBarStateAssociation
Association tool to create associations between widgets.
Definition: toolbarstateassociation.h:38
ToolBarStateAssociation::ToolBarStateAssociation
ToolBarStateAssociation(UMLScene *umlScene)
Creates a new ToolBarStateAssociation.
Definition: toolbarstateassociation.cpp:39
ToolBarStateAssociation::mouseMove
virtual void mouseMove(QGraphicsSceneMouseEvent *ome)
Called when a mouse event happened.
Definition: toolbarstateassociation.cpp:79
ToolBarStateAssociation::init
virtual void init()
Goes back to the initial state.
Definition: toolbarstateassociation.cpp:58
AssociationWidget
This class represents an association inside a diagram.
Definition: associationwidget.h:50
Uml::AssociationType::Enum
Enum
Definition: basictypes.h:99
ToolBarStateAssociation::~ToolBarStateAssociation
virtual ~ToolBarStateAssociation()
Destroys this ToolBarStateAssociation.
Definition: toolbarstateassociation.cpp:50
QGraphicsLineItem
toolbarstatepool.h
ToolBarStateAssociation::slotWidgetRemoved
virtual void slotWidgetRemoved(UMLWidget *widget)
A widget was removed from the UMLScene.
Definition: toolbarstateassociation.cpp:95
ToolBarStateAssociation::mouseReleaseWidget
virtual void mouseReleaseWidget()
Called when the release event happened on a widget.
Definition: toolbarstateassociation.cpp:132
ToolBarStateAssociation::cleanBeforeChange
virtual void cleanBeforeChange()
Called when the current tool is changed to use another tool.
Definition: toolbarstateassociation.cpp:68
ToolBarStateAssociation::mouseReleaseAssociation
virtual void mouseReleaseAssociation()
Called when the release event happened on an association.
Definition: toolbarstateassociation.cpp:111
basictypes.h
UMLScene
UMLScene instances represent diagrams.
Definition: umlscene.h:70
ToolBarStateAssociation::mouseReleaseEmpty
virtual void mouseReleaseEmpty()
Called when the release event happened on an empty space.
Definition: toolbarstateassociation.cpp:158
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