summaryrefslogtreecommitdiff
path: root/src/gui/windows
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-03-21 22:22:47 +0300
committerAndrei Karas <akaras@inbox.ru>2014-03-21 22:22:47 +0300
commitba931a717cb5a2549ecdaa1f924dbbf5f896a21b (patch)
tree3c623bc1ce935c08b749572af439ae4b3b3dbc5b /src/gui/windows
parent60b40c0c68e9cffbc5f48d4f672d99009488f8b1 (diff)
downloadmanaplus-ba931a717cb5a2549ecdaa1f924dbbf5f896a21b.tar.gz
manaplus-ba931a717cb5a2549ecdaa1f924dbbf5f896a21b.tar.bz2
manaplus-ba931a717cb5a2549ecdaa1f924dbbf5f896a21b.tar.xz
manaplus-ba931a717cb5a2549ecdaa1f924dbbf5f896a21b.zip
Rename keyEvent variables into event.
Diffstat (limited to 'src/gui/windows')
-rw-r--r--src/gui/windows/charcreatedialog.cpp6
-rw-r--r--src/gui/windows/charcreatedialog.h2
-rw-r--r--src/gui/windows/charselectdialog.cpp18
-rw-r--r--src/gui/windows/charselectdialog.h2
-rw-r--r--src/gui/windows/editserverdialog.cpp6
-rw-r--r--src/gui/windows/editserverdialog.h2
-rw-r--r--src/gui/windows/itemamountwindow.cpp2
-rw-r--r--src/gui/windows/itemamountwindow.h2
-rw-r--r--src/gui/windows/logindialog.cpp6
-rw-r--r--src/gui/windows/logindialog.h2
-rw-r--r--src/gui/windows/quitdialog.cpp4
-rw-r--r--src/gui/windows/quitdialog.h2
-rw-r--r--src/gui/windows/registerdialog.cpp6
-rw-r--r--src/gui/windows/registerdialog.h2
-rw-r--r--src/gui/windows/serverdialog.cpp12
-rw-r--r--src/gui/windows/serverdialog.h2
-rw-r--r--src/gui/windows/updaterwindow.cpp4
-rw-r--r--src/gui/windows/updaterwindow.h2
-rw-r--r--src/gui/windows/worldselectdialog.cpp4
-rw-r--r--src/gui/windows/worldselectdialog.h2
20 files changed, 44 insertions, 44 deletions
diff --git a/src/gui/windows/charcreatedialog.cpp b/src/gui/windows/charcreatedialog.cpp
index 1df282189..53b4b55ff 100644
--- a/src/gui/windows/charcreatedialog.cpp
+++ b/src/gui/windows/charcreatedialog.cpp
@@ -655,13 +655,13 @@ void CharCreateDialog::updatePlayer()
}
}
-void CharCreateDialog::keyPressed(KeyEvent &keyEvent)
+void CharCreateDialog::keyPressed(KeyEvent &event)
{
- const int actionId = keyEvent.getActionId();
+ const int actionId = event.getActionId();
switch (actionId)
{
case Input::KEY_GUI_CANCEL:
- keyEvent.consume();
+ event.consume();
action(ActionEvent(mCancelButton,
mCancelButton->getActionEventId()));
break;
diff --git a/src/gui/windows/charcreatedialog.h b/src/gui/windows/charcreatedialog.h
index 6342450ec..652254776 100644
--- a/src/gui/windows/charcreatedialog.h
+++ b/src/gui/windows/charcreatedialog.h
@@ -78,7 +78,7 @@ class CharCreateDialog final : public Window,
void updatePlayer();
- void keyPressed(KeyEvent &keyEvent) override final;
+ void keyPressed(KeyEvent &event) override final;
private:
int getDistributedPoints() const A_WARN_UNUSED;
diff --git a/src/gui/windows/charselectdialog.cpp b/src/gui/windows/charselectdialog.cpp
index 4480f06af..887937232 100644
--- a/src/gui/windows/charselectdialog.cpp
+++ b/src/gui/windows/charselectdialog.cpp
@@ -317,20 +317,20 @@ void CharSelectDialog::use(const int selected)
}
}
-void CharSelectDialog::keyPressed(KeyEvent &keyEvent)
+void CharSelectDialog::keyPressed(KeyEvent &event)
{
- const int actionId = keyEvent.getActionId();
+ const int actionId = event.getActionId();
switch (actionId)
{
case Input::KEY_GUI_CANCEL:
- keyEvent.consume();
+ event.consume();
action(ActionEvent(mSwitchLoginButton,
mSwitchLoginButton->getActionEventId()));
break;
case Input::KEY_GUI_RIGHT:
{
- keyEvent.consume();
+ event.consume();
int idx = mCharacterView->getSelected();
if (idx >= 0)
{
@@ -345,7 +345,7 @@ void CharSelectDialog::keyPressed(KeyEvent &keyEvent)
case Input::KEY_GUI_LEFT:
{
- keyEvent.consume();
+ event.consume();
int idx = mCharacterView->getSelected();
if (idx >= 0)
{
@@ -360,7 +360,7 @@ void CharSelectDialog::keyPressed(KeyEvent &keyEvent)
case Input::KEY_GUI_UP:
{
- keyEvent.consume();
+ event.consume();
int idx = mCharacterView->getSelected();
if (idx >= 0)
{
@@ -375,7 +375,7 @@ void CharSelectDialog::keyPressed(KeyEvent &keyEvent)
case Input::KEY_GUI_DOWN:
{
- keyEvent.consume();
+ event.consume();
int idx = mCharacterView->getSelected();
if (idx >= 0)
{
@@ -390,7 +390,7 @@ void CharSelectDialog::keyPressed(KeyEvent &keyEvent)
case Input::KEY_GUI_DELETE:
{
- keyEvent.consume();
+ event.consume();
const int idx = mCharacterView->getSelected();
if (idx >= 0 && mCharacterEntries[idx]
&& mCharacterEntries[idx]->getCharacter())
@@ -402,7 +402,7 @@ void CharSelectDialog::keyPressed(KeyEvent &keyEvent)
case Input::KEY_GUI_SELECT:
{
- keyEvent.consume();
+ event.consume();
use(mCharacterView->getSelected());
break;
}
diff --git a/src/gui/windows/charselectdialog.h b/src/gui/windows/charselectdialog.h
index 38c307f30..cf44f30b9 100644
--- a/src/gui/windows/charselectdialog.h
+++ b/src/gui/windows/charselectdialog.h
@@ -62,7 +62,7 @@ class CharSelectDialog final : public Window,
void action(const ActionEvent &event) override final;
- void keyPressed(KeyEvent &keyEvent) override final;
+ void keyPressed(KeyEvent &event) override final;
enum SelectAction
{
diff --git a/src/gui/windows/editserverdialog.cpp b/src/gui/windows/editserverdialog.cpp
index 316a7051b..6a25a2d77 100644
--- a/src/gui/windows/editserverdialog.cpp
+++ b/src/gui/windows/editserverdialog.cpp
@@ -242,12 +242,12 @@ void EditServerDialog::action(const ActionEvent &event)
}
}
-void EditServerDialog::keyPressed(KeyEvent &keyEvent)
+void EditServerDialog::keyPressed(KeyEvent &event)
{
- if (keyEvent.isConsumed())
+ if (event.isConsumed())
return;
- const int actionId = keyEvent.getActionId();
+ const int actionId = event.getActionId();
if (actionId == static_cast<int>(Input::KEY_GUI_CANCEL))
{
diff --git a/src/gui/windows/editserverdialog.h b/src/gui/windows/editserverdialog.h
index b70d1031b..98f5e07fd 100644
--- a/src/gui/windows/editserverdialog.h
+++ b/src/gui/windows/editserverdialog.h
@@ -59,7 +59,7 @@ class EditServerDialog final : public Window,
*/
void action(const ActionEvent &event) override final;
- void keyPressed(KeyEvent &keyEvent) override final;
+ void keyPressed(KeyEvent &event) override final;
private:
TextField *mServerAddressField;
diff --git a/src/gui/windows/itemamountwindow.cpp b/src/gui/windows/itemamountwindow.cpp
index ec581a96e..7db944695 100644
--- a/src/gui/windows/itemamountwindow.cpp
+++ b/src/gui/windows/itemamountwindow.cpp
@@ -388,7 +388,7 @@ void ItemAmountWindow::close()
scheduleDelete();
}
-void ItemAmountWindow::keyReleased(KeyEvent &keyEvent A_UNUSED)
+void ItemAmountWindow::keyReleased(KeyEvent &event A_UNUSED)
{
mItemAmountSlide->setValue(mItemAmountTextField->getValue());
}
diff --git a/src/gui/windows/itemamountwindow.h b/src/gui/windows/itemamountwindow.h
index 2a414bb24..d2dca064e 100644
--- a/src/gui/windows/itemamountwindow.h
+++ b/src/gui/windows/itemamountwindow.h
@@ -82,7 +82,7 @@ class ItemAmountWindow final : public Window,
*/
void close();
- void keyReleased(KeyEvent &keyEvent) override final;
+ void keyReleased(KeyEvent &event) override final;
/**
* Creates the dialog, or bypass it if there aren't enough items.
diff --git a/src/gui/windows/logindialog.cpp b/src/gui/windows/logindialog.cpp
index 71abf153a..4db58e911 100644
--- a/src/gui/windows/logindialog.cpp
+++ b/src/gui/windows/logindialog.cpp
@@ -256,15 +256,15 @@ void LoginDialog::action(const ActionEvent &event)
}
}
-void LoginDialog::keyPressed(KeyEvent &keyEvent)
+void LoginDialog::keyPressed(KeyEvent &event)
{
- if (keyEvent.isConsumed())
+ if (event.isConsumed())
{
mLoginButton->setEnabled(canSubmit());
return;
}
- const int actionId = keyEvent.getActionId();
+ const int actionId = event.getActionId();
if (actionId == static_cast<int>(Input::KEY_GUI_CANCEL))
{
action(ActionEvent(nullptr, mServerButton->getActionEventId()));
diff --git a/src/gui/windows/logindialog.h b/src/gui/windows/logindialog.h
index 7150b62c1..1813e1817 100644
--- a/src/gui/windows/logindialog.h
+++ b/src/gui/windows/logindialog.h
@@ -71,7 +71,7 @@ class LoginDialog final : public Window,
/**
* Called when a key is pressed in one of the text fields.
*/
- void keyPressed(KeyEvent &keyEvent) override final;
+ void keyPressed(KeyEvent &event) override final;
void close() override final;
diff --git a/src/gui/windows/quitdialog.cpp b/src/gui/windows/quitdialog.cpp
index 98aa70c70..560968311 100644
--- a/src/gui/windows/quitdialog.cpp
+++ b/src/gui/windows/quitdialog.cpp
@@ -203,9 +203,9 @@ void QuitDialog::action(const ActionEvent &event)
scheduleDelete();
}
-void QuitDialog::keyPressed(KeyEvent &keyEvent)
+void QuitDialog::keyPressed(KeyEvent &event)
{
- const int actionId = keyEvent.getActionId();
+ const int actionId = event.getActionId();
int dir = 0;
switch (actionId)
diff --git a/src/gui/windows/quitdialog.h b/src/gui/windows/quitdialog.h
index 8ce60d06c..ffcea4122 100644
--- a/src/gui/windows/quitdialog.h
+++ b/src/gui/windows/quitdialog.h
@@ -64,7 +64,7 @@ class QuitDialog final : public Window,
*/
void action(const ActionEvent &event) override final;
- void keyPressed(KeyEvent &keyEvent) override final;
+ void keyPressed(KeyEvent &event) override final;
private:
void placeOption(ContainerPlacer &placer,
diff --git a/src/gui/windows/registerdialog.cpp b/src/gui/windows/registerdialog.cpp
index 50344f223..9c74cbc0d 100644
--- a/src/gui/windows/registerdialog.cpp
+++ b/src/gui/windows/registerdialog.cpp
@@ -282,14 +282,14 @@ void RegisterDialog::action(const ActionEvent &event)
}
}
-void RegisterDialog::keyPressed(KeyEvent &keyEvent)
+void RegisterDialog::keyPressed(KeyEvent &event)
{
- if (keyEvent.isConsumed())
+ if (event.isConsumed())
{
mRegisterButton->setEnabled(canSubmit());
return;
}
- const int actionId = keyEvent.getActionId();
+ const int actionId = event.getActionId();
if (actionId == static_cast<int>(Input::KEY_GUI_CANCEL))
{
action(ActionEvent(nullptr, mCancelButton->getActionEventId()));
diff --git a/src/gui/windows/registerdialog.h b/src/gui/windows/registerdialog.h
index 1d5b5e48b..90087b5e2 100644
--- a/src/gui/windows/registerdialog.h
+++ b/src/gui/windows/registerdialog.h
@@ -87,7 +87,7 @@ class RegisterDialog final : public Window,
/**
* Called when a key is pressed in one of the text fields.
*/
- void keyPressed(KeyEvent &keyEvent) override;
+ void keyPressed(KeyEvent &event) override;
void close() override;
diff --git a/src/gui/windows/serverdialog.cpp b/src/gui/windows/serverdialog.cpp
index ec4bbebbb..33b6f1599 100644
--- a/src/gui/windows/serverdialog.cpp
+++ b/src/gui/windows/serverdialog.cpp
@@ -389,18 +389,18 @@ void ServerDialog::action(const ActionEvent &event)
}
}
-void ServerDialog::keyPressed(KeyEvent &keyEvent)
+void ServerDialog::keyPressed(KeyEvent &event)
{
- switch (keyEvent.getActionId())
+ switch (event.getActionId())
{
case Input::KEY_GUI_CANCEL:
- keyEvent.consume();
+ event.consume();
client->setState(STATE_EXIT);
return;
case Input::KEY_GUI_SELECT:
case Input::KEY_GUI_SELECT2:
- keyEvent.consume();
+ event.consume();
action(ActionEvent(nullptr,
mConnectButton->getActionEventId()));
return;
@@ -435,8 +435,8 @@ void ServerDialog::keyPressed(KeyEvent &keyEvent)
default:
break;
}
- if (!keyEvent.isConsumed())
- mServersList->keyPressed(keyEvent);
+ if (!event.isConsumed())
+ mServersList->keyPressed(event);
}
void ServerDialog::valueChanged(const SelectionEvent &)
diff --git a/src/gui/windows/serverdialog.h b/src/gui/windows/serverdialog.h
index 60b84f089..88b6a7caf 100644
--- a/src/gui/windows/serverdialog.h
+++ b/src/gui/windows/serverdialog.h
@@ -74,7 +74,7 @@ class ServerDialog final : public Window,
*/
void action(const ActionEvent &event) override final;
- void keyPressed(KeyEvent &keyEvent) override final;
+ void keyPressed(KeyEvent &event) override final;
/**
* Called when the selected value changed in the servers list box.
diff --git a/src/gui/windows/updaterwindow.cpp b/src/gui/windows/updaterwindow.cpp
index 247ef8707..70af8e7ea 100644
--- a/src/gui/windows/updaterwindow.cpp
+++ b/src/gui/windows/updaterwindow.cpp
@@ -292,9 +292,9 @@ void UpdaterWindow::action(const ActionEvent &event)
}
}
-void UpdaterWindow::keyPressed(KeyEvent &keyEvent)
+void UpdaterWindow::keyPressed(KeyEvent &event)
{
- const int actionId = keyEvent.getActionId();
+ const int actionId = event.getActionId();
if (actionId == static_cast<int>(Input::KEY_GUI_CANCEL))
{
action(ActionEvent(nullptr, mCancelButton->getActionEventId()));
diff --git a/src/gui/windows/updaterwindow.h b/src/gui/windows/updaterwindow.h
index 39e1e84f3..4874ba8ba 100644
--- a/src/gui/windows/updaterwindow.h
+++ b/src/gui/windows/updaterwindow.h
@@ -121,7 +121,7 @@ class UpdaterWindow final : public Window,
void action(const ActionEvent &event) override final;
- void keyPressed(KeyEvent &keyEvent) override final;
+ void keyPressed(KeyEvent &event) override final;
void logic() override final;
diff --git a/src/gui/windows/worldselectdialog.cpp b/src/gui/windows/worldselectdialog.cpp
index 58c1aaee8..963da8f22 100644
--- a/src/gui/windows/worldselectdialog.cpp
+++ b/src/gui/windows/worldselectdialog.cpp
@@ -118,9 +118,9 @@ void WorldSelectDialog::action(const ActionEvent &event)
}
}
-void WorldSelectDialog::keyPressed(KeyEvent &keyEvent)
+void WorldSelectDialog::keyPressed(KeyEvent &event)
{
- const int actionId = keyEvent.getActionId();
+ const int actionId = event.getActionId();
if (actionId == static_cast<int>(Input::KEY_GUI_CANCEL))
{
diff --git a/src/gui/windows/worldselectdialog.h b/src/gui/windows/worldselectdialog.h
index 9d06ac25e..b91beeece 100644
--- a/src/gui/windows/worldselectdialog.h
+++ b/src/gui/windows/worldselectdialog.h
@@ -65,7 +65,7 @@ class WorldSelectDialog final : public Window,
*/
void action(const ActionEvent &event) override final;
- void keyPressed(KeyEvent &keyEvent) override final;
+ void keyPressed(KeyEvent &event) override final;
private:
WorldListModel *mWorldListModel;