QElectroTech 0.100.0-dev
Loading...
Searching...
No Matches
qgimanager.h
Go to the documentation of this file.
1/*
2 Copyright 2006-2024 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
21#include <QtCore>
22
23class QGraphicsScene;
24class QGraphicsItem;
25
31 // constructors, destructors
32 public:
33 QGIManager(QGraphicsScene *);
34 virtual ~QGIManager();
35 private:
37
38 // attributes
39 private:
40 QGraphicsScene *scene;
41 QHash<QGraphicsItem *, int> qgi_manager;
43
44 // methods
45 public:
46 void manage(QGraphicsItem *);
47 void release(QGraphicsItem *);
48 QT_DEPRECATED_X("Use QGIManager::manage(const QVector<QGraphicsItem *> &) instead")
49 void manage(const QList<QGraphicsItem *> &);
50 QT_DEPRECATED_X("Use QGIManager::release(const QVector<QGraphicsItem *> &) instead")
51 void release(const QList<QGraphicsItem *> &);
52 void manage(const QVector<QGraphicsItem *> &items);
53 void release(const QVector<QGraphicsItem *> &items);
54 void setDestroyQGIOnDelete(bool);
55 bool manages(QGraphicsItem *) const;
56};
57#endif
Definition qgimanager.h:30
void manage(QGraphicsItem *)
Definition qgimanager.cpp:52
void setDestroyQGIOnDelete(bool)
Definition qgimanager.cpp:108
QHash< QGraphicsItem *, int > qgi_manager
Definition qgimanager.h:41
virtual ~QGIManager()
Definition qgimanager.cpp:40
bool destroy_qgi_on_delete
Definition qgimanager.h:42
QGIManager(const QGIManager &)
QGraphicsScene * scene
Definition qgimanager.h:40
void release(QGraphicsItem *)
Definition qgimanager.cpp:64
bool manages(QGraphicsItem *) const
Definition qgimanager.cpp:117