Added settings for seasons and number series. Added static method
ComboData::createComboData for easier combo bindings.print
parent
b33ff1b169
commit
a89b0381b1
@ -0,0 +1,24 @@
|
||||
#include "seasonnamedialog.h"
|
||||
#include "ui_seasonnamedialog.h"
|
||||
|
||||
SeasonNameDialog::SeasonNameDialog(SeasonPtr season, QWidget *parent) :
|
||||
QDialog(parent),
|
||||
ui(new Ui::SeasonNameDialog)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
m_binder.registerBinding(ui->name);
|
||||
m_binder.setData(season.data());
|
||||
m_binder.bindToUi();
|
||||
}
|
||||
|
||||
SeasonNameDialog::~SeasonNameDialog()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void SeasonNameDialog::accept()
|
||||
{
|
||||
m_binder.bindToData();
|
||||
QDialog::accept();
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
#ifndef SEASONNAMEDIALOG_H
|
||||
#define SEASONNAMEDIALOG_H
|
||||
|
||||
#include <QDialog>
|
||||
|
||||
#include "../data/season.h"
|
||||
#include "../objectbinder.h"
|
||||
|
||||
namespace Ui {
|
||||
class SeasonNameDialog;
|
||||
}
|
||||
|
||||
class SeasonNameDialog : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit SeasonNameDialog(SeasonPtr season, QWidget *parent = 0);
|
||||
~SeasonNameDialog();
|
||||
|
||||
private:
|
||||
Ui::SeasonNameDialog *ui;
|
||||
ObjectBinder m_binder;
|
||||
|
||||
// QDialog interface
|
||||
public slots:
|
||||
void accept();
|
||||
};
|
||||
|
||||
#endif // SEASONNAMEDIALOG_H
|
@ -0,0 +1,77 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>SeasonNameDialog</class>
|
||||
<widget class="QDialog" name="SeasonNameDialog">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>406</width>
|
||||
<height>82</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Season</string>
|
||||
</property>
|
||||
<property name="modal">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<layout class="QFormLayout" name="formLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Season name</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLineEdit" name="name"/>
|
||||
</item>
|
||||
<item row="1" 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>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>accepted()</signal>
|
||||
<receiver>SeasonNameDialog</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>SeasonNameDialog</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