1 /***************************************************************************
2              materialcalcpart  -
3                              -------------------
4     begin                : 2004-09-05
5     copyright            : (C) 2004 by Klaas Freitag
6     email                : freitag@kde.org
7  ***************************************************************************/
8 
9 /***************************************************************************
10  *                                                                         *
11  *   This program is free software; you can redistribute it and/or modify  *
12  *   it under the terms of the GNU General Public License as published by  *
13  *   the Free Software Foundation; either version 2 of the License, or     *
14  *   (at your option) any later version.                                   *
15  *                                                                         *
16  ***************************************************************************/
17 
18 #ifndef _MATERIALCALCPART_H
19 #define _MATERIALCALCPART_H
20 
21 // include files
22 #include <QHash>
23 #include "calcpart.h"
24 
25 /**
26  *
27  */
28 class StockMaterial;
29 class StockMaterialList;
30 class QString;
31 class QVariant;
32 
33 class MaterialCalcPart : public CalcPart
34 {
35 
36 public:
37     MaterialCalcPart();
38     MaterialCalcPart( long mCalcID, long matID, int procent, double amount );
39     MaterialCalcPart( long matID, int procent, double amount );
40     ~MaterialCalcPart();
41 
42     virtual Geld basisKosten();
43     QString getType() const;
44 
45     StockMaterial* getMaterial();
46 
47     bool setCalcAmount( double newAmount );
getCalcAmount()48     double getCalcAmount(){return m_calcAmount;};
49 
50 protected:
51     void getMatFromID(long matID);
52 
53 private:
54     long m_calcID;
55     double m_calcAmount;
56     StockMaterial *m_mat;
57 };
58 
59 #endif
60 
61 /* END */
62 
63