cleanup code

This commit is contained in:
Steven Cherry 2016-06-22 20:43:49 -05:00
parent 57cb68f47d
commit 071d0325a3
2 changed files with 5 additions and 7 deletions

View File

@ -52,7 +52,6 @@ ConfigureInput::ConfigureInput(QWidget* parent) :
ConfigureInput::~ConfigureInput()
{
delete timer;
}
/// Event handler for all button released() event.

View File

@ -29,22 +29,21 @@ public:
~ConfigureInput();
void applyConfiguration();
public Q_SLOTS:
void handleClick();
void restoreDefaults();
private:
std::unique_ptr<Ui::ConfigureInput> ui;
std::map<Settings::NativeInput::Values, QPushButton*> input_mapping;
int key_pressed;
QPushButton* changing_button = nullptr; /// button currently waiting for key press.
QString previous_mapping;
QTimer* timer = new QTimer();
QTimer* timer = new QTimer(this);
void setConfiguration();
void removeDuplicates(const QString& newValue);
void keyPressEvent(QKeyEvent* event) override;
QString getKeyName(int key_code) const;
Qt::Key getKeyValue(const QString& text) const;
private Q_SLOTS:
void setKey();
private Q_SLOTS:
void handleClick();
void restoreDefaults();
};