QElectroTech  0.8-dev
qgimanager.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 QGI_MANAGER_H
19 #define QGI_MANAGER_H
20 #include <QtCore>
21 #include <QGraphicsScene>
22 #include <QGraphicsItem>
27 class QGIManager {
28  // constructors, destructors
29  public:
30  QGIManager(QGraphicsScene *);
31  virtual ~QGIManager();
32  private:
34 
35  // attributes
36  private:
37  QGraphicsScene *scene;
38  QHash<QGraphicsItem *, int> qgi_manager;
40 
41  // methods
42  public:
43  void manage(QGraphicsItem *);
44  void release(QGraphicsItem *);
45  void manage(const QList<QGraphicsItem *> &);
46  void release(const QList<QGraphicsItem *> &);
47  void setDestroyQGIOnDelete(bool);
48  bool manages(QGraphicsItem *) const;
49 };
50 #endif
qgimanager.h
QGIManager::QGIManager
QGIManager(QGraphicsScene *)
Definition: qgimanager.cpp:24
QGIManager::scene
QGraphicsScene * scene
Definition: qgimanager.h:37
QGIManager::destroy_qgi_on_delete
bool destroy_qgi_on_delete
Definition: qgimanager.h:39
QGIManager::qgi_manager
QHash< QGraphicsItem *, int > qgi_manager
Definition: qgimanager.h:38
QGIManager::setDestroyQGIOnDelete
void setDestroyQGIOnDelete(bool)
Definition: qgimanager.cpp:92
QGIManager::release
void release(QGraphicsItem *)
Definition: qgimanager.cpp:60
QGIManager
Definition: qgimanager.h:27
QGIManager::QGIManager
QGIManager(const QGIManager &)
QGIManager::manage
void manage(QGraphicsItem *)
Definition: qgimanager.cpp:48
QGIManager::~QGIManager
virtual ~QGIManager()
Definition: qgimanager.cpp:37
QGIManager::manages
bool manages(QGraphicsItem *) const
Definition: qgimanager.cpp:101