You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
55 lines
1.4 KiB
55 lines
1.4 KiB
4 years ago
|
#ifndef ENHANCE_H
|
||
|
#define ENHANCE_H
|
||
|
|
||
|
#include <QMetaType>
|
||
|
#include <QString>
|
||
|
#include <QObject>
|
||
|
#include <QtSql>
|
||
|
#include <QDebug>
|
||
|
|
||
|
#include "model/databaseManager/utils/initializationUtils.h"
|
||
|
|
||
|
/*************************************************************************************************/
|
||
|
/**
|
||
|
* @brief Database dto dtructure for Enhance
|
||
|
* @author Mohammad Mohsen Talaie
|
||
|
* @details
|
||
|
* @date 20 sep 2020
|
||
|
*/
|
||
|
/*************************************************************************************************/
|
||
|
typedef struct DbmDtoEnhance
|
||
|
{
|
||
|
QList<float> alpha;
|
||
|
QList<float> sigma;
|
||
|
int logFilterSize;
|
||
|
bool isActive;
|
||
|
}DbmDtoEnhance;
|
||
|
|
||
|
Q_DECLARE_METATYPE(DbmDtoEnhance)
|
||
|
|
||
|
/*************************************************************************************************/
|
||
|
/**
|
||
|
* @brief Database Class for Enhance
|
||
|
* @author Mohammad Mohsen Talaie
|
||
|
* @details
|
||
|
* @date 20 sep 2020
|
||
|
*/
|
||
|
/*************************************************************************************************/
|
||
|
class DbmEnhance
|
||
|
{
|
||
|
public:
|
||
|
static bool getEnhance(QSqlTableModel* tableModel, DbmDtoEnhance& enhance)
|
||
|
{
|
||
|
tableModel->setTable("Enhance");
|
||
|
tableModel->setFilter(QString("isActive = 1"));
|
||
|
bool ret = tableModel->select();
|
||
|
INIT_SINGLE(enhance, tableModel, logFilterSize, Int, 0);
|
||
|
INIT_LIST(enhance, tableModel, sigma, Double, 0);
|
||
|
INIT_LIST(enhance, tableModel, alpha, Double, 0);
|
||
|
|
||
|
return ret;
|
||
|
}
|
||
|
};
|
||
|
|
||
|
#endif //ENHANCE_H
|