Implemented camp wizard and service methods for camp calculation.
parent
9a087e1874
commit
b0f129f38d
@ -0,0 +1,27 @@
|
||||
#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());
|
||||
}
|
@ -0,0 +1,27 @@
|
||||
#ifndef ADDSERVICEDIALOG_H
|
||||
#define ADDSERVICEDIALOG_H
|
||||
|
||||
#include <QDialog>
|
||||
#include <QDecDouble.hh>
|
||||
#include <data/accservice.h>
|
||||
|
||||
namespace Ui {
|
||||
class AddServiceDialog;
|
||||
}
|
||||
|
||||
class AddServiceDialog : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit AddServiceDialog(AccServicePtr service, QWidget *parent = 0);
|
||||
~AddServiceDialog();
|
||||
|
||||
QString description();
|
||||
QDecDouble price();
|
||||
|
||||
private:
|
||||
Ui::AddServiceDialog *ui;
|
||||
};
|
||||
|
||||
#endif // ADDSERVICEDIALOG_H
|
@ -0,0 +1,105 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>AddServiceDialog</class>
|
||||
<widget class="QDialog" name="AddServiceDialog">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>400</width>
|
||||
<height>143</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Dialog</string>
|
||||
</property>
|
||||
<layout class="QFormLayout" name="formLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Service name</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLineEdit" name="editName">
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0" colspan="2">
|
||||
<widget class="QDialogButtonBox" name="buttonBox">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="standardButtons">
|
||||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLineEdit" name="editDescription"/>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Description</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QDoubleSpinBox" name="editPrice">
|
||||
<property name="buttonSymbols">
|
||||
<enum>QAbstractSpinBox::NoButtons</enum>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<double>999999.989999999990687</double>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>Price</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>accepted()</signal>
|
||||
<receiver>AddServiceDialog</receiver>
|
||||
<slot>accept()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>248</x>
|
||||
<y>254</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>157</x>
|
||||
<y>274</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>rejected()</signal>
|
||||
<receiver>AddServiceDialog</receiver>
|
||||
<slot>reject()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>316</x>
|
||||
<y>260</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>286</x>
|
||||
<y>274</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
</ui>
|
Loading…
Reference in New Issue