mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
1043f9f803
* refactor: remove unnecessary includes in headers * fix: formatting * chore: changelog * fix: scrollbar * fix: suggestions and old appbase remains * fix: suggestion * fix: missing Qt forward declarations * fix: another qt include * fix: includes for precompiled-headers=off * Add missing `<memory>` includes * Add missing `#pragma once` * Fix tests Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
60 lines
1.1 KiB
C++
60 lines
1.1 KiB
C++
#pragma once
|
|
|
|
#include <QDialog>
|
|
|
|
#include <memory>
|
|
|
|
namespace Ui {
|
|
|
|
class EditHotkeyDialog;
|
|
|
|
} // namespace Ui
|
|
|
|
namespace chatterino {
|
|
|
|
class Hotkey;
|
|
|
|
class EditHotkeyDialog : public QDialog
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit EditHotkeyDialog(const std::shared_ptr<Hotkey> data,
|
|
bool isAdd = false, QWidget *parent = nullptr);
|
|
~EditHotkeyDialog() final;
|
|
|
|
std::shared_ptr<Hotkey> data();
|
|
|
|
protected slots:
|
|
/**
|
|
* @brief validates the hotkey
|
|
*
|
|
* fired by the ok button
|
|
**/
|
|
void afterEdit();
|
|
|
|
/**
|
|
* @brief updates the list of actions based on the category
|
|
*
|
|
* fired by the category picker changing
|
|
**/
|
|
void updatePossibleActions();
|
|
|
|
/**
|
|
* @brief updates the arguments description and input visibility
|
|
*
|
|
* fired by the action picker changing
|
|
**/
|
|
void updateArgumentsInput();
|
|
|
|
private:
|
|
void showEditError(QString errorText);
|
|
|
|
Ui::EditHotkeyDialog *ui_;
|
|
std::shared_ptr<Hotkey> data_;
|
|
|
|
bool shownSingleKeyWarning = false;
|
|
};
|
|
|
|
} // namespace chatterino
|