Added support for binding QDecimal values.
This commit is contained in:
@@ -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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user