CQtDeployer/Deploy/envirement.h

50 lines
1.3 KiB
C
Raw Normal View History

2019-09-23 16:46:57 +03:00
//#
2019-12-08 13:57:20 +03:00
//# Copyright (C) 2018-2020 QuasarApp.
2019-09-23 16:46:57 +03:00
//# Distributed under the lgplv3 software license, see the accompanying
//# Everyone is permitted to copy and distribute verbatim copies
//# of this license document, but changing it is not allowed.
//#
2019-09-07 12:01:20 +03:00
#ifndef ENVIREMENT_H
#define ENVIREMENT_H
2019-09-14 15:51:23 +03:00
#include <QSet>
2019-09-07 12:01:20 +03:00
#include <QStringList>
2019-09-09 21:19:44 +03:00
#include "deploy_global.h"
2019-09-07 12:01:20 +03:00
class QDir;
2019-09-09 21:19:44 +03:00
class DEPLOYSHARED_EXPORT Envirement
2019-09-07 12:01:20 +03:00
{
private:
2020-02-26 14:29:04 +03:00
Envirement *_ignoreEnvList = nullptr;
QSet<QString> _dataEnvironment;
2019-09-07 12:01:20 +03:00
2019-12-20 17:25:20 +03:00
QSet<QString> upper(const QSet<QString> &set) const;
2019-09-07 12:01:20 +03:00
public:
Envirement();
2020-02-26 14:29:04 +03:00
~Envirement();
QStringList environmentList() const;
2019-09-07 12:01:20 +03:00
QStringList ignoreEnvList() const;
void setIgnoreEnvList(const QStringList &ignoreEnvList);
2020-05-06 13:35:13 +03:00
void setIgnoreEnvListRecursive(const QStringList &ignoreEnvList, int depch = -1);
2019-09-07 12:36:20 +03:00
2020-02-26 14:29:04 +03:00
void addEnvRec(const QString &dir, int depch);
void addEnv(const QString &dir);
void addEnv(const QStringList &listDirs);
2020-07-28 23:56:34 +03:00
void clear();
2019-09-22 21:55:04 +03:00
// return true if file exits in this envirement
bool inThisEnvirement(const QString &file) const;
2019-09-07 12:36:20 +03:00
int size() const;
2019-09-08 13:37:33 +03:00
QString concatEnv() const;
2020-02-26 14:29:04 +03:00
static QStringList recursiveInvairement(QDir &dir, int depch, int depchLimit = -1);
static QStringList recursiveInvairement(const QString &dir, int depch = -1);
2019-09-07 12:01:20 +03:00
};
#endif // ENVIREMENT_H