Documentation for OpenFLUID 2.2.2
Loading...
Searching...
No Matches
WaresDevPackage.hpp
Go to the documentation of this file.
1/*
2
3 This file is part of OpenFLUID software
4 Copyright(c) 2021-2026, INRAE
5
6
7 == GNU General Public License Usage ==
8
9 OpenFLUID is free software: you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation, either version 3 of the License, or
12 (at your option) any later version.
13
14 OpenFLUID is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
18
19 You should have received a copy of the GNU General Public License
20 along with OpenFLUID. If not, see <http://www.gnu.org/licenses/>.
21
22
23 == Other Usage ==
24
25 Other Usage means a use of OpenFLUID that is inconsistent with the GPL
26 license, and requires a written agreement between You and INRA.
27 Licensees for Other Usage of OpenFLUID may use this file in accordance
28 with the terms contained in the written agreement between You and INRA.
29
30 */
31
32
33/**
34 @file WaresDevPackage.hpp
35
36 @author Aline LIBRES <aline.libres@gmail.com>
37*/
38
39
40#ifndef __OPENFLUID_UIWARESDEV_WARESDEVPACKAGE_HPP__
41#define __OPENFLUID_UIWARESDEV_WARESDEVPACKAGE_HPP__
42
43
44#include <QString>
45#include <QMap>
46#include <QDir>
47#include <QProcess>
48
52
53
54namespace openfluid { namespace ui { namespace waresdev {
55
56
57class OPENFLUID_API WaresDevPackage: public QObject
58{
59 Q_OBJECT
60
61 private slots:
62
63 void processStandardOutput();
64
65 void processErrorOutput();
66
67
68 protected:
69
71
72 QStringList m_WaresPaths;
73
74 QString m_Packagers;
75
77
79
81
83
85
86 QProcess* mp_Process = nullptr;
87
88 WaresDevPackage(const QString& PackageFilePath, const QString& TempSubFolderName);
89
91
92
93 signals:
94
95 void info(const QString& Message);
96
97 void error(const QString& Message);
98
99 void finished(bool Ok, const QString& Message);
100
101 void progressed(int Value);
102
103
104 public:
105
107
108 QStringList getWaresPaths();
109
110 QString getPackagers();
111
113
115
116};
117
118
119// =====================================================================
120// =====================================================================
121
122
124{
125 Q_OBJECT
126
127 private:
128
129 void writeConfFile();
130
131 void compress();
132
133
134 public slots:
135
137
138
139 public:
140
141 WaresDevExportPackage(const QString& PackageFilePath, const QStringList& WaresPaths,
142 const QString& Packagers, const QString& PackageDescription);
143
144};
145
146
147// =====================================================================
148// =====================================================================
149
150
152{
153 Q_OBJECT
154
155 private:
156
157 QStringList m_SelectedWarePaths;
158
159 void uncompress();
160
161 void readConfFile();
162
163
164 public slots:
165
167
168 void copyWares();
169
170
171 public:
172
173 WaresDevImportPackage(const QString& PackageFilePath);
174
175 void setSelectedWares(const QStringList& SelectedWarePaths);
176
177};
178
179
180} } } // namespaces
181
182
183#endif /* __OPENFLUID_UIWARESDEV_WARESDEVPACKAGE_HPP__ */
Definition WaresDevPackage.hpp:124
WaresDevExportPackage(const QString &PackageFilePath, const QStringList &WaresPaths, const QString &Packagers, const QString &PackageDescription)
Definition WaresDevPackage.hpp:152
void setSelectedWares(const QStringList &SelectedWarePaths)
WaresDevImportPackage(const QString &PackageFilePath)
Definition WaresDevPackage.hpp:58
void createAndLauchProcess(const openfluid::utils::Process::Command &Command)
QString m_PackageName
Definition WaresDevPackage.hpp:78
QString m_Packagers
Definition WaresDevPackage.hpp:74
QDir m_PackageTempDir
Definition WaresDevPackage.hpp:80
QString m_PackageTempPath
Definition WaresDevPackage.hpp:82
void error(const QString &Message)
QStringList m_WaresPaths
Definition WaresDevPackage.hpp:72
QString m_PackageFilePath
Definition WaresDevPackage.hpp:70
void info(const QString &Message)
WaresDevPackage(const QString &PackageFilePath, const QString &TempSubFolderName)
void finished(bool Ok, const QString &Message)
QString m_ConfFilePath
Definition WaresDevPackage.hpp:84
QString m_PackageDescription
Definition WaresDevPackage.hpp:76
#define OPENFLUID_API
Definition dllexport.hpp:86
Definition ApplicationException.hpp:47
Definition Process.hpp:95