You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
AppFlow/FITK_Kernel/FITKAppFramework/FITKAbstractAutoSaver.h

95 lines
2.5 KiB
C

/**
*
* @file FITKAbstractAutoSaver.h
* @brief
* @author libaojun (libaojunqd@foxmail.com)
* @date 2024-09-13
*
*/
#ifndef _FITKABSTRACT_AUTO_SAVER_H___
#define _FITKABSTRACT_AUTO_SAVER_H___
#include "FITKAppFrameworkAPI.h"
#include <QObject>
class QTimer;
namespace AppFrame
{
/**
* @brief
* @author libaojun (libaojunqd@foxmail.com)
* @date 2024-09-13
*/
class FITKAppFrameworkAPI FITKAbstractAutoSaver : public QObject
{
Q_OBJECT
public:
/**
* @brief Construct a new FITKAbstractAutoSaver object
* @param[i] msc
* @author libaojun (libaojunqd@foxmail.com)
* @date 2024-09-13
*/
explicit FITKAbstractAutoSaver(const int & msc = 120000);
/**
* @brief Destroy the FITKAbstractAutoSaver object
* @author libaojun (libaojunqd@foxmail.com)
* @date 2024-09-13
*/
virtual ~FITKAbstractAutoSaver();
/**
* @brief
* @author libaojun (libaojunqd@foxmail.com)
* @date 2024-09-13
*/
virtual void start();
/**
* @brief
* @author libaojun (libaojunqd@foxmail.com)
* @date 2024-09-13
*/
virtual void stop();
/**
* @brief 2
* @param[i] msc
* @author libaojun (libaojunqd@foxmail.com)
* @date 2024-09-13
*/
void setTimeInterval(const int & msc =120000 );
/**
* @brief
* @author libaojun (libaojunqd@foxmail.com)
* @date 2024-09-13
*/
virtual void autoSave() = 0;
/**
* @brief
* @author libaojun (libaojunqd@foxmail.com)
* @date 2024-09-13
*/
virtual void finalize() = 0;
private slots:
/**
* @brief
* @author libaojun (libaojunqd@foxmail.com)
* @date 2024-09-13
*/
void timeOutSlot();
private:
/**
* @brief
* @author libaojun (libaojunqd@foxmail.com)
* @date 2024-09-13
*/
QTimer* _timer{};
};
}
#endif