Double clicking a table now opens a CRUD page for that table however data cannot be changed yet thought it will display an editbox.

This commit is contained in:
eelke 2018-01-09 20:39:43 +01:00
parent abd4020ddf
commit 2ba27178a2
13 changed files with 288 additions and 33 deletions

View file

@ -1,22 +1,37 @@
#ifndef CRUDTAB_H
#ifndef CRUDTAB_H
#define CRUDTAB_H
#include "PgClass.h"
#include <QWidget>
#include <memory>
namespace Ui {
class CrudTab;
class CrudTab;
}
class OpenDatabase;
class CrudModel;
class MainWindow;
class CrudTab : public QWidget
{
Q_OBJECT
public:
explicit CrudTab(QWidget *parent = 0);
explicit CrudTab(MainWindow *parent = 0);
~CrudTab();
void setConfig(std::shared_ptr<OpenDatabase> db, const PgClass &table);
private:
Ui::CrudTab *ui;
MainWindow *m_window;
std::shared_ptr<OpenDatabase> m_db;
PgClass m_table;
CrudModel *m_crudModel = nullptr;
};
#endif // CRUDTAB_H