mirror of
https://github.com/QuasarApp/CopyrightFixer.git
synced 2025-04-26 01:34:40 +00:00
Merge pull request #34 from QuasarApp/task_28
fix #28 Created class about information owner
This commit is contained in:
commit
5ef2f4db4d
31
src/CopyrighFixer/CopyrighFixer/owner.cpp
Normal file
31
src/CopyrighFixer/CopyrighFixer/owner.cpp
Normal 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;
|
||||
}
|
||||
|
||||
};
|
54
src/CopyrighFixer/CopyrighFixer/owner.h
Normal file
54
src/CopyrighFixer/CopyrighFixer/owner.h
Normal 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
|
Loading…
x
Reference in New Issue
Block a user