RecipeDB/gui/openrecipedialog.h

61 lines
1.4 KiB
C
Raw Normal View History

#ifndef OPENRECIPEDIALOG_H
#define OPENRECIPEDIALOG_H
#include <QDialog>
#include <QMessageBox>
2018-03-30 14:20:09 +00:00
#include <QItemSelection>
#include "model/database/recipedatabase.h"
#include "model/recipe/recipetablemodel.h"
#include "model/recipe/ingredients/ingredientlistmodel.h"
#include "model/recipe/tags/taglistmodel.h"
namespace Ui {
class OpenRecipeDialog;
}
class OpenRecipeDialog : public QDialog
{
Q_OBJECT
public:
explicit OpenRecipeDialog(QWidget *parent = 0);
OpenRecipeDialog(RecipeDatabase *recipeDB, QWidget *parent = 0);
~OpenRecipeDialog();
Recipe getSelectedRecipe();
private slots:
void on_deleteRecipeButton_clicked();
void on_recipeTableView_doubleClicked(const QModelIndex &index);
void onIngredientsListViewSelectionChanged(const QItemSelection &selection);
2018-03-30 14:20:09 +00:00
2018-03-30 20:50:02 +00:00
void onTagsListViewSelectionChanged(const QItemSelection &selection);
void on_nameEdit_textChanged(const QString &arg1);
void on_foodGroupsListWidget_itemSelectionChanged();
2018-03-31 10:53:31 +00:00
void on_clearSearchButton_clicked();
void on_exitButton_clicked();
private:
Ui::OpenRecipeDialog *ui;
RecipeDatabase *recipeDB;
RecipeTableModel recipeTableModel;
Recipe selectedRecipe;
IngredientListModel ingredientsModel;
TagListModel tagsModel;
void populateRecipesTable(vector<Recipe> recipes);
void populateIngredientsList();
void populateTagsList();
2018-03-30 20:50:02 +00:00
void populateFoodGroupsList();
};
#endif // OPENRECIPEDIALOG_H