QElectroTech 0.200.1-dev
Loading...
Searching...
No Matches
elementcollectionhandler.h
Go to the documentation of this file.
1/*
2 Copyright 2006-2026 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 ELEMENTCOLLECTIONHANDLER_H
19#define ELEMENTCOLLECTIONHANDLER_H
20
22#include "elementslocation.h"
23
24class QWidget;
25
32{
33 public:
35 ElementsLocation &destination);
36 virtual ~ECHStrategy();
37 virtual ElementsLocation copy() =0;
38
40};
41
48{
49 public:
51 ElementsLocation &destination);
52 ElementsLocation copy() override;
53
54 private:
56 ElementsLocation &source,
57 ElementsLocation &destination,
58 const QString& rename = QString());
60 ElementsLocation &source,
61 ElementsLocation &destination,
62 const QString& rename = QString());
63};
64
71{
72 public:
74 ElementsLocation &destination);
75 ElementsLocation copy() override;
76
77 private:
79 ElementsLocation &source,
80 ElementsLocation &destination,
81 const QString& rename = QString());
83 ElementsLocation &source,
84 ElementsLocation &destination,
85 const QString& rename = QString());
86};
87
95class ECHSToXml : public ECHStrategy
96{
97 public:
99 ElementsLocation &destination);
100 ElementsLocation copy() override;
101};
102
109{
110 public:
113
115 ElementsLocation &destination);
117 const QString &name,
118 const NamesList &name_list);
119 bool importFromProject (QETProject *project,
120 ElementsLocation &location);
121 bool setNames(ElementsLocation &location,
122 const NamesList &name_list);
123
124 private:
126};
127
128#endif // ELEMENTCOLLECTIONHANDLER_H
ElementsLocation copy() override
Definition elementcollectionhandler.cpp:44
ElementsLocation copyElement(ElementsLocation &source, ElementsLocation &destination, const QString &rename=QString())
Definition elementcollectionhandler.cpp:136
ElementsLocation copyDirectory(ElementsLocation &source, ElementsLocation &destination, const QString &rename=QString())
Definition elementcollectionhandler.cpp:82
ECHSFileToFile(ElementsLocation &source, ElementsLocation &destination)
Definition elementcollectionhandler.cpp:40
ECHSToXml(ElementsLocation &source, ElementsLocation &destination)
Definition elementcollectionhandler.cpp:280
ElementsLocation copy() override
Definition elementcollectionhandler.cpp:284
ECHSXmlToFile(ElementsLocation &source, ElementsLocation &destination)
Definition elementcollectionhandler.cpp:171
ElementsLocation copyElement(ElementsLocation &source, ElementsLocation &destination, const QString &rename=QString())
Definition elementcollectionhandler.cpp:260
ElementsLocation copy() override
Definition elementcollectionhandler.cpp:175
ElementsLocation copyDirectory(ElementsLocation &source, ElementsLocation &destination, const QString &rename=QString())
Definition elementcollectionhandler.cpp:213
The ECHStrategy class Abstract class for manage copy of directory or element from a collection to ano...
Definition elementcollectionhandler.h:32
ECHStrategy(ElementsLocation &source, ElementsLocation &destination)
Definition elementcollectionhandler.cpp:30
ElementsLocation m_source
Definition elementcollectionhandler.h:39
virtual ~ECHStrategy()
Definition elementcollectionhandler.cpp:36
virtual ElementsLocation copy()=0
ElementsLocation m_destination
Definition elementcollectionhandler.h:39
bool importFromProject(QETProject *project, ElementsLocation &location)
ElementCollectionHandler::importFromProject Import the element represented by location to the embedde...
Definition elementcollectionhandler.cpp:413
ElementCollectionHandler()
ElementCollectionHandler::ElementCollectionHandler.
Definition elementcollectionhandler.cpp:313
bool setNames(ElementsLocation &location, const NamesList &name_list)
ElementCollectionHandler::setNames Set the names stored in name_list as the names of the item represe...
Definition elementcollectionhandler.cpp:462
ECHStrategy * m_strategy
Definition elementcollectionhandler.h:125
ElementsLocation copy(ElementsLocation &source, ElementsLocation &destination)
ElementCollectionHandler::copy Copy the content of collection represented by source to the collection...
Definition elementcollectionhandler.cpp:329
~ElementCollectionHandler()
Definition elementcollectionhandler.cpp:315
ElementsLocation createDir(ElementsLocation &parent, const QString &name, const NamesList &name_list)
ElementCollectionHandler::createDir Create a directory with name as child of parent....
Definition elementcollectionhandler.cpp:352
The ElementsLocation class This class represents the location, the location of an element or of a cat...
Definition elementslocation.h:47
Definition nameslist.h:37
Definition qetproject.h:77