#pragma once

#include <QWidget>

#include "%2.h"
#include "FormBuilder.h"
#include "%3.h"
#include "ui_%1.h"

namespace Ui { class %1; };

class %1 : public QWidget
{
	Q_OBJECT

public:
	%1(QWidget *parent = Q_NULLPTR);
	~%1();

private:
	void init();
	void initTableView();
	void initModel();
	void initService();
	void initPagination();
    void initFormBuilder();

	void doQuery(int pageIndex = 0);
	QList<%4_ptr> convertToList(qx::IxCollection *collection);

private slots:
	void onQuery();
	void onReset();
	void onAdd();
	void onEdit();
	void onRemove();

private:
	Ui::%1 *ui;
	%2 *m_Model;
    FormBuilder *m_FormBuilder;
	%3 *m_Service;
	int m_PageIndex;
};
