First tab at building a mechanism where tabpages can supply a list of actions that are added to the global main toolbar.

This commit is contained in:
eelke 2018-05-14 20:24:41 +02:00
parent c2d725ec6d
commit 3d516e6006
10 changed files with 130 additions and 26 deletions

View file

@ -8,7 +8,7 @@
#include "tuplesresultwidget.h"
#include <QWidget>
#include "PglPage.h"
#include "PlgPage.h"
#include <memory>
namespace Ui {
@ -32,7 +32,7 @@ class OpenDatabase;
class QueryParamListController;
class PgDatabaseCatalog;
class QueryTab : public PglPage {
class QueryTab : public PlgPage {
Q_OBJECT
public:
QueryTab(MainWindow *win, QWidget *parent = nullptr);
@ -61,6 +61,8 @@ public:
bool isChanged() const { return m_queryTextChanged; }
bool isNew() const { return m_new; }
void focusEditor();
virtual std::vector<QAction*> getToolbarActions() override;
private:
using ResultTabContainer = std::vector<TuplesResultWidget*>;
@ -70,6 +72,7 @@ private:
SqlSyntaxHighlighter* highlighter;
ConnectionConfig m_config;
StopWatch m_stopwatch;
std::vector<QAction*> actions;
QueryParamListController *m_queryParamListController = nullptr;