-
Notifications
You must be signed in to change notification settings - Fork 0
/
meallist.h
48 lines (37 loc) · 971 Bytes
/
meallist.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#ifndef MEALLIST_H
#define MEALLIST_H
#include <QFrame>
#include "dbconnection.h"
#include "QSqlQuery"
#include "QSqlQueryModel"
namespace Ui {
class mealList;
}
class mealList : public QFrame
{
Q_OBJECT
public:
explicit mealList(QWidget *parent = nullptr);
void setDbObj(dbconnection *db);
~mealList();
void preConnectedActions();
void performCurrentMeal(int cursor);
private slots:
void on_pushButton_clicked();
void on_exit_btn_clicked();
void on_list_cookbook_doubleClicked(const QModelIndex &index);
void on_back_to_mealList_btn_clicked();
void on_list_cookbook_clicked(const QModelIndex &index);
private:
Ui::mealList *ui;
dbconnection *db;
QSqlQueryModel *meal_list;
QSqlQueryModel *ingred_list;
int cursorSelectedRow;
QString currentMealCost;
QString currentMealNutval;
QString currentMealName;
QString currentMealDesc;
QString currentMealHtc;
};
#endif // MEALLIST_H