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:
parent
c2d725ec6d
commit
3d516e6006
10 changed files with 130 additions and 26 deletions
|
|
@ -22,7 +22,7 @@
|
|||
#include "GlobalIoService.h"
|
||||
|
||||
QueryTab::QueryTab(MainWindow *win, QWidget *parent) :
|
||||
PglPage(parent),
|
||||
PlgPage(parent),
|
||||
ui(new Ui::QueryTab),
|
||||
m_win(win),
|
||||
m_dbConnection(*getGlobalAsioIoService())
|
||||
|
|
@ -603,3 +603,13 @@ void QueryTab::focusEditor()
|
|||
{
|
||||
ui->queryEdit->setFocus();
|
||||
}
|
||||
|
||||
std::vector<QAction*> QueryTab::getToolbarActions()
|
||||
{
|
||||
if (actions.empty()) {
|
||||
QAction *action = new QAction(tr("Execute"), this);
|
||||
connect(action, &QAction::triggered, this, &QueryTab::execute);
|
||||
actions.push_back(action);
|
||||
}
|
||||
return actions;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue