QElectroTech  0.8-dev
elementsmover.h
Go to the documentation of this file.
1 /*
2  Copyright 2006-2020 The QElectroTech Team
3  This file is part of QElectroTech.
4 
5  QElectroTech is free software: you can redistribute it and/or modify
6  it under the terms of the GNU General Public License as published by
7  the Free Software Foundation, either version 2 of the License, or
8  (at your option) any later version.
9 
10  QElectroTech is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU General Public License for more details.
14 
15  You should have received a copy of the GNU General Public License
16  along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
17 */
18 #ifndef ELEMENTS_MOVER_H
19 #define ELEMENTS_MOVER_H
20 
21 #include <QPointF>
22 #include "diagramcontent.h"
23 
24 class ConductorTextItem;
25 class Diagram;
39  // constructors, destructor
40  public:
41  ElementsMover();
42  virtual ~ElementsMover();
43  private:
45 
46  // methods
47  public:
48  bool isReady() const;
49  int beginMovement(Diagram *, QGraphicsItem * = nullptr);
50  void continueMovement(const QPointF &);
51  void endMovement();
52 
53  // attributes
54  private:
58  QGraphicsItem *m_movement_driver;
60 };
61 #endif
ElementsMover::beginMovement
int beginMovement(Diagram *, QGraphicsItem *=nullptr)
ElementsMover::beginMovement Start a new movement.
Definition: elementsmover.cpp:65
ElementsMover::~ElementsMover
virtual ~ElementsMover()
ElementsMover::~ElementsMover Destructor.
Definition: elementsmover.cpp:46
ElementsMover::current_movement_
QPointF current_movement_
Definition: elementsmover.h:56
DynamicElementTextItem
The DynamicElementTextItem class This class provide a simple text field of element who can be added o...
Definition: dynamicelementtextitem.h:39
diagramcommands.h
Conductor::setProperties
void setProperties(const ConductorProperties &property)
Conductor::setProperties Set property as current property of conductor.
Definition: conductor.cpp:1538
Conductor::updatePath
void updatePath(const QRectF &=QRectF())
Definition: conductor.cpp:161
conductor.h
ElementsMover::isReady
bool isReady() const
ElementsMover::isReady.
Definition: elementsmover.cpp:54
conductortextitem.h
elementtextitemgroup.h
DiagramContent
Definition: diagramcontent.h:46
DiagramContent::clear
void clear()
DiagramContent::clear Remove all items from the diagram content.
Definition: diagramcontent.cpp:227
ElementsMover
Definition: elementsmover.h:38
DiagramContent::m_elements
QList< Element * > m_elements
Definition: diagramcontent.h:69
DiagramContent::m_conductors_to_update
QList< Conductor * > m_conductors_to_update
Definition: diagramcontent.h:73
ElementsMover::endMovement
void endMovement()
ElementsMover::endMovement Ended the current movement by creating an undo added to the undostack of t...
Definition: elementsmover.cpp:150
elementsmover.h
ConductorAutoNumerotation::numerate
void numerate()
ConductorAutoNumerotation::numerate execute the automatic numerotation.
Definition: conductorautonumerotation.cpp:56
ElementsMover::ElementsMover
ElementsMover(const ElementsMover &)
ElementsMover::continueMovement
void continueMovement(const QPointF &)
ElementsMover::continueMovement Add a move to the current movement.
Definition: elementsmover.cpp:112
Diagram
The Diagram class This class represents an electric diagram. It manages its various child elements,...
Definition: diagram.h:56
ElementsMover::movement_running_
bool movement_running_
Definition: elementsmover.h:55
QET::Icons::Conductor
QIcon Conductor
Definition: qeticons.cpp:35
Element::AlignedFreeTerminals
QList< QPair< Terminal *, Terminal * > > AlignedFreeTerminals() const
Element::AlignedFreeTerminals.
Definition: element.cpp:1480
ElementsMover::ElementsMover
ElementsMover()
ElementsMover::ElementsMover Constructor.
Definition: elementsmover.cpp:33
DiagramContent::m_texts_groups
QSet< ElementTextItemGroup * > m_texts_groups
Definition: diagramcontent.h:78
AddItemCommand
The AddItemCommand class This command add an item in a diagram The item to add is template,...
Definition: diagramcommands.h:42
element.h
Conductor::properties
ConductorProperties properties
Definition: conductor.h:48
Element
Definition: element.h:41
DiagramContent::count
int count(int=All) const
DiagramContent::count.
Definition: diagramcontent.cpp:401
diagramcontent.h
MoveElementsCommand
The MoveElementsCommand class This command moves some content on a particular diagram.
Definition: diagramcommands.h:132
conductorautonumerotation.h
ConductorAutoNumerotation
The ConductorAutoNumerotation class.
Definition: conductorautonumerotation.h:33
independenttextitem.h
DiagramContent::m_element_texts
QSet< DynamicElementTextItem * > m_element_texts
Definition: diagramcontent.h:77
ElementTextItemGroup
The ElementTextItemGroup class This class represent a group of element text Texts in the group can be...
Definition: elementtextitemgroup.h:36
Conductor::relatedPotentialConductors
QSet< Conductor * > relatedPotentialConductors(const bool all_diagram=true, QList< Terminal * > *t_list=nullptr)
Conductor::relatedPotentialConductors Return all conductors at the same potential of this conductor,...
Definition: conductor.cpp:1647
ConductorProperties
The ConductorProperties class This class represents the functional properties of a particular conduct...
Definition: conductorproperties.h:68
DiagramContent::items
QList< QGraphicsItem * > items(int=All) const
DiagramContent::items.
Definition: diagramcontent.cpp:374
dynamicelementtextitem.h
DiagramContent::removeNonMovableItems
int removeNonMovableItems()
DiagramContent::removeNonMovableItems Remove all non movable item.
Definition: diagramcontent.cpp:247
ElementsMover::m_movement_driver
QGraphicsItem * m_movement_driver
Definition: elementsmover.h:58
Conductor
Definition: conductor.h:43
ElementsMover::diagram_
Diagram * diagram_
Definition: elementsmover.h:57
ConductorTextItem
Definition: conductortextitem.h:30
diagramimageitem.h
QET::Icons::tr
QIcon tr
Definition: qeticons.cpp:206
ElementsMover::m_moved_content
DiagramContent m_moved_content
Definition: elementsmover.h:59
diagram.h