QElectroTech  0.70
elementsmover.h
Go to the documentation of this file.
1 /*
2  Copyright 2006-2019 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
void continueMovement(const QPointF &)
ElementsMover::continueMovement Add a move to the current movement.
virtual ~ElementsMover()
ElementsMover::~ElementsMover Destructor.
bool movement_running_
Definition: elementsmover.h:55
QGraphicsItem * m_movement_driver
Definition: elementsmover.h:58
QPointF current_movement_
Definition: elementsmover.h:56
bool isReady() const
ElementsMover::isReady.
void endMovement()
ElementsMover::endMovement Ended the current movement by creating an undo added to the undostack of t...
DiagramContent m_moved_content
Definition: elementsmover.h:59
int beginMovement(Diagram *, QGraphicsItem *=nullptr)
ElementsMover::beginMovement Start a new movement.
ElementsMover()
ElementsMover::ElementsMover Constructor.
Diagram * diagram_
Definition: elementsmover.h:57