pgLab/pglab/CrudTab.h
eelke 1a208a6a2d Crud page has now reload action.
F5 key is bound to the execute query, reload catalog and reload crud
actions. By using addAction to add these actions to the relevant pages
the ambiguity of the shortcut is resolved.
2019-10-13 07:31:48 +02:00

43 lines
747 B
C++

#ifndef CRUDTAB_H
#define CRUDTAB_H
#include "catalog/PgClass.h"
#include "IDatabaseWindow.h"
#include <QWidget>
#include <memory>
#include <optional>
namespace Ui {
class CrudTab;
}
class OpenDatabase;
class CrudModel;
class CrudTab : public QWidget {
Q_OBJECT
public:
explicit CrudTab(IDatabaseWindow *context, QWidget *parent = nullptr);
~CrudTab() override;
void setConfig(Oid oid);
public slots:
void refresh();
private:
Ui::CrudTab *ui;
IDatabaseWindow *m_context;
std::shared_ptr<OpenDatabase> m_db;
std::optional<PgClass> m_table;
CrudModel *m_crudModel = nullptr;
void initActions();
private slots:
void on_actionRemove_rows_triggered();
void headerCustomContextMenu(const QPoint &pos);
};
#endif // CRUDTAB_H