Icons on action supplied by the PlgPages.
This commit is contained in:
parent
3d516e6006
commit
4dd526f32a
3 changed files with 16 additions and 1 deletions
|
|
@ -68,3 +68,14 @@ void CrudTab::on_actionRemove_rows_triggered()
|
|||
m_crudModel->removeRow(ui->tableView->currentIndex().row());
|
||||
//removeRows();
|
||||
}
|
||||
|
||||
std::vector<QAction*> CrudTab::getToolbarActions()
|
||||
{
|
||||
if (actions.empty()) {
|
||||
QAction *action = new QAction(QIcon(":/icons/script_go.png"), tr("Refresh"), this);
|
||||
action->setShortcut(QKeySequence(Qt::Key_F5));
|
||||
connect(action, &QAction::triggered, this, &CrudTab::refresh);
|
||||
actions.push_back(action);
|
||||
}
|
||||
return actions;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,6 +25,8 @@ public:
|
|||
void setConfig(std::shared_ptr<OpenDatabase> db, const PgClass &table);
|
||||
|
||||
void refresh();
|
||||
|
||||
virtual std::vector<QAction*> getToolbarActions() override;
|
||||
private:
|
||||
Ui::CrudTab *ui;
|
||||
|
||||
|
|
@ -34,6 +36,7 @@ private:
|
|||
PgClass m_table;
|
||||
|
||||
CrudModel *m_crudModel = nullptr;
|
||||
std::vector<QAction*> actions;
|
||||
|
||||
private slots:
|
||||
// void tableView_currentRowChanged(const QModelIndex ¤t, const QModelIndex &previous);
|
||||
|
|
|
|||
|
|
@ -607,7 +607,8 @@ void QueryTab::focusEditor()
|
|||
std::vector<QAction*> QueryTab::getToolbarActions()
|
||||
{
|
||||
if (actions.empty()) {
|
||||
QAction *action = new QAction(tr("Execute"), this);
|
||||
QAction *action = new QAction(QIcon(":/icons/script_go.png"), tr("Execute"), this);
|
||||
action->setShortcut(QKeySequence(Qt::Key_F5));
|
||||
connect(action, &QAction::triggered, this, &QueryTab::execute);
|
||||
actions.push_back(action);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue