[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [krecipes] src: Add KreAllIngredientsModels stub.
From: José_Manuel_SantamarÃa_Lema <panfaust () gmail ! com>
Date: 2016-04-07 20:25:06
Message-ID: E1aoGUE-0007O4-Tu () scm ! kde ! org
[Download RAW message or body]
Git commit 5e80634e1a0144b978ae8570be59597d13a92a16 by José Manuel SantamarÃa Lema.
Committed on 07/04/2016 at 07:11.
Pushed by joselema into branch 'master'.
Add KreAllIngredientsModels stub.
M +6 -0 src/CMakeLists.txt
A +24 -0 src/models/kreallingredientsmodels.cpp [License: GPL (v2+)]
A +32 -0 src/models/kreallingredientsmodels.h [License: GPL (v2+)]
http://commits.kde.org/krecipes/5e80634e1a0144b978ae8570be59597d13a92a16
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 68c3300..b104aa1 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -37,6 +37,11 @@ set(krecipesdbs_SRCS
qt4_add_dbus_adaptor(krecipesdbs_SRCS backends/org.kde.krecipesdb.xml recipedb.h RecipeDB)
+############## models ################
+
+set(krecipesmodels_SRCS
+ models/kreallingredientsmodels.cpp
+ )
############ importers ###############
@@ -295,6 +300,7 @@ set(validators_SRCS
kde4_add_library(krecipescommon STATIC
${mysql_SRCS} ${postgresql_SRCS} ${sqlite_SRCS} ${krecipesdbs_SRCS}
+ ${krecipesmodels_SRCS}
${krecipesimporters_SRCS} ${krecipesexporters_SRCS}
${datablocks_SRCS} ${krecipesthreadedqueries_SRCS}
${validators_SRCS}
diff --git a/src/models/kreallingredientsmodels.cpp b/src/models/kreallingredientsmodels.cpp
new file mode 100644
index 0000000..1da6a5e
--- /dev/null
+++ b/src/models/kreallingredientsmodels.cpp
@@ -0,0 +1,24 @@
+/***************************************************************************
+* Copyright © 2016 José Manuel SantamarÃa Lema <panfaust@gail.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. *
+****************************************************************************/
+
+#include "kreallingredientsmodels.h"
+
+#include <QStandardItemModel>
+
+
+KreAllIngredientsModels::KreAllIngredientsModels( RecipeDB * database ):
+ m_database( database )
+{
+ m_sourceModel = new QStandardItemModel( this );
+}
+
+QStandardItemModel * KreAllIngredientsModels::sourceModel()
+{
+ return m_sourceModel;
+}
diff --git a/src/models/kreallingredientsmodels.h b/src/models/kreallingredientsmodels.h
new file mode 100644
index 0000000..52cf264
--- /dev/null
+++ b/src/models/kreallingredientsmodels.h
@@ -0,0 +1,32 @@
+/***************************************************************************
+* Copyright © 2016 José Manuel SantamarÃa Lema <panfaust@gail.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 KREALLINGREDIENTSMODELS_H
+#define KREALLINGREDIENTSMODELS_H
+
+#include <QObject>
+
+class RecipeDB;
+class QStandardItemModel;
+
+class KreAllIngredientsModels: public QObject {
+Q_OBJECT
+
+public:
+ KreAllIngredientsModels( RecipeDB * database );
+
+ QStandardItemModel * sourceModel();
+
+private:
+ RecipeDB * m_database;
+ QStandardItemModel * m_sourceModel;
+
+};
+
+#endif
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic