#include "addservicedialog.h"
#include "ui_addservicedialog.h"

AddServiceDialog::AddServiceDialog(AccServicePtr service, QWidget *parent) :
    QDialog(parent),
    ui(new Ui::AddServiceDialog)
{
    ui->setupUi(this);

    ui->editName->setText(service->accServiceName());
    ui->editPrice->setValue(service->price().toDouble());
}

AddServiceDialog::~AddServiceDialog()
{
    delete ui;
}

QString AddServiceDialog::description()
{
    return ui->editDescription->text();
}

QDecDouble AddServiceDialog::price()
{
    return QDecDouble(ui->editPrice->value());
}
