From 0c8ed6c9a4000af8f48581a81c4b5c2f5b9fd502 Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Sun, 13 Oct 2024 11:56:14 +0900 Subject: Rearrange folders structure to remove unnecessary 'krecipes' second level subfolder Signed-off-by: Michele Calgaro --- src/dialogs/ingredientsdialog.h | 93 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 93 insertions(+) create mode 100644 src/dialogs/ingredientsdialog.h (limited to 'src/dialogs/ingredientsdialog.h') diff --git a/src/dialogs/ingredientsdialog.h b/src/dialogs/ingredientsdialog.h new file mode 100644 index 0000000..32af993 --- /dev/null +++ b/src/dialogs/ingredientsdialog.h @@ -0,0 +1,93 @@ +/*************************************************************************** +* Copyright (C) 2003 by * +* Unai Garro (ugarro@users.sourceforge.net) * +* Cyril Bosselut (bosselut@b1project.com) * +* Jason Kivlighn (jkivlighn@gmail.com) * +* * +* This program is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 2 of the License, or * +* (at your option) any later version. * +***************************************************************************/ + +#ifndef INGREDIENTSDIALOG_H +#define INGREDIENTSDIALOG_H + +#include +#include +#include +#include +#include + +#include "widgets/krelistview.h" +#include "widgets/dblistviewbase.h" +#include "datablocks/unit.h" + +class KDoubleNumInput; + +class RecipeDB; +class ElementList; +class SelectUnitDialog; +class CreateElementDialog; +class IngredientPropertyList; +class SelectPropertyDialog; +class UnitsDialog; +class IngredientGroupsDialog; +class MixedNumber; + +class IngredientsDialog: public TQWidget +{ +TQ_OBJECT + +public: + IngredientsDialog( TQWidget* parent, RecipeDB *db ); + ~IngredientsDialog(); + void reload( ReloadFlags flag = Load ); + +private: + // Widgets + TQGridLayout* layout; + TQPushButton* addIngredientButton; + TQPushButton* removeIngredientButton; + TQPushButton* addUnitButton; + TQPushButton* removeUnitButton; + TQPushButton* addPropertyButton; + TQPushButton* removePropertyButton; + TQPushButton* addWeightButton; + TQPushButton* removeWeightButton; + KreListView* ingredientListView; + KreListView* unitsListView; + KreListView* propertiesListView; + KreListView* weightsListView; + TQPushButton* pushButton5; + KDoubleNumInput* inputBox; + IngredientGroupsDialog *groupsDialog; + + // Internal Methods + void reloadIngredientList( ReloadFlags flag = Load ); + void reloadUnitList( void ); + void reloadPropertyList( void ); + void reloadWeightList( void ); + int findPropertyNo( TQListViewItem *it ); + + // Internal Variables + RecipeDB *database; + UnitList *unitList; + IngredientPropertyList *propertiesList; + ElementList *perUnitListBack; + +private slots: + void addUnitToIngredient( void ); + void removeUnitFromIngredient( void ); + void addWeight(); + void removeWeight(); + void updateLists( void ); + void addPropertyToIngredient( void ); + void removePropertyFromIngredient( void ); + void insertPropertyEditBox( TQListViewItem* it ); + void setPropertyAmount( double amount ); + void openUSDADialog( void ); + void itemRenamed( TQListViewItem*, const TQPoint &, int col ); +}; + +#endif -- cgit v1.2.1