diff options
author | Michele Calgaro <[email protected]> | 2024-10-13 11:56:14 +0900 |
---|---|---|
committer | Michele Calgaro <[email protected]> | 2024-10-21 09:29:11 +0900 |
commit | 0c8ed6c9a4000af8f48581a81c4b5c2f5b9fd502 (patch) | |
tree | 10f9d3223f0a0904a0748a28ca44da52ee1092b7 /src/dialogs/ingredientsdialog.h | |
parent | 7d5ba3180a82a0827c1fbd6dc93a2abf4f882c37 (diff) | |
download | krecipes-0c8ed6c9a4000af8f48581a81c4b5c2f5b9fd502.tar.gz krecipes-0c8ed6c9a4000af8f48581a81c4b5c2f5b9fd502.zip |
Rearrange folders structure to remove unnecessary 'krecipes' second level subfolder
Signed-off-by: Michele Calgaro <[email protected]>
Diffstat (limited to 'src/dialogs/ingredientsdialog.h')
-rw-r--r-- | src/dialogs/ingredientsdialog.h | 93 |
1 files changed, 93 insertions, 0 deletions
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 ([email protected]) * +* Cyril Bosselut ([email protected]) * +* Jason Kivlighn ([email protected]) * +* * +* 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 <tqpushbutton.h> +#include <tqvbox.h> +#include <tqlayout.h> +#include <tqwidget.h> +#include <knuminput.h> + +#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 |