[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [krecipes] src/dialogs/recipeinput: Add ingredient parser stub code.
From: José_Manuel_Santamaría_Lema <panfaust () gmail ! com>
Date: 2016-04-01 13:27:31
Message-ID: E1alz6p-0003Wm-Ty () scm ! kde ! org
[Download RAW message or body]
Git commit 747ea843570a5709073c62b34dedf57e94a3a4ed by José Manuel Santamaría Lema.
Committed on 01/04/2016 at 12:01.
Pushed by joselema into branch 'master'.
Add ingredient parser stub code.
M +9 -3 src/dialogs/recipeinput/ingredientseditor.cpp
http://commits.kde.org/krecipes/747ea843570a5709073c62b34dedf57e94a3a4ed
diff --git a/src/dialogs/recipeinput/ingredientseditor.cpp \
b/src/dialogs/recipeinput/ingredientseditor.cpp index 7afeb92..06b664d 100644
--- a/src/dialogs/recipeinput/ingredientseditor.cpp
+++ b/src/dialogs/recipeinput/ingredientseditor.cpp
@@ -474,9 +474,15 @@ void IngredientsEditor::addHeaderSlot()
void IngredientsEditor::ingParserSlot()
{
- kDebug() << "here";
- //TODO
- //Don't forget emit changed();
+ UnitList units;
+ m_database->loadUnits(&units);
+ QPointer<IngredientParserDialog> dlg = new IngredientParserDialog(units,this);
+ if ( dlg->exec() == QDialog::Accepted ) {
+ IngredientList ings = dlg->ingredients();
+ //TODO: Insert ingredients in the model
+ }
+ delete dlg;
+
}
void IngredientsEditor::moveRow( int offset )
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic