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.
This commit is contained in:
eelke 2019-10-13 07:31:48 +02:00
parent 4278fe6ff4
commit 1a208a6a2d
4 changed files with 71 additions and 51 deletions

View file

@ -15,6 +15,7 @@ namespace Pgsql {
class Connection;
}
class CrudTab;
class MasterController;
class QCloseEvent;
class OpenDatabase;
@ -48,6 +49,7 @@ public:
virtual void newCodeGenPage(QString query, std::shared_ptr<const Pgsql::Result> dbres) override;
QueryTool *GetActiveQueryTool();
CrudTab *GetActiveCrud();
private:
QTabWidget *m_tabWidget = nullptr;
QToolBar *m_mainToolBar = nullptr;
@ -79,6 +81,7 @@ private:
QAction *actionOpenSql = nullptr;
QAction *actionPasteLangString = nullptr;
QAction *actionRefreshCatalog = nullptr;
QAction *actionRefreshCrud = nullptr;
QAction *actionSaveSql = nullptr;
QAction *actionSaveSqlAs = nullptr;
QAction *actionSaveCopyOfSqlAs = nullptr;
@ -89,6 +92,7 @@ private:
QMenu *menuHelp = nullptr;
QMenu *menuQuery = nullptr;
QMenu *menuCatalog = nullptr;
QMenu *menuCrud = nullptr;
QMenu *menuWindow = nullptr;
@ -109,15 +113,14 @@ private:
QFutureWatcher<LoadCatalog::Result> loadWatcher;
void newCreateTablePage();
void newCrudPage(Oid tableoid);
void createActions();
void initMenus();
QAction* seperator();
void createCatalogInspector(QString caption, NamespaceFilter filter);
void newCreateTablePage();
void newCrudPage(Oid tableoid);
void newCatalogInspectorPage(QString caption, NamespaceFilter filter);
void closeTab(int index);
private slots:
void catalogLoaded();
@ -143,11 +146,13 @@ private slots:
void on_actionOpenSql_triggered();
void on_actionPasteLangString_triggered();
void on_actionRefreshCatalog_triggered();
void on_actionRefreshCrud_triggered();
void on_actionSaveSql_triggered();
void on_actionSaveSqlAs_triggered();
void on_actionSaveCopyOfSqlAs_triggered();
void on_actionShowConnectionManager_triggered();
void on_m_tabWidget_tabCloseRequested(int index);
void on_m_tabWidget_currentChanged(int index);
// IDatabaseWindow interface
public: