pgLab/pglab/CrudTab.h

46 lines
821 B
C++

#ifndef CRUDTAB_H
#define CRUDTAB_H
#include "PgClass.h"
#include <QWidget>
#include "PlgPage.h"
#include <memory>
namespace Ui {
class CrudTab;
}
class OpenDatabase;
class CrudModel;
class MainWindow;
class CrudTab : public PlgPage
{
Q_OBJECT
public:
explicit CrudTab(MainWindow *parent = 0);
~CrudTab();
void setConfig(std::shared_ptr<OpenDatabase> db, const PgClass &table);
void refresh();
virtual std::vector<QAction*> getToolbarActions() override;
private:
Ui::CrudTab *ui;
MainWindow *m_window;
std::shared_ptr<OpenDatabase> m_db;
PgClass m_table;
CrudModel *m_crudModel = nullptr;
std::vector<QAction*> actions;
private slots:
// void tableView_currentRowChanged(const QModelIndex &current, const QModelIndex &previous);
void on_actionRemove_rows_triggered();
};
#endif // CRUDTAB_H