view src/util.h @ 246:43a5e09bb832

Split some utility functions to util.{h,cpp}
author Matti Hamalainen <ccr@tnsp.org>
date Tue, 08 May 2018 13:14:29 +0300
parents
children 4d2b37a0acf2
line wrap: on
line source

//
// Syntilista - debt list/management database program
// Programmed and designed by Matti Hämäläinen <ccr@tnsp.org>
// (C) Copyright 2017-2018 Tecnic Software productions (TNSP)
//
// Distributed under 3-clause BSD style license, refer to
// included file "COPYING" for exact terms.
//
#ifndef SL_UTIL_H
#define SL_UTIL_H

double slMoneyStrToValue(const QString &str);
QString slMoneyValueToStr(double val);
QString slMoneyValueToStrSign(double val);
QString slCleanupStr(const QString &str);
const QDateTime slDateTimeToLocal(const QDateTime &val);
const QString slDateTimeToStr(const QDateTime &val);

void slLog(const QString &mtype, const QString &msg);
int slErrorMsg(const QString &title, const QString &msg);
bool slCheckAndReportSQLError(const QString where, const QSqlError &err, bool report = false);


#endif // SL_UTIL_H