Merge pull request #44 from QuasarApp/task_26

Added class for collect session conf
This commit is contained in:
Igor loschinin 2021-04-21 22:04:50 +03:00 committed by GitHub
commit 883dd73846
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 109 additions and 1 deletions

View File

@ -0,0 +1,40 @@
//#
//# Copyright (C) 2021-2021 QuasarApp.
//# 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.
//#
#include "config.h"
namespace CopyrighFixer {
Config::Config() {
}
void Config::setSourceDir(const QString &pathToDir) {
sourceDirPath = pathToDir;
}
void Config::setSingValue(const Signature &value) {
signValue = value;
}
void Config::setCurrOwn(const QString &owner) {
currentOwner = owner;
}
const QString &Config::getSrcDir() const {
return sourceDirPath;
}
const Signature &Config::getSignVal() const {
return signValue;
}
const QString &Config::getCurrentOwn() const {
return currentOwner;
}
}

View File

@ -0,0 +1,69 @@
//#
//# Copyright (C) 2021-2021 QuasarApp.
//# 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.
//#
#ifndef CONFIG_H
#define CONFIG_H
#include "CopyrighFixer_global.h"
#include "CopyrighFixer/sign.h"
#include <QString>
namespace CopyrighFixer {
/**
* @brief The Config class collects information about the current session
*/
class CopyrighFixer_EXPORT Config {
public:
Config();
/**
* @brief setSourceDir This method sets path to the source directory.
* @param pathToDir Path to the directory in which the files are to be signed. Example: /path/to/sources/dir
*/
void setSourceDir(const QString &pathToDir);
/**
* @brief setSingValue This method sets a new value of the signatura.
* @param value it is an object with a signature.
*/
void setSingValue(const Signature &value);
/**
* @brief setCurrOwn This method sets the current owners.
* @param owner Current owner.
*/
void setCurrOwn(const QString &owner);
/**
* @brief getSrcDir This method return the path to the directory with files for signature.
* @return The path to the directory.
*/
const QString &getSrcDir() const;
/**
* @brief getSignVal This method return objecte with a copyright.
* @return Objecte This is a new signature object.
*/
const Signature &getSignVal() const;
/**
* @brief getCurrentOwn This method return the name current owner.
* @return The object of a current owner.
*/
const QString &getCurrentOwn() const;
private:
QString sourceDirPath;
Signature signValue;
QString currentOwner;
};
}
#endif // CONFIG_H

View File

@ -10,7 +10,6 @@
#include "CopyrighFixer_global.h"
#include "CopyrighFixer/owner.h"
#include <QString>
#include <QList>