4
0
mirror of https://github.com/QuasarApp/CopyrightFixer.git synced 2025-05-10 00:19:45 +00:00

Merge pull request from QuasarApp/task_27

Created a class for collect information about signature.
This commit is contained in:
Igor loschinin 2021-04-19 22:23:33 +03:00 committed by GitHub
commit 800b69f77d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 110 additions and 0 deletions
src/CopyrighFixer/CopyrighFixer

@ -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 "sign.h"
#include "owner.h"
namespace CopyrighFixer {
Signature::Signature() {
}
void Signature::setlistOwners(const QList<Owner> &objOwner) {
ownersList = objOwner;
}
void Signature::setLicenseTitle(const QString &strTitle) {
licenseTitle = strTitle;
}
void Signature::setMessage(const QString &strMsg) {
customMessage = strMsg;
}
const QList<Owner> &Signature::getLstOwn() const {
return ownersList;
}
const QString &Signature::getLicenseTitle() const {
return licenseTitle;
}
const QString &Signature::getMessage() const {
return customMessage;
}
}

@ -0,0 +1,70 @@
//#
//# 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 SIGN_H
#define SIGN_H
#include "CopyrighFixer_global.h"
#include "CopyrighFixer/owner.h"
#include <QString>
#include <QList>
namespace CopyrighFixer {
/**
* @brief The Signature class adds a copyright signature to each file based on the collected owner information.
*/
class CopyrighFixer_EXPORT Signature {
public:
Signature();
/**
* @brief setlistOwners The method generates a list of owners.
* @param objOwner This is a structure with information about the owner.
*/
void setlistOwners(const QList<Owner> &objOwner);
/**
* @brief setLicenseTitle The method sets the copyright message.
* @param strTitle A string that contains copyright information.
*/
void setLicenseTitle(const QString &strTitle);
/**
* @brief setMessage Method adds custom message.
* @param strMsg Meaningful message with complementary information.
*/
void setMessage(const QString &strMsg);
/**
* @brief getLstOwn The method allows you to get the current list of owners.
* @return List of owners with full information.
*/
const QList<Owner>& getLstOwn() const;
/**
* @brief getLicenseTitle Allows you to get a license description.
* @return A string with license title.
*/
const QString& getLicenseTitle() const;
/**
* @brief getMessage The method retutns a custom message with additional information.
* @return Custom message.
*/
const QString& getMessage() const;
private:
QList<Owner> ownersList;
QString licenseTitle;
QString customMessage;
};
}
#endif // SIGN_H