Progress
This commit is contained in:
@@ -81,6 +81,7 @@ public:
|
||||
virtual qint32 existsGroup(const QString& szGroup) = 0;
|
||||
virtual qint32 existsIngredient(qint32 id, qint16 ingredientNumber) = 0;
|
||||
virtual qint32 create(const QString& szName, const QString& szGroup) = 0;
|
||||
virtual bool deleteIngredient(qint32 id) = 0;
|
||||
virtual qint32 createGroup(const QString& szGroup) = 0;
|
||||
virtual bool set(qint32 id, qint16 ingredientNumber, qreal value) = 0;
|
||||
virtual bool setName(qint32 id, const QString& szName) = 0;
|
||||
|
||||
@@ -73,7 +73,7 @@ void cImportIngredientDialog::setPluginList(const QList<cPlugin*> pluginList, co
|
||||
}
|
||||
}
|
||||
|
||||
void cImportIngredientDialog::setIngredientGroupList(const QStringList ingredientGroupList)
|
||||
void cImportIngredientDialog::setIngredientGroupList(const QStringList &ingredientGroupList)
|
||||
{
|
||||
ui->m_lpIngredientGroup->addItems(ingredientGroupList);
|
||||
|
||||
@@ -83,6 +83,11 @@ void cImportIngredientDialog::setIngredientGroupList(const QStringList ingredien
|
||||
ui->m_lpIngredientGroup->setCurrentIndex(index);
|
||||
}
|
||||
|
||||
void cImportIngredientDialog::setIngredientGroup(const QString& szIngredientGroup)
|
||||
{
|
||||
ui->m_lpIngredientGroup->setCurrentText(szIngredientGroup);
|
||||
}
|
||||
|
||||
QString cImportIngredientDialog::pluginSelected()
|
||||
{
|
||||
return(ui->m_lpSource->currentText());
|
||||
|
||||
@@ -64,7 +64,8 @@ public:
|
||||
|
||||
QString pluginSelected();
|
||||
|
||||
void setIngredientGroupList(const QStringList ingredientGroupList);
|
||||
void setIngredientGroupList(const QStringList& ingredientGroupList);
|
||||
void setIngredientGroup(const QString& szIngredientGroup);
|
||||
private:
|
||||
Ui::cImportIngredientDialog* ui; /*!< TODO: describe */
|
||||
QStandardItemModel* m_lpIngredientListModel; /*!< TODO: describe */
|
||||
|
||||
+14
-1
@@ -188,7 +188,7 @@ cIngredient::cIngredient() :
|
||||
cIngredient::cIngredient(const QString &szIngredientName, const QString& szIngredientGroup) :
|
||||
m_szIngredientName(szIngredientName),
|
||||
m_szIngredientGroup(szIngredientGroup),
|
||||
m_iID(0)
|
||||
m_iID(-1)
|
||||
{
|
||||
for(int z = 0;z < iIngredientMax;z++)
|
||||
m_dValue[z] = -1;
|
||||
@@ -221,6 +221,9 @@ bool cIngredient::save(cPlugin* lpDB)
|
||||
if(!lpDB)
|
||||
return(false);
|
||||
|
||||
if(m_szIngredientName.isEmpty())
|
||||
return(false);
|
||||
|
||||
cDBInterface* lpInterface = lpDB->dbInterface();
|
||||
|
||||
lpInterface->beginTransaction();
|
||||
@@ -262,11 +265,21 @@ bool cIngredient::save(cPlugin* lpDB)
|
||||
return(true);
|
||||
}
|
||||
|
||||
void cIngredient::setIngredientName(const QString& szIngredientName)
|
||||
{
|
||||
m_szIngredientName = szIngredientName;
|
||||
}
|
||||
|
||||
QString cIngredient::ingredientName()
|
||||
{
|
||||
return(m_szIngredientName);
|
||||
}
|
||||
|
||||
void cIngredient::setIngredientGroup(const QString& szIngredientGroup)
|
||||
{
|
||||
m_szIngredientGroup = szIngredientGroup;
|
||||
}
|
||||
|
||||
QString cIngredient::ingredientGroup()
|
||||
{
|
||||
return(m_szIngredientGroup);
|
||||
|
||||
@@ -238,7 +238,9 @@ public:
|
||||
*/
|
||||
bool save(cPlugin* lpDB);
|
||||
|
||||
void setIngredientName(const QString& szIngredientName);
|
||||
QString ingredientName();
|
||||
void setIngredientGroup(const QString& szIngredientGroup);
|
||||
QString ingredientGroup();
|
||||
QStringList groups();
|
||||
/*!
|
||||
@@ -259,6 +261,7 @@ public:
|
||||
void operator=(const cIngredient& D)
|
||||
{
|
||||
m_szIngredientName = D.m_szIngredientName;
|
||||
m_szIngredientGroup = D.m_szIngredientGroup;
|
||||
m_iID = D.m_iID;
|
||||
for(int z = 0;z < iIngredientMax;z++)
|
||||
m_dValue[z] = D.m_dValue[z];
|
||||
@@ -269,6 +272,9 @@ public:
|
||||
if(m_szIngredientName != D.m_szIngredientName)
|
||||
return(false);
|
||||
|
||||
if(m_szIngredientGroup != D.m_szIngredientGroup)
|
||||
return(false);
|
||||
|
||||
if(m_iID != D.m_iID)
|
||||
return(false);
|
||||
|
||||
|
||||
+121
-6
@@ -4,11 +4,14 @@
|
||||
#include "cingredientvalue.h"
|
||||
|
||||
#include <QStandardItem>
|
||||
#include <QMessageBox>
|
||||
#include <QMdiSubWindow>
|
||||
|
||||
|
||||
cIngredientWindow::cIngredientWindow(QWidget *parent) :
|
||||
QWidget(parent),
|
||||
ui(new Ui::cIngredientWindow)
|
||||
ui(new Ui::cIngredientWindow),
|
||||
m_bIsInitialized(false)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
ui->m_lpIngredientValues->setMinimumWidth(1);
|
||||
@@ -20,6 +23,12 @@ cIngredientWindow::cIngredientWindow(QWidget *parent) :
|
||||
ui->m_lpRevert->setEnabled(false);
|
||||
|
||||
connect(ui->m_lpIngredientValues, &QTreeView::doubleClicked, this, &cIngredientWindow::ingredientEdit);
|
||||
connect(ui->m_lpIngredientName, &QLineEdit::textChanged, this, &cIngredientWindow::nameChanged);
|
||||
connect(ui->m_lpIngredientGroup, &QComboBox::currentTextChanged, this, &cIngredientWindow::groupChanged);
|
||||
|
||||
connect(ui->m_lpSave, &QPushButton::clicked, this, &cIngredientWindow::saveClicked);
|
||||
connect(ui->m_lpRevert, &QPushButton::clicked, this, &cIngredientWindow::revertClicked);
|
||||
connect(ui->m_lpClose, &QPushButton::clicked, this, &cIngredientWindow::closeClicked);
|
||||
}
|
||||
|
||||
cIngredientWindow::~cIngredientWindow()
|
||||
@@ -75,6 +84,8 @@ void cIngredientWindow::setIngredient(QStandardItem *lpItem, cPlugin* lpPlugin)
|
||||
m_lpItem->setText(QString("%1").arg(m_ingredientSaved.ingredientName()));
|
||||
ui->m_lpSave->setEnabled(false);
|
||||
ui->m_lpRevert->setEnabled(false);
|
||||
|
||||
m_bIsInitialized = true;
|
||||
}
|
||||
|
||||
qint32 cIngredientWindow::ingredientID(void)
|
||||
@@ -82,6 +93,29 @@ qint32 cIngredientWindow::ingredientID(void)
|
||||
return(m_iIngredient);
|
||||
}
|
||||
|
||||
void cIngredientWindow::setIngredientGroup(const QString& szIngredientGroup)
|
||||
{
|
||||
ui->m_lpIngredientGroup->setCurrentText(szIngredientGroup);
|
||||
}
|
||||
|
||||
void cIngredientWindow::nameChanged(const QString& text)
|
||||
{
|
||||
if(!m_bIsInitialized)
|
||||
return;
|
||||
|
||||
m_ingredient.setIngredientName(text);
|
||||
updateTitle();
|
||||
}
|
||||
|
||||
void cIngredientWindow::groupChanged(const QString & text)
|
||||
{
|
||||
if(!m_bIsInitialized)
|
||||
return;
|
||||
|
||||
m_ingredient.setIngredientGroup(text);
|
||||
updateTitle();
|
||||
}
|
||||
|
||||
void cIngredientWindow::ingredientEdit(const QModelIndex &modelIndex)
|
||||
{
|
||||
QStandardItem* lpCurrentItem = m_lpIngredientValuesModel->itemFromIndex(modelIndex);
|
||||
@@ -112,45 +146,101 @@ void cIngredientWindow::ingredientEdit(const QModelIndex &modelIndex)
|
||||
|
||||
bool cIngredientWindow::isChanged()
|
||||
{
|
||||
if(!m_bIsInitialized)
|
||||
return(false);
|
||||
|
||||
if(m_ingredient != m_ingredientSaved)
|
||||
return(true);
|
||||
return(false);
|
||||
}
|
||||
|
||||
void cIngredientWindow::on_m_lpSave_clicked()
|
||||
void cIngredientWindow::forceClose()
|
||||
{
|
||||
m_ingredient = m_ingredientSaved;
|
||||
closeClicked();
|
||||
}
|
||||
|
||||
bool cIngredientWindow::save()
|
||||
{
|
||||
if(m_ingredient.ingredientName().isEmpty())
|
||||
{
|
||||
QMessageBox::critical(this, "Error", "Ingredient name is empty.");
|
||||
return(false);
|
||||
}
|
||||
|
||||
if(m_ingredient.ingredientGroup().isEmpty())
|
||||
{
|
||||
QMessageBox::critical(this, "Error", "Ingredient group is empty.");
|
||||
return(false);
|
||||
}
|
||||
|
||||
m_ingredient.save(m_lpDBPlugin);
|
||||
m_ingredientSaved = m_ingredient;
|
||||
return(true);
|
||||
}
|
||||
|
||||
void cIngredientWindow::saveClicked()
|
||||
{
|
||||
if(!save())
|
||||
return;
|
||||
|
||||
updateTitle();
|
||||
}
|
||||
|
||||
void cIngredientWindow::on_m_lpRevert_clicked()
|
||||
void cIngredientWindow::revertClicked()
|
||||
{
|
||||
setIngredient();
|
||||
|
||||
updateTitle();
|
||||
}
|
||||
|
||||
void cIngredientWindow::on_m_lpClose_clicked()
|
||||
void cIngredientWindow::closeClicked()
|
||||
{
|
||||
|
||||
if(this->parent())
|
||||
{
|
||||
QMdiSubWindow* mdiSubWindow = (QMdiSubWindow*)this->parent();
|
||||
mdiSubWindow->close();
|
||||
}
|
||||
}
|
||||
|
||||
void cIngredientWindow::closeEvent(QCloseEvent *event)
|
||||
{
|
||||
if(isChanged())
|
||||
event->ignore();
|
||||
{
|
||||
int ret = QMessageBox::question(this, "Changed", tr("Ingredient has been changed.\nDo you want to save?"), QMessageBox::Yes | QMessageBox::No | QMessageBox::Cancel);
|
||||
|
||||
switch(ret)
|
||||
{
|
||||
case QMessageBox::Yes:
|
||||
m_ingredient.save(m_lpDBPlugin);
|
||||
m_ingredient = m_ingredientSaved;
|
||||
updateTitle();
|
||||
event->accept();
|
||||
break;
|
||||
case QMessageBox::No:
|
||||
m_ingredient = m_ingredientSaved;
|
||||
updateTitle();
|
||||
event->accept();
|
||||
break;
|
||||
default:
|
||||
event->ignore();
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
event->accept();
|
||||
}
|
||||
|
||||
void cIngredientWindow::updateTitle()
|
||||
{
|
||||
if(!m_bIsInitialized)
|
||||
return;
|
||||
|
||||
if(isChanged())
|
||||
{
|
||||
setWindowTitle(QString("<Ingredient> %1*").arg(m_ingredientSaved.ingredientName()));
|
||||
m_lpItem->setText(QString("%1*").arg(m_ingredientSaved.ingredientName()));
|
||||
checkGroupChanged();
|
||||
ui->m_lpSave->setEnabled(true);
|
||||
ui->m_lpRevert->setEnabled(true);
|
||||
}
|
||||
@@ -158,7 +248,32 @@ void cIngredientWindow::updateTitle()
|
||||
{
|
||||
setWindowTitle(QString("<Ingredient> %1").arg(m_ingredientSaved.ingredientName()));
|
||||
m_lpItem->setText(QString("%1").arg(m_ingredientSaved.ingredientName()));
|
||||
checkGroupChanged();
|
||||
ui->m_lpSave->setEnabled(false);
|
||||
ui->m_lpRevert->setEnabled(false);
|
||||
}
|
||||
}
|
||||
|
||||
void cIngredientWindow::checkGroupChanged()
|
||||
{
|
||||
if(!m_bIsInitialized)
|
||||
return;
|
||||
|
||||
if(m_ingredient.ingredientGroup() == m_ingredientSaved.ingredientGroup())
|
||||
return;
|
||||
|
||||
QString szGroup = m_ingredient.ingredientGroup();
|
||||
QStandardItem* lpOldGroup = m_lpItem->parent();
|
||||
QStandardItemModel* lpModel = m_lpItem->model();
|
||||
QList<QStandardItem*> lpItems = lpOldGroup->takeRow(lpModel->indexFromItem(m_lpItem).row());
|
||||
|
||||
for(int z = 0;z < lpModel->rowCount();z++)
|
||||
{
|
||||
QStandardItem* lpGroup = lpModel->item(z, 0);
|
||||
if(lpGroup->text() == m_ingredient.ingredientGroup())
|
||||
{
|
||||
lpGroup->insertRow(0, lpItems);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,15 +25,16 @@ public:
|
||||
void setIngredient(QStandardItem* lpItem = 0, cPlugin* lpPlugin = 0);
|
||||
qint32 ingredientID(void);
|
||||
|
||||
void setIngredientGroup(const QString& szIngredientGroup);
|
||||
bool isChanged();
|
||||
void forceClose();
|
||||
private slots:
|
||||
void nameChanged(const QString& text);
|
||||
void groupChanged(const QString & text);
|
||||
void ingredientEdit(const QModelIndex& modelIndex);
|
||||
|
||||
void on_m_lpSave_clicked();
|
||||
|
||||
void on_m_lpRevert_clicked();
|
||||
|
||||
void on_m_lpClose_clicked();
|
||||
void saveClicked();
|
||||
void revertClicked();
|
||||
void closeClicked();
|
||||
|
||||
private:
|
||||
Ui::cIngredientWindow* ui;
|
||||
@@ -44,9 +45,12 @@ private:
|
||||
cIngredient m_ingredientSaved;
|
||||
QStandardItemModel* m_lpIngredientValuesModel;
|
||||
QStandardItem* m_lpItem;
|
||||
bool m_bIsInitialized;
|
||||
|
||||
bool save();
|
||||
void updateTitle();
|
||||
protected:
|
||||
void checkGroupChanged();
|
||||
void closeEvent(QCloseEvent *event);
|
||||
};
|
||||
|
||||
|
||||
+104
-1
@@ -441,6 +441,36 @@ void cMainWindow::ingredientsListCustomContextMenu(const QPoint& point)
|
||||
|
||||
void cMainWindow::ingredientsListNewTriggered()
|
||||
{
|
||||
/*
|
||||
QModelIndex index = ui->m_lpIngredientsList->currentIndex();
|
||||
if(index.isValid())
|
||||
{
|
||||
QStandardItem* lpItem = m_lpIngredientsListModel->itemFromIndex(index);
|
||||
if(!lpItem)
|
||||
return;
|
||||
|
||||
QStandardItem* lpParent = lpItem->parent();
|
||||
if(!lpParent)
|
||||
return;
|
||||
|
||||
QList<QMdiSubWindow*> windowsList = ui->m_lpMDIArea->subWindowList();
|
||||
for(int z = 0;z < windowsList.count();z++)
|
||||
{
|
||||
cIngredientWindow* lpWidget = (cIngredientWindow*)windowsList.at(z)->widget();
|
||||
if(lpWidget->ingredientID() == lpItem->data().toInt())
|
||||
{
|
||||
ui->m_lpMDIArea->setActiveSubWindow(windowsList.at(z));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
cIngredientWindow* lpIngredientWindow = new cIngredientWindow(this);
|
||||
lpIngredientWindow->setIngredient(ingredientItemFromID(lpItem->data().toInt()), m_lpDB);
|
||||
QMdiSubWindow* lpSubWindow = ui->m_lpMDIArea->addSubWindow(lpIngredientWindow);
|
||||
lpSubWindow->setAttribute(Qt::WA_DeleteOnClose);
|
||||
lpIngredientWindow->show();
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
void cMainWindow::ingredientsListImportTriggered()
|
||||
@@ -451,6 +481,23 @@ void cMainWindow::ingredientsListImportTriggered()
|
||||
if(lpInterface)
|
||||
importIngredientDialog.setIngredientGroupList(lpInterface->groups());
|
||||
|
||||
QModelIndex index = ui->m_lpIngredientsList->currentIndex();
|
||||
if(index.isValid())
|
||||
{
|
||||
QString szGroup;
|
||||
QStandardItem* lpItem = m_lpIngredientsListModel->itemFromIndex(index);
|
||||
if(lpItem)
|
||||
{
|
||||
QStandardItem* lpParent = lpItem->parent();
|
||||
if(lpParent)
|
||||
szGroup = lpParent->text();
|
||||
else
|
||||
szGroup = lpItem->text();
|
||||
}
|
||||
if(!szGroup.isEmpty())
|
||||
importIngredientDialog.setIngredientGroup(szGroup);
|
||||
}
|
||||
|
||||
if(importIngredientDialog.exec() == QDialog::Rejected)
|
||||
return;
|
||||
|
||||
@@ -470,6 +517,62 @@ void cMainWindow::ingredientsListImportTriggered()
|
||||
|
||||
void cMainWindow::ingredientsListDeleteTriggered()
|
||||
{
|
||||
QModelIndex index = ui->m_lpIngredientsList->currentIndex();
|
||||
if(index.isValid())
|
||||
{
|
||||
QStandardItem* lpItem = m_lpIngredientsListModel->itemFromIndex(index);
|
||||
if(!lpItem)
|
||||
return;
|
||||
|
||||
QStandardItem* lpParent = lpItem->parent();
|
||||
if(!lpParent)
|
||||
return;
|
||||
|
||||
lpItem = ingredientItemFromID(lpItem->data().toInt());
|
||||
|
||||
if(QMessageBox::question(this, "Delete", QString("You are about to delete \"%1\".\nAre you sure?").arg(lpItem->text()), QMessageBox::Yes | QMessageBox::No) == QMessageBox::No)
|
||||
return;
|
||||
|
||||
if(!m_lpDB->dbInterface()->deleteIngredient(lpItem->data().toInt()))
|
||||
{
|
||||
QMessageBox::critical(this, "Error", QString("Error deleting \"%1\"!").arg(lpItem->text()));
|
||||
return;
|
||||
}
|
||||
|
||||
m_lpIngredientsListModel->removeRow(index.row());
|
||||
|
||||
QList<QMdiSubWindow*> windowsList = ui->m_lpMDIArea->subWindowList();
|
||||
for(int z = 0;z < windowsList.count();z++)
|
||||
{
|
||||
cIngredientWindow* lpWidget = (cIngredientWindow*)windowsList.at(z)->widget();
|
||||
if(lpWidget->ingredientID() == lpItem->data().toInt())
|
||||
{
|
||||
lpWidget->forceClose();
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
QStandardItem* cMainWindow::ingredientItemFromID(qint32 id)
|
||||
{
|
||||
for(int z = 0;z < m_lpIngredientsListModel->rowCount();z++)
|
||||
{
|
||||
QStandardItem* lpItem = m_lpIngredientsListModel->item(z);
|
||||
if(lpItem->data().toInt() == id)
|
||||
return(lpItem);
|
||||
|
||||
if(lpItem->hasChildren())
|
||||
{
|
||||
for(int y = 0;y < lpItem->rowCount();y++)
|
||||
{
|
||||
QStandardItem* lpItem1 = lpItem->child(y);
|
||||
if(lpItem1->data().toInt() == id)
|
||||
return(lpItem1);
|
||||
}
|
||||
}
|
||||
}
|
||||
return(0);
|
||||
}
|
||||
|
||||
void cMainWindow::ingredientsListEditTriggered()
|
||||
@@ -497,7 +600,7 @@ void cMainWindow::ingredientsListEditTriggered()
|
||||
}
|
||||
|
||||
cIngredientWindow* lpIngredientWindow = new cIngredientWindow(this);
|
||||
lpIngredientWindow->setIngredient(lpItem, m_lpDB);
|
||||
lpIngredientWindow->setIngredient(ingredientItemFromID(lpItem->data().toInt()), m_lpDB);
|
||||
QMdiSubWindow* lpSubWindow = ui->m_lpMDIArea->addSubWindow(lpIngredientWindow);
|
||||
lpSubWindow->setAttribute(Qt::WA_DeleteOnClose);
|
||||
lpIngredientWindow->show();
|
||||
|
||||
@@ -167,6 +167,8 @@ private:
|
||||
*/
|
||||
cPlugin* plugin(QAction* lpAction);
|
||||
QMdiSubWindow* activeMdiChild() const;
|
||||
|
||||
QStandardItem* ingredientItemFromID(qint32 id);
|
||||
protected:
|
||||
};
|
||||
|
||||
|
||||
@@ -252,6 +252,28 @@ qint32 cMySQLPlugin::createGroup(const QString& szGroup)
|
||||
return(existsGroup(szGroup));
|
||||
}
|
||||
|
||||
bool cMySQLPlugin::deleteIngredient(qint32 id)
|
||||
{
|
||||
if(!m_bConnected)
|
||||
return(false);
|
||||
|
||||
QSqlQuery query(m_db);
|
||||
|
||||
if(!query.exec(QString("DELETE FROM ingredient_values WHERE ingredient_id=%1").arg(id)))
|
||||
{
|
||||
m_szLastError = query.lastError().text();
|
||||
return(false);
|
||||
}
|
||||
|
||||
if(!query.exec(QString("DELETE FROM ingredient WHERE id=%1").arg(id)))
|
||||
{
|
||||
m_szLastError = query.lastError().text();
|
||||
return(false);
|
||||
}
|
||||
|
||||
return(true);
|
||||
}
|
||||
|
||||
bool cMySQLPlugin::set(qint32 id, qint16 ingredientNumber, qreal value)
|
||||
{
|
||||
if(!m_bConnected)
|
||||
|
||||
@@ -116,6 +116,7 @@ public:
|
||||
qint32 existsIngredient(qint32 id, qint16 ingredientNumber);
|
||||
qint32 create(const QString& szName, const QString& szGroup);
|
||||
qint32 createGroup(const QString& szGroup);
|
||||
bool deleteIngredient(qint32 id);
|
||||
bool set(qint32 id, qint16 ingredientNumber, qreal value);
|
||||
bool setName(qint32 id, const QString& szName);
|
||||
bool setGroup(qint32 id, const QString& szGroup);
|
||||
|
||||
@@ -238,6 +238,28 @@ qint32 cSQLitePlugin::createGroup(const QString& szGroup)
|
||||
return(existsGroup(szGroup));
|
||||
}
|
||||
|
||||
bool cSQLitePlugin::deleteIngredient(qint32 id)
|
||||
{
|
||||
if(!m_bConnected)
|
||||
return(false);
|
||||
|
||||
QSqlQuery query(m_db);
|
||||
|
||||
if(!query.exec(QString("DELETE FROM ingredient_values WHERE ingredient_id=%1").arg(id)))
|
||||
{
|
||||
m_szLastError = query.lastError().text();
|
||||
return(false);
|
||||
}
|
||||
|
||||
if(!query.exec(QString("DELETE FROM ingredient WHERE id=%1").arg(id)))
|
||||
{
|
||||
m_szLastError = query.lastError().text();
|
||||
return(false);
|
||||
}
|
||||
|
||||
return(true);
|
||||
}
|
||||
|
||||
bool cSQLitePlugin::set(qint32 id, qint16 ingredientNumber, qreal value)
|
||||
{
|
||||
if(!m_bConnected)
|
||||
|
||||
@@ -77,6 +77,7 @@ public:
|
||||
qint32 existsIngredient(qint32 id, qint16 ingredientNumber);
|
||||
qint32 create(const QString& szName, const QString &szGroup);
|
||||
qint32 createGroup(const QString& szGroup);
|
||||
bool deleteIngredient(qint32 id);
|
||||
bool set(qint32 id, qint16 ingredientNumber, qreal value);
|
||||
bool setName(qint32 id, const QString& szName);
|
||||
bool setGroup(qint32 id, const QString& szGroup);
|
||||
|
||||
Reference in New Issue
Block a user