Merge pull request #34 from QuasarApp/task_28

fix #28 Created class about information owner
This commit is contained in:
Igor loschinin 2021-04-17 22:54:58 +03:00 committed by GitHub
commit 5ef2f4db4d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 85 additions and 0 deletions

View File

@ -0,0 +1,31 @@
//#
//# 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 "owner.h"
namespace CopyrighFixer {
Owner::Owner() {
}
void Owner::setName(const QString &ownerName) {
Owner::name = ownerName;
}
QString Owner::getOwnerName() {
return Owner::name;
}
void Owner::setTimeRange(const QString &interval) {
timeRange = interval;
}
QString Owner::getTimeRange() {
return Owner::timeRange;
}
};

View File

@ -0,0 +1,54 @@
//#
//# 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 OWNER_H
#define OWNER_H
#include "CopyrighFixer_global.h"
#include <QString>
namespace CopyrighFixer{
/**
* @brief The Owner class for collect information about owner.
*/
class CopyrighFixer_EXPORT Owner
{
public:
Owner();
/**
* @brief setName The method will save the name of the owner who last used it
* @param ownerName This is name of the owner.
*/
void setName(const QString &ownerName);
/**
* @brief getOwnerName The method allows you to get information about the owner.
* @return the owner name.
*/
QString getOwnerName();
/**
* @brief setTimeRange A method that allows you to set the time interval for using a file.
* @param interval This is a string value indicating the date of ownership of the file.
*/
void setTimeRange(const QString &interval);
/**
* @brief getTimeRange The method changes the timestamp of the usage.
* @return the time interval when the file was modified
*/
QString getTimeRange();
private:
QString name;
QString timeRange;
};
};
#endif // OWNER_H