rename Window::buttonClick to Window::executeConfig
This commit is contained in:
parent
ae7f310ab2
commit
7c2461626d
@ -118,7 +118,7 @@ void Window::populateGrid(const QVector<EntryPushButton *> &list)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Window::buttonClick(const EntryConfig &config)
|
void Window::executeConfig(const EntryConfig &config)
|
||||||
{
|
{
|
||||||
QProcess::startDetached(config.command, config.arguments);
|
QProcess::startDetached(config.command, config.arguments);
|
||||||
this->closeWindow();
|
this->closeWindow();
|
||||||
@ -369,7 +369,7 @@ void Window::keyPressEvent(QKeyEvent *event)
|
|||||||
[&key](const EntryPushButton *y) { return y->getShortcutKey() == key; });
|
[&key](const EntryPushButton *y) { return y->getShortcutKey() == key; });
|
||||||
if(it != buttonsInGrid.end())
|
if(it != buttonsInGrid.end())
|
||||||
{
|
{
|
||||||
buttonClick((*it)->getEntryConfig());
|
executeConfig((*it)->getEntryConfig());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
QWidget::keyPressEvent(event);
|
QWidget::keyPressEvent(event);
|
||||||
@ -426,7 +426,7 @@ void Window::filterGridFor(QString filter)
|
|||||||
EntryPushButton *Window::createEntryButton(const EntryConfig &entry)
|
EntryPushButton *Window::createEntryButton(const EntryConfig &entry)
|
||||||
{
|
{
|
||||||
EntryPushButton *button = new EntryPushButton(entry);
|
EntryPushButton *button = new EntryPushButton(entry);
|
||||||
connect(button, &EntryPushButton::clicked, this, &Window::buttonClick);
|
connect(button, &EntryPushButton::clicked, this, &Window::executeConfig);
|
||||||
connect(button, &EntryPushButton::addToFavourites, this, &Window::addToFavourites);
|
connect(button, &EntryPushButton::addToFavourites, this, &Window::addToFavourites);
|
||||||
connect(button, &EntryPushButton::deleteRequested, this, &Window::deleteEntry);
|
connect(button, &EntryPushButton::deleteRequested, this, &Window::deleteEntry);
|
||||||
return button;
|
return button;
|
||||||
@ -443,7 +443,7 @@ void Window::lineEditReturnPressed()
|
|||||||
|
|
||||||
if(buttonsInGrid.length() > 0 && this->lineEdit->text().length() > 0)
|
if(buttonsInGrid.length() > 0 && this->lineEdit->text().length() > 0)
|
||||||
{
|
{
|
||||||
buttonClick(buttonsInGrid[0]->getEntryConfig());
|
executeConfig(buttonsInGrid[0]->getEntryConfig());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
2
window.h
2
window.h
@ -63,7 +63,7 @@ class Window : public QWidget
|
|||||||
void keyReleaseEvent(QKeyEvent *event);
|
void keyReleaseEvent(QKeyEvent *event);
|
||||||
QVector<EntryPushButton *> generateEntryButtons(const QVector<EntryConfig> &userEntryButtons);
|
QVector<EntryPushButton *> generateEntryButtons(const QVector<EntryConfig> &userEntryButtons);
|
||||||
void keyPressEvent(QKeyEvent *event);
|
void keyPressEvent(QKeyEvent *event);
|
||||||
void buttonClick(const EntryConfig &button);
|
void executeConfig(const EntryConfig &button);
|
||||||
void addToFavourites(const EntryConfig &button);
|
void addToFavourites(const EntryConfig &button);
|
||||||
void deleteEntry(EntryConfig &config);
|
void deleteEntry(EntryConfig &config);
|
||||||
QLineEdit *lineEdit;
|
QLineEdit *lineEdit;
|
||||||
|
Loading…
Reference in New Issue
Block a user