Eneboo - Documentación para desarrolladores
|
00001 /*************************************************************************** 00002 mcalcobject.h - Kugar report calculation field object 00003 ------------------- 00004 begin : Thu Sep 2 1999 00005 copyright : (C) 1999 by Mutiny Bay Software 00006 email : info@mutinybaysoftware.com 00007 ***************************************************************************/ 00008 00009 #ifndef MCALCOBJECT_H 00010 #define MCALCOBJECT_H 00011 00012 #include "mfieldobject.h" 00013 00019 class MCalcObject: public MFieldObject 00020 { 00021 00022 public: 00023 00027 enum CalculationType { 00028 Count = 0, 00029 Sum, 00030 Average, 00031 Variance, 00032 StandardDeviation, 00033 NoOperation, 00034 CallFunction 00035 }; 00036 00040 MCalcObject(); 00041 00045 MCalcObject(const MCalcObject &mCalcObject); 00046 00050 MCalcObject operator=(const MCalcObject &mCalcObject); 00051 00055 ~MCalcObject(); 00056 00060 void setCalculationType(int type); 00061 00065 int getCalculationType() const; 00066 00070 void setCalculationFunction(QString fN); 00071 00073 bool getDrawAtHeader() const; 00074 00076 void setDrawAtHeader(bool b); 00077 00079 bool getFromGrandTotal() const; 00080 00082 void setFromGrandTotal(bool b); 00083 00087 QString getCalculationFunction() const; 00088 00089 private: 00090 00094 int calcType; 00095 00099 QString calcFunction; 00100 00101 private: 00102 00108 void copy(const MCalcObject *mCalcObject); 00109 00113 bool drawAtHeader; 00114 00118 bool fromGrandTotal; 00119 00120 }; 00121 00123 inline void MCalcObject::setCalculationType(int type) 00124 { 00125 calcType = type; 00126 } 00127 00129 inline void MCalcObject::setCalculationFunction(QString fN) 00130 { 00131 calcFunction = fN; 00132 } 00133 00135 inline void MCalcObject::setDrawAtHeader(bool b) 00136 { 00137 drawAtHeader = b; 00138 } 00139 00141 inline void MCalcObject::setFromGrandTotal(bool b) 00142 { 00143 fromGrandTotal = b; 00144 } 00145 00147 inline int MCalcObject::getCalculationType() const 00148 { 00149 return calcType; 00150 } 00151 00153 inline QString MCalcObject::getCalculationFunction() const 00154 { 00155 return calcFunction; 00156 } 00157 00159 inline bool MCalcObject::getDrawAtHeader() const 00160 { 00161 return drawAtHeader; 00162 } 00163 00165 inline bool MCalcObject::getFromGrandTotal() const 00166 { 00167 return fromGrandTotal; 00168 } 00169 #endif