diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-01-20 01:29:50 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-01-20 01:29:50 +0000 |
commit | 8362bf63dea22bbf6736609b0f49c152f975eb63 (patch) | |
tree | 0eea3928e39e50fae91d4e68b21b1e6cbae25604 /kugar/lib/mutil.h | |
download | koffice-8362bf63dea22bbf6736609b0f49c152f975eb63.tar.gz koffice-8362bf63dea22bbf6736609b0f49c152f975eb63.zip |
Added old abandoned KDE3 version of koffice
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1077364 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kugar/lib/mutil.h')
-rw-r--r-- | kugar/lib/mutil.h | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/kugar/lib/mutil.h b/kugar/lib/mutil.h new file mode 100644 index 00000000..b7aa764f --- /dev/null +++ b/kugar/lib/mutil.h @@ -0,0 +1,59 @@ +/*************************************************************************** + mutil.h - Kugar utlity class + ------------------- + begin : Tue Aug 17 1999 + copyright : (C) 1999 by Mutiny Bay Software + email : info@mutinybaysoftware.com + copyright : (C) 2002 Alexander Dymo + email : cloudtemple@mksat.net +***************************************************************************/ + +#ifndef MUTIL_H +#define MUTIL_H + +#include <qobject.h> +#include <qstring.h> +#include <qdatetime.h> +#include <qmemarray.h> + + +/**Kugar utlity class + *@author Mutiny Bay Software + */ + +namespace Kugar +{ + +class MUtil +{ + +public: + /** Formatting constants */ + enum DateFormatType { + MDY_SLASH = 0, MDY_DASH, + MMDDY_SLASH, MMDDY_DASH, + MDYYYY_SLASH, MDYYYY_DASH, + MMDDYYYY_SLASH, MMDDYYYY_DASH, + YYYYMD_SLASH, YYYYMD_DASH, + DDMMYY_PERIOD, DDMMYYYY_PERIOD + }; + + /** Formats a date using one of the pre-defined formats */ + static QString formatDate( const QDate& value, int format ); + + /** Returns the count for an array of doubles */ + static int count( QMemArray<double>* values ); + /** Returns the sum for an array of doubles */ + static double sum( QMemArray<double>* values ); + /** Returns the average value for an array of doubles */ + static double average( QMemArray<double>* values ); + /** Returns the variance for an array of doubles */ + static double variance( QMemArray<double>* values ); + /** Returns the standard deviation for an array of doubles */ + static double stdDeviation( QMemArray<double>* values ); + +}; + +} + +#endif |