Updated Accommodation testing plugin.
							parent
							
								
									7c90c66468
								
							
						
					
					
						commit
						de7e0fc9c4
					
				@ -0,0 +1,17 @@
 | 
			
		||||
#include "acform.h"
 | 
			
		||||
#include "ui_acform.h"
 | 
			
		||||
 | 
			
		||||
AcForm::AcForm(QWidget *parent) :
 | 
			
		||||
    AutoForm<Person>(parent),
 | 
			
		||||
    ui(new Ui::AcForm)
 | 
			
		||||
{
 | 
			
		||||
    ui->setupUi(this);
 | 
			
		||||
 | 
			
		||||
    registerBinding(ui->firstName);
 | 
			
		||||
    registerBinding(ui->lastName);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
AcForm::~AcForm()
 | 
			
		||||
{
 | 
			
		||||
    delete ui;
 | 
			
		||||
}
 | 
			
		||||
@ -0,0 +1,25 @@
 | 
			
		||||
#ifndef ACFORM_H
 | 
			
		||||
#define ACFORM_H
 | 
			
		||||
 | 
			
		||||
#include <QWidget>
 | 
			
		||||
#include <autoform.h>
 | 
			
		||||
 | 
			
		||||
#include "data/person.h"
 | 
			
		||||
 | 
			
		||||
namespace Ui {
 | 
			
		||||
class AcForm;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
class AcForm : public AutoForm<Person>
 | 
			
		||||
{
 | 
			
		||||
    Q_OBJECT
 | 
			
		||||
 | 
			
		||||
public:
 | 
			
		||||
    explicit AcForm(QWidget *parent = 0);
 | 
			
		||||
    ~AcForm();
 | 
			
		||||
 | 
			
		||||
private:
 | 
			
		||||
    Ui::AcForm *ui;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#endif // ACFORM_H
 | 
			
		||||
@ -0,0 +1,39 @@
 | 
			
		||||
<?xml version="1.0" encoding="UTF-8"?>
 | 
			
		||||
<ui version="4.0">
 | 
			
		||||
 <class>AcForm</class>
 | 
			
		||||
 <widget class="QWidget" name="AcForm">
 | 
			
		||||
  <property name="geometry">
 | 
			
		||||
   <rect>
 | 
			
		||||
    <x>0</x>
 | 
			
		||||
    <y>0</y>
 | 
			
		||||
    <width>400</width>
 | 
			
		||||
    <height>300</height>
 | 
			
		||||
   </rect>
 | 
			
		||||
  </property>
 | 
			
		||||
  <property name="windowTitle">
 | 
			
		||||
   <string>Form</string>
 | 
			
		||||
  </property>
 | 
			
		||||
  <widget class="QLineEdit" name="firstName">
 | 
			
		||||
   <property name="geometry">
 | 
			
		||||
    <rect>
 | 
			
		||||
     <x>90</x>
 | 
			
		||||
     <y>60</y>
 | 
			
		||||
     <width>191</width>
 | 
			
		||||
     <height>20</height>
 | 
			
		||||
    </rect>
 | 
			
		||||
   </property>
 | 
			
		||||
  </widget>
 | 
			
		||||
  <widget class="QLineEdit" name="lastName">
 | 
			
		||||
   <property name="geometry">
 | 
			
		||||
    <rect>
 | 
			
		||||
     <x>90</x>
 | 
			
		||||
     <y>110</y>
 | 
			
		||||
     <width>191</width>
 | 
			
		||||
     <height>20</height>
 | 
			
		||||
    </rect>
 | 
			
		||||
   </property>
 | 
			
		||||
  </widget>
 | 
			
		||||
 </widget>
 | 
			
		||||
 <resources/>
 | 
			
		||||
 <connections/>
 | 
			
		||||
</ui>
 | 
			
		||||
@ -0,0 +1,8 @@
 | 
			
		||||
#include "tablemodel.h"
 | 
			
		||||
 | 
			
		||||
TableModel::TableModel(QObject *parent)
 | 
			
		||||
    :AutoTableModel<Person>(parent)
 | 
			
		||||
{
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -0,0 +1,18 @@
 | 
			
		||||
#ifndef TABLEMODEL_H
 | 
			
		||||
#define TABLEMODEL_H
 | 
			
		||||
 | 
			
		||||
#include <core.h>
 | 
			
		||||
#include <autotablemodel.h>
 | 
			
		||||
 | 
			
		||||
#include "data/person.h"
 | 
			
		||||
 | 
			
		||||
class TableModel : public AutoTableModel<Person>
 | 
			
		||||
{
 | 
			
		||||
    Q_OBJECT
 | 
			
		||||
 | 
			
		||||
public:
 | 
			
		||||
    explicit TableModel(QObject *parent = NULL);
 | 
			
		||||
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#endif // TABLEMODEL_H
 | 
			
		||||
					Loading…
					
					
				
		Reference in New Issue