Added support for binding QDecimal values.

This commit is contained in:
2016-02-19 15:34:52 +01:00
parent 046c64b312
commit 8e999c7818
12 changed files with 70 additions and 17 deletions
+5 -4
View File
@@ -1,4 +1,5 @@
#include "accservice.h"
#include <define.h>
AccService::AccService()
{
@@ -14,14 +15,14 @@ void AccService::setId(int id)
{
m_id = id;
}
int AccService::price() const
QDecDouble AccService::price() const
{
return m_price;
return QDecDouble((double)m_price / DEC_MULTIPLE);
}
void AccService::setPrice(int price)
void AccService::setPrice(QDecDouble price)
{
m_price = price;
m_price = price.toDouble() * DEC_MULTIPLE;
}
bool AccService::active() const
{