QElectroTech 0.100.0-dev
Loading...
Searching...
No Matches
elementcollectionhandler.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 ELEMENTCOLLECTIONHANDLER_H
19#define ELEMENTCOLLECTIONHANDLER_H
20
21#include "../NameList/nameslist.h"
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
The ECHSFileToFile class Manage the copy of directory or element from a file system collection to ano...
Definition elementcollectionhandler.h:48
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
The ECHSToXml class Manage the copy of a directory or element from a collection (no matter if the sou...
Definition elementcollectionhandler.h:96
ElementsLocation copy() override
Definition elementcollectionhandler.cpp:278
The ECHSXmlToFile class Manage the copy of a directory or element from an xml collection to a file.
Definition elementcollectionhandler.h:71
ElementsLocation copyElement(ElementsLocation &source, ElementsLocation &destination, const QString &rename=QString())
Definition elementcollectionhandler.cpp:254
ElementsLocation copy() override
Definition elementcollectionhandler.cpp:169
ElementsLocation copyDirectory(ElementsLocation &source, ElementsLocation &destination, const QString &rename=QString())
Definition elementcollectionhandler.cpp:207
The ECHStrategy class Abstract class for manage copy of directory or element from a collection to ano...
Definition elementcollectionhandler.h:32
ElementsLocation m_source
Definition elementcollectionhandler.h:39
virtual ~ECHStrategy()
Definition elementcollectionhandler.cpp:36
virtual ElementsLocation copy()=0
ElementsLocation m_destination
Definition elementcollectionhandler.h:39
The ElementCollectionHandler class Provide several method to copy element or directory from a collect...
Definition elementcollectionhandler.h:109
bool importFromProject(QETProject *project, ElementsLocation &location)
ElementCollectionHandler::importFromProject Import the element represented by location to the embedde...
Definition elementcollectionhandler.cpp:407
ElementCollectionHandler()
ElementCollectionHandler::ElementCollectionHandler.
Definition elementcollectionhandler.cpp:307
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:456
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:323
~ElementCollectionHandler()
Definition elementcollectionhandler.cpp:309
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:346
The ElementsLocation class This class represents the location, the location of an element or of a cat...
Definition elementslocation.h:47
Definition nameslist.h:31
Definition qetproject.h:62